decocms 4.61.2 → 4.63.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 (292) hide show
  1. package/dist/client/assets/{AlertCircle-BsA2wZmN.js → AlertCircle-BkrprcoF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BHEk1VG5.js → AreaChart-BeF6Gy1z.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-CDnEKV2Y.js → ArrowUp-CbMTR9M0.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-DdPCnlNm.js → ArrowUpRight-L-sW_E0D.js} +1 -1
  5. package/dist/client/assets/{Check-CcLLJc-z.js → Check-DZygR-Fe.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-lXciCGfG.js → CheckCircle-BLRVelyD.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-BmFaSDo8.js → ChevronDown-DDDop4Os.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C3Tgk-3m.js → ChevronRight-Cku8WSiq.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Dew3RmKl.js → ChevronUp-PZzlDplk.js} +1 -1
  10. package/dist/client/assets/{Circle-C_fdyhr8.js → Circle-CadYWyyA.js} +1 -1
  11. package/dist/client/assets/{Copy01-b3lIb5yu.js → Copy01-ryDblf5m.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CK1a4mKj.js → DotsVertical-Dg3Xo34T.js} +1 -1
  13. package/dist/client/assets/{Eye-DM8bmzm7.js → Eye-Bz-yLlBh.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DCNZa1GS.js → FilterLines-CLgHUAPd.js} +1 -1
  15. package/dist/client/assets/{Globe01-B6kdhpV9.js → Globe01-JMrbqgtG.js} +1 -1
  16. package/dist/client/assets/{Globe04-CGLGspo5.js → Globe04-MZEsVtUE.js} +1 -1
  17. package/dist/client/assets/{HardDrive-CR6Rs-a1.js → HardDrive-P0VrWAsS.js} +1 -1
  18. package/dist/client/assets/{Key01-1r4YrQER.js → Key01-CxVX_Pbg.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-DvNM8qhm.js → LayoutLeft-Ccrzp7iH.js} +1 -1
  20. package/dist/client/assets/{LinkExternal01-Ck4lryDE.js → LinkExternal01-DNPuUmDD.js} +1 -1
  21. package/dist/client/assets/{List-DfPIAPM_.js → List-CbUCe9_w.js} +1 -1
  22. package/dist/client/assets/{Monitor01-D_DrBwt_.js → Monitor01-8E0Kd0bb.js} +1 -1
  23. package/dist/client/assets/{Package-CV2Q9Uup.js → Package-0lPNEylQ.js} +1 -1
  24. package/dist/client/assets/{Palette-BY5BmUDa.js → Palette-BMnON_zo.js} +1 -1
  25. package/dist/client/assets/{Play-Ci1OqtIO.js → Play-qfGjc7w4.js} +1 -1
  26. package/dist/client/assets/{Plus-Cgq7ON9K.js → Plus-cs1N_W6b.js} +1 -1
  27. package/dist/client/assets/{SearchLg-2as_l8YT.js → SearchLg-Cpz6OE5G.js} +1 -1
  28. package/dist/client/assets/{SearchMd-ZfoTl6vw.js → SearchMd-D4gbfQvO.js} +1 -1
  29. package/dist/client/assets/{Settings02-CS2jOfO5.js → Settings02-BQIcnVua.js} +1 -1
  30. package/dist/client/assets/{Shield01-C6TdRfmI.js → Shield01-uN7yLkjY.js} +1 -1
  31. package/dist/client/assets/{Star01-2DHf7kTZ.js → Star01-B61mWKGP.js} +1 -1
  32. package/dist/client/assets/{Stars01-BEHbN5c3.js → Stars01-COCvCNwS.js} +1 -1
  33. package/dist/client/assets/{Stars02-HLp9q8iP.js → Stars02-DCivmeGP.js} +1 -1
  34. package/dist/client/assets/{Sun-ByaEjJ0N.js → Sun-CN1qXAbA.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-ilLzkPr_.js → SwitchHorizontal01-MT4LDKEV.js} +1 -1
  36. package/dist/client/assets/{Tool01-DVCGutKV.js → Tool01-Beyaqvxk.js} +1 -1
  37. package/dist/client/assets/{Tool02-CSTMjTef.js → Tool02-jYwfK8WU.js} +1 -1
  38. package/dist/client/assets/{Trash01--uX5q_ti.js → Trash01-CgtbhVG5.js} +1 -1
  39. package/dist/client/assets/Trash03-rtk2CmiW.js +1 -0
  40. package/dist/client/assets/{TrendUp01-acR-ekUr.js → TrendUp01-2mG8Ply8.js} +1 -1
  41. package/dist/client/assets/{Upload01-BaheeKQP.js → Upload01-CpJQboow.js} +1 -1
  42. package/dist/client/assets/{User01-5hu8D3_O.js → User01-Bnj-cSVO.js} +1 -1
  43. package/dist/client/assets/{Users01-Dh5E4dqf.js → Users01-0zLYZpC7.js} +1 -1
  44. package/dist/client/assets/{Users03-tGwfKVJc.js → Users03-7mmR4h8P.js} +1 -1
  45. package/dist/client/assets/{X-OFSHASit.js → X-BhKPwXx-.js} +1 -1
  46. package/dist/client/assets/{XCircle-D3cI1Aep.js → XCircle-BjlDFDl6.js} +1 -1
  47. package/dist/client/assets/{XClose-D5Ra7e-f.js → XClose-tZL2IdJO.js} +1 -1
  48. package/dist/client/assets/{Zap-CgjpaG4V.js → Zap-BPZV9XTy.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-Dzb50Gix.js → ZapSquare-C0baTxoC.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-DYAXxr_v.js → ZoomOut-CS3Og5lE.js} +1 -1
  51. package/dist/client/assets/{access-gate-B4XS-sin.js → access-gate-D5TOVD3E.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-2QsV6sh6.js → add-section-modal-tXpF1_lX.js} +1 -1
  53. package/dist/client/assets/agent-icon-DkxLV1fV.js +1 -0
  54. package/dist/client/assets/agents-list-7jGVMclg.js +1 -0
  55. package/dist/client/assets/ai-providers-DfYQ_QQL.js +1 -0
  56. package/dist/client/assets/{alert-DBWDLZgp.js → alert-BGbl-kfx.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-Bd5XLC3F.js → alert-dialog-qVVgQZs_.js} +3 -3
  58. package/dist/client/assets/app-editor-B_ZP-aVy.js +1 -0
  59. package/dist/client/assets/{auth-D_bm0-t3.js → auth-D3FIklA5.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-CDVAqOkY.js → auth-catchall-DIcQ-n8K.js} +1 -1
  61. package/dist/client/assets/auth-entry-LhmBIgh6.js +1 -0
  62. package/dist/client/assets/{auth-split-layout-DB8qmgLK.js → auth-split-layout-D1GUoAkz.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-ClCvWDci.js → authenticate-and-persist-oauth-C4jnnZWl.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-ByoN-o6y.js → automation-list-row-D0R4MbNV.js} +1 -1
  65. package/dist/client/assets/{automation-runs-Y9TSuy3F.js → automation-runs-BYtwdZxc.js} +1 -1
  66. package/dist/client/assets/automations--Z24mOUf.js +1 -0
  67. package/dist/client/assets/{autosend-qB5BaOSA.js → autosend-D43Y2Wye.js} +1 -1
  68. package/dist/client/assets/{avatar-DOYkgu8W.js → avatar-CEhTtT5Z.js} +1 -1
  69. package/dist/client/assets/{badge-BMMjntMn.js → badge-BRITDvjk.js} +1 -1
  70. package/dist/client/assets/{block-document-CCtmnkDi.js → block-document-CHZpIPJn.js} +1 -1
  71. package/dist/client/assets/brand-context-DNx2wpN3.js +1 -0
  72. package/dist/client/assets/{buckets-B22IEfKD.js → buckets-BBci7RWl.js} +1 -1
  73. package/dist/client/assets/bulk-category-panel-CCrSnxHT.js +1 -0
  74. package/dist/client/assets/calendar-DITgsboQ.js +1 -0
  75. package/dist/client/assets/capability-load-error-C3U-K2hK.js +1 -0
  76. package/dist/client/assets/{card-Bc92PJFP.js → card-dUi6YgZ6.js} +1 -1
  77. package/dist/client/assets/category-editor-BlBFOzrv.js +1 -0
  78. package/dist/client/assets/{chat-context-Awe2cIoY.js → chat-context-Iman-MuU.js} +6 -6
  79. package/dist/client/assets/{checkbox-B-y-IHdE.js → checkbox-BvCpvEfo.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BlIIxKPd.js → cli-auth-success-DyhlAsFy.js} +1 -1
  81. package/dist/client/assets/collection-detail-CXqm_V0F.js +1 -0
  82. package/dist/client/assets/{collection-display-button-BVhQtAEp.js → collection-display-button-IFaJZ5V5.js} +1 -1
  83. package/dist/client/assets/{collection-search-DSP3ov6A.js → collection-search-B0UfZ-OT.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-CeR2zvlX.js → collection-table-wrapper-CoEKWaCw.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-PTC62n_G.js → collection-tabs-CpnfoB9V.js} +1 -1
  86. package/dist/client/assets/{command-DzGwZa9g.js → command-cobicZB1.js} +1 -1
  87. package/dist/client/assets/commerce-onboarding-FW4szuTn.js +1 -0
  88. package/dist/client/assets/{connect-desktop-dialog-DiutLBhU.js → connect-desktop-dialog-DWRyRSkj.js} +1 -1
  89. package/dist/client/assets/connection-card-LUMMlH6G.js +1 -0
  90. package/dist/client/assets/connection-detail-DoPkmdCs.js +1 -0
  91. package/dist/client/assets/{connection-form-helpers-POWe2kJ-.js → connection-form-helpers-yaifOq7s.js} +1 -1
  92. package/dist/client/assets/connections-4fdav7OM.js +1 -0
  93. package/dist/client/assets/constants-D_FQAPnt.js +1 -0
  94. package/dist/client/assets/decopilot-sse-pool-D5PMEPBF.js +1 -0
  95. package/dist/client/assets/dialog-BzVEcj79.js +1 -0
  96. package/dist/client/assets/domain-settings-DCcEckko.js +1 -0
  97. package/dist/client/assets/{drawer-Ck_Oak77.js → drawer-DTss_--q.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-C9SSwIby.js → dropdown-menu-DDThFULM.js} +1 -1
  99. package/dist/client/assets/{empty-state-DD15-E7x.js → empty-state-Bfm4FdaU.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-Di6SAuY0.js → extract-connection-data-B3b_eFbC.js} +1 -1
  101. package/dist/client/assets/file-explorer-D3ekbS0A.js +2 -0
  102. package/dist/client/assets/{file-type-icon-CuakGACj.js → file-type-icon-Co-9ap-O.js} +1 -1
  103. package/dist/client/assets/{files-DrQIRu5a.js → files-nenoVdXA.js} +1 -1
  104. package/dist/client/assets/{form-YJrSMpNL.js → form-BEFBxu79.js} +1 -1
  105. package/dist/client/assets/general-DhzgM9yi.js +1 -0
  106. package/dist/client/assets/github-repo-picker-Bc5KArQ0.js +1 -0
  107. package/dist/client/assets/{hooks-GnFkomrq.js → hooks-pnrq3avL.js} +1 -1
  108. package/dist/client/assets/{index-0yvnZiwb.js → index-47mQkAxc.js} +1 -1
  109. package/dist/client/assets/{index-CCnsgP9d.js → index-B6vBs0RJ.js} +5 -5
  110. package/dist/client/assets/index-Bjoka7jJ.js +1 -0
  111. package/dist/client/assets/{index-DPzJsdBC.js → index-C-QXvkc1.js} +1 -1
  112. package/dist/client/assets/{index-Dv19SgJH.js → index-CBuBybHp.js} +28 -28
  113. package/dist/client/assets/{index-MwzluG1w.js → index-CI_dJNCw.js} +1 -1
  114. package/dist/client/assets/{index-DS3hrf0F.js → index-CX5pjTTE.js} +1 -1
  115. package/dist/client/assets/{index-Cim2j5YD.js → index-CYRx6VZs.js} +1 -1
  116. package/dist/client/assets/index-Ct4UCmlw.css +1 -0
  117. package/dist/client/assets/{index-Cyr1IOqy.js → index-D6481a7y.js} +1 -1
  118. package/dist/client/assets/index-DEFe_Ioe.js +1 -0
  119. package/dist/client/assets/index-Dw17x_vM.js +1 -0
  120. package/dist/client/assets/{index-BraRl60q.js → index-ZeEdh6la.js} +1 -1
  121. package/dist/client/assets/index-ho6IJJiJ.js +1 -0
  122. package/dist/client/assets/{index-redirect-Hp_EA6DJ.js → index-redirect-CId9LITt.js} +1 -1
  123. package/dist/client/assets/{index-CsZhMKFM.js → index-v1F20B0E.js} +26 -26
  124. package/dist/client/assets/{input-D5ccsU_1.js → input-DoMDIxWk.js} +1 -1
  125. package/dist/client/assets/{integration-icon-6pGkEdul.js → integration-icon-NHRUL2M2.js} +1 -1
  126. package/dist/client/assets/invite-member-dialog-DPbJQBPO.js +3 -0
  127. package/dist/client/assets/{label-BULuaMoF.js → label-BRpUtjMO.js} +1 -1
  128. package/dist/client/assets/{layout-BloKJFhD.js → layout-YL1-WGtk.js} +1 -1
  129. package/dist/client/assets/{login-Dzlh5qYT.js → login-mI70aY7y.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-z9GFPjDo.js → mcp-oauth-BhDqbGNe.js} +1 -1
  131. package/dist/client/assets/members-CcmOVZeT.js +1 -0
  132. package/dist/client/assets/{monaco-editor-CiP0ChuC.js → monaco-editor-CN68a7_6.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-CLHK9ypI.js → monitoring-stats-row-g88EsnKJ.js} +3 -3
  134. package/dist/client/assets/{oauth-callback-CdWGFVi8.js → oauth-callback-Dxm8R7-5.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-qp9LO32T.js → oauth-callback-ai-provider-DoOKE-xx.js} +1 -1
  136. package/dist/client/assets/{onboarding-iL9ZeHnE.js → onboarding-B1NNpnvc.js} +1 -1
  137. package/dist/client/assets/{org-install-ZxTYabEU.js → org-install-BGV7QX9d.js} +1 -1
  138. package/dist/client/assets/{org-layout-DWaUEBqs.js → org-layout-e4sSXc2-.js} +1 -1
  139. package/dist/client/assets/{organization-choice-5GYvmez0.js → organization-choice-MatHTHWS.js} +1 -1
  140. package/dist/client/assets/{orgs-CRRA1WCm.js → orgs-DyYyghqa.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-C4SLs6YG.js → page-seo-form-BdXxVdKh.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-iRiW3JQ1.js +1 -0
  143. package/dist/client/assets/{popover-C5PoRwEk.js → popover-BhTglK_V.js} +1 -1
  144. package/dist/client/assets/post-editor-BhXErJkg.js +1 -0
  145. package/dist/client/assets/{primitives-BEmjSMO9.js → primitives-ENZTjlku.js} +1 -1
  146. package/dist/client/assets/profile-C8J4RX1p.js +1 -0
  147. package/dist/client/assets/project-app-view-CLqEVreP.js +1 -0
  148. package/dist/client/assets/record-editor-CHvIMmJ7.js +1 -0
  149. package/dist/client/assets/registry-CmtvdFTb.js +2 -0
  150. package/dist/client/assets/{registry-layout-BDNmgEhN.js → registry-layout-DFPPdTUd.js} +4 -4
  151. package/dist/client/assets/{reports-C6ascunL.js → reports-B3Fg6jp_.js} +1 -1
  152. package/dist/client/assets/{require-capability-BjscC7QS.js → require-capability-D-A54-k8.js} +1 -1
  153. package/dist/client/assets/{required-auth-layout-R2McgzF5.js → required-auth-layout-LPVLIFMc.js} +1 -1
  154. package/dist/client/assets/{reset-password-Fw4tx_9w.js → reset-password-CVjmIBh9.js} +1 -1
  155. package/dist/client/assets/roles-BxJj-xe3.js +1 -0
  156. package/dist/client/assets/{search-input-BREJK7qA.js → search-input-B7l4w6Nk.js} +1 -1
  157. package/dist/client/assets/secrets-9rA0Xv9T.js +1 -0
  158. package/dist/client/assets/{sections-editor-CKmy6jCA.js → sections-editor-bOiVAtcG.js} +1 -1
  159. package/dist/client/assets/{select-CVMXwLRV.js → select-DJ-xJfBd.js} +1 -1
  160. package/dist/client/assets/{select-model-Cg3FzUNI.js → select-model-wshUAo0W.js} +1 -1
  161. package/dist/client/assets/self-tool-result-BJKZmspV.js +1 -0
  162. package/dist/client/assets/seo-editor-3ntseOCn.js +1 -0
  163. package/dist/client/assets/settings-layout-B8wOMjDB.js +1 -0
  164. package/dist/client/assets/{settings-section-BYCtjEaG.js → settings-section-C6yf8yzB.js} +1 -1
  165. package/dist/client/assets/{shell-controls-Daj0PZIQ.js → shell-controls-BZMA1sGn.js} +1 -1
  166. package/dist/client/assets/shell-layout-CDHmuxZH.js +1 -0
  167. package/dist/client/assets/sidebar-DMHBEB3a.js +1 -0
  168. package/dist/client/assets/{skeleton-BZzqWIif.js → skeleton-CYnpNimL.js} +1 -1
  169. package/dist/client/assets/sso-BzMLp8-J.js +1 -0
  170. package/dist/client/assets/store-BOc0PBwD.js +1 -0
  171. package/dist/client/assets/store-registry-DIdlXcXO.js +2 -0
  172. package/dist/client/assets/studio-tools-Dta_1_QR.js +1 -0
  173. package/dist/client/assets/{switch-B36ltQ63.js → switch-CxGmjhpb.js} +1 -1
  174. package/dist/client/assets/{table-CLRsCUXA.js → table-IyQgqCyJ.js} +1 -1
  175. package/dist/client/assets/{tabs-BoNNus4B.js → tabs-DJSveVrG.js} +1 -1
  176. package/dist/client/assets/{textarea-DPLwPKZJ.js → textarea-D5CZ7ZsG.js} +1 -1
  177. package/dist/client/assets/{toggle-group-DkGsY2u-.js → toggle-group-TzWGQhcY.js} +1 -1
  178. package/dist/client/assets/{toolbar-CedVmC1P.js → toolbar-DT9Q65OX.js} +1 -1
  179. package/dist/client/assets/{toolbar-icon-button-5fStNBy9.js → toolbar-icon-button-DCDLCG5U.js} +1 -1
  180. package/dist/client/assets/tools-list-CnR-7U8Q.js +1 -0
  181. package/dist/client/assets/{tooltip-Cs5hng3q.js → tooltip-CwWmycdW.js} +1 -1
  182. package/dist/client/assets/use-ai-providers-jn20SAL8.js +1 -0
  183. package/dist/client/assets/use-automations-BBihr9dY.js +1 -0
  184. package/dist/client/assets/use-capability-CXLvhLL0.js +1 -0
  185. package/dist/client/assets/{use-clock-tick-CB7NlnVZ.js → use-clock-tick-GG7JJthC.js} +1 -1
  186. package/dist/client/assets/{use-collections-Cl7KVWNQ.js → use-collections-Bw1ej6HH.js} +1 -1
  187. package/dist/client/assets/use-connection-DivkmGF9.js +1 -0
  188. package/dist/client/assets/{use-copy-B-pxrD6E.js → use-copy-CciEBKiS.js} +1 -1
  189. package/dist/client/assets/{use-create-virtual-mcp-DPkT8FPW.js → use-create-virtual-mcp-DkjEcux9.js} +1 -1
  190. package/dist/client/assets/{use-debounced-autosave-teletZQd.js → use-debounced-autosave-0ivINAXf.js} +1 -1
  191. package/dist/client/assets/{use-debounced-value-ChKSUuxz.js → use-debounced-value-D_iu4VB9.js} +1 -1
  192. package/dist/client/assets/use-deco-credits-D2VFeHYN.js +1 -0
  193. package/dist/client/assets/{use-decopilot-events-CWf9qNc0.js → use-decopilot-events-BT5pbFoO.js} +1 -1
  194. package/dist/client/assets/use-delete-connection-j9ShOV4G.js +1 -0
  195. package/dist/client/assets/{use-deployment-admin-C3JCAXzA.js → use-deployment-admin-EW9j2pmW.js} +1 -1
  196. package/dist/client/assets/use-file-configs-CZB3TWDj.js +1 -0
  197. package/dist/client/assets/use-infinite-scroll-DRJmUT_7.js +1 -0
  198. package/dist/client/assets/use-join-requests-DojedTk5.js +1 -0
  199. package/dist/client/assets/{use-mcp-client-Bv8WGceO.js → use-mcp-client-BmyqfqxQ.js} +4 -4
  200. package/dist/client/assets/{use-mcp-tools-_p3Gu3UX.js → use-mcp-tools-BH7UZO6u.js} +1 -1
  201. package/dist/client/assets/use-members-B9xQq8Nf.js +1 -0
  202. package/dist/client/assets/{use-mobile-DhhfLpzh.js → use-mobile-Dyi4jnPJ.js} +1 -1
  203. package/dist/client/assets/use-navigate-to-agent-CXN_R57g.js +1 -0
  204. package/dist/client/assets/use-org-auth-client-DvR9aTwL.js +1 -0
  205. package/dist/client/assets/{use-org-sso-DDm0m5Eb.js → use-org-sso-BpWCWfK7.js} +1 -1
  206. package/dist/client/assets/use-organization-roles-DrGTxpZM.js +1 -0
  207. package/dist/client/assets/use-organization-settings-JlbwL6sx.js +1 -0
  208. package/dist/client/assets/use-registry-connections-DlCFmIUa.js +1 -0
  209. package/dist/client/assets/use-secrets-CZWYXwBu.js +1 -0
  210. package/dist/client/assets/use-status-sounds-Bw2veslR.js +1 -0
  211. package/dist/client/assets/{use-view-mode-H6oFviHU.js → use-view-mode-_M46l8bo.js} +1 -1
  212. package/dist/client/assets/use-virtual-mcp-pJk84Xzr.js +1 -0
  213. package/dist/client/assets/useInfiniteQuery-DKESjHh5.js +1 -0
  214. package/dist/client/assets/{useRouterState-DjtN_ggp.js → useRouterState-BVrfD4QF.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-DLe2YLWa.js +1 -0
  216. package/dist/client/assets/{users-CwhV7o0r.js → users-BFk7oxwk.js} +1 -1
  217. package/dist/client/assets/variant-calendar-BFmG35Fm.js +1 -0
  218. package/dist/client/assets/{view-mode-toggle-DovE7i8d.js → view-mode-toggle-GXZBM6av.js} +1 -1
  219. package/dist/client/index.html +2 -2
  220. package/dist/server/cli.js +605 -601
  221. package/dist/server/migrate.js +75 -75
  222. package/dist/server/server.js +383 -379
  223. package/package.json +1 -1
  224. package/dist/client/assets/Loading02-Dx-xiZND.js +0 -1
  225. package/dist/client/assets/agent-icon-dPkJbbXq.js +0 -1
  226. package/dist/client/assets/agents-list-CBbQQUEx.js +0 -1
  227. package/dist/client/assets/ai-providers-CeevjV97.js +0 -1
  228. package/dist/client/assets/app-editor-CC9wPnl_.js +0 -1
  229. package/dist/client/assets/auth-entry-Bo3LWJI9.js +0 -1
  230. package/dist/client/assets/automations-DDTM3E3g.js +0 -1
  231. package/dist/client/assets/brand-context-Bkaj5nz3.js +0 -1
  232. package/dist/client/assets/bulk-category-panel-C3pu2Jik.js +0 -1
  233. package/dist/client/assets/calendar-Io_vhk-a.js +0 -1
  234. package/dist/client/assets/capability-load-error-COzn8-Xb.js +0 -1
  235. package/dist/client/assets/category-editor-C1FxzSFF.js +0 -1
  236. package/dist/client/assets/collection-detail-CcnshY5k.js +0 -1
  237. package/dist/client/assets/commerce-onboarding-v6NmdNz5.js +0 -1
  238. package/dist/client/assets/connection-card-CXwWR_5h.js +0 -1
  239. package/dist/client/assets/connection-detail-B_tl4TZx.js +0 -1
  240. package/dist/client/assets/connections-C1NH7yoX.js +0 -1
  241. package/dist/client/assets/constants-CaIX_f5U.js +0 -1
  242. package/dist/client/assets/decopilot-sse-pool-CJtSg3wj.js +0 -1
  243. package/dist/client/assets/dialog-DZtdYFi_.js +0 -1
  244. package/dist/client/assets/domain-settings-C7CfCyw6.js +0 -1
  245. package/dist/client/assets/file-explorer-CMqCjVts.js +0 -2
  246. package/dist/client/assets/general-XFvP4tXw.js +0 -1
  247. package/dist/client/assets/github-repo-picker-VDMXf52q.js +0 -1
  248. package/dist/client/assets/index-CEI6wi5Z.js +0 -1
  249. package/dist/client/assets/index-DFCCfX3B.js +0 -1
  250. package/dist/client/assets/index-DKyQrM3l.js +0 -1
  251. package/dist/client/assets/index-DPKpPAQv.js +0 -1
  252. package/dist/client/assets/index-DhnTILyr.css +0 -1
  253. package/dist/client/assets/invite-member-dialog-DV_-RNy8.js +0 -3
  254. package/dist/client/assets/members-BfULkB51.js +0 -1
  255. package/dist/client/assets/page-seo-sheet-CqzS0lEJ.js +0 -1
  256. package/dist/client/assets/post-editor-DQzYF8Ef.js +0 -1
  257. package/dist/client/assets/profile-Dh73-0Iy.js +0 -1
  258. package/dist/client/assets/project-app-view-KN05BOuo.js +0 -1
  259. package/dist/client/assets/record-editor-BGeMoeUP.js +0 -1
  260. package/dist/client/assets/registry-DGAgXfxF.js +0 -2
  261. package/dist/client/assets/roles-D6vLw9pS.js +0 -1
  262. package/dist/client/assets/secrets-B2rqgV3S.js +0 -1
  263. package/dist/client/assets/seo-editor-DVVtxnZN.js +0 -1
  264. package/dist/client/assets/settings-layout-CS4A10kE.js +0 -1
  265. package/dist/client/assets/shell-layout-Bi4LjwsI.js +0 -1
  266. package/dist/client/assets/sidebar-DRSu2iBz.js +0 -1
  267. package/dist/client/assets/sso-C6uqUsih.js +0 -1
  268. package/dist/client/assets/store-BZ7eoytz.js +0 -1
  269. package/dist/client/assets/store-registry-DA7t2U9g.js +0 -2
  270. package/dist/client/assets/studio-tools-CTswP4mA.js +0 -1
  271. package/dist/client/assets/tools-list-DyAKlhYk.js +0 -1
  272. package/dist/client/assets/use-ai-providers-D77UFwvU.js +0 -1
  273. package/dist/client/assets/use-automations-WNGih4F_.js +0 -1
  274. package/dist/client/assets/use-capability-DmeYLlad.js +0 -1
  275. package/dist/client/assets/use-connection-CcLotHiI.js +0 -1
  276. package/dist/client/assets/use-deco-credits-1Xd5keqC.js +0 -1
  277. package/dist/client/assets/use-delete-connection-BJuEHINL.js +0 -1
  278. package/dist/client/assets/use-file-configs-G_3bUBDS.js +0 -1
  279. package/dist/client/assets/use-infinite-scroll-BTdf9pFZ.js +0 -1
  280. package/dist/client/assets/use-join-requests-NgN8gue3.js +0 -1
  281. package/dist/client/assets/use-members-eaM3vNiv.js +0 -1
  282. package/dist/client/assets/use-navigate-to-agent-BsdctirU.js +0 -1
  283. package/dist/client/assets/use-org-auth-client-DYoTiK8H.js +0 -1
  284. package/dist/client/assets/use-organization-roles-CcwnCugJ.js +0 -1
  285. package/dist/client/assets/use-organization-settings-C4hP3pVq.js +0 -1
  286. package/dist/client/assets/use-registry-connections-xg-zrNmx.js +0 -1
  287. package/dist/client/assets/use-secrets-CdGKHqA-.js +0 -1
  288. package/dist/client/assets/use-status-sounds-Uz1qdvt2.js +0 -1
  289. package/dist/client/assets/use-virtual-mcp-CMvxAHEJ.js +0 -1
  290. package/dist/client/assets/useInfiniteQuery-BosqZeNZ.js +0 -1
  291. package/dist/client/assets/useSuspenseInfiniteQuery-Dh0QZdLF.js +0 -1
  292. package/dist/client/assets/variant-calendar-5liHDWH_.js +0 -1
@@ -1 +0,0 @@
1
- import{c as k,d as ee,j as s,B as O,bU as H,t as J,_ as xe,a as Y,X as Ce,P as be,K as se,bV as Te,bW as Ee,Y as B,r as K,m as te,bX as $e,bY as Le,b as ze,a4 as De,e as we,u as Ie,a5 as Me,aY as Pe,bZ as Fe,b_ as me,b$ as Re,c0 as qe,S as Ue,O as Ge,c1 as Ke}from"./index-CsZhMKFM.js";import{A as oe}from"./avatar-DOYkgu8W.js";import{t as Se,a as He}from"./Users03-tGwfKVJc.js";import{i as Be}from"./SearchLg-2as_l8YT.js";import{i as Ye,s as Je,a as z,n as We}from"./Stars02-HLp9q8iP.js";import{s as Ve}from"./XClose-D5Ra7e-f.js";import{i as I}from"./CheckCircle-lXciCGfG.js";import{i as fe}from"./FilterLines-DCNZa1GS.js";import{i as G}from"./Zap-CgjpaG4V.js";import{d as Qe,D as Xe,a as Ze,e as et}from"./dialog-DZtdYFi_.js";import{b as tt,c as nt,d as st,a as ot,e as it,g as at,f as rt}from"./alert-dialog-Bd5XLC3F.js";import{R as lt}from"./required-auth-layout-R2McgzF5.js";import{A as ct}from"./autosend-qB5BaOSA.js";import{m as dt}from"./use-mcp-client-Bv8WGceO.js";import{a as he,S as ut}from"./constants-CaIX_f5U.js";import{g as mt,c as ft}from"./hooks-GnFkomrq.js";import{q as ht}from"./tab-id-bb-jjgGv.js";import{e as gt}from"./use-organization-settings-C4hP3pVq.js";import{u as pt}from"./use-org-sso-DDm0m5Eb.js";function yt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const S=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await S.json();if(!S.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:S=>{window.location.href=`/${S.slug??o}`},onError:bt},e[0]=o,e[1]=a):a=e[1];const l=ee(a),c=xt;let u;e[2]!==i||e[3]!==n?(u=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=u):u=e[4];let d;e[5]!==n?(d=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=d):d=e[6];let m;e[7]!==r?(m=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let h;e[9]!==d||e[10]!==m?(h=s.jsxs("div",{className:"space-y-2",children:[d,m]}),e[9]=d,e[10]=m,e[11]=h):h=e[11];let p;e[12]!==l?(p=()=>l.mutate(),e[12]=l,e[13]=p):p=e[13];const f=l.isPending?"Joining…":`Enter ${n}`;let g;e[14]!==l.isPending||e[15]!==p||e[16]!==f?(g=s.jsx(O,{onClick:p,disabled:l.isPending,children:f}),e[14]=l.isPending,e[15]=p,e[16]=f,e[17]=g):g=e[17];let y;e[18]!==l.isPending?(y=s.jsx(O,{variant:"ghost",onClick:c,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=y):y=e[19];let w;e[20]!==g||e[21]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[20]=g,e[21]=y,e[22]=w):w=e[22];let b;return e[23]!==w||e[24]!==u||e[25]!==h?(b=s.jsxs(H,{children:[u,h,w]}),e[23]=w,e[24]=u,e[25]=h,e[26]=b):b=e[26],b}function xt(){window.location.href="/"}function bt(t){J.error(t instanceof Error?t.message:"Failed to join organization")}function ge(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=wt,a=i==="not-found",l=a?Be:xe,c=a?"Organization not found":"No access";let u;e[0]!==a||e[1]!==o||e[2]!==n?(u=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=u):u=e[3];const d=u;let m;e[4]!==l?(m=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let h;e[6]!==c?(h=s.jsx("h3",{className:"text-lg font-medium",children:c}),e[6]=c,e[7]=h):h=e[7];let p;e[8]!==d?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[8]=d,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=s.jsxs("div",{className:"space-y-2",children:[h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(O,{onClick:r,children:"Go to home"}),e[13]=g):g=e[13];let y;return e[14]!==m||e[15]!==f?(y=s.jsxs(H,{children:[m,f,g]}),e[14]=m,e[15]=f,e[16]=y):y=e[16],y}function wt(){window.location.href="/"}function St(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const _=await Y.organization.acceptInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{Ce(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={mutationFn:a,onSuccess:l,onError:kt},e[4]=a,e[5]=l,e[6]=c):c=e[6];const u=ee(c);let d;e[7]!==n?(d=async()=>{const _=await Y.organization.rejectInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[7]=n,e[8]=d):d=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=vt,e[9]=m):m=e[9];let h;e[10]!==d?(h={mutationFn:d,onSuccess:m,onError:jt},e[10]=d,e[11]=h):h=e[11];const p=ee(h),f=u.isPending||p.isPending;let g;e[12]!==r||e[13]!==o?(g=r?s.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ye,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=g):g=e[14];let y;e[15]!==o?(y=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=y):y=e[16];let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=w):w=e[17];let b;e[18]!==y?(b=s.jsxs("div",{className:"space-y-2",children:[y,w]}),e[18]=y,e[19]=b):b=e[19];let S;e[20]!==u?(S=()=>u.mutate(),e[20]=u,e[21]=S):S=e[21];const v=u.isPending?"Accepting…":"Accept invitation";let N;e[22]!==f||e[23]!==S||e[24]!==v?(N=s.jsx(O,{onClick:S,disabled:f,children:v}),e[22]=f,e[23]=S,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==p?(T=()=>p.mutate(),e[26]=p,e[27]=T):T=e[27];const $=p.isPending?"Declining…":"Decline";let x;e[28]!==f||e[29]!==T||e[30]!==$?(x=s.jsx(O,{variant:"ghost",onClick:T,disabled:f,children:$}),e[28]=f,e[29]=T,e[30]=$,e[31]=x):x=e[31];let E;e[32]!==N||e[33]!==x?(E=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,x]}),e[32]=N,e[33]=x,e[34]=E):E=e[34];let L;return e[35]!==b||e[36]!==E||e[37]!==g?(L=s.jsxs(H,{children:[g,b,E]}),e[35]=b,e[36]=E,e[37]=g,e[38]=L):L=e[38],L}function jt(t){J.error(t instanceof Error?t.message:"Failed to decline invitation")}function vt(){J.success("Invitation declined"),window.location.href="/"}function kt(t){J.error(t instanceof Error?t.message:"Failed to accept invitation")}function Nt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(oe,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Je,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:_t,children:"Go to home"}),e[6]=l):l=e[6];let c;return e[7]!==i||e[8]!==a?(c=s.jsxs(H,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function _t(){window.location.href="/"}function At(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=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]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=Tt,e[2]=l):l=e[2];let c;e[3]!==a?(c={mutationFn:a,onSuccess:l,onError:Ct},e[3]=a,e[4]=c):c=e[4];const u=ee(c);let d;e[5]!==i||e[6]!==n?(d=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=d):d=e[7];let m;e[8]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=m):m=e[9];let h;e[10]!==r?(h=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=h):h=e[11];let p;e[12]!==m||e[13]!==h?(p=s.jsxs("div",{className:"space-y-2",children:[m,h]}),e[12]=m,e[13]=h,e[14]=p):p=e[14];let f;e[15]!==u?(f=()=>u.mutate(),e[15]=u,e[16]=f):f=e[16];const g=u.isPending?"Requesting…":"Request to join";let y;e[17]!==u.isPending||e[18]!==f||e[19]!==g?(y=s.jsx(O,{onClick:f,disabled:u.isPending,children:g}),e[17]=u.isPending,e[18]=f,e[19]=g,e[20]=y):y=e[20];let w;e[21]!==u.isPending?(w=s.jsx(O,{variant:"ghost",onClick:Ot,disabled:u.isPending,children:"Go to home"}),e[21]=u.isPending,e[22]=w):w=e[22];let b;e[23]!==y||e[24]!==w?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,w]}),e[23]=y,e[24]=w,e[25]=b):b=e[25];let S;return e[26]!==b||e[27]!==d||e[28]!==p?(S=s.jsxs(H,{children:[d,p,b]}),e[26]=b,e[27]=d,e[28]=p,e[29]=S):S=e[29],S}function Ot(){window.location.href="/"}function Ct(t){J.error(t instanceof Error?t.message:"Failed to request access")}function Tt(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Et(t){const e=k.c(7);let n;e[0]!==t?(n=se.orgAccessStatus(t),e[0]=t,e[1]=n):n=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 i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],be(i)}function $t({orgSlug:t}){const{data:e}=Et(t);if(e.status!=="member"){Te()?.org===t&&Ee();const n=localStorage.getItem(B.lastOrgSlug())===t;if(n&&localStorage.removeItem(B.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ge,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(St,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(yt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(At,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(Nt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ge,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Lt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==n.bullets?(c=n.bullets.map(zt),e[7]=n.bullets,e[8]=c):c=e[8];let u;e[9]!==c?(u=s.jsx("ul",{className:"flex flex-col gap-3",children:c}),e[9]=c,e[10]=u):u=e[10];let d;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(d=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=d):d=e[15];let m;return e[16]!==l||e[17]!==u||e[18]!==d?(m=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,u,d]}),e[16]=l,e[17]=u,e[18]=d,e[19]=m):m=e[19],m}function zt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const je=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:z,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:z,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:z,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:z,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:z,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:z,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:fe,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:He,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:z,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:fe,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:z,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:We,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 M="",P={},de=!1;function Dt(){if(de)return M||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return M||"{}"}}function ve(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function pe(){const t=Dt();return t!==M&&(M=t,P=ve(t)),P}function It(t){ce.add(t);const e=n=>{if(!(n.key!==ne&&n.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...ve(o),...P};P=r,M=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function Mt(t){P=t,M=JSON.stringify(t);try{localStorage.setItem(ne,M),de=!1}catch{de=!0}ce.forEach(e=>e())}function Pt(){const t=k.c(7),e=K.useSyncExternalStore(It,pe,pe);let n;t[0]!==e?(n=c=>!!e[c],t[0]=e,t[1]=n):n=t[1];const o=n,i=Ft;let r;t[2]!==e?(r=je.reduce((c,u)=>e[u.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function Ft(t){P[t]||Mt({...P,[t]:{seenAt:new Date().toISOString()}})}const Rt=720*60*60*1e3,qt=10080*60*1e3;function Ut(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Gt(t){const e=je[0];if(!e)return null;const n=Ut(e.date),o=t-n;return o<0||o>Rt?null:e}function Kt(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 Ht(t,e){const n=Kt(t);return n===null?!1:e-n>=qt}function Bt(){const t=k.c(22),{data:e}=Y.useSession(),{isSeen:n,markSeen:o}=Pt();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const f=Date.now();if(i=Gt(f),!i){a=null;break e}if(!Ht(e?.user?.createdAt,f)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ve,{size:14}),t[8]=c):c=t[8];let u;t[9]!==l?(u=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:c}),t[9]=l,t[10]=u):u=t[10];let d,m;t[11]!==i.id||t[12]!==o?(d=()=>o(i.id),m=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=d,t[14]=m):(d=t[13],m=t[14]);let h;t[15]!==i||t[16]!==d||t[17]!==m?(h=s.jsx(Lt,{release:i,onCtaClick:d,onLearnMoreClick:m}),t[15]=i,t[16]=d,t[17]=m,t[18]=h):h=t[18];let p;return t[19]!==u||t[20]!==h?(p=s.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:[u,h]}),t[19]=u,t[20]=h,t[21]=p):p=t[21],p}const ke=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),D=ke?"⌘":"Ctrl",C={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"}},Yt=[{label:"General",shortcuts:[C.keyboardShortcuts,C.back,C.newTask,C.toggleDaemon]},{label:"Editor",shortcuts:[C.saveAndFormat]},{label:"Chat",shortcuts:[C.focusChatInput,C.togglePlanMode,C.sendMessage,C.newLine]},{label:"Questions",shortcuts:[C.selectOption]},{label:"Monitoring",shortcuts:[C.applyFilter]}];function ye(t){return ke?t.metaKey:t.ctrlKey}function Jt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Xe,{children:s.jsx(Ze,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Qe,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:Yt.map(Wt)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(et,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function Wt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Vt)})]},t.label)}function Vt(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Qt)})]},t.description)}function Qt(t){return s.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 Xt=300*1e3,Zt=2;function en(t,e,n){return!e||e===n?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function tn(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:sn,refetchInterval:Xt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:n,dataUpdatedAt:o}=te(e),[i,r]=K.useState(0);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={version:null,count:0},t[1]=a):a=t[1];const[l,c]=K.useState(a);o!==i&&(r(o),c(p=>en(p,n,"4.61.2")));const u=l.count>=Zt;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(tt,{children:[s.jsx(nt,{children:"A new version is available"}),s.jsx(st,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(ot,{children:[d,s.jsx(it,{children:s.jsx(at,{onClick:nn,children:"Refresh"})})]}),t[3]=m):m=t[3];let h;return t[4]!==u?(h=s.jsx(rt,{open:u,children:m}),t[4]=u,t[5]=h):h=t[5],h}function nn(){return window.location.reload()}async function sn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function on({activeOrg:t}){return t&&($e(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Le()),null}function an(t,e,n){if(!n)return null;const o=mt(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function rn(t){const{prev:e,virtualMcpId:n,decopilotId:o,savedLayout:i,opts:r,autosendValue:a}=t,l={};n?l.virtualmcpid=n:e.virtualmcpid&&(l.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:o,d=(n??c)!==c;let m="chat";if(r?.main)l.main=r.main;else if(i)i.main!==void 0&&(l.main=i.main),i.sidepanel!==void 0&&(m=i.sidepanel);else if(!d){const h=e.main;h&&typeof h=="string"&&!ht(h)&&(l.main=h)}return l.sidepanel=m,r?.autosend&&(l.autosend=a),l}const Ne="studio:thread-layout:v1",ln=50;function _e(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function cn(t,e,n,o=ln){const i=t.filter(([r])=>r!==e);for(i.push([e,_e(n)]);i.length>o;)i.shift();return i}function ue(){try{const t=sessionStorage.getItem(Ne);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&n.length===2&&typeof n[0]=="string"):[]}catch{return[]}}function Ae(t){try{sessionStorage.setItem(Ne,JSON.stringify(t))}catch{}}function dn(t,e){t&&Ae(cn(ue(),t,e))}function un(t){if(!t)return null;const e=ue().find(([n])=>n===t);return e?_e(e[1]):null}function Fn(t){if(!t)return;const e=ue(),n=e.filter(([o])=>o!==t);n.length!==e.length&&Ae(n)}function Oe(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 Rn(t){const e=k.c(10);let n;e[0]!==t?(n=Oe(t),e[0]=t,e[1]=n):n=e[1];const o=te(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=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 a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function mn(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=fn;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=u):u=e[3];let d;e[4]!==i||e[5]!==o?(d=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=d):d=e[6];let m;e[7]!==d?(m=s.jsxs("div",{className:"space-y-2",children:[u,s.jsx("p",{className:"text-sm text-muted-foreground",children:d})]}),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==a?(h=s.jsx(O,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=h):h=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=p):p=e[11];let f;e[12]!==h?(f=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[12]=h,e[13]=f):f=e[13];let g;return e[14]!==m||e[15]!==f?(g=s.jsxs(H,{children:[c,m,f]}),e[14]=m,e[15]=f,e[16]=g):g=e[16],g}function fn(){window.location.href="/"}function hn(t){const e=k.c(8),{org:n,children:o}=t,r=gt(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let c;return e[4]!==o||e[5]!==n||e[6]!==l?(c=s.jsx(Ke,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=c):c=e[7],c}function gn(){const t=ze(),e=ft(),{org:n,locator:o}=De(),i=we({strict:!1}),r=Ie({strict:!1}),a=i.org??"",l=i.taskId??"",c=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:g,replace:y}),u=(f,g=!0)=>c(l,f,g),d=f=>u(g=>({...g,sidepanel:f})),m=(f,g,y)=>{const w=!!l&&l===f;l&&!w&&dn(l,{main:r.main,sidepanel:r.sidepanel});const b=w?null:un(f),S=he(n.id).id;return c(f,v=>rn({prev:v,virtualMcpId:g,decopilotId:S,savedLayout:b,opts:y,autosendValue:ct}),!1)};return{openSidePanel:d,setTaskId:m,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??r.virtualmcpid??he(n.id).id,b=y===r.virtualmcpid?an(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}m(g,y)},openTab:f=>c(l||crypto.randomUUID(),g=>({...g,main:f}))}}function pn(){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=Me(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=we(i),[a,l]=K.useState(!1),c=Pe(),u=o??"";let d;t[2]!==u?(d=Oe(u),t[2]=u,t[3]=d):d=t[3];const m=!!o&&!r;let h;t[4]!==d||t[5]!==m?(h={...d,enabled:m},t[4]=d,t[5]=m,t[6]=h):h=t[6],te(h);const{data:p}=Y.useSession(),f=p?.user?.id;let g;t[7]!==o||t[8]!==f?(g=o&&f?Fe(f,o):null,t[7]=o,t[8]=f,t[9]=g):g=t[9];const y=g;let w,b;t[10]!==c?(w=()=>{const j=A=>{if(ye(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ye(A)&&A.code==="BracketLeft"&&c.history.canGoBack()&&(A.preventDefault(),c.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[c],t[10]=c,t[11]=w,t[12]=b):(w=t[11],b=t[12]),K.useEffect(w,b);let S;t[13]!==o?(S=se.activeOrganization(o),t[13]=o,t[14]=S):S=t[14];let v;t[15]!==o||t[16]!==f?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:o}}).finally(yn),A=me(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),f&&j&&qe(f,o,j),j},t[15]=o,t[16]=f,t[17]=v):v=t[17];const N=y?y.data:void 0,T=y?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==S?($={queryKey:S,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=S,t[22]=$):$=t[22];const{data:x}=be($),E=x?.id,L=x?.slug,{data:_}=pt(E,L),ie=E??"",ae=L??"";let F;t[23]!==ie||t[24]!==ae?(F=dt({connectionId:ut,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!L;let W;if(t[26]!==F||t[27]!==re?(W={...F,enabled:re},t[26]=F,t[27]=re,t[28]=W):W=t[28],te(W),!x){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ue,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=s.jsx(K.Suspense,{fallback:j,children:s.jsx($t,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(me(x)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==x.name?(j=s.jsx(Re,{orgName:x.name}),t[32]=x.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==x.id||t[35]!==x.name||t[36]!==x.slug||t[37]!==_.domain?(j=s.jsx(mn,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:_.domain}),t[34]=x.id,t[35]=x.name,t[36]=x.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=x.logo??null;let R;t[39]!==x||t[40]!==le?(R={...x,logo:le},t[39]=x,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==x?(q=s.jsx(on,{activeOrg:x}),t[42]=x,t[43]=q):q=t[43];let V,Q;t[44]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ge,{}),Q=s.jsx(Bt,{}),t[44]=V,t[45]=Q):(V=t[44],Q=t[45]);let U;t[46]!==a?(U=s.jsx(Jt,{open:a,onOpenChange:l}),t[46]=a,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(tn,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=s.jsxs(hn,{org:R,children:[q,V,Q,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function yn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function xn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lt,{children:s.jsx(pn,{})}),t[0]=e):e=t[0],e}const qn=Object.freeze(Object.defineProperty({__proto__:null,default:xn,usePanelActions:gn},Symbol.toStringTag,{value:"Module"}));export{C as K,Rn as a,Fn as f,ye as i,an as r,qn as s,gn as u};
@@ -1 +0,0 @@
1
- import{c as b,l as g,j as o,cL as P,cM as R,bP as A,cN as H,cO as L,cP as V,cQ as W,r as T,B as q,bc as G,bB as F}from"./index-CsZhMKFM.js";import{i as Q}from"./LayoutLeft-DvNM8qhm.js";import{u as J}from"./use-mobile-DhhfLpzh.js";import{i as K}from"./X-OFSHASit.js";import{c as I,a as z,b as D,T as k}from"./tooltip-Cs5hng3q.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(R,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(K,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(A,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(H,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function B(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=J(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(I,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=B();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=B();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Q,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(z,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(I,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=B();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(z,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,B as u};
@@ -1 +0,0 @@
1
- import{a4 as D,r as v,j as e,B as p,R as S,t as c,c as N}from"./index-CsZhMKFM.js";import{D as k}from"./domain-settings-C7CfCyw6.js";import{P as f}from"./index-DS3hrf0F.js";import{I as l}from"./input-D5ccsU_1.js";import{S as z}from"./switch-B36ltQ63.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DDm0m5Eb.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-BYCtjEaG.js";import{s as L}from"./Trash01--uX5q_ti.js";import{R as q}from"./require-capability-BjscC7QS.js";import"./studio-tools-CTswP4mA.js";import"./badge-BMMjntMn.js";import"./select-CVMXwLRV.js";import"./tooltip-Cs5hng3q.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./card-Bc92PJFP.js";import"./ArrowUpRight-DdPCnlNm.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.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),j=T(s.id,s.slug),[t,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.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 j.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:j.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,U as le,r as K,a4 as ae,n as ce,b as de,e as me,B as U,R as te,K as fe,d as ge,t as ie}from"./index-CsZhMKFM.js";import{i as ue}from"./AlertCircle-BsA2wZmN.js";import{i as pe}from"./ChevronRight-C3Tgk-3m.js";import{s as xe}from"./Plus-Cgq7ON9K.js";import{s as he}from"./Trash01--uX5q_ti.js";import{I as X}from"./input-D5ccsU_1.js";import{S as oe}from"./switch-B36ltQ63.js";import{S as ye}from"./skeleton-BZzqWIif.js";import{A as ne}from"./avatar-DOYkgu8W.js";import{b as je,P as Ce,a as Se}from"./popover-C5PoRwEk.js";import{b as re}from"./use-connection-CcLotHiI.js";import{W as Z}from"./constants-CaIX_f5U.js";import{P as G}from"./index-DS3hrf0F.js";import{u as ve}from"./use-registry-connections-xg-zrNmx.js";import{i as _e,j as be}from"./use-organization-settings-C4hP3pVq.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BYCtjEaG.js";import{R as Re}from"./require-capability-BjscC7QS.js";import"./User01-5hu8D3_O.js";import"./use-collections-Cl7KVWNQ.js";import"./use-mcp-client-Bv8WGceO.js";import"./auth-D_bm0-t3.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./tooltip-Cs5hng3q.js";import"./studio-tools-CTswP4mA.js";import"./card-Bc92PJFP.js";import"./ArrowUpRight-DdPCnlNm.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.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,S]=K.useState(""),[x,v]=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=>S(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=>v(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(U,{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(U,{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:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,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(U,{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(Se,{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(U,{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]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,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=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,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 Y;t[20]!==n||t[21]!==r?(Y=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=Y):Y=t[22];const H=Y,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(U,{variant:"outline",size:"sm",onClick:()=>S(!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:()=>S(!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],v=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]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=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]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,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-BDNmgEhN.js","assets/index-CsZhMKFM.js","assets/index-DhnTILyr.css","assets/Tool02-CSTMjTef.js","assets/CheckCircle-lXciCGfG.js","assets/Settings02-CS2jOfO5.js","assets/use-mcp-client-Bv8WGceO.js","assets/constants-CaIX_f5U.js","assets/auth-D_bm0-t3.js","assets/useInfiniteQuery-BosqZeNZ.js","assets/use-infinite-scroll-BTdf9pFZ.js","assets/studio-tools-CTswP4mA.js","assets/badge-BMMjntMn.js","assets/input-D5ccsU_1.js","assets/dropdown-menu-C9SSwIby.js","assets/Check-CcLLJc-z.js","assets/ChevronRight-C3Tgk-3m.js","assets/Circle-C_fdyhr8.js","assets/table-CLRsCUXA.js","assets/toggle-group-DkGsY2u-.js","assets/use-view-mode-H6oFviHU.js","assets/use-mobile-DhhfLpzh.js","assets/DotsVertical-CK1a4mKj.js","assets/FilterLines-DCNZa1GS.js","assets/Globe01-B6kdhpV9.js","assets/SearchMd-ZfoTl6vw.js","assets/dialog-DZtdYFi_.js","assets/X-OFSHASit.js","assets/AlertCircle-BsA2wZmN.js","assets/Upload01-BaheeKQP.js","assets/alert-dialog-Bd5XLC3F.js","assets/card-Bc92PJFP.js","assets/Trash01--uX5q_ti.js","assets/label-BULuaMoF.js","assets/select-CVMXwLRV.js","assets/tooltip-Cs5hng3q.js","assets/ChevronDown-BmFaSDo8.js","assets/ChevronUp-Dew3RmKl.js","assets/switch-B36ltQ63.js","assets/textarea-DPLwPKZJ.js","assets/XCircle-D3cI1Aep.js","assets/checkbox-B-y-IHdE.js","assets/Eye-DM8bmzm7.js","assets/LinkExternal01-Ck4lryDE.js","assets/use-copy-B-pxrD6E.js","assets/Copy01-b3lIb5yu.js","assets/Key01-1r4YrQER.js","assets/Plus-Cgq7ON9K.js","assets/mcp-oauth-z9GFPjDo.js","assets/Play-Ci1OqtIO.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,aW as f}from"./index-CsZhMKFM.js";import{R as u}from"./require-capability-BjscC7QS.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.js";const g=l.lazy(()=>f(()=>import("./registry-layout-BDNmgEhN.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,45,46,47,48,49])));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,a4 as i}from"./index-CsZhMKFM.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
@@ -1 +0,0 @@
1
- import{c as h,a4 as I,K as T,P as b,$ as C,aK as $,j as o}from"./index-CsZhMKFM.js";import{i as k}from"./mcp-oauth-z9GFPjDo.js";import{B as x}from"./badge-BMMjntMn.js";import{T as y,a as j,b as g,c as N}from"./tooltip-Cs5hng3q.js";import{g as S}from"./index-DPzJsdBC.js";import{s as _}from"./Eye-DM8bmzm7.js";import{s as A}from"./Star01-2DHf7kTZ.js";import{as as P}from"./agent-icon-dPkJbbXq.js";function M(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=b,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>k({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const w=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:$,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function D(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=S(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?w.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=N,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(P,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(H)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function H(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{D as T,M as u};
@@ -1 +0,0 @@
1
- import{c as d,a4 as f,P,K as m,m as K}from"./index-CsZhMKFM.js";import{u as S,c as T}from"./studio-tools-CTswP4mA.js";function g(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await T(s,"AI_PROVIDER_KEY_LIST",{})}}function R(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:r}=P(l);return r}function p(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=g(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function q(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let r;e[3]!==s||e[4]!==i?(r=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=r):r=e[5];let n;e[6]!==t||e[7]!==l||e[8]!==r?(n={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=n):n=e[9];const{data:a,isLoading:_}=K(n);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==t||e[7]!==l?(r={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=r):r=e[8];const{data:n}=P(r);let a;return e[9]!==n?.models?(a=n?.models??[],e[9]=n?.models,e[10]=a):a=e[10],a}export{q as a,R as b,A as c,p as u};
@@ -1 +0,0 @@
1
- import{c as U,a4 as q,K as T,m as I,n as x,d as y,t as m}from"./index-CsZhMKFM.js";import{u as z}from"./use-mcp-client-Bv8WGceO.js";import{S as J}from"./constants-CaIX_f5U.js";import{u as Q}from"./studio-tools-CTswP4mA.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 it(t){const e=U.c(12),{org:s}=q(),l=t??J;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=z(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 r=!!t;let c;return e[8]!==n||e[9]!==o||e[10]!==r?(c={queryKey:n,queryFn:o,enabled:r,staleTime:3e4},e[8]=n,e[9]=o,e[10]=r,e[11]=c):c=e[11],I(c)}function ot(t){const e=U.c(9),{org:s}=q(),l=Q();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 at(t){const e=U.c(10),{org:s}=q(),l=Q();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 nt(t,e){const s=U.c(12),{org:l}=q(),a=Q();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 r;return s[8]!==i||s[9]!==n||s[10]!==o?(r={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=r):r=s[11],I(r)}function lt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function ut(){const t=U.c(64),{org:e}=q(),s=Q(),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 r;t[6]!==s?(r=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=r):r=t[7];let c;t[8]!==i?(c=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=c):c=t[9];let d;t[10]!==r||t[11]!==c?(d={mutationFn:r,onSuccess:c,onError:X},t[10]=r,t[11]=c,t[12]=d):d=t[12];const D=y(d);let p;t[13]!==s?(p=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=p):p=t[14];let A;t[15]!==i||t[16]!==o?(A=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=A):A=t[17];let G;t[18]!==p||t[19]!==A?(G={mutationFn:p,onSuccess:A,onError:W},t[18]=p,t[19]=A,t[20]=G):G=t[20];const j=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 k=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]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,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{it as a,at as b,ot as c,lt as d,nt as e,ut as u};
@@ -1 +0,0 @@
1
- import{c as u,a4 as m,m as g,K as p}from"./index-CsZhMKFM.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
@@ -1 +0,0 @@
1
- import{c as f,a4 as C}from"./index-CsZhMKFM.js";import{a as N,b as O,u as S}from"./use-collections-Cl7KVWNQ.js";import{u as I}from"./use-mcp-client-Bv8WGceO.js";import{S as m}from"./constants-CaIX_f5U.js";function _(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function x(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function L(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{x as a,L as b,_ as u};
@@ -1 +0,0 @@
1
- import{a4 as ke,a as en,a1 as un,M as mn,J as pn,j as e,B as J,t as X,r as le,n as hn,b as fn,i as Se,R as C,K as pe,c as xn,a2 as gn,Y as jn,l as vn,m as yn}from"./index-CsZhMKFM.js";import{g as _n}from"./connection-slug-eyAPH6o3.js";import{u as nn,a as tn,g as Cn,C as Le}from"./connection-card-CXwWR_5h.js";import{C as bn}from"./collection-search-DSP3ov6A.js";import{C as Nn}from"./collection-tabs-PTC62n_G.js";import{a as wn,b as Sn,e as In,g as kn}from"./extract-connection-data-Di6SAuY0.js";import{e as sn,d as on,D as an,a as rn,f as An,c as Dn}from"./dialog-DZtdYFi_.js";import{D as Pn,a as Tn,c as Fn,b as Vn,d as Mn,e as Bn,f as On}from"./drawer-Ck_Oak77.js";import{u as Ln}from"./use-mobile-DhhfLpzh.js";import{F as O,b as L,c as R,d as $,e as E,a as Qe}from"./form-YJrSMpNL.js";import{I as Y}from"./input-D5ccsU_1.js";import{S as Rn,a as $n,b as En,c as zn,d as me}from"./select-CVMXwLRV.js";import{T as Kn}from"./textarea-DPLwPKZJ.js";import{b as cn}from"./use-connection-CcLotHiI.js";import{n as Ie,i as Re}from"./Tool02-CSTMjTef.js";import{s as $e}from"./Star01-2DHf7kTZ.js";import{am as Hn}from"./agent-icon-dPkJbbXq.js";import{s as Un}from"./XClose-D5Ra7e-f.js";import{c as Xn,i as Ne,a as We,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-POWe2kJ-.js";import{u as Ye}from"./use-infinite-scroll-BTdf9pFZ.js";import{a as Ee}from"./authenticate-and-persist-oauth-ClCvWDci.js";import{B as we}from"./badge-BMMjntMn.js";import{T as ze,a as Ke,b as He}from"./tooltip-Cs5hng3q.js";import{u as Yn}from"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import{u as Jn}from"./use-mcp-client-Bv8WGceO.js";import{S as Zn}from"./constants-CaIX_f5U.js";import{i as Je}from"./Check-CcLLJc-z.js";import{s as et}from"./Plus-Cgq7ON9K.js";import{u as nt}from"./studio-tools-CTswP4mA.js";import{u as tt}from"./use-ai-providers-D77UFwvU.js";function Ue(s){const n=s?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!s?.connections?.some(S=>S.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function Kt(s){const n=Ue(s);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ht(s){if(typeof s!="object"||s===null)return!1;const m=s.githubRepo?.url;return typeof m=="string"&&m.length>0}function Ut(s){return Ue(s).status==="attached"}function Xt(s){const n=Ue(s).status;return n==="attached"||n==="detached"}function qt(s){const n=new Set;for(const m of s??[]){const g=m.metadata?.liveAgentId;typeof g=="string"&&g&&n.add(m.id)}return n}function Gt(s,n){if(!s)return null;const m=s.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const g=(n??[]).find(h=>h.metadata?.liveAgentId===s.id);return g?{mode:"live",targetId:g.id}:null}function st({open:s,onOpenChange:n,onCreated:m}){const{org:g}=ke(),{data:h}=en.useSession(),{stdioEnabled:S}=un(),D=Ln(),z=cn(),l=nn(),P=tn(l,"").items,o=mn({resolver:pn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=o.watch("ui_type"),I=o.watch("connection_url"),F=o.watch("npx_package"),x=Ne({uiType:f,connectionUrl:I??"",npxPackage:F??""})??We({uiType:f,connectionUrl:I??"",registryItems:P}),r=t=>{const d=t.trim();if(!d)return;const a=!!o.formState.dirtyFields.title,c=!!o.formState.dirtyFields.description,j=!!o.formState.dirtyFields.env_vars,N=u=>{if(u&&(!a&&!o.getValues("title").trim()&&u.title&&o.setValue("title",u.title,{shouldDirty:!1}),!c&&!(o.getValues("description")??"").trim()&&u.description&&o.setValue("description",u.description,{shouldDirty:!1}),!j&&u.envVarKeys?.length)){const w=o.getValues("env_vars")??[],q=new Set(w.map(M=>M.key)),he=u.envVarKeys.filter(M=>!q.has(M));he.length>0&&o.setValue("env_vars",[...w,...he.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},v=Gn(d);if(v&&S){o.setValue("ui_type","NPX",{shouldDirty:!0}),o.setValue("npx_package",v.packageName,{shouldDirty:!0}),o.setValue("connection_url","",{shouldDirty:!0}),o.setValue("connection_token",null,{shouldDirty:!0}),N(Ne({uiType:"NPX",npxPackage:v.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const u=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";o.setValue("ui_type",u,{shouldDirty:!0}),o.setValue("connection_url",d,{shouldDirty:!0}),N(Ne({uiType:u,connectionUrl:d})??We({uiType:u,connectionUrl:d,registryItems:P}));return}f==="NPX"&&N(Ne({uiType:"NPX",npxPackage:d}))},K=t=>{t||o.reset(),n(t)},b=async t=>{let d,a=null,c=null,j=null;t.ui_type==="NPX"?(d="STDIO",a="",j=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",a="",j=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,a=t.connection_url||"",c=t.connection_token||null);const N=wn("conn");try{await z.create.mutateAsync({id:N,title:t.title,description:t.description||null,connection_type:d,connection_url:a,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:g.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:j,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),o.reset(),n(!1),m?.(N)}catch{X.error("Failed to create connection")}},k="Create Connection",H="Create a custom connection in your organization. Fill in the details below.",_=o.formState.isSubmitting?"Saving...":"Create Connection",V=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:o.control,name:"ui_type",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Type *"}),e.jsxs(Rn,{value:t.value,onValueChange:t.onChange,children:[e.jsx($,{children:e.jsx($n,{children:e.jsx(En,{})})}),e.jsxs(zn,{children:[e.jsx(me,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"HTTP"]})}),e.jsx(me,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"SSE"]})}),e.jsx(me,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{className:"w-4 h-4"}),"Websocket"]})}),S&&e.jsxs(e.Fragment,{children:[e.jsx(me,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"w-4 h-4"}),"NPX Package"]})}),e.jsx(me,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Hn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),e.jsx(E,{})]})}),f==="NPX"&&e.jsx(O,{control:o.control,name:"npx_package",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"NPM Package *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("npx_package",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),f==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:o.control,name:"stdio_command",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Command *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"node, bun, python...",...t,value:t.value??""})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"stdio_args",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Arguments"}),e.jsx($,{children:e.jsx(Y,{placeholder:"arg1 arg2 --flag value",...t,value:t.value??""})}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Working Directory"}),e.jsx($,{children:e.jsx(Y,{placeholder:"/path/to/project (optional)",...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),e.jsx(E,{})]})})]}),(f==="NPX"||f==="STDIO")&&e.jsx(O,{control:o.control,name:"env_vars",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Environment Variables"}),e.jsx($,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(E,{})]})}),f!=="NPX"&&f!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:o.control,name:"connection_url",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"URL *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"https://example.com/mcp",...t,value:t.value??"",onPaste:d=>{const a=d.clipboardData.getData("text");a&&(d.preventDefault(),o.setValue("connection_url",a.trim(),{shouldDirty:!0}),r(a))},onBlur:d=>{r(d.target.value),t.onBlur()}})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"connection_token",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:x?.token?.label??"Token (optional)"}),e.jsx($,{children:e.jsx(Y,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...t,value:t.value??""})}),x?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),e.jsx(E,{})]})})]}),e.jsx(O,{control:o.control,name:"title",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Name *"}),e.jsx($,{children:e.jsx(Y,{placeholder:"My Connection",...t})}),e.jsx(E,{})]})}),e.jsx(O,{control:o.control,name:"description",render:({field:t})=>e.jsxs(L,{children:[e.jsx(R,{children:"Description"}),e.jsx($,{children:e.jsx(Kn,{placeholder:"A brief description of this connection",rows:3,...t,value:t.value??""})}),e.jsx(E,{})]})})]});return D?e.jsx(Pn,{open:s,onOpenChange:K,children:e.jsxs(Tn,{className:"max-h-[90vh]",children:[e.jsx(Fn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Vn,{children:k}),e.jsx(Mn,{className:"mt-1",children:H})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(J,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:V}),e.jsx(On,{children:e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"w-full",children:_})})]})})]})}):e.jsx(sn,{open:s,onOpenChange:K,children:e.jsxs(on,{className:"sm:max-w-[525px]",children:[e.jsxs(an,{children:[e.jsx(rn,{children:k}),e.jsx(An,{children:H})]}),e.jsx(Qe,{...o,children:e.jsxs("form",{onSubmit:o.handleSubmit(b),children:[e.jsx("div",{className:"py-4",children:V}),e.jsxs(Dn,{children:[e.jsx(J,{type:"button",variant:"outline",onClick:()=>K(!1),children:"Cancel"}),e.jsx(J,{type:"submit",disabled:o.formState.isSubmitting,className:"min-w-40",children:_})]})]})})]})})}function ot(s){const n=xn.c(68),{mode:m,agentId:g,addedConnectionIds:h,onAdd:S,onCloneAndAdd:D,onConnectAndAdd:z,connectingItemId:l,search:y,onCreateConnection:P,onBrowseNavigate:o,defaultTab:f}=s,I=m===void 0?"add":m,F=f===void 0?"connected":f,{org:x}=ke(),r=le.useDeferredValue(y),K=y!==r;let b;n[0]!==r?(b=r.trim().toLowerCase(),n[0]=r,n[1]=b):b=n[1];const k=b;let H;n[2]!==F?(H=i=>i??F,n[2]=F,n[3]=H):H=n[3];const[_,V]=gn(jn.connectionsTab(x.slug)+(F==="all"?":home-modal":":agent-modal"),H);let t;n[4]!==_||n[5]!==V?(t=i=>{i!==_&&C("connections_dialog_tab_changed",{to_tab:i}),V(i)},n[4]=_,n[5]=V,n[6]=t):t=n[6];const d=t;let a;n[7]!==x.id||n[8]!==x.slug?(a={connectionId:Zn,orgId:x.id,orgSlug:x.slug},n[7]=x.id,n[8]=x.slug,n[9]=a):a=n[9];const c=Jn(a),j=r?.trim().split(/\s+/).filter(Boolean)??[],N=j.length>0?{operator:"or",conditions:j.flatMap(mt)}:void 0,v={...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},u=JSON.stringify(v),{data:w,fetchNextPage:q,hasNextPage:he,isFetchingNextPage:M}=Yn({queryKey:pe.collectionListInfinite(c,x.id,"","CONNECTIONS",u),queryFn:async i=>{const{pageParam:p}=i,U=p===void 0?0:p;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...N&&{where:N},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:U}})).structuredContent},initialPageParam:0,getNextPageParam:dt,staleTime:3e4}),Xe=w?.pages.flatMap(lt)??[],fe=Cn(Xe),ln=new Set(Xe.filter(ct).map(rt)),xe=nn(),G=tn(xe,r),Ae=Ye(G.loadMore,G.hasMore,G.isLoadingMore),De=Ye(q,he??!1,M),T=_==="all"||!!k,qe=T?G.items.filter(i=>{const p=Sn(i);if(p&&ln.has(p))return!1;if(!k)return!0;const U=i._meta?.["mcp.mesh"],Q=[i.title,i.description,i.name,i.server?.title,i.server?.description,i.server?.name,U?.friendly_name,U?.friendlyName].filter(Boolean).join(" ").toLowerCase();return j.some(B=>Q.includes(B.toLowerCase()))}):[],de=qe.filter(it),ue=qe.filter(at);let ge;n[10]!==h?(ge=i=>i.some(p=>h.has(p.id)),n[10]=h,n[11]=ge):ge=n[11];const Pe=ge;let je;n[12]!==h||n[13]!==g||n[14]!==l||n[15]!==Pe||n[16]!==I||n[17]!==S||n[18]!==o||n[19]!==D?(je=(i,p,U,Q,B)=>{const be=Pe(B),ce=B.find(W=>!h.has(W.id)),A=B[0];if(I==="browse"){const W=_n(A);return e.jsx(Le,{connection:{title:p,icon:U,description:B.length>1?`${B.length} instances`:Q??void 0},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Connected"]}),onClick:()=>{C("connection_browse_clicked",{app_name:A.app_name??null,connection_id:A.id,instances_count:B.length}),o?.(W)}},i)}return e.jsx(Le,{connection:{title:p,icon:U,description:Q},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[be&&e.jsxs(we,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(Je,{size:11})," Added"]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),ce?(C("connection_add_clicked",{action:"use_existing",app_name:A.app_name??null,connection_id:ce.id}),g&&C("agent_connection_attached",{agent_id:g,connection_id:ce.id,app_name:A.app_name??null,mode:"existing"}),S(ce.id)):(C("connection_add_clicked",{action:"clone",app_name:A.app_name??null,base_connection_id:A.id}),D(A))},children:"Add"})]})},i)},n[12]=h,n[13]=g,n[14]=l,n[15]=Pe,n[16]=I,n[17]=S,n[18]=o,n[19]=D,n[20]=je):je=n[20];const ve=je;let ye;n[21]!==l||n[22]!==I||n[23]!==z?(ye=i=>{const p=i._meta?.["mcp.mesh"],U=p?.friendlyName||p?.friendly_name||i.server?.title||i.title||i.server?.name||i.name||i.id||"",Q=i.server?.description||i.description||null,B=i.server?.icons?.[0]?.src||kn(i.server?.repository)||null,be=p?.official===!0,ce=p?.verified===!0,A=p?.owner==="deco";return e.jsx(Le,{connection:{title:U,description:Q,icon:B},fallbackIcon:e.jsx(Ie,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),e.jsx(He,{children:"Built and maintained by Deco"})]}),!A&&be&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Built and maintained by the official vendor"})]}),!A&&!be&&ce&&e.jsxs(ze,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(we,{variant:"outline",size:"icon",children:e.jsx(Re,{})})}),e.jsx(He,{children:"Verified by the Deco team"})]}),e.jsx(J,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:W=>{W.stopPropagation(),C("connection_add_clicked",{action:"connect_new",registry_item_id:i.id,app_name:p?.friendlyName||i.server?.name||i.name||null}),z(i)},children:l===i.id?e.jsx(Se,{size:14,className:"animate-spin"}):I==="browse"?"Connect":"Add"})]})},`catalog-${i.id}`)},n[21]=l,n[22]=I,n[23]=z,n[24]=ye):ye=n[24];const Ge=ye;let Z;n[25]!==_||n[26]!==d||n[27]!==P||n[28]!==k?(Z=!k&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Nn,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:_,onTabChange:i=>d(i)}),e.jsxs(J,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{C("connections_dialog_custom_clicked"),P()},children:[e.jsx(et,{size:12}),"Custom Connection"]})]}),n[25]=_,n[26]=d,n[27]=P,n[28]=k,n[29]=Z):Z=n[29];const Te=K&&"opacity-50 pointer-events-none";let ee;n[30]!==Te?(ee=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Te),n[30]=Te,n[31]=ee):ee=n[31];const dn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let _e;n[32]!==ve?(_e=i=>{if(i.type==="group")return ve(i.key,i.title,i.icon,null,i.connections);const p=i.connection;return ve(p.id,p.title,p.icon,p.description??null,[p])},n[32]=ve,n[33]=_e):_e=n[33];const Fe=fe.map(_e);let ne;n[34]!==De?(ne=e.jsx("div",{ref:De,className:"col-span-full h-1"}),n[34]=De,n[35]=ne):ne=n[35];let te;n[36]!==M?(te=M&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[36]=M,n[37]=te):te=n[37];const Ve=T&&de.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Re,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Me=T&&de.map(Ge),Be=T&&ue.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Oe=T&&ue.map(Ge);let se;n[38]!==Ae||n[39]!==xe||n[40]!==T?(se=T&&xe.length>0&&e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[38]=Ae,n[39]=xe,n[40]=T,n[41]=se):se=n[41];let oe;n[42]!==G.isLoadingMore||n[43]!==T?(oe=T&&G.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),n[42]=G.isLoadingMore,n[43]=T,n[44]=oe):oe=n[44];let ae;n[45]!==Fe||n[46]!==ne||n[47]!==te||n[48]!==Ve||n[49]!==Me||n[50]!==Be||n[51]!==Oe||n[52]!==se||n[53]!==oe?(ae=e.jsxs("div",{className:dn,children:[Fe,ne,te,Ve,Me,Be,Oe,se,oe]}),n[45]=Fe,n[46]=ne,n[47]=te,n[48]=Ve,n[49]=Me,n[50]=Be,n[51]=Oe,n[52]=se,n[53]=oe,n[54]=ae):ae=n[54];let ie;n[55]!==_||n[56]!==fe.length||n[57]!==ue||n[58]!==y||n[59]!==de?(ie=fe.length===0&&de.length===0&&ue.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:y?`No connections match "${y}"`:_==="connected"?"No connections yet":"No connections available"}),n[55]=_,n[56]=fe.length,n[57]=ue,n[58]=y,n[59]=de,n[60]=ie):ie=n[60];let re;n[61]!==ee||n[62]!==ae||n[63]!==ie?(re=e.jsxs("div",{className:ee,children:[ae,ie]}),n[61]=ee,n[62]=ae,n[63]=ie,n[64]=re):re=n[64];let Ce;return n[65]!==Z||n[66]!==re?(Ce=e.jsxs(e.Fragment,{children:[Z,re]}),n[65]=Z,n[66]=re,n[67]=Ce):Ce=n[67],Ce}function at(s){return!s.verified&&!s._meta?.["mcp.mesh"]?.verified&&!s.meta?.verified}function it(s){return s.verified||s._meta?.["mcp.mesh"]?.verified||s.meta?.verified}function rt(s){return s.app_name}function ct(s){return s.app_name}function lt(s){return s?.items??[]}function dt(s,n){if(s?.hasMore)return n.reduce(ut,0)}function ut(s,n){return s+(n?.items?.length??0)}function mt(s){return[{field:["title"],operator:"contains",value:s},{field:["description"],operator:"contains",value:s}]}function Qt({open:s,onOpenChange:n,defaultTab:m,initialSearch:g="",...h}){const S=h.mode??"add",D="agentId"in h?h.agentId:void 0,z="addedConnectionIds"in h?h.addedConnectionIds??new Set:new Set,l="onAdd"in h&&h.onAdd?h.onAdd:a=>{},y=(a,c,j)=>{D&&C("agent_connection_attached",{agent_id:D,connection_id:a,app_name:c,mode:j})},[P,o]=le.useState(null),[f,I]=le.useState(g),[F,x]=le.useState(!1),{org:r}=ke(),{data:K}=en.useSession(),b=cn(),k=hn(),H=fn(),_=a=>{n(!1),H({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:a}})},V=()=>{k.invalidateQueries({predicate:a=>{const c=a.queryKey;return c[1]===r.id&&c[3]==="collection"&&c[4]==="CONNECTIONS"}})},t=async a=>{o(a.app_name??a.id);try{const j=`${a.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,v=(await b.create.mutateAsync({title:j,description:a.description??null,connection_type:a.connection_type,connection_url:a.connection_url??null,connection_token:null,icon:a.icon??null,app_name:a.app_name??null,app_id:a.app_id??null,connection_headers:a.connection_headers??null})).id,u=await Ee({connectionId:v,orgId:r.id,orgSlug:r.slug,persistFallback:w=>b.update.mutateAsync({id:v,data:{connection_token:w}}).then(()=>{})});if(u.ran&&!u.ok){C("connection_oauth_failed",{connection_id:v,flow:"clone",error:u.error??"no_token"}),X.error(`Authentication failed: ${u.error??"no token received"}`),await b.delete.mutateAsync(v);return}if(u.ran){C("connection_oauth_succeeded",{connection_id:v,flow:"clone"});const w=new URL(`/api/${r.slug}/mcp/${v}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(w.href,null)}),V()}y(v,a.app_name??null,"clone"),l(v)}catch(c){console.error("Failed to add connection:",c),X.error("Failed to add connection")}finally{o(null)}},d=async a=>{if(!(!r||!K?.user?.id)){o(a.id);try{const c=In(a,r.id,K.user.id,{remoteIndex:0}),j=c.connection_type==="STDIO",N=!!c.connection_url,v=j&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!N&&!v){X.error("This MCP Server cannot be connected: no connection method available"),o(null);return}const{id:u}=await b.create.mutateAsync(c),w=await Ee({connectionId:u,orgId:r.id,orgSlug:r.slug,persistFallback:q=>b.update.mutateAsync({id:u,data:{connection_token:q}}).then(()=>{})});if(w.ran&&!w.ok){C("connection_oauth_failed",{connection_id:u,flow:"connect_new",error:w.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${w.error??"no token received"})`}),y(u,c.app_name??null,"new"),l(u);return}if(w.ran){C("connection_oauth_succeeded",{connection_id:u,flow:"connect_new"});const q=new URL(`/api/${r.slug}/mcp/${u}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(q.href,null)}),V(),X.success("Connected and authenticated")}else X.success("Connected");y(u,c.app_name??null,"new"),l(u)}catch(c){console.error("Failed to connect:",c),X.error("Failed to connect")}finally{o(null)}}};return e.jsxs(sn,{open:s,onOpenChange:n,children:[e.jsxs(on,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(an,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(rn,{className:"text-base font-semibold",children:S==="browse"?"Connections":"Add Connection"})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(bn,{value:f,onChange:I,placeholder:"Search connections..."})}),e.jsx(le.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(Se,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(ot,{mode:S,agentId:D,addedConnectionIds:z,onAdd:l,onCloneAndAdd:t,onConnectAndAdd:d,connectingItemId:P,search:f,onCreateConnection:()=>x(!0),onBrowseNavigate:_,defaultTab:m})})]}),e.jsx(st,{open:F,onOpenChange:x,onCreated:async a=>{x(!1);const c=await Ee({connectionId:a,orgId:r.id,orgSlug:r.slug,persistFallback:j=>b.update.mutateAsync({id:a,data:{connection_token:j}}).then(()=>{})});if(c.ran&&!c.ok){C("connection_oauth_failed",{connection_id:a,flow:"custom_create",error:c.error??"no_token"}),X.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${c.error??"no token received"})`}),y(a,null,"custom"),l(a),n(!1);return}if(c.ran){C("connection_oauth_succeeded",{connection_id:a,flow:"custom_create"});const j=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin);await k.invalidateQueries({queryKey:pe.isMCPAuthenticated(j.href,null)}),V()}y(a,null,"custom"),l(a),n(!1)}})]})}const Ze=new Map;function Wt(){const{org:s}=ke(),n=nt(),m=tt(),g=m.find(r=>r.providerId==="deco"),{data:h,isLoading:S,refetch:D,isFetching:z}=yn({queryKey:pe.aiProviderCredits(s.id,"deco"),enabled:!!g,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=h?.balanceCents??null,y=l!=null?l/100:null,P=le.useRef(new Map);if(l!=null){const r=Ze.get(s.id);P.current.get(s.id)&&r!=null&&l>r&&C("credits_topped_up_detected",{organization_id:s.id,delta_cents:l-r,previous_balance_cents:r,new_balance_cents:l}),Ze.set(s.id,l),P.current.set(s.id,!0)}const o=!!g,f=l!=null&&l>0,I=l!=null&&l===0,F=l!=null&&l===200,x=m.length>0&&m.every(r=>r.providerId==="deco");return{hasDecoKey:o,decoKeyId:g?.id??null,balanceCents:l,balanceDollars:y,hasCredits:f,isZeroBalance:I,isInitialFreeCredit:F,hasOnlyDecoProvider:x,isLoading:S,isFetching:z,refetch:D}}export{Qt as A,Ht as a,Kt as b,Ut as c,Xt as d,Gt as f,qt as g,Ue as r,Wt as u};
@@ -1 +0,0 @@
1
- import{c as H,j as t,a4 as Q,n as J,r as M,t as F,ba as P,bb as Y}from"./index-CsZhMKFM.js";import{c as I,b as L,d as R,A as q,e as U,g as k,a as K,f as $}from"./alert-dialog-Bd5XLC3F.js";import{u as z}from"./studio-tools-CTswP4mA.js";function W(T){const e=H.c(41),{deleteState:s,cancelDelete:c,confirmDelete:i,confirmForceDelete:l}=T,N=s.mode==="deleting";let r;e[0]!==c?(r=w=>{w||c()},e[0]=c,e[1]=r):r=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(I,{children:"Delete Connection?"}),e[2]=f):f=e[2];const S=s.mode==="deleting"&&s.connection.title;let u;e[3]!==S?(u=t.jsxs(L,{children:[f,t.jsxs(R,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:S}),"."]})]}),e[3]=S,e[4]=u):u=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(q,{children:"Cancel"}),e[5]=E):E=e[5];let h;e[6]!==i?(h=t.jsxs(U,{children:[E,t.jsx(k,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[6]=i,e[7]=h):h=e[7];let n;e[8]!==u||e[9]!==h?(n=t.jsxs(K,{children:[u,h]}),e[8]=u,e[9]=h,e[10]=n):n=e[10];let o;e[11]!==N||e[12]!==r||e[13]!==n?(o=t.jsx($,{open:N,onOpenChange:r,children:n}),e[11]=N,e[12]=r,e[13]=n,e[14]=o):o=e[14];const a=s.mode==="force-deleting";let d;e[15]!==c?(d=w=>{w||c()},e[15]=c,e[16]=d):d=e[16];let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(I,{children:"Connection Used by Agents"}),e[17]=m):m=e[17];const _=s.mode==="force-deleting"&&s.connection.title;let g;e[18]!==_?(g=t.jsx("span",{className:"font-medium text-foreground",children:_}),e[18]=_,e[19]=g):g=e[19];const A=s.mode==="force-deleting"&&s.agentNames;let x;e[20]!==A?(x=t.jsx("span",{className:"font-medium text-foreground",children:A}),e[20]=A,e[21]=x):x=e[21];let C;e[22]!==g||e[23]!==x?(C=t.jsxs("p",{children:["The connection"," ",g," ","is currently used by the following agent(s):"," ",x,"."]}),e[22]=g,e[23]=x,e[24]=C):C=e[24];let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."}),e[25]=b):b=e[25];let D;e[26]!==C?(D=t.jsxs(L,{children:[m,t.jsx(R,{asChild:!0,children:t.jsxs("div",{children:[C,b]})})]}),e[26]=C,e[27]=D):D=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(q,{children:"Cancel"}),e[28]=O):O=e[28];let j;e[29]!==l?(j=t.jsxs(U,{children:[O,t.jsx(k,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]}),e[29]=l,e[30]=j):j=e[30];let p;e[31]!==D||e[32]!==j?(p=t.jsxs(K,{children:[D,j]}),e[31]=D,e[32]=j,e[33]=p):p=e[33];let y;e[34]!==a||e[35]!==d||e[36]!==p?(y=t.jsx($,{open:a,onOpenChange:d,children:p}),e[34]=a,e[35]=d,e[36]=p,e[37]=y):y=e[37];let v;return e[38]!==y||e[39]!==o?(v=t.jsxs(t.Fragment,{children:[o,y]}),e[38]=y,e[39]=o,e[40]=v):v=e[40],v}function X({onSuccess:T}={}){const{org:e}=Q(),s=J(),c=z(),[i,l]=M.useState({mode:"idle"}),N=()=>{s.invalidateQueries({predicate:n=>{const o=n.queryKey;return o[1]===e.id&&o[3]==="collection"&&o[4]==="CONNECTIONS"}})},r=n=>{P(n),s.invalidateQueries({predicate:o=>o.queryKey[1]===Y&&o.queryKey[3]===n})},f=n=>{N(),r(n),F.success("Connection deleted successfully"),l({mode:"idle"}),T?.()};return{deleteState:i,requestDelete:n=>{l({mode:"deleting",connection:n})},cancelDelete:()=>{l({mode:"idle"})},confirmDelete:async()=>{if(i.mode!=="deleting")return;const n=i.connection;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n.id}),f(n.id)}catch(o){const a=o instanceof Error?o.message:String(o),d=a.replace(/^Error:\s*/,"");try{const m=JSON.parse(d);if(m.code==="CONNECTION_IN_USE"&&m.agentNames){l({mode:"force-deleting",connection:n,agentNames:m.agentNames.map(_=>`"${_}"`).join(", ")});return}}catch{}F.error(`Failed to delete connection: ${a}`)}},confirmForceDelete:async()=>{if(i.mode!=="force-deleting")return;const n=i.connection.id;l({mode:"idle"});try{await c.call("COLLECTION_CONNECTIONS_DELETE",{id:n,force:!0}),f(n)}catch(o){const a=o instanceof Error?o.message:String(o);F.error(`Failed to delete connection: ${a}`)}}}}export{W as D,X as u};
@@ -1 +0,0 @@
1
- import{c as u,a4 as c,K as r,P as y,n as C,d,m as F}from"./index-CsZhMKFM.js";import{u as f}from"./studio-tools-CTswP4mA.js";function E(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=y(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],F(s)}function q(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_CREATE",{...a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}function _(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_DELETE",{id:a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],d(l)}export{I as a,q as b,_ as c,E as u};
@@ -1 +0,0 @@
1
- import{Q as d,dI as l,dJ as v,r as i}from"./index-CsZhMKFM.js";var p=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,u=super.createResult(e,t),{isFetching:r,isRefetching:h,isError:a,isRefetchError:g}=u,s=n.fetchMeta?.fetchMore?.direction,o=a&&s==="forward",P=r&&s==="forward",c=a&&s==="backward",f=r&&s==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,n.data),hasPreviousPage:l(t,n.data),isFetchNextPageError:o,isFetchingNextPage:P,isFetchPreviousPageError:c,isFetchingPreviousPage:f,isRefetchError:g&&!o&&!c,isRefetching:h&&!P&&!f}}};function b(e,t,n=!1,u){const r=i.useRef(null),h=i.useRef(null),a=i.useRef(e),g=i.useRef(t),s=i.useRef(n),o=i.useRef(u);a.current=e,g.current=t,s.current=n,o.current=u;const[P]=i.useState(()=>c=>{h.current=c,r.current&&(r.current.disconnect(),r.current=null),c&&queueMicrotask(()=>{if(h.current!==c)return;const f=new IntersectionObserver(R=>{R[0]?.isIntersecting&&g.current&&!s.current&&a.current()},{root:o.current?.current??null,rootMargin:"0px 0px 200px 0px"});f.observe(c),r.current=f})});return P}export{p as I,b as u};
@@ -1 +0,0 @@
1
- import{c as g,a4 as N,K as y,m as _,n as A,d as I,t as q}from"./index-CsZhMKFM.js";import{a as S}from"./use-capability-DmeYLlad.js";import{u as O}from"./studio-tools-CTswP4mA.js";function F(){const e=g.c(10),{org:r}=N(),u=O(),{capabilities:a,isPrivileged:c}=S(),d=c||!!a["members:manage"];let t;e[0]!==r.id?(t=y.organizationJoinRequests(r.id),e[0]=r.id,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=u,e[3]=s):s=e[3];const i=!!r.id&&d;let n;e[4]!==t||e[5]!==s||e[6]!==i?(n={queryKey:t,queryFn:s,enabled:i},e[4]=t,e[5]=s,e[6]=i,e[7]=n):n=e[7];const{data:l}=_(n);let o;return e[8]!==l?.requests?(o=l?.requests??[],e[8]=l?.requests,e[9]=o):o=e[9],o}function K(){const e=g.c(21),{org:r,locator:u}=N(),a=O(),c=A();let d;e[0]!==u||e[1]!==r||e[2]!==c?(d=()=>{c.invalidateQueries({queryKey:y.organizationJoinRequests(r.id)}),c.invalidateQueries({queryKey:y.members(u)})},e[0]=u,e[1]=r,e[2]=c,e[3]=d):d=e[3];const t=d;let s;e[4]!==a?(s=R=>a.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:R}),e[4]=a,e[5]=s):s=e[5];let i;e[6]!==t?(i=()=>{t(),q.success("Request approved")},e[6]=t,e[7]=i):i=e[7];let n;e[8]!==s||e[9]!==i?(n={mutationFn:s,onSuccess:i,onError:v},e[8]=s,e[9]=i,e[10]=n):n=e[10];const l=I(n);let o;e[11]!==a?(o=R=>a.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:R}),e[11]=a,e[12]=o):o=e[12];let f;e[13]!==t?(f=()=>{t(),q.success("Request denied")},e[13]=t,e[14]=f):f=e[14];let m;e[15]!==o||e[16]!==f?(m={mutationFn:o,onSuccess:f,onError:T},e[15]=o,e[16]=f,e[17]=m):m=e[17];const E=I(m);let p;return e[18]!==l||e[19]!==E?(p={approve:l,deny:E},e[18]=l,e[19]=E,e[20]=p):p=e[20],p}function T(e){return q.error(e instanceof Error?e.message:"Failed to deny")}function v(e){return q.error(e instanceof Error?e.message:"Failed to approve")}export{K as a,F as u};
@@ -1 +0,0 @@
1
- import{c as n,a4 as i,P as a,K as l}from"./index-CsZhMKFM.js";import{u as m}from"./use-org-auth-client-DYoTiK8H.js";function p(){const e=n.c(7),{locator:o}=i(),u=m();let t;e[0]!==o?(t=l.members(o),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.organization.listMembers(),e[2]=u,e[3]=s):s=e[3];let r;return e[4]!==t||e[5]!==s?(r={queryKey:t,queryFn:s},e[4]=t,e[5]=s,e[6]=r):r=e[6],a(r)}export{p as u};
@@ -1 +0,0 @@
1
- import{Y as y,r as c,c as b,j as A,b as C,a4 as E,a as $}from"./index-CsZhMKFM.js";import{u as _}from"./use-virtual-mcp-CMvxAHEJ.js";import{c as P}from"./hooks-GnFkomrq.js";import{f as w}from"./reusable-new-chat-CouMjkYR.js";const h=new Map;function I(e){return`${e.orgId}:${e.userId}`}function G(e){return`sidebar.group-order.${e}`}function O(e){try{const t=localStorage.getItem(e),r=t?JSON.parse(t):[];return Array.isArray(r)?r.filter(s=>typeof s=="string"):[]}catch{return[]}}function N(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function U(e){const t=I(e),r=h.get(t);if(r)return r;const s=y.sidebarGroupOrder(e.orgId,e.userId);let a=!1;try{a=localStorage.getItem(s)!==null}catch{}let o=O(s);if(!a&&o.length===0&&e.userId!=="anon"){const i=O(G(e.orgId));i.length>0&&(o=i)}return h.set(t,o),o}function T(e,t){const r=new Set(t);return U(e).filter(s=>!r.has(s))}function j(e,t){h.set(I(e),t),N(y.sidebarGroupOrder(e.orgId,e.userId),t)}function K(e,t,r=[]){if(r.includes(t))return;const s=T(e,r);s.includes(t)||j(e,[t,...s])}const S=c.createContext(null);function Q(e){const t=b.c(7),{children:r}=e,[s,a]=c.useState(!1),[o,i]=c.useState(0);let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(k),t[0]=d):d=t[0];const l=d;let n;t[1]!==s||t[2]!==o?(n={empty:s,setEmpty:a,orderRevision:o,bumpOrderRevision:l},t[1]=s,t[2]=o,t[3]=n):n=t[3];let u;return t[4]!==r||t[5]!==n?(u=A.jsx(S.Provider,{value:n,children:r}),t[4]=r,t[5]=n,t[6]=u):u=t[6],u}function k(e){return e+1}function W(){return c.useContext(S)?.empty??!1}function D(){return c.useContext(S)?.bumpOrderRevision??J}function J(){}const v=[],L=()=>()=>{};function Y(e){return(e??[]).filter(t=>!!t.pinned).map(t=>t.id)}function X(){const e=b.c(15),t=C(),{org:r}=E(),s=_(),{data:a}=$.useSession(),o=a?.user?.id??"anon";let i;e[0]!==s?(i=Y(s),e[0]=s,e[1]=i):i=e[1];const d=i,l=D(),n=P();let u;e[2]!==n?.threads.get?(u=n?.threads.get??H,e[2]=n?.threads.get,e[3]=u):u=e[3];let f;e[4]!==n?.threads.get?(f=n?.threads.get??B,e[4]=n?.threads.get,e[5]=f):f=e[5];const m=c.useSyncExternalStore(n?.threads.subscribe??L,u,f);let g;return e[6]!==l||e[7]!==t||e[8]!==r.id||e[9]!==r.slug||e[10]!==d||e[11]!==a?.user?.id||e[12]!==o||e[13]!==m?(g=(p,x)=>{K({orgId:r.id,userId:o},p,d),l();const R=w(m,p,a?.user?.id)?.id??crypto.randomUUID();t({to:"/$org/$taskId",params:{org:r.slug,taskId:R},search:{...x?.search??{},virtualmcpid:p}})},e[6]=l,e[7]=t,e[8]=r.id,e[9]=r.slug,e[10]=d,e[11]=a?.user?.id,e[12]=o,e[13]=m,e[14]=g):g=e[14],g}function B(){return v}function H(){return v}export{Q as S,D as a,K as b,X as c,Y as g,W as u};
@@ -1 +0,0 @@
1
- import{c as x,a4 as j,a as i}from"./index-CsZhMKFM.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let I;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(I={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=I):I=e[31],I}export{A as u};
@@ -1 +0,0 @@
1
- import{u as R}from"./use-org-auth-client-DYoTiK8H.js";import{a4 as b,m as P,K as y}from"./index-CsZhMKFM.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function O(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function I(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=O(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{I as u};
@@ -1 +0,0 @@
1
- import{c as l,a4 as g,m as b,K as _,n as E,d as z,r as R}from"./index-CsZhMKFM.js";import{W as D}from"./constants-CaIX_f5U.js";import{c as G,u as M}from"./studio-tools-CTswP4mA.js";const I={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null,reports_only:null,task_board_enabled:!1},O={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function N(t,e){return{queryKey:_.organizationSettings(e),queryFn:async()=>{try{return await G(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function f(t){const e=l.c(6),{org:s}=g();let n;e[0]!==s.id||e[1]!==s.slug?(n=N(s.slug,s.id),e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const a=t;let r;return e[3]!==n||e[4]!==a?(r={...n,select:a},e[3]=n,e[4]=a,e[5]=r):r=e[5],b(r)}function Z(t,e){const s=l.c(3);let n;s[0]!==t||s[1]!==e?(n=N(e,t),s[0]=t,s[1]=e,s[2]=n):n=s[2];const{data:a}=b(n);return a??null}function y(){const t=l.c(9),{org:e}=g(),s=M(),n=E();let a;t[0]!==e||t[1]!==s?(a=async o=>{const u=await s.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...o});if(!u)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return u},t[0]=e,t[1]=s,t[2]=a):a=t[2];let r;t[3]!==e||t[4]!==n?(r=o=>{n.setQueryData(_.organizationSettings(e.id),u=>({...u??I,...o}))},t[3]=e,t[4]=n,t[5]=r):r=t[5];let i;return t[6]!==a||t[7]!==r?(i={mutationFn:a,onSuccess:r},t[6]=a,t[7]=r,t[8]=i):i=t[8],z(i)}function Q(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:O}function j(){const{data:t}=f($);return t??O}function $(t){return Q(t.simple_mode)}function F(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(r,i)=>e.mutate({simple_mode:r},i),n=(r,i)=>e.mutateAsync({simple_mode:r},i),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function L(){const{data:t}=f(C);return t??!1}function C(t){return t.reports_only??!1}function v(){const{data:t}=f(P);return t??!1}function P(t){return t.task_board_enabled??!1}function J(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(r,i)=>e.mutate({task_board_enabled:r},i),n=(r,i)=>e.mutateAsync({task_board_enabled:r},i),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function U(){const{data:t}=f(x);return t??null}function x(t){return t.registry_config}function V(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(r,i)=>e.mutate({registry_config:r},i),n=(r,i)=>e.mutateAsync({registry_config:r},i),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function X(){const{data:t}=f(q);return t??null}function q(t){return t.default_home_agents}function K(){const t=l.c(7),e=y();let s,n;t[0]!==e?(s=(r,i)=>e.mutate({default_home_agents:r},i),n=(r,i)=>e.mutateAsync({default_home_agents:r},i),t[0]=e,t[1]=s,t[2]=n):(s=t[1],n=t[2]);let a;return t[3]!==e||t[4]!==s||t[5]!==n?(a={...e,mutate:s,mutateAsync:n},t[3]=e,t[4]=s,t[5]=n,t[6]=a):a=t[6],a}function tt(){const t=l.c(14),{org:e}=g(),s=K(),n=E();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=Promise.resolve(),t[0]=a):a=t[0];const r=R.useRef(a);let i;t[1]!==e.id?(i=_.organizationSettings(e.id),t[1]=e.id,t[2]=i):i=t[2];const o=i;let u;t[3]!==o||t[4]!==n?(u=()=>n.getQueryData(o)?.default_home_agents?.ids??[],t[3]=o,t[4]=n,t[5]=u):u=t[5];const p=u;let m;t[6]!==o||t[7]!==e.slug||t[8]!==n||t[9]!==s?(m=k=>{const T=r.current.then(async()=>{const A=n.getQueryData(o),S=k(A?.default_home_agents?.ids??[]);if(S!==null){n.setQueryData(o,c=>c&&{...c,default_home_agents:{ids:S}});try{await s.mutateAsync({ids:S}),await n.refetchQueries({queryKey:_.homeNextActions(e.slug),type:"active"})}catch(c){const w=c;throw n.setQueryData(o,A),w}}});return r.current=T.catch(Y),T},t[6]=o,t[7]=e.slug,t[8]=n,t[9]=s,t[10]=m):m=t[10];const h=m;let d;return t[11]!==h||t[12]!==p?(d={currentIds:p,apply:h},t[11]=h,t[12]=p,t[13]=d):d=t[13],d}function Y(){}function et(){const t=l.c(5),{org:e}=g(),s=U();let n;t[0]!==e.id?(n=D.REGISTRY(e.id),t[0]=e.id,t[1]=n):n=t[1];const a=n;let r;return t[2]!==a||t[3]!==s?(r=i=>{if(!s)return i===a;const o=s.registries[i];return o?o.enabled:i===a},t[2]=a,t[3]=s,t[4]=r):r=t[4],r}export{X as a,tt as b,v as c,et as d,Z as e,J as f,j as g,F as h,U as i,V as j,L as u};
@@ -1 +0,0 @@
1
- import{c as C,a4 as R}from"./index-CsZhMKFM.js";import{u as p}from"./use-connection-CcLotHiI.js";import{W as u}from"./constants-CaIX_f5U.js";import{i as y}from"./use-organization-settings-C4hP3pVq.js";function M(){const e=C.c(19),{org:s}=R(),o=y();let l;e[0]!==s.id?(l=u.REGISTRY(s.id),e[0]=s.id,e[1]=l):l=e[1];const d=l;let f;e[2]!==s.id?(f=u.COMMUNITY_REGISTRY(s.id),e[2]=s.id,e[3]=f):f=e[3];const g=f;let r;e[4]!==g||e[5]!==d?(r=[d,g],e[4]=g,e[5]=d,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let i;e[10]!==o.registries?(i=Object.keys(o.registries),e[10]=o.registries,e[11]=i):i=e[11];for(const a of i)t.add(a)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const m=p();let n;e[12]!==m?(n=m??[],e[12]=m,e[13]=n):n=e[13];let c;if(e[14]!==t||e[15]!==n){let i;e[17]!==t?(i=a=>t.has(a.id),e[17]=t,e[18]=i):i=e[18],c=n.filter(i),e[14]=t,e[15]=n,e[16]=c}else c=e[16];return c}export{M as u};
@@ -1 +0,0 @@
1
- import{c as a,a4 as r,K as c,P as f,n as y,d as S}from"./index-CsZhMKFM.js";import{u as l}from"./studio-tools-CTswP4mA.js";function C(){const e=a.c(7),{org:o}=r(),n=l();let i;e[0]!==o.id?(i=c.secrets(o.id),e[0]=o.id,e[1]=i):i=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:u}=f(s);return u.secrets}function p(){const e=a.c(8),{org:o}=r(),n=l(),i=y();let t;e[0]!==n?(t=async d=>await n.call("SECRET_CREATE",{...d}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==o||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:c.secrets(o.id)})},e[2]=o,e[3]=i,e[4]=s):s=e[4];let u;return e[5]!==t||e[6]!==s?(u={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=u):u=e[7],S(u)}export{p as a,C as u};
@@ -1 +0,0 @@
1
- import{c as r,a6 as u}from"./index-CsZhMKFM.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-CWf9qNc0.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
@@ -1 +0,0 @@
1
- import{c as a,a4 as d,aj as P,m as p}from"./index-CsZhMKFM.js";import{b as L,a as S,u as V}from"./use-collections-Cl7KVWNQ.js";import{u as g}from"./use-mcp-client-Bv8WGceO.js";import{S as m}from"./constants-CaIX_f5U.js";function b(e){const t=a.c(5);let s;t[0]!==e?(s=e===void 0?{}:e,t[0]=e,t[1]=s):s=t[1];const i=s,{org:n}=d();let o;t[2]!==n.id||t[3]!==n.slug?(o={connectionId:m,orgId:n.id,orgSlug:n.slug},t[2]=n.id,t[3]=n.slug,t[4]=o):o=t[4];const l=g(o);return L(n.id,"VIRTUAL_MCP",l,i)}function R(e){const t=a.c(3),{org:s}=d();let i;t[0]!==s.id||t[1]!==s.slug?(i={connectionId:m,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=i):i=t[2];const n=g(i);return V(s.id,"VIRTUAL_MCP",e??void 0,n)}function E(e){const t=a.c(15),{org:s}=d();let i;t[0]!==s.id||t[1]!==s.slug?(i={connectionId:m,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=i):i=t[2];const n=g(i);let o,l,c;t[3]!==e||t[4]!==s.id?(o=[...e].sort(),c=p,l=P.virtualMcpLastUsed(s.id,o),t[3]=e,t[4]=s.id,t[5]=o,t[6]=l,t[7]=c):(o=t[5],l=t[6],c=t[7]);const f=o.length>0;let u;t[8]!==n||t[9]!==o?(u=async()=>{const M=(await n.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:o}})).structuredContent??{items:[]},C=new Map;for(const I of M.items)C.set(I.id,I);return C},t[8]=n,t[9]=o,t[10]=u):u=t[10];let r;return t[11]!==l||t[12]!==f||t[13]!==u?(r={queryKey:l,enabled:f,staleTime:3e4,queryFn:u},t[11]=l,t[12]=f,t[13]=u,t[14]=r):r=t[14],c(r)}function $(){const e=a.c(3),{org:t}=d();let s;e[0]!==t.id||e[1]!==t.slug?(s={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=s):s=e[2];const i=g(s);return S(t.id,"VIRTUAL_MCP",i)}export{R as a,$ as b,E as c,b as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-BTdf9pFZ.js";import{dK as i}from"./index-CsZhMKFM.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-BTdf9pFZ.js";import{dK as u,G as n}from"./index-CsZhMKFM.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{c as V,r as U,j as s,l as J,B as Y}from"./index-CsZhMKFM.js";import{h as ct}from"./agent-icon-dPkJbbXq.js";import{n as mt,a as et}from"./Loading02-Dx-xiZND.js";import{i as pt}from"./ChevronRight-C3Tgk-3m.js";import{L as dt}from"./label-BULuaMoF.js";import{A as rt}from"./automation-runs-Y9TSuy3F.js";import{S as ft}from"./switch-B36ltQ63.js";import{a as ut,T as ht,b as gt}from"./tooltip-Cs5hng3q.js";import{V as xt}from"./view-mode-toggle-DovE7i8d.js";import"./AlertCircle-BsA2wZmN.js";import"./Tool01-DVCGutKV.js";import"./ArrowUp-CDnEKV2Y.js";import"./Settings02-CS2jOfO5.js";import"./Tool02-CSTMjTef.js";import"./XCircle-D3cI1Aep.js";import"./ArrowUpRight-DdPCnlNm.js";import"./TrendUp01-acR-ekUr.js";import"./ZapSquare-Dzb50Gix.js";import"./Users03-tGwfKVJc.js";import"./CheckCircle-lXciCGfG.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./Circle-C_fdyhr8.js";import"./Stars02-HLp9q8iP.js";import"./Copy01-b3lIb5yu.js";import"./ZoomOut-DYAXxr_v.js";import"./DotsVertical-CK1a4mKj.js";import"./Globe01-B6kdhpV9.js";import"./Eye-DM8bmzm7.js";import"./FilterLines-DCNZa1GS.js";import"./Star01-2DHf7kTZ.js";import"./Globe04-CGLGspo5.js";import"./SwitchHorizontal01-ilLzkPr_.js";import"./HardDrive-CR6Rs-a1.js";import"./Key01-1r4YrQER.js";import"./LayoutLeft-DvNM8qhm.js";import"./LinkExternal01-Ck4lryDE.js";import"./List-DfPIAPM_.js";import"./Monitor01-D_DrBwt_.js";import"./Sun-ByaEjJ0N.js";import"./Package-CV2Q9Uup.js";import"./Palette-BY5BmUDa.js";import"./Play-Ci1OqtIO.js";import"./Plus-Cgq7ON9K.js";import"./SearchLg-2as_l8YT.js";import"./SearchMd-ZfoTl6vw.js";import"./Shield01-C6TdRfmI.js";import"./Stars01-BEHbN5c3.js";import"./Trash01--uX5q_ti.js";import"./Upload01-BaheeKQP.js";import"./User01-5hu8D3_O.js";import"./Users01-Dh5E4dqf.js";import"./XClose-D5Ra7e-f.js";import"./X-OFSHASit.js";import"./Zap-CgjpaG4V.js";import"./select-CVMXwLRV.js";import"./useInfiniteQuery-BosqZeNZ.js";import"./use-infinite-scroll-BTdf9pFZ.js";import"./use-connection-CcLotHiI.js";import"./use-collections-Cl7KVWNQ.js";import"./use-mcp-client-Bv8WGceO.js";import"./constants-CaIX_f5U.js";import"./auth-D_bm0-t3.js";import"./use-virtual-mcp-CMvxAHEJ.js";import"./card-Bc92PJFP.js";import"./sidebar-DRSu2iBz.js";import"./use-mobile-DhhfLpzh.js";import"./table-CLRsCUXA.js";import"./empty-state-DD15-E7x.js";import"./use-members-eaM3vNiv.js";import"./use-org-auth-client-DYoTiK8H.js";import"./use-clock-tick-CB7NlnVZ.js";import"./use-automations-WNGih4F_.js";import"./studio-tools-CTswP4mA.js";import"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import"./badge-BMMjntMn.js";import"./checkbox-B-y-IHdE.js";import"./command-DzGwZa9g.js";import"./index-DKyQrM3l.js";import"./dialog-DZtdYFi_.js";import"./popover-C5PoRwEk.js";import"./avatar-DOYkgu8W.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B-pxrD6E.js";import"./file-type-icon-CuakGACj.js";import"./tab-id-bb-jjgGv.js";import"./monaco-editor-CiP0ChuC.js";import"./index-Cim2j5YD.js";import"./chat-context-Awe2cIoY.js";import"./autosend-qB5BaOSA.js";import"./hooks-GnFkomrq.js";import"./decopilot-sse-pool-CJtSg3wj.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-D77UFwvU.js";import"./use-decopilot-events-CWf9qNc0.js";import"./use-organization-settings-C4hP3pVq.js";import"./index-DPzJsdBC.js";import"./shell-layout-Bi4LjwsI.js";import"./alert-dialog-Bd5XLC3F.js";import"./required-auth-layout-R2McgzF5.js";import"./use-org-sso-DDm0m5Eb.js";import"./integration-icon-6pGkEdul.js";import"./use-navigate-to-agent-BsdctirU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BHEk1VG5.js";import"./form-YJrSMpNL.js";import"./input-D5ccsU_1.js";const bt=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),yt=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Tt=new Date(-864e13),vt=new Date(864e13),jt=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,Nt=/\/flags\/multivariate\.ts$/;function wt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function kt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,n=typeof t=="string",l=typeof r=="string";if(!n&&!l)return null;const o=n?new Date(t):Tt,m=l?new Date(r):vt;return Number.isNaN(o.getTime())||Number.isNaN(m.getTime())||n&&l&&m.getTime()<=o.getTime()?null:{start:o,end:m,openStart:!n,openEnd:!l}}function nt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(bt.has(r)){const n=kt(e);n&&t.push(n);return}if(yt.has(r)){const n=e.matchers;if(Array.isArray(n))for(const l of n)nt(l,t)}}}function _t(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!jt.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Mt(e){if(typeof e=="string"){const a=e.trim();if(a.length===0)return null;try{const i=new URL(a).pathname.split("/").filter(Boolean),p=i[i.length-1];if(p)return decodeURIComponent(p)}catch{}return a.length>80?`${a.slice(0,77)}…`:a}if(!e||typeof e!="object")return null;const t=e,r=t.config,l=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,l?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const a of o)if(typeof a=="string"&&a.trim().length>0)return a.trim();const m=t.__resolveType;if(typeof m=="string"){const c=(m.split("/").pop()??m).replace(/\.(tsx?|jsx?)$/i,"");if(c.length>0)return c}return null}function Et(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];typeof n=="number"?t.length>0?t[t.length-1]+=`[${n}]`:t.push(`[${n}]`):t.push(n)}return t.join(" · ")}function W(e,t,r,n,l){if(_t(e)){const o=e.variants,m=e.__resolveType,a=Nt.test(m)?"":Et(n);o.forEach((c,i)=>{if(!c||typeof c!="object")return;const p=c,d=[];if(nt(p.rule,d),d.length===0)return;const x=Mt(p.value)??(a||r);for(const h of d)l.push({blockKey:t,blockLabel:r,innerPath:a,variantIndex:i,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:m})});for(let c=0;c<o.length;c++){const i=o[c];i&&typeof i=="object"&&W(i.value,t,r,[...n,"variants",c,"value"],l)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)W(e[o],t,r,[...n,o],l);return}if(e&&typeof e=="object")for(const[o,m]of Object.entries(e))o!=="__resolveType"&&W(m,t,r,[...n,o],l)}function St(e){if(!e)return[];const t=[];for(const[r,n]of Object.entries(e))W(n,r,wt(r),[],t);return t.sort((r,n)=>r.start.getTime()-n.start.getTime())}function At(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((n,l)=>{const o=l*137.508%360;r.set(n,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),r}const Dt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ot(e,t){return e.get(t)??Dt}const $t=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],st=["January","February","March","April","May","June","July","August","September","October","November","December"],it=1440*60*1e3;function P(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function at(e){return new Date(e.getFullYear(),e.getMonth(),1)}function F(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function z(e,t){const r=new Date(e);return r.setDate(r.getDate()+t),r}function K(e,t){return Math.round((P(e).getTime()-P(t).getTime())/it)}function Ct(e){const t=(e.getTime()-P(e).getTime())/it;return Math.min(Math.max(t,0),1)}function q(e,t){return K(e,t)+Ct(e)}function Rt(e){const t=z(e,-e.getDay()),r=[];for(let n=0;n<6;n++){const l=[];for(let o=0;o<7;o++)l.push(z(t,n*7+o));r.push(l)}for(;r.length>0&&r[r.length-1].every(n=>n.getMonth()!==e.getMonth());)r.pop();return r}function Lt(e,t){const r=P(e[0]),n=z(r,7),l=r.getTime(),o=n.getTime(),m=[];for(const i of t){const p=P(i.start),d=P(i.end);if(d.getTime()<r.getTime()||p.getTime()>=n.getTime())continue;const u=p.getTime()<r.getTime()?r:p,x=d.getTime()>=n.getTime()?z(n,-1):d,h=K(u,r),g=K(x,u)+1;if(g<=0)continue;const b=Math.max(i.start.getTime(),l),y=Math.min(i.end.getTime(),o),T=q(new Date(b),r),f=Math.max(q(new Date(y),r)-T,0);f<=0||m.push({variant:i,startCol:h,span:g,leftUnits:T,widthUnits:f})}m.sort((i,p)=>i.startCol-p.startCol||p.span-i.span||i.variant.blockKey.localeCompare(p.variant.blockKey));const a=[],c=[];for(const i of m){let p=a.findIndex(d=>d<=i.startCol);p===-1&&(p=a.length,a.push(0)),a[p]=i.startCol+i.span,c.push({...i,lane:p})}return c}const Q=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ot(e){const t=e.openStart?"Always":Q.format(e.start),r=e.openEnd?"Ongoing":Q.format(e.end);return`${t} → ${r}`}function Pt(e){const t=V.c(17),{variant:r}=e;let n;t[0]!==r.blockLabel?(n=s.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=n):n=t[1];let l;t[2]!==r.innerPath?(l=r.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=l):l=t[3];let o;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(o=r.label!==r.blockLabel&&r.label!==r.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=o):o=t[7];let m;t[8]!==r?(m=Ot(r),t[8]=r,t[9]=m):m=t[9];let a;t[10]!==m?(a=s.jsx("div",{className:"mt-1",children:m}),t[10]=m,t[11]=a):a=t[11];let c;return t[12]!==n||t[13]!==l||t[14]!==o||t[15]!==a?(c=s.jsx(gt,{children:s.jsxs("div",{className:"text-xs",children:[n,l,o,a]})}),t[12]=n,t[13]=l,t[14]=o,t[15]=a,t[16]=c):c=t[16],c}const X=16;function It(e,t){const r=e?"transparent":"#000 0",n=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${X}px, #000 calc(100% - ${X}px), ${n})`}function lt(e){const t=V.c(26),{variant:r,color:n,style:l,children:o,fadeStart:m,fadeEnd:a}=e,c=m===void 0?!1:m,i=a===void 0?!1:a;let p;t[0]!==i||t[1]!==c?(p=It(c,i),t[0]=i,t[1]=c,t[2]=p):p=t[2];const d=p;let u;t[3]!==c?(u=c&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=c,t[4]=u):u=t[4];let x;t[5]!==i?(x=i&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=i,t[6]=x):x=t[6];let h;t[7]!==d?(h=d&&{maskImage:d,WebkitMaskImage:d},t[7]=d,t[8]=h):h=t[8];let g;t[9]!==n.bg||t[10]!==n.text||t[11]!==l||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:n.bg,color:n.text,borderRadius:4,...u,...x,...h,...l},t[9]=n.bg,t[10]=n.text,t[11]=l,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let y;t[18]!==g||t[19]!==b?(y=s.jsx(ut,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=y):y=t[20];let T;t[21]!==r?(T=s.jsx(Pt,{variant:r}),t[21]=r,t[22]=T):T=t[22];let f;return t[23]!==T||t[24]!==y?(f=s.jsxs(ht,{children:[y,T]}),t[23]=T,t[24]=y,t[25]=f):f=t[25],f}function en(e){const t=V.c(49),{decofile:r}=e,[n,l]=U.useState("calendar"),[o,m]=U.useState(Bt),[a,c]=U.useState(!1);let i,p,d;if(t[0]!==r||t[1]!==a){const S=St(r);i=S.filter(Ht).length,d=a?S:S.filter(Vt),p=At(d.map(Ft)),t[0]=r,t[1]=a,t[2]=i,t[3]=p,t[4]=d}else i=t[2],p=t[3],d=t[4];const u=p;let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=()=>m(at(new Date)),t[5]=x):x=t[5];const h=x;let g;t[6]!==n?(g=()=>m(S=>n==="calendar"?F(S,-1):F(S,-3)),t[6]=n,t[7]=g):g=t[7];const b=g;let y;t[8]!==n?(y=()=>m(S=>n==="calendar"?F(S,1):F(S,3)),t[8]=n,t[9]=y):y=t[9];const T=y;let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Y,{variant:"outline",size:"sm",onClick:h,children:"Today"}),t[10]=f):f=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(mt,{size:16}),t[11]=w):w=t[11];let k;t[12]!==b?(k=s.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:b,"aria-label":"Previous",children:w}),t[12]=b,t[13]=k):k=t[13];let _;t[14]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(pt,{size:16}),t[14]=_):_=t[14];let M;t[15]!==T?(M=s.jsx(Y,{variant:"ghost",size:"icon",className:"size-8",onClick:T,"aria-label":"Next",children:_}),t[15]=T,t[16]=M):M=t[16];const A=st[o.getMonth()];let E;t[17]!==o?(E=o.getFullYear(),t[17]=o,t[18]=E):E=t[18];let v;t[19]!==A||t[20]!==E?(v=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[A," ",E]}),t[19]=A,t[20]=E,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==k||t[24]!==M?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[f,k,M,v]}),t[22]=v,t[23]=k,t[24]=M,t[25]=j):j=t[25];let D;t[26]!==i||t[27]!==a?(D=i>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ft,{id:"show-ongoing",checked:a,onCheckedChange:c}),s.jsxs(dt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:["Show ongoing (",i,")"]})]}),t[26]=i,t[27]=a,t[28]=D):D=t[28];let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L={value:"calendar",icon:s.jsx(et,{}),label:"Calendar"},t[29]=L):L=t[29];let I;t[30]===Symbol.for("react.memo_cache_sentinel")?(I=[L,{value:"timeline",icon:s.jsx(ct,{}),label:"Timeline"}],t[30]=I):I=t[30];let N;t[31]!==n?(N=s.jsx(xt,{value:n,onValueChange:l,options:I}),t[31]=n,t[32]=N):N=t[32];let R;t[33]!==D||t[34]!==N?(R=s.jsxs("div",{className:"flex items-center gap-4",children:[D,N]}),t[33]=D,t[34]=N,t[35]=R):R=t[35];let $;t[36]!==j||t[37]!==R?($=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,R]}),t[36]=j,t[37]=R,t[38]=$):$=t[38];let C;t[39]!==u||t[40]!==o||t[41]!==i||t[42]!==a||t[43]!==d||t[44]!==n?(C=d.length===0?s.jsx(Wt,{hiddenOngoing:a?0:i}):n==="calendar"?s.jsx(Ut,{monthStart:o,variants:d,colorMap:u}):s.jsx(Jt,{monthStart:o,variants:d,colorMap:u}),t[39]=u,t[40]=o,t[41]=i,t[42]=a,t[43]=d,t[44]=n,t[45]=C):C=t[45];let O;return t[46]!==$||t[47]!==C?(O=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[$,C]}),t[46]=$,t[47]=C,t[48]=O):O=t[48],O}function Ft(e){return e.blockKey}function Vt(e){return!e.openEnd}function Ht(e){return e.openEnd}function Bt(){return at(new Date)}function Wt(e){const t=V.c(3),{hiddenOngoing:r}=e,n=r===void 0?0:r;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(et,{size:24,className:"text-muted-foreground/60"}),t[0]=l):l=t[0];let o;return t[1]!==n?(o=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[l,n>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:"No dated variants in view."}),s.jsxs("div",{className:"text-xs text-muted-foreground/80",children:[n," ongoing"," ",n===1?"variant is":"variants are"," hidden — enable “Show ongoing” to view."]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:"No scheduled variants."}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:"Variants gated by a date matcher appear here."})]})]}),t[1]=n,t[2]=o):o=t[2],o}const G=20,Z=2,tt=28,zt=6;function Ut(e){const t=V.c(17),{monthStart:r,variants:n,colorMap:l}=e;let o,m,a,c,i;if(t[0]!==l||t[1]!==r||t[2]!==n){const u=Rt(r),x=P(new Date);o=rt,i="flex-1 min-h-0",m="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:$t.map(Gt)}),t[8]=a):a=t[8],c=u.map((h,g)=>{const b=Lt(h,n),y=b.reduce(Yt,0),T=tt+y*(G+Z)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[h.map((f,w)=>{const k=f.getMonth()===r.getMonth(),_=f.getTime()===x.getTime();return s.jsx("div",{className:J("border-r last:border-r-0 px-2 pt-1.5 text-xs",k?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:J("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",_&&"bg-primary text-primary-foreground font-semibold"),children:f.getDate()})},w)}),b.map((f,w)=>{const k=ot(l,f.variant.blockKey),_=tt+f.lane*(G+Z),M=f.leftUnits/7*100,A=f.widthUnits/7*100,E=f.variant.openStart&&g===0,v=f.variant.openEnd&&g===u.length-1;return s.jsxs(lt,{variant:f.variant,color:k,fadeStart:E,fadeEnd:v,style:{top:_,left:`calc(${M}% + 2px)`,width:`calc(${A}% - 4px)`,minWidth:zt,height:G},children:[f.variant.blockLabel,f.variant.label!==f.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",f.variant.label]})]},`${g}-${w}`)})]},g)}),t[0]=l,t[1]=r,t[2]=n,t[3]=o,t[4]=m,t[5]=a,t[6]=c,t[7]=i}else o=t[3],m=t[4],a=t[5],c=t[6],i=t[7];let p;t[9]!==m||t[10]!==a||t[11]!==c?(p=s.jsxs("div",{className:m,children:[a,c]}),t[9]=m,t[10]=a,t[11]=c,t[12]=p):p=t[12];let d;return t[13]!==o||t[14]!==i||t[15]!==p?(d=s.jsx(o,{className:i,children:p}),t[13]=o,t[14]=i,t[15]=p,t[16]=d):d=t[16],d}function Yt(e,t){return Math.max(e,t.lane+1)}function Gt(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const B=4,Kt=32,H=240;function Jt(e){const t=V.c(27),{monthStart:r,variants:n,colorMap:l}=e,o=r;let m,a,c,i,p,d;if(t[0]!==l||t[1]!==r||t[2]!==o||t[3]!==n){const h=F(r,B),g=new Date,b=new Map;for(const v of n){const j=b.get(v.blockKey)??[];j.push(v),b.set(v.blockKey,j)}const y=Array.from(b.entries()).sort(Xt),T=h.getTime()-o.getTime(),f=v=>(Math.max(o.getTime(),Math.min(h.getTime(),v.getTime()))-o.getTime())/T*100;let w;t[10]!==o?(w=(v,j)=>F(o,j),t[10]=o,t[11]=w):w=t[11];const k=Array.from({length:B},w),_=g.getTime()>=o.getTime()&&g.getTime()<=h.getTime()?f(g):null;m=rt,d="flex-1 min-h-0",a="min-w-[900px] relative";let M;t[12]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:{width:H},children:"Variant / Block"}),t[12]=M):M=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},t[13]=A):A=t[13];const E=k.map(Qt);t[14]!==E?(c=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[M,s.jsx("div",{className:"flex-1 grid",style:A,children:E})]}),t[14]=E,t[15]=c):c=t[15],t[16]!==_?(i=_!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${H}px + (100% - ${H}px) * ${_} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:"Today"})}),t[16]=_,t[17]=i):i=t[17],p=y.map(v=>{const[j,D]=v,L=ot(l,j),I=D[0]?.blockLabel??j;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:H},children:I})}),D.map((N,R)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:Kt},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:H},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:L.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:N.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${B}, minmax(0, 1fr))`},children:k.map(qt)}),(()=>{const $=Math.max(N.start.getTime(),o.getTime()),C=Math.min(N.end.getTime(),h.getTime());if(C<=$)return null;const O=f(new Date($)),S=f(new Date(C))-O;return s.jsx(lt,{variant:N,color:L,fadeStart:N.openStart,fadeEnd:N.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${O}%`,width:`calc(${S}% - 2px)`,height:22},children:N.label})})()]})]},R))]},j)}),t[0]=l,t[1]=r,t[2]=o,t[3]=n,t[4]=m,t[5]=a,t[6]=c,t[7]=i,t[8]=p,t[9]=d}else m=t[4],a=t[5],c=t[6],i=t[7],p=t[8],d=t[9];let u;t[18]!==a||t[19]!==c||t[20]!==i||t[21]!==p?(u=s.jsxs("div",{className:a,children:[c,i,p]}),t[18]=a,t[19]=c,t[20]=i,t[21]=p,t[22]=u):u=t[22];let x;return t[23]!==m||t[24]!==d||t[25]!==u?(x=s.jsx(m,{className:d,children:u}),t[23]=m,t[24]=d,t[25]=u,t[26]=x):x=t[26],x}function qt(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function Qt(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[st[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function Xt(e,t){return e[0].localeCompare(t[0])}export{en as VariantCalendar};