decocms 4.21.0 → 4.22.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 (277) hide show
  1. package/dist/client/assets/{AlertCircle-DrgnpYmf.js → AlertCircle-BAqebLND.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CEF-CsVj.js → ArrowUpRight-BejkutVa.js} +1 -1
  3. package/dist/client/assets/Check-CC3ah2EP.js +1 -0
  4. package/dist/client/assets/{CheckCircle-xbzaC4iQ.js → CheckCircle-C_Aedf-I.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-DDeoixaJ.js → ChevronDown-ChsImHZJ.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-Cc93D1fP.js → ChevronRight-DKpM0qdo.js} +1 -1
  7. package/dist/client/assets/ChevronUp-CJ6cOnxb.js +1 -0
  8. package/dist/client/assets/Circle-Blw66dbf.js +1 -0
  9. package/dist/client/assets/Copy01-B9fTK-Gv.js +1 -0
  10. package/dist/client/assets/DotsVertical-CmhOyP1I.js +1 -0
  11. package/dist/client/assets/Eye-CFP70kHf.js +1 -0
  12. package/dist/client/assets/{FilterLines-C174NPGB.js → FilterLines-BCJIlwsH.js} +1 -1
  13. package/dist/client/assets/{Globe01-y8c9C4nH.js → Globe01-CdKa67VI.js} +1 -1
  14. package/dist/client/assets/{Globe04-v8yJBvO0.js → Globe04-BwB-L-v7.js} +1 -1
  15. package/dist/client/assets/{HardDrive-vkw_bVtH.js → HardDrive-Cvln_XgB.js} +1 -1
  16. package/dist/client/assets/{Key01-8wUzNiiB.js → Key01-Dq3fyqt5.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-DFSfhhoN.js → LayoutLeft-D7T3E-u6.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-CPcvHi4V.js → LinkExternal01-Cohlmmy1.js} +1 -1
  19. package/dist/client/assets/List-BX1Dxe3c.js +1 -0
  20. package/dist/client/assets/Loading02-DutOxXF8.js +1 -0
  21. package/dist/client/assets/{Monitor01-DQ9B5dBT.js → Monitor01-Do0cCBdt.js} +1 -1
  22. package/dist/client/assets/{Palette-BP0gnn-x.js → Palette-BmgCpHFj.js} +1 -1
  23. package/dist/client/assets/{Play-6woe_bCf.js → Play-BBHolMYa.js} +1 -1
  24. package/dist/client/assets/{Plus-sSvDtP2D.js → Plus-Cpa6DE3F.js} +1 -1
  25. package/dist/client/assets/{SearchLg-BHGwQ11F.js → SearchLg-D1sKIH4t.js} +1 -1
  26. package/dist/client/assets/{SearchMd-DcwBMfFO.js → SearchMd-CafLz5-k.js} +1 -1
  27. package/dist/client/assets/{Settings02-B0ZT4yzH.js → Settings02-Qe5DtIFk.js} +1 -1
  28. package/dist/client/assets/{Shield01-16ivhP9D.js → Shield01-CmqQX7z4.js} +1 -1
  29. package/dist/client/assets/{Star01-BwzFDtQr.js → Star01-Dx3yxBV5.js} +1 -1
  30. package/dist/client/assets/{Stars01-D_GgsBTV.js → Stars01-Cjj351UH.js} +1 -1
  31. package/dist/client/assets/{Stars02-CgeR-sX4.js → Stars02-DVjaFNiu.js} +1 -1
  32. package/dist/client/assets/{Sun-vVeG2mZ0.js → Sun-9KvJTXMD.js} +1 -1
  33. package/dist/client/assets/SwitchHorizontal01-C2AiHI6d.js +1 -0
  34. package/dist/client/assets/{Tool01-BUi-a5a2.js → Tool01-CMdJij71.js} +1 -1
  35. package/dist/client/assets/{Trash01-YsCUBRvj.js → Trash01-Bk68wFhO.js} +1 -1
  36. package/dist/client/assets/{Upload01-CTPdQzyc.js → Upload01-DfieuDNH.js} +1 -1
  37. package/dist/client/assets/{User01-C4JQrjGt.js → User01-BiwKrQu6.js} +1 -1
  38. package/dist/client/assets/{Users01-TIl6xBro.js → Users01-rcBZnIdC.js} +1 -1
  39. package/dist/client/assets/{Users03-Cw_16vbZ.js → Users03-C2FdBaet.js} +1 -1
  40. package/dist/client/assets/{X-CAjmVwOR.js → X-Dfoip5yB.js} +1 -1
  41. package/dist/client/assets/{XCircle-D3nhMqns.js → XCircle-C9R5bCeP.js} +1 -1
  42. package/dist/client/assets/{XClose-B93vthJT.js → XClose-CPqc0UtD.js} +1 -1
  43. package/dist/client/assets/{Zap-8CUqVoBU.js → Zap-CRPirG1P.js} +1 -1
  44. package/dist/client/assets/{ZapSquare-BDUSHcAn.js → ZapSquare-CGsw7HnP.js} +1 -1
  45. package/dist/client/assets/{ZoomOut-BN-KB_0J.js → ZoomOut-Cq_jwvnh.js} +1 -1
  46. package/dist/client/assets/{access-gate-B6S-WMth.js → access-gate-7q5PI6kF.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-CQq5kJUo.js → add-section-modal-BVhFBSux.js} +1 -1
  48. package/dist/client/assets/agent-capabilities-BGx_yFvg.js +1 -0
  49. package/dist/client/assets/agent-icon-DAuEpvjN.js +1 -0
  50. package/dist/client/assets/agents-list-DEbqbve9.js +1 -0
  51. package/dist/client/assets/ai-providers-jW9pV5wT.js +1 -0
  52. package/dist/client/assets/{alert-BBmFOgXs.js → alert-Chi9L6Lo.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-ClCDLHyi.js → alert-dialog-DNV8OhbX.js} +1 -1
  54. package/dist/client/assets/app-editor-B90O76NW.js +1 -0
  55. package/dist/client/assets/{auth-catchall-DCUDZpnm.js → auth-catchall-BeENOKgo.js} +1 -1
  56. package/dist/client/assets/{auth-entry-CDU8nxvN.js → auth-entry-Banhr0Dj.js} +1 -1
  57. package/dist/client/assets/{auth-CxjVr2Fw.js → auth-k2I4x92r.js} +1 -1
  58. package/dist/client/assets/{auth-split-layout-VRGxSLqT.js → auth-split-layout-BpIandE_.js} +1 -1
  59. package/dist/client/assets/{authenticate-and-persist-oauth-CZ-MLzKy.js → authenticate-and-persist-oauth-DiKNvlD_.js} +1 -1
  60. package/dist/client/assets/{automation-list-row-B57SiMbH.js → automation-list-row-pGg9Lluh.js} +1 -1
  61. package/dist/client/assets/automation-runs-8IQ_r9WW.js +1 -0
  62. package/dist/client/assets/automations-DYcjcF3S.js +1 -0
  63. package/dist/client/assets/{avatar-BAkTMYHj.js → avatar-BD1bv4j8.js} +1 -1
  64. package/dist/client/assets/{badge-CxIGH9s7.js → badge-Dz2OFDxQ.js} +1 -1
  65. package/dist/client/assets/{block-document-sOmo01vI.js → block-document-MEJKfSm3.js} +1 -1
  66. package/dist/client/assets/{brand-context-rYfc__eE.js → brand-context-C-0cx-zk.js} +1 -1
  67. package/dist/client/assets/{breadcrumb-WlMbFTff.js → breadcrumb-DDrlJm3F.js} +1 -1
  68. package/dist/client/assets/buckets-K1kG3QiU.js +1 -0
  69. package/dist/client/assets/bulk-category-panel-Cpe8cv7-.js +1 -0
  70. package/dist/client/assets/{capability-load-error-Bj6xKhKF.js → capability-load-error-CV7OdywL.js} +1 -1
  71. package/dist/client/assets/{card-9jdGQNnr.js → card-DT6z8UIy.js} +1 -1
  72. package/dist/client/assets/category-editor-97EZw1QP.js +1 -0
  73. package/dist/client/assets/{chat-context-OmrHZlWm.js → chat-context-CcZXAHlF.js} +5 -5
  74. package/dist/client/assets/checkbox-CGiCIR_t.js +1 -0
  75. package/dist/client/assets/{cli-auth-success-CkMPwuV_.js → cli-auth-success-C0sOgmEb.js} +1 -1
  76. package/dist/client/assets/collection-detail-Clwh-BUk.js +1 -0
  77. package/dist/client/assets/collection-display-button-S0ZgQk6P.js +1 -0
  78. package/dist/client/assets/{collection-search-BHP0uS8b.js → collection-search-eFRNtpdt.js} +1 -1
  79. package/dist/client/assets/{collection-table-wrapper-DeKnxXxy.js → collection-table-wrapper-DQSn1GJT.js} +1 -1
  80. package/dist/client/assets/{collection-tabs-CvLerKx4.js → collection-tabs-CYD2CpTe.js} +1 -1
  81. package/dist/client/assets/{command-D9kK6qBS.js → command-DWilEO1e.js} +1 -1
  82. package/dist/client/assets/commerce-onboarding-Dmxkngyz.js +1 -0
  83. package/dist/client/assets/connect-desktop-dialog-C8fqunJ_.js +1 -0
  84. package/dist/client/assets/connection-card-De6SHWCH.js +1 -0
  85. package/dist/client/assets/connection-detail-BUV19nAJ.js +1 -0
  86. package/dist/client/assets/{connection-form-helpers-oKSRt7Z9.js → connection-form-helpers-DsTip61C.js} +1 -1
  87. package/dist/client/assets/connections-DHz382Nc.js +1 -0
  88. package/dist/client/assets/constants-C8_Swa4x.js +1 -0
  89. package/dist/client/assets/{decopilot-xPgbGeJc.js → decopilot-DA6E6MgD.js} +1 -1
  90. package/dist/client/assets/{decopilot-sse-pool-BdE-V58A.js → decopilot-sse-pool-B-Li8vIf.js} +1 -1
  91. package/dist/client/assets/{dialog-D_ieAQTy.js → dialog-Bx9_D2-i.js} +1 -1
  92. package/dist/client/assets/{domain-settings-ByTW2skH.js → domain-settings-CmBMcneA.js} +1 -1
  93. package/dist/client/assets/{drawer-BP70Rujn.js → drawer-DUrVpGtt.js} +1 -1
  94. package/dist/client/assets/dropdown-menu-BXlOZYEj.js +1 -0
  95. package/dist/client/assets/{empty-state-BS7npFnj.js → empty-state-DrOUH3OQ.js} +1 -1
  96. package/dist/client/assets/extract-connection-data-AeQK1qls.js +1 -0
  97. package/dist/client/assets/file-explorer-cazCHuV9.js +2 -0
  98. package/dist/client/assets/{file-type-icon-DALXnNwz.js → file-type-icon-DHWkW0ug.js} +1 -1
  99. package/dist/client/assets/{files-hG4e0Y52.js → files-CHpi2r2q.js} +1 -1
  100. package/dist/client/assets/{form-DaxgojJl.js → form-C6xzxaKT.js} +1 -1
  101. package/dist/client/assets/format-time-Cy7tTmZp.js +1 -0
  102. package/dist/client/assets/general-CBqmiHQR.js +1 -0
  103. package/dist/client/assets/github-repo-picker-BFPwF92l.js +1 -0
  104. package/dist/client/assets/{hooks-ChlRS_Cr.js → hooks-DPy92pzv.js} +4 -4
  105. package/dist/client/assets/{index-DSNOu07Q.js → index-C8i8F2aZ.js} +12 -12
  106. package/dist/client/assets/index-CARq6YCN.js +1 -0
  107. package/dist/client/assets/{index-CrIRvXb3.js → index-CO9SnRbg.js} +4 -4
  108. package/dist/client/assets/{index-Bo5LvjuQ.js → index-CYLzTU3h.js} +6 -6
  109. package/dist/client/assets/{index-6Q-DcRF4.js → index-ChSXukaC.js} +1 -1
  110. package/dist/client/assets/index-CveMeMql.css +1 -0
  111. package/dist/client/assets/{index-CYTkc5bj.js → index-DD6weYxO.js} +1 -1
  112. package/dist/client/assets/{index-7osCyUPH.js → index-DU_SD-rb.js} +1 -1
  113. package/dist/client/assets/{index-CvxPzQfb.js → index-DWzm9A1x.js} +1 -1
  114. package/dist/client/assets/{index-xZ8IGJ2g.js → index-Dx-JuX8X.js} +2 -2
  115. package/dist/client/assets/{index-DpMErrhr.js → index-LGROg_hz.js} +1 -1
  116. package/dist/client/assets/index-Mlqi33Qh.js +1 -0
  117. package/dist/client/assets/{index-DgNLMhiy.js → index-S0Q7YlOD.js} +25 -25
  118. package/dist/client/assets/index-r-ZTThxt.js +1 -0
  119. package/dist/client/assets/{index-redirect-TiE2LCg3.js → index-redirect-BDcT3T7b.js} +1 -1
  120. package/dist/client/assets/{index-yloThw-p.js → index-zDHcoqw4.js} +1 -1
  121. package/dist/client/assets/{input-CjQtu1h5.js → input-Dmp_t77f.js} +1 -1
  122. package/dist/client/assets/{integration-icon-DvmR_kCi.js → integration-icon-D1vivc8T.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-BHrSHQE6.js → invite-member-dialog-B52NxzkC.js} +2 -2
  124. package/dist/client/assets/{label-CyPUYQaT.js → label-D3ajqQqF.js} +1 -1
  125. package/dist/client/assets/{library-tab-CrasAutb.js → library-tab-D0-rbhqe.js} +3 -3
  126. package/dist/client/assets/{login-C4Xj3ZGq.js → login-B5g56FG8.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-Cjq6PMkC.js → mcp-oauth-jAFObzAH.js} +1 -1
  128. package/dist/client/assets/members-C3EfSHkY.js +1 -0
  129. package/dist/client/assets/{monaco-editor-kdhsccRw.js → monaco-editor-DMzl3sdg.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-DeKE4QGN.js → monitoring-stats-row-Cn7CUK3V.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-CTt195fk.js → oauth-callback-Bs1-J2uC.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-ai-provider-CXZF8sn_.js → oauth-callback-ai-provider-1jknSd8R.js} +1 -1
  133. package/dist/client/assets/{onboarding-BgKa_2mX.js → onboarding-DvEuy0D_.js} +1 -1
  134. package/dist/client/assets/{org-install-CFWrpbg8.js → org-install-CJ7F5mZU.js} +1 -1
  135. package/dist/client/assets/{org-layout-B7y5gvzJ.js → org-layout-CQsIu6xu.js} +1 -1
  136. package/dist/client/assets/{organization-choice-LKw28vSy.js → organization-choice-UHSo9CAk.js} +1 -1
  137. package/dist/client/assets/{page-seo-form-DmWg08s4.js → page-seo-form-BY-XtFIF.js} +1 -1
  138. package/dist/client/assets/page-seo-sheet-C-o48EMg.js +1 -0
  139. package/dist/client/assets/{popover-Dk6C_xyw.js → popover-DbclufIS.js} +1 -1
  140. package/dist/client/assets/post-editor-o5fS997b.js +1 -0
  141. package/dist/client/assets/{primitives-D3eMc46F.js → primitives-PoyK9-WR.js} +1 -1
  142. package/dist/client/assets/profile-DXLRzqRR.js +1 -0
  143. package/dist/client/assets/project-app-view-sebr-y53.js +1 -0
  144. package/dist/client/assets/record-editor-BGPyrMO7.js +1 -0
  145. package/dist/client/assets/registry-GJh_dUyE.js +2 -0
  146. package/dist/client/assets/{registry-layout-BljHeZAP.js → registry-layout-DaPQiP8-.js} +4 -4
  147. package/dist/client/assets/{require-capability-ByiCIEvf.js → require-capability-D_bY_XS6.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-B1_k8uZH.js → required-auth-layout-CUJtlw7e.js} +1 -1
  149. package/dist/client/assets/{reset-password-14ERSLOr.js → reset-password-Boo6v3a2.js} +1 -1
  150. package/dist/client/assets/roles-CP5n6DBo.js +1 -0
  151. package/dist/client/assets/{scroll-area-DVEw9jTn.js → scroll-area-C9lD0DG9.js} +11 -11
  152. package/dist/client/assets/{search-input-Cw7dukB_.js → search-input-CDcgzOxB.js} +1 -1
  153. package/dist/client/assets/secrets-BXbhAnGl.js +1 -0
  154. package/dist/client/assets/{sections-editor-Bnz1L7UN.js → sections-editor-DHI42whV.js} +2 -2
  155. package/dist/client/assets/select-CsaBdTgI.js +1 -0
  156. package/dist/client/assets/{select-model-1JGm9WVZ.js → select-model-DflkFrTV.js} +1 -1
  157. package/dist/client/assets/seo-editor-CaMUQOw8.js +1 -0
  158. package/dist/client/assets/{settings-layout-f8IHCdTn.js → settings-layout-B_-ExZeb.js} +1 -1
  159. package/dist/client/assets/{settings-section-CTfa0pnb.js → settings-section-URYHyOYi.js} +1 -1
  160. package/dist/client/assets/{sheet-B3x8ZiS-.js → sheet-BGhHsN5F.js} +1 -1
  161. package/dist/client/assets/{shell-controls-C4LCUc-y.js → shell-controls-6cosW1pP.js} +1 -1
  162. package/dist/client/assets/shell-layout-DdBCXSg-.js +1 -0
  163. package/dist/client/assets/{sidebar-C8N0hRhw.js → sidebar-BAsFQ-MT.js} +1 -1
  164. package/dist/client/assets/{skeleton-C5L5O22N.js → skeleton-BUBk-3xi.js} +1 -1
  165. package/dist/client/assets/sso-D_2b6Fc8.js +1 -0
  166. package/dist/client/assets/store-ievF1htD.js +1 -0
  167. package/dist/client/assets/store-registry-B3gzmTlr.js +2 -0
  168. package/dist/client/assets/{studio-tools-kXfq3pN5.js → studio-tools-DgAshZ-_.js} +1 -1
  169. package/dist/client/assets/{switch-BL5aJnqG.js → switch-BonZrdli.js} +1 -1
  170. package/dist/client/assets/{table-77ubNeic.js → table-DEH4uiQe.js} +1 -1
  171. package/dist/client/assets/{tabs-Dh_kZG_m.js → tabs-CRj6AkcW.js} +1 -1
  172. package/dist/client/assets/task-row-ChWV-nAj.js +1 -0
  173. package/dist/client/assets/task-status-Dh1x9gPU.js +1 -0
  174. package/dist/client/assets/{textarea-D5nE7rMP.js → textarea-BNlJNx-b.js} +1 -1
  175. package/dist/client/assets/{toggle-group-oUYd1Jxm.js → toggle-group-QkV1Q0_i.js} +1 -1
  176. package/dist/client/assets/{toolbar-BSesNl59.js → toolbar-CCAeF5A-.js} +1 -1
  177. package/dist/client/assets/{toolbar-icon-button-Da4GFxZS.js → toolbar-icon-button-D7VY-9VN.js} +1 -1
  178. package/dist/client/assets/{tools-list-JC_5uk0t.js → tools-list-M23BH1hq.js} +1 -1
  179. package/dist/client/assets/{tooltip-B3h8W9fM.js → tooltip-FlCInimM.js} +1 -1
  180. package/dist/client/assets/{types-H_rr3OSP.js → types-kWY4145T.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-lTSdzFgc.js → use-ai-providers-Bc5pT284.js} +1 -1
  182. package/dist/client/assets/use-automations-CF2YS293.js +1 -0
  183. package/dist/client/assets/{use-capability-Cgr7yHYD.js → use-capability-BY1ZsP4P.js} +1 -1
  184. package/dist/client/assets/use-clock-tick-DiVstnVw.js +1 -0
  185. package/dist/client/assets/{use-collections-Bb5vIdWQ.js → use-collections-BwIgjkkY.js} +1 -1
  186. package/dist/client/assets/use-connection-BuLrAfYP.js +1 -0
  187. package/dist/client/assets/{use-copy-ClKjk1Nz.js → use-copy-ue2G1-hn.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-BcrC97GS.js → use-create-virtual-mcp-CwTiuOpk.js} +1 -1
  189. package/dist/client/assets/{use-debounced-autosave-CEbGGyRe.js → use-debounced-autosave-DPoL6EyR.js} +1 -1
  190. package/dist/client/assets/{use-debounced-value-BCxrmAGw.js → use-debounced-value-BaMggBf4.js} +1 -1
  191. package/dist/client/assets/{use-decopilot-events-CkQ3Rugh.js → use-decopilot-events-CqBKeCC-.js} +1 -1
  192. package/dist/client/assets/{use-delete-connection-COjWhEca.js → use-delete-connection-Dz7PGuLT.js} +1 -1
  193. package/dist/client/assets/{use-file-configs-CxoqQtr4.js → use-file-configs-DG9Mhiyd.js} +1 -1
  194. package/dist/client/assets/{use-infinite-scroll-DqqX0EF_.js → use-infinite-scroll-3Uj2RNwo.js} +1 -1
  195. package/dist/client/assets/{use-join-requests-BFV1IEGJ.js → use-join-requests-S43CfCdf.js} +1 -1
  196. package/dist/client/assets/use-mcp-client-CnRSGieI.js +10 -0
  197. package/dist/client/assets/{use-mcp-prompts-F7AgPwEV.js → use-mcp-prompts-BHkYncis.js} +1 -1
  198. package/dist/client/assets/{use-mcp-tools-UjXU5ids.js → use-mcp-tools-CDyeZmTp.js} +1 -1
  199. package/dist/client/assets/{use-members-B-1xXj0d.js → use-members-DSSi_h3c.js} +1 -1
  200. package/dist/client/assets/{use-mobile-CTYLPqKT.js → use-mobile-FUxUqTQv.js} +1 -1
  201. package/dist/client/assets/{use-navigate-to-agent-ZLpx01PW.js → use-navigate-to-agent-DqOg0uVZ.js} +1 -1
  202. package/dist/client/assets/{use-org-auth-client-NLz6RBvg.js → use-org-auth-client-DOD7ccpR.js} +1 -1
  203. package/dist/client/assets/{use-org-sso-nbZu8iS1.js → use-org-sso-DU73DmAG.js} +1 -1
  204. package/dist/client/assets/{use-organization-roles-BEuKNbP8.js → use-organization-roles-Dcz2MjMd.js} +1 -1
  205. package/dist/client/assets/use-organization-settings-C8EmnI93.js +1 -0
  206. package/dist/client/assets/use-registry-connections-Ctaa0JQV.js +1 -0
  207. package/dist/client/assets/{use-secrets-CIN5lIiD.js → use-secrets-B5E8bF7h.js} +1 -1
  208. package/dist/client/assets/{use-status-sounds-Bl8mPZM3.js → use-status-sounds-BH3nLka8.js} +1 -1
  209. package/dist/client/assets/{use-view-mode-DE98MrNw.js → use-view-mode-DHvPeuX3.js} +1 -1
  210. package/dist/client/assets/use-virtual-mcp-iU8WqU_q.js +1 -0
  211. package/dist/client/assets/useInfiniteQuery-MSYpmccr.js +1 -0
  212. package/dist/client/assets/useSuspenseInfiniteQuery-Wt188HkA.js +1 -0
  213. package/dist/client/assets/{useSuspenseQueries-g9RVw8Va.js → useSuspenseQueries-Cy-j8ofE.js} +1 -1
  214. package/dist/client/assets/variant-calendar-BWM8PQLC.js +1 -0
  215. package/dist/client/assets/{view-mode-toggle-B3xxjWBP.js → view-mode-toggle-td--5Ihh.js} +1 -1
  216. package/dist/client/index.html +2 -2
  217. package/dist/server/cli.js +502 -502
  218. package/dist/server/migrate.js +83 -83
  219. package/dist/server/server.js +314 -314
  220. package/package.json +1 -1
  221. package/dist/client/assets/ChevronUp-C2DYINXH.js +0 -1
  222. package/dist/client/assets/DotsVertical-CB1RTV9h.js +0 -1
  223. package/dist/client/assets/Eye-DHiUyPMS.js +0 -1
  224. package/dist/client/assets/SwitchHorizontal01-DTag6ZGf.js +0 -1
  225. package/dist/client/assets/agent-capabilities-BLdjNi42.js +0 -1
  226. package/dist/client/assets/agent-icon-HIFEO6vs.js +0 -1
  227. package/dist/client/assets/agents-list-YngYFo7C.js +0 -1
  228. package/dist/client/assets/ai-providers-BbExXFlh.js +0 -1
  229. package/dist/client/assets/app-editor-dXgIlUYv.js +0 -1
  230. package/dist/client/assets/automation-runs-LATF_NNh.js +0 -1
  231. package/dist/client/assets/automations-BBkP1No_.js +0 -1
  232. package/dist/client/assets/buckets-oHa98Efr.js +0 -1
  233. package/dist/client/assets/bulk-category-panel-C9FEvCBV.js +0 -1
  234. package/dist/client/assets/category-editor-Y8aXIh-A.js +0 -1
  235. package/dist/client/assets/checkbox-DnPlj3-W.js +0 -1
  236. package/dist/client/assets/collection-detail-C28Se3ZZ.js +0 -1
  237. package/dist/client/assets/collection-display-button-DOUzSfH_.js +0 -1
  238. package/dist/client/assets/commerce-onboarding-Dwo4yg2j.js +0 -1
  239. package/dist/client/assets/connect-desktop-dialog-3SiI_mFd.js +0 -1
  240. package/dist/client/assets/connection-card-MLfvU4EZ.js +0 -1
  241. package/dist/client/assets/connection-detail-AC0jwDBB.js +0 -1
  242. package/dist/client/assets/connections-DNvp-Wd0.js +0 -1
  243. package/dist/client/assets/dropdown-menu-Ctb60TB7.js +0 -1
  244. package/dist/client/assets/extract-connection-data-RxV5HgFK.js +0 -1
  245. package/dist/client/assets/file-explorer-CqV9i4IM.js +0 -2
  246. package/dist/client/assets/general-mdgztBV6.js +0 -1
  247. package/dist/client/assets/github-repo-picker-CZI-ClVg.js +0 -1
  248. package/dist/client/assets/index-B1I1Oi0g.css +0 -1
  249. package/dist/client/assets/index-BMeJsDzW.js +0 -1
  250. package/dist/client/assets/index-DoOMda_E.js +0 -1
  251. package/dist/client/assets/members-C-oUAFwh.js +0 -1
  252. package/dist/client/assets/page-seo-sheet-Cg02Z-pf.js +0 -1
  253. package/dist/client/assets/post-editor-DoYb2wDl.js +0 -1
  254. package/dist/client/assets/profile-D3nqggYc.js +0 -1
  255. package/dist/client/assets/project-app-view-B9CUuk6-.js +0 -1
  256. package/dist/client/assets/record-editor-CjPHKje-.js +0 -1
  257. package/dist/client/assets/registry-8Yn6aIkw.js +0 -2
  258. package/dist/client/assets/roles-Dk6u6yco.js +0 -1
  259. package/dist/client/assets/secrets-CswlU-Ba.js +0 -1
  260. package/dist/client/assets/select-bneCBMXH.js +0 -1
  261. package/dist/client/assets/seo-editor-D0gZRnH2.js +0 -1
  262. package/dist/client/assets/shell-layout-CSNtx2tN.js +0 -1
  263. package/dist/client/assets/sso-CmKVccvq.js +0 -1
  264. package/dist/client/assets/store-DnZXwM23.js +0 -1
  265. package/dist/client/assets/store-registry-DzUKthzk.js +0 -2
  266. package/dist/client/assets/task-row-LdEr6awi.js +0 -1
  267. package/dist/client/assets/task-status-DNIO7fCq.js +0 -1
  268. package/dist/client/assets/use-automations-1J-hXDhd.js +0 -1
  269. package/dist/client/assets/use-clock-tick-D7gbCPid.js +0 -1
  270. package/dist/client/assets/use-connection-C0zEwTpO.js +0 -1
  271. package/dist/client/assets/use-mcp-client-C62ZsAPE.js +0 -10
  272. package/dist/client/assets/use-organization-settings-Dys1xzl0.js +0 -1
  273. package/dist/client/assets/use-registry-connections-By0sWOC0.js +0 -1
  274. package/dist/client/assets/use-virtual-mcp-D_g2q7bN.js +0 -1
  275. package/dist/client/assets/useInfiniteQuery-YzbBhr0w.js +0 -1
  276. package/dist/client/assets/useSuspenseInfiniteQuery-Cgpvcam3.js +0 -1
  277. package/dist/client/assets/variant-calendar-CHjE3Ibi.js +0 -1
@@ -1 +0,0 @@
1
- import{c as V,j as t,a as T,p as R,a1 as q,I as B,v as N,t as I}from"./index-DgNLMhiy.js";import{P as L}from"./index-CvxPzQfb.js";import{A as U}from"./avatar-BAkTMYHj.js";import{S as D}from"./switch-BL5aJnqG.js";import{d as G,S as Y,c as $,b as K}from"./select-bneCBMXH.js";import{a as O,T as z}from"./toggle-group-oUYd1Jxm.js";import{I as H}from"./input-CjQtu1h5.js";import{i as J}from"./Monitor01-DQ9B5dBT.js";import{n as M,a as Q}from"./Sun-vVeG2mZ0.js";import{i as W}from"./Play-6woe_bCf.js";import{u as X}from"./use-debounced-autosave-CEbGGyRe.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-6Q-DcRF4.js";import{c as te,b as A,S as E,a as F}from"./settings-section-CTfa0pnb.js";import"./sidebar-C8N0hRhw.js";import"./LayoutLeft-DFSfhhoN.js";import"./use-mobile-CTYLPqKT.js";import"./sheet-B3x8ZiS-.js";import"./X-CAjmVwOR.js";import"./tooltip-B3h8W9fM.js";import"./User01-C4JQrjGt.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./card-9jdGQNnr.js";import"./ArrowUpRight-CEF-CsVj.js";function se(){const e=V.c(19),{data:s,isPending:o}=T.useSession(),g=s?.user,p=g?.image,h=g?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=R(S);let _;e[2]!==n?(_={save:async()=>{const v=n.control._formState.dirtyFields;if(Object.keys(v).length===0)return;const a=n.getValues(),f=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await T.updateUser({name:a.name}),N("profile_updated",{fields:["name"]}),I.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),I.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=g?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=v=>{const{field:a}=v;return t.jsx(H,{id:"display-name",...a,onChange:f=>{a.onChange(f),x()},onBlur:()=>{a.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=g?.email;let r;e[13]!==b?(r=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=r):r=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==r?(u=t.jsx(E,{children:t.jsxs(F,{children:[i,d,r]})}),e[15]=i,e[16]=d,e[17]=r,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let g;e[0]!==o?(g=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),o(re);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=g):g=e[1];const p=g;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(J,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(O,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(D,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let r;e[25]!==s.enableSounds||e[26]!==b?(r=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(D,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=r):r=e[27];let u;e[28]!==r||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:r}),e[28]=r,e[29]=l,e[30]=u):u=e[30];let v;e[31]!==o?(v=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=v):v=e[32];let a;e[33]!==s.toolApprovalLevel?(a={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=a):a=e[34];let f;e[35]!==a?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:a})}),e[35]=a,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==v||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:v,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=v,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(F,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function re(e){return{...e,enableNotifications:!1}}function ae(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function Te(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(ae,{}),e[0]=s):s=e[0],s}export{Te as default};
@@ -1 +0,0 @@
1
- import{c as $,G as H,j as A}from"./index-DgNLMhiy.js";import{l as L,g as E,s as y}from"./scroll-area-DVEw9jTn.js";import{p as O,u as k}from"./use-mcp-client-C62ZsAPE.js";import{b as q,c as B}from"./use-mcp-tools-UjXU5ids.js";import{u as G}from"./index-DSNOu07Q.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-H_rr3OSP.js";import{u as z,b as F}from"./chat-context-OmrHZlWm.js";import{b as J}from"./shell-layout-CSNtx2tN.js";import"./agent-icon-HIFEO6vs.js";import"./AlertCircle-DrgnpYmf.js";import"./Tool01-BUi-a5a2.js";import"./SwitchHorizontal01-DTag6ZGf.js";import"./Settings02-B0ZT4yzH.js";import"./XCircle-D3nhMqns.js";import"./ArrowUpRight-CEF-CsVj.js";import"./ZapSquare-BDUSHcAn.js";import"./Users03-Cw_16vbZ.js";import"./CheckCircle-xbzaC4iQ.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./ChevronRight-Cc93D1fP.js";import"./DotsVertical-CB1RTV9h.js";import"./Stars02-CgeR-sX4.js";import"./Eye-DHiUyPMS.js";import"./ZoomOut-BN-KB_0J.js";import"./Globe01-y8c9C4nH.js";import"./FilterLines-C174NPGB.js";import"./Star01-BwzFDtQr.js";import"./Globe04-v8yJBvO0.js";import"./HardDrive-vkw_bVtH.js";import"./Key01-8wUzNiiB.js";import"./LayoutLeft-DFSfhhoN.js";import"./LinkExternal01-CPcvHi4V.js";import"./Monitor01-DQ9B5dBT.js";import"./Sun-vVeG2mZ0.js";import"./Palette-BP0gnn-x.js";import"./Play-6woe_bCf.js";import"./Plus-sSvDtP2D.js";import"./SearchLg-BHGwQ11F.js";import"./SearchMd-DcwBMfFO.js";import"./Shield01-16ivhP9D.js";import"./Stars01-D_GgsBTV.js";import"./Trash01-YsCUBRvj.js";import"./Upload01-CTPdQzyc.js";import"./User01-C4JQrjGt.js";import"./Users01-TIl6xBro.js";import"./XClose-B93vthJT.js";import"./X-CAjmVwOR.js";import"./Zap-8CUqVoBU.js";import"./use-clock-tick-D7gbCPid.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ClKjk1Nz.js";import"./tooltip-B3h8W9fM.js";import"./file-type-icon-DALXnNwz.js";import"./dialog-D_ieAQTy.js";import"./use-mobile-CTYLPqKT.js";import"./tab-id-CLpu897Q.js";import"./hooks-ChlRS_Cr.js";import"./decopilot-sse-pool-BdE-V58A.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-kXfq3pN5.js";import"./sheet-B3x8ZiS-.js";import"./integration-icon-DvmR_kCi.js";import"./use-virtual-mcp-D_g2q7bN.js";import"./use-collections-Bb5vIdWQ.js";import"./use-navigate-to-agent-ZLpx01PW.js";import"./use-connection-C0zEwTpO.js";import"./use-mcp-prompts-F7AgPwEV.js";import"./form-DaxgojJl.js";import"./label-CyPUYQaT.js";import"./input-CjQtu1h5.js";import"./select-bneCBMXH.js";import"./auth-CxjVr2Fw.js";import"./library-tab-CrasAutb.js";import"./drawer-BP70Rujn.js";import"./collection-search-BHP0uS8b.js";import"./tabs-Dh_kZG_m.js";import"./toggle-group-oUYd1Jxm.js";import"./agent-capabilities-BLdjNi42.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-MLfvU4EZ.js";import"./use-registry-connections-By0sWOC0.js";import"./use-organization-settings-Dys1xzl0.js";import"./useInfiniteQuery-YzbBhr0w.js";import"./use-infinite-scroll-DqqX0EF_.js";import"./extract-connection-data-RxV5HgFK.js";import"./card-9jdGQNnr.js";import"./collection-tabs-CvLerKx4.js";import"./badge-CxIGH9s7.js";import"./textarea-D5nE7rMP.js";import"./connection-form-helpers-oKSRt7Z9.js";import"./authenticate-and-persist-oauth-CZ-MLzKy.js";import"./mcp-oauth-Cjq6PMkC.js";import"./useSuspenseInfiniteQuery-Cgpvcam3.js";import"./use-ai-providers-lTSdzFgc.js";import"./connect-desktop-dialog-3SiI_mFd.js";import"./decopilot-xPgbGeJc.js";import"./checkbox-DnPlj3-W.js";import"./skeleton-C5L5O22N.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BAkTMYHj.js";import"./settings-section-CTfa0pnb.js";import"./popover-Dk6C_xyw.js";import"./command-D9kK6qBS.js";import"./index-yloThw-p.js";import"./index-Bo5LvjuQ.js";import"./alert-dialog-ClCDLHyi.js";import"./toolbar-BSesNl59.js";import"./use-debounced-value-BCxrmAGw.js";import"./dropdown-menu-Ctb60TB7.js";import"./index-CYTkc5bj.js";import"./question-004-sINsf4GQ.js";import"./task-row-LdEr6awi.js";import"./task-status-DNIO7fCq.js";import"./use-status-sounds-Bl8mPZM3.js";import"./use-decopilot-events-CkQ3Rugh.js";import"./empty-state-BS7npFnj.js";import"./use-capability-Cgr7yHYD.js";import"./tools-list-JC_5uk0t.js";import"./switch-BL5aJnqG.js";import"./use-debounced-autosave-CEbGGyRe.js";import"./index-CvxPzQfb.js";import"./sidebar-C8N0hRhw.js";import"./search-input-Cw7dukB_.js";import"./github-repo-picker-CZI-ClVg.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CIN5lIiD.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-Da4GFxZS.js";import"./automation-runs-LATF_NNh.js";import"./table-77ubNeic.js";import"./use-members-B-1xXj0d.js";import"./use-org-auth-client-NLz6RBvg.js";import"./use-automations-1J-hXDhd.js";import"./use-file-configs-CxoqQtr4.js";import"./monaco-editor-kdhsccRw.js";import"./select-model-1JGm9WVZ.js";import"./automation-list-row-B57SiMbH.js";import"./required-auth-layout-B1_k8uZH.js";import"./use-org-sso-nbZu8iS1.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=Y(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function De(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=G();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{De as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as S,j as r}from"./index-DgNLMhiy.js";import{I as T}from"./input-CjQtu1h5.js";import{L as C}from"./label-CyPUYQaT.js";import{T as L}from"./textarea-D5nE7rMP.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-DSNOu07Q.js";import{u as M,s as P}from"./primitives-D3eMc46F.js";import"./library-tab-CrasAutb.js";import"./SwitchHorizontal01-DTag6ZGf.js";import"./chat-context-OmrHZlWm.js";import"./hooks-ChlRS_Cr.js";import"./use-mcp-client-C62ZsAPE.js";import"./auth-CxjVr2Fw.js";import"./decopilot-sse-pool-BdE-V58A.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-D_g2q7bN.js";import"./use-collections-Bb5vIdWQ.js";import"./use-ai-providers-lTSdzFgc.js";import"./studio-tools-kXfq3pN5.js";import"./use-decopilot-events-CkQ3Rugh.js";import"./tab-id-CLpu897Q.js";import"./use-organization-settings-Dys1xzl0.js";import"./scroll-area-DVEw9jTn.js";import"./agent-icon-HIFEO6vs.js";import"./AlertCircle-DrgnpYmf.js";import"./Tool01-BUi-a5a2.js";import"./Settings02-B0ZT4yzH.js";import"./XCircle-D3nhMqns.js";import"./ArrowUpRight-CEF-CsVj.js";import"./ZapSquare-BDUSHcAn.js";import"./Users03-Cw_16vbZ.js";import"./CheckCircle-xbzaC4iQ.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./ChevronRight-Cc93D1fP.js";import"./DotsVertical-CB1RTV9h.js";import"./Stars02-CgeR-sX4.js";import"./Eye-DHiUyPMS.js";import"./ZoomOut-BN-KB_0J.js";import"./Globe01-y8c9C4nH.js";import"./FilterLines-C174NPGB.js";import"./Star01-BwzFDtQr.js";import"./Globe04-v8yJBvO0.js";import"./HardDrive-vkw_bVtH.js";import"./Key01-8wUzNiiB.js";import"./LayoutLeft-DFSfhhoN.js";import"./LinkExternal01-CPcvHi4V.js";import"./Monitor01-DQ9B5dBT.js";import"./Sun-vVeG2mZ0.js";import"./Palette-BP0gnn-x.js";import"./Play-6woe_bCf.js";import"./Plus-sSvDtP2D.js";import"./SearchLg-BHGwQ11F.js";import"./SearchMd-DcwBMfFO.js";import"./Shield01-16ivhP9D.js";import"./Stars01-D_GgsBTV.js";import"./Trash01-YsCUBRvj.js";import"./Upload01-CTPdQzyc.js";import"./User01-C4JQrjGt.js";import"./Users01-TIl6xBro.js";import"./XClose-B93vthJT.js";import"./X-CAjmVwOR.js";import"./Zap-8CUqVoBU.js";import"./use-clock-tick-D7gbCPid.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ClKjk1Nz.js";import"./tooltip-B3h8W9fM.js";import"./file-type-icon-DALXnNwz.js";import"./dialog-D_ieAQTy.js";import"./use-mobile-CTYLPqKT.js";import"./content-blocks-o63cs2vh.js";import"./types-H_rr3OSP.js";import"./shell-layout-CSNtx2tN.js";import"./avatar-BAkTMYHj.js";import"./alert-dialog-ClCDLHyi.js";import"./required-auth-layout-B1_k8uZH.js";import"./use-org-sso-nbZu8iS1.js";import"./sheet-B3x8ZiS-.js";import"./integration-icon-DvmR_kCi.js";import"./use-navigate-to-agent-ZLpx01PW.js";import"./use-connection-C0zEwTpO.js";import"./use-mcp-prompts-F7AgPwEV.js";import"./form-DaxgojJl.js";import"./select-bneCBMXH.js";import"./drawer-BP70Rujn.js";import"./collection-search-BHP0uS8b.js";import"./tabs-Dh_kZG_m.js";import"./toggle-group-oUYd1Jxm.js";import"./agent-capabilities-BLdjNi42.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-MLfvU4EZ.js";import"./use-registry-connections-By0sWOC0.js";import"./useInfiniteQuery-YzbBhr0w.js";import"./use-infinite-scroll-DqqX0EF_.js";import"./extract-connection-data-RxV5HgFK.js";import"./card-9jdGQNnr.js";import"./collection-tabs-CvLerKx4.js";import"./badge-CxIGH9s7.js";import"./connection-form-helpers-oKSRt7Z9.js";import"./authenticate-and-persist-oauth-CZ-MLzKy.js";import"./mcp-oauth-Cjq6PMkC.js";import"./useSuspenseInfiniteQuery-Cgpvcam3.js";import"./connect-desktop-dialog-3SiI_mFd.js";import"./decopilot-xPgbGeJc.js";import"./checkbox-DnPlj3-W.js";import"./skeleton-C5L5O22N.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CTfa0pnb.js";import"./popover-Dk6C_xyw.js";import"./command-D9kK6qBS.js";import"./index-yloThw-p.js";import"./index-Bo5LvjuQ.js";import"./toolbar-BSesNl59.js";import"./use-debounced-value-BCxrmAGw.js";import"./dropdown-menu-Ctb60TB7.js";import"./index-CYTkc5bj.js";import"./question-004-sINsf4GQ.js";import"./task-row-LdEr6awi.js";import"./task-status-DNIO7fCq.js";import"./use-status-sounds-Bl8mPZM3.js";import"./empty-state-BS7npFnj.js";import"./use-mcp-tools-UjXU5ids.js";import"./use-capability-Cgr7yHYD.js";import"./tools-list-JC_5uk0t.js";import"./switch-BL5aJnqG.js";import"./use-debounced-autosave-CEbGGyRe.js";import"./index-CvxPzQfb.js";import"./sidebar-C8N0hRhw.js";import"./search-input-Cw7dukB_.js";import"./github-repo-picker-CZI-ClVg.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CIN5lIiD.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-Da4GFxZS.js";import"./automation-runs-LATF_NNh.js";import"./table-77ubNeic.js";import"./use-members-B-1xXj0d.js";import"./use-org-auth-client-NLz6RBvg.js";import"./use-automations-1J-hXDhd.js";import"./use-file-configs-CxoqQtr4.js";import"./monaco-editor-kdhsccRw.js";import"./select-model-1JGm9WVZ.js";import"./automation-list-row-B57SiMbH.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Er(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Er as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BljHeZAP.js","assets/index-DgNLMhiy.js","assets/index-B1I1Oi0g.css","assets/XCircle-D3nhMqns.js","assets/CheckCircle-xbzaC4iQ.js","assets/Settings02-B0ZT4yzH.js","assets/use-mcp-client-C62ZsAPE.js","assets/auth-CxjVr2Fw.js","assets/useInfiniteQuery-YzbBhr0w.js","assets/use-infinite-scroll-DqqX0EF_.js","assets/studio-tools-kXfq3pN5.js","assets/badge-CxIGH9s7.js","assets/input-CjQtu1h5.js","assets/dropdown-menu-Ctb60TB7.js","assets/ChevronUp-C2DYINXH.js","assets/ChevronRight-Cc93D1fP.js","assets/DotsVertical-CB1RTV9h.js","assets/table-77ubNeic.js","assets/toggle-group-oUYd1Jxm.js","assets/use-view-mode-DE98MrNw.js","assets/use-mobile-CTYLPqKT.js","assets/FilterLines-C174NPGB.js","assets/Globe01-y8c9C4nH.js","assets/SearchMd-DcwBMfFO.js","assets/dialog-D_ieAQTy.js","assets/X-CAjmVwOR.js","assets/AlertCircle-DrgnpYmf.js","assets/Upload01-CTPdQzyc.js","assets/alert-dialog-ClCDLHyi.js","assets/card-9jdGQNnr.js","assets/Trash01-YsCUBRvj.js","assets/label-CyPUYQaT.js","assets/select-bneCBMXH.js","assets/tooltip-B3h8W9fM.js","assets/ChevronDown-DDeoixaJ.js","assets/switch-BL5aJnqG.js","assets/textarea-D5nE7rMP.js","assets/checkbox-DnPlj3-W.js","assets/Eye-DHiUyPMS.js","assets/LinkExternal01-CPcvHi4V.js","assets/use-copy-ClKjk1Nz.js","assets/Key01-8wUzNiiB.js","assets/Plus-sSvDtP2D.js","assets/mcp-oauth-Cjq6PMkC.js","assets/Play-6woe_bCf.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,ad as o}from"./index-DgNLMhiy.js";import{R as m}from"./require-capability-ByiCIEvf.js";import"./use-capability-Cgr7yHYD.js";import"./access-gate-B6S-WMth.js";import"./capability-load-error-Bj6xKhKF.js";const n=i.lazy(()=>o(()=>import("./registry-layout-BljHeZAP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{r as $,G as Ne,K as re,b0 as dt,k as Oe,j as s,l as K,i as fe,B as ne,c as q,o as Pe,aw as Ie,s as se,ay as De,az as ke,m as $e,p as mt,n as ut,d as Fe,t as he,v as Re,a2 as Ke,W as ft,E as ht,b as gt,u as xt}from"./index-DgNLMhiy.js";import{u as pt}from"./use-organization-roles-BEuKNbP8.js";import{u as je}from"./use-org-auth-client-NLz6RBvg.js";import{B as ge}from"./badge-CxIGH9s7.js";import{f as Qe,a as qe,b as He,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-ClCDLHyi.js";import{a as bt,b as Et,D as Tt,c as _t}from"./dropdown-menu-Ctb60TB7.js";import{i as It}from"./DotsVertical-CB1RTV9h.js";import{s as Ae}from"./Plus-sSvDtP2D.js";import{s as Nt}from"./Trash01-YsCUBRvj.js";import{C as St}from"./collection-table-wrapper-DeKnxXxy.js";import{P as te}from"./index-CvxPzQfb.js";import{E as Ge}from"./empty-state-BS7npFnj.js";import{S as ve}from"./search-input-Cw7dukB_.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-DvmR_kCi.js";import{u as Ct}from"./use-infinite-scroll-DqqX0EF_.js";import{C as we}from"./checkbox-DnPlj3-W.js";import{b as At}from"./Settings02-B0ZT4yzH.js";import{u as Ot}from"./useSuspenseInfiniteQuery-Cgpvcam3.js";import{u as Rt,S as jt}from"./use-mcp-client-C62ZsAPE.js";import{C as vt}from"./collection-search-BHP0uS8b.js";import{u as nt}from"./use-members-B-1xXj0d.js";import{u as yt}from"./use-connection-C0zEwTpO.js";import{u as wt,d as Mt}from"./use-ai-providers-lTSdzFgc.js";import{A as lt}from"./avatar-BAkTMYHj.js";import{S as xe}from"./switch-BL5aJnqG.js";import{c as pe,T as be,a as Ee,b as Te}from"./tooltip-B3h8W9fM.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-CTfa0pnb.js";import{t as Lt}from"./ChevronDown-DDeoixaJ.js";import{i as Pt}from"./ChevronRight-Cc93D1fP.js";import{i as ze}from"./X-CAjmVwOR.js";import{a as Dt}from"./use-capability-Cgr7yHYD.js";import{A as kt}from"./access-gate-B6S-WMth.js";import"./ChevronUp-C2DYINXH.js";import"./table-77ubNeic.js";import"./SwitchHorizontal01-DTag6ZGf.js";import"./sidebar-C8N0hRhw.js";import"./LayoutLeft-DFSfhhoN.js";import"./use-mobile-CTYLPqKT.js";import"./sheet-B3x8ZiS-.js";import"./SearchMd-DcwBMfFO.js";import"./XCircle-D3nhMqns.js";import"./agent-icon-HIFEO6vs.js";import"./AlertCircle-DrgnpYmf.js";import"./Tool01-BUi-a5a2.js";import"./ArrowUpRight-CEF-CsVj.js";import"./ZapSquare-BDUSHcAn.js";import"./Users03-Cw_16vbZ.js";import"./CheckCircle-xbzaC4iQ.js";import"./Stars02-CgeR-sX4.js";import"./Eye-DHiUyPMS.js";import"./ZoomOut-BN-KB_0J.js";import"./Globe01-y8c9C4nH.js";import"./FilterLines-C174NPGB.js";import"./Star01-BwzFDtQr.js";import"./Globe04-v8yJBvO0.js";import"./HardDrive-vkw_bVtH.js";import"./Key01-8wUzNiiB.js";import"./LinkExternal01-CPcvHi4V.js";import"./Monitor01-DQ9B5dBT.js";import"./Sun-vVeG2mZ0.js";import"./Palette-BP0gnn-x.js";import"./Play-6woe_bCf.js";import"./SearchLg-BHGwQ11F.js";import"./Shield01-16ivhP9D.js";import"./Stars01-D_GgsBTV.js";import"./Upload01-CTPdQzyc.js";import"./User01-C4JQrjGt.js";import"./Users01-TIl6xBro.js";import"./XClose-B93vthJT.js";import"./Zap-8CUqVoBU.js";import"./auth-CxjVr2Fw.js";import"./use-collections-Bb5vIdWQ.js";import"./studio-tools-kXfq3pN5.js";import"./card-9jdGQNnr.js";import"./capability-load-error-Bj6xKhKF.js";const Me="basic-usage",Le=[{id:Me,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===Me)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===Me)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=q.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(we,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let N;return e[17]!==f||e[18]!==o||e[19]!==m?(N=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=N):N=e[20],N}function Yt(t){return t.stopPropagation()}function $t(t){const e=q.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(we,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Ne(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),N=100,T=h.trim(),E=T?{operator:"or",conditions:[{field:["title"],operator:"contains",value:T},{field:["description"],operator:"contains",value:T}]}:void 0,S=!!n,C={...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:0,...S&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:b,...S&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,H)=>Q+(H?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,w=x.current,A=[...w.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!w.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[M,z]=$.useState(G[0]?.id??null),y=M?G.find(b=>b.id===M)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",M??""),queryFn:async()=>M?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:M}})).structuredContent?.item??null:null,enabled:!!M,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],H=Q.includes(D),W={...t};if(H){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===M?F:[];if(!D.length)return;const Q=t[b]??[],H=D.map(ee=>ee.name),W=Q.length>0&&H.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=H,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=M===b.id,Q=D?F.length:0,H=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:H,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Se=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function qt(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Se.length;return Se[n]??Se[0]}function Ht(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function ot(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=q.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const N=x.map(m).filter(Jt);let T;e[12]!==n||e[13]!==i||e[14]!==r?(T=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==c||e[18]!==T?(E=Ye(n,c,T),e[16]=n,e[17]=c,e[18]=T,e[19]=E):E=e[19];let S;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(S=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=S):S=e[24];let C;e[25]!==E||e[26]!==S?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:E,onClick:S})})}),e[25]=E,e[26]=S,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,N.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):N.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=q.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[N,T]=$.useState(m),E=m||N,S=T,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==E||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=()=>S(cs),e[24]=w):w=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let M;e[36]!==E?(M=E?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=E,e[37]=M):M=e[37];let z;e[38]!==M||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,M]}),e[38]=M,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:w,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,E&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=E,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=q.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=Mt(n.id);let a,x,o,m,N;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){N=Symbol.for("react.early_return_sentinel");e:{let S;e[16]!==n.label?(S=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=S):S=e[17];const C=f.filter(hs).map(S),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){N=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let w;e[21]!==u?(w=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=w):w=e[22],e[23]!==w||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,w]}),e[23]=w,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=N}else a=e[11],x=e[12],o=e[13],m=e[14],N=e[15];if(N!==Symbol.for("react.early_return_sentinel"))return N;let T;e[26]!==a||e[27]!==x?(T=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=T):T=e[28];let E;return e[29]!==o||e[30]!==m||e[31]!==T?(E=s.jsxs("div",{className:o,children:[m,T]}),e[29]=o,e[30]=m,e[31]=T,e[32]=E):E=e[32],E}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=q.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=wt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(w=>w!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,N=!c&&"hover:bg-muted/50 cursor-pointer";let T;e[7]!==N?(T=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",N),e[7]=N,e[8]=T):T=e[8];let E;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(E=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=E):E=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=S):S=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==T||e[21]!==E||e[22]!==C?(v=s.jsxs("div",{className:T,onClick:E,children:[S,C]}),e[20]=T,e[21]=E,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=q.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,N,T,E,S,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const M=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],N=z,m=Qe,O=n,p=l,o=qe,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(He,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],S="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],T="flex-1 overflow-auto",E=M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:M.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(we,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(lt,{url:y.user?.image??void 0,fallback:ot(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=N,e[12]=T,e[13]=E,e[14]=S,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],N=e[11],T=e[12],E=e[13],S=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==T||e[30]!==E?(R=s.jsx("div",{className:T,children:E}),e[29]=T,e[30]=E,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==S||e[34]!==C?(I=s.jsxs("div",{className:S,children:[C,R]}),e[32]=R,e[33]=S,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,w=f.length>0&&`(${f.length})`;let A;e[37]!==N||e[38]!==u||e[39]!==w?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:N,disabled:u,children:["Add ",w]})]}),e[37]=N,e[38]=u,e[39]=w,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Es(t){const e=q.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,N;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);N="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(lt,{url:I.user?.image??void 0,fallback:ot(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Te,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=N}else o=e[7],m=e[8],N=e[9];let T;e[14]!==o||e[15]!==m?(T=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=T):T=e[16];let E;e[17]!==n||e[18]!==l?(E=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=E):E=e[19];let S;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==E?(S=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:E}),e[20]=h,e[21]=n,e[22]=c,e[23]=E,e[24]=S):S=e[24];let C;return e[25]!==N||e[26]!==T||e[27]!==S?(C=s.jsxs("div",{className:N,children:[T,S]}),e[25]=N,e[26]=T,e[27]=S,e[28]=C):C=e[28],C}function Ts(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Es,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ns(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ss(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ns(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=q.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Te,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=q.c(14),{locator:n}=Ne(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Ne(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,N=o.formState.isDirty,T=Fe({mutationFn:async u=>{const w=Ss(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const M=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!M.includes(L)),y=M.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,M=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:w,...M?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(M?U:B,M?B:void 0),M?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:w});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const M=await d.organization.updateMemberRole({memberId:B,role:[A]});if(M?.error)throw new Error(M.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,w)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!w.role.id&&!w.role.slug,k=w.role.slug==="owner"&&!w.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:w.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),E=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}T.mutate(u)}),S=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:S&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:T.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:E,disabled:T.isPending||!m||!N,children:T.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Ht(t.role):qt(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Ts,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=q.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function ws(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const Ms={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?Ms[t]??"bg-neutral-400":ws(t)}function Ps(){const t=q.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Ne(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let N;e:{if(!h){N=null;break e}if(h==="new"){N={kind:"new"};break e}if(h.startsWith("builtin-")){N={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);N=V?{kind:"custom",role:V}:null}const T=N;let E;t[5]!==c?(E=re.members(c),t[5]=c,t[6]=E):E=t[6];let S;t[7]!==g?(S=()=>g.organization.listMembers(),t[7]=g,t[8]=S):S=t[8];let C;t[9]!==E||t[10]!==S?(C={queryKey:E,queryFn:S},t[9]=E,t[10]=S,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),T?.kind==="custom"&&T.role.id===V&&m(void 0)},onError:zs});let w,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},w={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=w,t[27]=A,t[28]=k,t[29]=G):(w=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,w,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(bt,{children:[s.jsx(Et,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(It,{size:16})})}),s.jsx(Tt,{align:"end",onClick:Ds,children:s.jsxs(_t,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(Nt,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let M;t[31]!==m?(M=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=M):M=t[32];const z=M;if(T){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:T,onBack:P,onSaved:V},js(T))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(St,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let H;t[61]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ze,{children:"Delete Role"}),t[61]=H):H=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(He,{children:[H,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(qe,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function fl(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{fl as default};
@@ -1 +0,0 @@
1
- import{c as p,j as t,E as P,r as j,a2 as w,B as S,t as y}from"./index-DgNLMhiy.js";import{i as k}from"./AlertCircle-DrgnpYmf.js";import{s as z}from"./Plus-sSvDtP2D.js";import{s as E}from"./User01-C4JQrjGt.js";import{t as F}from"./Users01-TIl6xBro.js";import{e as $,d as I,c as O,a as A,b as R,D as T}from"./dialog-D_ieAQTy.js";import{I as N}from"./input-CjQtu1h5.js";import{L as g}from"./label-CyPUYQaT.js";import{d as B,S as V,a as L,b as q,c as C}from"./select-bneCBMXH.js";import{S as H}from"./skeleton-C5L5O22N.js";import{T as K}from"./textarea-D5nE7rMP.js";import{P as b}from"./index-CvxPzQfb.js";import{c as W}from"./settings-section-CTfa0pnb.js";import{u as Y,a as G}from"./use-secrets-CIN5lIiD.js";import{R as J}from"./require-capability-ByiCIEvf.js";import"./X-CAjmVwOR.js";import"./tooltip-B3h8W9fM.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./sidebar-C8N0hRhw.js";import"./LayoutLeft-DFSfhhoN.js";import"./use-mobile-CTYLPqKT.js";import"./sheet-B3x8ZiS-.js";import"./card-9jdGQNnr.js";import"./ArrowUpRight-CEF-CsVj.js";import"./studio-tools-kXfq3pN5.js";import"./use-capability-Cgr7yHYD.js";import"./access-gate-B6S-WMth.js";import"./capability-load-error-Bj6xKhKF.js";function M(s){const e=p.c(3),{error:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k,{size:16}),e[0]=c):c=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function Q(s){const e=p.c(5),{scope:r}=s,c=r==="user"?E:F,n=r==="user"?"Private":"Organization";let i;e[0]!==c?(i=t.jsx(c,{size:12}),e[0]=c,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=p.c(20),{secret:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(Q,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[c,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let o;e[15]!==l?(o=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=o):o=e[16];let x;return e[17]!==u||e[18]!==o?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,o]}),e[17]=u,e[18]=o,e[19]=x):x=e[19],x}function U(s){const e=p.c(5),{onCreate:r}=s;let c,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=c,e[1]=n):(c=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,c]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),o=G();function x(){c("organization"),i(""),d(""),l("")}function f(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await o.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),f()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):f()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>c(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:f,disabled:o.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:o.isPending||!n.trim()||!a,children:o.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=p.c(21),e=Y(),[r,c]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(U,{onCreate:()=>c(!0)}),s[0]=l):l=s[0];let o;return s[1]!==r?(o=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:c})]}),s[1]=r,s[2]=o):o=s[2],o}let n,i,a;if(s[3]!==e){const l=e.filter(se),o=e.filter(te),x=e.length===1?"":"s";let f;s[7]!==e.length||s[8]!==x?(f=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=f):f=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==f?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[f,m]}),s[12]=f,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=o.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:o.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:c}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=p.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(W,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(M,{error:e??new Error("Failed to load secrets")})}function Ie(){const s=p.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(J,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{Ie as default};
@@ -1 +0,0 @@
1
- import{r as i,a9 as nt,a7 as Pe,j as d,dv as rt,ab as be,a8 as k,dw as st,a4 as j,aa as N,bJ as $,dx as lt,ae as _e,dy as Ee,a5 as at,bE as ct,bL as it,dC as dt,dF as ut,dD as pt,dG as ft,dz as mt,a6 as ht,dE as vt,dA as gt,dB as xt,c as ee,l as oe}from"./index-DgNLMhiy.js";import{V as St}from"./tooltip-B3h8W9fM.js";import{i as wt,n as Ct}from"./ChevronUp-C2DYINXH.js";import{t as Re}from"./ChevronDown-DDeoixaJ.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[F,M]=i.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:b,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...c,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:N(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):c})});De.displayName=Oe;var _t="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,F]=i.useState(null),[M,re]=i.useState(null),_=k(e,f=>F(f)),[O,U]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),i.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const _=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=U.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-U.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=_.top+_.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[F,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(_=>{_&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:i.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:c,defaultValue:e})});Qe.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function io(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function mo(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{po as S,uo as a,fo as b,mo as c,io as d,Ne as e};
@@ -1 +0,0 @@
1
- import{c as T,j as t,r as Q,B as je,i as Se}from"./index-DgNLMhiy.js";import{i as be}from"./ChevronRight-Cc93D1fP.js";import{K as fe}from"./agent-icon-HIFEO6vs.js";import{S as ue}from"./scroll-area-DVEw9jTn.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-DmWg08s4.js";import{c as xe,v as ze}from"./index-DSNOu07Q.js";import{a as ge}from"./Tool01-BUi-a5a2.js";import"./AlertCircle-DrgnpYmf.js";import"./SwitchHorizontal01-DTag6ZGf.js";import"./Settings02-B0ZT4yzH.js";import"./XCircle-D3nhMqns.js";import"./ArrowUpRight-CEF-CsVj.js";import"./ZapSquare-BDUSHcAn.js";import"./Users03-Cw_16vbZ.js";import"./CheckCircle-xbzaC4iQ.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./DotsVertical-CB1RTV9h.js";import"./Stars02-CgeR-sX4.js";import"./Eye-DHiUyPMS.js";import"./ZoomOut-BN-KB_0J.js";import"./Globe01-y8c9C4nH.js";import"./FilterLines-C174NPGB.js";import"./Star01-BwzFDtQr.js";import"./Globe04-v8yJBvO0.js";import"./HardDrive-vkw_bVtH.js";import"./Key01-8wUzNiiB.js";import"./LayoutLeft-DFSfhhoN.js";import"./LinkExternal01-CPcvHi4V.js";import"./Monitor01-DQ9B5dBT.js";import"./Sun-vVeG2mZ0.js";import"./Palette-BP0gnn-x.js";import"./Play-6woe_bCf.js";import"./Plus-sSvDtP2D.js";import"./SearchLg-BHGwQ11F.js";import"./SearchMd-DcwBMfFO.js";import"./Shield01-16ivhP9D.js";import"./Stars01-D_GgsBTV.js";import"./Trash01-YsCUBRvj.js";import"./Upload01-CTPdQzyc.js";import"./User01-C4JQrjGt.js";import"./Users01-TIl6xBro.js";import"./XClose-B93vthJT.js";import"./X-CAjmVwOR.js";import"./Zap-8CUqVoBU.js";import"./use-clock-tick-D7gbCPid.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-ClKjk1Nz.js";import"./tooltip-B3h8W9fM.js";import"./file-type-icon-DALXnNwz.js";import"./dialog-D_ieAQTy.js";import"./use-mobile-CTYLPqKT.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-H_rr3OSP.js";import"./use-mcp-client-C62ZsAPE.js";import"./auth-CxjVr2Fw.js";import"./chat-context-OmrHZlWm.js";import"./hooks-ChlRS_Cr.js";import"./decopilot-sse-pool-BdE-V58A.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-D_g2q7bN.js";import"./use-collections-Bb5vIdWQ.js";import"./use-ai-providers-lTSdzFgc.js";import"./studio-tools-kXfq3pN5.js";import"./use-decopilot-events-CkQ3Rugh.js";import"./use-organization-settings-Dys1xzl0.js";import"./shell-layout-CSNtx2tN.js";import"./avatar-BAkTMYHj.js";import"./alert-dialog-ClCDLHyi.js";import"./required-auth-layout-B1_k8uZH.js";import"./use-org-sso-nbZu8iS1.js";import"./sheet-B3x8ZiS-.js";import"./integration-icon-DvmR_kCi.js";import"./use-navigate-to-agent-ZLpx01PW.js";import"./use-connection-C0zEwTpO.js";import"./use-mcp-prompts-F7AgPwEV.js";import"./form-DaxgojJl.js";import"./label-CyPUYQaT.js";import"./input-CjQtu1h5.js";import"./select-bneCBMXH.js";import"./switch-BL5aJnqG.js";import"./library-tab-CrasAutb.js";import"./drawer-BP70Rujn.js";import"./collection-search-BHP0uS8b.js";import"./tabs-Dh_kZG_m.js";import"./toggle-group-oUYd1Jxm.js";import"./agent-capabilities-BLdjNi42.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-MLfvU4EZ.js";import"./use-registry-connections-By0sWOC0.js";import"./useInfiniteQuery-YzbBhr0w.js";import"./use-infinite-scroll-DqqX0EF_.js";import"./extract-connection-data-RxV5HgFK.js";import"./card-9jdGQNnr.js";import"./collection-tabs-CvLerKx4.js";import"./badge-CxIGH9s7.js";import"./textarea-D5nE7rMP.js";import"./connection-form-helpers-oKSRt7Z9.js";import"./authenticate-and-persist-oauth-CZ-MLzKy.js";import"./mcp-oauth-Cjq6PMkC.js";import"./useSuspenseInfiniteQuery-Cgpvcam3.js";import"./connect-desktop-dialog-3SiI_mFd.js";import"./decopilot-xPgbGeJc.js";import"./checkbox-DnPlj3-W.js";import"./skeleton-C5L5O22N.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CTfa0pnb.js";import"./popover-Dk6C_xyw.js";import"./command-D9kK6qBS.js";import"./index-yloThw-p.js";import"./index-Bo5LvjuQ.js";import"./toolbar-BSesNl59.js";import"./use-debounced-value-BCxrmAGw.js";import"./dropdown-menu-Ctb60TB7.js";import"./index-CYTkc5bj.js";import"./question-004-sINsf4GQ.js";import"./task-row-LdEr6awi.js";import"./task-status-DNIO7fCq.js";import"./use-status-sounds-Bl8mPZM3.js";import"./empty-state-BS7npFnj.js";import"./use-mcp-tools-UjXU5ids.js";import"./use-capability-Cgr7yHYD.js";import"./tools-list-JC_5uk0t.js";import"./use-debounced-autosave-CEbGGyRe.js";import"./index-CvxPzQfb.js";import"./sidebar-C8N0hRhw.js";import"./search-input-Cw7dukB_.js";import"./github-repo-picker-CZI-ClVg.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CIN5lIiD.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-Da4GFxZS.js";import"./automation-runs-LATF_NNh.js";import"./table-77ubNeic.js";import"./use-members-B-1xXj0d.js";import"./use-org-auth-client-NLz6RBvg.js";import"./use-automations-1J-hXDhd.js";import"./use-file-configs-CxoqQtr4.js";import"./monaco-editor-kdhsccRw.js";import"./select-model-1JGm9WVZ.js";import"./automation-list-row-B57SiMbH.js";function K(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=K(n.title),i=K(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:K(n.description),image:K(n.image),favicon:K(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ke(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ti(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),U=o.kind==="page",ve=U?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=U?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!U||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ue),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=U&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ke,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ue(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Ti as SeoEditor};
@@ -1 +0,0 @@
1
- import{c as k,d as ee,j as n,B as C,bR as K,t as Y,a2 as pe,a as W,y as ke,q as ye,K as se,bS as Ne,bT as _e,L as B,r as H,k as te,bU as Ae,bV as Ce,b as Oe,G as Te,e as be,u as Ee,H as $e,aW as ze,bW as Me,bX as ue,bY as De,bZ as Ie,S as Le,O as Pe,b_ as Fe}from"./index-DgNLMhiy.js";import{A as oe}from"./avatar-BAkTMYHj.js";import{t as xe,a as Re}from"./Users03-Cw_16vbZ.js";import{i as qe}from"./SearchLg-BHGwQ11F.js";import{i as Ue,s as Ge,a as M,n as He}from"./Stars02-CgeR-sX4.js";import{s as Ke}from"./XClose-B93vthJT.js";import{i as I}from"./CheckCircle-xbzaC4iQ.js";import{i as me}from"./FilterLines-C174NPGB.js";import{i as G}from"./Zap-8CUqVoBU.js";import{d as Be,c as We,a as Ye,e as Je}from"./dialog-D_ieAQTy.js";import{b as Qe,c as Ve,d as Xe,a as Ze,e as et,g as tt,f as nt}from"./alert-dialog-ClCDLHyi.js";import{R as st}from"./required-auth-layout-B1_k8uZH.js";import{g as ot,c as it,A as at}from"./hooks-ChlRS_Cr.js";import{a as rt,m as lt,S as ct}from"./use-mcp-client-C62ZsAPE.js";import{q as dt}from"./tab-id-CLpu897Q.js";import{c as ut}from"./use-organization-settings-Dys1xzl0.js";import{u as mt}from"./use-org-sso-nbZu8iS1.js";function ft(t){const e=k.c(27),{orgName:s,orgSlug:o,orgLogo:a,domain:r}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??o}`},onError:gt},e[0]=o,e[1]=i):i=e[1];const l=ee(i),d=ht;let c;e[2]!==a||e[3]!==s?(c=a?n.jsx(oe,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=a,e[3]=s,e[4]=c):c=e[4];let u;e[5]!==s?(u=n.jsxs("h3",{className:"text-lg font-medium",children:["Join ",s,"?"]}),e[5]=s,e[6]=u):u=e[6];let m;e[7]!==r?(m=n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",n.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let f;e[9]!==u||e[10]!==m?(f=n.jsxs("div",{className:"space-y-2",children:[u,m]}),e[9]=u,e[10]=m,e[11]=f):f=e[11];let y;e[12]!==l?(y=()=>l.mutate(),e[12]=l,e[13]=y):y=e[13];const g=l.isPending?"Joining…":`Enter ${s}`;let h;e[14]!==l.isPending||e[15]!==y||e[16]!==g?(h=n.jsx(C,{onClick:y,disabled:l.isPending,children:g}),e[14]=l.isPending,e[15]=y,e[16]=g,e[17]=h):h=e[17];let p;e[18]!==l.isPending?(p=n.jsx(C,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=p):p=e[19];let b;e[20]!==h||e[21]!==p?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[20]=h,e[21]=p,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==f?(S=n.jsxs(K,{children:[c,f,b]}),e[23]=b,e[24]=c,e[25]=f,e[26]=S):S=e[26],S}function ht(){window.location.href="/"}function gt(t){Y.error(t instanceof Error?t.message:"Failed to join organization")}function fe(t){const e=k.c(17),{orgSlug:s,orgName:o,reason:a}=t,r=pt,i=a==="not-found",l=i?qe:pe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==s?(c=i?n.jsxs(n.Fragment,{children:["We couldn't find an organization called ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:["You don't have access to ",n.jsx("strong",{children:o??s}),".",n.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=o,e[2]=s,e[3]=c):c=e[3];const u=c;let m;e[4]!==l?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let f;e[6]!==d?(f=n.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=f):f=e[7];let y;e[8]!==u?(y=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[8]=u,e[9]=y):y=e[9];let g;e[10]!==f||e[11]!==y?(g=n.jsxs("div",{className:"space-y-2",children:[f,y]}),e[10]=f,e[11]=y,e[12]=g):g=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(C,{onClick:r,children:"Go to home"}),e[13]=h):h=e[13];let p;return e[14]!==m||e[15]!==g?(p=n.jsxs(K,{children:[m,g,h]}),e[14]=m,e[15]=g,e[16]=p):p=e[16],p}function pt(){window.location.href="/"}function yt(t){const e=k.c(39),{invitationId:s,orgName:o,orgSlug:a,orgLogo:r}=t;let i;e[0]!==s?(i=async()=>{const _=await W.organization.acceptInvitation({invitationId:s});if(_.error)throw new Error(_.error.message);return _.data},e[0]=s,e[1]=i):i=e[1];let l;e[2]!==a?(l=()=>{ke(),window.location.href=`/${a}`},e[2]=a,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:wt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=ee(d);let u;e[7]!==s?(u=async()=>{const _=await W.organization.rejectInvitation({invitationId:s});if(_.error)throw new Error(_.error.message);return _.data},e[7]=s,e[8]=u):u=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=xt,e[9]=m):m=e[9];let f;e[10]!==u?(f={mutationFn:u,onSuccess:m,onError:bt},e[10]=u,e[11]=f):f=e[11];const y=ee(f),g=c.isPending||y.isPending;let h;e[12]!==r||e[13]!==o?(h=r?n.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ue,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=h):h=e[14];let p;e[15]!==o?(p=n.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",n.jsx("strong",{children:o})]}),e[15]=o,e[16]=p):p=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==p?(S=n.jsxs("div",{className:"space-y-2",children:[p,b]}),e[18]=p,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==g||e[23]!==x||e[24]!==v?(N=n.jsx(C,{onClick:x,disabled:g,children:v}),e[22]=g,e[23]=x,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==y?(T=()=>y.mutate(),e[26]=y,e[27]=T):T=e[27];const $=y.isPending?"Declining…":"Decline";let w;e[28]!==g||e[29]!==T||e[30]!==$?(w=n.jsx(C,{variant:"ghost",onClick:T,disabled:g,children:$}),e[28]=g,e[29]=T,e[30]=$,e[31]=w):w=e[31];let E;e[32]!==N||e[33]!==w?(E=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,w]}),e[32]=N,e[33]=w,e[34]=E):E=e[34];let z;return e[35]!==S||e[36]!==E||e[37]!==h?(z=n.jsxs(K,{children:[h,S,E]}),e[35]=S,e[36]=E,e[37]=h,e[38]=z):z=e[38],z}function bt(t){Y.error(t instanceof Error?t.message:"Failed to decline invitation")}function xt(){Y.success("Invitation declined"),window.location.href="/"}function wt(t){Y.error(t instanceof Error?t.message:"Failed to accept invitation")}function St(t){const e=k.c(10),{orgName:s,orgLogo:o}=t;let a;e[0]!==o||e[1]!==s?(a=o?n.jsx(oe,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ge,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=s,e[2]=a):a=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let i;e[4]!==s?(i=n.jsxs("div",{className:"space-y-2",children:[r,n.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",n.jsx("strong",{children:s})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=s,e[5]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(C,{variant:"ghost",onClick:jt,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==i?(d=n.jsxs(K,{children:[a,i,l]}),e[7]=a,e[8]=i,e[9]=d):d=e[9],d}function jt(){window.location.href="/"}function vt(t){const e=k.c(30),{orgName:s,orgSlug:o,orgLogo:a,domain:r}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=_t,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:Nt},e[3]=i,e[4]=d):d=e[4];const c=ee(d);let u;e[5]!==a||e[6]!==s?(u=a?n.jsx(oe,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[5]=a,e[6]=s,e[7]=u):u=e[7];let m;e[8]!==s?(m=n.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",s,"?"]}),e[8]=s,e[9]=m):m=e[9];let f;e[10]!==r?(f=n.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",n.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=f):f=e[11];let y;e[12]!==m||e[13]!==f?(y=n.jsxs("div",{className:"space-y-2",children:[m,f]}),e[12]=m,e[13]=f,e[14]=y):y=e[14];let g;e[15]!==c?(g=()=>c.mutate(),e[15]=c,e[16]=g):g=e[16];const h=c.isPending?"Requesting…":"Request to join";let p;e[17]!==c.isPending||e[18]!==g||e[19]!==h?(p=n.jsx(C,{onClick:g,disabled:c.isPending,children:h}),e[17]=c.isPending,e[18]=g,e[19]=h,e[20]=p):p=e[20];let b;e[21]!==c.isPending?(b=n.jsx(C,{variant:"ghost",onClick:kt,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=b):b=e[22];let S;e[23]!==p||e[24]!==b?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,b]}),e[23]=p,e[24]=b,e[25]=S):S=e[25];let x;return e[26]!==S||e[27]!==u||e[28]!==y?(x=n.jsxs(K,{children:[u,y,S]}),e[26]=S,e[27]=u,e[28]=y,e[29]=x):x=e[29],x}function kt(){window.location.href="/"}function Nt(t){Y.error(t instanceof Error?t.message:"Failed to request access")}function _t(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function At(t){const e=k.c(7);let s;e[0]!==t?(s=se.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let a;return e[4]!==s||e[5]!==o?(a={queryKey:s,queryFn:o,refetchOnWindowFocus:!1},e[4]=s,e[5]=o,e[6]=a):a=e[6],ye(a)}function Ct({orgSlug:t}){const{data:e}=At(t);if(e.status!=="member"){Ne()?.org===t&&_e();const s=localStorage.getItem(B.lastOrgSlug())===t;if(s&&localStorage.removeItem(B.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(fe,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(yt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ft,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(vt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(St,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(fe,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ot(t){const e=k.c(20),{release:s,onCtaClick:o,onLearnMoreClick:a}=t;let r;e[0]!==s.eyebrow?(r=s.eyebrow&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s.eyebrow}),e[0]=s.eyebrow,e[1]=r):r=e[1];let i;e[2]!==s.title?(i=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s.title}),e[2]=s.title,e[3]=i):i=e[3];let l;e[4]!==r||e[5]!==i?(l=n.jsxs("div",{children:[r,i]}),e[4]=r,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==s.bullets?(d=s.bullets.map(Tt),e[7]=s.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=n.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let u;e[11]!==o||e[12]!==a||e[13]!==s.cta||e[14]!==s.learnMoreHref?(u=(s.cta||s.learnMoreHref)&&n.jsxs("div",{className:"flex items-center justify-between pt-1",children:[s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:a,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):n.jsx("span",{}),s.cta&&n.jsx(C,{asChild:!0,size:"sm",onClick:o,children:n.jsx("a",{href:s.cta.href,children:s.cta.label})})]}),e[11]=o,e[12]=a,e[13]=s.cta,e[14]=s.learnMoreHref,e[15]=u):u=e[15];let m;return e[16]!==l||e[17]!==c||e[18]!==u?(m=n.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,u]}),e[16]=l,e[17]=c,e[18]=u,e[19]=m):m=e[19],m}function Tt(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const we=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:M,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:I,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:M,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:I,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:I,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:M,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:M,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:I,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:M,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:I,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:M,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:me,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:I,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Re,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:I,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:M,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:me,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:M,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:He,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ne="studio.release-feed.v1",ce=new Set;let L="",P={},de=!1;function Et(){if(de)return L||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return L||"{}"}}function Se(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function he(){const t=Et();return t!==L&&(L=t,P=Se(t)),P}function $t(t){ce.add(t);const e=s=>{if(!(s.key!==ne&&s.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...Se(o),...P};P=r,L=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function zt(t){P=t,L=JSON.stringify(t);try{localStorage.setItem(ne,L),de=!1}catch{de=!0}ce.forEach(e=>e())}function Mt(){const t=k.c(7),e=H.useSyncExternalStore($t,he,he);let s;t[0]!==e?(s=d=>!!e[d],t[0]=e,t[1]=s):s=t[1];const o=s,a=Dt;let r;t[2]!==e?(r=we.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:a,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function Dt(t){P[t]||zt({...P,[t]:{seenAt:new Date().toISOString()}})}const It=720*60*60*1e3,Lt=10080*60*1e3;function Pt(t){const[e,s,o]=t.split("-").map(Number);return!e||!s||!o?new Date(t).getTime():new Date(e,s-1,o).getTime()}function Ft(t){const e=we[0];if(!e)return null;const s=Pt(e.date),o=t-s;return o<0||o>It?null:e}function Rt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function qt(t,e){const s=Rt(t);return s===null?!1:e-s>=Lt}function Ut(){const t=k.c(22),{data:e}=W.useSession(),{isSeen:s,markSeen:o}=Mt();let a,r,i;if(t[0]!==s||t[1]!==e?.user?.createdAt){i=Symbol.for("react.early_return_sentinel");e:{const g=Date.now();if(a=Ft(g),!a){i=null;break e}if(!qt(e?.user?.createdAt,g)){i=null;break e}r=s(a.id)}t[0]=s,t[1]=e?.user?.createdAt,t[2]=a,t[3]=r,t[4]=i}else a=t[2],r=t[3],i=t[4];if(i!==Symbol.for("react.early_return_sentinel"))return i;if(r)return null;let l;t[5]!==a.id||t[6]!==o?(l=()=>o(a.id),t[5]=a.id,t[6]=o,t[7]=l):l=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Ke,{size:14}),t[8]=d):d=t[8];let c;t[9]!==l?(c=n.jsx(C,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:d}),t[9]=l,t[10]=c):c=t[10];let u,m;t[11]!==a.id||t[12]!==o?(u=()=>o(a.id),m=()=>o(a.id),t[11]=a.id,t[12]=o,t[13]=u,t[14]=m):(u=t[13],m=t[14]);let f;t[15]!==a||t[16]!==u||t[17]!==m?(f=n.jsx(Ot,{release:a,onCtaClick:u,onLearnMoreClick:m}),t[15]=a,t[16]=u,t[17]=m,t[18]=f):f=t[18];let y;return t[19]!==c||t[20]!==f?(y=n.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[c,f]}),t[19]=c,t[20]=f,t[21]=y):y=t[21],y}const je=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),D=je?"⌘":"Ctrl",O={keyboardShortcuts:{keys:[D,"K"],description:"Keyboard shortcuts"},back:{keys:[D,"["],description:"Back to previous"},focusChatInput:{keys:[D,"L"],description:"Focus chat input"},saveAndFormat:{keys:[D,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[D,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[D,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",D,"S"],description:"New task"},toggleDaemon:{keys:[D,"D"],description:"Toggle daemon logs"}},Gt=[{label:"General",shortcuts:[O.keyboardShortcuts,O.back,O.newTask,O.toggleDaemon]},{label:"Editor",shortcuts:[O.saveAndFormat]},{label:"Chat",shortcuts:[O.focusChatInput,O.togglePlanMode,O.sendMessage,O.newLine]},{label:"Questions",shortcuts:[O.selectOption]},{label:"Monitoring",shortcuts:[O.applyFilter]}];function ge(t){return je?t.metaKey:t.ctrlKey}function Ht(t){const e=k.c(5),{open:s,onOpenChange:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(We,{children:n.jsx(Ye,{children:"Keyboard Shortcuts"})}),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs(Be,{className:"sm:max-w-md",children:[a,n.jsx("div",{className:"flex flex-col gap-4",children:Gt.map(Kt)})]}),e[1]=r):r=e[1];let i;return e[2]!==o||e[3]!==s?(i=n.jsx(Je,{open:s,onOpenChange:o,children:r}),e[2]=o,e[3]=s,e[4]=i):i=e[4],i}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Bt)})]},t.label)}function Bt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Wt)})]},t.description)}function Wt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Yt=300*1e3,Jt=2;function Qt(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Vt(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:Zt,refetchInterval:Yt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:s,dataUpdatedAt:o}=te(e),[a,r]=H.useState(0);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={version:null,count:0},t[1]=i):i=t[1];const[l,d]=H.useState(i);o!==a&&(r(o),d(y=>Qt(y,s,"4.21.0")));const c=l.count>=Jt;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(Qe,{children:[n.jsx(Ve,{children:"A new version is available"}),n.jsx(Xe,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=u):u=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(Ze,{children:[u,n.jsx(et,{children:n.jsx(tt,{onClick:Xt,children:"Refresh"})})]}),t[3]=m):m=t[3];let f;return t[4]!==c?(f=n.jsx(nt,{open:c,children:m}),t[4]=c,t[5]=f):f=t[5],f}function Xt(){return window.location.reload()}async function Zt(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function en({activeOrg:t}){return t&&(Ae(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ce()),null}function tn(t,e,s){if(!s)return null;const o=ot(t,e);return o?o.threads.get().find(r=>r.id===s)?.branch??null:null}function ve(t){return{queryKey:se.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Cn(t){const e=k.c(10);let s;e[0]!==t?(s=ve(t),e[0]=t,e[1]=s):s=e[1];const o=te(s);let a;e[2]!==o.data?.prompts?(a=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=a):a=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==o.isLoading||e[7]!==a||e[8]!==r?(i={isLoading:o.isLoading,prompts:a,tiles:r},e[6]=o.isLoading,e[7]=a,e[8]=r,e[9]=i):i=e[9],i}function nn(t){const e=k.c(17),{orgSlug:s,orgName:o,domain:a}=t;let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const i=r,l=sn;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let u;e[4]!==a||e[5]!==o?(u=o?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:o})," requires SSO authentication",a?` via ${a}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=a,e[5]=o,e[6]=u):u=e[6];let m;e[7]!==u?(m=n.jsxs("div",{className:"space-y-2",children:[c,n.jsx("p",{className:"text-sm text-muted-foreground",children:u})]}),e[7]=u,e[8]=m):m=e[8];let f;e[9]!==i?(f=n.jsx(C,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=f):f=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(C,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=y):y=e[11];let g;e[12]!==f?(g=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[12]=f,e[13]=g):g=e[13];let h;return e[14]!==m||e[15]!==g?(h=n.jsxs(K,{children:[d,m,g]}),e[14]=m,e[15]=g,e[16]=h):h=e[16],h}function sn(){window.location.href="/"}function on(t){const e=k.c(8),{org:s,children:o}=t,r=ut(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==s||e[6]!==l?(d=n.jsx(Fe,{org:s,project:l,children:o}),e[4]=o,e[5]=s,e[6]=l,e[7]=d):d=e[7],d}function an(){const t=Oe(),e=it(),{org:s,locator:o}=Te(),a=be({strict:!1}),r=Ee({strict:!1}),i=a.org??"",l=a.taskId??"",d=(h,p,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:h},search:p,replace:b}),c=(h,p=!0)=>d(l,h,p),u=h=>c(p=>({...p,chat:h?1:0})),m=(h,p,b)=>d(h,S=>{const x={chat:1};if(p?x.virtualmcpid=p:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid),b?.main)x.main=b.main;else{const v=S.main;v&&typeof v=="string"&&!dt(v)&&(x.main=v)}return b?.autosend&&(x.autosend=at),x},!1);return{setChatOpen:u,setTaskId:m,createNewTask:async h=>{const p=crypto.randomUUID(),b=h??r.virtualmcpid??rt(s.id).id,x=b===r.virtualmcpid?tn(s.slug,o,l):null;try{await e?.create({id:p,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}m(p,b)},openTab:h=>d(l||crypto.randomUUID(),p=>({...p,main:h})),toggleMain:()=>c(h=>{if(h.main!==void 0&&h.main!=="0")return{...h,main:"0"};const b={...h};return delete b.main,b})}}function rn(){const t=k.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=$e(e)?.params.org;let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const{taskId:r}=be(a),[i,l]=H.useState(!1),d=ze(),c=o??"";let u;t[2]!==c?(u=ve(c),t[2]=c,t[3]=u):u=t[3];const m=!!o&&!r;let f;t[4]!==u||t[5]!==m?(f={...u,enabled:m},t[4]=u,t[5]=m,t[6]=f):f=t[6],te(f);const{data:y}=W.useSession(),g=y?.user?.id;let h;t[7]!==o||t[8]!==g?(h=o&&g?Me(g,o):null,t[7]=o,t[8]=g,t[9]=h):h=t[9];const p=h;let b,S;t[10]!==d?(b=()=>{const j=A=>{if(ge(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ge(A)&&A.code==="BracketLeft"&&d.history.canGoBack()&&(A.preventDefault(),d.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},S=[d],t[10]=d,t[11]=b,t[12]=S):(b=t[11],S=t[12]),H.useEffect(b,S);let x;t[13]!==o?(x=se.activeOrganization(o),t[13]=o,t[14]=x):x=t[14];let v;t[15]!==o||t[16]!==g?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await W.organization.getFullOrganization({query:{organizationSlug:o}}).finally(ln),A=ue(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),g&&j&&Ie(g,o,j),j},t[15]=o,t[16]=g,t[17]=v):v=t[17];const N=p?p.data:void 0,T=p?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==x?($={queryKey:x,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=x,t[22]=$):$=t[22];const{data:w}=ye($),E=w?.id,z=w?.slug,{data:_}=mt(E,z),ie=E??"",ae=z??"";let F;t[23]!==ie||t[24]!==ae?(F=lt({connectionId:ct,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!z;let J;if(t[26]!==F||t[27]!==re?(J={...F,enabled:re},t[26]=F,t[27]=re,t[28]=J):J=t[28],te(J),!w){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Le,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=n.jsx(H.Suspense,{fallback:j,children:n.jsx(Ct,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(ue(w)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==w.name?(j=n.jsx(De,{orgName:w.name}),t[32]=w.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==w.id||t[35]!==w.name||t[36]!==w.slug||t[37]!==_.domain?(j=n.jsx(nn,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:_.domain}),t[34]=w.id,t[35]=w.name,t[36]=w.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=w.logo??null;let R;t[39]!==w||t[40]!==le?(R={...w,logo:le},t[39]=w,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==w?(q=n.jsx(en,{activeOrg:w}),t[42]=w,t[43]=q):q=t[43];let Q,V;t[44]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(Pe,{}),V=n.jsx(Ut,{}),t[44]=Q,t[45]=V):(Q=t[44],V=t[45]);let U;t[46]!==i?(U=n.jsx(Ht,{open:i,onOpenChange:l}),t[46]=i,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(Vt,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=n.jsxs(on,{org:R,children:[q,Q,V,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function ln(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function cn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{children:n.jsx(rn,{})}),t[0]=e):e=t[0],e}const On=Object.freeze(Object.defineProperty({__proto__:null,default:cn,usePanelActions:an},Symbol.toStringTag,{value:"Module"}));export{O as K,we as R,Ot as a,an as b,Cn as c,ve as h,ge as i,tn as r,On as s,Mt as u};
@@ -1 +0,0 @@
1
- import{G as D,r as j,j as e,B as p,v as S,t as c,c as N}from"./index-DgNLMhiy.js";import{D as k}from"./domain-settings-ByTW2skH.js";import{P as f}from"./index-CvxPzQfb.js";import{I as l}from"./input-CjQtu1h5.js";import{S as z}from"./switch-BL5aJnqG.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-nbZu8iS1.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-CTfa0pnb.js";import{s as L}from"./Trash01-YsCUBRvj.js";import{R as q}from"./require-capability-ByiCIEvf.js";import"./studio-tools-kXfq3pN5.js";import"./badge-CxIGH9s7.js";import"./select-bneCBMXH.js";import"./tooltip-B3h8W9fM.js";import"./ChevronUp-C2DYINXH.js";import"./ChevronDown-DDeoixaJ.js";import"./sidebar-C8N0hRhw.js";import"./LayoutLeft-DFSfhhoN.js";import"./use-mobile-CTYLPqKT.js";import"./sheet-B3x8ZiS-.js";import"./X-CAjmVwOR.js";import"./card-9jdGQNnr.js";import"./ArrowUpRight-CEF-CsVj.js";import"./use-capability-Cgr7yHYD.js";import"./access-gate-B6S-WMth.js";import"./capability-load-error-Bj6xKhKF.js";function B(){const{org:s}=D(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),v=T(s.id,s.slug),[t,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
@@ -1 +0,0 @@
1
- import{c as D,j as s,E as le,r as K,G as ae,m as ce,b as de,e as me,B as Y,v as te,K as fe,d as ge,t as ie}from"./index-DgNLMhiy.js";import{i as ue}from"./AlertCircle-DrgnpYmf.js";import{i as pe}from"./ChevronRight-Cc93D1fP.js";import{s as xe}from"./Plus-sSvDtP2D.js";import{s as he}from"./Trash01-YsCUBRvj.js";import{I as X}from"./input-CjQtu1h5.js";import{S as oe}from"./switch-BL5aJnqG.js";import{S as ye}from"./skeleton-C5L5O22N.js";import{A as ne}from"./avatar-BAkTMYHj.js";import{P as je,a as Ce,b as ve}from"./popover-Dk6C_xyw.js";import{b as re}from"./use-connection-C0zEwTpO.js";import{W as Z}from"./use-mcp-client-C62ZsAPE.js";import{P as G}from"./index-CvxPzQfb.js";import{u as Se}from"./use-registry-connections-By0sWOC0.js";import{f as _e,g as be}from"./use-organization-settings-Dys1xzl0.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-CTfa0pnb.js";import{R as Re}from"./require-capability-ByiCIEvf.js";import"./User01-C4JQrjGt.js";import"./use-collections-Bb5vIdWQ.js";import"./auth-CxjVr2Fw.js";import"./sidebar-C8N0hRhw.js";import"./LayoutLeft-DFSfhhoN.js";import"./use-mobile-CTYLPqKT.js";import"./sheet-B3x8ZiS-.js";import"./X-CAjmVwOR.js";import"./tooltip-B3h8W9fM.js";import"./studio-tools-kXfq3pN5.js";import"./card-9jdGQNnr.js";import"./ArrowUpRight-CEF-CsVj.js";import"./use-capability-Cgr7yHYD.js";import"./access-gate-B6S-WMth.js";import"./capability-load-error-Bj6xKhKF.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ut(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ut as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BljHeZAP.js","assets/index-DgNLMhiy.js","assets/index-B1I1Oi0g.css","assets/XCircle-D3nhMqns.js","assets/CheckCircle-xbzaC4iQ.js","assets/Settings02-B0ZT4yzH.js","assets/use-mcp-client-C62ZsAPE.js","assets/auth-CxjVr2Fw.js","assets/useInfiniteQuery-YzbBhr0w.js","assets/use-infinite-scroll-DqqX0EF_.js","assets/studio-tools-kXfq3pN5.js","assets/badge-CxIGH9s7.js","assets/input-CjQtu1h5.js","assets/dropdown-menu-Ctb60TB7.js","assets/ChevronUp-C2DYINXH.js","assets/ChevronRight-Cc93D1fP.js","assets/DotsVertical-CB1RTV9h.js","assets/table-77ubNeic.js","assets/toggle-group-oUYd1Jxm.js","assets/use-view-mode-DE98MrNw.js","assets/use-mobile-CTYLPqKT.js","assets/FilterLines-C174NPGB.js","assets/Globe01-y8c9C4nH.js","assets/SearchMd-DcwBMfFO.js","assets/dialog-D_ieAQTy.js","assets/X-CAjmVwOR.js","assets/AlertCircle-DrgnpYmf.js","assets/Upload01-CTPdQzyc.js","assets/alert-dialog-ClCDLHyi.js","assets/card-9jdGQNnr.js","assets/Trash01-YsCUBRvj.js","assets/label-CyPUYQaT.js","assets/select-bneCBMXH.js","assets/tooltip-B3h8W9fM.js","assets/ChevronDown-DDeoixaJ.js","assets/switch-BL5aJnqG.js","assets/textarea-D5nE7rMP.js","assets/checkbox-DnPlj3-W.js","assets/Eye-DHiUyPMS.js","assets/LinkExternal01-CPcvHi4V.js","assets/use-copy-ClKjk1Nz.js","assets/Key01-8wUzNiiB.js","assets/Plus-sSvDtP2D.js","assets/mcp-oauth-Cjq6PMkC.js","assets/Play-6woe_bCf.js"])))=>i.map(i=>d[i]);
2
- import{c as m,b as n,e as c,j as t,i as p,r as l,ad as f}from"./index-DgNLMhiy.js";import{R as u}from"./require-capability-ByiCIEvf.js";import"./use-capability-Cgr7yHYD.js";import"./access-gate-B6S-WMth.js";import"./capability-load-error-Bj6xKhKF.js";const g=l.lazy(()=>f(()=>import("./registry-layout-BljHeZAP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{c as $,l as y,j as t,af as G}from"./index-DgNLMhiy.js";import{i as K}from"./Zap-8CUqVoBU.js";import{T as U,a as V,b as W}from"./tooltip-B3h8W9fM.js";import{a as q}from"./use-virtual-mcp-D_g2q7bN.js";import{A as H}from"./agent-icon-HIFEO6vs.js";import{g as J}from"./task-status-DNIO7fCq.js";import{u as L,f as O}from"./use-clock-tick-D7gbCPid.js";import{a as Q}from"./agent-capabilities-BLdjNi42.js";function X(v){return v==="ephemeral"||v.startsWith("thread:")}function re(v){const e=$.c(40),{task:s,isActive:b,onClick:o,onArchive:h,showAutomationBadge:I,showAgentIcon:w,hideStatusIdle:S,indented:B}=v,A=J(s.status),D=A.icon,j=s.metadata?.kind==="tool_call_run",i=q(j?void 0:s.virtual_mcp_id);let k;e[0]!==i?(k=Q(i),e[0]=i,e[1]=k):k=e[1];const x=k;L(6e4);const T=I||!!s.trigger_id,E=s.id,F="button",M=0;let r;e[2]!==o?(r=n=>{n.target===n.currentTarget&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),o())},e[2]=o,e[3]=r):r=e[3];const _=B?"-ml-4 pl-6":"pl-2",C=b?"bg-accent text-accent-foreground":"hover:bg-accent/60";let a;e[4]!==_||e[5]!==C?(a=y("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",_,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=_,e[5]=C,e[6]=a):a=e[6];let l;e[7]!==j||e[8]!==w||e[9]!==i?.icon||e[10]!==i?.title?(l=w&&!j&&t.jsx(H,{icon:i?.icon??null,name:i?.title??"?",size:"2xs"}),e[7]=j,e[8]=w,e[9]=i?.icon,e[10]=i?.title,e[11]=l):l=e[11];let c;e[12]!==T?(c=T&&t.jsx(K,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=T,e[13]=c):c=e[13];const z=s.title||"Untitled task";let d;e[14]!==z?(d=t.jsx("div",{className:"text-sm text-foreground truncate",children:z}),e[14]=z,e[15]=d):d=e[15];let u;e[16]!==c||e[17]!==d?(u=t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[c,d]}),e[16]=c,e[17]=d,e[18]=u):u=e[18];let m;e[19]!==x||e[20]!==b||e[21]!==s.branch||e[22]!==s.updated_at?(m=s.updated_at&&t.jsxs("div",{className:y("flex items-center gap-1 text-[11px] min-w-0",b?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!X(s.branch)?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"truncate font-mono",children:s.branch}),t.jsx("span",{className:"shrink-0",children:"·"})]}):x?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),t.jsx("span",{className:"shrink-0",children:"·"})]}):null,t.jsx("span",{className:"shrink-0",children:O(new Date(s.updated_at))})]}),e[19]=x,e[20]=b,e[21]=s.branch,e[22]=s.updated_at,e[23]=m):m=e[23];let p;e[24]!==u||e[25]!==m?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,m]}),e[24]=u,e[25]=m,e[26]=p):p=e[26];const P="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!S&&t.jsx("span",{className:y("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",h&&"group-hover/row:opacity-0"),"aria-label":A.label,children:t.jsx(D,{size:14,className:y(A.iconClassName,s.status==="in_progress"&&"animate-spin")})});let f;e[27]!==h?(f=h&&t.jsxs(U,{children:[t.jsx(V,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":"Archive task",onClick:n=>{n.stopPropagation(),h()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:t.jsx(G,{size:14})})}),t.jsx(W,{side:"right",children:"Archive"})]}),e[27]=h,e[28]=f):f=e[28];let g;e[29]!==R||e[30]!==f?(g=t.jsxs("div",{className:P,children:[R,f]}),e[29]=R,e[30]=f,e[31]=g):g=e[31];let N;return e[32]!==o||e[33]!==p||e[34]!==g||e[35]!==r||e[36]!==a||e[37]!==l||e[38]!==s.id?(N=t.jsxs("div",{"data-task-id":E,role:F,tabIndex:M,onClick:o,onKeyDown:r,className:a,children:[l,p,g]}),e[32]=o,e[33]=p,e[34]=g,e[35]=r,e[36]=a,e[37]=l,e[38]=s.id,e[39]=N):N=e[39],N}export{re as T};
@@ -1 +0,0 @@
1
- import{i as o}from"./AlertCircle-DrgnpYmf.js";import{i as t}from"./CheckCircle-xbzaC4iQ.js";import{a as r}from"./DotsVertical-CB1RTV9h.js";import{ar as a}from"./agent-icon-HIFEO6vs.js";import{i as n}from"./index-DgNLMhiy.js";import{a as l}from"./XCircle-D3nhMqns.js";const i={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:l,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:n,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return i[e??"completed"]??m}export{i as S,x as g};
@@ -1 +0,0 @@
1
- import{c as U,G as q,K as T,k as I,m as x,d as y,t as m}from"./index-DgNLMhiy.js";import{S as z,u as J}from"./use-mcp-client-C62ZsAPE.js";import{u as k}from"./studio-tools-kXfq3pN5.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],I(r)}function it(t){const e=U.c(9),{org:s}=q(),l=k();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],I(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=k();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],I(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=k();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],I(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=k(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const Q=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const j=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==j||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==Q?(M={create:D,update:Q,remove:j,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=j,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=Q,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
@@ -1 +0,0 @@
1
- import{d as a}from"./differenceInSeconds-NQ4PDo0z.js";import{c as u,r as f}from"./index-DgNLMhiy.js";function p(r){const t=a(new Date,r);return t<60?"<1m":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:t<2592e3?`${Math.floor(t/604800)}w ago`:t<31536e3?`${Math.floor(t/2592e3)}mo ago`:`${Math.floor(t/31536e3)}y ago`}function g(r){if(r==null||r==="")return null;const t=r instanceof Date?r.getTime():Date.parse(r);return Number.isFinite(t)?t:null}function h(r,t){const e=t-r;return e>0?e:0}function M(r){if(r<60)return`${r.toFixed(1)}s`;const t=Math.round(r%60*10)/10,e=t>=60?1:0;return`${Math.floor(r/60)+e}m ${(e?0:t).toFixed(1)}s`}const s=new Map;function i(r){let t=s.get(r);return t||(t={tick:0,subscribers:new Set,intervalId:null},s.set(r,t)),t}function l(r,t){const e=i(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.tick+=1;for(const n of e.subscribers)n()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function $(r){const t=u.c(3),e=r===void 0?6e4:r;let n,o;return t[0]!==e?(n=c=>l(e,c),o=()=>i(e).tick,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),f.useSyncExternalStore(n,o,m)}function m(){return 0}export{M as a,h as c,p as f,g as t,$ as u};