decocms 4.131.2 → 4.131.4

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 (224) hide show
  1. package/dist/client/assets/{AlertCircle-Dkv2twCy.js → AlertCircle-DevA0A1M.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Drb-WBuc.js → AreaChart-BWfAq2gc.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-D1F_c8mU.js → ArrowRight-Dq4C6lJ4.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CfejN6kE.js → ArrowUp-CLXut3hx.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-pyqwDg-l.js → ArrowUpRight-Bay5EW8Z.js} +1 -1
  6. package/dist/client/assets/{Check-Du2CH0Qx.js → Check-DN6IPn_3.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-pc0wi1b4.js → CheckCircle-ck8m-YN6.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-CIPwphYr.js → ChevronDown-cZoWRgvb.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-bpU9x4EL.js → ChevronRight-CmrokxXJ.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-f9GdHpvo.js → ChevronUp-CswOdRaR.js} +1 -1
  11. package/dist/client/assets/{Copy01-DBHRmMgp.js → Copy01-BGeJ_uJU.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Dl3GV1z7.js → DotsVertical-Db5Rriwt.js} +1 -1
  13. package/dist/client/assets/{Eye-pDXTSR_y.js → Eye-BqdZYqpI.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BFWPoe09.js → FilterLines-BFxvHa0q.js} +1 -1
  15. package/dist/client/assets/{HardDrive-BCPMH3VT.js → HardDrive-C1-SCHTe.js} +1 -1
  16. package/dist/client/assets/{Key01-CBwzTn3B.js → Key01-YwqEObkc.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-CWKaiAHc.js → LayoutLeft-BzJLVhVQ.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DsH5I9jm.js → LinkExternal01-Dv9Aj-K0.js} +1 -1
  19. package/dist/client/assets/{LogOut01-YgIKEMFw.js → LogOut01-D1zBEUWi.js} +1 -1
  20. package/dist/client/assets/{Monitor01-q2Qybp9B.js → Monitor01-c_9oVNrI.js} +1 -1
  21. package/dist/client/assets/{Palette-BY72GXhm.js → Palette-CgoT-TdN.js} +1 -1
  22. package/dist/client/assets/{Play-9D0sdMED.js → Play-DY15eh3c.js} +1 -1
  23. package/dist/client/assets/{Plus-1ztWOFkn.js → Plus-D7R6BF5R.js} +1 -1
  24. package/dist/client/assets/{SearchLg-CBRhPi_g.js → SearchLg-B1avg8bD.js} +1 -1
  25. package/dist/client/assets/{SearchMd-CoeKfSSe.js → SearchMd-B-lbf8c2.js} +1 -1
  26. package/dist/client/assets/{Settings02-Dvu63VK8.js → Settings02-k_lwzmTv.js} +1 -1
  27. package/dist/client/assets/{Shield01-ByBFJvxc.js → Shield01-DFBgcYa0.js} +1 -1
  28. package/dist/client/assets/{Star01-B1Kn4-_i.js → Star01-Bv8b5o6W.js} +1 -1
  29. package/dist/client/assets/{Stars01-DpgpdjJr.js → Stars01-CAvqsR90.js} +1 -1
  30. package/dist/client/assets/{Stars02-D9_55K26.js → Stars02-Djd7mUzA.js} +1 -1
  31. package/dist/client/assets/{Sun-DMtwJS6D.js → Sun-DZlLfVSj.js} +1 -1
  32. package/dist/client/assets/{SwitchHorizontal01-BAtdmOhb.js → SwitchHorizontal01-C9T_FryU.js} +1 -1
  33. package/dist/client/assets/{Tool01-DMFHdvqO.js → Tool01-B14PZEqF.js} +1 -1
  34. package/dist/client/assets/{Tool02-CCso8U2x.js → Tool02-C-4pjcCY.js} +1 -1
  35. package/dist/client/assets/{Trash01-CTHwttyB.js → Trash01-DnjcslV5.js} +1 -1
  36. package/dist/client/assets/{TrendUp01-CnWDWhEF.js → TrendUp01-BVE2-KuE.js} +1 -1
  37. package/dist/client/assets/{Upload01-BY9ftwcq.js → Upload01-uhey7zjg.js} +1 -1
  38. package/dist/client/assets/{User01-BTBcFc9z.js → User01-DQzbx1Xu.js} +1 -1
  39. package/dist/client/assets/{Users01-Cql_e-31.js → Users01-Ct4A_zsW.js} +1 -1
  40. package/dist/client/assets/{Users03-o-LyclnZ.js → Users03-C-mvAxcs.js} +1 -1
  41. package/dist/client/assets/{X-DsUhkCER.js → X-DsJCvKBO.js} +1 -1
  42. package/dist/client/assets/{XCircle-qpPGG1wt.js → XCircle-Eu9CNvjp.js} +1 -1
  43. package/dist/client/assets/{XClose-B6aD5HLV.js → XClose-BcWYJ3jm.js} +1 -1
  44. package/dist/client/assets/{Zap-u5rNKW8G.js → Zap-BiPzgNTf.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-qUxPDGDu.js → ZapSquare-DpSSWmnE.js} +1 -1
  46. package/dist/client/assets/{access-gate-CKUKLx71.js → access-gate-BUe45Oc3.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-dEKzXkSV.js → add-section-modal-Cj4WcLQN.js} +1 -1
  48. package/dist/client/assets/{agent-icon-Cn-zdV8E.js → agent-icon-DW-jknHC.js} +1 -1
  49. package/dist/client/assets/{agents-list-CIQknPiT.js → agents-list-CnJm5oWk.js} +1 -1
  50. package/dist/client/assets/{ai-providers-pcs4cL5s.js → ai-providers-D9DCe_7q.js} +1 -1
  51. package/dist/client/assets/{alert-BrYvcVNo.js → alert-DM1JMd0G.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-DdeUN0gs.js → alert-dialog-B5UNzzAF.js} +1 -1
  53. package/dist/client/assets/{app-editor-BokdYxzt.js → app-editor-Des7fkeu.js} +1 -1
  54. package/dist/client/assets/{auth-DxnCXfEr.js → auth-Btre_1OW.js} +1 -1
  55. package/dist/client/assets/{auth-catchall-CfgT5x1l.js → auth-catchall-DEyYZDPo.js} +1 -1
  56. package/dist/client/assets/{auth-entry-z-RVgErJ.js → auth-entry-Bk6mD7w7.js} +1 -1
  57. package/dist/client/assets/{auth-split-layout-RjHJpu_H.js → auth-split-layout-Xx-1MkJu.js} +1 -1
  58. package/dist/client/assets/{authenticate-and-persist-oauth-BgQP48Df.js → authenticate-and-persist-oauth-DMOmyFRT.js} +1 -1
  59. package/dist/client/assets/{automation-list-row-BgQ-Sntx.js → automation-list-row-C0qxtH51.js} +1 -1
  60. package/dist/client/assets/{automation-runs-DJHP3Ebd.js → automation-runs-D_CI6v6C.js} +1 -1
  61. package/dist/client/assets/{automations-GH1d56mw.js → automations-DuYav8ee.js} +1 -1
  62. package/dist/client/assets/{avatar-CtA1rHBR.js → avatar-6012j4NF.js} +1 -1
  63. package/dist/client/assets/{badge-DLw-128i.js → badge-kM5UAKst.js} +1 -1
  64. package/dist/client/assets/{block-document-BJX5tnOk.js → block-document-Cuu1bHmR.js} +1 -1
  65. package/dist/client/assets/{brand-context-DkvpqsQ8.js → brand-context-QIm13fsq.js} +1 -1
  66. package/dist/client/assets/{buckets-DwZxLwtb.js → buckets-cXyEFJzj.js} +1 -1
  67. package/dist/client/assets/{bulk-category-panel-BRjHEgsf.js → bulk-category-panel-2liLzEa8.js} +1 -1
  68. package/dist/client/assets/{calendar-DDOXvi9j.js → calendar-MyVXyluP.js} +1 -1
  69. package/dist/client/assets/{capability-load-error-BSRBDTUF.js → capability-load-error-DXOesTij.js} +1 -1
  70. package/dist/client/assets/{card-C_7Dfz9P.js → card-LK3SgMlx.js} +1 -1
  71. package/dist/client/assets/{category-editor-Q5uFZ0SW.js → category-editor-Bpk_JSk7.js} +1 -1
  72. package/dist/client/assets/chat-context-4A5jyyEw.js +36 -0
  73. package/dist/client/assets/{checkbox-CTh8EHLV.js → checkbox-C9Nq068Z.js} +1 -1
  74. package/dist/client/assets/{cli-auth-success-wvSiqOx7.js → cli-auth-success-C3PdvGhV.js} +1 -1
  75. package/dist/client/assets/{collection-detail-BGIhyphq.js → collection-detail-COz359qR.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-BK6TSoeX.js → collection-display-button-C9dL_fAH.js} +1 -1
  77. package/dist/client/assets/{collection-search-CgPrJD5s.js → collection-search-C63j6Zzd.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-BBK5Zjn2.js → collection-table-wrapper-B06IqYXO.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-DQPFhmJa.js → collection-tabs-C_e51TYz.js} +1 -1
  80. package/dist/client/assets/{command-mkWdNJiA.js → command-DtoG6f_9.js} +1 -1
  81. package/dist/client/assets/{commerce-onboarding-Bs7-iua6.js → commerce-onboarding-E61cJuT5.js} +1 -1
  82. package/dist/client/assets/{companions-core-CCmjJd5y.js → companions-core-RUJyQPUT.js} +1 -1
  83. package/dist/client/assets/{connect-BteNxC1u.js → connect-B7aqLNJY.js} +1 -1
  84. package/dist/client/assets/{connect-desktop-dialog-DCNWmwTZ.js → connect-desktop-dialog-Dj9gRQkE.js} +1 -1
  85. package/dist/client/assets/{connection-card-5582YW8P.js → connection-card-BoF_KE8y.js} +1 -1
  86. package/dist/client/assets/{connection-detail-XbVgn9MH.js → connection-detail-DLH59AQX.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-CmY0Q2Uk.js → connection-form-helpers-DB9ro8Ha.js} +1 -1
  88. package/dist/client/assets/{connection-CaaVbqW9.js → connection-vyIAo10g.js} +1 -1
  89. package/dist/client/assets/{connections-BXNw1IKw.js → connections-DfRW6lnA.js} +1 -1
  90. package/dist/client/assets/{decopilot-sse-pool-qYgFQjLn.js → decopilot-sse-pool-CFz6l2VG.js} +1 -1
  91. package/dist/client/assets/{dialog-DRzTNCF2.js → dialog-D370feZI.js} +1 -1
  92. package/dist/client/assets/{domain-settings-DHJNEbEZ.js → domain-settings-6514J2nW.js} +1 -1
  93. package/dist/client/assets/{drawer-SsJOHRPA.js → drawer-LhH6tqHN.js} +1 -1
  94. package/dist/client/assets/{dropdown-menu-BokfpNru.js → dropdown-menu-DBsO6utH.js} +1 -1
  95. package/dist/client/assets/{empty-state-CiJvvnog.js → empty-state-Cj1VbJ0y.js} +1 -1
  96. package/dist/client/assets/{extract-connection-data-Br5Lsj7z.js → extract-connection-data-C8zhfgGc.js} +1 -1
  97. package/dist/client/assets/{file-explorer-BzAb8PtM.js → file-explorer-CEKYwf0q.js} +1 -1
  98. package/dist/client/assets/{form-CQNziZWc.js → form-Dj_8GoDc.js} +1 -1
  99. package/dist/client/assets/{general-Ch6aAbGc.js → general-cez9yeo-.js} +1 -1
  100. package/dist/client/assets/{github-repo-picker-pUO4-UP7.js → github-repo-picker-CeuXOkGP.js} +1 -1
  101. package/dist/client/assets/{hooks-CAzZfDok.js → hooks-DJ2YKeR9.js} +1 -1
  102. package/dist/client/assets/{index-DX_PyEaT.js → index-8UQlPx-e.js} +1 -1
  103. package/dist/client/assets/{index-TW5Rc09W.js → index-9dxBGS0M.js} +1 -1
  104. package/dist/client/assets/{index-CJRST3_Z.js → index-B6pbxJBU.js} +35 -35
  105. package/dist/client/assets/{index-Da2mllxf.js → index-BtxByavv.js} +1 -1
  106. package/dist/client/assets/{index-CCb4vxYi.js → index-CZWx2CTD.js} +1 -1
  107. package/dist/client/assets/{index-DeO_SMjA.js → index-D6fjxFLg.js} +1 -1
  108. package/dist/client/assets/{index-DoQWemFd.js → index-DLoS2Gvr.js} +3 -3
  109. package/dist/client/assets/{index-B5Nibhwf.js → index-Dx1y19yx.js} +1 -1
  110. package/dist/client/assets/{index-CcuY69gd.js → index-DxEI9GBV.js} +1 -1
  111. package/dist/client/assets/{index-L0hE-NEv.js → index-YTROANcF.js} +1 -1
  112. package/dist/client/assets/{index-redirect-R3JpdyEK.js → index-redirect-DP7n2JdM.js} +1 -1
  113. package/dist/client/assets/{index-D3OCvKaU.js → index-tHM8NTfd.js} +3 -3
  114. package/dist/client/assets/{input-Bs4tcVhT.js → input-CtPcKTyA.js} +1 -1
  115. package/dist/client/assets/{integration-icon-DG6YOOMj.js → integration-icon-C-2mN9ni.js} +1 -1
  116. package/dist/client/assets/{invite-member-dialog-DH3jQ_Zb.js → invite-member-dialog-B_qNDeU_.js} +1 -1
  117. package/dist/client/assets/{label-DUiPU4TM.js → label-Dx1_DE-f.js} +1 -1
  118. package/dist/client/assets/{layout-DQcUE9z4.js → layout-CxQ_ZjYX.js} +1 -1
  119. package/dist/client/assets/{login-B9FnuorL.js → login-XiuCflbI.js} +1 -1
  120. package/dist/client/assets/{mcp-oauth-CVKUYIl9.js → mcp-oauth-Ch4TwOlY.js} +1 -1
  121. package/dist/client/assets/{members-BfVc1Xdw.js → members-Ci-qw088.js} +1 -1
  122. package/dist/client/assets/{monaco-editor-G_cJDJ93.js → monaco-editor-AliIqm4c.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-BxRM7k9X.js → monitoring-stats-row-DN9PtAZT.js} +1 -1
  124. package/dist/client/assets/{multi-select-CXzg904j.js → multi-select-YuTRMMq6.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-TGwV85BQ.js → oauth-callback-B5VSsFYW.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-ai-provider-PgVBkiBN.js → oauth-callback-ai-provider-DvHFF9AB.js} +1 -1
  127. package/dist/client/assets/{onboarding-DdQNQ4A0.js → onboarding-C1PGqPn5.js} +1 -1
  128. package/dist/client/assets/{org-install-DAHfRxpD.js → org-install-D3FG3YSl.js} +1 -1
  129. package/dist/client/assets/{org-layout-CRo4EKIA.js → org-layout-CC1aR_Ar.js} +1 -1
  130. package/dist/client/assets/{organization-choice-CvVH3S_L.js → organization-choice-QLXU0-_4.js} +1 -1
  131. package/dist/client/assets/{orgs--E_IaGAZ.js → orgs-urMoQKB9.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-CJ3NlYkD.js → page-seo-form-CmZpKqZS.js} +1 -1
  133. package/dist/client/assets/{popover-DqHD4yxd.js → popover-C3OgPzQD.js} +1 -1
  134. package/dist/client/assets/{post-editor-BABr2CJx.js → post-editor-nU307FBm.js} +1 -1
  135. package/dist/client/assets/{primitives-DqZjRnu7.js → primitives-CK5MU42p.js} +1 -1
  136. package/dist/client/assets/{profile-BdUjk22-.js → profile-hYMdiEA5.js} +1 -1
  137. package/dist/client/assets/project-app-view-qdfNZvBx.js +1 -0
  138. package/dist/client/assets/record-editor-DWuuBfxd.js +1 -0
  139. package/dist/client/assets/{redirect-editor-DFcl2X7j.js → redirect-editor-BMgNAGHS.js} +1 -1
  140. package/dist/client/assets/registry-RIQmZ8qc.js +2 -0
  141. package/dist/client/assets/{registry-layout-DGnc-Dtp.js → registry-layout-BNIYUe33.js} +1 -1
  142. package/dist/client/assets/{reports-hna_6ROV.js → reports-BH4VUIWR.js} +1 -1
  143. package/dist/client/assets/{require-capability-BYjfZMZ1.js → require-capability-B-Sqx0zT.js} +1 -1
  144. package/dist/client/assets/{required-auth-layout-B9TfjBVw.js → required-auth-layout-C91T3YkY.js} +1 -1
  145. package/dist/client/assets/{reset-password-twiesJde.js → reset-password-DZU7Xnj2.js} +1 -1
  146. package/dist/client/assets/{roles-DT5JKVI3.js → roles-B1Km9s7i.js} +1 -1
  147. package/dist/client/assets/{search-input-Ce9IROHU.js → search-input-C_HmTn9N.js} +1 -1
  148. package/dist/client/assets/{secrets-DluwaWyV.js → secrets-w6471qmo.js} +1 -1
  149. package/dist/client/assets/{sections-editor-DwLNB7L7.js → sections-editor-EpO7m57q.js} +1 -1
  150. package/dist/client/assets/{select-CPtJAf28.js → select-QOGEC2YQ.js} +1 -1
  151. package/dist/client/assets/{select-model-D7Ovd4CR.js → select-model-BjPHv_Dr.js} +1 -1
  152. package/dist/client/assets/{self-tool-result-JL1AnTkc.js → self-tool-result-Wf62ha3A.js} +1 -1
  153. package/dist/client/assets/{seo-editor-BrV87B5V.js → seo-editor-CypChmsn.js} +1 -1
  154. package/dist/client/assets/{settings-layout-7SeTok6D.js → settings-layout-C-KR57M3.js} +1 -1
  155. package/dist/client/assets/{settings-section-Dgg5nCua.js → settings-section-B7sLcI44.js} +1 -1
  156. package/dist/client/assets/{shell-controls-CPbdWqkG.js → shell-controls-DtA7fOjc.js} +1 -1
  157. package/dist/client/assets/{shell-layout-BexOLm1f.js → shell-layout-DjpBxe62.js} +1 -1
  158. package/dist/client/assets/{sidebar-BjYwCtXi.js → sidebar-DS29jp1e.js} +1 -1
  159. package/dist/client/assets/{skeleton-BwfY4sYC.js → skeleton-CVx36MXd.js} +1 -1
  160. package/dist/client/assets/{sso-v56tNQF7.js → sso-BWUbQwJM.js} +1 -1
  161. package/dist/client/assets/{store-LUDpSYn5.js → store-BepPvAB9.js} +1 -1
  162. package/dist/client/assets/store-registry-DBscfyiP.js +2 -0
  163. package/dist/client/assets/{studio-tools-D5UPG7xq.js → studio-tools-DBJ4BlKP.js} +1 -1
  164. package/dist/client/assets/{switch-Br6uEAbX.js → switch-BAMPQcFC.js} +1 -1
  165. package/dist/client/assets/{tab-id-YHtlg7gF.js → tab-id-DLditg27.js} +1 -1
  166. package/dist/client/assets/{table-Ciw0rD4-.js → table-DunMqZev.js} +1 -1
  167. package/dist/client/assets/{tabs-BvhudmcJ.js → tabs-DXpVtqDW.js} +1 -1
  168. package/dist/client/assets/{textarea-dx3oQXX3.js → textarea-hljn8moZ.js} +1 -1
  169. package/dist/client/assets/{toggle-group-BQ-mtOqg.js → toggle-group-CugvhNWb.js} +1 -1
  170. package/dist/client/assets/{toolbar-Ba5XXE-M.js → toolbar-dY2heqgV.js} +1 -1
  171. package/dist/client/assets/{tooltip-DrF8Dycy.js → tooltip-C4NGAgAM.js} +1 -1
  172. package/dist/client/assets/use-ai-providers-COkTONXg.js +1 -0
  173. package/dist/client/assets/{use-api-keys-BMxSi9Mc.js → use-api-keys-BondmtJR.js} +1 -1
  174. package/dist/client/assets/{use-automations-BoP3NYfz.js → use-automations-RGeim-7x.js} +1 -1
  175. package/dist/client/assets/{use-autosave-DVJxzXG6.js → use-autosave-BBmT_CQu.js} +1 -1
  176. package/dist/client/assets/{use-capability-hQ0DXv0z.js → use-capability-nY6kVL8r.js} +1 -1
  177. package/dist/client/assets/{use-clock-tick-2gdnxIz7.js → use-clock-tick-GBpMaXwL.js} +1 -1
  178. package/dist/client/assets/{use-connection-BqPnQoRJ.js → use-connection-uKN5YWIx.js} +1 -1
  179. package/dist/client/assets/{use-copy-D32fta2h.js → use-copy-EWLYbeWi.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-BM65v9ER.js → use-create-virtual-mcp-DS8KPcoG.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-3BGJnmLE.js → use-debounced-autosave-_O3PoKoh.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-B5eH48Lw.js → use-debounced-value-DuOUoSmu.js} +1 -1
  183. package/dist/client/assets/{use-deco-credits-BzZz8lBr.js → use-deco-credits-ClFjXcZg.js} +1 -1
  184. package/dist/client/assets/{use-decopilot-events-CF5TQ0kC.js → use-decopilot-events-DSmTv1gx.js} +1 -1
  185. package/dist/client/assets/{use-delete-connection-CSsIa0wR.js → use-delete-connection-DjRlgLwA.js} +1 -1
  186. package/dist/client/assets/{use-deployment-admin-Do0J3fTo.js → use-deployment-admin-3EsHBbN1.js} +1 -1
  187. package/dist/client/assets/{use-file-configs-Bw1gACmS.js → use-file-configs-Bgb80job.js} +1 -1
  188. package/dist/client/assets/{use-infinite-scroll-CLgVcggv.js → use-infinite-scroll-DFYxMuWT.js} +1 -1
  189. package/dist/client/assets/{use-join-requests-CLtr7l1c.js → use-join-requests-CTLDVqMF.js} +1 -1
  190. package/dist/client/assets/{use-mcp-auth-status-CuDIWjse.js → use-mcp-auth-status-Bbnk5NX6.js} +1 -1
  191. package/dist/client/assets/{use-mcp-client-DBBu3lpa.js → use-mcp-client-BAwn-0AV.js} +1 -1
  192. package/dist/client/assets/{use-mcp-tools-BKx6eQVH.js → use-mcp-tools-CgtI4_xz.js} +1 -1
  193. package/dist/client/assets/{use-members-C1XPdRpt.js → use-members-C_p-7j4-.js} +1 -1
  194. package/dist/client/assets/{use-mobile-B9xC4LZs.js → use-mobile-B-9CWMAs.js} +1 -1
  195. package/dist/client/assets/{use-navigate-to-agent-B_NFjN6b.js → use-navigate-to-agent-DEAiy9mr.js} +1 -1
  196. package/dist/client/assets/{use-org-auth-client-BFAUjn-N.js → use-org-auth-client-GW_RbwIG.js} +1 -1
  197. package/dist/client/assets/{use-org-sso-Dx0HxB9Q.js → use-org-sso-C5GowRh9.js} +1 -1
  198. package/dist/client/assets/{use-organization-roles-Cw7KjQX3.js → use-organization-roles-CjrQlUME.js} +1 -1
  199. package/dist/client/assets/{use-organization-settings-BZ_WlMTx.js → use-organization-settings-D0V5wIDO.js} +1 -1
  200. package/dist/client/assets/{use-registry-app-D7Jfc22S.js → use-registry-app-D8hx17d1.js} +1 -1
  201. package/dist/client/assets/{use-registry-connections-CxLWLJ5V.js → use-registry-connections-o8h37zTy.js} +1 -1
  202. package/dist/client/assets/{use-secrets-DmXwh72p.js → use-secrets-C-31Hjoh.js} +1 -1
  203. package/dist/client/assets/{use-status-sounds-1iMDr_3s.js → use-status-sounds-DZIf-G4r.js} +1 -1
  204. package/dist/client/assets/{use-view-mode-BgyziSsp.js → use-view-mode-CyIY6QXB.js} +1 -1
  205. package/dist/client/assets/{use-virtual-mcp-Bymtbi-1.js → use-virtual-mcp-DXStXtw1.js} +1 -1
  206. package/dist/client/assets/useInfiniteQuery-DAxuc5L-.js +1 -0
  207. package/dist/client/assets/{useQueries-B_FHAwLH.js → useQueries-Dk_rR620.js} +1 -1
  208. package/dist/client/assets/{useRouterState-xO3EhEgx.js → useRouterState-CFblvFqM.js} +1 -1
  209. package/dist/client/assets/useSuspenseInfiniteQuery-BwVy3QbN.js +1 -0
  210. package/dist/client/assets/{users-C0hZEUyz.js → users-TcleqpoV.js} +1 -1
  211. package/dist/client/assets/{variant-calendar-DqDgry3x.js → variant-calendar-BH0fql5v.js} +1 -1
  212. package/dist/client/assets/{view-mode-toggle-C6H1y3Fg.js → view-mode-toggle-BMYy47UV.js} +1 -1
  213. package/dist/client/index.html +1 -1
  214. package/dist/server/cli.js +275 -275
  215. package/dist/server/server.js +197 -197
  216. package/package.json +1 -1
  217. package/dist/client/assets/chat-context-DcyOF_pB.js +0 -36
  218. package/dist/client/assets/project-app-view-N89P5i_H.js +0 -1
  219. package/dist/client/assets/record-editor-BGUbMaDe.js +0 -1
  220. package/dist/client/assets/registry-ohfLJ5M4.js +0 -2
  221. package/dist/client/assets/store-registry-BRGh_j8X.js +0 -2
  222. package/dist/client/assets/use-ai-providers-BiLZ6IzA.js +0 -1
  223. package/dist/client/assets/useInfiniteQuery-Cth5f35D.js +0 -1
  224. package/dist/client/assets/useSuspenseInfiniteQuery-C_27-SXB.js +0 -1
@@ -1 +1 @@
1
- import{c as L,b as F,e as ae,j as n,B as $,t as te,bP as ee,y as ke,a as Z,w as Fe,x as Ne,K as ce,bQ as Me,bR as Be,G as X,m as ge,r as M,n as re,aw as he,v as Ue,bS as Je,p as pe,bT as He,bU as Ke,d as Ge,F as Ve,f as _e,u as We,J as Qe,aV as Ye,bV as Xe,bW as xe,bX as Ze,bY as et,S as tt,O as nt,bZ as st}from"./index-D3OCvKaU.js";import{A as de}from"./avatar-CtA1rHBR.js";import{t as Te,a as ot}from"./Users03-o-LyclnZ.js";import{i as it}from"./SearchLg-CBRhPi_g.js";import{i as at,s as rt,a as U,n as lt}from"./Stars02-D9_55K26.js";import{s as ct}from"./XClose-B6aD5HLV.js";import{i as K}from"./CheckCircle-pc0wi1b4.js";import{i as ye}from"./FilterLines-BFWPoe09.js";import{i as Y}from"./Zap-u5rNKW8G.js";import{a as Ae,b as Oe,d as Ce,e as Pe,h as dt,c as ut}from"./dialog-DRzTNCF2.js";import{R as mt}from"./required-auth-layout-B9TfjBVw.js";import{q as ft,A as gt}from"./tab-id-YHtlg7gF.js";import{a as be,m as ht,S as pt}from"./use-mcp-client-DBBu3lpa.js";import{c as xt}from"./hooks-CAzZfDok.js";import{e as yt}from"./use-organization-settings-BZ_WlMTx.js";import{u as bt}from"./use-org-sso-Dx0HxB9Q.js";function St(t){const e=L.c(49),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a||e[1]!==i?(r=async()=>{const N=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await N.json();if(!N.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==a?(d=N=>{window.location.href=`/${N.slug??a}`},e[3]=a,e[4]=d):d=e[4];let h;e[5]!==i?(h=N=>{te.error(N instanceof Error?N.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==r||e[8]!==d||e[9]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[7]=r,e[8]=d,e[9]=h,e[10]=w):w=e[10];const m=ae(w),p=wt;let c;e[11]!==l||e[12]!==o?(c=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=o,e[13]=c):c=e[13];let u;e[14]!==o||e[15]!==i?(u=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=u):u=e[16];let g;e[17]!==u?(g=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=g):g=e[18];let f;e[19]!==s||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:s}),e[19]=s,e[20]=i,e[21]=f):f=e[21];let x;e[22]!==f?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=x):x=e[23];let y;e[24]!==g||e[25]!==x?(y=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=y):y=e[26];let S;e[27]!==m?(S=()=>m.mutate(),e[27]=m,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==o||e[31]!==i?(v=m.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=m.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let _;e[33]!==m.isPending||e[34]!==S||e[35]!==v?(_=n.jsx($,{onClick:S,disabled:m.isPending,children:v}),e[33]=m.isPending,e[34]=S,e[35]=v,e[36]=_):_=e[36];const k=m.isPending;let j;e[37]!==i?(j=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=j):j=e[38];let b;e[39]!==m.isPending||e[40]!==j?(b=n.jsx($,{variant:"ghost",onClick:p,disabled:k,children:j}),e[39]=m.isPending,e[40]=j,e[41]=b):b=e[41];let T;e[42]!==_||e[43]!==b?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,b]}),e[42]=_,e[43]=b,e[44]=T):T=e[44];let A;return e[45]!==y||e[46]!==T||e[47]!==c?(A=n.jsxs(ee,{children:[c,y,T]}),e[45]=y,e[46]=T,e[47]=c,e[48]=A):A=e[48],A}function wt(){window.location.href="/"}function Se(t){const e=L.c(25),{orgSlug:o,orgName:a,reason:l}=t,s=F(),i=vt,r=l==="not-found",d=r?it:ke;let h;e[0]!==r||e[1]!==s?(h=s(r?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=r,e[1]=s,e[2]=h):h=e[2];const w=h;let m;e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==s?(m=r?n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),s("common.noAccessScreen.askAdminToInvite")]}),e[3]=r,e[4]=a,e[5]=o,e[6]=s,e[7]=m):m=e[7];const p=m;let c;e[8]!==d?(c=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=u):u=e[11];let g;e[12]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=g):g=e[13];let f;e[14]!==u||e[15]!==g?(f=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[14]=u,e[15]=g,e[16]=f):f=e[16];let x;e[17]!==s?(x=s("common.noAccessScreen.goToHome"),e[17]=s,e[18]=x):x=e[18];let y;e[19]!==x?(y=n.jsx($,{onClick:i,children:x}),e[19]=x,e[20]=y):y=e[20];let S;return e[21]!==c||e[22]!==f||e[23]!==y?(S=n.jsxs(ee,{children:[c,f,y]}),e[21]=c,e[22]=f,e[23]=y,e[24]=S):S=e[24],S}function vt(){window.location.href="/"}function jt(t){const e=L.c(59),{invitationId:o,orgName:a,orgSlug:l,orgLogo:s}=t,i=F();let r;e[0]!==o?(r=async()=>{const P=await Z.organization.acceptInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[0]=o,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>{Fe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let h;e[4]!==i?(h=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==r||e[7]!==d||e[8]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[6]=r,e[7]=d,e[8]=h,e[9]=w):w=e[9];const m=ae(w);let p;e[10]!==o?(p=async()=>{const P=await Z.organization.rejectInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[10]=o,e[11]=p):p=e[11];let c,u;e[12]!==i?(c=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=c,e[14]=u):(c=e[13],u=e[14]);let g;e[15]!==p||e[16]!==c||e[17]!==u?(g={mutationFn:p,onSuccess:c,onError:u},e[15]=p,e[16]=c,e[17]=u,e[18]=g):g=e[18];const f=ae(g),x=m.isPending||f.isPending;let y;e[19]!==s||e[20]!==a?(y=s?n.jsx(de,{url:s,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(at,{className:"h-6 w-6 text-primary"})}),e[19]=s,e[20]=a,e[21]=y):y=e[21];let S;e[22]!==a||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let k;e[29]!==_?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=k):k=e[30];let j;e[31]!==v||e[32]!==k?(j=n.jsxs("div",{className:"space-y-2",children:[v,k]}),e[31]=v,e[32]=k,e[33]=j):j=e[33];let b;e[34]!==m?(b=()=>m.mutate(),e[34]=m,e[35]=b):b=e[35];let T;e[36]!==m.isPending||e[37]!==i?(T=m.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=m.isPending,e[37]=i,e[38]=T):T=e[38];let A;e[39]!==x||e[40]!==b||e[41]!==T?(A=n.jsx($,{onClick:b,disabled:x,children:T}),e[39]=x,e[40]=b,e[41]=T,e[42]=A):A=e[42];let N;e[43]!==f?(N=()=>f.mutate(),e[43]=f,e[44]=N):N=e[44];let O;e[45]!==f.isPending||e[46]!==i?(O=f.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=f.isPending,e[46]=i,e[47]=O):O=e[47];let I;e[48]!==x||e[49]!==N||e[50]!==O?(I=n.jsx($,{variant:"ghost",onClick:N,disabled:x,children:O}),e[48]=x,e[49]=N,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==A||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,I]}),e[52]=A,e[53]=I,e[54]=C):C=e[54];let D;return e[55]!==j||e[56]!==C||e[57]!==y?(D=n.jsxs(ee,{children:[y,j,C]}),e[55]=j,e[56]=C,e[57]=y,e[58]=D):D=e[58],D}function kt(t){const e=L.c(23),{orgName:o,orgLogo:a}=t,l=F();let s;e[0]!==a||e[1]!==o?(s=a?n.jsx(de,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=s):s=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let r;e[5]!==i?(r=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=r):r=e[6];let d;e[7]!==o||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=l,e[9]=d):d=e[9];let h;e[10]!==d?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=h):h=e[11];let w;e[12]!==r||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[r,h]}),e[12]=r,e[13]=h,e[14]=w):w=e[14];let m;e[15]!==l?(m=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=m):m=e[16];let p;e[17]!==m?(p=n.jsx($,{variant:"ghost",onClick:Nt,children:m}),e[17]=m,e[18]=p):p=e[18];let c;return e[19]!==s||e[20]!==w||e[21]!==p?(c=n.jsxs(ee,{children:[s,w,p]}),e[19]=s,e[20]=w,e[21]=p,e[22]=c):c=e[22],c}function Nt(){window.location.href="/"}function _t(t){const e=L.c(45),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a?(r=async()=>{const A=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),N=await A.json();if(!A.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=a,e[1]=r):r=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=At,e[2]=d):d=e[2];let h;e[3]!==i?(h=A=>{te.error(A instanceof Error?A.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==r||e[6]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[5]=r,e[6]=h,e[7]=w):w=e[7];const m=ae(w);let p;e[8]!==l||e[9]!==o?(p=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=o,e[10]=p):p=e[10];let c;e[11]!==o||e[12]!==i?(c=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=c):c=e[13];let u;e[14]!==c?(u=n.jsx("h3",{className:"text-lg font-medium",children:c}),e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:s}),e[16]=s,e[17]=i,e[18]=g):g=e[18];let f;e[19]!==g?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=f):f=e[20];let x;e[21]!==u||e[22]!==f?(x=n.jsxs("div",{className:"space-y-2",children:[u,f]}),e[21]=u,e[22]=f,e[23]=x):x=e[23];let y;e[24]!==m?(y=()=>m.mutate(),e[24]=m,e[25]=y):y=e[25];let S;e[26]!==m.isPending||e[27]!==i?(S=m.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=m.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==y||e[31]!==S?(v=n.jsx($,{onClick:y,disabled:m.isPending,children:S}),e[29]=m.isPending,e[30]=y,e[31]=S,e[32]=v):v=e[32];const _=m.isPending;let k;e[33]!==i?(k=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=k):k=e[34];let j;e[35]!==m.isPending||e[36]!==k?(j=n.jsx($,{variant:"ghost",onClick:Tt,disabled:_,children:k}),e[35]=m.isPending,e[36]=k,e[37]=j):j=e[37];let b;e[38]!==v||e[39]!==j?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,j]}),e[38]=v,e[39]=j,e[40]=b):b=e[40];let T;return e[41]!==x||e[42]!==b||e[43]!==p?(T=n.jsxs(ee,{children:[p,x,b]}),e[41]=x,e[42]=b,e[43]=p,e[44]=T):T=e[44],T}function Tt(){window.location.href="/"}function At(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Ot(t){const e=L.c(7);let o;e[0]!==t?(o=ce.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const s=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!s.ok)throw new Error(`org-access-status failed (${s.status})`);return await s.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==o||e[5]!==a?(l={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=l):l=e[6],Ne(l)}function Ct({orgSlug:t}){const{data:e}=Ot(t);if(e.status!=="member"){Me()?.org===t&&Be();const o=localStorage.getItem(X.lastOrgSlug())===t;if(o&&localStorage.removeItem(X.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(jt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(St,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(_t,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(kt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ee(t){const e=L.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:l,title:s,description:i,icon:r,children:d,footerLeading:h,actions:w,onDismiss:m,tone:p}=t,c=p===void 0?"neutral":p,u=h||w;let g;e[0]!==c?(g=c==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=c,e[1]=g):g=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ct,{size:14}),e[2]=f):f=e[2];let x;e[3]!==a||e[4]!==m?(x=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:m,children:f}),e[3]=a,e[4]=m,e[5]=x):x=e[5];const y=r&&"flex items-start gap-3",S=d&&"pb-3";let v;e[6]!==y||e[7]!==S?(v=ge("p-4 pr-11",y,S),e[6]=y,e[7]=S,e[8]=v):v=e[8];let _;e[9]!==r?(_=r&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:r}),e[9]=r,e[10]=_):_=e[10];let k;e[11]!==l?(k=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=k):k=e[12];let j;e[13]!==s?(j=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),e[13]=s,e[14]=j):j=e[14];let b;e[15]!==i?(b=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=b):b=e[16];let T;e[17]!==j||e[18]!==b||e[19]!==k?(T=n.jsxs("div",{children:[k,j,b]}),e[17]=j,e[18]=b,e[19]=k,e[20]=T):T=e[20];let A;e[21]!==d?(A=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=A):A=e[22];let N;e[23]!==T||e[24]!==A?(N=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,A]}),e[23]=T,e[24]=A,e[25]=N):N=e[25];let O;e[26]!==N||e[27]!==v||e[28]!==_?(O=n.jsxs("div",{className:v,children:[_,N]}),e[26]=N,e[27]=v,e[28]=_,e[29]=O):O=e[29];let I;e[30]!==w||e[31]!==h||e[32]!==u||e[33]!==c?(I=u&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",c==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=u,e[33]=c,e[34]=I):I=e[34];let C;return e[35]!==o||e[36]!==O||e[37]!==I||e[38]!==g||e[39]!==x||e[40]!==c?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":c,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,O,I]}),e[35]=o,e[36]=O,e[37]=I,e[38]=g,e[39]=x,e[40]=c,e[41]=C):C=e[41],C}const Ie=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:K,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Y,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,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:K,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:Y,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:K,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:U,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:Y,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:U,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:K,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:Y,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:U,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:K,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:Y,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:U,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:ye,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:K,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:ot,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:Y,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:K,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:U,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:ye,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:U,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:lt,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],le="studio.release-feed.v1",ue=new Set;let G="",V={},me=!1;function Pt(){if(me)return G||"{}";try{return localStorage.getItem(le)??"{}"}catch{return G||"{}"}}function Le(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function we(){const t=Pt();return t!==G&&(G=t,V=Le(t)),V}function Et(t){ue.add(t);const e=o=>{if(!(o.key!==le&&o.key!==null)){try{const a=localStorage.getItem(le)??"{}",s={...Le(a),...V};V=s,G=JSON.stringify(s)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function It(t){V=t,G=JSON.stringify(t);try{localStorage.setItem(le,G),me=!1}catch{me=!0}ue.forEach(e=>e())}function Lt(){const t=L.c(7),e=M.useSyncExternalStore(Et,we,we);let o;t[0]!==e?(o=d=>!!e[d],t[0]=e,t[1]=o):o=t[1];const a=o,l=Dt;let s;t[2]!==e?(s=Ie.reduce((d,h)=>e[h.id]?d:d+1,0),t[2]=e,t[3]=s):s=t[3];const i=s;let r;return t[4]!==a||t[5]!==i?(r={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=r):r=t[6],r}function Dt(t){V[t]||It({...V,[t]:{seenAt:new Date().toISOString()}})}const $t=720*60*60*1e3,zt=10080*60*1e3;function qt(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function Rt(t){const e=Ie[0];if(!e)return null;const o=qt(e.date),a=t-o;return a<0||a>$t?null:e}function Ft(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Mt(t,e){const o=Ft(t);return o===null?!1:e-o>=zt}function Bt(){const t=L.c(34),e=F(),{data:o}=Z.useSession(),{isSeen:a,markSeen:l}=Lt();let s,i,r;if(t[0]!==a||t[1]!==o?.user?.createdAt){r=Symbol.for("react.early_return_sentinel");e:{const y=Date.now();if(s=Rt(y),!s){r=null;break e}if(!Mt(o?.user?.createdAt,y)){r=null;break e}i=a(s.id)}t[0]=a,t[1]=o?.user?.createdAt,t[2]=s,t[3]=i,t[4]=r}else s=t[2],i=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;if(i)return null;let d;t[5]!==e?(d=e("announcements.release.ariaLabel"),t[5]=e,t[6]=d):d=t[6];let h;t[7]!==e?(h=e("announcements.release.dismiss"),t[7]=e,t[8]=h):h=t[8];const w=s.eyebrow,m=s.title;let p;t[9]!==s.id||t[10]!==l?(p=()=>l(s.id),t[9]=s.id,t[10]=l,t[11]=p):p=t[11];let c;t[12]!==s.id||t[13]!==s.learnMoreHref||t[14]!==l||t[15]!==e?(c=s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(s.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=s.id,t[13]=s.learnMoreHref,t[14]=l,t[15]=e,t[16]=c):c=t[16];let u;t[17]!==s.cta||t[18]!==s.id||t[19]!==l?(u=s.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(s.id),children:n.jsx("a",{href:s.cta.href,children:s.cta.label})}):null,t[17]=s.cta,t[18]=s.id,t[19]=l,t[20]=u):u=t[20];let g;t[21]!==s.bullets?(g=s.bullets.map(Ut),t[21]=s.bullets,t[22]=g):g=t[22];let f;t[23]!==g?(f=n.jsx("ul",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=f):f=t[24];let x;return t[25]!==s.eyebrow||t[26]!==s.title||t[27]!==f||t[28]!==d||t[29]!==h||t[30]!==p||t[31]!==c||t[32]!==u?(x=n.jsx(Ee,{ariaLabel:d,dismissLabel:h,eyebrow:w,title:m,onDismiss:p,footerLeading:c,actions:u,children:f}),t[25]=s.eyebrow,t[26]=s.title,t[27]=f,t[28]=d,t[29]=h,t[30]=p,t[31]=c,t[32]=u,t[33]=x):x=t[33],x}function Ut(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const De=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),J=De?"⌘":"Ctrl",q={keyboardShortcuts:{keys:[J,"K"],description:"Keyboard shortcuts"},back:{keys:[J,"["],description:"Back to previous"},focusChatInput:{keys:[J,"L"],description:"Focus chat input"},saveAndFormat:{keys:[J,"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:[J,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[J,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",J,"S"],description:"New task"},toggleDaemon:{keys:[J,"D"],description:"Toggle daemon logs"}},Jt=[{label:"General",shortcuts:[q.keyboardShortcuts,q.back,q.newTask,q.toggleDaemon]},{label:"Editor",shortcuts:[q.saveAndFormat]},{label:"Chat",shortcuts:[q.focusChatInput,q.togglePlanMode,q.sendMessage,q.newLine]},{label:"Questions",shortcuts:[q.selectOption]},{label:"Monitoring",shortcuts:[q.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Ht(t){const e=L.c(11),{open:o,onOpenChange:a}=t,l=F();let s;e[0]!==l?(s=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=s):s=e[1];let i;e[2]!==s?(i=n.jsx(Ae,{children:n.jsx(Oe,{children:s})}),e[2]=s,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex flex-col gap-4",children:Jt.map(Kt)}),e[4]=r):r=e[4];let d;e[5]!==i?(d=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,r]}),e[5]=i,e[6]=d):d=e[6];let h;return e[7]!==a||e[8]!==o||e[9]!==d?(h=n.jsx(Pe,{open:o,onOpenChange:a,children:d}),e[7]=a,e[8]=o,e[9]=d,e[10]=h):h=e[10],h}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Gt)})]},t.label)}function Gt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Vt)})]},t.description)}function Vt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Wt=300*1e3,Qt=2;function Yt(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Xt(t,e){return t.count>=Qt&&t.version!==null&&t.version!==e}function Zt(){const t=L.c(31),e=F();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ce.appVersionCheck(),queryFn:tn,refetchInterval:Wt,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:l}=re(o),[s,i]=M.useState(0);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={version:null,count:0},t[1]=r):r=t[1];const[d,h]=M.useState(r);l!==s&&(i(l),h(b=>Yt(b,a,"4.131.2")));const[w,m]=M.useState(null);if(!Xt(d,w))return null;let p;t[2]!==e?(p=e("announcements.version.ariaLabel"),t[2]=e,t[3]=p):p=t[3];let c;t[4]!==e?(c=e("announcements.version.dismiss"),t[4]=e,t[5]=c):c=t[5];let u;t[6]!==e?(u=e("announcements.version.eyebrow"),t[6]=e,t[7]=u):u=t[7];let g;t[8]!==e?(g=e("announcements.version.title"),t[8]=e,t[9]=g):g=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(he,{size:16}),t[12]=x):x=t[12];let y;t[13]!==d.version?(y=()=>m(d.version),t[13]=d.version,t[14]=y):y=t[14];let S;t[15]!==e?(S=e("announcements.version.currentSession",{version:"4.131.2"}),t[15]=e,t[16]=S):S=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let _;t[19]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(he,{size:14}),t[19]=_):_=t[19];let k;t[20]!==v?(k=n.jsxs($,{size:"sm",onClick:en,children:[v,_]}),t[20]=v,t[21]=k):k=t[21];let j;return t[22]!==k||t[23]!==p||t[24]!==c||t[25]!==u||t[26]!==g||t[27]!==f||t[28]!==y||t[29]!==S?(j=n.jsx(Ee,{ariaLabel:p,dismissLabel:c,eyebrow:u,title:g,description:f,icon:x,tone:"system",onDismiss:y,footerLeading:S,actions:k}),t[22]=k,t[23]=p,t[24]=c,t[25]=u,t[26]=g,t[27]=f,t[28]=y,t[29]=S,t[30]=j):j=t[30],j}function en(){return window.location.reload()}async function tn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function nn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const sn=Date.parse("2026-07-21T00:00:00Z"),je=t=>nn(X.ptBrAnnouncementSeen(t));function on(){const t=L.c(35),e=F(),[o,a]=Ue(),{data:l,isPending:s}=Z.useSession(),i=l?.user,r=i?.id,d=i?.createdAt,h=d!=null&&new Date(d).getTime()<sn,w=Je()==="pt-BR",m=!s&&!!r&&h&&w&&o.language==="en"&&!je(r).has(),[p,c]=M.useState(!1),[u,g]=M.useState(!1);!p&&!s&&(c(!0),m&&r&&(je(r).mark(),a(rn),g(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=R=>{pe("pt_br_auto_switch_closed",{action:R}),g(!1)},t[0]=f):f=t[0];const x=f;let y;t[1]!==a?(y=()=>{a(an),x("switch-back")},t[1]=a,t[2]=y):y=t[2];const S=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=R=>!R&&x("dismiss"),t[3]=v):v=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let j;t[7]!==k?(j=n.jsx(Oe,{children:k}),t[7]=k,t[8]=j):j=t[8];let b;t[9]!==e?(b=e("announcements.ptBr.description"),t[9]=e,t[10]=b):b=t[10];let T;t[11]!==b?(T=n.jsx(dt,{children:b}),t[11]=b,t[12]=T):T=t[12];let A;t[13]!==j||t[14]!==T?(A=n.jsxs(Ae,{children:[j,T]}),t[13]=j,t[14]=T,t[15]=A):A=t[15];let N;t[16]!==e?(N=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=N):N=t[17];let O;t[18]!==S||t[19]!==N?(O=n.jsx($,{variant:"outline",onClick:S,children:N}),t[18]=S,t[19]=N,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>x("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:I,children:C}),t[24]=C,t[25]=D):D=t[25];let P;t[26]!==O||t[27]!==D?(P=n.jsxs(ut,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=P):P=t[28];let H;t[29]!==P||t[30]!==A?(H=n.jsxs(Ce,{className:"sm:max-w-md",children:[_,A,P]}),t[29]=P,t[30]=A,t[31]=H):H=t[31];let B;return t[32]!==u||t[33]!==H?(B=n.jsx(Pe,{open:u,onOpenChange:v,children:H}),t[32]=u,t[33]=H,t[34]=B):B=t[34],B}function an(t){return{...t,language:"en"}}function rn(t){return{...t,language:"pt-BR"}}function ln({activeOrg:t}){return t&&(He(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function cn(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:l,opts:s,autosendValue:i}=t,r={};o?r.virtualmcpid=o:e.virtualmcpid&&(r.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,w=(o??d)!==d;let m="chat";if(s?.main)r.main=s.main;else if(l)l.main!==void 0&&(r.main=l.main),l.sidepanel!==void 0&&(m=l.sidepanel);else if(!w){const p=e.main;p&&typeof p=="string"&&!ft(p)&&(r.main=p)}return r.sidepanel=m,s?.autosend&&(r.autosend=i),r}const $e="studio:thread-layout:v1",dn=50;function ze(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function un(t,e,o,a=dn){const l=t.filter(([s])=>s!==e);for(l.push([e,ze(o)]);l.length>a;)l.shift();return l}function fe(){try{const t=sessionStorage.getItem($e);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function qe(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function mn(t,e){t&&qe(un(fe(),t,e))}function fn(t){if(!t)return null;const e=fe().find(([o])=>o===t);return e?ze(e[1]):null}function zn(t){if(!t)return;const e=fe(),o=e.filter(([a])=>a!==t);o.length!==e.length&&qe(o)}function Re(t){return{queryKey:ce.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 qn(t){const e=L.c(10);let o;e[0]!==t?(o=Re(t),e[0]=t,e[1]=o):o=e[1];const a=re(o);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let s;e[4]!==a.data?.tiles?(s=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=s):s=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==s?(i={isLoading:a.isLoading,prompts:l,tiles:s},e[6]=a.isLoading,e[7]=l,e[8]=s,e[9]=i):i=e[9],i}function gn(t){const e=L.c(31),{orgSlug:o,orgName:a,domain:l}=t,s=F();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const r=i,d=hn;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==s?(w=s("common.ssoRequiredScreen.title"),e[3]=s,e[4]=w):w=e[4];let m;e[5]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=m):m=e[6];let p;e[7]!==l||e[8]!==a||e[9]!==s?(p=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",s("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${s("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):s("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=s,e[10]=p):p=e[10];let c;e[11]!==p?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[11]=p,e[12]=c):c=e[12];let u;e[13]!==m||e[14]!==c?(u=n.jsxs("div",{className:"space-y-2",children:[m,c]}),e[13]=m,e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s?(g=s("common.ssoRequiredScreen.signInWithSso"),e[16]=s,e[17]=g):g=e[17];let f;e[18]!==r||e[19]!==g?(f=n.jsx($,{onClick:r,children:g}),e[18]=r,e[19]=g,e[20]=f):f=e[20];let x;e[21]!==s?(x=s("common.ssoRequiredScreen.goBack"),e[21]=s,e[22]=x):x=e[22];let y;e[23]!==x?(y=n.jsx($,{variant:"ghost",onClick:d,children:x}),e[23]=x,e[24]=y):y=e[24];let S;e[25]!==y||e[26]!==f?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==u?(v=n.jsxs(ee,{children:[h,u,S]}),e[28]=S,e[29]=u,e[30]=v):v=e[30],v}function hn(){window.location.href="/"}function pn(t){const e=L.c(8),{org:o,children:a}=t,s=yt(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==s?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:s,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s,e[3]=i):i=e[3];const r=i;let d;return e[4]!==a||e[5]!==o||e[6]!==r?(d=n.jsx(st,{org:o,project:r,children:a}),e[4]=a,e[5]=o,e[6]=r,e[7]=d):d=e[7],d}function xn(){const t=Ge(),e=xt(),{org:o}=Ve(),a=_e({strict:!1}),l=We({strict:!1}),s=a.org??"",i=a.taskId??"",r=(c,u,g=!0)=>t({to:"/$org/$taskId",params:{org:s,taskId:c},search:u,replace:g}),d=(c,u=!0)=>r(i,c,u),h=c=>d(u=>({...u,sidepanel:c})),w=(c,u,g)=>{const f=!!i&&i===c;i&&!f&&mn(i,{main:l.main,sidepanel:l.sidepanel});const x=f?null:fn(c),y=be(o.id).id;return r(c,S=>cn({prev:S,virtualMcpId:u,decopilotId:y,savedLayout:x,opts:g,autosendValue:gt}),!1)};return{openSidePanel:h,setTaskId:w,createNewTask:async(c,u)=>{const g=crypto.randomUUID(),f=c??l.virtualmcpid??be(o.id).id;try{await e?.create({id:g,virtual_mcp_id:f,...u?{branch:u}:{}})}catch{}w(g,f)},openTab:c=>r(i||crypto.randomUUID(),u=>({...u,main:c}))}}function yn(){const t=L.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Qe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:s}=_e(l),[i,r]=M.useState(!1),d=Ye(),h=a??"";let w;t[2]!==h?(w=Re(h),t[2]=h,t[3]=w):w=t[3];const m=!!a&&!s;let p;t[4]!==w||t[5]!==m?(p={...w,enabled:m},t[4]=w,t[5]=m,t[6]=p):p=t[6],re(p);const{data:c}=Z.useSession(),u=c?.user?.id;let g;t[7]!==a||t[8]!==u?(g=a&&u?Xe(u,a):null,t[7]=a,t[8]=u,t[9]=g):g=t[9];const f=g;let x,y;t[10]!==d?(x=()=>{const E=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),r(!0);return}ve(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},y=[d],t[10]=d,t[11]=x,t[12]=y):(x=t[11],y=t[12]),M.useEffect(x,y);let S;t[13]!==a?(S=ce.activeOrganization(a),t[13]=a,t[14]=S):S=t[14];let v;t[15]!==a||t[16]!==u?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:E}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(bn),z=xe(E);return E&&!z&&localStorage.setItem(X.lastOrgSlug(),a),u&&E&&et(u,a,E),E},t[15]=a,t[16]=u,t[17]=v):v=t[17];const _=f?f.data:void 0,k=f?.updatedAt;let j;t[18]!==v||t[19]!==_||t[20]!==k||t[21]!==S?(j={queryKey:S,queryFn:v,initialData:_,initialDataUpdatedAt:k,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=_,t[20]=k,t[21]=S,t[22]=j):j=t[22];const{data:b}=Ne(j),T=b?.id,A=b?.slug,{data:N}=bt(T,A),O=T??"",I=A??"";let C;t[23]!==O||t[24]!==I?(C=ht({connectionId:pt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const D=!!T&&!!A;let P;if(t[26]!==C||t[27]!==D?(P={...C,enabled:D},t[26]=C,t[27]=D,t[28]=P):P=t[28],re(P),!b){let E;t[29]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(tt,{}),t[29]=E):E=t[29];let z;return t[30]!==a?(z=n.jsx(M.Suspense,{fallback:E,children:n.jsx(Ct,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(xe(b)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let E;return t[32]!==b.name?(E=n.jsx(Ze,{orgName:b.name}),t[32]=b.name,t[33]=E):E=t[33],E}if(N?.ssoRequired&&!N.authenticated){let E;return t[34]!==b.id||t[35]!==b.name||t[36]!==b.slug||t[37]!==N.domain?(E=n.jsx(gn,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:N.domain}),t[34]=b.id,t[35]=b.name,t[36]=b.slug,t[37]=N.domain,t[38]=E):E=t[38],E}const B=b.logo??null;let R;t[39]!==b||t[40]!==B?(R={...b,logo:B},t[39]=b,t[40]=B,t[41]=R):R=t[41];let W;t[42]!==b?(W=n.jsx(ln,{activeOrg:b}),t[42]=b,t[43]=W):W=t[43];let ne;t[44]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(nt,{}),t[44]=ne):ne=t[44];let se;t[45]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Bt,{}),n.jsx(Zt,{})]}),t[45]=se):se=t[45];let Q;t[46]!==i?(Q=n.jsx(Ht,{open:i,onOpenChange:r}),t[46]=i,t[47]=Q):Q=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(on,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==R||t[50]!==W||t[51]!==Q?(ie=n.jsxs(pn,{org:R,children:[W,ne,se,Q,oe]}),t[49]=R,t[50]=W,t[51]=Q,t[52]=ie):ie=t[52],ie}function bn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Sn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(mt,{children:n.jsx(yn,{})}),t[0]=e):e=t[0],e}const Rn=Object.freeze(Object.defineProperty({__proto__:null,default:Sn,usePanelActions:xn},Symbol.toStringTag,{value:"Module"}));export{q as K,qn as a,zn as f,ve as i,nn as m,Rn as s,xn as u};
1
+ import{c as L,b as F,e as ae,j as n,B as $,t as te,bP as ee,y as ke,a as Z,w as Fe,x as Ne,K as ce,bQ as Me,bR as Be,G as X,m as ge,r as M,n as re,aw as he,v as Ue,bS as Je,p as pe,bT as He,bU as Ke,d as Ge,F as Ve,f as _e,u as We,J as Qe,aV as Ye,bV as Xe,bW as xe,bX as Ze,bY as et,S as tt,O as nt,bZ as st}from"./index-tHM8NTfd.js";import{A as de}from"./avatar-6012j4NF.js";import{t as Te,a as ot}from"./Users03-C-mvAxcs.js";import{i as it}from"./SearchLg-B1avg8bD.js";import{i as at,s as rt,a as U,n as lt}from"./Stars02-Djd7mUzA.js";import{s as ct}from"./XClose-BcWYJ3jm.js";import{i as K}from"./CheckCircle-ck8m-YN6.js";import{i as ye}from"./FilterLines-BFxvHa0q.js";import{i as Y}from"./Zap-BiPzgNTf.js";import{a as Ae,b as Oe,d as Ce,e as Pe,h as dt,c as ut}from"./dialog-D370feZI.js";import{R as mt}from"./required-auth-layout-C91T3YkY.js";import{q as ft,A as gt}from"./tab-id-DLditg27.js";import{a as be,m as ht,S as pt}from"./use-mcp-client-BAwn-0AV.js";import{c as xt}from"./hooks-DJ2YKeR9.js";import{e as yt}from"./use-organization-settings-D0V5wIDO.js";import{u as bt}from"./use-org-sso-C5GowRh9.js";function St(t){const e=L.c(49),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a||e[1]!==i?(r=async()=>{const N=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await N.json();if(!N.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==a?(d=N=>{window.location.href=`/${N.slug??a}`},e[3]=a,e[4]=d):d=e[4];let h;e[5]!==i?(h=N=>{te.error(N instanceof Error?N.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=h):h=e[6];let w;e[7]!==r||e[8]!==d||e[9]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[7]=r,e[8]=d,e[9]=h,e[10]=w):w=e[10];const m=ae(w),p=wt;let c;e[11]!==l||e[12]!==o?(c=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=o,e[13]=c):c=e[13];let u;e[14]!==o||e[15]!==i?(u=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=u):u=e[16];let g;e[17]!==u?(g=n.jsx("h3",{className:"text-lg font-medium",children:u}),e[17]=u,e[18]=g):g=e[18];let f;e[19]!==s||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:s}),e[19]=s,e[20]=i,e[21]=f):f=e[21];let x;e[22]!==f?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=x):x=e[23];let y;e[24]!==g||e[25]!==x?(y=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=y):y=e[26];let S;e[27]!==m?(S=()=>m.mutate(),e[27]=m,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==o||e[31]!==i?(v=m.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=m.isPending,e[30]=o,e[31]=i,e[32]=v):v=e[32];let _;e[33]!==m.isPending||e[34]!==S||e[35]!==v?(_=n.jsx($,{onClick:S,disabled:m.isPending,children:v}),e[33]=m.isPending,e[34]=S,e[35]=v,e[36]=_):_=e[36];const k=m.isPending;let j;e[37]!==i?(j=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=j):j=e[38];let b;e[39]!==m.isPending||e[40]!==j?(b=n.jsx($,{variant:"ghost",onClick:p,disabled:k,children:j}),e[39]=m.isPending,e[40]=j,e[41]=b):b=e[41];let T;e[42]!==_||e[43]!==b?(T=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,b]}),e[42]=_,e[43]=b,e[44]=T):T=e[44];let A;return e[45]!==y||e[46]!==T||e[47]!==c?(A=n.jsxs(ee,{children:[c,y,T]}),e[45]=y,e[46]=T,e[47]=c,e[48]=A):A=e[48],A}function wt(){window.location.href="/"}function Se(t){const e=L.c(25),{orgSlug:o,orgName:a,reason:l}=t,s=F(),i=vt,r=l==="not-found",d=r?it:ke;let h;e[0]!==r||e[1]!==s?(h=s(r?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=r,e[1]=s,e[2]=h):h=e[2];const w=h;let m;e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==s?(m=r?n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[s("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),s("common.noAccessScreen.askAdminToInvite")]}),e[3]=r,e[4]=a,e[5]=o,e[6]=s,e[7]=m):m=e[7];const p=m;let c;e[8]!==d?(c=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(d,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==w?(u=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[10]=w,e[11]=u):u=e[11];let g;e[12]!==p?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[12]=p,e[13]=g):g=e[13];let f;e[14]!==u||e[15]!==g?(f=n.jsxs("div",{className:"space-y-2",children:[u,g]}),e[14]=u,e[15]=g,e[16]=f):f=e[16];let x;e[17]!==s?(x=s("common.noAccessScreen.goToHome"),e[17]=s,e[18]=x):x=e[18];let y;e[19]!==x?(y=n.jsx($,{onClick:i,children:x}),e[19]=x,e[20]=y):y=e[20];let S;return e[21]!==c||e[22]!==f||e[23]!==y?(S=n.jsxs(ee,{children:[c,f,y]}),e[21]=c,e[22]=f,e[23]=y,e[24]=S):S=e[24],S}function vt(){window.location.href="/"}function jt(t){const e=L.c(59),{invitationId:o,orgName:a,orgSlug:l,orgLogo:s}=t,i=F();let r;e[0]!==o?(r=async()=>{const P=await Z.organization.acceptInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[0]=o,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>{Fe(),window.location.href=`/${l}`},e[2]=l,e[3]=d):d=e[3];let h;e[4]!==i?(h=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=h):h=e[5];let w;e[6]!==r||e[7]!==d||e[8]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[6]=r,e[7]=d,e[8]=h,e[9]=w):w=e[9];const m=ae(w);let p;e[10]!==o?(p=async()=>{const P=await Z.organization.rejectInvitation({invitationId:o});if(P.error)throw new Error(P.error.message);return P.data},e[10]=o,e[11]=p):p=e[11];let c,u;e[12]!==i?(c=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},u=P=>{te.error(P instanceof Error?P.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=c,e[14]=u):(c=e[13],u=e[14]);let g;e[15]!==p||e[16]!==c||e[17]!==u?(g={mutationFn:p,onSuccess:c,onError:u},e[15]=p,e[16]=c,e[17]=u,e[18]=g):g=e[18];const f=ae(g),x=m.isPending||f.isPending;let y;e[19]!==s||e[20]!==a?(y=s?n.jsx(de,{url:s,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(at,{className:"h-6 w-6 text-primary"})}),e[19]=s,e[20]=a,e[21]=y):y=e[21];let S;e[22]!==a||e[23]!==i?(S=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=S):S=e[24];let v;e[25]!==S?(v=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[25]=S,e[26]=v):v=e[26];let _;e[27]!==i?(_=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=_):_=e[28];let k;e[29]!==_?(k=n.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e[29]=_,e[30]=k):k=e[30];let j;e[31]!==v||e[32]!==k?(j=n.jsxs("div",{className:"space-y-2",children:[v,k]}),e[31]=v,e[32]=k,e[33]=j):j=e[33];let b;e[34]!==m?(b=()=>m.mutate(),e[34]=m,e[35]=b):b=e[35];let T;e[36]!==m.isPending||e[37]!==i?(T=m.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=m.isPending,e[37]=i,e[38]=T):T=e[38];let A;e[39]!==x||e[40]!==b||e[41]!==T?(A=n.jsx($,{onClick:b,disabled:x,children:T}),e[39]=x,e[40]=b,e[41]=T,e[42]=A):A=e[42];let N;e[43]!==f?(N=()=>f.mutate(),e[43]=f,e[44]=N):N=e[44];let O;e[45]!==f.isPending||e[46]!==i?(O=f.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=f.isPending,e[46]=i,e[47]=O):O=e[47];let I;e[48]!==x||e[49]!==N||e[50]!==O?(I=n.jsx($,{variant:"ghost",onClick:N,disabled:x,children:O}),e[48]=x,e[49]=N,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==A||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,I]}),e[52]=A,e[53]=I,e[54]=C):C=e[54];let D;return e[55]!==j||e[56]!==C||e[57]!==y?(D=n.jsxs(ee,{children:[y,j,C]}),e[55]=j,e[56]=C,e[57]=y,e[58]=D):D=e[58],D}function kt(t){const e=L.c(23),{orgName:o,orgLogo:a}=t,l=F();let s;e[0]!==a||e[1]!==o?(s=a?n.jsx(de,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=s):s=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let r;e[5]!==i?(r=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=r):r=e[6];let d;e[7]!==o||e[8]!==l?(d=l("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=l,e[9]=d):d=e[9];let h;e[10]!==d?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=h):h=e[11];let w;e[12]!==r||e[13]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[r,h]}),e[12]=r,e[13]=h,e[14]=w):w=e[14];let m;e[15]!==l?(m=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=m):m=e[16];let p;e[17]!==m?(p=n.jsx($,{variant:"ghost",onClick:Nt,children:m}),e[17]=m,e[18]=p):p=e[18];let c;return e[19]!==s||e[20]!==w||e[21]!==p?(c=n.jsxs(ee,{children:[s,w,p]}),e[19]=s,e[20]=w,e[21]=p,e[22]=c):c=e[22],c}function Nt(){window.location.href="/"}function _t(t){const e=L.c(45),{orgName:o,orgSlug:a,orgLogo:l,domain:s}=t,i=F();let r;e[0]!==a?(r=async()=>{const A=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),N=await A.json();if(!A.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=a,e[1]=r):r=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=At,e[2]=d):d=e[2];let h;e[3]!==i?(h=A=>{te.error(A instanceof Error?A.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=h):h=e[4];let w;e[5]!==r||e[6]!==h?(w={mutationFn:r,onSuccess:d,onError:h},e[5]=r,e[6]=h,e[7]=w):w=e[7];const m=ae(w);let p;e[8]!==l||e[9]!==o?(p=l?n.jsx(de,{url:l,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Te,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=o,e[10]=p):p=e[10];let c;e[11]!==o||e[12]!==i?(c=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=c):c=e[13];let u;e[14]!==c?(u=n.jsx("h3",{className:"text-lg font-medium",children:c}),e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:s}),e[16]=s,e[17]=i,e[18]=g):g=e[18];let f;e[19]!==g?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=f):f=e[20];let x;e[21]!==u||e[22]!==f?(x=n.jsxs("div",{className:"space-y-2",children:[u,f]}),e[21]=u,e[22]=f,e[23]=x):x=e[23];let y;e[24]!==m?(y=()=>m.mutate(),e[24]=m,e[25]=y):y=e[25];let S;e[26]!==m.isPending||e[27]!==i?(S=m.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=m.isPending,e[27]=i,e[28]=S):S=e[28];let v;e[29]!==m.isPending||e[30]!==y||e[31]!==S?(v=n.jsx($,{onClick:y,disabled:m.isPending,children:S}),e[29]=m.isPending,e[30]=y,e[31]=S,e[32]=v):v=e[32];const _=m.isPending;let k;e[33]!==i?(k=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=k):k=e[34];let j;e[35]!==m.isPending||e[36]!==k?(j=n.jsx($,{variant:"ghost",onClick:Tt,disabled:_,children:k}),e[35]=m.isPending,e[36]=k,e[37]=j):j=e[37];let b;e[38]!==v||e[39]!==j?(b=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,j]}),e[38]=v,e[39]=j,e[40]=b):b=e[40];let T;return e[41]!==x||e[42]!==b||e[43]!==p?(T=n.jsxs(ee,{children:[p,x,b]}),e[41]=x,e[42]=b,e[43]=p,e[44]=T):T=e[44],T}function Tt(){window.location.href="/"}function At(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Ot(t){const e=L.c(7);let o;e[0]!==t?(o=ce.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const s=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!s.ok)throw new Error(`org-access-status failed (${s.status})`);return await s.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==o||e[5]!==a?(l={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=l):l=e[6],Ne(l)}function Ct({orgSlug:t}){const{data:e}=Ot(t);if(e.status!=="member"){Me()?.org===t&&Be();const o=localStorage.getItem(X.lastOrgSlug())===t;if(o&&localStorage.removeItem(X.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(Se,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(jt,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(St,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(_t,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(kt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(Se,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Ee(t){const e=L.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:l,title:s,description:i,icon:r,children:d,footerLeading:h,actions:w,onDismiss:m,tone:p}=t,c=p===void 0?"neutral":p,u=h||w;let g;e[0]!==c?(g=c==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=c,e[1]=g):g=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(ct,{size:14}),e[2]=f):f=e[2];let x;e[3]!==a||e[4]!==m?(x=n.jsx($,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:m,children:f}),e[3]=a,e[4]=m,e[5]=x):x=e[5];const y=r&&"flex items-start gap-3",S=d&&"pb-3";let v;e[6]!==y||e[7]!==S?(v=ge("p-4 pr-11",y,S),e[6]=y,e[7]=S,e[8]=v):v=e[8];let _;e[9]!==r?(_=r&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:r}),e[9]=r,e[10]=_):_=e[10];let k;e[11]!==l?(k=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=k):k=e[12];let j;e[13]!==s?(j=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:s}),e[13]=s,e[14]=j):j=e[14];let b;e[15]!==i?(b=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=b):b=e[16];let T;e[17]!==j||e[18]!==b||e[19]!==k?(T=n.jsxs("div",{children:[k,j,b]}),e[17]=j,e[18]=b,e[19]=k,e[20]=T):T=e[20];let A;e[21]!==d?(A=d&&n.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=A):A=e[22];let N;e[23]!==T||e[24]!==A?(N=n.jsxs("div",{className:"min-w-0 flex-1",children:[T,A]}),e[23]=T,e[24]=A,e[25]=N):N=e[25];let O;e[26]!==N||e[27]!==v||e[28]!==_?(O=n.jsxs("div",{className:v,children:[_,N]}),e[26]=N,e[27]=v,e[28]=_,e[29]=O):O=e[29];let I;e[30]!==w||e[31]!==h||e[32]!==u||e[33]!==c?(I=u&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",c==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:h}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:w})]}),e[30]=w,e[31]=h,e[32]=u,e[33]=c,e[34]=I):I=e[34];let C;return e[35]!==o||e[36]!==O||e[37]!==I||e[38]!==g||e[39]!==x||e[40]!==c?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":c,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,O,I]}),e[35]=o,e[36]=O,e[37]=I,e[38]=g,e[39]=x,e[40]=c,e[41]=C):C=e[41],C}const Ie=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:U,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:K,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:Y,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:U,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:K,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:Y,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:K,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:U,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:Y,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:U,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:K,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:Y,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:U,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:K,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:Y,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:U,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:ye,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:K,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:ot,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:Y,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:K,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:U,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:ye,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:U,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:lt,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],le="studio.release-feed.v1",ue=new Set;let G="",V={},me=!1;function Pt(){if(me)return G||"{}";try{return localStorage.getItem(le)??"{}"}catch{return G||"{}"}}function Le(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function we(){const t=Pt();return t!==G&&(G=t,V=Le(t)),V}function Et(t){ue.add(t);const e=o=>{if(!(o.key!==le&&o.key!==null)){try{const a=localStorage.getItem(le)??"{}",s={...Le(a),...V};V=s,G=JSON.stringify(s)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function It(t){V=t,G=JSON.stringify(t);try{localStorage.setItem(le,G),me=!1}catch{me=!0}ue.forEach(e=>e())}function Lt(){const t=L.c(7),e=M.useSyncExternalStore(Et,we,we);let o;t[0]!==e?(o=d=>!!e[d],t[0]=e,t[1]=o):o=t[1];const a=o,l=Dt;let s;t[2]!==e?(s=Ie.reduce((d,h)=>e[h.id]?d:d+1,0),t[2]=e,t[3]=s):s=t[3];const i=s;let r;return t[4]!==a||t[5]!==i?(r={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=r):r=t[6],r}function Dt(t){V[t]||It({...V,[t]:{seenAt:new Date().toISOString()}})}const $t=720*60*60*1e3,zt=10080*60*1e3;function qt(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function Rt(t){const e=Ie[0];if(!e)return null;const o=qt(e.date),a=t-o;return a<0||a>$t?null:e}function Ft(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Mt(t,e){const o=Ft(t);return o===null?!1:e-o>=zt}function Bt(){const t=L.c(34),e=F(),{data:o}=Z.useSession(),{isSeen:a,markSeen:l}=Lt();let s,i,r;if(t[0]!==a||t[1]!==o?.user?.createdAt){r=Symbol.for("react.early_return_sentinel");e:{const y=Date.now();if(s=Rt(y),!s){r=null;break e}if(!Mt(o?.user?.createdAt,y)){r=null;break e}i=a(s.id)}t[0]=a,t[1]=o?.user?.createdAt,t[2]=s,t[3]=i,t[4]=r}else s=t[2],i=t[3],r=t[4];if(r!==Symbol.for("react.early_return_sentinel"))return r;if(i)return null;let d;t[5]!==e?(d=e("announcements.release.ariaLabel"),t[5]=e,t[6]=d):d=t[6];let h;t[7]!==e?(h=e("announcements.release.dismiss"),t[7]=e,t[8]=h):h=t[8];const w=s.eyebrow,m=s.title;let p;t[9]!==s.id||t[10]!==l?(p=()=>l(s.id),t[9]=s.id,t[10]=l,t[11]=p):p=t[11];let c;t[12]!==s.id||t[13]!==s.learnMoreHref||t[14]!==l||t[15]!==e?(c=s.learnMoreHref?n.jsx("a",{href:s.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(s.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=s.id,t[13]=s.learnMoreHref,t[14]=l,t[15]=e,t[16]=c):c=t[16];let u;t[17]!==s.cta||t[18]!==s.id||t[19]!==l?(u=s.cta?n.jsx($,{asChild:!0,size:"sm",onClick:()=>l(s.id),children:n.jsx("a",{href:s.cta.href,children:s.cta.label})}):null,t[17]=s.cta,t[18]=s.id,t[19]=l,t[20]=u):u=t[20];let g;t[21]!==s.bullets?(g=s.bullets.map(Ut),t[21]=s.bullets,t[22]=g):g=t[22];let f;t[23]!==g?(f=n.jsx("ul",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=f):f=t[24];let x;return t[25]!==s.eyebrow||t[26]!==s.title||t[27]!==f||t[28]!==d||t[29]!==h||t[30]!==p||t[31]!==c||t[32]!==u?(x=n.jsx(Ee,{ariaLabel:d,dismissLabel:h,eyebrow:w,title:m,onDismiss:p,footerLeading:c,actions:u,children:f}),t[25]=s.eyebrow,t[26]=s.title,t[27]=f,t[28]=d,t[29]=h,t[30]=p,t[31]=c,t[32]=u,t[33]=x):x=t[33],x}function Ut(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const De=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),J=De?"⌘":"Ctrl",q={keyboardShortcuts:{keys:[J,"K"],description:"Keyboard shortcuts"},back:{keys:[J,"["],description:"Back to previous"},focusChatInput:{keys:[J,"L"],description:"Focus chat input"},saveAndFormat:{keys:[J,"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:[J,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[J,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",J,"S"],description:"New task"},toggleDaemon:{keys:[J,"D"],description:"Toggle daemon logs"}},Jt=[{label:"General",shortcuts:[q.keyboardShortcuts,q.back,q.newTask,q.toggleDaemon]},{label:"Editor",shortcuts:[q.saveAndFormat]},{label:"Chat",shortcuts:[q.focusChatInput,q.togglePlanMode,q.sendMessage,q.newLine]},{label:"Questions",shortcuts:[q.selectOption]},{label:"Monitoring",shortcuts:[q.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Ht(t){const e=L.c(11),{open:o,onOpenChange:a}=t,l=F();let s;e[0]!==l?(s=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=s):s=e[1];let i;e[2]!==s?(i=n.jsx(Ae,{children:n.jsx(Oe,{children:s})}),e[2]=s,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex flex-col gap-4",children:Jt.map(Kt)}),e[4]=r):r=e[4];let d;e[5]!==i?(d=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,r]}),e[5]=i,e[6]=d):d=e[6];let h;return e[7]!==a||e[8]!==o||e[9]!==d?(h=n.jsx(Pe,{open:o,onOpenChange:a,children:d}),e[7]=a,e[8]=o,e[9]=d,e[10]=h):h=e[10],h}function Kt(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Gt)})]},t.label)}function Gt(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Vt)})]},t.description)}function Vt(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Wt=300*1e3,Qt=2;function Yt(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Xt(t,e){return t.count>=Qt&&t.version!==null&&t.version!==e}function Zt(){const t=L.c(31),e=F();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:ce.appVersionCheck(),queryFn:tn,refetchInterval:Wt,refetchIntervalInBackground:!0,staleTime:0},t[0]=o):o=t[0];const{data:a,dataUpdatedAt:l}=re(o),[s,i]=M.useState(0);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={version:null,count:0},t[1]=r):r=t[1];const[d,h]=M.useState(r);l!==s&&(i(l),h(b=>Yt(b,a,"4.131.4")));const[w,m]=M.useState(null);if(!Xt(d,w))return null;let p;t[2]!==e?(p=e("announcements.version.ariaLabel"),t[2]=e,t[3]=p):p=t[3];let c;t[4]!==e?(c=e("announcements.version.dismiss"),t[4]=e,t[5]=c):c=t[5];let u;t[6]!==e?(u=e("announcements.version.eyebrow"),t[6]=e,t[7]=u):u=t[7];let g;t[8]!==e?(g=e("announcements.version.title"),t[8]=e,t[9]=g):g=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(he,{size:16}),t[12]=x):x=t[12];let y;t[13]!==d.version?(y=()=>m(d.version),t[13]=d.version,t[14]=y):y=t[14];let S;t[15]!==e?(S=e("announcements.version.currentSession",{version:"4.131.4"}),t[15]=e,t[16]=S):S=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let _;t[19]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(he,{size:14}),t[19]=_):_=t[19];let k;t[20]!==v?(k=n.jsxs($,{size:"sm",onClick:en,children:[v,_]}),t[20]=v,t[21]=k):k=t[21];let j;return t[22]!==k||t[23]!==p||t[24]!==c||t[25]!==u||t[26]!==g||t[27]!==f||t[28]!==y||t[29]!==S?(j=n.jsx(Ee,{ariaLabel:p,dismissLabel:c,eyebrow:u,title:g,description:f,icon:x,tone:"system",onDismiss:y,footerLeading:S,actions:k}),t[22]=k,t[23]=p,t[24]=c,t[25]=u,t[26]=g,t[27]=f,t[28]=y,t[29]=S,t[30]=j):j=t[30],j}function en(){return window.location.reload()}async function tn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function nn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const sn=Date.parse("2026-07-21T00:00:00Z"),je=t=>nn(X.ptBrAnnouncementSeen(t));function on(){const t=L.c(35),e=F(),[o,a]=Ue(),{data:l,isPending:s}=Z.useSession(),i=l?.user,r=i?.id,d=i?.createdAt,h=d!=null&&new Date(d).getTime()<sn,w=Je()==="pt-BR",m=!s&&!!r&&h&&w&&o.language==="en"&&!je(r).has(),[p,c]=M.useState(!1),[u,g]=M.useState(!1);!p&&!s&&(c(!0),m&&r&&(je(r).mark(),a(rn),g(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=R=>{pe("pt_br_auto_switch_closed",{action:R}),g(!1)},t[0]=f):f=t[0];const x=f;let y;t[1]!==a?(y=()=>{a(an),x("switch-back")},t[1]=a,t[2]=y):y=t[2];const S=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=R=>!R&&x("dismiss"),t[3]=v):v=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=_):_=t[4];let k;t[5]!==e?(k=e("announcements.ptBr.title"),t[5]=e,t[6]=k):k=t[6];let j;t[7]!==k?(j=n.jsx(Oe,{children:k}),t[7]=k,t[8]=j):j=t[8];let b;t[9]!==e?(b=e("announcements.ptBr.description"),t[9]=e,t[10]=b):b=t[10];let T;t[11]!==b?(T=n.jsx(dt,{children:b}),t[11]=b,t[12]=T):T=t[12];let A;t[13]!==j||t[14]!==T?(A=n.jsxs(Ae,{children:[j,T]}),t[13]=j,t[14]=T,t[15]=A):A=t[15];let N;t[16]!==e?(N=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=N):N=t[17];let O;t[18]!==S||t[19]!==N?(O=n.jsx($,{variant:"outline",onClick:S,children:N}),t[18]=S,t[19]=N,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>x("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let D;t[24]!==C?(D=n.jsx($,{onClick:I,children:C}),t[24]=C,t[25]=D):D=t[25];let P;t[26]!==O||t[27]!==D?(P=n.jsxs(ut,{children:[O,D]}),t[26]=O,t[27]=D,t[28]=P):P=t[28];let H;t[29]!==P||t[30]!==A?(H=n.jsxs(Ce,{className:"sm:max-w-md",children:[_,A,P]}),t[29]=P,t[30]=A,t[31]=H):H=t[31];let B;return t[32]!==u||t[33]!==H?(B=n.jsx(Pe,{open:u,onOpenChange:v,children:H}),t[32]=u,t[33]=H,t[34]=B):B=t[34],B}function an(t){return{...t,language:"en"}}function rn(t){return{...t,language:"pt-BR"}}function ln({activeOrg:t}){return t&&(He(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function cn(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:l,opts:s,autosendValue:i}=t,r={};o?r.virtualmcpid=o:e.virtualmcpid&&(r.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,w=(o??d)!==d;let m="chat";if(s?.main)r.main=s.main;else if(l)l.main!==void 0&&(r.main=l.main),l.sidepanel!==void 0&&(m=l.sidepanel);else if(!w){const p=e.main;p&&typeof p=="string"&&!ft(p)&&(r.main=p)}return r.sidepanel=m,s?.autosend&&(r.autosend=i),r}const $e="studio:thread-layout:v1",dn=50;function ze(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function un(t,e,o,a=dn){const l=t.filter(([s])=>s!==e);for(l.push([e,ze(o)]);l.length>a;)l.shift();return l}function fe(){try{const t=sessionStorage.getItem($e);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function qe(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function mn(t,e){t&&qe(un(fe(),t,e))}function fn(t){if(!t)return null;const e=fe().find(([o])=>o===t);return e?ze(e[1]):null}function zn(t){if(!t)return;const e=fe(),o=e.filter(([a])=>a!==t);o.length!==e.length&&qe(o)}function Re(t){return{queryKey:ce.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 qn(t){const e=L.c(10);let o;e[0]!==t?(o=Re(t),e[0]=t,e[1]=o):o=e[1];const a=re(o);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let s;e[4]!==a.data?.tiles?(s=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=s):s=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==s?(i={isLoading:a.isLoading,prompts:l,tiles:s},e[6]=a.isLoading,e[7]=l,e[8]=s,e[9]=i):i=e[9],i}function gn(t){const e=L.c(31),{orgSlug:o,orgName:a,domain:l}=t,s=F();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const r=i,d=hn;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=h):h=e[2];let w;e[3]!==s?(w=s("common.ssoRequiredScreen.title"),e[3]=s,e[4]=w):w=e[4];let m;e[5]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[5]=w,e[6]=m):m=e[6];let p;e[7]!==l||e[8]!==a||e[9]!==s?(p=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",s("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${s("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):s("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=s,e[10]=p):p=e[10];let c;e[11]!==p?(c=n.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[11]=p,e[12]=c):c=e[12];let u;e[13]!==m||e[14]!==c?(u=n.jsxs("div",{className:"space-y-2",children:[m,c]}),e[13]=m,e[14]=c,e[15]=u):u=e[15];let g;e[16]!==s?(g=s("common.ssoRequiredScreen.signInWithSso"),e[16]=s,e[17]=g):g=e[17];let f;e[18]!==r||e[19]!==g?(f=n.jsx($,{onClick:r,children:g}),e[18]=r,e[19]=g,e[20]=f):f=e[20];let x;e[21]!==s?(x=s("common.ssoRequiredScreen.goBack"),e[21]=s,e[22]=x):x=e[22];let y;e[23]!==x?(y=n.jsx($,{variant:"ghost",onClick:d,children:x}),e[23]=x,e[24]=y):y=e[24];let S;e[25]!==y||e[26]!==f?(S=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=S):S=e[27];let v;return e[28]!==S||e[29]!==u?(v=n.jsxs(ee,{children:[h,u,S]}),e[28]=S,e[29]=u,e[30]=v):v=e[30],v}function hn(){window.location.href="/"}function pn(t){const e=L.c(8),{org:o,children:a}=t,s=yt(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==s?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:s,ui:null},e[0]=o.id,e[1]=o.name,e[2]=s,e[3]=i):i=e[3];const r=i;let d;return e[4]!==a||e[5]!==o||e[6]!==r?(d=n.jsx(st,{org:o,project:r,children:a}),e[4]=a,e[5]=o,e[6]=r,e[7]=d):d=e[7],d}function xn(){const t=Ge(),e=xt(),{org:o}=Ve(),a=_e({strict:!1}),l=We({strict:!1}),s=a.org??"",i=a.taskId??"",r=(c,u,g=!0)=>t({to:"/$org/$taskId",params:{org:s,taskId:c},search:u,replace:g}),d=(c,u=!0)=>r(i,c,u),h=c=>d(u=>({...u,sidepanel:c})),w=(c,u,g)=>{const f=!!i&&i===c;i&&!f&&mn(i,{main:l.main,sidepanel:l.sidepanel});const x=f?null:fn(c),y=be(o.id).id;return r(c,S=>cn({prev:S,virtualMcpId:u,decopilotId:y,savedLayout:x,opts:g,autosendValue:gt}),!1)};return{openSidePanel:h,setTaskId:w,createNewTask:async(c,u)=>{const g=crypto.randomUUID(),f=c??l.virtualmcpid??be(o.id).id;try{await e?.create({id:g,virtual_mcp_id:f,...u?{branch:u}:{}})}catch{}w(g,f)},openTab:c=>r(i||crypto.randomUUID(),u=>({...u,main:c}))}}function yn(){const t=L.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Qe(e)?.params.org;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[1]=l):l=t[1];const{taskId:s}=_e(l),[i,r]=M.useState(!1),d=Ye(),h=a??"";let w;t[2]!==h?(w=Re(h),t[2]=h,t[3]=w):w=t[3];const m=!!a&&!s;let p;t[4]!==w||t[5]!==m?(p={...w,enabled:m},t[4]=w,t[5]=m,t[6]=p):p=t[6],re(p);const{data:c}=Z.useSession(),u=c?.user?.id;let g;t[7]!==a||t[8]!==u?(g=a&&u?Xe(u,a):null,t[7]=a,t[8]=u,t[9]=g):g=t[9];const f=g;let x,y;t[10]!==d?(x=()=>{const E=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),r(!0);return}ve(z)&&z.code==="BracketLeft"&&d.history.canGoBack()&&(z.preventDefault(),d.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},y=[d],t[10]=d,t[11]=x,t[12]=y):(x=t[11],y=t[12]),M.useEffect(x,y);let S;t[13]!==a?(S=ce.activeOrganization(a),t[13]=a,t[14]=S):S=t[14];let v;t[15]!==a||t[16]!==u?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:E}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(bn),z=xe(E);return E&&!z&&localStorage.setItem(X.lastOrgSlug(),a),u&&E&&et(u,a,E),E},t[15]=a,t[16]=u,t[17]=v):v=t[17];const _=f?f.data:void 0,k=f?.updatedAt;let j;t[18]!==v||t[19]!==_||t[20]!==k||t[21]!==S?(j={queryKey:S,queryFn:v,initialData:_,initialDataUpdatedAt:k,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=_,t[20]=k,t[21]=S,t[22]=j):j=t[22];const{data:b}=Ne(j),T=b?.id,A=b?.slug,{data:N}=bt(T,A),O=T??"",I=A??"";let C;t[23]!==O||t[24]!==I?(C=ht({connectionId:pt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const D=!!T&&!!A;let P;if(t[26]!==C||t[27]!==D?(P={...C,enabled:D},t[26]=C,t[27]=D,t[28]=P):P=t[28],re(P),!b){let E;t[29]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(tt,{}),t[29]=E):E=t[29];let z;return t[30]!==a?(z=n.jsx(M.Suspense,{fallback:E,children:n.jsx(Ct,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(xe(b)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let E;return t[32]!==b.name?(E=n.jsx(Ze,{orgName:b.name}),t[32]=b.name,t[33]=E):E=t[33],E}if(N?.ssoRequired&&!N.authenticated){let E;return t[34]!==b.id||t[35]!==b.name||t[36]!==b.slug||t[37]!==N.domain?(E=n.jsx(gn,{orgId:b.id,orgSlug:b.slug,orgName:b.name,domain:N.domain}),t[34]=b.id,t[35]=b.name,t[36]=b.slug,t[37]=N.domain,t[38]=E):E=t[38],E}const B=b.logo??null;let R;t[39]!==b||t[40]!==B?(R={...b,logo:B},t[39]=b,t[40]=B,t[41]=R):R=t[41];let W;t[42]!==b?(W=n.jsx(ln,{activeOrg:b}),t[42]=b,t[43]=W):W=t[43];let ne;t[44]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(nt,{}),t[44]=ne):ne=t[44];let se;t[45]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(Bt,{}),n.jsx(Zt,{})]}),t[45]=se):se=t[45];let Q;t[46]!==i?(Q=n.jsx(Ht,{open:i,onOpenChange:r}),t[46]=i,t[47]=Q):Q=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(on,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==R||t[50]!==W||t[51]!==Q?(ie=n.jsxs(pn,{org:R,children:[W,ne,se,Q,oe]}),t[49]=R,t[50]=W,t[51]=Q,t[52]=ie):ie=t[52],ie}function bn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Sn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(mt,{children:n.jsx(yn,{})}),t[0]=e):e=t[0],e}const Rn=Object.freeze(Object.defineProperty({__proto__:null,default:Sn,usePanelActions:xn},Symbol.toStringTag,{value:"Module"}));export{q as K,qn as a,zn as f,ve as i,nn as m,Rn as s,xn as u};
@@ -1 +1 @@
1
- import{c as b,m as g,j as o,cI as P,cJ as H,H as R,cK as A,cL as L,cM as V,cN as W,r as O,B as q,b5 as G,bt as F}from"./index-D3OCvKaU.js";import{i as J}from"./LayoutLeft-CWKaiAHc.js";import{u as K}from"./use-mobile-B9xC4LZs.js";import{i as Q}from"./X-DsUhkCER.js";import{b as z,T as B,a as D,c as k}from"./tooltip-DrF8Dycy.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=O.createContext(null);function T(){const i=O.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=O.useState(d),[u,h]=O.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=T();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let I;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(I=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=I):I=e[17],I}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=T();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=T();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,T as u};
1
+ import{c as b,m as g,j as o,cI as P,cJ as H,H as R,cK as A,cL as L,cM as V,cN as W,r as O,B as q,b5 as G,bt as F}from"./index-tHM8NTfd.js";import{i as J}from"./LayoutLeft-BzJLVhVQ.js";import{u as K}from"./use-mobile-B-9CWMAs.js";import{i as Q}from"./X-DsJCvKBO.js";import{b as z,T as B,a as D,c as k}from"./tooltip-C4NGAgAM.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=O.createContext(null);function T(){const i=O.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=O.useState(d),[u,h]=O.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=T();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let I;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(I=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=I):I=e[17],I}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=T();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=T();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,T as u};
@@ -1 +1 @@
1
- import{c as n,m as c,j as i}from"./index-D3OCvKaU.js";function r(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{r as S};
1
+ import{c as n,m as c,j as i}from"./index-tHM8NTfd.js";function r(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{r as S};
@@ -1 +1 @@
1
- import{b as B,F as L,r as v,j as e,B as u,p as C,t as c,c as k}from"./index-D3OCvKaU.js";import{D as z}from"./domain-settings-DHJNEbEZ.js";import{P as x}from"./index-DeO_SMjA.js";import{A as T,a as O,b as R,c as F,e as q,f as M,g as U}from"./alert-dialog-DdeUN0gs.js";import{I as d}from"./input-Bs4tcVhT.js";import{S as $}from"./switch-Br6uEAbX.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-Dx0HxB9Q.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-Dgg5nCua.js";import{s as V}from"./Trash01-CTHwttyB.js";import{R as W}from"./require-capability-BYjfZMZ1.js";import"./studio-tools-D5UPG7xq.js";import"./badge-DLw-128i.js";import"./select-CPtJAf28.js";import"./tooltip-DrF8Dycy.js";import"./Check-Du2CH0Qx.js";import"./ChevronDown-CIPwphYr.js";import"./ChevronUp-f9GdHpvo.js";import"./sidebar-BjYwCtXi.js";import"./LayoutLeft-CWKaiAHc.js";import"./use-mobile-B9xC4LZs.js";import"./X-DsUhkCER.js";import"./card-C_7Dfz9P.js";import"./ArrowUpRight-pyqwDg-l.js";import"./use-capability-hQ0DXv0z.js";import"./access-gate-CKUKLx71.js";import"./capability-load-error-BSRBDTUF.js";function X(){const s=B(),{org:o}=L(),{data:f,isLoading:P}=H(o.id,o.slug),h=G(o.id,o.slug),p=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,S]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),S(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),S(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await p.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),S(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(Q,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(z,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:p.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>S(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(T,{open:I,onOpenChange:j,children:e.jsxs(O,{children:[e.jsx(R,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(q,{children:[e.jsx(M,{disabled:p.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(U,{onClick:w,disabled:p.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function Ee(){const s=k.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{Ee as default};
1
+ import{b as B,F as L,r as v,j as e,B as u,p as C,t as c,c as k}from"./index-tHM8NTfd.js";import{D as z}from"./domain-settings-6514J2nW.js";import{P as x}from"./index-D6fjxFLg.js";import{A as T,a as O,b as R,c as F,e as q,f as M,g as U}from"./alert-dialog-B5UNzzAF.js";import{I as d}from"./input-CtPcKTyA.js";import{S as $}from"./switch-BAMPQcFC.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-C5GowRh9.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-B7sLcI44.js";import{s as V}from"./Trash01-DnjcslV5.js";import{R as W}from"./require-capability-B-Sqx0zT.js";import"./studio-tools-DBJ4BlKP.js";import"./badge-kM5UAKst.js";import"./select-QOGEC2YQ.js";import"./tooltip-C4NGAgAM.js";import"./Check-DN6IPn_3.js";import"./ChevronDown-cZoWRgvb.js";import"./ChevronUp-CswOdRaR.js";import"./sidebar-DS29jp1e.js";import"./LayoutLeft-BzJLVhVQ.js";import"./use-mobile-B-9CWMAs.js";import"./X-DsJCvKBO.js";import"./card-LK3SgMlx.js";import"./ArrowUpRight-Bay5EW8Z.js";import"./use-capability-nY6kVL8r.js";import"./access-gate-BUe45Oc3.js";import"./capability-load-error-DXOesTij.js";function X(){const s=B(),{org:o}=L(),{data:f,isLoading:P}=H(o.id,o.slug),h=G(o.id,o.slug),p=J(o.id,o.slug),b=K(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,S]=v.useState(!1),[I,j]=v.useState(!1),m=f?.configured&&f.config,n=f?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),S(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),S(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await p.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),S(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await b.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Body,{children:e.jsxs(Q,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(z,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx($,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:p.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>S(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(T,{open:I,onOpenChange:j,children:e.jsxs(O,{children:[e.jsx(R,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(q,{children:[e.jsx(M,{disabled:p.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(U,{onClick:w,disabled:p.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function Ee(){const s=k.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{Ee as default};
@@ -1 +1 @@
1
- import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,p as ae,K as ye,e as je,t as ge}from"./index-D3OCvKaU.js";import{i as ve}from"./AlertCircle-Dkv2twCy.js";import{i as Ce}from"./ChevronRight-bpU9x4EL.js";import{s as be}from"./Plus-1ztWOFkn.js";import{s as _e}from"./Trash01-CTHwttyB.js";import{I as re}from"./input-Bs4tcVhT.js";import{S as de}from"./switch-Br6uEAbX.js";import{S as Re}from"./skeleton-BwfY4sYC.js";import{A as me}from"./avatar-CtA1rHBR.js";import{P as ke,a as Ne,b as Pe}from"./popover-DqHD4yxd.js";import{b as fe}from"./use-connection-BqPnQoRJ.js";import{W as ne}from"./use-mcp-client-DBBu3lpa.js";import{P as te}from"./index-DeO_SMjA.js";import{u as Te}from"./use-registry-connections-CxLWLJ5V.js";import{g as we,h as Ae}from"./use-organization-settings-BZ_WlMTx.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-Dgg5nCua.js";import{R as Ee}from"./require-capability-BYjfZMZ1.js";import"./User01-BTBcFc9z.js";import"./auth-DxnCXfEr.js";import"./sidebar-BjYwCtXi.js";import"./LayoutLeft-CWKaiAHc.js";import"./use-mobile-B9xC4LZs.js";import"./X-DsUhkCER.js";import"./tooltip-DrF8Dycy.js";import"./studio-tools-D5UPG7xq.js";import"./card-C_7Dfz9P.js";import"./ArrowUpRight-pyqwDg-l.js";import"./use-capability-hQ0DXv0z.js";import"./access-gate-CKUKLx71.js";import"./capability-load-error-BSRBDTUF.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||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]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
1
+ import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,p as ae,K as ye,e as je,t as ge}from"./index-tHM8NTfd.js";import{i as ve}from"./AlertCircle-DevA0A1M.js";import{i as Ce}from"./ChevronRight-CmrokxXJ.js";import{s as be}from"./Plus-D7R6BF5R.js";import{s as _e}from"./Trash01-DnjcslV5.js";import{I as re}from"./input-CtPcKTyA.js";import{S as de}from"./switch-BAMPQcFC.js";import{S as Re}from"./skeleton-CVx36MXd.js";import{A as me}from"./avatar-6012j4NF.js";import{P as ke,a as Ne,b as Pe}from"./popover-C3OgPzQD.js";import{b as fe}from"./use-connection-uKN5YWIx.js";import{W as ne}from"./use-mcp-client-BAwn-0AV.js";import{P as te}from"./index-D6fjxFLg.js";import{u as Te}from"./use-registry-connections-o8h37zTy.js";import{g as we,h as Ae}from"./use-organization-settings-D0V5wIDO.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-B7sLcI44.js";import{R as Ee}from"./require-capability-B-Sqx0zT.js";import"./User01-DQzbx1Xu.js";import"./auth-Btre_1OW.js";import"./sidebar-DS29jp1e.js";import"./LayoutLeft-BzJLVhVQ.js";import"./use-mobile-B-9CWMAs.js";import"./X-DsJCvKBO.js";import"./tooltip-C4NGAgAM.js";import"./studio-tools-DBJ4BlKP.js";import"./card-LK3SgMlx.js";import"./ArrowUpRight-Bay5EW8Z.js";import"./use-capability-nY6kVL8r.js";import"./access-gate-BUe45Oc3.js";import"./capability-load-error-DXOesTij.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||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]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let q;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=y=>A(y.target.value),e[30]=q):q=e[30];let B;e[31]!==U||e[32]!==a?(B=i.jsx(re,{placeholder:U,value:a,onChange:q,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=B):B=e[33];let O;e[34]!==F||e[35]!==B?(O=i.jsx(H,{title:F,action:B}),e[34]=F,e[35]=B,e[36]=O):O=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let Y;e[43]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>_(y.target.value),e[43]=Y):Y=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:Y,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==O||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,O,I,w]}),e[69]=O,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,q=ne.SELF(l.id),B=new Set([f,C,"community-registry",q]),O=c.filter(n=>!B.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const Y=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==Y||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>Y(n.id)},n.id),t[52]=Y,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=O.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BNIYUe33.js","assets/index-tHM8NTfd.js","assets/index-CsfbOCjy.css","assets/Tool02-C-4pjcCY.js","assets/CheckCircle-ck8m-YN6.js","assets/Settings02-k_lwzmTv.js","assets/use-mcp-client-BAwn-0AV.js","assets/auth-Btre_1OW.js","assets/useInfiniteQuery-DAxuc5L-.js","assets/use-infinite-scroll-DFYxMuWT.js","assets/studio-tools-DBJ4BlKP.js","assets/badge-kM5UAKst.js","assets/input-CtPcKTyA.js","assets/dropdown-menu-DBsO6utH.js","assets/Check-DN6IPn_3.js","assets/ChevronRight-CmrokxXJ.js","assets/DotsVertical-Db5Rriwt.js","assets/table-DunMqZev.js","assets/toggle-group-CugvhNWb.js","assets/use-view-mode-CyIY6QXB.js","assets/use-mobile-B-9CWMAs.js","assets/FilterLines-BFxvHa0q.js","assets/SearchMd-B-lbf8c2.js","assets/dialog-D370feZI.js","assets/X-DsJCvKBO.js","assets/AlertCircle-DevA0A1M.js","assets/Upload01-uhey7zjg.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-B5UNzzAF.js","assets/card-LK3SgMlx.js","assets/Trash01-DnjcslV5.js","assets/label-Dx1_DE-f.js","assets/select-QOGEC2YQ.js","assets/tooltip-C4NGAgAM.js","assets/ChevronDown-cZoWRgvb.js","assets/ChevronUp-CswOdRaR.js","assets/switch-BAMPQcFC.js","assets/textarea-hljn8moZ.js","assets/ArrowRight-Dq4C6lJ4.js","assets/XCircle-Eu9CNvjp.js","assets/checkbox-C9Nq068Z.js","assets/Eye-BqdZYqpI.js","assets/LinkExternal01-Dv9Aj-K0.js","assets/use-copy-EWLYbeWi.js","assets/Copy01-BGeJ_uJU.js","assets/Key01-YwqEObkc.js","assets/Plus-D7R6BF5R.js","assets/mcp-oauth-Ch4TwOlY.js","assets/Play-DY15eh3c.js"])))=>i.map(i=>d[i]);
2
+ import{c as m,d as n,f as c,j as t,k as f,r as l,aG as p}from"./index-tHM8NTfd.js";import{R as u}from"./require-capability-B-Sqx0zT.js";import"./use-capability-nY6kVL8r.js";import"./access-gate-BUe45Oc3.js";import"./capability-load-error-DXOesTij.js";const g=l.lazy(()=>p(()=>import("./registry-layout-BNIYUe33.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));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(f,{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 +1 @@
1
- import{c,F as i}from"./index-D3OCvKaU.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
1
+ import{c,F as i}from"./index-tHM8NTfd.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
@@ -1 +1 @@
1
- import{r as c,j as i,ay as C,aC as y,aB as T,aE as I,bz as M,by as z,aA as A,c as H,m as g}from"./index-D3OCvKaU.js";var m="Switch",[U]=A(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{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:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(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:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=H.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"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]!==s||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,ay as C,aC as y,aB as T,aE as I,bz as M,by as z,aA as A,c as H,m as g}from"./index-tHM8NTfd.js";var m="Switch",[U]=A(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{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:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(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:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=H.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=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]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"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]!==s||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{G as u}from"./index-D3OCvKaU.js";const l=1e4,g="true";function s(e,t){return u.chatAutosend(e,t)}function c(e){return e==="pending"||e==="sending"}function f(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!c(t.status)?null:t}function A(e,t,n,r,i=Date.now()){const a={message:r,createdAt:i,status:"pending"};return e.setItem(s(t,n),JSON.stringify(a)),a}function d(e,t,n){const r=s(t,n),i=f(e.getItem(r));return i||(e.removeItem(r),null)}function v(e,t,n,r=Date.now()){const i=s(t,n),a=d(e,t,n);return!a||a.status!=="pending"?null:r-a.createdAt>=l?(e.removeItem(i),null):(e.setItem(i,JSON.stringify({...a,status:"sending"})),{message:a.message,createdAt:a.createdAt})}function b(e,t,n){e.removeItem(s(t,n))}function p(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function m(e,t){return`app:${e}:${t}`}function O(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),i=t.slice(n+1);return!r||!i?null:{connectionId:r,toolName:i}}function C(e){return`deck:${encodeURIComponent(e)}`}function I(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function w(e){return`file:${encodeURIComponent(e)}`}function E(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function k(e){return`library-file:${encodeURIComponent(e)}`}function _(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function U(e){return`code:${encodeURIComponent(e)}`}function W(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const T=["overview","settings","automations","preview","code","content","git"],h=new Set(T),R=new Set(["board","files"]);function D(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const o=new Set(["instructions","connections","layout","settings"]);function L(e){return!!e&&o.has(e)}function y(e){const t=e?.defaultMainView??null;if(!t||o.has(t.type))return"settings";if(h.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return m(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function N(e){const t=e.mainParam===0?"0":e.mainParam,n=y(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const r=e.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:n}}return o.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function P(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function F(e){return e.mainOpen?e.activeTab==="automations"?!0:p(e.activeTab)!==null:!1}function V(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{g as A,T as F,R as O,N as a,E as b,I as c,_ as d,P as e,m as f,U as g,k as h,L as i,W as j,O as k,F as l,V as m,C as n,w as o,p,D as q,y as r,v as s,b as t,A as w};
1
+ import{G as u}from"./index-tHM8NTfd.js";const l=1e4,g="true";function s(e,t){return u.chatAutosend(e,t)}function c(e){return e==="pending"||e==="sending"}function f(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return!t||typeof t!="object"||typeof t.createdAt!="number"||typeof t.message!="object"||!c(t.status)?null:t}function A(e,t,n,r,i=Date.now()){const a={message:r,createdAt:i,status:"pending"};return e.setItem(s(t,n),JSON.stringify(a)),a}function d(e,t,n){const r=s(t,n),i=f(e.getItem(r));return i||(e.removeItem(r),null)}function v(e,t,n,r=Date.now()){const i=s(t,n),a=d(e,t,n);return!a||a.status!=="pending"?null:r-a.createdAt>=l?(e.removeItem(i),null):(e.setItem(i,JSON.stringify({...a,status:"sending"})),{message:a.message,createdAt:a.createdAt})}function b(e,t,n){e.removeItem(s(t,n))}function p(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function m(e,t){return`app:${e}:${t}`}function O(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),n=t.indexOf(":");if(n<=0)return null;const r=t.slice(0,n),i=t.slice(n+1);return!r||!i?null:{connectionId:r,toolName:i}}function C(e){return`deck:${encodeURIComponent(e)}`}function I(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function w(e){return`file:${encodeURIComponent(e)}`}function E(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function k(e){return`library-file:${encodeURIComponent(e)}`}function _(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function U(e){return`code:${encodeURIComponent(e)}`}function W(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const T=["overview","settings","automations","preview","code","content","git"],h=new Set(T),R=new Set(["board","files"]);function D(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const o=new Set(["instructions","connections","layout","settings"]);function L(e){return!!e&&o.has(e)}function y(e){const t=e?.defaultMainView??null;if(!t||o.has(t.type))return"settings";if(h.has(t.type))return t.type;if(t.type==="ext-app"||t.type==="ext-apps"){if(t.id&&t.toolName)return m(t.id,t.toolName);const n=e?.tabs?.map(r=>r.id)??[];return t.id&&n.includes(t.id)?t.id:n[0]??"settings"}return e?.tabs?.[0]?.id??"settings"}function N(e){const t=e.mainParam===0?"0":e.mainParam,n=y(e.metadata);if(t==="0")return{mainOpen:!1,activeTab:n};if(t===void 0){const r=e.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:n}}return o.has(t)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:t}}function P(e){return e.mainOpen&&e.clickedId===e.activeTab?0:e.clickedId}function F(e){return e.mainOpen?e.activeTab==="automations"?!0:p(e.activeTab)!==null:!1}function V(e){return e.mainOpen&&e.activeTab==="automations"?0:"automations"}export{g as A,T as F,R as O,N as a,E as b,I as c,_ as d,P as e,m as f,U as g,k as h,L as i,W as j,O as k,F as l,V as m,C as n,w as o,p,D as q,y as r,v as s,b as t,A as w};
@@ -1 +1 @@
1
- import{c,m as i,j as r}from"./index-D3OCvKaU.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,m as a,b,d as c,p as d,f as e};
1
+ import{c,m as i,j as r}from"./index-tHM8NTfd.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,m as a,b,d as c,p as d,f as e};
@@ -1 +1 @@
1
- import{r as v,j as d,bA as k,ay as p,bD as F,bC as y,bB as M,aE as T,aA as P,aD as S,aB as D,aF as V,c as x,m as g}from"./index-D3OCvKaU.js";var m="Tabs",[G]=P(m,[y]),C=y(),[L,h]=G(m),w=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=D({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})})});w.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=C(a);return d.jsx(k,{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=h(I,a),i=C(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(M,{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:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var A="TabsContent",R=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(A,a),l=E(i.baseId,t),f=$(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(F,{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})})});R.displayName=A;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var B=w,z=j,K=_,q=R;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(B,{"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 J(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(z,{"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 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 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(K,{"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 U(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,O as a,Q as b,J as c};
1
+ import{r as v,j as d,bA as k,ay as p,bD as F,bC as y,bB as M,aE as T,aA as P,aD as S,aB as D,aF as V,c as x,m as g}from"./index-tHM8NTfd.js";var m="Tabs",[G]=P(m,[y]),C=y(),[L,h]=G(m),w=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=D({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})})});w.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=C(a);return d.jsx(k,{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=h(I,a),i=C(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(M,{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:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var A="TabsContent",R=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(A,a),l=E(i.baseId,t),f=$(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(F,{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})})});R.displayName=A;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var B=w,z=j,K=_,q=R;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(B,{"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 J(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(z,{"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 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 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(K,{"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 U(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,O as a,Q as b,J as c};
@@ -1 +1 @@
1
- import{c as o,m as l,j as n}from"./index-D3OCvKaU.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder: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 flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
1
+ import{c as o,m as l,j as n}from"./index-tHM8NTfd.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder: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 flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
@@ -1 +1 @@
1
- import{r as x,aB as b,j as c,ay as m,aE as k,ax as p,bB as A,bC as T,aD as M,bA as S,aA as D,bt as F,c as C,m as P}from"./index-D3OCvKaU.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]=D(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx($,{...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),$=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,H]=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=M(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(S,{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=H(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(A,{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)}})}),L=h,U=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 K(a){const e=C.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=P("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(L,{"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 Q(a){const e=C.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=P(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(U,{"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{Q as T,K as a};
1
+ import{r as x,aB as b,j as c,ay as m,aE as k,ax as p,bB as A,bC as T,aD as M,bA as S,aA as D,bt as F,c as C,m as P}from"./index-tHM8NTfd.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]=D(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx($,{...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),$=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,H]=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=M(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(S,{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=H(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(A,{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)}})}),L=h,U=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 K(a){const e=C.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=P("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(L,{"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 Q(a){const e=C.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=P(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(U,{"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{Q as T,K as a};
@@ -1 +1 @@
1
- import{c as u,m as T,j as i,r as b,b as p,f as k,af as j,L as N,a9 as y,aY as L}from"./index-D3OCvKaU.js";function B(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let g;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(g=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=g):g=e[13],g}const S=b.createContext(null);function h(){const t=b.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=b.useState(null),[n,r]=b.useState(null),[c,a]=b.useState(null),[f,g]=b.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:g},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let x;return e[5]!==l||e[6]!==d?(x=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=x):x=e[7],x}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function w(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(){const t=u.c(13),e=p(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let g;return t[10]!==c||t[11]!==f?(g=i.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=g):g=t[12],g}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(b.Suspense,{fallback:i.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:i.jsx(R,{})}),t[0]=e):e=t[0],e}function _(){const t=u.c(12),e=p();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=k(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(N,{to:"/$org",params:o,"aria-label":n,title:r,className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function z(){const t=u.c(2),{setCenterEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function P(t){const e=u.c(3),{children:l}=t,{centerEl:s}=h();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=j.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=h();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=h();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=j.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=h();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=w;m.Logo=E;m.LogoLink=_;m.CenterSlot=z;m.Center=P;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{B as T,m as a};
1
+ import{c as u,m as T,j as i,r as b,b as p,f as k,af as j,L as N,a9 as y,aY as L}from"./index-tHM8NTfd.js";function B(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let g;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(g=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=g):g=e[13],g}const S=b.createContext(null);function h(){const t=b.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=b.useState(null),[n,r]=b.useState(null),[c,a]=b.useState(null),[f,g]=b.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:g},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let x;return e[5]!==l||e[6]!==d?(x=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=x):x=e[7],x}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function w(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(){const t=u.c(13),e=p(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let g;return t[10]!==c||t[11]!==f?(g=i.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=g):g=t[12],g}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(b.Suspense,{fallback:i.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:i.jsx(R,{})}),t[0]=e):e=t[0],e}function _(){const t=u.c(12),e=p();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=k(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(N,{to:"/$org",params:o,"aria-label":n,title:r,className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function z(){const t=u.c(2),{setCenterEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function P(t){const e=u.c(3),{children:l}=t,{centerEl:s}=h();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=j.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=h();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=h();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=j.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=h();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=w;m.Logo=E;m.LogoLink=_;m.CenterSlot=z;m.Center=P;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{B as T,m as a};