decocms 4.567.0 → 4.568.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/dist/client/assets/{AlertCircle-77Slg1mo.js → AlertCircle-4XjOBzzr.js} +1 -1
  2. package/dist/client/assets/{AreaChart-SE-oSToz.js → AreaChart-U2booYre.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-0eZGIs9d.js → ArrowLeft-FLGKBq3z.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-D3pp3g8x.js → ArrowUp-Lwcx-ceL.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-oe8TUIzs.js → CartesianChart-BcKhfNJ4.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-D-0Fq-ih.js → CategoricalChart-Du8Ljv-7.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-TpvuszDI.js → CheckCircle-DFL7pw-c.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-C6Gq0VMA.js → ChevronSelectorVertical-DujPgcUo.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BtMiI6cM.js → ChevronUp-BvHbQNBW.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-5X4JuL9P.js → CreditCard01-BwD4GYuP.js} +1 -1
  11. package/dist/client/assets/{Globe04-DE5hlmxS.js → Globe04-Wakfx0G2.js} +1 -1
  12. package/dist/client/assets/{Key01-BEX3raxr.js → Key01-D8VFHgU4.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-ClWYoOJF.js → LinkBroken01--Z9NHGsb.js} +1 -1
  14. package/dist/client/assets/{Minus-Dqs0K-y6.js → Minus-mLwaHX_9.js} +1 -1
  15. package/dist/client/assets/{Monitor01-Dy43NIcG.js → Monitor01-xd6_AGZa.js} +1 -1
  16. package/dist/client/assets/{Play-B9kSRU73.js → Play-Bd4GTUnl.js} +1 -1
  17. package/dist/client/assets/{Plus-DTA_qyzr.js → Plus-Cq9NYyX9.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-HOuLDy67.js → ReferenceLine-CEoolREz.js} +1 -1
  19. package/dist/client/assets/{SearchMd-DODrmRDH.js → SearchMd-BxQmfb5s.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-CK3v09in.js → ShoppingBag01-CYCT2jnZ.js} +1 -1
  21. package/dist/client/assets/{Sun-BirMDMzO.js → Sun-COkqP7iJ.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-DFMegDqF.js → SwitchHorizontal01-TPw7EzQJ.js} +1 -1
  23. package/dist/client/assets/{Tool01-Dhj9-e2p.js → Tool01-BqhX4Lir.js} +1 -1
  24. package/dist/client/assets/{Tooltip-DUa9z7L4.js → Tooltip-Rsr656vO.js} +1 -1
  25. package/dist/client/assets/{Trash01-DlPuy4hk.js → Trash01-BsqfSoas.js} +1 -1
  26. package/dist/client/assets/{Upload01-B7_UtIIy.js → Upload01-CjUA7jDn.js} +1 -1
  27. package/dist/client/assets/{UserSquare-DRzDrNWv.js → UserSquare-DLTddIeU.js} +1 -1
  28. package/dist/client/assets/{Users01-D2MH6X4i.js → Users01-C0dAo1hK.js} +1 -1
  29. package/dist/client/assets/{XClose-BPpAzkjm.js → XClose-BmPamPKb.js} +1 -1
  30. package/dist/client/assets/{Zap-CSm2QafG.js → Zap-CNah22BF.js} +1 -1
  31. package/dist/client/assets/{access-gate-VZjzTtj1.js → access-gate-KNoXvQR4.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-Dlb7QEF0.js → add-connection-dialog-CoeePYAP.js} +1 -1
  33. package/dist/client/assets/agent-app-h9dvewo_.js +1 -0
  34. package/dist/client/assets/{agent-assets-C17EfgRE.js → agent-assets-BFTAqbZ2.js} +1 -1
  35. package/dist/client/assets/{agent-automation-B4ZBovsD.js → agent-automation-DQSsp-Qq.js} +1 -1
  36. package/dist/client/assets/{agent-automations-qrK0F_qT.js → agent-automations-HvNPVcR1.js} +1 -1
  37. package/dist/client/assets/{agent-calendar-DH2mwvW-.js → agent-calendar-D1UuIhb8.js} +1 -1
  38. package/dist/client/assets/{agent-capabilities-_Toql8Rw.js → agent-capabilities-D2A31nji.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-DKscloVB.js → agent-connect-sources-anUeuGw0.js} +1 -1
  40. package/dist/client/assets/agent-deck-BCxKCrzx.js +1 -0
  41. package/dist/client/assets/{agent-e2e-EecJC8x2.js → agent-e2e-BFTeY8yw.js} +1 -1
  42. package/dist/client/assets/agent-experiments-DCgjZH4p.js +1 -0
  43. package/dist/client/assets/{agent-file-iZ4NUGLw.js → agent-file-CRchtrX1.js} +1 -1
  44. package/dist/client/assets/{agent-hosting-Dv4dOzql.js → agent-hosting-G7B4MOee.js} +1 -1
  45. package/dist/client/assets/{agent-icon-Bw6QCyEx.js → agent-icon-DGjvzBU0.js} +1 -1
  46. package/dist/client/assets/agent-library-Mjv8f5mE.js +1 -0
  47. package/dist/client/assets/agent-library-file-jHy8SGkc.js +1 -0
  48. package/dist/client/assets/agent-overview-vbL61vSj.js +1 -0
  49. package/dist/client/assets/{agent-releases-TATL9kUr.js → agent-releases-CHTMMSg0.js} +1 -1
  50. package/dist/client/assets/agent-settings-C2R4yKuP.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-DNv8LivC.js → agent-site-editor-Cbl8939c.js} +1 -1
  52. package/dist/client/assets/agent-site-editor-code-CPa8HId6.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-DPYtm9fq.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-DlIkhRRY.js +1 -0
  55. package/dist/client/assets/agent-view-AO-J0D6v.js +1 -0
  56. package/dist/client/assets/{agent-view-guard-DZBM0b8V.js → agent-view-guard-DNJq8WJa.js} +1 -1
  57. package/dist/client/assets/{ai-providers-AE8XVdCE.js → ai-providers-Cj1o2PDA.js} +1 -1
  58. package/dist/client/assets/{alert-CdBC10NR.js → alert-CkisSQR8.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-BeJKxwpX.js → analytics-sections-CPw_3198.js} +1 -1
  60. package/dist/client/assets/api-keys-Ca6cGjfN.js +1 -0
  61. package/dist/client/assets/{api-keys-Dhr7aXaQ.js → api-keys-DvsVEDYM.js} +1 -1
  62. package/dist/client/assets/{app-editor-DKFrTznS.js → app-editor-D_UGcnYy.js} +1 -1
  63. package/dist/client/assets/{asset-utils-7GGOgR3V.js → asset-utils-BMQvttAs.js} +1 -1
  64. package/dist/client/assets/{auth-DsiBBvOi.js → auth-D2Lcha9t.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-BDiLMtRv.js → auth-catchall-DyFlHo48.js} +1 -1
  66. package/dist/client/assets/{auth-entry-cOo1IIAQ.js → auth-entry-DDLQ2T30.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-BD7ZQtZI.js → auth-split-layout-C64FoWws.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-g4wWRHNx.js → authenticate-and-persist-oauth-BXtcfltM.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-DxL776kN.js → automation-list-row-Cbotm6BG.js} +1 -1
  70. package/dist/client/assets/{automation-runs-CLAvbaXa.js → automation-runs-uTz7ccV0.js} +1 -1
  71. package/dist/client/assets/{automations-DTy3O45p.js → automations-CgCrXng3.js} +1 -1
  72. package/dist/client/assets/{autosend-CLDsiYES.js → autosend-BeP-7Z9T.js} +1 -1
  73. package/dist/client/assets/{badge-CQfwGgw6.js → badge-37ZrebMM.js} +1 -1
  74. package/dist/client/assets/{block-document-Ds1SRHrx.js → block-document-AH_Uk3nK.js} +1 -1
  75. package/dist/client/assets/{blocks-preview-workspace-context-BjUOv6Gn.js → blocks-preview-workspace-context-wN3COmWz.js} +1 -1
  76. package/dist/client/assets/{blocks-tab-states-DTS9heYD.js → blocks-tab-states-CERDbw5g.js} +1 -1
  77. package/dist/client/assets/{blog-schema-D0od8ENQ.js → blog-schema-DUx1yOEj.js} +1 -1
  78. package/dist/client/assets/{buckets-DJa_BsNC.js → buckets-CncRgLSv.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc-B3q_lki0.js → build-improve-prompt-doc-BWQkcKAa.js} +1 -1
  80. package/dist/client/assets/{calendar-DyqOJ3Yl.js → calendar-ESmP-ay5.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-BCivHBGk.js → capability-load-error-D91RsAwR.js} +1 -1
  82. package/dist/client/assets/{category-editor-CjAyQPuX.js → category-editor-C7jYzChE.js} +1 -1
  83. package/dist/client/assets/{chart-eHX6bECf.js → chart-yg_E5Zl2.js} +1 -1
  84. package/dist/client/assets/{chat-context-DGlvTnKl.js → chat-context-DSkOndUS.js} +1 -1
  85. package/dist/client/assets/{chat-draft-lDXn_WJo.js → chat-draft-CCm5Ov2V.js} +1 -1
  86. package/dist/client/assets/{checkbox-BicdYBus.js → checkbox-DS3fV3cm.js} +1 -1
  87. package/dist/client/assets/{choose-editor-EWBezbD2.js → choose-editor-O-d7ISrT.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-F_8HAZW5.js → cli-auth-success-1kH4GC4v.js} +1 -1
  89. package/dist/client/assets/{client-icons-DajqMwYZ.js → client-icons-C8Uj1zsT.js} +1 -1
  90. package/dist/client/assets/{cms-settings-editor-BwSxTAM8.js → cms-settings-editor-BOlrMR3T.js} +1 -1
  91. package/dist/client/assets/{cms-store-drafts-uQohRmgN.js → cms-store-drafts-Cmau_Xpk.js} +1 -1
  92. package/dist/client/assets/{collapsible-BUfI2uMB.js → collapsible-DRuNeeSr.js} +1 -1
  93. package/dist/client/assets/{collection-detail-DJM8n-Nh.js → collection-detail-DpUbmPF3.js} +1 -1
  94. package/dist/client/assets/{collection-display-button-BwDkXlls.js → collection-display-button-Bwz5aQUh.js} +1 -1
  95. package/dist/client/assets/{collection-search-CX3zyrl-.js → collection-search-BQWTlXQF.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-YLWvJmM-.js → collection-table-wrapper-CbyF6Nov.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-By2NKMgI.js → collection-tabs-D3WnD7EM.js} +1 -1
  98. package/dist/client/assets/{combobox-CfLj8nnB.js → combobox-CT2qCKie.js} +1 -1
  99. package/dist/client/assets/{command-gJAHYCw0.js → command-D37uN5J-.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-CfXFRKkt.js → companion-mcps-section-BFZVF2RC.js} +1 -1
  101. package/dist/client/assets/{config-BmEe9Sll.js → config-CZ3pUlCW.js} +1 -1
  102. package/dist/client/assets/{connect-Bv1wjltN.js → connect-71FB3CXN.js} +1 -1
  103. package/dist/client/assets/{connect-layout-BWcLA-tm.js → connect-layout-CKRVOgzj.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-DSZRQtyq.js → connect-source-dialog-CNca8slt.js} +1 -1
  105. package/dist/client/assets/{connection-C_2ILr0W.js → connection-DESaeNZx.js} +1 -1
  106. package/dist/client/assets/{connection-card-CYwtBEJi.js → connection-card-t63ssUn-.js} +1 -1
  107. package/dist/client/assets/{connection-detail-Bou1FrgT.js → connection-detail-DuRyDzXg.js} +1 -1
  108. package/dist/client/assets/{connection-form-helpers-TcnlMaZD.js → connection-form-helpers-DL8JpgdC.js} +1 -1
  109. package/dist/client/assets/{connection-slug-BW3zmzZg.js → connection-slug-Bv1gCwRj.js} +1 -1
  110. package/dist/client/assets/{connections-k6Hr0O7B.js → connections-CdsCJmtK.js} +1 -1
  111. package/dist/client/assets/{content-tab-BZbNqACK.js → content-tab-Bh7FUKC3.js} +3 -3
  112. package/dist/client/assets/{context-BrQkqNcb.js → context-DLjNZH7d.js} +1 -1
  113. package/dist/client/assets/{context-menu-vgijVtOb.js → context-menu-CugaroNR.js} +1 -1
  114. package/dist/client/assets/{context-shell-Ctmm-Xdc.js → context-shell-DYGyde-Z.js} +3 -3
  115. package/dist/client/assets/{core.esm-BMG4ioMU.js → core.esm-CTG2N8v2.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-DVfXqnPV.js → create-organization-dialog-CogPW5s2.js} +1 -1
  117. package/dist/client/assets/{device-hint-C-9B9AO-.js → device-hint-CD49lDbc.js} +1 -1
  118. package/dist/client/assets/{discover-PXb5-Euj.js → discover-BM-XQVCu.js} +1 -1
  119. package/dist/client/assets/{domain-settings-BZ2zcLtt.js → domain-settings-Bt06PPmF.js} +1 -1
  120. package/dist/client/assets/{drawer-7PMhL6c9.js → drawer-DsjbbVTG.js} +1 -1
  121. package/dist/client/assets/{editor-C31TESmA.js → editor-BpBeMMun.js} +1 -1
  122. package/dist/client/assets/{editor-classes-Cf4dLWq3.js → editor-classes-CS7nwV3G.js} +1 -1
  123. package/dist/client/assets/{empty-state-CkiFzdzZ.js → empty-state-CPetbKsr.js} +1 -1
  124. package/dist/client/assets/{empty-state-Br5S8FBX.js → empty-state-CgDxl1cN.js} +1 -1
  125. package/dist/client/assets/{experiments-tab-choice-C_eZAy_m.js → experiments-tab-choice-Ckqo9bHe.js} +1 -1
  126. package/dist/client/assets/{extract-connection-data-ByI5vK4V.js → extract-connection-data-BoY4cFA7.js} +1 -1
  127. package/dist/client/assets/{feature-gate-Fvf7MS-k.js → feature-gate-D4S13Ohw.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-C6MAaSeS.js → feature-paywall-BPHi9qtV.js} +1 -1
  129. package/dist/client/assets/{feedback-uGs2nxfi.js → feedback-UOqcYnsR.js} +1 -1
  130. package/dist/client/assets/{file-explorer-BYGhyWEG.js → file-explorer-R1XT7WuQ.js} +1 -1
  131. package/dist/client/assets/{file-preview-DVtj98bP.js → file-preview-Bn_lFKvb.js} +1 -1
  132. package/dist/client/assets/{file-share-button-BRYVxpzc.js → file-share-button-BbBCmHML.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-aib86xB6.js → file-type-icon-DwSbw3u_.js} +1 -1
  134. package/dist/client/assets/{folder-icon-xP_msldQ.js → folder-icon-22cZTm1q.js} +1 -1
  135. package/dist/client/assets/{form-BBNzwOZG.js → form-xPNilXk8.js} +1 -1
  136. package/dist/client/assets/{general-CeisvnAE.js → general-BNCy0qRP.js} +1 -1
  137. package/dist/client/assets/{github-icon-Caf_vA32.js → github-icon-M98rwFqR.js} +1 -1
  138. package/dist/client/assets/{home-jWQT8tJO.js → home-CX-I119p.js} +1 -1
  139. package/dist/client/assets/{home-overview-C_lPrOCA.js → home-overview-BImgFzPA.js} +1 -1
  140. package/dist/client/assets/{hosted-reconcile-C-wcyta_.js → hosted-reconcile-B_zakWIj.js} +1 -1
  141. package/dist/client/assets/{icon-button-D7c84PdP.js → icon-button-nAmR0pUP.js} +1 -1
  142. package/dist/client/assets/{index-CkLGogIO.js → index-2pjgY723.js} +1 -1
  143. package/dist/client/assets/{index-CqcoXuFg.js → index-B6xZxtVu.js} +1 -1
  144. package/dist/client/assets/{index-CNvZmowt.js → index-Bx0EGvvq.js} +1 -1
  145. package/dist/client/assets/{index-CMM5_x0M.js → index-C24rff9A.js} +1 -1
  146. package/dist/client/assets/{index-rV6-HlJv.js → index-CM9G2Opl.js} +1 -1
  147. package/dist/client/assets/{index-DrT_mubP.js → index-CcQukHqg.js} +1 -1
  148. package/dist/client/assets/{index-DqnMzkHt.js → index-ChbLGWhe.js} +1 -1
  149. package/dist/client/assets/{index-rbq2RwK4.js → index-CiqUNjUm.js} +1 -1
  150. package/dist/client/assets/{index-DJTz8tA2.js → index-CkRd4yOd.js} +1 -1
  151. package/dist/client/assets/{index-B2hAsS12.js → index-CopIngND.js} +1 -1
  152. package/dist/client/assets/{index-2X0wZvq4.js → index-CpdAUi_L.js} +1 -1
  153. package/dist/client/assets/{index-BXDjwwPk.js → index-DUYaR34S.js} +1 -1
  154. package/dist/client/assets/{index-qZbv6YO4.js → index-DYRhQ9nm.js} +1 -1
  155. package/dist/client/assets/{index-C98dKlkT.js → index-H80WMTvM.js} +1 -1
  156. package/dist/client/assets/{index-CGPEL67z.js → index-oG6UN7--.js} +1 -1
  157. package/dist/client/assets/{index-redirect-DCqW-S58.js → index-redirect-BLueVivV.js} +1 -1
  158. package/dist/client/assets/{index-B8UywZZm.js → index-ucJDxPyE.js} +3 -3
  159. package/dist/client/assets/{infiniteQueryObserver-BGhionND.js → infiniteQueryObserver-Bd4S1JAr.js} +1 -1
  160. package/dist/client/assets/{infra-billing-CkEQLhps.js → infra-billing-Cg1YMKnB.js} +1 -1
  161. package/dist/client/assets/{input-DE1KZAH4.js → input-D-wXYNeQ.js} +3 -3
  162. package/dist/client/assets/{input-30s27Dwt.js → input-egigpNvJ.js} +1 -1
  163. package/dist/client/assets/{integration-icon-DXRPTOXy.js → integration-icon-a40gN_z1.js} +1 -1
  164. package/dist/client/assets/{jira-icon-CfexjHAg.js → jira-icon-DIaDl6Sc.js} +1 -1
  165. package/dist/client/assets/{label-bffvb9RR.js → label-CxjTL0R_.js} +1 -1
  166. package/dist/client/assets/{layout-DUb1_0Na.js → layout-DeMWwMag.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-CGYaMIvK.js → legacy-agents-deep-maguvV0Q.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-DTIlt7DJ.js → legacy-main-redirect-CrJ1J4b6.js} +1 -1
  169. package/dist/client/assets/library-YQBdctuF.js +1 -0
  170. package/dist/client/assets/{library-tab-ChfMhJEt.js → library-tab-CqHQSOSi.js} +1 -1
  171. package/dist/client/assets/{login-oQzZnf04.js → login-GqA0qMx7.js} +1 -1
  172. package/dist/client/assets/{markdown-C594pPG2.js → markdown-Cs2UsOW2.js} +1 -1
  173. package/dist/client/assets/{mcp-app-renderer-BgKMzsSF.js → mcp-app-renderer-Da9_HDDx.js} +1 -1
  174. package/dist/client/assets/{mcp-oauth-Dm95e807.js → mcp-oauth-CwgKK51G.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-BzKawp-_.js → mcp-oauth-DB6dlajV.js} +1 -1
  176. package/dist/client/assets/{members-DEZJ5Mkk.js → members-kUrSWAB8.js} +1 -1
  177. package/dist/client/assets/{memory-D8k1PjtE.js → memory-68_RSYrN.js} +1 -1
  178. package/dist/client/assets/{mock-board-DbSEkLmB.js → mock-board-CthDdMFD.js} +3 -3
  179. package/dist/client/assets/{monaco-editor-Cp-Ik4oF.js → monaco-editor-0eOa-DPV.js} +1 -1
  180. package/dist/client/assets/{monitoring-DcVl24hV.js → monitoring-CajYiFMp.js} +1 -1
  181. package/dist/client/assets/{monitoring-stats-row-do-o5vGg.js → monitoring-stats-row-Badkrd8m.js} +1 -1
  182. package/dist/client/assets/{multi-select-CTRCP8n_.js → multi-select-Dc3qkP9e.js} +1 -1
  183. package/dist/client/assets/{mustache-ezjY74jH.js → mustache-FPu-BUlH.js} +1 -1
  184. package/dist/client/assets/{named-rule-view-DvHwI-Uj.js → named-rule-view-Iopjwm11.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-C8Uv8Lu7.js → new-project-dialog-CcXdYQOA.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-CUY5LMrV.js → oauth-callback-CtKUneJ3.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-BM4j1Kp6.js → oauth-callback-ai-provider-BW86dzZR.js} +1 -1
  188. package/dist/client/assets/{oauth-consent-CGVwKR_T.js → oauth-consent-ImI0sTuT.js} +1 -1
  189. package/dist/client/assets/{onboarding-Rp6hEouh.js → onboarding-BWsm-6Ib.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-DEpsjI9o.js → openai-conversation-x0vBTDcX.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-DWyqj7gv.js → optimistic-project-sidebar-views-DQpn9Pgs.js} +1 -1
  192. package/dist/client/assets/{order-monitor-day-Bu3YI8SD.js → order-monitor-day-CDgLweRg.js} +1 -1
  193. package/dist/client/assets/{organization-choice-CH8EbPmN.js → organization-choice-CRVdDLQi.js} +1 -1
  194. package/dist/client/assets/{orgs-Rdz1cKF2.js → orgs-CT9apq2g.js} +1 -1
  195. package/dist/client/assets/{own-accounts-section-B5fmcBw0.js → own-accounts-section-BRHD0772.js} +1 -1
  196. package/dist/client/assets/{pair-xiFs456g.js → pair-mfml6eLi.js} +1 -1
  197. package/dist/client/assets/{parse-sections-CWxm7mRm.js → parse-sections-11L0xusW.js} +3 -3
  198. package/dist/client/assets/{plan-iqz5I5FG.js → plan-DRqprlax.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-5XW4hCzP.js → plan-ladder-BoOM3V_X.js} +1 -1
  200. package/dist/client/assets/{plan-usage-card-Cj9Gz5rK.js → plan-usage-card-C52vk1JD.js} +1 -1
  201. package/dist/client/assets/{popover-Bcm8q-UM.js → popover-BaWxRQRQ.js} +1 -1
  202. package/dist/client/assets/{post-calendar-C-wpEVEt.js → post-calendar-B7v9fy1f.js} +1 -1
  203. package/dist/client/assets/{post-editor-DSrYz5eu.js → post-editor-B5pVpoGq.js} +1 -1
  204. package/dist/client/assets/{preview-content-BZTSsgR7.js → preview-content-VAE9VX_a.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-Si16X-hs.js → preview-dialog-vZA6Vkch.js} +1 -1
  206. package/dist/client/assets/{preview-panel-BUZ06et3.js → preview-panel-CmtR7uJm.js} +1 -1
  207. package/dist/client/assets/{preview-tab-IspVWI2P.js → preview-tab-COW5YDet.js} +3 -3
  208. package/dist/client/assets/{product-picker-dialog-QdVrFrEF.js → product-picker-dialog-Di0GUuGQ.js} +1 -1
  209. package/dist/client/assets/{profile-BU9rPDry.js → profile-DbHjYdB0.js} +1 -1
  210. package/dist/client/assets/{project-app-view-BBFj0BFi.js → project-app-view-oayAW59Y.js} +1 -1
  211. package/dist/client/assets/{project-apps-J9B-3GYC.js → project-apps-DKkSorHl.js} +1 -1
  212. package/dist/client/assets/{project-icon-BYuH9rQ-.js → project-icon-BDGMpF2P.js} +1 -1
  213. package/dist/client/assets/{project-index-DAfZ854O.js → project-index-BXdjh86r.js} +1 -1
  214. package/dist/client/assets/project-reports-D6yXFUI4.js +1 -0
  215. package/dist/client/assets/{project-sidebar-views-Czma7tbo.js → project-sidebar-views-DxAssfab.js} +1 -1
  216. package/dist/client/assets/project-tasks-CxdDJlKX.js +1 -0
  217. package/dist/client/assets/{projects-DHRuNCso.js → projects-DWtsTPdq.js} +1 -1
  218. package/dist/client/assets/{projects-empty-state-DAINcqhx.js → projects-empty-state-CA380eV8.js} +1 -1
  219. package/dist/client/assets/{prompts-BwCKANv5.js → prompts-BHFq_gsc.js} +1 -1
  220. package/dist/client/assets/record-editor-D0DXAuHN.js +1 -0
  221. package/dist/client/assets/{redirect-editor-DKgcJLei.js → redirect-editor-BwLrArGh.js} +1 -1
  222. package/dist/client/assets/reports-CH4MzjC3.js +1 -0
  223. package/dist/client/assets/{reports-B-KM0N71.js → reports-Dvv0WRgv.js} +1 -1
  224. package/dist/client/assets/{reports-onboarding-lrKJ48LY.js → reports-onboarding-DqGzGU-U.js} +1 -1
  225. package/dist/client/assets/{reports-tab-7YQe_lby.js → reports-tab-C-YlOqTD.js} +2 -2
  226. package/dist/client/assets/repositories-Bvcf-KuW.js +1 -0
  227. package/dist/client/assets/{repositories-DZ-YNWPW.js → repositories-COBSE7nS.js} +1 -1
  228. package/dist/client/assets/{repository-binding-DtOS-5pr.js → repository-binding-BWkpkFiy.js} +1 -1
  229. package/dist/client/assets/{repository-picker-BkanTJ3i.js → repository-picker-TrkRysRA.js} +1 -1
  230. package/dist/client/assets/{require-capability-DJA2DKIk.js → require-capability-DmJgWdQR.js} +1 -1
  231. package/dist/client/assets/{required-auth-layout-FfGW_C4w.js → required-auth-layout-sIreaYcR.js} +1 -1
  232. package/dist/client/assets/{reset-password-Do7rzjnV.js → reset-password-B2HAlTO4.js} +1 -1
  233. package/dist/client/assets/{resizable-C3wpOoRo.js → resizable-e7KAJlT2.js} +1 -1
  234. package/dist/client/assets/{resolve-tab-icon-D0LRqEAN.js → resolve-tab-icon-DnOPa8fE.js} +1 -1
  235. package/dist/client/assets/{review-settings-Dknq5J3l.js → review-settings-BZ6UQlsU.js} +1 -1
  236. package/dist/client/assets/{role-color-C15OiMK-.js → role-color-DKoRr7_O.js} +1 -1
  237. package/dist/client/assets/{roles-BnyT0Tpg.js → roles-BzRIIi-m.js} +1 -1
  238. package/dist/client/assets/route-DgZ0eIWH.js +1 -0
  239. package/dist/client/assets/{route-wsTyUIFW.js → route-cawoaLGc.js} +1 -1
  240. package/dist/client/assets/{route-cyGY1xFk.js → route-uBGz5xtE.js} +1 -1
  241. package/dist/client/assets/{sandbox-lifecycle-context-CTE-NRJ8.js → sandbox-lifecycle-context-DzPeV1F2.js} +1 -1
  242. package/dist/client/assets/{schema-HsTF1Pc5.js → schema-kWZLxlYI.js} +1 -1
  243. package/dist/client/assets/{schema-BeGOWHqJ.js → schema-tSFLTBrW.js} +1 -1
  244. package/dist/client/assets/{scroll-area-C4JxE3Sd.js → scroll-area-BEM410Qx.js} +1 -1
  245. package/dist/client/assets/{search-input-CqVCmKRX.js → search-input-BeN2Dgcn.js} +1 -1
  246. package/dist/client/assets/{search-toggle-2zm3S8SV.js → search-toggle-c4jDK8W2.js} +1 -1
  247. package/dist/client/assets/{secret-picker-BWL5LPg8.js → secret-picker-Cjv-JfME.js} +1 -1
  248. package/dist/client/assets/{secrets-tbMtsvU-.js → secrets-CevHfsbC.js} +1 -1
  249. package/dist/client/assets/{section-array-field-DAQuFQGC.js → section-array-field-DJyNG6r7.js} +1 -1
  250. package/dist/client/assets/{sections-BlIgOACC.js → sections-9yqUizm4.js} +1 -1
  251. package/dist/client/assets/{sections-editor-BW_YSgr6.js → sections-editor-DeOAChIV.js} +1 -1
  252. package/dist/client/assets/{select-74xFBRwJ.js → select-MFmOiD7V.js} +1 -1
  253. package/dist/client/assets/{select-model-DhRUUoEu.js → select-model-CQpO4P5t.js} +1 -1
  254. package/dist/client/assets/{seo-editor-Ckanf0Y7.js → seo-editor-C2CaIIDv.js} +1 -1
  255. package/dist/client/assets/{separator-oNbzaXZp.js → separator-BiskJWog.js} +1 -1
  256. package/dist/client/assets/settings-tab-DQ4iDk73.js +1 -0
  257. package/dist/client/assets/{sheet-DSOCEYQs.js → sheet-MLWNRYhQ.js} +1 -1
  258. package/dist/client/assets/{shell-layout-DLOpHw0Q.js → shell-layout-CMz_aZCA.js} +1 -1
  259. package/dist/client/assets/{site-draft-actions-DZN15MLN.js → site-draft-actions-CmIfl7aD.js} +1 -1
  260. package/dist/client/assets/{site-draft-view-M5zMgyWp.js → site-draft-view-DMPeif4U.js} +1 -1
  261. package/dist/client/assets/site-editor-Br6S_qwB.js +1 -0
  262. package/dist/client/assets/{site-editor-toast-BU0n_ImS.js → site-editor-toast-6KgkdfPr.js} +1 -1
  263. package/dist/client/assets/{skills-BNUPWCHo.js → skills-BqxMFGPE.js} +1 -1
  264. package/dist/client/assets/{slider-COhKeoXK.js → slider-D87k16tL.js} +1 -1
  265. package/dist/client/assets/{sortable.esm-DcEMfWKZ.js → sortable.esm-JloqmUYv.js} +1 -1
  266. package/dist/client/assets/{sso-gKduWE5w.js → sso-DQRc1SkX.js} +1 -1
  267. package/dist/client/assets/{suggestion-tumipUUi.js → suggestion-DSascTGX.js} +1 -1
  268. package/dist/client/assets/{switch-DhJh_HPi.js → switch-CnGPtCHB.js} +1 -1
  269. package/dist/client/assets/{synced-repos-n432_4GJ.js → synced-repos-D_gHr2cZ.js} +1 -1
  270. package/dist/client/assets/{tab-icon-glyph-P5ldYfjO.js → tab-icon-glyph--BvwD-9q.js} +1 -1
  271. package/dist/client/assets/{table-BsHAPl3y.js → table--lSGBU5J.js} +1 -1
  272. package/dist/client/assets/{tabs-ChqaRicq.js → tabs-Cl2CsEMh.js} +1 -1
  273. package/dist/client/assets/{task-board-BEneHA34.js → task-board-BzsqXAQD.js} +1 -1
  274. package/dist/client/assets/{task-route-P15E5tiK.js → task-route-BCP5p_Kg.js} +1 -1
  275. package/dist/client/assets/{task-status-C56yYxCa.js → task-status-C10P7bk5.js} +1 -1
  276. package/dist/client/assets/{taskboard-analytics-sEKNVpnd.js → taskboard-analytics-tig154_J.js} +1 -1
  277. package/dist/client/assets/{tasks-BGXHV-F9.js → tasks-C-AxxRS8.js} +1 -1
  278. package/dist/client/assets/tasks-CE1MQpDZ.js +1 -0
  279. package/dist/client/assets/{textarea-DB65Cb4P.js → textarea-BA6pOE5t.js} +1 -1
  280. package/dist/client/assets/{thread-analytics-DBVrKrEw.js → thread-analytics-Chj_yROn.js} +1 -1
  281. package/dist/client/assets/{thread-intent-CWn1HmtU.js → thread-intent-CI_dX-N0.js} +1 -1
  282. package/dist/client/assets/{thread-route-BjJwVBtH.js → thread-route-BAKmNNyY.js} +1 -1
  283. package/dist/client/assets/{thread-route-BYTJQqVq.js → thread-route-jBbjjKNR.js} +1 -1
  284. package/dist/client/assets/{thread-sheet-body-D86XTeGF.js → thread-sheet-body-kWzPcNxq.js} +1 -1
  285. package/dist/client/assets/{time-range-picker-NUSfs4B1.js → time-range-picker-D3aABZRy.js} +1 -1
  286. package/dist/client/assets/{toggle-group-C49gUsJz.js → toggle-group-Dh3zyTAy.js} +1 -1
  287. package/dist/client/assets/{tool-namespace-Bj1cvBDc.js → tool-namespace-DWzf9fHX.js} +1 -1
  288. package/dist/client/assets/{tool-set-selector-Bs7M3rhU.js → tool-set-selector-Ct1WdfRK.js} +1 -1
  289. package/dist/client/assets/{toolbar-icon-button-D-DoL4BQ.js → toolbar-icon-button-DLr3JTpB.js} +1 -1
  290. package/dist/client/assets/{tooltip-CSjs8EXx.js → tooltip-D_WhUD2W.js} +1 -1
  291. package/dist/client/assets/{tooltipContext-D6EVwPYC.js → tooltipContext-DBg9OJee.js} +1 -1
  292. package/dist/client/assets/{track-iPianFfO.js → track-DnomIQY8.js} +1 -1
  293. package/dist/client/assets/{types-Cr7M9oTi.js → types-ASWejG-h.js} +1 -1
  294. package/dist/client/assets/{url-slug-DYxjfT2K.js → url-slug-C7rIIBEj.js} +1 -1
  295. package/dist/client/assets/{usage-stats-QKrG0Chq.js → usage-stats-XRbUuNdg.js} +1 -1
  296. package/dist/client/assets/{use-ai-providers-BvE5F9lZ.js → use-ai-providers-CP8hIgY3.js} +1 -1
  297. package/dist/client/assets/{use-apply-named-rule-CI1WcDAo.js → use-apply-named-rule-NujXCbVj.js} +1 -1
  298. package/dist/client/assets/use-ask-in-chat-D3qra8L7.js +1 -0
  299. package/dist/client/assets/{use-automations-C6CsqXzM.js → use-automations-QnSiBJK1.js} +1 -1
  300. package/dist/client/assets/{use-autosave-DXTXn5fk.js → use-autosave-vzKNIh7N.js} +1 -1
  301. package/dist/client/assets/use-blocks-v8-project-CrOozSZ7.js +1 -0
  302. package/dist/client/assets/{use-chat-layout-state-C7mDb3bl.js → use-chat-layout-state-CZu4sqCQ.js} +1 -1
  303. package/dist/client/assets/{use-cms-publish-actions-CQy1zqVQ.js → use-cms-publish-actions-BsAhW6oR.js} +1 -1
  304. package/dist/client/assets/{use-connect-companion-FoCT7yyy.js → use-connect-companion-BPvHx0lV.js} +1 -1
  305. package/dist/client/assets/{use-connection-Cbht658s.js → use-connection-Bh4mFZP8.js} +1 -1
  306. package/dist/client/assets/{use-content-sync--RnYhndo.js → use-content-sync-DwMQ9IL5.js} +1 -1
  307. package/dist/client/assets/{use-copy-pqG4JWZ9.js → use-copy-Bs4XYM8b.js} +1 -1
  308. package/dist/client/assets/{use-date-fns-locale-LBGPcKQF.js → use-date-fns-locale-BsWCfsQ_.js} +1 -1
  309. package/dist/client/assets/{use-debounced-autosave-BhHBDt6n.js → use-debounced-autosave-CvEiuLQU.js} +1 -1
  310. package/dist/client/assets/{use-debounced-value-DZeaw_xf.js → use-debounced-value-pGYMxzxk.js} +1 -1
  311. package/dist/client/assets/{use-deco-credits-DRZjLOnu.js → use-deco-credits-DYCNC_rr.js} +1 -1
  312. package/dist/client/assets/{use-decopilot-events-B4_GF30e.js → use-decopilot-events-d_M9Hjhx.js} +1 -1
  313. package/dist/client/assets/{use-delete-connection-BwZvQv2v.js → use-delete-connection-C4bEnWu4.js} +1 -1
  314. package/dist/client/assets/{use-deployment-admin-CWBM5pU4.js → use-deployment-admin-DbaoxO_S.js} +1 -1
  315. package/dist/client/assets/{use-entitlements-DRzAxQMt.js → use-entitlements-CpaMfout.js} +1 -1
  316. package/dist/client/assets/{use-fast-preview-draft-url-CLbSHMWD.js → use-fast-preview-draft-url-D7lYg71A.js} +1 -1
  317. package/dist/client/assets/{use-file-configs-Cbnx7meP.js → use-file-configs-DXg7w0ah.js} +1 -1
  318. package/dist/client/assets/{use-id-selection-Bo8PJDCH.js → use-id-selection-BUJSoF-P.js} +1 -1
  319. package/dist/client/assets/{use-inbox-feed-CbhFgNvg.js → use-inbox-feed-dFlcVIpe.js} +1 -1
  320. package/dist/client/assets/{use-infinite-scroll-D2U3wOff.js → use-infinite-scroll-oh57fQW8.js} +1 -1
  321. package/dist/client/assets/{use-join-requests-IG9tsdHd.js → use-join-requests-rNOmuzaG.js} +1 -1
  322. package/dist/client/assets/{use-main-panel-tabs-z25jEKcZ.js → use-main-panel-tabs-_zYm5HQh.js} +1 -1
  323. package/dist/client/assets/{use-mcp-auth-status-DBT7VWeT.js → use-mcp-auth-status-CHVe_UL9.js} +1 -1
  324. package/dist/client/assets/{use-mcp-client-IDMULkw-.js → use-mcp-client-TeUnMSC4.js} +1 -1
  325. package/dist/client/assets/{use-mcp-prompts-DdK4Oz96.js → use-mcp-prompts-DDyg7FMp.js} +1 -1
  326. package/dist/client/assets/{use-mcp-tools-Dua9SLd1.js → use-mcp-tools-Dfsa_hrX.js} +1 -1
  327. package/dist/client/assets/{use-mobile-C9EJZpJe.js → use-mobile-BbP62vju.js} +1 -1
  328. package/dist/client/assets/{use-move-blocks-RdGjZI5s.js → use-move-blocks-Bi-2K9Wd.js} +1 -1
  329. package/dist/client/assets/{use-navigate-to-agent-CnITDZ1K.js → use-navigate-to-agent-8ajznGe2.js} +1 -1
  330. package/dist/client/assets/{use-org-fs-D39JXIqn.js → use-org-fs-Bz2ywQpd.js} +1 -1
  331. package/dist/client/assets/{use-org-repo-syncs-CaKxuApg.js → use-org-repo-syncs-zcGBRnsE.js} +1 -1
  332. package/dist/client/assets/{use-org-sso-DHFjLEgz.js → use-org-sso-YfhiI7Na.js} +1 -1
  333. package/dist/client/assets/{use-organization-settings-DNsCw29W.js → use-organization-settings-BRBR1fOm.js} +1 -1
  334. package/dist/client/assets/{use-project-scope-BDLA_MFt.js → use-project-scope-GFa4JvNG.js} +1 -1
  335. package/dist/client/assets/{use-recent-apps-DiJWCjqp.js → use-recent-apps-CWh8PA7D.js} +1 -1
  336. package/dist/client/assets/{use-reports-diagnostic-DIEvib1u.js → use-reports-diagnostic-BrE3eDqC.js} +1 -1
  337. package/dist/client/assets/{use-sandbox-events-BFY14jyB.js → use-sandbox-events-68YztdQP.js} +1 -1
  338. package/dist/client/assets/{use-secrets-CCi4Nf5b.js → use-secrets-BhPSZQfa.js} +1 -1
  339. package/dist/client/assets/{use-section-preview-base-BDzVvnhP.js → use-section-preview-base-3lOa0tAM.js} +1 -1
  340. package/dist/client/assets/{use-sidebar-collapsed-BUc8VCoH.js → use-sidebar-collapsed-CfApMrjn.js} +1 -1
  341. package/dist/client/assets/{use-tags-DVR6me46.js → use-tags-rAc8X0bx.js} +1 -1
  342. package/dist/client/assets/{use-task-board-analytics-DN7o6q3R.js → use-task-board-analytics-BEP1IVqq.js} +1 -1
  343. package/dist/client/assets/{use-task-board-events-D0AhUaeo.js → use-task-board-events-BQOt8K6j.js} +1 -1
  344. package/dist/client/assets/{use-task-board-item-prs-C8FVkZ-C.js → use-task-board-item-prs-Dpg9J2j_.js} +1 -1
  345. package/dist/client/assets/{use-task-board-items-CdM5j7aW.js → use-task-board-items-rcG1gNIH.js} +1 -1
  346. package/dist/client/assets/{use-task-board-prompts-C-FdeWq2.js → use-task-board-prompts-OFKn7DUf.js} +1 -1
  347. package/dist/client/assets/{use-task-metadata-CRegh7J_.js → use-task-metadata-PVdfMsAN.js} +1 -1
  348. package/dist/client/assets/{use-thread-outputs-WXqq1m_V.js → use-thread-outputs-B_TAH3sz.js} +1 -1
  349. package/dist/client/assets/{use-voice-input-8QaSlWvq.js → use-voice-input-Dx_WJHtm.js} +1 -1
  350. package/dist/client/assets/useInfiniteQuery-v4D5ym6Y.js +1 -0
  351. package/dist/client/assets/{useQueries-ZkLHF4yp.js → useQueries-CR738UlN.js} +1 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-DOWp786v.js +1 -0
  353. package/dist/client/assets/{users-CmySmLhu.js → users-CMO3k4s-.js} +1 -1
  354. package/dist/client/assets/{utils-DJ4kGZR9.js → utils-Bbsz503j.js} +1 -1
  355. package/dist/client/assets/{variant-calendar-Dp3dcJps.js → variant-calendar-BHsjE51A.js} +1 -1
  356. package/dist/client/assets/{variant-matcher-override-Bg1xLD4H.js → variant-matcher-override-_Rve3iRZ.js} +1 -1
  357. package/dist/client/assets/{view-header-BT81K0Rv.js → view-header-C--lK37a.js} +1 -1
  358. package/dist/client/assets/{virtual-mcp-R0xcD8OP.js → virtual-mcp-CAdekzcm.js} +1 -1
  359. package/dist/client/assets/{watch-sse-pool-BBUNHexJ.js → watch-sse-pool-DhHWqGJ6.js} +1 -1
  360. package/dist/client/index.html +1 -1
  361. package/dist/client/studio-modules/v1/html-swap.js +47 -36
  362. package/dist/server/server.js +1 -1
  363. package/package.json +1 -1
  364. package/dist/client/assets/agent-app-D-w7piVd.js +0 -1
  365. package/dist/client/assets/agent-deck-sQICWvWi.js +0 -1
  366. package/dist/client/assets/agent-experiments-CYKGvEGA.js +0 -1
  367. package/dist/client/assets/agent-library-BHDQegTE.js +0 -1
  368. package/dist/client/assets/agent-library-file-CVUtuonJ.js +0 -1
  369. package/dist/client/assets/agent-overview-WvKNJRaS.js +0 -1
  370. package/dist/client/assets/agent-settings-CXIVbo4Q.js +0 -1
  371. package/dist/client/assets/agent-site-editor-code-C8pZNRHE.js +0 -2
  372. package/dist/client/assets/agent-site-editor-content-CsMmLm8L.js +0 -1
  373. package/dist/client/assets/agent-site-editor-preview-vjIMqLQd.js +0 -1
  374. package/dist/client/assets/agent-view-Doh3INR0.js +0 -1
  375. package/dist/client/assets/api-keys-Cbsqw06u.js +0 -1
  376. package/dist/client/assets/library-KpfW-byA.js +0 -1
  377. package/dist/client/assets/project-reports-ByPdonNL.js +0 -1
  378. package/dist/client/assets/project-tasks-Da5LxTaa.js +0 -1
  379. package/dist/client/assets/record-editor-CBUfhtyf.js +0 -1
  380. package/dist/client/assets/reports-BOoYfaIC.js +0 -1
  381. package/dist/client/assets/repositories-DHNSFbbH.js +0 -1
  382. package/dist/client/assets/route-D6Y4UL2U.js +0 -1
  383. package/dist/client/assets/settings-tab-DHUT_FZr.js +0 -1
  384. package/dist/client/assets/site-editor-CQZ_UVRr.js +0 -1
  385. package/dist/client/assets/tasks-Du9Lvkep.js +0 -1
  386. package/dist/client/assets/use-ask-in-chat-CLDGXLQz.js +0 -1
  387. package/dist/client/assets/use-blocks-v8-project-DA_MqDc2.js +0 -1
  388. package/dist/client/assets/useInfiniteQuery-CVYcell7.js +0 -1
  389. package/dist/client/assets/useSuspenseInfiniteQuery-kNSTEkih.js +0 -1
@@ -1 +1 @@
1
- import{c as H,r as C,b as Z,j as h,t as A,a6 as ye,x as xe,aT as ke,w as we,B as be,v as Pe,D as Ce,q as le,a5 as ce,K as Y,E as Q,ga as ue,gb as re,gc as z,m as _e}from"./index-B8UywZZm.js";import{S as de,s as Se}from"./suggestion-tumipUUi.js";import{l as Fe,n as De,o as Ie,k as B,p as je,P as ne,q as ve,c as Me,u as Re,r as Le,j as Ee,f as Ae,F as Ne,s as Te,b as Qe}from"./usage-stats-QKrG0Chq.js";import{aZ as Oe}from"./agent-icon-Bw6QCyEx.js";import"./chat-context-DGlvTnKl.js";import{m as Ue,i as $e,b as qe}from"./index-qZbv6YO4.js";import{u as me}from"./use-mcp-client-IDMULkw-.js";import{a as Ke}from"./repository-binding-DtOS-5pr.js";import{g as se,s as fe}from"./tool-namespace-Bj1cvBDc.js";import{l as oe,g as pe}from"./use-mcp-prompts-DdK4Oz96.js";import{f as ze,b as Be}from"./use-org-fs-D39JXIqn.js";async function He(t,e,r,s,i,o){if(!Ue(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=Z(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,S)=>Je(d,b,S,(_,j)=>l.current(_,j)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await l.current?.(I,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=Z(),o=r!==null;let l;e[0]!==s?(l=v=>!v&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let j;e[22]!==_?(j=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const R=r?.accepted;let D;e[25]!==R?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:R})]}),e[25]=R,e[26]=D):D=e[26];let a;e[27]!==j||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=Z(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),S=C.useRef(null),_=C.useRef(!1),j=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==j?(I=["at-mention",c.id,j,u],e[9]=u,e[10]=c.id,e[11]=j,e[12]=I):I=e[12];const R=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let v;e[27]!==M||e[28]!==f?(v=[f,M],e[27]=M,e[28]=f,e[29]=v):v=e[29];const $=v;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const L=w.toLowerCase(),E=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(Ge),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(et)})();return[...E,...X]}if(K==="agents"){let L=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}return L.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const L=w.toLowerCase();W=W.filter(E=>E.uri.toLowerCase().includes(L)||E.name?.toLowerCase().includes(L)||E.description?.toLowerCase().includes(L))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const G=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==G||e[46]!==q||e[47]!==ee||e[48]!==R?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:R,queryFn:G,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=G,e[46]=q,e[47]=ee,e[48]=R,e[49]=V):V=e[49],V};function Ge(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=Z(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=je(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},j=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!ve(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},R=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),v=f.trim().toLowerCase(),$=(x??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.title?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!v||y.uri.toLowerCase().includes(v)||y.name?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.id.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:R,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:j}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Se.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ae,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Re({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function _t(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const j=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:j,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=j,e[13]=I):I=e[13];const R=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==R?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:R,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=R,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,He as p,Pt as u};
1
+ import{c as H,r as C,b as Z,j as h,t as A,a6 as ye,x as xe,aT as ke,w as we,B as be,v as Pe,D as Ce,q as le,a5 as ce,K as Y,E as Q,ga as ue,gb as re,gc as z,m as _e}from"./index-ucJDxPyE.js";import{S as de,s as Se}from"./suggestion-DSascTGX.js";import{l as Fe,n as De,o as Ie,k as B,p as je,P as ne,q as ve,c as Me,u as Re,r as Le,j as Ee,f as Ae,F as Ne,s as Te,b as Qe}from"./usage-stats-XRbUuNdg.js";import{aZ as Oe}from"./agent-icon-DGjvzBU0.js";import"./chat-context-DSkOndUS.js";import{m as Ue,i as $e,b as qe}from"./index-DYRhQ9nm.js";import{u as me}from"./use-mcp-client-TeUnMSC4.js";import{a as Ke}from"./repository-binding-BWkpkFiy.js";import{g as se,s as fe}from"./tool-namespace-DWzf9fHX.js";import{l as oe,g as pe}from"./use-mcp-prompts-DDyg7FMp.js";import{f as ze,b as Be}from"./use-org-fs-Bz2ywQpd.js";async function He(t,e,r,s,i,o){if(!Ue(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=Z(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,S)=>Je(d,b,S,(_,j)=>l.current(_,j)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const j of S){const I=j.getAsFile();I&&(await l.current?.(I,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=Z(),o=r!==null;let l;e[0]!==s?(l=v=>!v&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let j;e[22]!==_?(j=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const R=r?.accepted;let D;e[25]!==R?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:R})]}),e[25]=R,e[26]=D):D=e[26];let a;e[27]!==j||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=Z(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),S=C.useRef(null),_=C.useRef(!1),j=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==j?(I=["at-mention",c.id,j,u],e[9]=u,e[10]=c.id,e[11]=j,e[12]=I):I=e[12];const R=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let v;e[27]!==M||e[28]!==f?(v=[f,M],e[27]=M,e[28]=f,e[29]=v):v=e[29];const $=v;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const L=w.toLowerCase(),E=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(Ge),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(et)})();return[...E,...X]}if(K==="agents"){let L=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}return L.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const L=w.toLowerCase();W=W.filter(E=>E.uri.toLowerCase().includes(L)||E.name?.toLowerCase().includes(L)||E.description?.toLowerCase().includes(L))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const G=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==G||e[46]!==q||e[47]!==ee||e[48]!==R?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:R,queryFn:G,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=G,e[46]=q,e[47]=ee,e[48]=R,e[49]=V):V=e[49],V};function Ge(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=Z(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=je(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},j=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!ve(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},R=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),v=f.trim().toLowerCase(),$=(x??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.title?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!v||y.uri.toLowerCase().includes(v)||y.name?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.id.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:R,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:j}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),Se.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ae,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Re({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function _t(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=e[9];const j=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:j,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=j,e[13]=I):I=e[13];const R=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==R?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:R,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=R,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,He as p,Pt as u};
@@ -1 +1 @@
1
- import{c as k,j as h,r as C,m as L}from"./index-B8UywZZm.js";import{n as Z}from"./LinkBroken01-ClWYoOJF.js";import{A as y}from"./agent-icon-Bw6QCyEx.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
1
+ import{c as k,j as h,r as C,m as L}from"./index-ucJDxPyE.js";import{n as Z}from"./LinkBroken01--Z9NHGsb.js";import{A as y}from"./agent-icon-DGjvzBU0.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
@@ -1 +1 @@
1
- import{c as r,a5 as c,ak as u,K as f,i as y,q as A,e as m,j as T}from"./index-B8UywZZm.js";function R(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraIntegration(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function _(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_INTEGRATION_UPSERT",l)).integration,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function g(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=()=>i.call("JIRA_INTEGRATION_DELETE",{}),t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function J(t,e){const i=r.c(10),n=e===void 0?"":e,{org:s}=c(),a=u();let o;i[0]!==s.id||i[1]!==n?(o=f.jiraBoards(s.id,n),i[0]=s.id,i[1]=n,i[2]=o):o=i[2];let l;i[3]!==n||i[4]!==a?(l=async()=>(await a.call("JIRA_BOARDS_LIST",n?{query:n}:{})).boards,i[3]=n,i[4]=a,i[5]=l):l=i[5];let d;return i[6]!==t||i[7]!==o||i[8]!==l?(d={queryKey:o,enabled:t,staleTime:6e4,queryFn:l},i[6]=t,i[7]=o,i[8]=l,i[9]=d):d=i[9],y(d)}function q(t){const e=r.c(10),{org:i}=c(),n=u();let s;e[0]!==t||e[1]!==i.id?(s=f.jiraBoardColumns(i.id,t),e[0]=t,e[1]=i.id,e[2]=s):s=e[2];const a=t!==null;let o;e[3]!==t||e[4]!==n?(o=async()=>(await n.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=n,e[5]=o):o=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==o?(l={queryKey:s,enabled:a,staleTime:6e4,queryFn:o},e[6]=s,e[7]=a,e[8]=o,e[9]=l):l=e[9],y(l)}function S(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraAutomations(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function j(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_AUTOMATION_UPSERT",l)).automation,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraAutomations(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function E(){const t=r.c(2),e=u();let i;return t[0]!==e?(i={mutationFn:n=>e.call("JIRA_RUN_START",n)},t[0]=e,t[1]=i):i=t[1],m(i)}function N(t){const e=r.c(4),{size:i,className:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=T.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=s):s=e[0];let a;return e[1]!==n||e[2]!==i?(a=T.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:n,children:s}),e[1]=n,e[2]=i,e[3]=a):a=e[3],a}export{N as J,R as a,S as b,j as c,_ as d,g as e,J as f,E as g,q as u};
1
+ import{c as r,a5 as c,ak as u,K as f,i as y,q as A,e as m,j as T}from"./index-ucJDxPyE.js";function R(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraIntegration(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function _(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_INTEGRATION_UPSERT",l)).integration,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function g(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=()=>i.call("JIRA_INTEGRATION_DELETE",{}),t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function J(t,e){const i=r.c(10),n=e===void 0?"":e,{org:s}=c(),a=u();let o;i[0]!==s.id||i[1]!==n?(o=f.jiraBoards(s.id,n),i[0]=s.id,i[1]=n,i[2]=o):o=i[2];let l;i[3]!==n||i[4]!==a?(l=async()=>(await a.call("JIRA_BOARDS_LIST",n?{query:n}:{})).boards,i[3]=n,i[4]=a,i[5]=l):l=i[5];let d;return i[6]!==t||i[7]!==o||i[8]!==l?(d={queryKey:o,enabled:t,staleTime:6e4,queryFn:l},i[6]=t,i[7]=o,i[8]=l,i[9]=d):d=i[9],y(d)}function q(t){const e=r.c(10),{org:i}=c(),n=u();let s;e[0]!==t||e[1]!==i.id?(s=f.jiraBoardColumns(i.id,t),e[0]=t,e[1]=i.id,e[2]=s):s=e[2];const a=t!==null;let o;e[3]!==t||e[4]!==n?(o=async()=>(await n.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=n,e[5]=o):o=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==o?(l={queryKey:s,enabled:a,staleTime:6e4,queryFn:o},e[6]=s,e[7]=a,e[8]=o,e[9]=l):l=e[9],y(l)}function S(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraAutomations(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function j(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_AUTOMATION_UPSERT",l)).automation,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraAutomations(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function E(){const t=r.c(2),e=u();let i;return t[0]!==e?(i={mutationFn:n=>e.call("JIRA_RUN_START",n)},t[0]=e,t[1]=i):i=t[1],m(i)}function N(t){const e=r.c(4),{size:i,className:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=T.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=s):s=e[0];let a;return e[1]!==n||e[2]!==i?(a=T.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:n,children:s}),e[1]=n,e[2]=i,e[3]=a):a=e[3],a}export{N as J,R as a,S as b,j as c,_ as d,g as e,J as f,E as g,q as u};
@@ -1 +1 @@
1
- import{c as n,m as r,j as i,cu as p}from"./index-B8UywZZm.js";function d(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{d as L};
1
+ import{c as n,m as r,j as i,cu as p}from"./index-ucJDxPyE.js";function d(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{d as L};
@@ -1 +1 @@
1
- import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,k as v,l as A,m as N}from"./index-B8UywZZm.js";import{R}from"./required-auth-layout-FfGW_C4w.js";import{u as T}from"./use-deployment-admin-CWBM5pU4.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
1
+ import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,k as v,l as A,m as N}from"./index-ucJDxPyE.js";import{R}from"./required-auth-layout-sIreaYcR.js";import{u as T}from"./use-deployment-admin-DbaoxO_S.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
@@ -1 +1 @@
1
- import{c as y,f as _,u as x,a5 as S,gV as j,aS as b,hD as v,j as p,N as d}from"./index-B8UywZZm.js";import{L}from"./legacy-main-redirect-DTIlt7DJ.js";import"./thread-route-BYTJQqVq.js";function k(){const e=y.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=_(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=S(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const h=j({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:h,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
1
+ import{c as y,f as _,u as x,a5 as S,gV as j,aS as b,hD as v,j as p,N as d}from"./index-ucJDxPyE.js";import{L}from"./legacy-main-redirect-CrJ1J4b6.js";import"./thread-route-jBbjjKNR.js";function k(){const e=y.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=_(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=S(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const h=j({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:h,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
@@ -1 +1 @@
1
- import{c as v,$ as t,j as p,N as m,af as u,f as I,u as y,ae as E,gV as k,gW as R,gX as S,gY as b}from"./index-B8UywZZm.js";import{b as L}from"./thread-route-BYTJQqVq.js";function P(g){const a=v.c(90),{target:h}=g,{route:s,search:r}=h;switch(s.to){case u.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:u.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case u.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:u.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case u.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:u.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case u.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:u.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case u.plan:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:u.plan,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case u.monitoring:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:u.monitoring,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case u.library:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:u.library,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.root:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.tasks:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.reports:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.plan:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.plan,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.monitoring:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.monitoring,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.siteEditor:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.siteEditorContent:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.siteEditorCode:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.settings:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.assets:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.releases:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.releases,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.hosting:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.e2e:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.calendar:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.calendar,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.experiments:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.experiments,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.automations:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.automation:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.app:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.view:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}case t.outputFile:{let e;return a[78]!==s.params||a[79]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[78]=s.params,a[79]=r,a[80]=e):e=a[80],e}case t.outputDeck:{let e;return a[81]!==s.params||a[82]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[81]=s.params,a[82]=r,a[83]=e):e=a[83],e}case t.libraryFile:{let e;return a[84]!==s.params||a[85]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[84]=s.params,a[85]=r,a[86]=e):e=a[86],e}case t.connectSources:{let e;return a[87]!==s.params||a[88]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[87]=s.params,a[88]=r,a[89]=e):e=a[89],e}}}function A(g){const a=v.c(17),{children:h}=g;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=I(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const c=y(e),d=L(),j=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==d||a[3]!==j||a[4]!==i||a[5]!==r.agentId||a[6]!==c?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:c.virtualmcpid,fallbackAgentId:d}),f=(c.main!==void 0?R({org:i,agentId:n,main:c.main,search:c}):null)??S({org:i,routePath:j,search:c}),a[2]=d,a[3]=j,a[4]=i,a[5]=r.agentId,a[6]=c,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(P,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&c.virtualmcpid!==void 0){let l;a[13]!==c?(l=b(c),a[13]=c,a[14]=l):l=a[14];let x;return a[15]!==l?(x=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=x):x=a[16],x}return h??null}export{P as L,A as a};
1
+ import{c as v,$ as t,j as p,N as m,af as u,f as I,u as y,ae as E,gV as k,gW as R,gX as S,gY as b}from"./index-ucJDxPyE.js";import{b as L}from"./thread-route-jBbjjKNR.js";function P(g){const a=v.c(90),{target:h}=g,{route:s,search:r}=h;switch(s.to){case u.home:{let e;return a[0]!==s.params||a[1]!==r?(e=p.jsx(m,{to:u.home,params:s.params,search:r,hash:!0,replace:!0}),a[0]=s.params,a[1]=r,a[2]=e):e=a[2],e}case u.tasks:{let e;return a[3]!==s.params||a[4]!==r?(e=p.jsx(m,{to:u.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[3]=s.params,a[4]=r,a[5]=e):e=a[5],e}case u.reports:{let e;return a[6]!==s.params||a[7]!==r?(e=p.jsx(m,{to:u.reports,params:s.params,search:r,hash:!0,replace:!0}),a[6]=s.params,a[7]=r,a[8]=e):e=a[8],e}case u.discover:{let e;return a[9]!==s.params||a[10]!==r?(e=p.jsx(m,{to:u.discover,params:s.params,search:r,hash:!0,replace:!0}),a[9]=s.params,a[10]=r,a[11]=e):e=a[11],e}case u.plan:{let e;return a[12]!==s.params||a[13]!==r?(e=p.jsx(m,{to:u.plan,params:s.params,search:r,hash:!0,replace:!0}),a[12]=s.params,a[13]=r,a[14]=e):e=a[14],e}case u.monitoring:{let e;return a[15]!==s.params||a[16]!==r?(e=p.jsx(m,{to:u.monitoring,params:s.params,search:r,hash:!0,replace:!0}),a[15]=s.params,a[16]=r,a[17]=e):e=a[17],e}case u.library:{let e;return a[18]!==s.params||a[19]!==r?(e=p.jsx(m,{to:u.library,params:s.params,search:r,hash:!0,replace:!0}),a[18]=s.params,a[19]=r,a[20]=e):e=a[20],e}case t.root:{let e;return a[21]!==s.params||a[22]!==r?(e=p.jsx(m,{to:t.root,params:s.params,search:r,hash:!0,replace:!0}),a[21]=s.params,a[22]=r,a[23]=e):e=a[23],e}case t.tasks:{let e;return a[24]!==s.params||a[25]!==r?(e=p.jsx(m,{to:t.tasks,params:s.params,search:r,hash:!0,replace:!0}),a[24]=s.params,a[25]=r,a[26]=e):e=a[26],e}case t.reports:{let e;return a[27]!==s.params||a[28]!==r?(e=p.jsx(m,{to:t.reports,params:s.params,search:r,hash:!0,replace:!0}),a[27]=s.params,a[28]=r,a[29]=e):e=a[29],e}case t.plan:{let e;return a[30]!==s.params||a[31]!==r?(e=p.jsx(m,{to:t.plan,params:s.params,search:r,hash:!0,replace:!0}),a[30]=s.params,a[31]=r,a[32]=e):e=a[32],e}case t.monitoring:{let e;return a[33]!==s.params||a[34]!==r?(e=p.jsx(m,{to:t.monitoring,params:s.params,search:r,hash:!0,replace:!0}),a[33]=s.params,a[34]=r,a[35]=e):e=a[35],e}case t.siteEditor:{let e;return a[36]!==s.params||a[37]!==r?(e=p.jsx(m,{to:t.siteEditor,params:s.params,search:r,hash:!0,replace:!0}),a[36]=s.params,a[37]=r,a[38]=e):e=a[38],e}case t.siteEditorContent:{let e;return a[39]!==s.params||a[40]!==r?(e=p.jsx(m,{to:t.siteEditorContent,params:s.params,search:r,hash:!0,replace:!0}),a[39]=s.params,a[40]=r,a[41]=e):e=a[41],e}case t.siteEditorCode:{let e;return a[42]!==s.params||a[43]!==r?(e=p.jsx(m,{to:t.siteEditorCode,params:s.params,search:r,hash:!0,replace:!0}),a[42]=s.params,a[43]=r,a[44]=e):e=a[44],e}case t.settings:{let e;return a[45]!==s.params||a[46]!==r?(e=p.jsx(m,{to:t.settings,params:s.params,search:r,hash:!0,replace:!0}),a[45]=s.params,a[46]=r,a[47]=e):e=a[47],e}case t.assets:{let e;return a[48]!==s.params||a[49]!==r?(e=p.jsx(m,{to:t.assets,params:s.params,search:r,hash:!0,replace:!0}),a[48]=s.params,a[49]=r,a[50]=e):e=a[50],e}case t.releases:{let e;return a[51]!==s.params||a[52]!==r?(e=p.jsx(m,{to:t.releases,params:s.params,search:r,hash:!0,replace:!0}),a[51]=s.params,a[52]=r,a[53]=e):e=a[53],e}case t.hosting:{let e;return a[54]!==s.params||a[55]!==r?(e=p.jsx(m,{to:t.hosting,params:s.params,search:r,hash:!0,replace:!0}),a[54]=s.params,a[55]=r,a[56]=e):e=a[56],e}case t.e2e:{let e;return a[57]!==s.params||a[58]!==r?(e=p.jsx(m,{to:t.e2e,params:s.params,search:r,hash:!0,replace:!0}),a[57]=s.params,a[58]=r,a[59]=e):e=a[59],e}case t.calendar:{let e;return a[60]!==s.params||a[61]!==r?(e=p.jsx(m,{to:t.calendar,params:s.params,search:r,hash:!0,replace:!0}),a[60]=s.params,a[61]=r,a[62]=e):e=a[62],e}case t.experiments:{let e;return a[63]!==s.params||a[64]!==r?(e=p.jsx(m,{to:t.experiments,params:s.params,search:r,hash:!0,replace:!0}),a[63]=s.params,a[64]=r,a[65]=e):e=a[65],e}case t.automations:{let e;return a[66]!==s.params||a[67]!==r?(e=p.jsx(m,{to:t.automations,params:s.params,search:r,hash:!0,replace:!0}),a[66]=s.params,a[67]=r,a[68]=e):e=a[68],e}case t.automation:{let e;return a[69]!==s.params||a[70]!==r?(e=p.jsx(m,{to:t.automation,params:s.params,search:r,hash:!0,replace:!0}),a[69]=s.params,a[70]=r,a[71]=e):e=a[71],e}case t.app:{let e;return a[72]!==s.params||a[73]!==r?(e=p.jsx(m,{to:t.app,params:s.params,search:r,hash:!0,replace:!0}),a[72]=s.params,a[73]=r,a[74]=e):e=a[74],e}case t.view:{let e;return a[75]!==s.params||a[76]!==r?(e=p.jsx(m,{to:t.view,params:s.params,search:r,hash:!0,replace:!0}),a[75]=s.params,a[76]=r,a[77]=e):e=a[77],e}case t.outputFile:{let e;return a[78]!==s.params||a[79]!==r?(e=p.jsx(m,{to:t.outputFile,params:s.params,search:r,hash:!0,replace:!0}),a[78]=s.params,a[79]=r,a[80]=e):e=a[80],e}case t.outputDeck:{let e;return a[81]!==s.params||a[82]!==r?(e=p.jsx(m,{to:t.outputDeck,params:s.params,search:r,hash:!0,replace:!0}),a[81]=s.params,a[82]=r,a[83]=e):e=a[83],e}case t.libraryFile:{let e;return a[84]!==s.params||a[85]!==r?(e=p.jsx(m,{to:t.libraryFile,params:s.params,search:r,hash:!0,replace:!0}),a[84]=s.params,a[85]=r,a[86]=e):e=a[86],e}case t.connectSources:{let e;return a[87]!==s.params||a[88]!==r?(e=p.jsx(m,{to:t.connectSources,params:s.params,search:r,hash:!0,replace:!0}),a[87]=s.params,a[88]=r,a[89]=e):e=a[89],e}}}function A(g){const a=v.c(17),{children:h}=g;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const r=I(s);let e;a[1]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},a[1]=e):e=a[1];const c=y(e),d=L(),j=E(),i=r.org;if(!i||r.taskId!==void 0||r._splat!==void 0)return h??null;let n,f;a[2]!==d||a[3]!==j||a[4]!==i||a[5]!==r.agentId||a[6]!==c?(n=k({agentIdParam:r.agentId,virtualMcpIdSearch:c.virtualmcpid,fallbackAgentId:d}),f=(c.main!==void 0?R({org:i,agentId:n,main:c.main,search:c}):null)??S({org:i,routePath:j,search:c}),a[2]=d,a[3]=j,a[4]=i,a[5]=r.agentId,a[6]=c,a[7]=n,a[8]=f):(n=a[7],f=a[8]);const o=f;if(o?.kind==="same-route"){let l;return a[9]!==o.search?(l=p.jsx(m,{to:".",search:o.search,hash:!0,replace:!0}),a[9]=o.search,a[10]=l):l=a[10],l}if(o?.kind==="canonical"){let l;return a[11]!==o?(l=p.jsx(P,{target:o}),a[11]=o,a[12]=l):l=a[12],l}if(r.agentId!==void 0&&r.agentId===n&&c.virtualmcpid!==void 0){let l;a[13]!==c?(l=b(c),a[13]=c,a[14]=l):l=a[14];let x;return a[15]!==l?(x=p.jsx(m,{to:".",search:l,hash:!0,replace:!0}),a[15]=l,a[16]=x):x=a[16],x}return h??null}export{P as L,A as a};
@@ -0,0 +1 @@
1
+ import{c as $,d as A,u as J,j as m,n as U}from"./index-ucJDxPyE.js";import{a4 as q,J as z,R as D}from"./chat-context-DSkOndUS.js";import{u as F}from"./use-mobile-BbP62vju.js";import{u as G,C as R}from"./index-2pjgY723.js";import{C as B,o as K,d as Q}from"./context-shell-DYGyde-Z.js";import{L as E}from"./preview-panel-CmtR7uJm.js";import{L as V}from"./library-tab-CqHQSOSi.js";import"./autosend-BeP-7Z9T.js";import"./thread-route-jBbjjKNR.js";import"./use-project-scope-GFa4JvNG.js";import"./repository-binding-BWkpkFiy.js";import"./use-mcp-client-TeUnMSC4.js";import"./auth-D2Lcha9t.js";import"./thread-intent-CI_dX-N0.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhHWqGJ6.js";import"./task-board-BzsqXAQD.js";import"./schema-tSFLTBrW.js";import"./use-entitlements-CpaMfout.js";import"./use-ai-providers-CP8hIgY3.js";import"./use-decopilot-events-d_M9Hjhx.js";import"./use-organization-settings-BRBR1fOm.js";import"./use-sidebar-collapsed-CfApMrjn.js";import"./use-chat-layout-state-CZu4sqCQ.js";import"./agent-icon-DGjvzBU0.js";import"./AlertCircle-4XjOBzzr.js";import"./Tool01-BqhX4Lir.js";import"./ArrowUp-Lwcx-ceL.js";import"./ArrowLeft-FLGKBq3z.js";import"./LinkBroken01--Z9NHGsb.js";import"./ShoppingBag01-CYCT2jnZ.js";import"./Globe04-Wakfx0G2.js";import"./CheckCircle-DFL7pw-c.js";import"./ChevronUp-BvHbQNBW.js";import"./ChevronSelectorVertical-DujPgcUo.js";import"./UserSquare-DLTddIeU.js";import"./CreditCard01-BwD4GYuP.js";import"./SwitchHorizontal01-TPw7EzQJ.js";import"./Key01-D8VFHgU4.js";import"./Minus-mLwaHX_9.js";import"./Monitor01-xd6_AGZa.js";import"./Sun-COkqP7iJ.js";import"./Play-Bd4GTUnl.js";import"./Plus-Cq9NYyX9.js";import"./SearchMd-BxQmfb5s.js";import"./Trash01-BsqfSoas.js";import"./Upload01-CjUA7jDn.js";import"./Users01-C0dAo1hK.js";import"./XClose-BmPamPKb.js";import"./Zap-CNah22BF.js";import"./tooltip-D_WhUD2W.js";import"./index-oG6UN7--.js";import"./toolbar-icon-button-DLr3JTpB.js";import"./shell-layout-CMz_aZCA.js";import"./use-deployment-admin-DbaoxO_S.js";import"./admin-fetch-BhTJlAsX.js";import"./command-D37uN5J-.js";import"./index-Bx0EGvvq.js";import"./integration-icon-a40gN_z1.js";import"./project-icon-BDGMpF2P.js";import"./use-navigate-to-agent-8ajznGe2.js";import"./new-project-dialog-CcXdYQOA.js";import"./label-CxjTL0R_.js";import"./repository-picker-TrkRysRA.js";import"./github-icon-M98rwFqR.js";import"./useInfiniteQuery-v4D5ym6Y.js";import"./infiniteQueryObserver-Bd4S1JAr.js";import"./collection-search-BQWTlXQF.js";import"./use-debounced-value-pGYMxzxk.js";import"./required-auth-layout-sIreaYcR.js";import"./use-org-sso-YfhiI7Na.js";import"./sheet-MLWNRYhQ.js";import"./resizable-e7KAJlT2.js";import"./require-capability-DmJgWdQR.js";import"./access-gate-KNoXvQR4.js";import"./capability-load-error-D91RsAwR.js";import"./sections-9yqUizm4.js";import"./textarea-BA6pOE5t.js";import"./empty-state-CPetbKsr.js";import"./use-ask-in-chat-D3qra8L7.js";import"./use-org-fs-Bz2ywQpd.js";import"./preview-content-VAE9VX_a.js";import"./icon-button-nAmR0pUP.js";import"./file-share-button-BbBCmHML.js";import"./popover-BaWxRQRQ.js";import"./file-preview-Bn_lFKvb.js";import"./utils-Bbsz503j.js";import"./editor-BpBeMMun.js";import"./file-type-icon-DwSbw3u_.js";import"./markdown-Cs2UsOW2.js";import"./use-copy-Bs4XYM8b.js";import"./search-input-BeN2Dgcn.js";import"./use-org-repo-syncs-zcGBRnsE.js";import"./preview-dialog-vZA6Vkch.js";import"./folder-icon-22cZTm1q.js";import"./empty-state-CgDxl1cN.js";import"./table--lSGBU5J.js";function Ae(){const t=$.c(56),_=A();let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b={strict:!1},t[0]=b):b=t[0];const{preview:e,expanded:k,section:M}=J(b);let j;t[1]!==M?(j=K(M),t[1]=M,t[2]=j):j=t[2];const l=j;let v;t[3]!==_?(v=i=>_({to:".",search:r=>({...r,...i.path!==void 0&&{path:i.path},preview:i.preview,expanded:i.expanded})}),t[3]=_,t[4]=v):v=t[4];const o=v;let y;t[5]!==o?(y=()=>o({}),t[5]=o,t[6]=y):y=t[6];const p=y,H=F(),C=G().threadOpen&&!H;if(l!=="files"){let i;t[7]!==l?(i=m.jsx(Q,{section:l}),t[7]=l,t[8]=i):i=t[8];let r;return t[9]!==l||t[10]!==i?(r=m.jsx(R.Content,{children:m.jsx(B,{section:l,children:i})}),t[9]=l,t[10]=i,t[11]=r):r=t[11],r}if(e&&(k||C)){let i,r,n,s,f;if(t[12]!==p||t[13]!==e||t[14]!==o){let T;t[20]!==e?(T=e.lastIndexOf("/"),t[20]=e,t[21]=T):T=t[21];const I=e.slice(0,Math.max(T,0));r=R.Content,i=U.Breadcrumbs,n="page",t[22]!==p?(s={onSelect:p},t[22]=p,t[23]=s):s=t[23];let L;t[24]!==o?(L=O=>({key:`folder:${O.path}`,label:O.label,onSelect:()=>o({path:O.path})}),t[24]=o,t[25]=L):L=t[25];const N=q(I,D).map(L);let u;t[26]!==e?(u=z(e),t[26]=e,t[27]=u):u=t[27];let P;t[28]!==u?(P={key:"file",label:u},t[28]=u,t[29]=P):P=t[29],f=[...N,P],t[12]=p,t[13]=e,t[14]=o,t[15]=i,t[16]=r,t[17]=n,t[18]=s,t[19]=f}else i=t[15],r=t[16],n=t[17],s=t[18],f=t[19];let c;t[30]!==i||t[31]!==n||t[32]!==s||t[33]!==f?(c=m.jsx(i,{after:n,parent:s,items:f}),t[30]=i,t[31]=n,t[32]=s,t[33]=f,t[34]=c):c=t[34];let d;t[35]!==C||t[36]!==e||t[37]!==o?(d=C?void 0:()=>o({preview:e}),t[35]=C,t[36]=e,t[37]=o,t[38]=d):d=t[38];let h;t[39]!==d?(h={expanded:!0,onToggle:d},t[39]=d,t[40]=h):h=t[40];let x;t[41]!==p||t[42]!==e||t[43]!==h?(x=m.jsx(E,{previewPath:e,onClose:p,expand:h},e),t[41]=p,t[42]=e,t[43]=h,t[44]=x):x=t[44];let w;return t[45]!==r||t[46]!==x||t[47]!==c?(w=m.jsxs(r,{children:[c,x]}),t[45]=r,t[46]=x,t[47]=c,t[48]=w):w=t[48],w}let a;t[49]!==p||t[50]!==e||t[51]!==o?(a=e&&m.jsx(E,{variant:"aside",previewPath:e,onClose:p,expand:{expanded:!1,onToggle:()=>o({preview:e,expanded:!0})}},e),t[49]=p,t[50]=e,t[51]=o,t[52]=a):a=t[52];let g;t[53]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx(B,{section:"files",children:m.jsx(V,{filePreview:"side"})}),t[53]=g):g=t[53];let S;return t[54]!==a?(S=m.jsx(R.Content,{aside:a,children:g}),t[54]=a,t[55]=S):S=t[55],S}export{Ae as default};
@@ -1,4 +1,4 @@
1
- import{c as L,b as de,j as t,bB as ge,v as nt,D as lt,a5 as Le,q as ps,r as Y,x as rt,B as ce,hv as ms,b2 as Pt,m as ne,I as Ge,K as $e,t as oe,Y as Ke,X as hs,Z as bs,_ as xs,i as gs,hw as ut,fb as ys,o as vs,d as Mt,u as Bt,n as He,P as Ct,hj as ws,w as Dt,aT as $t,y as Ot,aN as js,aM as ks,aJ as Ns,aH as Ss,aI as Ps,aL as Cs,aK as Ds,bj as $s}from"./index-B8UywZZm.js";import{s as Os}from"./Tool01-Dhj9-e2p.js";import{s as Ts}from"./Plus-DTA_qyzr.js";import{i as qe}from"./Upload01-B7_UtIIy.js";import{u as Fs}from"./use-mobile-C9EJZpJe.js";import{S as zs}from"./search-input-CqVCmKRX.js";import{R as ye,W as ze,J as le,Q as at,X as At,Y as Es,Z as Ee,_ as xe,$ as Ms,a0 as Bs,a1 as Ye,a2 as Lt,a3 as ft,a4 as As,a5 as Ls,a6 as Is}from"./chat-context-DGlvTnKl.js";import{u as Vs}from"./use-debounced-value-DZeaw_xf.js";import{r as It,h as ke,l as Ie,d as Rs,k as it,u as We,s as Us,t as _s,p as Vt}from"./use-org-fs-D39JXIqn.js";import{u as Hs,a as Ks}from"./use-org-repo-syncs-CaKxuApg.js";import{T as qs}from"./textarea-DB65Cb4P.js";import{t as Gs,n as Ys}from"./ChevronUp-BtMiI6cM.js";import{ae as Me,bE as Xs,b as Qs,m as pt,aV as Ws,bb as Js,bF as Zs,A as en}from"./agent-icon-Bw6QCyEx.js";import{M as tn,j as sn}from"./markdown-C594pPG2.js";import{f as nn,b as ln,g as rn,u as an,e as on}from"./context-shell-Ctmm-Xdc.js";import{S as cn}from"./file-share-button-BRYVxpzc.js";import{L as Rt}from"./preview-dialog-Si16X-hs.js";import{F as Je,S as Ut}from"./folder-icon-xP_msldQ.js";import{d as dn}from"./repository-binding-DtOS-5pr.js";import{i as mt}from"./Zap-CSm2QafG.js";import{E as _t}from"./empty-state-Br5S8FBX.js";import{F as ht,d as un}from"./file-type-icon-aib86xB6.js";import{a as fn}from"./SwitchHorizontal01-DFMegDqF.js";import{i as pn}from"./Key01-BEX3raxr.js";import{s as mn}from"./Trash01-DlPuy4hk.js";import{n as hn,i as bn}from"./ArrowUp-D3pp3g8x.js";import{c as Ne,b as Ht,T as Se,a as xn,d as gn,e as yn}from"./table-BsHAPl3y.js";import{s as vn}from"./use-project-scope-BDLA_MFt.js";function wn(a){const e=L.c(28),s=de(),n=Hs(),r=It();if(a!==ye){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0],b}let l;e[1]!==s?(l=s("library.library.all"),e[1]=s,e[2]=l):l=e[2];let i;e[3]!==a||e[4]!==l?(i={key:"all",label:l,path:a},e[3]=a,e[4]=l,e[5]=i):i=e[5];let o;e[6]!==s?(o=s("library.library.placeProjects"),e[6]=s,e[7]=o):o=e[7];let d;e[8]!==o?(d={key:ze,label:o,path:`${ye}/${ze}`},e[8]=o,e[9]=d):d=e[9];let c;e[10]!==s?(c=s("library.library.placeUploads"),e[10]=s,e[11]=c):c=e[11];let u;e[12]!==c?(u={key:"uploads",label:c,path:"uploads"},e[12]=c,e[13]=u):u=e[13];let p;e[14]!==s?(p=s("library.library.placeOutputs"),e[14]=s,e[15]=p):p=e[15];let f;e[16]!==p?(f={key:"outputs",label:p,path:"outputs"},e[16]=p,e[17]=f):f=e[17];let m;e[18]!==r.data?.length||e[19]!==s?(m=(r.data?.length??0)>0?[{key:"public",label:s("library.library.placeSkills"),path:"public"}]:[],e[18]=r.data?.length,e[19]=s,e[20]=m):m=e[20];let x;return e[21]!==n.data||e[22]!==i||e[23]!==d||e[24]!==u||e[25]!==f||e[26]!==m?(x=[i,d,u,f,...m,...(n.data??[]).map(jn)],e[21]=n.data,e[22]=i,e[23]=d,e[24]=u,e[25]=f,e[26]=m,e[27]=x):x=e[27],x}function jn(a){return{key:a.volume,label:a.volume,path:a.volume}}function kn(a){return a.kind==="file"?"file":a.hasSkill?"skill":a.hasBrand?"brand":"folder"}function Te(a){return{kind:kn(a),path:a.path,name:le(a.path),updatedAt:a.updatedAt,size:a.size??0,entry:a}}const Nn=["name","updated","size"];function Tt(a){return a.kind==="file"?1:0}function Xe(a,e){const s=(n,r)=>n.name.localeCompare(r.name,void 0,{numeric:!0,sensitivity:"base"});return[...a].sort((n,r)=>{const l=Tt(n)-Tt(r);if(l!==0)return l;if(e==="updated"){const i=(r.updatedAt??"").localeCompare(n.updatedAt??"");if(i!==0)return i}if(e==="size"){const i=r.size-n.size;if(i!==0)return i}return s(n,r)})}function Sn(a){if(a.kind!=="file")return null;const e=a.size;if(!e)return null;const s=["B","KB","MB","GB","TB"];let n=e,r=0;for(;n>=1024&&r<s.length-1;)n/=1024,r++;return`${n>=10||r===0?Math.round(n):n.toFixed(1)} ${s[r]}`}function Pn(a){const e=a("library.brandComponentsPreview.title"),s=a("library.brandComponentsPreview.subtitle"),n=a("library.brandComponentsPreview.monthlySavingsLabel"),r=a("library.brandComponentsPreview.primaryButton"),l=a("library.brandComponentsPreview.secondaryButton"),i=a("library.brandComponentsPreview.ghostButton"),o=a("library.brandComponentsPreview.successBadge"),d=a("library.brandComponentsPreview.warningBadge"),c=a("library.brandComponentsPreview.errorBadge"),u=a("library.brandComponentsPreview.infoBadge"),p=a("library.brandComponentsPreview.allChip"),f=a("library.brandComponentsPreview.incomeChip"),m=a("library.brandComponentsPreview.spendingChip"),x=a("library.brandComponentsPreview.emailPlaceholder");return`
1
+ import{c as L,b as de,j as t,bB as ge,v as nt,D as lt,a5 as Le,q as ps,r as Y,x as rt,B as ce,hv as ms,b2 as Pt,m as ne,I as Ge,K as $e,t as oe,Y as Ke,X as hs,Z as bs,_ as xs,i as gs,hw as ut,fb as ys,o as vs,d as Mt,u as Bt,n as He,P as Ct,hj as ws,w as Dt,aT as $t,y as Ot,aN as js,aM as ks,aJ as Ns,aH as Ss,aI as Ps,aL as Cs,aK as Ds,bj as $s}from"./index-ucJDxPyE.js";import{s as Os}from"./Tool01-BqhX4Lir.js";import{s as Ts}from"./Plus-Cq9NYyX9.js";import{i as qe}from"./Upload01-CjUA7jDn.js";import{u as Fs}from"./use-mobile-BbP62vju.js";import{S as zs}from"./search-input-BeN2Dgcn.js";import{R as ye,W as ze,J as le,Q as at,X as At,Y as Es,Z as Ee,_ as xe,$ as Ms,a0 as Bs,a1 as Ye,a2 as Lt,a3 as ft,a4 as As,a5 as Ls,a6 as Is}from"./chat-context-DSkOndUS.js";import{u as Vs}from"./use-debounced-value-pGYMxzxk.js";import{r as It,h as ke,l as Ie,d as Rs,k as it,u as We,s as Us,t as _s,p as Vt}from"./use-org-fs-Bz2ywQpd.js";import{u as Hs,a as Ks}from"./use-org-repo-syncs-zcGBRnsE.js";import{T as qs}from"./textarea-BA6pOE5t.js";import{t as Gs,n as Ys}from"./ChevronUp-BvHbQNBW.js";import{ae as Me,bE as Xs,b as Qs,m as pt,aV as Ws,bb as Js,bF as Zs,A as en}from"./agent-icon-DGjvzBU0.js";import{M as tn,j as sn}from"./markdown-Cs2UsOW2.js";import{f as nn,b as ln,g as rn,u as an,e as on}from"./context-shell-DYGyde-Z.js";import{S as cn}from"./file-share-button-BbBCmHML.js";import{L as Rt}from"./preview-dialog-vZA6Vkch.js";import{F as Je,S as Ut}from"./folder-icon-22cZTm1q.js";import{d as dn}from"./repository-binding-BWkpkFiy.js";import{i as mt}from"./Zap-CNah22BF.js";import{E as _t}from"./empty-state-CgDxl1cN.js";import{F as ht,d as un}from"./file-type-icon-DwSbw3u_.js";import{a as fn}from"./SwitchHorizontal01-TPw7EzQJ.js";import{i as pn}from"./Key01-D8VFHgU4.js";import{s as mn}from"./Trash01-BsqfSoas.js";import{n as hn,i as bn}from"./ArrowUp-Lwcx-ceL.js";import{c as Ne,b as Ht,T as Se,a as xn,d as gn,e as yn}from"./table--lSGBU5J.js";import{s as vn}from"./use-project-scope-GFa4JvNG.js";function wn(a){const e=L.c(28),s=de(),n=Hs(),r=It();if(a!==ye){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=[],e[0]=b):b=e[0],b}let l;e[1]!==s?(l=s("library.library.all"),e[1]=s,e[2]=l):l=e[2];let i;e[3]!==a||e[4]!==l?(i={key:"all",label:l,path:a},e[3]=a,e[4]=l,e[5]=i):i=e[5];let o;e[6]!==s?(o=s("library.library.placeProjects"),e[6]=s,e[7]=o):o=e[7];let d;e[8]!==o?(d={key:ze,label:o,path:`${ye}/${ze}`},e[8]=o,e[9]=d):d=e[9];let c;e[10]!==s?(c=s("library.library.placeUploads"),e[10]=s,e[11]=c):c=e[11];let u;e[12]!==c?(u={key:"uploads",label:c,path:"uploads"},e[12]=c,e[13]=u):u=e[13];let p;e[14]!==s?(p=s("library.library.placeOutputs"),e[14]=s,e[15]=p):p=e[15];let f;e[16]!==p?(f={key:"outputs",label:p,path:"outputs"},e[16]=p,e[17]=f):f=e[17];let m;e[18]!==r.data?.length||e[19]!==s?(m=(r.data?.length??0)>0?[{key:"public",label:s("library.library.placeSkills"),path:"public"}]:[],e[18]=r.data?.length,e[19]=s,e[20]=m):m=e[20];let x;return e[21]!==n.data||e[22]!==i||e[23]!==d||e[24]!==u||e[25]!==f||e[26]!==m?(x=[i,d,u,f,...m,...(n.data??[]).map(jn)],e[21]=n.data,e[22]=i,e[23]=d,e[24]=u,e[25]=f,e[26]=m,e[27]=x):x=e[27],x}function jn(a){return{key:a.volume,label:a.volume,path:a.volume}}function kn(a){return a.kind==="file"?"file":a.hasSkill?"skill":a.hasBrand?"brand":"folder"}function Te(a){return{kind:kn(a),path:a.path,name:le(a.path),updatedAt:a.updatedAt,size:a.size??0,entry:a}}const Nn=["name","updated","size"];function Tt(a){return a.kind==="file"?1:0}function Xe(a,e){const s=(n,r)=>n.name.localeCompare(r.name,void 0,{numeric:!0,sensitivity:"base"});return[...a].sort((n,r)=>{const l=Tt(n)-Tt(r);if(l!==0)return l;if(e==="updated"){const i=(r.updatedAt??"").localeCompare(n.updatedAt??"");if(i!==0)return i}if(e==="size"){const i=r.size-n.size;if(i!==0)return i}return s(n,r)})}function Sn(a){if(a.kind!=="file")return null;const e=a.size;if(!e)return null;const s=["B","KB","MB","GB","TB"];let n=e,r=0;for(;n>=1024&&r<s.length-1;)n/=1024,r++;return`${n>=10||r===0?Math.round(n):n.toFixed(1)} ${s[r]}`}function Pn(a){const e=a("library.brandComponentsPreview.title"),s=a("library.brandComponentsPreview.subtitle"),n=a("library.brandComponentsPreview.monthlySavingsLabel"),r=a("library.brandComponentsPreview.primaryButton"),l=a("library.brandComponentsPreview.secondaryButton"),i=a("library.brandComponentsPreview.ghostButton"),o=a("library.brandComponentsPreview.successBadge"),d=a("library.brandComponentsPreview.warningBadge"),c=a("library.brandComponentsPreview.errorBadge"),u=a("library.brandComponentsPreview.infoBadge"),p=a("library.brandComponentsPreview.allChip"),f=a("library.brandComponentsPreview.incomeChip"),m=a("library.brandComponentsPreview.spendingChip"),x=a("library.brandComponentsPreview.emailPlaceholder");return`
2
2
  <div class="stack">
3
3
  <div>
4
4
  <h1>${e}</h1>
@@ -1 +1 @@
1
- import{a as E,u as C,j as n,N as S}from"./index-B8UywZZm.js";import{A as R,a as U}from"./auth-entry-cOo1IIAQ.js";import{A as y}from"./auth-split-layout-BD7ZQtZI.js";import"./delay-CnY5UFtP.js";const s="studio_signup_ref",r="studio_signup_src",j=720*60*60,u=128;function l(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function _(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${j}; samesite=lax`}function O(e){e.ref&&e.ref.length<=u&&!l(s)&&_(s,e.ref),e.src&&e.src.length<=u&&!l(r)&&_(r,e.src)}function k(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function I(){const e=E.useSession(),t=C({from:"/login"}),{next:o="/",client_id:d,redirect_uri:h,response_type:f,state:a,scope:g,code_challenge:p,code_challenge_method:x,src:A,ref:m}=t;O({src:A,ref:m});const c=o.startsWith("/")&&!o.startsWith("//")&&!o.startsWith("/\\")?o:"/",i=k({client_id:d,redirect_uri:h,response_type:f,state:a,scope:g,code_challenge:p,code_challenge_method:x});return e.data?i?(window.location.href=i,n.jsx(R,{})):n.jsx(S,{to:c}):n.jsx(y,{children:n.jsx(U,{callbackUrl:c,redirectUrl:i})})}export{I as default};
1
+ import{a as E,u as C,j as n,N as S}from"./index-ucJDxPyE.js";import{A as R,a as U}from"./auth-entry-DDLQ2T30.js";import{A as y}from"./auth-split-layout-C64FoWws.js";import"./delay-CnY5UFtP.js";const s="studio_signup_ref",r="studio_signup_src",j=720*60*60,u=128;function l(e){const t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return t?.[1]?decodeURIComponent(t[1]):null}function _(e,t){document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=${j}; samesite=lax`}function O(e){e.ref&&e.ref.length<=u&&!l(s)&&_(s,e.ref),e.src&&e.src.length<=u&&!l(r)&&_(r,e.src)}function k(e){if(!e.client_id||e.response_type!=="code")return null;const t=new URLSearchParams;return e.client_id&&t.set("client_id",e.client_id),e.redirect_uri&&t.set("redirect_uri",e.redirect_uri),e.response_type&&t.set("response_type",e.response_type),e.state&&t.set("state",e.state),e.scope&&t.set("scope",e.scope),e.code_challenge&&t.set("code_challenge",e.code_challenge),e.code_challenge_method&&t.set("code_challenge_method",e.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function I(){const e=E.useSession(),t=C({from:"/login"}),{next:o="/",client_id:d,redirect_uri:h,response_type:f,state:a,scope:g,code_challenge:p,code_challenge_method:x,src:A,ref:m}=t;O({src:A,ref:m});const c=o.startsWith("/")&&!o.startsWith("//")&&!o.startsWith("/\\")?o:"/",i=k({client_id:d,redirect_uri:h,response_type:f,state:a,scope:g,code_challenge:p,code_challenge_method:x});return e.data?i?(window.location.href=i,n.jsx(R,{})):n.jsx(S,{to:c}):n.jsx(y,{children:n.jsx(U,{callbackUrl:c,redirectUrl:i})})}export{I as default};
@@ -1,4 +1,4 @@
1
- import{c as Ie,a5 as dE,d as pE,f as gE,j as O,r as Ce,ge as fE,dz as $l,fh as He,gf as Xt,b as pt,D as mE,aP as hE,aO as bE,aQ as EE,x as yE,m as Ct,bx as hh,B as bh}from"./index-B8UywZZm.js";import{u as Eh}from"./use-copy-pqG4JWZ9.js";import{a$ as SE,b0 as kE,aV as yh,_ as vE,e as Sh,a as TE}from"./agent-icon-Bw6QCyEx.js";import{P as wE}from"./chat-context-DGlvTnKl.js";import{u as AE}from"./use-mobile-C9EJZpJe.js";import{a as RE}from"./autosend-CLDsiYES.js";import{a as _E}from"./thread-route-BYTJQqVq.js";import{S as IE}from"./task-board-BEneHA34.js";const on=Ce.createContext(null);function oD(e){const t=Ie.c(13),{children:n}=e,{org:r}=dE(),a=pE(),i=AE(),{openPanel:o}=RE();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const l=gE(s),u="org"in l&&typeof l.org=="string"?l.org:void 0,c=_E()??void 0;let d;t[1]!==i||t[2]!==a||t[3]!==o?(d=h=>{if(!i){o(fE(h),{search:xE});return}a({to:".",search:v=>({...v,preview:h})})},t[1]=i,t[2]=a,t[3]=o,t[4]=d):d=t[4];const g=d;let p;t[5]!==g||t[6]!==u||t[7]!==r.id||t[8]!==c?(p={orgId:r.id,orgSlug:u,threadId:c,open:g},t[5]=g,t[6]=u,t[7]=r.id,t[8]=c,t[9]=p):p=t[9];let f;return t[10]!==n||t[11]!==p?(f=O.jsx(on.Provider,{value:p,children:n}),t[10]=n,t[11]=p,t[12]=f):f=t[12],f}function xE(e){return{...e,preview:void 0}}function ql(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tt=ql();function kh(e){tt=e}var _t={exec:()=>null};function ee(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},NE=/^(?:[ \t]*(?:\n|$))+/,CE=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,OE=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zl=/(?:[*+-]|\d{1,9}[.)])/,vh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Th=ee(vh).replace(/bull/g,zl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),DE=ee(vh).replace(/bull/g,zl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Gl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ME=/^[^\n]+/,Hl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,FE=ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PE=ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zl).getRegex(),sn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",jl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UE=ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",jl).replace("tag",sn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wh=ee(Gl).replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex(),BE=ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wh).getRegex(),Vl={blockquote:BE,code:CE,def:FE,fences:OE,heading:LE,hr:Mt,html:UE,lheading:Th,list:PE,newline:NE,paragraph:wh,table:_t,text:ME},_u=ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex(),$E={...Vl,lheading:DE,table:_u,paragraph:ee(Gl).replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_u).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex()},qE={...Vl,html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",jl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ee(Gl).replace("hr",Mt).replace("heading",` *#{1,6} *[^
1
+ import{c as Ie,a5 as dE,d as pE,f as gE,j as O,r as Ce,ge as fE,dz as $l,fh as He,gf as Xt,b as pt,D as mE,aP as hE,aO as bE,aQ as EE,x as yE,m as Ct,bx as hh,B as bh}from"./index-ucJDxPyE.js";import{u as Eh}from"./use-copy-Bs4XYM8b.js";import{a$ as SE,b0 as kE,aV as yh,_ as vE,e as Sh,a as TE}from"./agent-icon-DGjvzBU0.js";import{P as wE}from"./chat-context-DSkOndUS.js";import{u as AE}from"./use-mobile-BbP62vju.js";import{a as RE}from"./autosend-BeP-7Z9T.js";import{a as _E}from"./thread-route-jBbjjKNR.js";import{S as IE}from"./task-board-BzsqXAQD.js";const on=Ce.createContext(null);function oD(e){const t=Ie.c(13),{children:n}=e,{org:r}=dE(),a=pE(),i=AE(),{openPanel:o}=RE();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const l=gE(s),u="org"in l&&typeof l.org=="string"?l.org:void 0,c=_E()??void 0;let d;t[1]!==i||t[2]!==a||t[3]!==o?(d=h=>{if(!i){o(fE(h),{search:xE});return}a({to:".",search:v=>({...v,preview:h})})},t[1]=i,t[2]=a,t[3]=o,t[4]=d):d=t[4];const g=d;let p;t[5]!==g||t[6]!==u||t[7]!==r.id||t[8]!==c?(p={orgId:r.id,orgSlug:u,threadId:c,open:g},t[5]=g,t[6]=u,t[7]=r.id,t[8]=c,t[9]=p):p=t[9];let f;return t[10]!==n||t[11]!==p?(f=O.jsx(on.Provider,{value:p,children:n}),t[10]=n,t[11]=p,t[12]=f):f=t[12],f}function xE(e){return{...e,preview:void 0}}function ql(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var tt=ql();function kh(e){tt=e}var _t={exec:()=>null};function ee(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},NE=/^(?:[ \t]*(?:\n|$))+/,CE=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,OE=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,zl=/(?:[*+-]|\d{1,9}[.)])/,vh=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Th=ee(vh).replace(/bull/g,zl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),DE=ee(vh).replace(/bull/g,zl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Gl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ME=/^[^\n]+/,Hl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,FE=ee(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Hl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PE=ee(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,zl).getRegex(),sn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",jl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UE=ee("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",jl).replace("tag",sn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wh=ee(Gl).replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex(),BE=ee(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wh).getRegex(),Vl={blockquote:BE,code:CE,def:FE,fences:OE,heading:LE,hr:Mt,html:UE,lheading:Th,list:PE,newline:NE,paragraph:wh,table:_t,text:ME},_u=ee("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex(),$E={...Vl,lheading:DE,table:_u,paragraph:ee(Gl).replace("hr",Mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_u).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",sn).getRegex()},qE={...Vl,html:ee(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",jl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ee(Gl).replace("hr",Mt).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Th).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zE=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,GE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ah=/^( {2,}|\\)\n(?!\s*$)/,HE=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ln=/[\p{P}\p{S}]/u,Wl=/[\s\p{P}\p{S}]/u,Rh=/[^\s\p{P}\p{S}]/u,jE=ee(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wl).getRegex(),_h=/(?!~)[\p{P}\p{S}]/u,VE=/(?!~)[\s\p{P}\p{S}]/u,WE=/(?:[^\s\p{P}\p{S}]|~)/u,YE=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ih=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,KE=ee(Ih,"u").replace(/punct/g,ln).getRegex(),XE=ee(Ih,"u").replace(/punct/g,_h).getRegex(),xh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ZE=ee(xh,"gu").replace(/notPunctSpace/g,Rh).replace(/punctSpace/g,Wl).replace(/punct/g,ln).getRegex(),QE=ee(xh,"gu").replace(/notPunctSpace/g,WE).replace(/punctSpace/g,VE).replace(/punct/g,_h).getRegex(),JE=ee("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rh).replace(/punctSpace/g,Wl).replace(/punct/g,ln).getRegex(),ey=ee(/\\(punct)/,"gu").replace(/punct/g,ln).getRegex(),ty=ee(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ny=ee(jl).replace("(?:-->|$)","-->").getRegex(),ry=ee("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ny).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ay=ee(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Nh=ee(/^!?\[(label)\]\[(ref)\]/).replace("label",Zt).replace("ref",Hl).getRegex(),Ch=ee(/^!?\[(ref)\](?:\[\])?/).replace("ref",Hl).getRegex(),iy=ee("reflink|nolink(?!\\()","g").replace("reflink",Nh).replace("nolink",Ch).getRegex(),Yl={_backpedal:_t,anyPunctuation:ey,autolink:ty,blockSkip:YE,br:Ah,code:GE,del:_t,emStrongLDelim:KE,emStrongRDelimAst:ZE,emStrongRDelimUnd:JE,escape:zE,link:ay,nolink:Ch,punctuation:jE,reflink:Nh,reflinkSearch:iy,tag:ry,text:HE,url:_t},oy={...Yl,link:ee(/^!?\[(label)\]\((.*?)\)/).replace("label",Zt).getRegex(),reflink:ee(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zt).getRegex()},kl={...Yl,emStrongRDelimAst:QE,emStrongLDelim:XE,url:ee(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},sy={...kl,br:ee(Ah).replace("{2,}","*").getRegex(),text:ee(kl.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},$t={normal:Vl,gfm:$E,pedantic:qE},kt={normal:Yl,gfm:kl,breaks:sy,pedantic:oy},ly={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Iu=e=>ly[e];function Fe(e,t){if(t){if(be.escapeTest.test(e))return e.replace(be.escapeReplace,Iu)}else if(be.escapeTestNoEncode.test(e))return e.replace(be.escapeReplaceNoEncode,Iu);return e}function xu(e){try{e=encodeURI(e).replace(be.percentDecode,"%")}catch{return null}return e}function Nu(e,t){const n=e.replace(be.findPipe,(i,o,s)=>{let l=!1,u=o;for(;--u>=0&&s[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(be.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(be.slashPipe,"|");return r}function vt(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function uy(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Cu(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function cy(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var Qt=class{options;rules;lexer;constructor(e){this.options=e||tt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vt(n,`
@@ -1,4 +1,4 @@
1
- import{r as z,c as L,j as u,gy as Y,gz as ee,E as te,J as ne,a as oe,m as q,h as se}from"./index-B8UywZZm.js";import{D as ie,E as re,C as ae}from"./types-Cr7M9oTi.js";const W=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function le(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${de(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,i=o.match(s);if(i){const l=(i.index??0)+i[0].length;return o.slice(0,l)+`
1
+ import{r as z,c as L,j as u,gy as Y,gz as ee,E as te,J as ne,a as oe,m as q,h as se}from"./index-ucJDxPyE.js";import{D as ie,E as re,C as ae}from"./types-ASWejG-h.js";const W=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function le(o,e={}){const n=`<meta http-equiv="Content-Security-Policy" content="${de(e)}">`,s=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,i=o.match(s);if(i){const l=(i.index??0)+i[0].length;return o.slice(0,l)+`
2
2
  `+n+o.slice(l)}const r=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,a=o.match(r);if(a){const l=(a.index??0)+a[0].length;return o.slice(0,l)+`
3
3
  <head>
4
4
  `+n+`
@@ -1 +1 @@
1
- import{d as V,a as N,e as H,b as z}from"./auth-DsiBBvOi.js";import{c9 as M}from"./index-B8UywZZm.js";function D(){return window.location.origin}function C(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const R="mcp:oauth:callback:",J=1e3,K=10*6e4,v=15e3;class W{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??`${D()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const i=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${i},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function Q(e){const t=M(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,r=new URL(n,t),i=new W({serverUrl:r.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const s=new Promise((a,d)=>{const p=e.timeout||K;let _,S,f=!1;const L=i.state(),b=`${R}${L}`,w=()=>{window.removeEventListener("message",T),window.removeEventListener("storage",y),clearTimeout(_),clearInterval(S);try{localStorage.removeItem(b)}catch{}};o.fn=c=>{f||(f=!0,w(),d(c))};const I=async c=>{if(f)return;if(f=!0,!c.success){w(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:g,state:$}=c;if(!g){w(),d(new Error("Missing authorization code"));return}if(i.getStoredState()!==$){w(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const U=(await V(r))?.authorization_servers?.[0]||r,A=await N(U),k=i.clientInformation();if(!k){w(),d(new Error("Client information not found"));return}const P=i.codeVerifier(),x=await H(U,{metadata:A,clientInformation:k,authorizationCode:g,codeVerifier:P,redirectUri:i.redirectUrl,resource:new URL(r)});w(),a({tokens:x,clientId:k.client_id??null,clientSecret:k.client_secret??null,tokenEndpoint:A?.token_endpoint??null,userinfoEndpoint:A?.userinfo_endpoint??null})}catch(E){w(),d(E)}},T=async c=>{!C()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await I(c.data)},y=async c=>{if(!(c.key!==b||!c.newValue))try{const g=JSON.parse(c.newValue);await I(g)}catch{}};window.addEventListener("message",T),window.addEventListener("storage",y),S=setInterval(()=>{if(f)return;let c=null;try{c=localStorage.getItem(b)}catch{return}if(c)try{I(JSON.parse(c))}catch{}},J),_=setTimeout(()=>{f||(f=!0,w(),d(new Error("OAuth authentication timeout")))},p)});if(s.catch(()=>{}),await z(i,{serverUrl:r})==="REDIRECT"){const a=await s;return{token:a.tokens.access_token,tokenInfo:{accessToken:a.tokens.access_token,refreshToken:a.tokens.refresh_token??null,expiresIn:a.tokens.expires_in??null,scope:a.tokens.scope??null,clientId:a.clientId,clientSecret:a.clientSecret,tokenEndpoint:a.tokenEndpoint,userinfoEndpoint:a.userinfoEndpoint,idToken:a.tokens.id_token??null},error:null}}const l=i.tokens(),h=i.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:h?.client_id??null,clientSecret:h?.client_secret??null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(s){return o.fn&&o.fn(s instanceof Error?s:new Error(String(s))),{token:null,tokenInfo:null,error:s instanceof Error?s.message:String(s)}}}function O(e,t){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${R}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function Z(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const r=e.get("error"),i=e.get("error_description");let o=n;if(n)try{const u=atob(n),l=JSON.parse(u);l.clientState&&(o=l.clientState)}catch{}if(r){const u=i||r;return O({type:"mcp:oauth:callback",success:!1,error:u},o),{success:!1,error:u}}if(!t||!n){const u="Missing code or state parameter";return O({type:"mcp:oauth:callback",success:!1,error:u},o),{success:!1,error:u}}return n=o||n,O({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function m(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(e){try{const t=m(),n=t?new URL(e,t):new URL(e),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function F(e){try{const t=m();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function G(e,t,n){const r={hasToken:!1,usable:!1,sandboxSignIn:!1};try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,o=n?new URL(i,n).href:i,s=m(),u=!n||new URL(n).origin===s,l=await fetch(o,{credentials:u?"include":"omit"});if(!l.ok)return r;const h=await l.json();return{hasToken:h.hasToken===!0,usable:h.hasToken===!0&&(h.isExpired!==!0||h.canRefresh===!0),sandboxSignIn:h.sandboxSignIn===!0}}catch{return r}}async function B({url:e,token:t,orgId:n,studioUrl:r,meshUrl:i}){try{const o=j(e),s=F(e),u=m(),l=M({studioUrl:r,meshUrl:i},u?new URL(e,u).origin:new URL(e).origin),h=o&&s?await G(o,s,l):null;if(h?.sandboxSignIn)return{isAuthenticated:h.usable,supportsOAuth:!0,hasOAuthToken:h.hasToken};const a=new Headers;a.set("Content-Type","application/json"),a.set("Accept","application/json, text/event-stream");const d=await fetch(e,{method:"POST",headers:a,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(v)});if(d.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:h?.hasToken??!1};let p;try{const f=await d.json();p=f.error||f.message}catch{}return d.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:p||`HTTP ${d.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!d.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:p||`HTTP ${d.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${v/1e3}s`:o.message}}}export{Q as a,Z as h,B as i};
1
+ import{d as V,a as N,e as H,b as z}from"./auth-D2Lcha9t.js";import{c9 as M}from"./index-ucJDxPyE.js";function D(){return window.location.origin}function C(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const R="mcp:oauth:callback:",J=1e3,K=10*6e4,v=15e3;class W{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??`${D()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const i=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${i},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function Q(e){const t=M(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,r=new URL(n,t),i=new W({serverUrl:r.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const s=new Promise((a,d)=>{const p=e.timeout||K;let _,S,f=!1;const L=i.state(),b=`${R}${L}`,w=()=>{window.removeEventListener("message",T),window.removeEventListener("storage",y),clearTimeout(_),clearInterval(S);try{localStorage.removeItem(b)}catch{}};o.fn=c=>{f||(f=!0,w(),d(c))};const I=async c=>{if(f)return;if(f=!0,!c.success){w(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:g,state:$}=c;if(!g){w(),d(new Error("Missing authorization code"));return}if(i.getStoredState()!==$){w(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const U=(await V(r))?.authorization_servers?.[0]||r,A=await N(U),k=i.clientInformation();if(!k){w(),d(new Error("Client information not found"));return}const P=i.codeVerifier(),x=await H(U,{metadata:A,clientInformation:k,authorizationCode:g,codeVerifier:P,redirectUri:i.redirectUrl,resource:new URL(r)});w(),a({tokens:x,clientId:k.client_id??null,clientSecret:k.client_secret??null,tokenEndpoint:A?.token_endpoint??null,userinfoEndpoint:A?.userinfo_endpoint??null})}catch(E){w(),d(E)}},T=async c=>{!C()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await I(c.data)},y=async c=>{if(!(c.key!==b||!c.newValue))try{const g=JSON.parse(c.newValue);await I(g)}catch{}};window.addEventListener("message",T),window.addEventListener("storage",y),S=setInterval(()=>{if(f)return;let c=null;try{c=localStorage.getItem(b)}catch{return}if(c)try{I(JSON.parse(c))}catch{}},J),_=setTimeout(()=>{f||(f=!0,w(),d(new Error("OAuth authentication timeout")))},p)});if(s.catch(()=>{}),await z(i,{serverUrl:r})==="REDIRECT"){const a=await s;return{token:a.tokens.access_token,tokenInfo:{accessToken:a.tokens.access_token,refreshToken:a.tokens.refresh_token??null,expiresIn:a.tokens.expires_in??null,scope:a.tokens.scope??null,clientId:a.clientId,clientSecret:a.clientSecret,tokenEndpoint:a.tokenEndpoint,userinfoEndpoint:a.userinfoEndpoint,idToken:a.tokens.id_token??null},error:null}}const l=i.tokens(),h=i.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:h?.client_id??null,clientSecret:h?.client_secret??null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(s){return o.fn&&o.fn(s instanceof Error?s:new Error(String(s))),{token:null,tokenInfo:null,error:s instanceof Error?s.message:String(s)}}}function O(e,t){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${R}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function Z(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const r=e.get("error"),i=e.get("error_description");let o=n;if(n)try{const u=atob(n),l=JSON.parse(u);l.clientState&&(o=l.clientState)}catch{}if(r){const u=i||r;return O({type:"mcp:oauth:callback",success:!1,error:u},o),{success:!1,error:u}}if(!t||!n){const u="Missing code or state parameter";return O({type:"mcp:oauth:callback",success:!1,error:u},o),{success:!1,error:u}}return n=o||n,O({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function m(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(e){try{const t=m(),n=t?new URL(e,t):new URL(e),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function F(e){try{const t=m();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function G(e,t,n){const r={hasToken:!1,usable:!1,sandboxSignIn:!1};try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,o=n?new URL(i,n).href:i,s=m(),u=!n||new URL(n).origin===s,l=await fetch(o,{credentials:u?"include":"omit"});if(!l.ok)return r;const h=await l.json();return{hasToken:h.hasToken===!0,usable:h.hasToken===!0&&(h.isExpired!==!0||h.canRefresh===!0),sandboxSignIn:h.sandboxSignIn===!0}}catch{return r}}async function B({url:e,token:t,orgId:n,studioUrl:r,meshUrl:i}){try{const o=j(e),s=F(e),u=m(),l=M({studioUrl:r,meshUrl:i},u?new URL(e,u).origin:new URL(e).origin),h=o&&s?await G(o,s,l):null;if(h?.sandboxSignIn)return{isAuthenticated:h.usable,supportsOAuth:!0,hasOAuthToken:h.hasToken};const a=new Headers;a.set("Content-Type","application/json"),a.set("Accept","application/json, text/event-stream");const d=await fetch(e,{method:"POST",headers:a,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(v)});if(d.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:h?.hasToken??!1};let p;try{const f=await d.json();p=f.error||f.message}catch{}return d.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:p||`HTTP ${d.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!d.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:p||`HTTP ${d.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${v/1e3}s`:o.message}}}export{Q as a,Z as h,B as i};
@@ -1 +1 @@
1
- import{eK as e}from"./index-B8UywZZm.js";import{a as c}from"./mcp-oauth-Dm95e807.js";async function i(n,o){const t=await(await fetch(`/api/${encodeURIComponent(n)}/connections/${o}/oauth-token/status`,{credentials:"include"}).catch(()=>null))?.json().catch(()=>null);return!!t&&typeof t=="object"&&"sandboxSignIn"in t&&t.sandboxSignIn===!0}async function r(n){return n.orgSlug&&await i(n.orgSlug,n.connectionId)?e(n.orgSlug,n.connectionId):c(n)}export{r as a};
1
+ import{eK as e}from"./index-ucJDxPyE.js";import{a as c}from"./mcp-oauth-CwgKK51G.js";async function i(n,o){const t=await(await fetch(`/api/${encodeURIComponent(n)}/connections/${o}/oauth-token/status`,{credentials:"include"}).catch(()=>null))?.json().catch(()=>null);return!!t&&typeof t=="object"&&"sandboxSignIn"in t&&t.sandboxSignIn===!0}async function r(n){return n.orgSlug&&await i(n.orgSlug,n.connectionId)?e(n.orgSlug,n.connectionId):c(n)}export{r as a};