decocms 3.83.0 → 3.83.2

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 (244) hide show
  1. package/dist/client/assets/{AlertCircle-CqXnKI3D.js → AlertCircle-DM0HzopE.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-D_A_c-WP.js → ArrowUpRight-CoxAwUHc.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-B6_BlhWA.js → CheckCircle-D5UuMIIH.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CsJyvcQs.js → ChevronDown-CW3qqv2x.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-cwkPjMhb.js → ChevronLeft-LzGuMB2U.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DbmfCIOT.js → ChevronRight-B0GGkNIH.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DTH787oJ.js → ChevronUp-DZQVuDwV.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-DXADESRu.js → DotsVertical-CGmC-AuM.js} +1 -1
  9. package/dist/client/assets/{Eye-Cd9WdjRO.js → Eye-DRB5PFSd.js} +1 -1
  10. package/dist/client/assets/{FilterLines-DDE5Z7pT.js → FilterLines-uyaFw99Z.js} +1 -1
  11. package/dist/client/assets/{Globe01-BtWLhdgc.js → Globe01-J_5kAZ2G.js} +1 -1
  12. package/dist/client/assets/{Globe04-DVbA5z-S.js → Globe04-DzVxOgG6.js} +1 -1
  13. package/dist/client/assets/{HardDrive-Dv021FxK.js → HardDrive-BD491-6A.js} +1 -1
  14. package/dist/client/assets/{Key01-AxVsjzoW.js → Key01-DpArIwgm.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-DFQX2HQS.js → LayoutLeft-i76gAzb8.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-DFJC7MKi.js → LinkExternal01-BGVgwGxd.js} +1 -1
  17. package/dist/client/assets/{Monitor01-DzIaslp9.js → Monitor01-C4cglHcn.js} +1 -1
  18. package/dist/client/assets/{Palette-DRyOxvc4.js → Palette-NYPFTebi.js} +1 -1
  19. package/dist/client/assets/{Play-BGOeSWeu.js → Play-CIhVolnk.js} +1 -1
  20. package/dist/client/assets/{Plus-zfs5-JeK.js → Plus-DEhikgBr.js} +1 -1
  21. package/dist/client/assets/{SearchMd-DUUd_hhd.js → SearchMd-1YEF5GNC.js} +1 -1
  22. package/dist/client/assets/{Settings02-Gfe6bidH.js → Settings02-B_oiQbnJ.js} +1 -1
  23. package/dist/client/assets/{Shield01-5ohBHD7b.js → Shield01-BrCb9Fbq.js} +1 -1
  24. package/dist/client/assets/{Star01-BfbfCcYt.js → Star01-K5E2EVFR.js} +1 -1
  25. package/dist/client/assets/{Stars01-CDSyPsDa.js → Stars01-D-F-KCAY.js} +1 -1
  26. package/dist/client/assets/{Stars02-CNjkSD-c.js → Stars02-D5rVREl5.js} +1 -1
  27. package/dist/client/assets/{Sun-CduMeE8P.js → Sun-0LQy_BRh.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-C-8MujcR.js → SwitchHorizontal01-Y2S_GG49.js} +1 -1
  29. package/dist/client/assets/{Tool01-CyFZLY0Y.js → Tool01-B21_bo9F.js} +1 -1
  30. package/dist/client/assets/{Trash01-BwZvbUqV.js → Trash01-D4qJL0O5.js} +1 -1
  31. package/dist/client/assets/{Upload01-BENZkUL6.js → Upload01-B89V4QHh.js} +1 -1
  32. package/dist/client/assets/{User01-C6id_Jz0.js → User01-676cwM-d.js} +1 -1
  33. package/dist/client/assets/{Users01-DoemHjk2.js → Users01-Wg2zRTbW.js} +1 -1
  34. package/dist/client/assets/{Users03-DNFFVYi5.js → Users03-ClYFKrw1.js} +1 -1
  35. package/dist/client/assets/{X-DbKbpx_s.js → X-B9D2h3Td.js} +1 -1
  36. package/dist/client/assets/{XCircle-Dcz0bhP7.js → XCircle-CSFP3d9h.js} +1 -1
  37. package/dist/client/assets/{XClose-c_WWFEvr.js → XClose-DBh1WmP1.js} +1 -1
  38. package/dist/client/assets/{Zap-iEV7Y0HC.js → Zap-BRPDiIJ_.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-C6FRNhWU.js → ZapSquare-Dnw5HzjO.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-B6sxahLJ.js → ZoomOut-Cz0dpIX0.js} +1 -1
  41. package/dist/client/assets/{access-gate-Bw0npMv7.js → access-gate-BrhqO3VF.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-KIiwcyif.js → add-section-modal-D2CiFRjh.js} +1 -1
  43. package/dist/client/assets/{agent-icon-Dwg5FgWW.js → agent-icon-o19yp48z.js} +1 -1
  44. package/dist/client/assets/{agents-list-BXDz7sZv.js → agents-list-CZG4qszH.js} +1 -1
  45. package/dist/client/assets/ai-providers-CO0WuHGD.js +1 -0
  46. package/dist/client/assets/{alert-CrUsXKEE.js → alert-D1A1Zc_j.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-Cv06ffuC.js → alert-dialog-BOS0dCJh.js} +3 -3
  48. package/dist/client/assets/{app-editor-DjhMgCk8.js → app-editor-CIfs2FL1.js} +1 -1
  49. package/dist/client/assets/{auth-DEpXDpCk.js → auth-BdbahkUc.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-CPgG-EzL.js → auth-catchall-CNPgs4YU.js} +1 -1
  51. package/dist/client/assets/{auth-entry-DSjmtoLb.js → auth-entry-B1WtHQhf.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-BkUGPb-7.js → auth-split-layout-nvPMwr8u.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-BELZfB_M.js → authenticate-and-persist-oauth-BMdVL1CA.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-BQBXbnVC.js → automation-list-row-CyNcj0ry.js} +1 -1
  55. package/dist/client/assets/automation-runs-Bk8JCPKW.js +1 -0
  56. package/dist/client/assets/automations-D5t0_F84.js +1 -0
  57. package/dist/client/assets/{avatar-DPNVdynG.js → avatar-3AHqY5tt.js} +1 -1
  58. package/dist/client/assets/{badge-BAgfu3s3.js → badge-DAumNibn.js} +1 -1
  59. package/dist/client/assets/{block-document-L8I5bPmf.js → block-document-CyMP0Nwa.js} +1 -1
  60. package/dist/client/assets/brand-context-yzHlJmXd.js +1 -0
  61. package/dist/client/assets/buckets-D9fspdLY.js +1 -0
  62. package/dist/client/assets/{capability-load-error-DNDjRRk_.js → capability-load-error-B4Sf_UJj.js} +1 -1
  63. package/dist/client/assets/{card-Trr9Smsl.js → card-DPMEGAqZ.js} +1 -1
  64. package/dist/client/assets/category-editor-nDclmHNc.js +1 -0
  65. package/dist/client/assets/{chat-context-D2JYAjtU.js → chat-context-DANWEvls.js} +7 -7
  66. package/dist/client/assets/{checkbox-BkY2CRaN.js → checkbox-ByFK_aep.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-CDezhRu8.js → cli-auth-success-s1Ge9151.js} +1 -1
  68. package/dist/client/assets/collection-detail-NWtLzyq5.js +1 -0
  69. package/dist/client/assets/{collection-display-button-BhW4iJuC.js → collection-display-button-CTz7X8CM.js} +1 -1
  70. package/dist/client/assets/{collection-search-IIs4O29o.js → collection-search-CQMKW4Jp.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-DStxKs6K.js → collection-tabs-jlQTSy-i.js} +1 -1
  72. package/dist/client/assets/{command-DziWV9Wl.js → command-DNx5Uhv2.js} +1 -1
  73. package/dist/client/assets/commerce-onboarding-BGm-51c6.js +1 -0
  74. package/dist/client/assets/{connect-desktop-dialog-CEg8fHOJ.js → connect-desktop-dialog-BeQBPgXI.js} +1 -1
  75. package/dist/client/assets/{connection-card-CX4CTBla.js → connection-card-CHIFmA8R.js} +1 -1
  76. package/dist/client/assets/connection-detail-BTDN1t-U.js +1 -0
  77. package/dist/client/assets/{connection-form-helpers-_Xw7Jp1j.js → connection-form-helpers-CWhKbOwZ.js} +1 -1
  78. package/dist/client/assets/connections-Df79XqMS.js +1 -0
  79. package/dist/client/assets/{context-menu-WSPOvmVH.js → context-menu-DkDkJvo8.js} +1 -1
  80. package/dist/client/assets/{decopilot-CPXrk6Nc.js → decopilot-CmY0uQsK.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-Dc69PdCV.js → decopilot-sse-pool-CXkkAKQx.js} +1 -1
  82. package/dist/client/assets/{dialog-DC6TTwSU.js → dialog-fVpV_18N.js} +1 -1
  83. package/dist/client/assets/{domain-settings-C1pK704i.js → domain-settings-BIaZaqXi.js} +1 -1
  84. package/dist/client/assets/{drawer-D-qJMn42.js → drawer-iojIyQ7Z.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-B3yjOr3B.js → dropdown-menu-HRW3zYBQ.js} +1 -1
  86. package/dist/client/assets/{empty-state-WkcHfsbi.js → empty-state-ySGQGV31.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-D0kn1CiV.js → extract-connection-data-CrjpOcI0.js} +1 -1
  88. package/dist/client/assets/{file-explorer-rTq33vqz.js → file-explorer-D1OUZ8cU.js} +1 -1
  89. package/dist/client/assets/{file-type-icon-BphKjXRo.js → file-type-icon-BSAfTQY6.js} +1 -1
  90. package/dist/client/assets/{files-B7FZKUGh.js → files-Dvw5nwbp.js} +1 -1
  91. package/dist/client/assets/{form-g86n2zay.js → form-dD3QczZa.js} +1 -1
  92. package/dist/client/assets/{general-DQFzRc7X.js → general-C6KcKAXv.js} +1 -1
  93. package/dist/client/assets/github-repo-picker-YqP06Fto.js +1 -0
  94. package/dist/client/assets/{hooks-CpWosBE0.js → hooks-C3qiFxIG.js} +5 -5
  95. package/dist/client/assets/{import-from-deco-dialog-DHQFK9MP.js → import-from-deco-dialog-DDsiz0pE.js} +2 -2
  96. package/dist/client/assets/{index-BTDSQgHj.js → index-B7xwJlcR.js} +5 -5
  97. package/dist/client/assets/{index-Bnq_KeQl.js → index-BK10Xdph.js} +1 -1
  98. package/dist/client/assets/{index-V_z4g85O.js → index-BMCJlhk3.js} +24 -24
  99. package/dist/client/assets/{index-D0VHzTLF.js → index-BO-4uKUn.js} +1 -1
  100. package/dist/client/assets/index-BodEVjlg.js +1 -0
  101. package/dist/client/assets/{index-3BRPugsV.js → index-C102AH4s.js} +1 -1
  102. package/dist/client/assets/{index-B1povjSt.js → index-CXXnf1Qe.js} +1 -1
  103. package/dist/client/assets/{index-CKZ2Jo27.js → index-Ci5DmEN0.js} +1 -1
  104. package/dist/client/assets/{index-DDYqxneq.js → index-CpgQ8CBr.js} +1 -1
  105. package/dist/client/assets/{index-CmTvfvqV.js → index-Cvy8WHIB.js} +1 -1
  106. package/dist/client/assets/index-DDRZvmg6.css +1 -0
  107. package/dist/client/assets/{index-DPpLkDX2.js → index-DqK88OS0.js} +1 -1
  108. package/dist/client/assets/index-FKJOX04p.js +1 -0
  109. package/dist/client/assets/{index-UunSb5mF.js → index-jh_AV7fc.js} +1 -1
  110. package/dist/client/assets/{index-DeuQtcBQ.js → index-q8ngIE68.js} +1 -1
  111. package/dist/client/assets/{index-redirect-CgRpP2To.js → index-redirect-B05if20n.js} +1 -1
  112. package/dist/client/assets/{input-DVRfAVU3.js → input-Bk-XA8aE.js} +1 -1
  113. package/dist/client/assets/{integration-icon-DdvXmN6b.js → integration-icon-D5R24LMd.js} +1 -1
  114. package/dist/client/assets/{label-D1MGSLX0.js → label-DbgfgBJH.js} +1 -1
  115. package/dist/client/assets/{login-DlviF7QT.js → login-BnanKvfh.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-DlBIPcRz.js → mcp-oauth-Ge7_9DJm.js} +1 -1
  117. package/dist/client/assets/{members-HLvKGfjN.js → members-OMqqgRie.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-Adha2rD5.js → monaco-editor-CLbivzeA.js} +2 -2
  119. package/dist/client/assets/{monitoring-stats-row-DoSzHe4u.js → monitoring-stats-row-D988ksKz.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-BLm1iokb.js → oauth-callback-CMcTYSQ9.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-8sG6eagR.js → oauth-callback-ai-provider-CPlg-Iun.js} +1 -1
  122. package/dist/client/assets/{onboarding-iZKUv6aI.js → onboarding-BQtZWhzG.js} +1 -1
  123. package/dist/client/assets/{org-install-C9Svi1Dd.js → org-install-EHXdq4o2.js} +1 -1
  124. package/dist/client/assets/{org-layout-B46TOnBU.js → org-layout-qDY2vnUU.js} +1 -1
  125. package/dist/client/assets/{organization-choice-D5AMR6f-.js → organization-choice-BOiOzldx.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-DnlsqJ-m.js → page-seo-form-DeK8_ys8.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-CnuTSA1a.js +1 -0
  128. package/dist/client/assets/popover-BTH_4TON.js +1 -0
  129. package/dist/client/assets/{post-editor-BI1JMrba.js → post-editor-DJSqRdmQ.js} +1 -1
  130. package/dist/client/assets/{preview-dialog-CNgWM1Nd.js → preview-dialog-C4U9zVzk.js} +3 -3
  131. package/dist/client/assets/{primitives-1UYw8T7c.js → primitives-CXIIxbFE.js} +1 -1
  132. package/dist/client/assets/{profile-DlyPm-rk.js → profile-OkUeU-xS.js} +1 -1
  133. package/dist/client/assets/project-app-view-ClFsE-uv.js +1 -0
  134. package/dist/client/assets/record-editor-Ba_-uY6W.js +1 -0
  135. package/dist/client/assets/registry-OeyyY_3h.js +2 -0
  136. package/dist/client/assets/{registry-layout-k5bH_SdU.js → registry-layout-CmbVIFjk.js} +1 -1
  137. package/dist/client/assets/{require-capability-Cnsb8ohV.js → require-capability-B3YVeyKQ.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-BrqLeeGH.js → required-auth-layout-hwOac595.js} +1 -1
  139. package/dist/client/assets/{reset-password-Du_C_DrW.js → reset-password-DYADQ6t-.js} +1 -1
  140. package/dist/client/assets/roles-CwZxDmMd.js +1 -0
  141. package/dist/client/assets/{save-status-B7sExUGT.js → save-status-cz-ufgN_.js} +1 -1
  142. package/dist/client/assets/{scroll-area-wkOEFA0d.js → scroll-area-BliS1K3p.js} +1 -1
  143. package/dist/client/assets/{search-input-R9PP00jU.js → search-input-CUOcSr_7.js} +1 -1
  144. package/dist/client/assets/secrets-CyW5acaW.js +1 -0
  145. package/dist/client/assets/{sections-editor-Din5M3E7.js → sections-editor-Dv8SUTjk.js} +1 -1
  146. package/dist/client/assets/select-8EVXQGwX.js +1 -0
  147. package/dist/client/assets/{select-model-GwKBIN6-.js → select-model-iQAMpxgJ.js} +1 -1
  148. package/dist/client/assets/{seo-editor-C4-hewoS.js → seo-editor-BNVUsXCz.js} +1 -1
  149. package/dist/client/assets/{settings-layout-nQ4HGRFy.js → settings-layout-D-yUHTQc.js} +1 -1
  150. package/dist/client/assets/{settings-section-C5yP5Si0.js → settings-section-DHTir3TC.js} +1 -1
  151. package/dist/client/assets/{sheet-B6_wuIQB.js → sheet-ZPG9h0Fj.js} +1 -1
  152. package/dist/client/assets/{shell-controls-BCEkmDxf.js → shell-controls-Zawsretc.js} +1 -1
  153. package/dist/client/assets/shell-layout-CWAvk5Go.js +1 -0
  154. package/dist/client/assets/{shell-route-loading-BpGUKC4D.js → shell-route-loading-mpOo6h4k.js} +1 -1
  155. package/dist/client/assets/{sidebar-BC3PqZZk.js → sidebar-DU6XXtnA.js} +1 -1
  156. package/dist/client/assets/{skeleton-D_8-XLai.js → skeleton-CKrKTMUA.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-g-r61mRK.js → sortable.esm-B3t9DDZ6.js} +1 -1
  158. package/dist/client/assets/{sso-D-jPiEUA.js → sso-CERYxMuj.js} +1 -1
  159. package/dist/client/assets/store-mnbDCvL0.js +1 -0
  160. package/dist/client/assets/store-registry-CJLz8NHB.js +2 -0
  161. package/dist/client/assets/{studio-tools-CcWLJIL3.js → studio-tools-BdR8-wJW.js} +1 -1
  162. package/dist/client/assets/switch-DLwkt3ng.js +1 -0
  163. package/dist/client/assets/{table-DlwTq8lg.js → table-CHbuq2So.js} +1 -1
  164. package/dist/client/assets/tabs-C3tau4Eq.js +1 -0
  165. package/dist/client/assets/{task-status-CG5Li56E.js → task-status-Cpo5H16E.js} +1 -1
  166. package/dist/client/assets/{textarea-DkgswAud.js → textarea-CJuB4hQ7.js} +1 -1
  167. package/dist/client/assets/toggle-group-Ckfjs-c4.js +1 -0
  168. package/dist/client/assets/{toolbar-CMnKNoMl.js → toolbar-D1N_WILM.js} +1 -1
  169. package/dist/client/assets/tooltip-DjHKSu56.js +1 -0
  170. package/dist/client/assets/{types-IxCSiIKg.js → types-CNWQoCyo.js} +6 -6
  171. package/dist/client/assets/use-ai-providers-BxzRSeJ0.js +1 -0
  172. package/dist/client/assets/{use-automations-CktQtzNu.js → use-automations-Br1p5DHc.js} +1 -1
  173. package/dist/client/assets/{use-capability-mUGdJwF_.js → use-capability-E8ccWznH.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-Db61_Lpl.js → use-clock-tick-BW4BJ8Tt.js} +1 -1
  175. package/dist/client/assets/use-collections-CsNhZa6R.js +1 -0
  176. package/dist/client/assets/{use-connection-DY54rYyd.js → use-connection-_slG13py.js} +1 -1
  177. package/dist/client/assets/{use-copy-BaIsIuIB.js → use-copy-60B0ujzD.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-C92AqYem.js → use-create-virtual-mcp-aSsDb_hC.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-CgWI7Lb7.js → use-debounced-autosave-DlQ25v46.js} +1 -1
  180. package/dist/client/assets/{use-delete-connection-BP5srM_m.js → use-delete-connection-BSgRrEnr.js} +1 -1
  181. package/dist/client/assets/use-file-configs-TueoM3xk.js +1 -0
  182. package/dist/client/assets/{use-infinite-scroll-CcoRA6NH.js → use-infinite-scroll-B7KmD1ay.js} +1 -1
  183. package/dist/client/assets/{use-join-requests-CezHwAN7.js → use-join-requests-Bugx9GLx.js} +1 -1
  184. package/dist/client/assets/use-mcp-client--_ZSmyGd.js +10 -0
  185. package/dist/client/assets/use-mcp-prompts-Bi0YM-MV.js +1 -0
  186. package/dist/client/assets/use-mcp-tools-C6z5gFrv.js +1 -0
  187. package/dist/client/assets/use-members-D4NNP_ry.js +1 -0
  188. package/dist/client/assets/{use-navigate-to-agent-BzP0osS7.js → use-navigate-to-agent-C2eJezkw.js} +1 -1
  189. package/dist/client/assets/{use-org-auth-client-CL0p_f0y.js → use-org-auth-client-Bn9WqUMO.js} +1 -1
  190. package/dist/client/assets/{use-org-sso-CFcfBOij.js → use-org-sso-CgbvxseW.js} +1 -1
  191. package/dist/client/assets/{use-organization-roles-Banmg_pK.js → use-organization-roles-Cg0ug59K.js} +1 -1
  192. package/dist/client/assets/{use-organization-settings-C13VUvc7.js → use-organization-settings-DQ5ROkEQ.js} +1 -1
  193. package/dist/client/assets/{use-registry-connections-D7CDGVjW.js → use-registry-connections-Ba1xQHz9.js} +1 -1
  194. package/dist/client/assets/use-secrets-B1jqMRBn.js +1 -0
  195. package/dist/client/assets/{use-status-sounds-C-rHNkXR.js → use-status-sounds-Bj_NbDO6.js} +1 -1
  196. package/dist/client/assets/{use-view-mode-Brlii9ZZ.js → use-view-mode-BvWJalT6.js} +1 -1
  197. package/dist/client/assets/{use-virtual-mcp-oC_oTaOn.js → use-virtual-mcp-BZlyJ3on.js} +1 -1
  198. package/dist/client/assets/useInfiniteQuery-DDGqv00b.js +1 -0
  199. package/dist/client/assets/useSuspenseInfiniteQuery-DI0bMzys.js +1 -0
  200. package/dist/client/assets/{variant-calendar-DrknBuXM.js → variant-calendar-C0Qs1GnN.js} +1 -1
  201. package/dist/client/assets/{view-mode-toggle-Dgssa66x.js → view-mode-toggle-DcivAyKH.js} +1 -1
  202. package/dist/client/index.html +2 -2
  203. package/dist/server/cli.js +249 -249
  204. package/dist/server/server.js +51 -51
  205. package/package.json +1 -1
  206. package/dist/client/assets/ai-providers-VH8M6hT6.js +0 -1
  207. package/dist/client/assets/automation-runs-Dm8vrkrz.js +0 -1
  208. package/dist/client/assets/automations-DA5a6gqY.js +0 -1
  209. package/dist/client/assets/brand-context-CULMCcpa.js +0 -1
  210. package/dist/client/assets/buckets-DMU0eaXD.js +0 -1
  211. package/dist/client/assets/category-editor-BJlYKlYH.js +0 -1
  212. package/dist/client/assets/collection-detail-wY7wsRFe.js +0 -1
  213. package/dist/client/assets/commerce-onboarding-CyEeXl3T.js +0 -1
  214. package/dist/client/assets/connection-detail-BDjbD-IX.js +0 -1
  215. package/dist/client/assets/connections-DJEG78Dv.js +0 -1
  216. package/dist/client/assets/github-repo-picker-C6HuqJ8f.js +0 -1
  217. package/dist/client/assets/index-DBaGwpyP.css +0 -1
  218. package/dist/client/assets/index-DEAvf9Ss.js +0 -1
  219. package/dist/client/assets/index-DPmafiSm.js +0 -1
  220. package/dist/client/assets/page-seo-sheet-BB-bVgSe.js +0 -1
  221. package/dist/client/assets/popover-ChpnNBG6.js +0 -1
  222. package/dist/client/assets/project-app-view-CxdK6kb-.js +0 -1
  223. package/dist/client/assets/record-editor-BPS6LmYc.js +0 -1
  224. package/dist/client/assets/registry-B54461Ff.js +0 -2
  225. package/dist/client/assets/roles-DLI7p3m9.js +0 -1
  226. package/dist/client/assets/secrets-BBIIYJQL.js +0 -1
  227. package/dist/client/assets/select-iQPDKsQJ.js +0 -1
  228. package/dist/client/assets/shell-layout-vJZz5HSU.js +0 -1
  229. package/dist/client/assets/store-CdLz3AFq.js +0 -1
  230. package/dist/client/assets/store-registry-cn1ZHxyv.js +0 -2
  231. package/dist/client/assets/switch-DAdK-1sZ.js +0 -1
  232. package/dist/client/assets/tabs-B6a4ZhCv.js +0 -1
  233. package/dist/client/assets/toggle-group-BYYV7q2R.js +0 -1
  234. package/dist/client/assets/tooltip-Bodmhuae.js +0 -1
  235. package/dist/client/assets/use-ai-providers-Dr3wiSPj.js +0 -1
  236. package/dist/client/assets/use-collections-gMfZ5Rvk.js +0 -1
  237. package/dist/client/assets/use-file-configs-CxuIY0bl.js +0 -1
  238. package/dist/client/assets/use-mcp-client-DsIzdxc1.js +0 -10
  239. package/dist/client/assets/use-mcp-prompts-CwZBO4qi.js +0 -1
  240. package/dist/client/assets/use-mcp-tools-BAGnYViX.js +0 -1
  241. package/dist/client/assets/use-members-Rhm6WZIF.js +0 -1
  242. package/dist/client/assets/use-secrets-C6okhs5V.js +0 -1
  243. package/dist/client/assets/useInfiniteQuery-BDW2fh8c.js +0 -1
  244. package/dist/client/assets/useSuspenseInfiniteQuery-Bfsxp_qn.js +0 -1
@@ -1 +0,0 @@
1
- import{c as F,j as r}from"./index-V_z4g85O.js";import{I as T}from"./input-DVRfAVU3.js";import{L as C}from"./label-D1MGSLX0.js";import{T as L}from"./textarea-DkgswAud.js";import{ar as A,as as R,at as D,au as J}from"./index-BTDSQgHj.js";import{u as K,s as P}from"./primitives-1UYw8T7c.js";import{S as M}from"./save-status-B7sExUGT.js";import"./index-CKZ2Jo27.js";import"./chat-context-D2JYAjtU.js";import"./hooks-CpWosBE0.js";import"./use-mcp-client-DsIzdxc1.js";import"./auth-DEpXDpCk.js";import"./decopilot-sse-pool-Dc69PdCV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-oC_oTaOn.js";import"./use-collections-gMfZ5Rvk.js";import"./use-ai-providers-Dr3wiSPj.js";import"./studio-tools-CcWLJIL3.js";import"./tab-id-BptcWVWa.js";import"./use-organization-settings-C13VUvc7.js";import"./scroll-area-wkOEFA0d.js";import"./agent-icon-Dwg5FgWW.js";import"./AlertCircle-CqXnKI3D.js";import"./Tool01-CyFZLY0Y.js";import"./SwitchHorizontal01-C-8MujcR.js";import"./Settings02-Gfe6bidH.js";import"./XCircle-Dcz0bhP7.js";import"./ArrowUpRight-D_A_c-WP.js";import"./ZapSquare-C6FRNhWU.js";import"./Users03-DNFFVYi5.js";import"./CheckCircle-B6_BlhWA.js";import"./ChevronUp-DTH787oJ.js";import"./ChevronDown-CsJyvcQs.js";import"./ChevronLeft-cwkPjMhb.js";import"./ChevronRight-DbmfCIOT.js";import"./DotsVertical-DXADESRu.js";import"./Stars02-CNjkSD-c.js";import"./Eye-Cd9WdjRO.js";import"./ZoomOut-B6sxahLJ.js";import"./Globe01-BtWLhdgc.js";import"./FilterLines-DDE5Z7pT.js";import"./Star01-BfbfCcYt.js";import"./Globe04-DVbA5z-S.js";import"./HardDrive-Dv021FxK.js";import"./Key01-AxVsjzoW.js";import"./LayoutLeft-DFQX2HQS.js";import"./LinkExternal01-DFJC7MKi.js";import"./Monitor01-DzIaslp9.js";import"./Sun-CduMeE8P.js";import"./Palette-DRyOxvc4.js";import"./Play-BGOeSWeu.js";import"./Plus-zfs5-JeK.js";import"./SearchMd-DUUd_hhd.js";import"./Shield01-5ohBHD7b.js";import"./Stars01-CDSyPsDa.js";import"./Trash01-BwZvbUqV.js";import"./Upload01-BENZkUL6.js";import"./User01-C6id_Jz0.js";import"./Users01-DoemHjk2.js";import"./XClose-c_WWFEvr.js";import"./X-DbKbpx_s.js";import"./Zap-iEV7Y0HC.js";import"./use-clock-tick-Db61_Lpl.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BaIsIuIB.js";import"./tooltip-Bodmhuae.js";import"./file-type-icon-BphKjXRo.js";import"./dialog-DC6TTwSU.js";import"./content-blocks-o63cs2vh.js";import"./types-IxCSiIKg.js";import"./shell-layout-vJZz5HSU.js";import"./avatar-DPNVdynG.js";import"./required-auth-layout-BrqLeeGH.js";import"./use-org-sso-CFcfBOij.js";import"./sheet-B6_wuIQB.js";import"./integration-icon-DdvXmN6b.js";import"./use-navigate-to-agent-BzP0osS7.js";import"./use-connection-DY54rYyd.js";import"./use-mcp-prompts-CwZBO4qi.js";import"./form-g86n2zay.js";import"./select-iQPDKsQJ.js";import"./drawer-D-qJMn42.js";import"./collection-search-IIs4O29o.js";import"./tabs-B6a4ZhCv.js";import"./toggle-group-BYYV7q2R.js";import"./sortable.esm-g-r61mRK.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CX4CTBla.js";import"./use-registry-connections-D7CDGVjW.js";import"./useInfiniteQuery-BDW2fh8c.js";import"./use-infinite-scroll-CcoRA6NH.js";import"./extract-connection-data-D0kn1CiV.js";import"./card-Trr9Smsl.js";import"./collection-tabs-DStxKs6K.js";import"./badge-BAgfu3s3.js";import"./connection-form-helpers-_Xw7Jp1j.js";import"./authenticate-and-persist-oauth-BELZfB_M.js";import"./mcp-oauth-DlBIPcRz.js";import"./useSuspenseInfiniteQuery-Bfsxp_qn.js";import"./connect-desktop-dialog-CEg8fHOJ.js";import"./decopilot-CPXrk6Nc.js";import"./checkbox-BkY2CRaN.js";import"./skeleton-D_8-XLai.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C5yP5Si0.js";import"./popover-ChpnNBG6.js";import"./command-DziWV9Wl.js";import"./index-UunSb5mF.js";import"./dropdown-menu-B3yjOr3B.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C-rHNkXR.js";import"./empty-state-WkcHfsbi.js";import"./toolbar-CMnKNoMl.js";import"./preview-dialog-CNgWM1Nd.js";import"./index-3BRPugsV.js";import"./use-mcp-tools-BAGnYViX.js";import"./use-capability-mUGdJwF_.js";import"./shell-route-loading-BpGUKC4D.js";import"./index-DeuQtcBQ.js";import"./alert-dialog-Cv06ffuC.js";import"./switch-DAdK-1sZ.js";import"./use-debounced-autosave-CgWI7Lb7.js";import"./index-DPpLkDX2.js";import"./sidebar-BC3PqZZk.js";import"./search-input-R9PP00jU.js";import"./github-repo-picker-C6HuqJ8f.js";import"./use-secrets-C6okhs5V.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Dgssa66x.js";import"./automation-runs-Dm8vrkrz.js";import"./table-DlwTq8lg.js";import"./use-members-Rhm6WZIF.js";import"./use-org-auth-client-CL0p_f0y.js";import"./task-status-CG5Li56E.js";import"./use-automations-CktQtzNu.js";import"./use-file-configs-CxuIY0bl.js";import"./monaco-editor-Adha2rD5.js";import"./select-model-GwKBIN6-.js";import"./automation-list-row-BQBXbnVC.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function jr(S){const t=F.c(34),{orgSlug:v,virtualMcpId:j,branch:f,kind:p,blockKey:g,block:w}=S;let y;t[0]!==f||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:f},t[0]=f,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==w||t[5]!==p?(d=R(w,p),t[4]=w,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:D(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=K(B,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(M,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(J,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{jr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-k5bH_SdU.js","assets/index-V_z4g85O.js","assets/index-DBaGwpyP.css","assets/XCircle-Dcz0bhP7.js","assets/CheckCircle-B6_BlhWA.js","assets/Settings02-Gfe6bidH.js","assets/use-mcp-client-DsIzdxc1.js","assets/auth-DEpXDpCk.js","assets/useInfiniteQuery-BDW2fh8c.js","assets/use-infinite-scroll-CcoRA6NH.js","assets/studio-tools-CcWLJIL3.js","assets/badge-BAgfu3s3.js","assets/input-DVRfAVU3.js","assets/dropdown-menu-B3yjOr3B.js","assets/ChevronUp-DTH787oJ.js","assets/ChevronRight-DbmfCIOT.js","assets/DotsVertical-DXADESRu.js","assets/table-DlwTq8lg.js","assets/toggle-group-BYYV7q2R.js","assets/use-view-mode-Brlii9ZZ.js","assets/tooltip-Bodmhuae.js","assets/FilterLines-DDE5Z7pT.js","assets/Globe01-BtWLhdgc.js","assets/SearchMd-DUUd_hhd.js","assets/dialog-DC6TTwSU.js","assets/X-DbKbpx_s.js","assets/AlertCircle-CqXnKI3D.js","assets/Upload01-BENZkUL6.js","assets/alert-dialog-Cv06ffuC.js","assets/card-Trr9Smsl.js","assets/Trash01-BwZvbUqV.js","assets/label-D1MGSLX0.js","assets/select-iQPDKsQJ.js","assets/ChevronDown-CsJyvcQs.js","assets/switch-DAdK-1sZ.js","assets/textarea-DkgswAud.js","assets/checkbox-BkY2CRaN.js","assets/Eye-Cd9WdjRO.js","assets/LinkExternal01-DFJC7MKi.js","assets/use-copy-BaIsIuIB.js","assets/Key01-AxVsjzoW.js","assets/Plus-zfs5-JeK.js","assets/mcp-oauth-DlBIPcRz.js","assets/Play-BGOeSWeu.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,ak as o}from"./index-V_z4g85O.js";import{R as m}from"./require-capability-Cnsb8ohV.js";import"./use-capability-mUGdJwF_.js";import"./access-gate-Bw0npMv7.js";import"./capability-load-error-DNDjRRk_.js";const n=i.lazy(()=>o(()=>import("./registry-layout-k5bH_SdU.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])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{r as $,v as Ne,K as re,b6 as dt,k as Oe,j as s,l as K,i as fe,B as ne,c as q,y as Pe,aB as Ie,z as se,aD as De,aE as ke,m as $e,E as mt,C as ut,d as Fe,t as he,q as Re,ae as Ke,a6 as ft,a2 as ht,b as gt,u as xt}from"./index-V_z4g85O.js";import{u as pt,C as bt}from"./use-organization-roles-Banmg_pK.js";import{u as je}from"./use-org-auth-client-CL0p_f0y.js";import{B as ge}from"./badge-BAgfu3s3.js";import{f as Qe,a as qe,b as He,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-Cv06ffuC.js";import{D as Tt,a as Et,b as _t,c as It}from"./dropdown-menu-B3yjOr3B.js";import{a as Nt}from"./DotsVertical-DXADESRu.js";import{s as Ae}from"./Plus-zfs5-JeK.js";import{s as St}from"./Trash01-BwZvbUqV.js";import{P as te}from"./index-DPpLkDX2.js";import{E as Ge}from"./empty-state-WkcHfsbi.js";import{S as ve}from"./search-input-R9PP00jU.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-DdvXmN6b.js";import{u as Ct}from"./use-infinite-scroll-CcoRA6NH.js";import{C as we}from"./checkbox-BkY2CRaN.js";import{i as At}from"./Settings02-Gfe6bidH.js";import{u as Ot}from"./useSuspenseInfiniteQuery-Bfsxp_qn.js";import{u as Rt,S as jt}from"./use-mcp-client-DsIzdxc1.js";import{C as vt}from"./collection-search-IIs4O29o.js";import{u as nt}from"./use-members-Rhm6WZIF.js";import{u as yt}from"./use-connection-DY54rYyd.js";import{u as wt,d as Mt}from"./use-ai-providers-Dr3wiSPj.js";import{A as lt}from"./avatar-DPNVdynG.js";import{S as xe}from"./switch-DAdK-1sZ.js";import{c as pe,b as be,T as Te,a as Ee}from"./tooltip-Bodmhuae.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-C5yP5Si0.js";import{t as Lt}from"./ChevronDown-CsJyvcQs.js";import{i as Pt}from"./ChevronRight-DbmfCIOT.js";import{i as ze}from"./X-DbKbpx_s.js";import{a as Dt}from"./use-capability-mUGdJwF_.js";import{A as kt}from"./access-gate-Bw0npMv7.js";import"./table-DlwTq8lg.js";import"./SwitchHorizontal01-C-8MujcR.js";import"./ChevronUp-DTH787oJ.js";import"./sidebar-BC3PqZZk.js";import"./LayoutLeft-DFQX2HQS.js";import"./sheet-B6_wuIQB.js";import"./SearchMd-DUUd_hhd.js";import"./XCircle-Dcz0bhP7.js";import"./agent-icon-Dwg5FgWW.js";import"./AlertCircle-CqXnKI3D.js";import"./Tool01-CyFZLY0Y.js";import"./ArrowUpRight-D_A_c-WP.js";import"./ZapSquare-C6FRNhWU.js";import"./Users03-DNFFVYi5.js";import"./CheckCircle-B6_BlhWA.js";import"./ChevronLeft-cwkPjMhb.js";import"./Stars02-CNjkSD-c.js";import"./Eye-Cd9WdjRO.js";import"./ZoomOut-B6sxahLJ.js";import"./Globe01-BtWLhdgc.js";import"./FilterLines-DDE5Z7pT.js";import"./Star01-BfbfCcYt.js";import"./Globe04-DVbA5z-S.js";import"./HardDrive-Dv021FxK.js";import"./Key01-AxVsjzoW.js";import"./LinkExternal01-DFJC7MKi.js";import"./Monitor01-DzIaslp9.js";import"./Sun-CduMeE8P.js";import"./Palette-DRyOxvc4.js";import"./Play-BGOeSWeu.js";import"./Shield01-5ohBHD7b.js";import"./Stars01-CDSyPsDa.js";import"./Upload01-BENZkUL6.js";import"./User01-C6id_Jz0.js";import"./Users01-DoemHjk2.js";import"./XClose-c_WWFEvr.js";import"./Zap-iEV7Y0HC.js";import"./auth-DEpXDpCk.js";import"./use-collections-gMfZ5Rvk.js";import"./studio-tools-CcWLJIL3.js";import"./card-Trr9Smsl.js";import"./capability-load-error-DNDjRRk_.js";const Me="basic-usage",Le=[{id:Me,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===Me)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===Me)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=q.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(we,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let N;return e[17]!==f||e[18]!==o||e[19]!==m?(N=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=N):N=e[20],N}function Yt(t){return t.stopPropagation()}function $t(t){const e=q.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(we,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Ne(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),N=100,E=h.trim(),T=E?{operator:"or",conditions:[{field:["title"],operator:"contains",value:E},{field:["description"],operator:"contains",value:E}]}:void 0,S=!!n,C={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:0,...S&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:b,...S&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,H)=>Q+(H?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,w=x.current,A=[...w.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!w.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[M,z]=$.useState(G[0]?.id??null),y=M?G.find(b=>b.id===M)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",M??""),queryFn:async()=>M?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:M}})).structuredContent?.item??null:null,enabled:!!M,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],H=Q.includes(D),W={...t};if(H){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===M?F:[];if(!D.length)return;const Q=t[b]??[],H=D.map(ee=>ee.name),W=Q.length>0&&H.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=H,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=M===b.id,Q=D?F.length:0,H=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:H,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Se=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function qt(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Se.length;return Se[n]??Se[0]}function Ht(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function ot(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=q.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const N=x.map(m).filter(Jt);let E;e[12]!==n||e[13]!==i||e[14]!==r?(E=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=E):E=e[15];let T;e[16]!==n||e[17]!==c||e[18]!==E?(T=Ye(n,c,E),e[16]=n,e[17]=c,e[18]=E,e[19]=T):T=e[19];let S;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(S=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=S):S=e[24];let C;e[25]!==T||e[26]!==S?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:T,onClick:S})})}),e[25]=T,e[26]=S,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,N.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):N.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=q.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[N,E]=$.useState(m),T=m||N,S=E,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==T||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=()=>S(cs),e[24]=w):w=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let M;e[36]!==T?(M=T?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=T,e[37]=M):M=e[37];let z;e[38]!==M||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,M]}),e[38]=M,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:w,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,T&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=T,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=q.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=Mt(n.id);let a,x,o,m,N;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){N=Symbol.for("react.early_return_sentinel");e:{let S;e[16]!==n.label?(S=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=S):S=e[17];const C=f.filter(hs).map(S),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){N=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let w;e[21]!==u?(w=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=w):w=e[22],e[23]!==w||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,w]}),e[23]=w,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=N}else a=e[11],x=e[12],o=e[13],m=e[14],N=e[15];if(N!==Symbol.for("react.early_return_sentinel"))return N;let E;e[26]!==a||e[27]!==x?(E=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=E):E=e[28];let T;return e[29]!==o||e[30]!==m||e[31]!==E?(T=s.jsxs("div",{className:o,children:[m,E]}),e[29]=o,e[30]=m,e[31]=E,e[32]=T):T=e[32],T}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=q.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=wt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(w=>w!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,N=!c&&"hover:bg-muted/50 cursor-pointer";let E;e[7]!==N?(E=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",N),e[7]=N,e[8]=E):E=e[8];let T;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(T=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=T):T=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=S):S=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==E||e[21]!==T||e[22]!==C?(v=s.jsxs("div",{className:E,onClick:T,children:[S,C]}),e[20]=E,e[21]=T,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=q.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,N,E,T,S,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const M=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],N=z,m=Qe,O=n,p=l,o=qe,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(He,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],S="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],E="flex-1 overflow-auto",T=M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:M.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(we,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(lt,{url:y.user?.image??void 0,fallback:ot(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=N,e[12]=E,e[13]=T,e[14]=S,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],N=e[11],E=e[12],T=e[13],S=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==E||e[30]!==T?(R=s.jsx("div",{className:E,children:T}),e[29]=E,e[30]=T,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==S||e[34]!==C?(I=s.jsxs("div",{className:S,children:[C,R]}),e[32]=R,e[33]=S,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,w=f.length>0&&`(${f.length})`;let A;e[37]!==N||e[38]!==u||e[39]!==w?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:N,disabled:u,children:["Add ",w]})]}),e[37]=N,e[38]=u,e[39]=w,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Ts(t){const e=q.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,N;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);N="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(lt,{url:I.user?.image??void 0,fallback:ot(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Ee,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=N}else o=e[7],m=e[8],N=e[9];let E;e[14]!==o||e[15]!==m?(E=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=E):E=e[16];let T;e[17]!==n||e[18]!==l?(T=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=T):T=e[19];let S;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==T?(S=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:T}),e[20]=h,e[21]=n,e[22]=c,e[23]=T,e[24]=S):S=e[24];let C;return e[25]!==N||e[26]!==E||e[27]!==S?(C=s.jsxs("div",{className:N,children:[E,S]}),e[25]=N,e[26]=E,e[27]=S,e[28]=C):C=e[28],C}function Es(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Ts,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ns(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ss(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ns(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=q.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Ee,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=q.c(14),{locator:n}=Ne(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Ne(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,N=o.formState.isDirty,E=Fe({mutationFn:async u=>{const w=Ss(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const M=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!M.includes(L)),y=M.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,M=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:w,...M?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(M?U:B,M?B:void 0),M?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:w});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const M=await d.organization.updateMemberRole({memberId:B,role:[A]});if(M?.error)throw new Error(M.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,w)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!w.role.id&&!w.role.slug,k=w.role.slug==="owner"&&!w.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:w.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),T=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}E.mutate(u)}),S=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:S&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:E.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:T,disabled:E.isPending||!m||!N,children:E.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Ht(t.role):qt(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Es,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=q.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function ws(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const Ms={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?Ms[t]??"bg-neutral-400":ws(t)}function Ps(){const t=q.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Ne(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let N;e:{if(!h){N=null;break e}if(h==="new"){N={kind:"new"};break e}if(h.startsWith("builtin-")){N={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);N=V?{kind:"custom",role:V}:null}const E=N;let T;t[5]!==c?(T=re.members(c),t[5]=c,t[6]=T):T=t[6];let S;t[7]!==g?(S=()=>g.organization.listMembers(),t[7]=g,t[8]=S):S=t[8];let C;t[9]!==T||t[10]!==S?(C={queryKey:T,queryFn:S},t[9]=T,t[10]=S,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),E?.kind==="custom"&&E.role.id===V&&m(void 0)},onError:zs});let w,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},w={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=w,t[27]=A,t[28]=k,t[29]=G):(w=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,w,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(Tt,{children:[s.jsx(Et,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(Nt,{size:16})})}),s.jsx(_t,{align:"end",onClick:Ds,children:s.jsxs(It,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let M;t[31]!==m?(M=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=M):M=t[32];const z=M;if(E){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:E,onBack:P,onSaved:V},js(E))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(bt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let H;t[61]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ze,{children:"Delete Role"}),t[61]=H):H=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(He,{children:[H,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(qe,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function ml(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{ml as default};
@@ -1 +0,0 @@
1
- import{c as p,j as t,a2 as P,r as j,ae as w,B as S,t as y}from"./index-V_z4g85O.js";import{i as k}from"./AlertCircle-CqXnKI3D.js";import{s as z}from"./Plus-zfs5-JeK.js";import{s as F}from"./User01-C6id_Jz0.js";import{t as E}from"./Users01-DoemHjk2.js";import{d as $,c as I,D as O,a as A,b as R,e as T}from"./dialog-DC6TTwSU.js";import{I as N}from"./input-DVRfAVU3.js";import{L as g}from"./label-D1MGSLX0.js";import{d as B,b as V,c as L,S as q,a as C}from"./select-iQPDKsQJ.js";import{S as H}from"./skeleton-D_8-XLai.js";import{T as K}from"./textarea-DkgswAud.js";import{P as b}from"./index-DPpLkDX2.js";import{c as W}from"./settings-section-C5yP5Si0.js";import{u as Y,a as G}from"./use-secrets-C6okhs5V.js";import{R as J}from"./require-capability-Cnsb8ohV.js";import"./X-DbKbpx_s.js";import"./tooltip-Bodmhuae.js";import"./ChevronUp-DTH787oJ.js";import"./ChevronDown-CsJyvcQs.js";import"./sidebar-BC3PqZZk.js";import"./LayoutLeft-DFQX2HQS.js";import"./sheet-B6_wuIQB.js";import"./card-Trr9Smsl.js";import"./ArrowUpRight-D_A_c-WP.js";import"./studio-tools-CcWLJIL3.js";import"./use-capability-mUGdJwF_.js";import"./access-gate-Bw0npMv7.js";import"./capability-load-error-DNDjRRk_.js";function M(s){const e=p.c(3),{error:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k,{size:16}),e[0]=c):c=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function Q(s){const e=p.c(5),{scope:r}=s,c=r==="user"?F:E,n=r==="user"?"Private":"Organization";let i;e[0]!==c?(i=t.jsx(c,{size:12}),e[0]=c,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=p.c(20),{secret:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(Q,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[c,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let o;e[15]!==l?(o=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=o):o=e[16];let x;return e[17]!==u||e[18]!==o?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,o]}),e[17]=u,e[18]=o,e[19]=x):x=e[19],x}function U(s){const e=p.c(5),{onCreate:r}=s;let c,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=c,e[1]=n):(c=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,c]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),o=G();function x(){c("organization"),i(""),d(""),l("")}function f(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await o.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),f()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):f()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>c(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:f,disabled:o.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:o.isPending||!n.trim()||!a,children:o.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=p.c(21),e=Y(),[r,c]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(U,{onCreate:()=>c(!0)}),s[0]=l):l=s[0];let o;return s[1]!==r?(o=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:c})]}),s[1]=r,s[2]=o):o=s[2],o}let n,i,a;if(s[3]!==e){const l=e.filter(se),o=e.filter(te),x=e.length===1?"":"s";let f;s[7]!==e.length||s[8]!==x?(f=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=f):f=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==f?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[f,m]}),s[12]=f,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=o.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:o.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:c}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=p.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(W,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(M,{error:e??new Error("Failed to load secrets")})}function $e(){const s=p.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(J,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{$e as default};
@@ -1 +0,0 @@
1
- import{r as c,ah as nt,$ as Pe,j as d,a0 as rt,ai as be,W as k,M as st,P as j,Q as _,bO as $,_ as lt,aO as Ne,T as Ee,ag as at,bJ as it,bQ as ct,dy as dt,dB as ut,dz as pt,dC as ft,X as mt,U as ht,dA as gt,Y as vt,Z as xt,c as ee,l as oe}from"./index-V_z4g85O.js";import{V as St}from"./tooltip-Bodmhuae.js";import{i as wt,n as Ct}from"./ChevronUp-DTH787oJ.js";import{t as Re}from"./ChevronDown-CsJyvcQs.js";function _e(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],Q="Select",[de,ue,bt]=at(Q),[ne]=ht(Q,[bt,Ee]),pe=Ee(),[Tt,G]=ne(Q),[Pt,_t]=ne(Q),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:v,disabled:b,required:w,form:S}=r,p=pe(e),[g,C]=c.useState(null),[m,x]=c.useState(null),[U,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:Q}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:Q}),L=c.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Je,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:v,value:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[v,b,w]=tt(p=>{const g=u().filter(x=>!x.disabled),C=g.find(x=>x.value===s.value),m=ot(g,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const g=v.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(g&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,v=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:v,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",ke=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=Nt;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var J="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(J,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=J;var A=10,[Ve,Y]=ne(J),Rt="SelectContentImpl",jt=gt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g,...C}=r,m=G(J,t),[x,U]=c.useState(null),[M,re]=c.useState(null),N=k(e,f=>U(f)),[O,F]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:v,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(J,t),s=Y(J,t),[l,a]=c.useState(null),[u,h]=c.useState(null),v=k(e,N=>h(N)),b=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&g&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=N.left-P,Z=N.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-N.right-P,Z=N.width+X,ge=Math.max(Z,O.width),ve=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ve-ge)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ie=B-te,se=g.offsetHeight/2,f=g.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&g===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&g===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,i.trigger,i.valueNode,l,u,p,g,C,i.dir,o]);$(()=>x(),[x]);const[U,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:d.jsx(j.div,{...n,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(vt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(J,{}),we="SelectViewport",Ue=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=s;if(b?.current&&v){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(v.style.minHeight),g=parseFloat(v.style.height),C=Math.max(p,g);if(C<S){const m=C+w,x=Math.min(S,m),U=m-x;v.style.height=x+"px",v.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,v.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,v]=c.useState(i??""),[b,w]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),g=c.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{v(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{g.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{g.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{g.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{g.current=m.pointerType,n?a.onItemLeave?.():g.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,v]=c.useState(null),b=k(e,C=>v(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Je=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=k(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const v=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(v)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Je.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Ue,Qt=$e,Jt=Ge,eo=qe,to=Xe,oo=Ze;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let v;e[9]!==a?(v=!a&&d.jsx(no,{}),e[9]=a,e[10]=v):v=e[10];const b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==v||e[22]!==S||e[23]!==p?(g=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[v,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=v,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Jt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Qt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{fo as S,mo as a,po as b,uo as c,co as d,_e as e};
@@ -1 +0,0 @@
1
- import{c as k,d as X,j as s,B as O,bW as K,t as B,ae as fe,a as Z,o as Se,a5 as ge,K as le,bX as je,bY as ve,L as G,r as V,bZ as ke,b_ as Ne,k as ie,b as Oe,v as _e,e as he,u as Ce,F as Ae,b$ as $e,c0 as ce,c1 as ze,c2 as Te,S as Ee,O as Me,c3 as Pe}from"./index-V_z4g85O.js";import{A as te}from"./avatar-DPNVdynG.js";import{t as pe,a as Le}from"./Users03-DNFFVYi5.js";import{i as Fe,b as Ie,s as qe,a as M,n as Re}from"./Stars02-CNjkSD-c.js";import{s as De}from"./XClose-c_WWFEvr.js";import{i as U}from"./CheckCircle-B6_BlhWA.js";import{i as de}from"./FilterLines-DDE5Z7pT.js";import{i as H}from"./Zap-iEV7Y0HC.js";import{c as Ue,D as Ke,a as He,d as Ge}from"./dialog-DC6TTwSU.js";import{R as Be}from"./required-auth-layout-BrqLeeGH.js";import{g as We,c as Ye,A as Je}from"./hooks-CpWosBE0.js";import{a as Qe,m as Ve,S as Xe}from"./use-mcp-client-DsIzdxc1.js";import{n as Ze}from"./tab-id-BptcWVWa.js";import{c as et}from"./use-organization-settings-C13VUvc7.js";import{u as tt}from"./use-org-sso-CFcfBOij.js";function nt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i={mutationFn:async()=>{const b=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await b.json();if(!b.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:b=>{window.location.href=`/${b.slug??o}`},onError:ot},e[0]=o,e[1]=i):i=e[1];const l=X(i),d=st;let c;e[2]!==r||e[3]!==n?(c=r?s.jsx(te,{url:r,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(pe,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=s.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let h;e[12]!==l?(h=()=>l.mutate(),e[12]=l,e[13]=h):h=e[13];const x=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==h||e[16]!==x?(f=s.jsx(O,{onClick:h,disabled:l.isPending,children:x}),e[14]=l.isPending,e[15]=h,e[16]=x,e[17]=f):f=e[17];let g;e[18]!==l.isPending?(g=s.jsx(O,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=g):g=e[19];let y;e[20]!==f||e[21]!==g?(y=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,g]}),e[20]=f,e[21]=g,e[22]=y):y=e[22];let w;return e[23]!==y||e[24]!==c||e[25]!==p?(w=s.jsxs(K,{children:[c,p,y]}),e[23]=y,e[24]=c,e[25]=p,e[26]=w):w=e[26],w}function st(){window.location.href="/"}function ot(t){B.error(t instanceof Error?t.message:"Failed to join organization")}function ue(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:r}=t,a=it,i=r==="not-found",l=i?Fe:fe,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==o||e[2]!==n?(c=i?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]=i,e[1]=o,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=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]=u):u=e[5];let p;e[6]!==d?(p=s.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let h;e[8]!==m?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=h):h=e[9];let x;e[10]!==p||e[11]!==h?(x=s.jsxs("div",{className:"space-y-2",children:[p,h]}),e[10]=p,e[11]=h,e[12]=x):x=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(O,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let g;return e[14]!==u||e[15]!==x?(g=s.jsxs(K,{children:[u,x,f]}),e[14]=u,e[15]=x,e[16]=g):g=e[16],g}function it(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const C=await Z.organization.acceptInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{Se(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:ct},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=X(d);let m;e[7]!==n?(m=async()=>{const C=await Z.organization.rejectInvitation({invitationId:n});if(C.error)throw new Error(C.error.message);return C.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=lt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:rt},e[10]=m,e[11]=p):p=e[11];const h=X(p),x=c.isPending||h.isPending;let f;e[12]!==a||e[13]!==o?(f=a?s.jsx(te,{url:a,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(Ie,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=o,e[14]=f):f=e[14];let g;e[15]!==o?(g=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=g):g=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=y):y=e[17];let w;e[18]!==g?(w=s.jsxs("div",{className:"space-y-2",children:[g,y]}),e[18]=g,e[19]=w):w=e[19];let b;e[20]!==c?(b=()=>c.mutate(),e[20]=c,e[21]=b):b=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let N;e[22]!==x||e[23]!==b||e[24]!==v?(N=s.jsx(O,{onClick:b,disabled:x,children:v}),e[22]=x,e[23]=b,e[24]=v,e[25]=N):N=e[25];let _;e[26]!==h?(_=()=>h.mutate(),e[26]=h,e[27]=_):_=e[27];const S=h.isPending?"Declining…":"Decline";let A;e[28]!==x||e[29]!==_||e[30]!==S?(A=s.jsx(O,{variant:"ghost",onClick:_,disabled:x,children:S}),e[28]=x,e[29]=_,e[30]=S,e[31]=A):A=e[31];let $;e[32]!==N||e[33]!==A?($=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,A]}),e[32]=N,e[33]=A,e[34]=$):$=e[34];let z;return e[35]!==w||e[36]!==$||e[37]!==f?(z=s.jsxs(K,{children:[f,w,$]}),e[35]=w,e[36]=$,e[37]=f,e[38]=z):z=e[38],z}function rt(t){B.error(t instanceof Error?t.message:"Failed to decline invitation")}function lt(){B.success("Invitation declined"),window.location.href="/"}function ct(t){B.error(t instanceof Error?t.message:"Failed to accept invitation")}function dt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let r;e[0]!==o||e[1]!==n?(r=o?s.jsx(te,{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(qe,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=r):r=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=a):a=e[3];let i;e[4]!==n?(i=s.jsxs("div",{className:"space-y-2",children:[a,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]=i):i=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:ut,children:"Go to home"}),e[6]=l):l=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs(K,{children:[r,i,l]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function ut(){window.location.href="/"}function mt(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:r,domain:a}=t;let i;e[0]!==o?(i=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ht,e[2]=l):l=e[2];let d;e[3]!==i?(d={mutationFn:i,onSuccess:l,onError:gt},e[3]=i,e[4]=d):d=e[4];const c=X(d);let m;e[5]!==r||e[6]!==n?(m=r?s.jsx(te,{url:r,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(pe,{className:"h-6 w-6 text-primary"})}),e[5]=r,e[6]=n,e[7]=m):m=e[7];let u;e[8]!==n?(u=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=u):u=e[9];let p;e[10]!==a?(p=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",a]})," emails before you can join."]}),e[10]=a,e[11]=p):p=e[11];let h;e[12]!==u||e[13]!==p?(h=s.jsxs("div",{className:"space-y-2",children:[u,p]}),e[12]=u,e[13]=p,e[14]=h):h=e[14];let x;e[15]!==c?(x=()=>c.mutate(),e[15]=c,e[16]=x):x=e[16];const f=c.isPending?"Requesting…":"Request to join";let g;e[17]!==c.isPending||e[18]!==x||e[19]!==f?(g=s.jsx(O,{onClick:x,disabled:c.isPending,children:f}),e[17]=c.isPending,e[18]=x,e[19]=f,e[20]=g):g=e[20];let y;e[21]!==c.isPending?(y=s.jsx(O,{variant:"ghost",onClick:ft,disabled:c.isPending,children:"Go to home"}),e[21]=c.isPending,e[22]=y):y=e[22];let w;e[23]!==g||e[24]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[23]=g,e[24]=y,e[25]=w):w=e[25];let b;return e[26]!==w||e[27]!==m||e[28]!==h?(b=s.jsxs(K,{children:[m,h,w]}),e[26]=w,e[27]=m,e[28]=h,e[29]=b):b=e[29],b}function ft(){window.location.href="/"}function gt(t){B.error(t instanceof Error?t.message:"Failed to request access")}function ht(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function pt(t){const e=k.c(7);let n;e[0]!==t?(n=le.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=o):o=e[3];let r;return e[4]!==n||e[5]!==o?(r={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=r):r=e[6],ge(r)}function xt({orgSlug:t}){const{data:e}=pt(t);if(e.status!=="member"){je()?.org===t&&ve();const n=localStorage.getItem(G.lastOrgSlug())===t;if(n&&localStorage.removeItem(G.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ue,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(nt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(mt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(dt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ue,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function yt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=s.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(bt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=s.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(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:r,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]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function bt(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 xe=[{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:M,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:U,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:H,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:U,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:M,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:H,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:M,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:U,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:H,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:M,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:U,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:H,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:M,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:de,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:U,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:Le,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:H,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:U,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:M,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:de,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:M,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Re,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ee="studio.release-feed.v1",ae=new Set;let L="",F={},re=!1;function wt(){if(re)return L||"{}";try{return localStorage.getItem(ee)??"{}"}catch{return L||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function me(){const t=wt();return t!==L&&(L=t,F=ye(t)),F}function St(t){ae.add(t);const e=n=>{if(!(n.key!==ee&&n.key!==null)){try{const o=localStorage.getItem(ee)??"{}",a={...ye(o),...F};F=a,L=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function jt(t){F=t,L=JSON.stringify(t);try{localStorage.setItem(ee,L),re=!1}catch{re=!0}ae.forEach(e=>e())}function vt(){const t=k.c(7),e=V.useSyncExternalStore(St,me,me);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const o=n,r=kt;let a;t[2]!==e?(a=xe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==o||t[5]!==i?(l={isSeen:o,markSeen:r,unseenCount:i},t[4]=o,t[5]=i,t[6]=l):l=t[6],l}function kt(t){F[t]||jt({...F,[t]:{seenAt:new Date().toISOString()}})}const Nt=720*60*60*1e3;function Ot(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 _t(t){const e=xe[0];if(!e)return null;const n=Ot(e.date),o=t-n;return o<0||o>Nt?null:e}function Ct(){const t=k.c(21),{isSeen:e,markSeen:n}=vt();let o,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(o=_t(Date.now()),!o){a=null;break e}r=e(o.id)}t[0]=e,t[1]=o,t[2]=r,t[3]=a}else o=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==o.id||t[5]!==n?(i=()=>n(o.id),t[4]=o.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(De,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==o.id||t[11]!==n?(c=()=>n(o.id),m=()=>n(o.id),t[10]=o.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==o||t[15]!==c||t[16]!==m?(u=s.jsx(yt,{release:o,onCtaClick:c,onLearnMoreClick:m}),t[14]=o,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(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:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),P=be?"⌘":"Ctrl",E={keyboardShortcuts:{keys:[P,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[P,"L"],description:"Focus chat input"},saveAndFormat:{keys:[P,"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:[P,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[P,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",P,"S"],description:"New task"},toggleDaemon:{keys:[P,"D"],description:"Toggle daemon logs"}},At=[{label:"General",shortcuts:[E.keyboardShortcuts,E.newTask,E.toggleDaemon]},{label:"Editor",shortcuts:[E.saveAndFormat]},{label:"Chat",shortcuts:[E.focusChatInput,E.togglePlanMode,E.sendMessage,E.newLine]},{label:"Questions",shortcuts:[E.selectOption]},{label:"Monitoring",shortcuts:[E.applyFilter]}];function $t(t){return be?t.metaKey:t.ctrlKey}function zt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ke,{children:s.jsx(He,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Ue,{className:"sm:max-w-md",children:[r,s.jsx("div",{className:"flex flex-col gap-4",children:At.map(Tt)})]}),e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==n?(i=s.jsx(Ge,{open:n,onOpenChange:o,children:a}),e[2]=o,e[3]=n,e[4]=i):i=e[4],i}function Tt(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(Et)})]},t.label)}function Et(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(Mt)})]},t.description)}function Mt(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)}function Pt({activeOrg:t}){return t&&(ke(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ne()),null}function Lt(t,e,n){if(!n)return null;const o=We(t,e);return o?o.threads.get().find(a=>a.id===n)?.branch??null:null}function we(t){return{queryKey:le.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=we(t),e[0]=t,e[1]=n):n=e[1];const o=ie(n);let r;e[2]!==o.data?.prompts?(r=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==o.data?.tiles?(a=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==o.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:o.isLoading,prompts:r,tiles:a},e[6]=o.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Ft(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=It;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(fe,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==o?(m=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=o,e[6]=m):m=e[6];let u;e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[c,s.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=s.jsx(O,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=h):h=e[11];let x;e[12]!==p?(x=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,h]}),e[12]=p,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs(K,{children:[d,u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function It(){window.location.href="/"}function qt(t){const e=k.c(8),{org:n,children:o}=t,a=et(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==o||e[5]!==n||e[6]!==l?(d=s.jsx(Pe,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function Rt(){const t=Oe(),e=Ye(),{org:n,locator:o}=_e(),r=he({strict:!1}),a=Ce({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:g,replace:y}),c=(f,g=!0)=>d(l,f,g),m=f=>c(g=>({...g,chat:f?1:0})),u=(f,g,y)=>d(f,w=>{const b={chat:1};if(g?b.virtualmcpid=g:w.virtualmcpid&&(b.virtualmcpid=w.virtualmcpid),y?.main)b.main=y.main;else{const v=w.main;v&&typeof v=="string"&&!Ze(v)&&(b.main=v)}return y?.autosend&&(b.autosend=Je),b},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??a.virtualmcpid??Qe(n.id).id,b=y===a.virtualmcpid?Lt(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}u(g,y)},openTab:f=>d(l||crypto.randomUUID(),g=>({...g,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const y={...f};return delete y.main,y})}}function Dt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=V.useState(!1),d=o??"";let c;t[2]!==d?(c=we(d),t[2]=d,t[3]=c):c=t[3];const m=!!o&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],ie(u);const{data:p}=Z.useSession(),h=p?.user?.id;let x;t[7]!==o||t[8]!==h?(x=o&&h?$e(h,o):null,t[7]=o,t[8]=h,t[9]=x):x=t[9];const f=x;let g,y;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{const j=T=>{$t(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},y=[],t[10]=g,t[11]=y):(g=t[10],y=t[11]),V.useEffect(g,y);let w;t[12]!==o?(w=le.activeOrganization(o),t[12]=o,t[13]=w):w=t[13];let b;t[14]!==o||t[15]!==h?(b=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Z.organization.getFullOrganization({query:{organizationSlug:o}}).finally(Ut),T=ce(j);return j&&!T&&localStorage.setItem(G.lastOrgSlug(),o),h&&j&&Te(h,o,j),j},t[14]=o,t[15]=h,t[16]=b):b=t[16];const v=f?f.data:void 0,N=f?.updatedAt;let _;t[17]!==b||t[18]!==v||t[19]!==N||t[20]!==w?(_={queryKey:w,queryFn:b,initialData:v,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=b,t[18]=v,t[19]=N,t[20]=w,t[21]=_):_=t[21];const{data:S}=ge(_),A=S?.id,$=S?.slug,{data:z}=tt(A,$),C=A??"",ne=$??"";let I;t[22]!==C||t[23]!==ne?(I=Ve({connectionId:Xe,orgId:C,orgSlug:ne}),t[22]=C,t[23]=ne,t[24]=I):I=t[24];const se=!!A&&!!$;let W;if(t[25]!==I||t[26]!==se?(W={...I,enabled:se},t[25]=I,t[26]=se,t[27]=W):W=t[27],ie(W),!S){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ee,{}),t[28]=j):j=t[28];let T;return t[29]!==o?(T=s.jsx(V.Suspense,{fallback:j,children:s.jsx(xt,{orgSlug:o})}),t[29]=o,t[30]=T):T=t[30],T}if(ce(S)){localStorage.getItem(G.lastOrgSlug())===o&&localStorage.removeItem(G.lastOrgSlug());let j;return t[31]!==S.name?(j=s.jsx(ze,{orgName:S.name}),t[31]=S.name,t[32]=j):j=t[32],j}if(z?.ssoRequired&&!z.authenticated){let j;return t[33]!==S.id||t[34]!==S.name||t[35]!==S.slug||t[36]!==z.domain?(j=s.jsx(Ft,{orgId:S.id,orgSlug:S.slug,orgName:S.name,domain:z.domain}),t[33]=S.id,t[34]=S.name,t[35]=S.slug,t[36]=z.domain,t[37]=j):j=t[37],j}const oe=S.logo??null;let q;t[38]!==S||t[39]!==oe?(q={...S,logo:oe},t[38]=S,t[39]=oe,t[40]=q):q=t[40];let R;t[41]!==S?(R=s.jsx(Pt,{activeOrg:S}),t[41]=S,t[42]=R):R=t[42];let Y,J;t[43]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Me,{}),J=s.jsx(Ct,{}),t[43]=Y,t[44]=J):(Y=t[43],J=t[44]);let D;t[45]!==i?(D=s.jsx(zt,{open:i,onOpenChange:l}),t[45]=i,t[46]=D):D=t[46];let Q;return t[47]!==q||t[48]!==R||t[49]!==D?(Q=s.jsxs(qt,{org:q,children:[R,Y,J,D]}),t[47]=q,t[48]=R,t[49]=D,t[50]=Q):Q=t[50],Q}function Ut(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Kt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Be,{children:s.jsx(Dt,{})}),t[0]=e):e=t[0],e}const ln=Object.freeze(Object.defineProperty({__proto__:null,default:Kt,usePanelActions:Rt},Symbol.toStringTag,{value:"Module"}));export{E as K,xe as R,yt as a,Rt as b,rn as c,we as h,$t as i,Lt as r,ln as s,vt as u};
@@ -1 +0,0 @@
1
- import{c as D,j as s,a2 as le,r as K,v as ae,m as ce,b as de,e as me,B as Y,q as te,K as fe,d as ge,t as ie}from"./index-V_z4g85O.js";import{i as ue}from"./AlertCircle-CqXnKI3D.js";import{i as pe}from"./ChevronRight-DbmfCIOT.js";import{s as xe}from"./Plus-zfs5-JeK.js";import{s as he}from"./Trash01-BwZvbUqV.js";import{I as X}from"./input-DVRfAVU3.js";import{S as oe}from"./switch-DAdK-1sZ.js";import{S as ye}from"./skeleton-D_8-XLai.js";import{A as ne}from"./avatar-DPNVdynG.js";import{P as je,a as Ce,b as ve}from"./popover-ChpnNBG6.js";import{b as re}from"./use-connection-DY54rYyd.js";import{W as Z}from"./use-mcp-client-DsIzdxc1.js";import{P as G}from"./index-DPpLkDX2.js";import{u as Se}from"./use-registry-connections-D7CDGVjW.js";import{f as _e,g as be}from"./use-organization-settings-C13VUvc7.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-C5yP5Si0.js";import{R as Re}from"./require-capability-Cnsb8ohV.js";import"./User01-C6id_Jz0.js";import"./use-collections-gMfZ5Rvk.js";import"./auth-DEpXDpCk.js";import"./sidebar-BC3PqZZk.js";import"./LayoutLeft-DFQX2HQS.js";import"./tooltip-Bodmhuae.js";import"./sheet-B6_wuIQB.js";import"./X-DbKbpx_s.js";import"./studio-tools-CcWLJIL3.js";import"./card-Trr9Smsl.js";import"./ArrowUpRight-D_A_c-WP.js";import"./use-capability-mUGdJwF_.js";import"./access-gate-Bw0npMv7.js";import"./capability-load-error-DNDjRRk_.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,v]=K.useState(""),[x,S]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>v(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>S(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:v}=t,x=de();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:h}=me(S);let f;e[1]!==r||e[2]!==v||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{v?x({to:v,params:{org:h}}):j(!r)},e[1]=r,e[2]=v,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(ve,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==v?(p=v&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=v,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=Se(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,v]=K.useState(!1);let x,S,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{v(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>v(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=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]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],S=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=S,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],S=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==S||t[52]!==f||t[53]!==d?(g=s.jsx(S,{title:f,children:d}),t[51]=S,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function gt(){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{gt as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-k5bH_SdU.js","assets/index-V_z4g85O.js","assets/index-DBaGwpyP.css","assets/XCircle-Dcz0bhP7.js","assets/CheckCircle-B6_BlhWA.js","assets/Settings02-Gfe6bidH.js","assets/use-mcp-client-DsIzdxc1.js","assets/auth-DEpXDpCk.js","assets/useInfiniteQuery-BDW2fh8c.js","assets/use-infinite-scroll-CcoRA6NH.js","assets/studio-tools-CcWLJIL3.js","assets/badge-BAgfu3s3.js","assets/input-DVRfAVU3.js","assets/dropdown-menu-B3yjOr3B.js","assets/ChevronUp-DTH787oJ.js","assets/ChevronRight-DbmfCIOT.js","assets/DotsVertical-DXADESRu.js","assets/table-DlwTq8lg.js","assets/toggle-group-BYYV7q2R.js","assets/use-view-mode-Brlii9ZZ.js","assets/tooltip-Bodmhuae.js","assets/FilterLines-DDE5Z7pT.js","assets/Globe01-BtWLhdgc.js","assets/SearchMd-DUUd_hhd.js","assets/dialog-DC6TTwSU.js","assets/X-DbKbpx_s.js","assets/AlertCircle-CqXnKI3D.js","assets/Upload01-BENZkUL6.js","assets/alert-dialog-Cv06ffuC.js","assets/card-Trr9Smsl.js","assets/Trash01-BwZvbUqV.js","assets/label-D1MGSLX0.js","assets/select-iQPDKsQJ.js","assets/ChevronDown-CsJyvcQs.js","assets/switch-DAdK-1sZ.js","assets/textarea-DkgswAud.js","assets/checkbox-BkY2CRaN.js","assets/Eye-Cd9WdjRO.js","assets/LinkExternal01-DFJC7MKi.js","assets/use-copy-BaIsIuIB.js","assets/Key01-AxVsjzoW.js","assets/Plus-zfs5-JeK.js","assets/mcp-oauth-DlBIPcRz.js","assets/Play-BGOeSWeu.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,ak as f}from"./index-V_z4g85O.js";import{R as u}from"./require-capability-Cnsb8ohV.js";import"./use-capability-mUGdJwF_.js";import"./access-gate-Bw0npMv7.js";import"./capability-load-error-DNDjRRk_.js";const g=l.lazy(()=>f(()=>import("./registry-layout-k5bH_SdU.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])));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{r as c,j as i,P as C,W as y,$ as I,Q as T,bJ as M,bI as H,U,c as z,l as g}from"./index-V_z4g85O.js";var m="Switch",[A]=U(m),[$,q]=A(m),P=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs($,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:T(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});P.displayName=m;var E="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=q(E,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=E;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=P,W=R;function F(a){const e=z.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(W,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{F as S};
@@ -1 +0,0 @@
1
- import{r as v,j as d,b9 as P,P as p,Q as h,ba as y,U as k,ah as M,$ as S,ai as V,bb as F,V as D,c as x,l as g}from"./index-V_z4g85O.js";var m="Tabs",[G]=k(m,[y]),w=y(),[L,T]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=M(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=T(N,a),o=w(a);return d.jsx(F,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=T(I,a),i=w(a),l=A(o.baseId,t),f=E(o.baseId,t),u=t===o.value;return d.jsx(P,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:h(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:h(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:h(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",$=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=T(R,a),l=A(i.baseId,t),f=E(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});$.displayName=R;function A(n,e){return`${n}-trigger-${e}`}function E(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=$;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function J(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,Q as a,J as b,O as c};
@@ -1 +0,0 @@
1
- import{r as x,$ as b,j as c,P as m,Q as k,af as p,b9 as M,ba as T,ah as S,bb as A,U as $,bE as F,c as P,l as C}from"./index-V_z4g85O.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=$(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,U]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",E=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=U(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});E.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=h,L=E;const Q=F("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),N=x.createContext({size:"default",variant:"default"});function J(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(N.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function K(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(N),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(Q({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{J as T,K as a};
@@ -1 +0,0 @@
1
- import{r as a,j as c,P as H,ai as J,$ as ee,a0 as te,W as $,M as oe,Q as C,V as G,_ as re,T as V,X as ne,Y as se,U as ae,dx as ie,Z as le,c as _,l as ce}from"./index-V_z4g85O.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",z=a.forwardRef((o,e)=>c.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));z.displayName=de;var pe=z,[O]=ae("Tooltip",[V]),D=V(),B="TooltipProvider",fe=700,A="tooltip.open",[ve,k]=O(B),F=o=>{const{__scopeTooltip:e,delayDuration:t=fe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(ve,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=B;var R="Tooltip",[he,j]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),h=J(),f=a.useRef(0),x=i??l.disableHoverableContent,m=d??l.delayDuration,g=a.useRef(!1),[y,T]=ee({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(A))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(te,{...p,children:c.jsx(he,{scope:e,contentId:h,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};Y.displayName=R;var M="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(M,t),s=k(M,t),i=D(t),d=a.useRef(null),l=$(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(oe,{asChild:!0,...i,children:c.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:C(o.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=M;var I="TooltipPortal",[xe,ge]=O(I,{forceMount:void 0}),W=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(xe,{scope:e,forceMount:t,children:c.jsx(G,{present:t||s.open,children:c.jsx(re,{asChild:!0,container:n,children:r})})})};W.displayName=I;var b="TooltipContent",q=a.forwardRef((o,e)=>{const t=ge(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(b,o.__scopeTooltip);return c.jsx(G,{present:r||i.open,children:i.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(me,{side:n,...s,ref:e})})}),me=a.forwardRef((o,e)=>{const t=j(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=$(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=be(y,g.getBoundingClientRect()),w=we(y,T),E=Ee(m.getBoundingClientRect()),P=Re([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(l&&u){const x=g=>f(g,u),m=g=>f(g,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),a.useEffect(()=>{if(i){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=l?.contains(g)||u?.contains(g),w=!Pe(y,i);T?h():w&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,h]),c.jsx(X,{...o,ref:s})}),[Te,ye]=O(R,{isInside:!1}),Ce=ie("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(b,t),p=D(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),a.useEffect(()=>{if(l.trigger){const v=h=>{h.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,u]),c.jsx(ne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(se,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Ce,{children:r}),c.jsx(Te,{scope:t,isInside:!0,children:c.jsx(pe,{id:l.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var K="TooltipArrow",Q=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return ye(K,t).isInside?null:c.jsx(le,{...n,...r,ref:e})});Q.displayName=K;function be(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function we(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ee(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Pe(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,v=l.x,h=l.y;u>r!=h>r&&t<(v-p)*(r-u)/(h-u)+p&&(n=!n)}return n}function Re(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(e)}function _e(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var je=F,Oe=Y,De=U,Le=W,Ae=q,Me=Q;const Z=768,L=()=>globalThis.innerWidth<Z;function Ne(){const o=_.c(2),[e,t]=a.useState(L);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(L),i=globalThis.matchMedia(`(max-width: ${Z-1}px)`);return i.addEventListener("change",s),t(L),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}function ke(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(je,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(ke,{children:c.jsx(Oe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(De,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function $e(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Me,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(Le,{children:c.jsxs(Ae,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}export{He as T,ue as V,$e as a,Se as b,ke as c,Ne as u};
@@ -1 +0,0 @@
1
- import{c as d,v as f,a5 as P,K as m,k as v}from"./index-V_z4g85O.js";import{u as S,c as K}from"./studio-tools-CcWLJIL3.js";function T(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await K(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=T(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 a;e[6]!==t||e[7]!==l||e[8]!==r?(a={queryKey:t,enabled:l,staleTime:6e4,queryFn:r},e[6]=t,e[7]=l,e[8]=r,e[9]=a):a=e[9];const{data:n,isLoading:_}=v(a);let u;e[10]!==n?.models?(u=n?.models??[],e[10]=n?.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:a}=P(r);let n;return e[9]!==a?.models?(n=a?.models??[],e[9]=a?.models,e[10]=n):n=e[10],n}export{T as a,q as b,R as c,A as d,p as u};
@@ -1 +0,0 @@
1
- import{a5 as v,c as x,m as b,d as F,aI as q,t as _}from"./index-V_z4g85O.js";function Q(e,s,o){const t=[];if(e?.trim()){const n=e.trim(),r=o.map(a=>({field:[String(a)],operator:"contains",value:n}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const n of s)t.push({field:[n.column],operator:"eq",value:n.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function k(e,s,o){const t=e??o,n=s??"desc";return[{field:[String(t)],direction:n}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function D(e,s,o,t){const n=s.toUpperCase(),r=`COLLECTION_${n}_GET`;return{queryKey:q.collectionItem(t,e,"",n,o??""),queryFn:async()=>{if(!o)return{item:null};const a=await t.callTool({name:r,arguments:{id:o}});return O(a)},staleTime:6e4}}function j(e,s,o,t){const n=x.c(5);let r;n[0]!==t||n[1]!==s||n[2]!==o||n[3]!==e?(r=D(e,s,o,t),n[0]=t,n[1]=s,n[2]=o,n[3]=e,n[4]=r):r=n[4];const{data:a}=v(r);return a?.item??null}const K={structuredContent:{items:[]},isError:!1};function z(e,s,o,t={}){const{searchTerm:n,filters:r,sortKey:a,sortDirection:L,searchFields:S=["title","description"],defaultSortKey:h="updated_at",pageSize:g=100,additionalToolArgs:c}=t,l=s.toUpperCase(),f=`COLLECTION_${l}_LIST`,p=Q(n,r,S),T=k(a,L,h),u={...p&&{where:p},...T&&{orderBy:T},limit:g,offset:0,...c},m=JSON.stringify(u),C=q.collectionList(o,e,"",l,m),{data:w}=v({queryKey:C,queryFn:async()=>o?await o.callTool({name:f,arguments:u}):K,staleTime:3e4,retry:!1,select:d=>O(d??{})?.items??[]});return w}function G(e,s,o){const t=x.c(34),n=b();let r;t[0]!==s?(r=s.toUpperCase(),t[0]=s,t[1]=r):r=t[1];const a=r,L=`COLLECTION_${a}_CREATE`,S=`COLLECTION_${a}_UPDATE`,h=`COLLECTION_${a}_DELETE`;let g;t[2]!==n||t[3]!==e||t[4]!==a?(g=()=>{n.invalidateQueries({predicate:E=>{const i=E.queryKey;return i[1]===e&&i[3]==="collection"&&i[4]===a}})},t[2]=n,t[3]=e,t[4]=a,t[5]=g):g=t[5];const c=g;let l;t[6]!==o||t[7]!==L?(l=async E=>{const i=await o.callTool({name:L,arguments:{data:E}});if(i.isError)throw new Error(Array.isArray(i.content)?i.content[0]?.text:String(i.content));return O(i).item},t[6]=o,t[7]=L,t[8]=l):l=t[8];let f;t[9]!==c?(f=()=>{c(),_.success("Item created successfully")},t[9]=c,t[10]=f):f=t[10];let p;t[11]!==l||t[12]!==f?(p={mutationFn:l,onSuccess:f,onError:B},t[11]=l,t[12]=f,t[13]=p):p=t[13];const T=F(p);let u;t[14]!==o||t[15]!==S?(u=async E=>{const{id:i,data:A}=E,U=await o.callTool({name:S,arguments:{id:i,data:A}});return O(U).item},t[14]=o,t[15]=S,t[16]=u):u=t[16];let m;t[17]!==c?(m=()=>{c(),_.success("Item updated successfully")},t[17]=c,t[18]=m):m=t[18];let C;t[19]!==u||t[20]!==m?(C={mutationFn:u,onSuccess:m,onError:R},t[19]=u,t[20]=m,t[21]=C):C=t[21];const w=F(C);let d;t[22]!==o||t[23]!==h?(d=async E=>{const i=await o.callTool({name:h,arguments:{id:E}});return O(i).item.id},t[22]=o,t[23]=h,t[24]=d):d=t[24];let y;t[25]!==c?(y=()=>{c(),_.success("Item deleted successfully")},t[25]=c,t[26]=y):y=t[26];let I;t[27]!==d||t[28]!==y?(I={mutationFn:d,onSuccess:y,onError:P},t[27]=d,t[28]=y,t[29]=I):I=t[29];const $=F(I);let N;return t[30]!==T||t[31]!==$||t[32]!==w?(N={create:T,update:w,delete:$},t[30]=T,t[31]=$,t[32]=w,t[33]=N):N=t[33],N}function P(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to delete item: ${s}`)}function R(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to update item: ${s}`)}function B(e){const s=e instanceof Error?e.message:String(e);_.error(`Failed to create item: ${s}`)}export{G as a,z as b,D as c,j as u};
@@ -1 +0,0 @@
1
- import{c as u,v as c,K as r,a5 as y,m as C,d,k as F}from"./index-V_z4g85O.js";import{u as f}from"./studio-tools-CcWLJIL3.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};