decocms 4.150.2 → 4.150.3

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 (221) hide show
  1. package/dist/client/assets/{AlertCircle-CAbc8MAP.js → AlertCircle-9SzyWKyE.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BpGDlewJ.js → AreaChart-CnNr4TEy.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Cbgz6edS.js → ArrowUp-DQRRFixg.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-rLTsVWA_.js → ArrowUpRight-CbcmJ_TD.js} +1 -1
  5. package/dist/client/assets/{Check-aJK60dGs.js → Check-HAv3Qoh-.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DyT8St9I.js → CheckCircle-B2TYFYU2.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-QKGLHDtk.js → ChevronDown-CHC7E66-.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-ByhOJDuf.js → ChevronRight-CcOjzlDN.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-Bua8mQg_.js → ChevronUp-DbtLB7uL.js} +1 -1
  10. package/dist/client/assets/{Copy01-MoyRnx9Y.js → Copy01-Bp9Lffnr.js} +1 -1
  11. package/dist/client/assets/{CpuChip01-BRse3wgD.js → CpuChip01-CKGxncDz.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DDt1Z0of.js → DotsVertical-Df0bVocX.js} +1 -1
  13. package/dist/client/assets/{Eye-CN7MnuxX.js → Eye-BNpFccLX.js} +1 -1
  14. package/dist/client/assets/{FilterLines-D6T2TLxw.js → FilterLines-Gvs8cXY9.js} +1 -1
  15. package/dist/client/assets/{HardDrive-k_osV2fx.js → HardDrive-DplRZ7Xc.js} +1 -1
  16. package/dist/client/assets/{Key01-DgWg9XoR.js → Key01-DQiO6Zek.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-DuThLaX3.js → LayoutLeft-Dyg8dCMM.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-BjO4mb1B.js → LinkExternal01-CtHit8P2.js} +1 -1
  19. package/dist/client/assets/{LogOut01-BaLbb-JK.js → LogOut01-BZTTP4bY.js} +1 -1
  20. package/dist/client/assets/{Monitor01-BbOMT_Bf.js → Monitor01-CFzyQiRg.js} +1 -1
  21. package/dist/client/assets/{Palette-Bu3LAepu.js → Palette-BFblTH0J.js} +1 -1
  22. package/dist/client/assets/{Play-ZUjJ9tm4.js → Play-BorSZmIL.js} +1 -1
  23. package/dist/client/assets/{Plus-DNcVUobv.js → Plus-BVxAhxMz.js} +1 -1
  24. package/dist/client/assets/{SearchLg-pvNMPdx7.js → SearchLg-CDsIaigY.js} +1 -1
  25. package/dist/client/assets/{SearchMd-BMhVoBl-.js → SearchMd-BSTxqnhr.js} +1 -1
  26. package/dist/client/assets/{Settings02-DqVBXHWa.js → Settings02-BELTDGHE.js} +1 -1
  27. package/dist/client/assets/{Shield01-DqbjKqjF.js → Shield01-CT4epMIY.js} +1 -1
  28. package/dist/client/assets/{Star01-C6wv5tg7.js → Star01-Bi9T9bJZ.js} +1 -1
  29. package/dist/client/assets/{Stars01-cbnx-58G.js → Stars01-OZSf9VLV.js} +1 -1
  30. package/dist/client/assets/{Stars02-BteVxWQx.js → Stars02-Bj8ktNiu.js} +1 -1
  31. package/dist/client/assets/{Sun-jlM4_jk2.js → Sun-DuEt3PP-.js} +1 -1
  32. package/dist/client/assets/{SwitchHorizontal01-CcYoskYm.js → SwitchHorizontal01-BPNHlIUv.js} +1 -1
  33. package/dist/client/assets/{Tool01-y5Zo-2kp.js → Tool01-DkOLJQIO.js} +1 -1
  34. package/dist/client/assets/{Tool02-DxIXF41R.js → Tool02-B7PpgdMe.js} +1 -1
  35. package/dist/client/assets/{Trash01-8tMNvAGj.js → Trash01-BrKPcSIO.js} +1 -1
  36. package/dist/client/assets/{TrendUp01-Bvixesdw.js → TrendUp01-DcvNh57G.js} +1 -1
  37. package/dist/client/assets/{Upload01-DEb40SuQ.js → Upload01-INelJ_Lh.js} +1 -1
  38. package/dist/client/assets/{User01-B1EqqZKM.js → User01-D5zL4tme.js} +1 -1
  39. package/dist/client/assets/{Users01-Ca4M-Dx2.js → Users01-Dv4yEyJr.js} +1 -1
  40. package/dist/client/assets/{Users03-DdrNKhEH.js → Users03-Brr-YBon.js} +1 -1
  41. package/dist/client/assets/{X-6E3IZLpq.js → X-b1CduA8m.js} +1 -1
  42. package/dist/client/assets/{XCircle-Dv7GY9Ae.js → XCircle-COKwof4k.js} +1 -1
  43. package/dist/client/assets/{XClose-outHzlfY.js → XClose-BeeXU30N.js} +1 -1
  44. package/dist/client/assets/{Zap-7KA5ZNQg.js → Zap-DTi7UEaq.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-Cvx15c67.js → ZapSquare-BdAqvdax.js} +1 -1
  46. package/dist/client/assets/{access-gate-BtdxRPzC.js → access-gate-BMlGI3KF.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-1gI2_SbS.js → add-section-modal-C6iHHcJL.js} +1 -1
  48. package/dist/client/assets/{agent-icon-qAcwCm4B.js → agent-icon-DsZ_qI1T.js} +1 -1
  49. package/dist/client/assets/{agents-list-B7vHkEUR.js → agents-list-Cbu4_Cyi.js} +1 -1
  50. package/dist/client/assets/{ai-providers-Cy0WUCI6.js → ai-providers-q7C15Bys.js} +1 -1
  51. package/dist/client/assets/{alert-D_OxeHCG.js → alert-B-wH90gS.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-BzE_binL.js → alert-dialog-BQTZb6rd.js} +1 -1
  53. package/dist/client/assets/{app-editor-D6kzTyQl.js → app-editor-Bz0hayv-.js} +1 -1
  54. package/dist/client/assets/{auth-BKADTSIm.js → auth-CF8F6GlA.js} +1 -1
  55. package/dist/client/assets/{auth-catchall-DCbf-FPB.js → auth-catchall-DddFNrzC.js} +1 -1
  56. package/dist/client/assets/{auth-entry-n0kUqZDU.js → auth-entry-BwrOFYck.js} +1 -1
  57. package/dist/client/assets/{auth-split-layout-fl1tt8El.js → auth-split-layout-BUp_M-fc.js} +1 -1
  58. package/dist/client/assets/{authenticate-and-persist-oauth-BXgFAJ7b.js → authenticate-and-persist-oauth-BVEgp1eO.js} +1 -1
  59. package/dist/client/assets/{automation-list-row-3FdiUeBz.js → automation-list-row-CqyPjnKW.js} +1 -1
  60. package/dist/client/assets/{automation-runs-AODBXa-8.js → automation-runs-DbpjwD40.js} +1 -1
  61. package/dist/client/assets/{automations-DP78jBC4.js → automations-Cies1T9w.js} +1 -1
  62. package/dist/client/assets/{avatar-Bl8FLdrm.js → avatar-2jBZ0oLe.js} +1 -1
  63. package/dist/client/assets/{badge-LURmYsxa.js → badge-gG6vRyl9.js} +1 -1
  64. package/dist/client/assets/{block-document-B-Vw2I-7.js → block-document-ChCaQmhb.js} +1 -1
  65. package/dist/client/assets/{brand-context-Chvs1V4k.js → brand-context-BmVT6dy0.js} +1 -1
  66. package/dist/client/assets/{buckets-LD_Kv7DZ.js → buckets-MBiWM1KL.js} +1 -1
  67. package/dist/client/assets/{bulk-category-panel-DalBiXPR.js → bulk-category-panel-BCWceJ3U.js} +1 -1
  68. package/dist/client/assets/{calendar-RjMy83m7.js → calendar-BhcNF5ME.js} +1 -1
  69. package/dist/client/assets/{capability-load-error-DywZlInh.js → capability-load-error-Dqfkupks.js} +1 -1
  70. package/dist/client/assets/{card-lRKCCLQw.js → card-Bk2dJN_0.js} +1 -1
  71. package/dist/client/assets/{category-editor-BNU81d-v.js → category-editor-h6Q3eBQp.js} +1 -1
  72. package/dist/client/assets/{chat-context-CUD5YWfE.js → chat-context-Q02iA1Qd.js} +1 -1
  73. package/dist/client/assets/{checkbox-gzTh7FP3.js → checkbox-RL6gfPEZ.js} +1 -1
  74. package/dist/client/assets/{cli-auth-success-BMeDbwDU.js → cli-auth-success-CTDCMXH6.js} +1 -1
  75. package/dist/client/assets/{collection-detail-BpRPJJJO.js → collection-detail-DH-FTvj_.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-CDMiZ4wp.js → collection-display-button-DUb4Bukx.js} +1 -1
  77. package/dist/client/assets/{collection-search-ljHjogUZ.js → collection-search-CrIM_huO.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-07iU-rKc.js → collection-table-wrapper-AZMzRHKA.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-DWzHRz5O.js → collection-tabs-DSHWZpg5.js} +1 -1
  80. package/dist/client/assets/{command-j9BWJhQ1.js → command-2_oAT47U.js} +1 -1
  81. package/dist/client/assets/{commerce-onboarding-BDrLxXBN.js → commerce-onboarding-uTivlgyM.js} +1 -1
  82. package/dist/client/assets/{companions-core-CeShKWs_.js → companions-core-Dcviw3XP.js} +1 -1
  83. package/dist/client/assets/{connect-Dyp_F0m0.js → connect-Df_GTBGq.js} +1 -1
  84. package/dist/client/assets/{connection-DDpagRMI.js → connection-C29S1nEA.js} +1 -1
  85. package/dist/client/assets/{connection-card-BRV9KXgc.js → connection-card-4rTis35w.js} +1 -1
  86. package/dist/client/assets/{connection-detail-DT_FeXpQ.js → connection-detail-DUOgMQT4.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-CI7ZaQlB.js → connection-form-helpers-o0JRu9Pz.js} +1 -1
  88. package/dist/client/assets/{connections-BuFxk7y9.js → connections-B-O9wYf6.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-CjEW6498.js → decopilot-sse-pool-B0Y65B5R.js} +1 -1
  90. package/dist/client/assets/{dialog-BUJ-AcXn.js → dialog-k8IF67S5.js} +1 -1
  91. package/dist/client/assets/{domain-settings-Dh870ukR.js → domain-settings-BqoJGIGn.js} +1 -1
  92. package/dist/client/assets/{drawer-kWTjBHBr.js → drawer-BSAyV4TO.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-BOOIaYmO.js → dropdown-menu-BHrqHItr.js} +1 -1
  94. package/dist/client/assets/{empty-state-XIb0GhoJ.js → empty-state-pVGYkd6B.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-DPzwGu6f.js → extract-connection-data-C5kAgWu4.js} +1 -1
  96. package/dist/client/assets/{file-explorer-mQ9cuAlm.js → file-explorer-k4LIT8bA.js} +1 -1
  97. package/dist/client/assets/{form-DhWAfAxx.js → form-hHWp4kad.js} +1 -1
  98. package/dist/client/assets/{general-CjTdG6rX.js → general-uZipTDA8.js} +1 -1
  99. package/dist/client/assets/{github-repo-picker-DGEn8-6q.js → github-repo-picker-C4SqFi1U.js} +1 -1
  100. package/dist/client/assets/{hooks-FOgIFNPr.js → hooks-Cqm3ievW.js} +1 -1
  101. package/dist/client/assets/{index-CQ0WoKUM.js → index--wIVtztH.js} +1 -1
  102. package/dist/client/assets/index-6MYKzXRx.js +8 -0
  103. package/dist/client/assets/{index-BWQ8J_Ql.js → index-BH_FlvCl.js} +3 -3
  104. package/dist/client/assets/{index-BX2N3HzA.js → index-BNimzFza.js} +1 -1
  105. package/dist/client/assets/{index-Ac0om1NX.js → index-C2l8ZL-J.js} +1 -1
  106. package/dist/client/assets/{index-EeV9OJhC.js → index-CI9qWtAz.js} +1 -1
  107. package/dist/client/assets/{index-CIyNbcah.js → index-D2mJ3JUR.js} +5 -5
  108. package/dist/client/assets/{index-BCxi5_7f.js → index-D9uE9H9L.js} +1 -1
  109. package/dist/client/assets/{index-_IZqLwb-.js → index-DOVYT_MA.js} +1 -1
  110. package/dist/client/assets/{index-MlZsnJSA.js → index-DmMGycGe.js} +1 -1
  111. package/dist/client/assets/{index-C-_pDHOJ.js → index-Dw8aOHkA.js} +1 -1
  112. package/dist/client/assets/{index-redirect-BjGSlCrH.js → index-redirect-DhikZZpl.js} +1 -1
  113. package/dist/client/assets/{input-IzR9qH12.js → input-D_5wC1aD.js} +1 -1
  114. package/dist/client/assets/{integration-icon-CaGyRRyP.js → integration-icon-DOIN2Kkl.js} +1 -1
  115. package/dist/client/assets/{invite-member-dialog-CTeaS8vD.js → invite-member-dialog-DUTyUDhg.js} +1 -1
  116. package/dist/client/assets/{label-zD_AlFJF.js → label-y0hp3C8E.js} +1 -1
  117. package/dist/client/assets/{layout-uxu7b6O6.js → layout-BfJRmK_r.js} +1 -1
  118. package/dist/client/assets/{login-Br6hVgnv.js → login-BF2Ne-_P.js} +1 -1
  119. package/dist/client/assets/{mcp-oauth-CNzwJzT5.js → mcp-oauth-34yo-foZ.js} +1 -1
  120. package/dist/client/assets/{members-DcNYgo-P.js → members-G_VAfvuD.js} +1 -1
  121. package/dist/client/assets/{monaco-editor-Co8sJEI7.js → monaco-editor-D-wYE9NF.js} +1 -1
  122. package/dist/client/assets/{monitoring-stats-row-CbXMz8km.js → monitoring-stats-row-BERtubjR.js} +1 -1
  123. package/dist/client/assets/{multi-select-Czw1wHcN.js → multi-select-TIl6cgZ2.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-B0H3IWVN.js → oauth-callback-WWLohlYj.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-b5YfaX3T.js → oauth-callback-ai-provider-1jhRM56C.js} +1 -1
  126. package/dist/client/assets/{onboarding-CB5K-VlR.js → onboarding-BKGxGwjd.js} +1 -1
  127. package/dist/client/assets/{org-install-YGw7zvFP.js → org-install-CTzDf415.js} +1 -1
  128. package/dist/client/assets/{org-layout-B1R0Q8-o.js → org-layout-FR2gTMA8.js} +1 -1
  129. package/dist/client/assets/{organization-choice-Ne0KB-x0.js → organization-choice-BDoC3TOS.js} +1 -1
  130. package/dist/client/assets/{orgs-BnIgEs74.js → orgs-BZMU7CkE.js} +1 -1
  131. package/dist/client/assets/{page-seo-form-D5M2Mesd.js → page-seo-form-CL6MwdTw.js} +1 -1
  132. package/dist/client/assets/{popover-CkXP0cF6.js → popover-BjTiOU-j.js} +1 -1
  133. package/dist/client/assets/{post-editor-BEQMlvQZ.js → post-editor-CdpGGMi2.js} +1 -1
  134. package/dist/client/assets/{primitives-C2lr9KO1.js → primitives-UAJBop2L.js} +1 -1
  135. package/dist/client/assets/{profile-jB7FMt3l.js → profile-BIzIR79p.js} +1 -1
  136. package/dist/client/assets/project-app-view-D7SClw3A.js +1 -0
  137. package/dist/client/assets/record-editor-jqXVvOw2.js +1 -0
  138. package/dist/client/assets/{redirect-editor-BJUT-zFR.js → redirect-editor-2RZq6KLP.js} +1 -1
  139. package/dist/client/assets/registry-BKYB7Tvz.js +2 -0
  140. package/dist/client/assets/{registry-layout-HtTY1XfQ.js → registry-layout-Bn38_zue.js} +1 -1
  141. package/dist/client/assets/{reports-YssXN6Zx.js → reports-Bg5241W2.js} +1 -1
  142. package/dist/client/assets/{require-capability-DEFFZdkS.js → require-capability-DqCmC5MK.js} +1 -1
  143. package/dist/client/assets/{required-auth-layout-CcfxFPTq.js → required-auth-layout-CUjsq5ga.js} +1 -1
  144. package/dist/client/assets/{reset-password-DjZyqOt5.js → reset-password-DYsOl0An.js} +1 -1
  145. package/dist/client/assets/{roles-CjsNVENm.js → roles-BS6akTVO.js} +1 -1
  146. package/dist/client/assets/{search-input-Di-RLxL2.js → search-input-DUXJZ6jf.js} +1 -1
  147. package/dist/client/assets/{secrets-BSG0owhI.js → secrets-a23_vqmE.js} +1 -1
  148. package/dist/client/assets/{sections-editor-BTGC7Dfw.js → sections-editor-DqH_0g19.js} +1 -1
  149. package/dist/client/assets/{select-BeoMfuBi.js → select-DQeN1iTO.js} +1 -1
  150. package/dist/client/assets/{select-model-Ba2cltVj.js → select-model-DSHwqyob.js} +1 -1
  151. package/dist/client/assets/{self-tool-result-BLIGgLaX.js → self-tool-result-6UMYRbHu.js} +1 -1
  152. package/dist/client/assets/{seo-editor-D25oK2rX.js → seo-editor-CfHy9C5F.js} +1 -1
  153. package/dist/client/assets/{settings-layout-C0qTcOnX.js → settings-layout-CsZ5mAq6.js} +1 -1
  154. package/dist/client/assets/{settings-section-DMX_R5s3.js → settings-section-C-scXgTT.js} +1 -1
  155. package/dist/client/assets/{shell-controls-CrY__EeP.js → shell-controls-CG2FoklQ.js} +1 -1
  156. package/dist/client/assets/{shell-layout-Cq8rmUZ4.js → shell-layout-BjvhCwpZ.js} +1 -1
  157. package/dist/client/assets/{sidebar-Dqyoi3Jo.js → sidebar-D3dJYFFY.js} +1 -1
  158. package/dist/client/assets/{skeleton-mzmR9D0W.js → skeleton-Dtl2kVUh.js} +1 -1
  159. package/dist/client/assets/{sso-DQ3A7eYM.js → sso-DitYu9sW.js} +1 -1
  160. package/dist/client/assets/{store-DE5Iz_hB.js → store-BOU1swIR.js} +1 -1
  161. package/dist/client/assets/store-registry-CJZci817.js +2 -0
  162. package/dist/client/assets/{studio-tools-BziqPhXE.js → studio-tools-D75sojFk.js} +1 -1
  163. package/dist/client/assets/{switch-DEnDWJad.js → switch-CQkWKPjL.js} +1 -1
  164. package/dist/client/assets/{tab-id-CpKaVM9t.js → tab-id-DTfezOr5.js} +1 -1
  165. package/dist/client/assets/{table-8sezDnga.js → table-CSJj0ga_.js} +1 -1
  166. package/dist/client/assets/{tabs-BDABIwTP.js → tabs-l0P4uKJS.js} +1 -1
  167. package/dist/client/assets/{textarea-w4chswNw.js → textarea-Cwy8mcj3.js} +1 -1
  168. package/dist/client/assets/{toggle-group-Dlgb2--d.js → toggle-group-BUQniaMs.js} +1 -1
  169. package/dist/client/assets/{toolbar-BV83UGjr.js → toolbar-BnCsl0cc.js} +1 -1
  170. package/dist/client/assets/{tooltip-E9C3lYtr.js → tooltip-5f345nRx.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-CPseYMhM.js → use-ai-providers-DscE0aEQ.js} +1 -1
  172. package/dist/client/assets/{use-automations-B5e1sys8.js → use-automations-R01MF2Wb.js} +1 -1
  173. package/dist/client/assets/{use-autosave-DsiUg614.js → use-autosave-wlNPsM1K.js} +1 -1
  174. package/dist/client/assets/{use-capability-0p8XXo7t.js → use-capability-CXHTHN2p.js} +1 -1
  175. package/dist/client/assets/{use-clock-tick-CNICdDqm.js → use-clock-tick-ClIxUD8i.js} +1 -1
  176. package/dist/client/assets/{use-connection-DhT-Eyoh.js → use-connection-aekGGpVs.js} +1 -1
  177. package/dist/client/assets/{use-copy-CitgQbMn.js → use-copy-hYjjhj44.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-CwmieGOB.js → use-create-virtual-mcp-DAF6n_fI.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-DT68jL4f.js → use-debounced-autosave-BIMFLroB.js} +1 -1
  180. package/dist/client/assets/{use-debounced-value-C2iB9iww.js → use-debounced-value-BVPzmiZc.js} +1 -1
  181. package/dist/client/assets/{use-deco-credits-BxIFs0tR.js → use-deco-credits-Dcf_jzcd.js} +1 -1
  182. package/dist/client/assets/{use-decopilot-events-BqtjxaPd.js → use-decopilot-events-BsDG16aR.js} +1 -1
  183. package/dist/client/assets/{use-delete-connection-Cq0Jmwza.js → use-delete-connection-JQZFpGgt.js} +1 -1
  184. package/dist/client/assets/{use-deployment-admin-CBXNcw9O.js → use-deployment-admin-JunCUCsz.js} +1 -1
  185. package/dist/client/assets/{use-file-configs-CNJh9wYK.js → use-file-configs-DZVUQ4pq.js} +1 -1
  186. package/dist/client/assets/{use-infinite-scroll-DDpxPDP2.js → use-infinite-scroll-BVTX2txG.js} +1 -1
  187. package/dist/client/assets/{use-join-requests-C3KDTC7_.js → use-join-requests-Cs-3guHD.js} +1 -1
  188. package/dist/client/assets/{use-mcp-auth-status-D0D4mOkH.js → use-mcp-auth-status-BSa8WVqO.js} +1 -1
  189. package/dist/client/assets/{use-mcp-client-DxfTC5E_.js → use-mcp-client-epZZ6uX_.js} +1 -1
  190. package/dist/client/assets/{use-mcp-tools-B2Sf-NwM.js → use-mcp-tools-CA8XLLvW.js} +1 -1
  191. package/dist/client/assets/{use-members-RZeFEjqN.js → use-members-DkE_dcBu.js} +1 -1
  192. package/dist/client/assets/{use-mobile-DLuY7pVt.js → use-mobile-CHEn9Vuf.js} +1 -1
  193. package/dist/client/assets/{use-navigate-to-agent-CPiWe3y7.js → use-navigate-to-agent-ndEZccL5.js} +1 -1
  194. package/dist/client/assets/{use-org-auth-client-CuzKnrVt.js → use-org-auth-client-FL0jYYDe.js} +1 -1
  195. package/dist/client/assets/{use-org-sso-BwjPrTQu.js → use-org-sso-DZn58QZw.js} +1 -1
  196. package/dist/client/assets/{use-organization-roles-aahUHPIP.js → use-organization-roles-BbvmSWo8.js} +1 -1
  197. package/dist/client/assets/{use-organization-settings-OE3Lr1-V.js → use-organization-settings-Cs2jBFh8.js} +1 -1
  198. package/dist/client/assets/{use-registry-connections-Bw8B7hj8.js → use-registry-connections-CcoxB7ml.js} +1 -1
  199. package/dist/client/assets/{use-secrets-BOMoixiw.js → use-secrets-BX9Z-daT.js} +1 -1
  200. package/dist/client/assets/{use-status-sounds-DayrZ7TG.js → use-status-sounds-DL8lqATA.js} +1 -1
  201. package/dist/client/assets/{use-tags-DqEuQ6vZ.js → use-tags-HpOhT-xP.js} +1 -1
  202. package/dist/client/assets/{use-view-mode-Bk25Hg6x.js → use-view-mode-Bq06vK1E.js} +1 -1
  203. package/dist/client/assets/{use-virtual-mcp-CiSjSkCo.js → use-virtual-mcp-BKlkVUBn.js} +1 -1
  204. package/dist/client/assets/useInfiniteQuery-B1VFJBv9.js +1 -0
  205. package/dist/client/assets/{useQueries-D3rnFNlM.js → useQueries-DcSKIvPe.js} +1 -1
  206. package/dist/client/assets/{useRouterState-DDLhvHVC.js → useRouterState-BQfjji-X.js} +1 -1
  207. package/dist/client/assets/useSuspenseInfiniteQuery-19gePOvk.js +1 -0
  208. package/dist/client/assets/{users-153qH5_-.js → users-BBP5TmzE.js} +1 -1
  209. package/dist/client/assets/{variant-calendar-rRxsmTgu.js → variant-calendar-mcbg0du1.js} +1 -1
  210. package/dist/client/assets/{view-mode-toggle-BtnmUoq6.js → view-mode-toggle-BaM0Ryag.js} +1 -1
  211. package/dist/client/index.html +1 -1
  212. package/dist/server/cli.js +1 -1
  213. package/dist/server/server.js +1 -1
  214. package/package.json +1 -1
  215. package/dist/client/assets/index-bM-iCUGb.js +0 -8
  216. package/dist/client/assets/project-app-view-3XgFTSvm.js +0 -1
  217. package/dist/client/assets/record-editor-DJqb0slJ.js +0 -1
  218. package/dist/client/assets/registry-CCTRqEtG.js +0 -2
  219. package/dist/client/assets/store-registry-DJq2Z-1C.js +0 -2
  220. package/dist/client/assets/useInfiniteQuery-CYxhJzgo.js +0 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-0jsu_qzK.js +0 -1
@@ -1 +1 @@
1
- import{c as P,b as F,e as ae,j as n,B as D,t as te,bQ as ee,y as ke,a as Z,w as qe,x as Ne,K as ce,bR as Fe,bS as Be,G as X,m as ge,r as q,n as re,aw as he,v as Ue,bT as He,p as pe,bU as Je,bV as Ke,d as Ge,F as We,f as Ae,u as Ve,J as Qe,aW as Ye,bW as Xe,bX as ye,bY as Ze,bZ as et,S as tt,O as nt,b_ as st}from"./index-BWQ8J_Ql.js";import{A as de}from"./avatar-Bl8FLdrm.js";import{t as _e,a as ot}from"./Users03-DdrNKhEH.js";import{i as it}from"./SearchLg-pvNMPdx7.js";import{i as at,s as rt,a as B,n as lt}from"./Stars02-BteVxWQx.js";import{s as ct}from"./XClose-outHzlfY.js";import{D as dt,q as ut,A as mt}from"./tab-id-CpKaVM9t.js";import{i as K}from"./CheckCircle-DyT8St9I.js";import{i as ft}from"./CpuChip01-BRse3wgD.js";import{i as xe}from"./FilterLines-D6T2TLxw.js";import{i as gt}from"./Monitor01-BbOMT_Bf.js";import{i as G}from"./Zap-7KA5ZNQg.js";import{a as Te,b as Oe,d as Ce,e as Ee,h as ht,c as pt}from"./dialog-BUJ-AcXn.js";import{R as yt}from"./required-auth-layout-CcfxFPTq.js";import{a as be,m as xt,S as bt}from"./use-mcp-client-DxfTC5E_.js";import{c as wt}from"./hooks-FOgIFNPr.js";import{g as St}from"./use-organization-settings-OE3Lr1-V.js";import{u as vt}from"./use-org-sso-BwjPrTQu.js";function jt(t){const e=P.c(49),{orgName:s,orgSlug:a,orgLogo:l,domain:r}=t,i=F();let o;e[0]!==a||e[1]!==i?(o=async()=>{const A=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await A.json();if(!A.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=o):o=e[2];let c;e[3]!==a?(c=A=>{window.location.href=`/${A.slug??a}`},e[3]=a,e[4]=c):c=e[4];let g;e[5]!==i?(g=A=>{te.error(A instanceof Error?A.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=g):g=e[6];let b;e[7]!==o||e[8]!==c||e[9]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[7]=o,e[8]=c,e[9]=g,e[10]=b):b=e[10];const u=ae(b),S=kt;let m;e[11]!==l||e[12]!==s?(m=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(_e,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=s,e[13]=m):m=e[13];let d;e[14]!==s||e[15]!==i?(d=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=d):d=e[16];let h;e[17]!==d?(h=n.jsx("h3",{className:"text-lg font-medium",children:d}),e[17]=d,e[18]=h):h=e[18];let f;e[19]!==r||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=f):f=e[21];let p;e[22]!==f?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=p):p=e[23];let y;e[24]!==h||e[25]!==p?(y=n.jsxs("div",{className:"space-y-2",children:[h,p]}),e[24]=h,e[25]=p,e[26]=y):y=e[26];let x;e[27]!==u?(x=()=>u.mutate(),e[27]=u,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==s||e[31]!==i?(v=u.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=u.isPending,e[30]=s,e[31]=i,e[32]=v):v=e[32];let N;e[33]!==u.isPending||e[34]!==x||e[35]!==v?(N=n.jsx(D,{onClick:x,disabled:u.isPending,children:v}),e[33]=u.isPending,e[34]=x,e[35]=v,e[36]=N):N=e[36];const j=u.isPending;let k;e[37]!==i?(k=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=k):k=e[38];let w;e[39]!==u.isPending||e[40]!==k?(w=n.jsx(D,{variant:"ghost",onClick:S,disabled:j,children:k}),e[39]=u.isPending,e[40]=k,e[41]=w):w=e[41];let _;e[42]!==N||e[43]!==w?(_=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,w]}),e[42]=N,e[43]=w,e[44]=_):_=e[44];let T;return e[45]!==y||e[46]!==_||e[47]!==m?(T=n.jsxs(ee,{children:[m,y,_]}),e[45]=y,e[46]=_,e[47]=m,e[48]=T):T=e[48],T}function kt(){window.location.href="/"}function we(t){const e=P.c(25),{orgSlug:s,orgName:a,reason:l}=t,r=F(),i=Nt,o=l==="not-found",c=o?it:ke;let g;e[0]!==o||e[1]!==r?(g=r(o?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=o,e[1]=r,e[2]=g):g=e[2];const b=g;let u;e[3]!==o||e[4]!==a||e[5]!==s||e[6]!==r?(u=o?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=o,e[4]=a,e[5]=s,e[6]=r,e[7]=u):u=e[7];const S=u;let m;e[8]!==c?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(c,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=c,e[9]=m):m=e[9];let d;e[10]!==b?(d=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[10]=b,e[11]=d):d=e[11];let h;e[12]!==S?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=h):h=e[13];let f;e[14]!==d||e[15]!==h?(f=n.jsxs("div",{className:"space-y-2",children:[d,h]}),e[14]=d,e[15]=h,e[16]=f):f=e[16];let p;e[17]!==r?(p=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=p):p=e[18];let y;e[19]!==p?(y=n.jsx(D,{onClick:i,children:p}),e[19]=p,e[20]=y):y=e[20];let x;return e[21]!==m||e[22]!==f||e[23]!==y?(x=n.jsxs(ee,{children:[m,f,y]}),e[21]=m,e[22]=f,e[23]=y,e[24]=x):x=e[24],x}function Nt(){window.location.href="/"}function At(t){const e=P.c(59),{invitationId:s,orgName:a,orgSlug:l,orgLogo:r}=t,i=F();let o;e[0]!==s?(o=async()=>{const E=await Z.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=o):o=e[1];let c;e[2]!==l?(c=()=>{qe(),window.location.href=`/${l}`},e[2]=l,e[3]=c):c=e[3];let g;e[4]!==i?(g=E=>{te.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=g):g=e[5];let b;e[6]!==o||e[7]!==c||e[8]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[6]=o,e[7]=c,e[8]=g,e[9]=b):b=e[9];const u=ae(b);let S;e[10]!==s?(S=async()=>{const E=await Z.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=S):S=e[11];let m,d;e[12]!==i?(m=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},d=E=>{te.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=m,e[14]=d):(m=e[13],d=e[14]);let h;e[15]!==S||e[16]!==m||e[17]!==d?(h={mutationFn:S,onSuccess:m,onError:d},e[15]=S,e[16]=m,e[17]=d,e[18]=h):h=e[18];const f=ae(h),p=u.isPending||f.isPending;let y;e[19]!==r||e[20]!==a?(y=r?n.jsx(de,{url:r,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]=r,e[20]=a,e[21]=y):y=e[21];let x;e[22]!==a||e[23]!==i?(x=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=x):x=e[24];let v;e[25]!==x?(v=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=v):v=e[26];let N;e[27]!==i?(N=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=N):N=e[28];let j;e[29]!==N?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=j):j=e[30];let k;e[31]!==v||e[32]!==j?(k=n.jsxs("div",{className:"space-y-2",children:[v,j]}),e[31]=v,e[32]=j,e[33]=k):k=e[33];let w;e[34]!==u?(w=()=>u.mutate(),e[34]=u,e[35]=w):w=e[35];let _;e[36]!==u.isPending||e[37]!==i?(_=u.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=u.isPending,e[37]=i,e[38]=_):_=e[38];let T;e[39]!==p||e[40]!==w||e[41]!==_?(T=n.jsx(D,{onClick:w,disabled:p,children:_}),e[39]=p,e[40]=w,e[41]=_,e[42]=T):T=e[42];let A;e[43]!==f?(A=()=>f.mutate(),e[43]=f,e[44]=A):A=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]!==p||e[49]!==A||e[50]!==O?(I=n.jsx(D,{variant:"ghost",onClick:A,disabled:p,children:O}),e[48]=p,e[49]=A,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==T||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[T,I]}),e[52]=T,e[53]=I,e[54]=C):C=e[54];let $;return e[55]!==k||e[56]!==C||e[57]!==y?($=n.jsxs(ee,{children:[y,k,C]}),e[55]=k,e[56]=C,e[57]=y,e[58]=$):$=e[58],$}function _t(t){const e=P.c(23),{orgName:s,orgLogo:a}=t,l=F();let r;e[0]!==a||e[1]!==s?(r=a?n.jsx(de,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let o;e[5]!==i?(o=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=o):o=e[6];let c;e[7]!==s||e[8]!==l?(c=l("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=l,e[9]=c):c=e[9];let g;e[10]!==c?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[10]=c,e[11]=g):g=e[11];let b;e[12]!==o||e[13]!==g?(b=n.jsxs("div",{className:"space-y-2",children:[o,g]}),e[12]=o,e[13]=g,e[14]=b):b=e[14];let u;e[15]!==l?(u=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=u):u=e[16];let S;e[17]!==u?(S=n.jsx(D,{variant:"ghost",onClick:Tt,children:u}),e[17]=u,e[18]=S):S=e[18];let m;return e[19]!==r||e[20]!==b||e[21]!==S?(m=n.jsxs(ee,{children:[r,b,S]}),e[19]=r,e[20]=b,e[21]=S,e[22]=m):m=e[22],m}function Tt(){window.location.href="/"}function Ot(t){const e=P.c(45),{orgName:s,orgSlug:a,orgLogo:l,domain:r}=t,i=F();let o;e[0]!==a?(o=async()=>{const T=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await T.json();if(!T.ok||!A.success)throw new Error(A.error??"Failed to request access");return A},e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=Et,e[2]=c):c=e[2];let g;e[3]!==i?(g=T=>{te.error(T instanceof Error?T.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=g):g=e[4];let b;e[5]!==o||e[6]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[5]=o,e[6]=g,e[7]=b):b=e[7];const u=ae(b);let S;e[8]!==l||e[9]!==s?(S=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(_e,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=s,e[10]=S):S=e[10];let m;e[11]!==s||e[12]!==i?(m=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=m):m=e[13];let d;e[14]!==m?(d=n.jsx("h3",{className:"text-lg font-medium",children:m}),e[14]=m,e[15]=d):d=e[15];let h;e[16]!==r||e[17]!==i?(h=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=h):h=e[18];let f;e[19]!==h?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:h}),e[19]=h,e[20]=f):f=e[20];let p;e[21]!==d||e[22]!==f?(p=n.jsxs("div",{className:"space-y-2",children:[d,f]}),e[21]=d,e[22]=f,e[23]=p):p=e[23];let y;e[24]!==u?(y=()=>u.mutate(),e[24]=u,e[25]=y):y=e[25];let x;e[26]!==u.isPending||e[27]!==i?(x=u.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=u.isPending,e[27]=i,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==y||e[31]!==x?(v=n.jsx(D,{onClick:y,disabled:u.isPending,children:x}),e[29]=u.isPending,e[30]=y,e[31]=x,e[32]=v):v=e[32];const N=u.isPending;let j;e[33]!==i?(j=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=j):j=e[34];let k;e[35]!==u.isPending||e[36]!==j?(k=n.jsx(D,{variant:"ghost",onClick:Ct,disabled:N,children:j}),e[35]=u.isPending,e[36]=j,e[37]=k):k=e[37];let w;e[38]!==v||e[39]!==k?(w=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,k]}),e[38]=v,e[39]=k,e[40]=w):w=e[40];let _;return e[41]!==p||e[42]!==w||e[43]!==S?(_=n.jsxs(ee,{children:[S,p,w]}),e[41]=p,e[42]=w,e[43]=S,e[44]=_):_=e[44],_}function Ct(){window.location.href="/"}function Et(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Lt(t){const e=P.c(7);let s;e[0]!==t?(s=ce.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==a?(l={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=l):l=e[6],Ne(l)}function It({orgSlug:t}){const{data:e}=Lt(t);if(e.status!=="member"){Fe()?.org===t&&Be();const s=localStorage.getItem(X.lastOrgSlug())===t;if(s&&localStorage.removeItem(X.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(we,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(At,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(jt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Ot,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(_t,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(we,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Le(t){const e=P.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:l,title:r,description:i,icon:o,children:c,footerLeading:g,actions:b,onDismiss:u,tone:S}=t,m=S===void 0?"neutral":S,d=g||b;let h;e[0]!==m?(h=m==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=m,e[1]=h):h=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 p;e[3]!==a||e[4]!==u?(p=n.jsx(D,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:u,children:f}),e[3]=a,e[4]=u,e[5]=p):p=e[5];const y=o&&"flex items-start gap-3",x=c&&"pb-3";let v;e[6]!==y||e[7]!==x?(v=ge("p-4 pr-11",y,x),e[6]=y,e[7]=x,e[8]=v):v=e[8];let N;e[9]!==o?(N=o&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:o}),e[9]=o,e[10]=N):N=e[10];let j;e[11]!==l?(j=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=j):j=e[12];let k;e[13]!==r?(k=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=k):k=e[14];let w;e[15]!==i?(w=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=w):w=e[16];let _;e[17]!==k||e[18]!==w||e[19]!==j?(_=n.jsxs("div",{children:[j,k,w]}),e[17]=k,e[18]=w,e[19]=j,e[20]=_):_=e[20];let T;e[21]!==c?(T=c&&n.jsx("div",{className:"mt-3",children:c}),e[21]=c,e[22]=T):T=e[22];let A;e[23]!==_||e[24]!==T?(A=n.jsxs("div",{className:"min-w-0 flex-1",children:[_,T]}),e[23]=_,e[24]=T,e[25]=A):A=e[25];let O;e[26]!==A||e[27]!==v||e[28]!==N?(O=n.jsxs("div",{className:v,children:[N,A]}),e[26]=A,e[27]=v,e[28]=N,e[29]=O):O=e[29];let I;e[30]!==b||e[31]!==g||e[32]!==d||e[33]!==m?(I=d&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",m==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:g}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:b})]}),e[30]=b,e[31]=g,e[32]=d,e[33]=m,e[34]=I):I=e[34];let C;return e[35]!==s||e[36]!==O||e[37]!==I||e[38]!==h||e[39]!==p||e[40]!==m?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":m,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:[h,p,O,I]}),e[35]=s,e[36]=O,e[37]=I,e[38]=h,e[39]=p,e[40]=m,e[41]=C):C=e[41],C}const Pt=[{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:G,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:B,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:ft,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:gt,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:B,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:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon: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:B,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:B,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:xe,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:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon: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:B,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:xe,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:B,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."}]}],Ie=Pt,le="studio.release-feed.v1",ue=new Set;let W="",V={},me=!1;function Dt(){if(me)return W||"{}";try{return localStorage.getItem(le)??"{}"}catch{return W||"{}"}}function Pe(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Se(){const t=Dt();return t!==W&&(W=t,V=Pe(t)),V}function $t(t){ue.add(t);const e=s=>{if(!(s.key!==le&&s.key!==null)){try{const a=localStorage.getItem(le)??"{}",r={...Pe(a),...V};V=r,W=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function zt(t){V=t,W=JSON.stringify(t);try{localStorage.setItem(le,W),me=!1}catch{me=!0}ue.forEach(e=>e())}function Rt(){const t=P.c(7),e=q.useSyncExternalStore($t,Se,Se);let s;t[0]!==e?(s=c=>!!e[c],t[0]=e,t[1]=s):s=t[1];const a=s,l=Mt;let r;t[2]!==e?(r=Ie.reduce((c,g)=>e[g.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let o;return t[4]!==a||t[5]!==i?(o={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=o):o=t[6],o}function Mt(t){V[t]||zt({...V,[t]:{seenAt:new Date().toISOString()}})}const qt=720*60*60*1e3,Ft=10080*60*1e3;function Bt(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function Ut(t){const e=Ie[0];if(!e)return null;const s=Bt(e.date),a=t-s;return a<0||a>qt?null:e}function Ht(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 Jt(t,e){const s=Ht(t);return s===null?!1:e-s>=Ft}function Kt(){const t=P.c(41),e=F(),{data:s}=Z.useSession(),{isSeen:a,markSeen:l}=Rt(),[r,i]=q.useState(!1);let o,c,g;if(t[0]!==a||t[1]!==s?.user?.createdAt){g=Symbol.for("react.early_return_sentinel");e:{const j=Date.now();if(o=Ut(j),!o){g=null;break e}if(!Jt(s?.user?.createdAt,j)){g=null;break e}c=a(o.id)}t[0]=a,t[1]=s?.user?.createdAt,t[2]=o,t[3]=c,t[4]=g}else o=t[2],c=t[3],g=t[4];if(g!==Symbol.for("react.early_return_sentinel"))return g;if(c)return null;let b;t[5]!==e?(b=e("announcements.release.ariaLabel"),t[5]=e,t[6]=b):b=t[6];let u;t[7]!==e?(u=e("announcements.release.dismiss"),t[7]=e,t[8]=u):u=t[8];const S=o.eyebrow,m=o.title;let d;t[9]!==o.id||t[10]!==l?(d=()=>l(o.id),t[9]=o.id,t[10]=l,t[11]=d):d=t[11];let h;t[12]!==o.id||t[13]!==o.learnMoreHref||t[14]!==l||t[15]!==e?(h=o.learnMoreHref?n.jsx("a",{href:o.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(o.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=o.id,t[13]=o.learnMoreHref,t[14]=l,t[15]=e,t[16]=h):h=t[16];let f;t[17]!==o.cta||t[18]!==o.id||t[19]!==l?(f=o.cta?"href"in o.cta?n.jsx(D,{asChild:!0,size:"sm",onClick:()=>l(o.id),children:n.jsx("a",{href:o.cta.href,children:o.cta.label})}):n.jsx(D,{size:"sm",onClick:()=>i(!0),children:o.cta.label}):null,t[17]=o.cta,t[18]=o.id,t[19]=l,t[20]=f):f=t[20];let p;t[21]!==o.bullets?(p=o.bullets.map(Gt),t[21]=o.bullets,t[22]=p):p=t[22];let y;t[23]!==p?(y=n.jsx("ul",{className:"flex flex-col gap-3",children:p}),t[23]=p,t[24]=y):y=t[24];let x;t[25]!==o.id||t[26]!==l?(x=j=>{i(j),j||l(o.id)},t[25]=o.id,t[26]=l,t[27]=x):x=t[27];let v;t[28]!==r||t[29]!==x?(v=n.jsx(dt,{open:r,onOpenChange:x}),t[28]=r,t[29]=x,t[30]=v):v=t[30];let N;return t[31]!==o.eyebrow||t[32]!==o.title||t[33]!==y||t[34]!==v||t[35]!==b||t[36]!==u||t[37]!==d||t[38]!==h||t[39]!==f?(N=n.jsxs(Le,{ariaLabel:b,dismissLabel:u,eyebrow:S,title:m,onDismiss:d,footerLeading:h,actions:f,children:[y,v]}),t[31]=o.eyebrow,t[32]=o.title,t[33]=y,t[34]=v,t[35]=b,t[36]=u,t[37]=d,t[38]=h,t[39]=f,t[40]=N):N=t[40],N}function Gt(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),H=De?"⌘":"Ctrl",R={keyboardShortcuts:{keys:[H,"K"],description:"Keyboard shortcuts"},back:{keys:[H,"["],description:"Back to previous"},focusChatInput:{keys:[H,"L"],description:"Focus chat input"},saveAndFormat:{keys:[H,"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:[H,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[H,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",H,"S"],description:"New task"},toggleDaemon:{keys:[H,"D"],description:"Toggle daemon logs"}},Wt=[{label:"General",shortcuts:[R.keyboardShortcuts,R.back,R.newTask,R.toggleDaemon]},{label:"Editor",shortcuts:[R.saveAndFormat]},{label:"Chat",shortcuts:[R.focusChatInput,R.togglePlanMode,R.sendMessage,R.newLine]},{label:"Questions",shortcuts:[R.selectOption]},{label:"Monitoring",shortcuts:[R.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Vt(t){const e=P.c(11),{open:s,onOpenChange:a}=t,l=F();let r;e[0]!==l?(r=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(Te,{children:n.jsx(Oe,{children:r})}),e[2]=r,e[3]=i):i=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-4",children:Wt.map(Qt)}),e[4]=o):o=e[4];let c;e[5]!==i?(c=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,o]}),e[5]=i,e[6]=c):c=e[6];let g;return e[7]!==a||e[8]!==s||e[9]!==c?(g=n.jsx(Ee,{open:s,onOpenChange:a,children:c}),e[7]=a,e[8]=s,e[9]=c,e[10]=g):g=e[10],g}function Qt(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(Yt)})]},t.label)}function Yt(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(Xt)})]},t.description)}function Xt(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 Zt=300*1e3,en=2;function tn(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function nn(t,e){return t.count>=en&&t.version!==null&&t.version!==e}function sn(){const t=P.c(31),e=F();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={queryKey:ce.appVersionCheck(),queryFn:an,refetchInterval:Zt,refetchIntervalInBackground:!0,staleTime:0},t[0]=s):s=t[0];const{data:a,dataUpdatedAt:l}=re(s),[r,i]=q.useState(0);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={version:null,count:0},t[1]=o):o=t[1];const[c,g]=q.useState(o);l!==r&&(i(l),g(w=>tn(w,a,"4.150.2")));const[b,u]=q.useState(null);if(!nn(c,b))return null;let S;t[2]!==e?(S=e("announcements.version.ariaLabel"),t[2]=e,t[3]=S):S=t[3];let m;t[4]!==e?(m=e("announcements.version.dismiss"),t[4]=e,t[5]=m):m=t[5];let d;t[6]!==e?(d=e("announcements.version.eyebrow"),t[6]=e,t[7]=d):d=t[7];let h;t[8]!==e?(h=e("announcements.version.title"),t[8]=e,t[9]=h):h=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let p;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(he,{size:16}),t[12]=p):p=t[12];let y;t[13]!==c.version?(y=()=>u(c.version),t[13]=c.version,t[14]=y):y=t[14];let x;t[15]!==e?(x=e("announcements.version.currentSession",{version:"4.150.2"}),t[15]=e,t[16]=x):x=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let N;t[19]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(he,{size:14}),t[19]=N):N=t[19];let j;t[20]!==v?(j=n.jsxs(D,{size:"sm",onClick:on,children:[v,N]}),t[20]=v,t[21]=j):j=t[21];let k;return t[22]!==j||t[23]!==S||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==f||t[28]!==y||t[29]!==x?(k=n.jsx(Le,{ariaLabel:S,dismissLabel:m,eyebrow:d,title:h,description:f,icon:p,tone:"system",onDismiss:y,footerLeading:x,actions:j}),t[22]=j,t[23]=S,t[24]=m,t[25]=d,t[26]=h,t[27]=f,t[28]=y,t[29]=x,t[30]=k):k=t[30],k}function on(){return window.location.reload()}async function an(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function rn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const ln=Date.parse("2026-07-21T00:00:00Z"),je=t=>rn(X.ptBrAnnouncementSeen(t));function cn(){const t=P.c(35),e=F(),[s,a]=Ue(),{data:l,isPending:r}=Z.useSession(),i=l?.user,o=i?.id,c=i?.createdAt,g=c!=null&&new Date(c).getTime()<ln,b=He()==="pt-BR",u=!r&&!!o&&g&&b&&s.language==="en"&&!je(o).has(),[S,m]=q.useState(!1),[d,h]=q.useState(!1);!S&&!r&&(m(!0),u&&o&&(je(o).mark(),a(un),h(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=M=>{pe("pt_br_auto_switch_closed",{action:M}),h(!1)},t[0]=f):f=t[0];const p=f;let y;t[1]!==a?(y=()=>{a(dn),p("switch-back")},t[1]=a,t[2]=y):y=t[2];const x=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=M=>!M&&p("dismiss"),t[3]=v):v=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let j;t[5]!==e?(j=e("announcements.ptBr.title"),t[5]=e,t[6]=j):j=t[6];let k;t[7]!==j?(k=n.jsx(Oe,{children:j}),t[7]=j,t[8]=k):k=t[8];let w;t[9]!==e?(w=e("announcements.ptBr.description"),t[9]=e,t[10]=w):w=t[10];let _;t[11]!==w?(_=n.jsx(ht,{children:w}),t[11]=w,t[12]=_):_=t[12];let T;t[13]!==k||t[14]!==_?(T=n.jsxs(Te,{children:[k,_]}),t[13]=k,t[14]=_,t[15]=T):T=t[15];let A;t[16]!==e?(A=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=A):A=t[17];let O;t[18]!==x||t[19]!==A?(O=n.jsx(D,{variant:"outline",onClick:x,children:A}),t[18]=x,t[19]=A,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p("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 $;t[24]!==C?($=n.jsx(D,{onClick:I,children:C}),t[24]=C,t[25]=$):$=t[25];let E;t[26]!==O||t[27]!==$?(E=n.jsxs(pt,{children:[O,$]}),t[26]=O,t[27]=$,t[28]=E):E=t[28];let J;t[29]!==E||t[30]!==T?(J=n.jsxs(Ce,{className:"sm:max-w-md",children:[N,T,E]}),t[29]=E,t[30]=T,t[31]=J):J=t[31];let U;return t[32]!==d||t[33]!==J?(U=n.jsx(Ee,{open:d,onOpenChange:v,children:J}),t[32]=d,t[33]=J,t[34]=U):U=t[34],U}function dn(t){return{...t,language:"en"}}function un(t){return{...t,language:"pt-BR"}}function mn({activeOrg:t}){return t&&(Je(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function fn(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:l,opts:r,autosendValue:i}=t,o={};s?o.virtualmcpid=s:e.virtualmcpid&&(o.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,b=(s??c)!==c;let u;if(r?.main)o.main=r.main;else if(l)l.main!==void 0&&(o.main=l.main),l.sidepanel!==void 0&&(u=l.sidepanel);else if(!b){const S=e.main;S&&typeof S=="string"&&!ut(S)&&(o.main=S)}return u!==void 0&&(o.sidepanel=u),r?.autosend&&(o.autosend=i),o}const $e="studio:thread-layout:v1",gn=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 hn(t,e,s,a=gn){const l=t.filter(([r])=>r!==e);for(l.push([e,ze(s)]);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(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Re(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function pn(t,e){t&&Re(hn(fe(),t,e))}function yn(t){if(!t)return null;const e=fe().find(([s])=>s===t);return e?ze(e[1]):null}function Un(t){if(!t)return;const e=fe(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Re(s)}function Me(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 Hn(t){const e=P.c(10);let s;e[0]!==t?(s=Me(t),e[0]=t,e[1]=s):s=e[1];const a=re(s);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==r?(i={isLoading:a.isLoading,prompts:l,tiles:r},e[6]=a.isLoading,e[7]=l,e[8]=r,e[9]=i):i=e[9],i}function xn(t){const e=P.c(31),{orgSlug:s,orgName:a,domain:l}=t,r=F();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const o=i,c=bn;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=g):g=e[2];let b;e[3]!==r?(b=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=b):b=e[4];let u;e[5]!==b?(u=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[5]=b,e[6]=u):u=e[6];let S;e[7]!==l||e[8]!==a||e[9]!==r?(S=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${r("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=r,e[10]=S):S=e[10];let m;e[11]!==S?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[11]=S,e[12]=m):m=e[12];let d;e[13]!==u||e[14]!==m?(d=n.jsxs("div",{className:"space-y-2",children:[u,m]}),e[13]=u,e[14]=m,e[15]=d):d=e[15];let h;e[16]!==r?(h=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=h):h=e[17];let f;e[18]!==o||e[19]!==h?(f=n.jsx(D,{onClick:o,children:h}),e[18]=o,e[19]=h,e[20]=f):f=e[20];let p;e[21]!==r?(p=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=p):p=e[22];let y;e[23]!==p?(y=n.jsx(D,{variant:"ghost",onClick:c,children:p}),e[23]=p,e[24]=y):y=e[24];let x;e[25]!==y||e[26]!==f?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=x):x=e[27];let v;return e[28]!==x||e[29]!==d?(v=n.jsxs(ee,{children:[g,d,x]}),e[28]=x,e[29]=d,e[30]=v):v=e[30],v}function bn(){window.location.href="/"}function wn(t){const e=P.c(8),{org:s,children:a}=t,r=St(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=i):i=e[3];const o=i;let c;return e[4]!==a||e[5]!==s||e[6]!==o?(c=n.jsx(st,{org:s,project:o,children:a}),e[4]=a,e[5]=s,e[6]=o,e[7]=c):c=e[7],c}function Sn(){const t=Ge(),e=wt(),{org:s}=We(),a=Ae({strict:!1}),l=Ve({strict:!1}),r=a.org??"",i=a.taskId??"",o=(m,d,h=!0)=>t({to:"/$org/$taskId",params:{org:r,taskId:m},search:d,replace:h}),c=(m,d=!0)=>o(i,m,d),g=m=>c(d=>({...d,sidepanel:m})),b=(m,d,h)=>{const f=!!i&&i===m;i&&!f&&pn(i,{main:l.main,sidepanel:l.sidepanel});const p=f?null:yn(m),y=be(s.id).id;return o(m,x=>fn({prev:x,virtualMcpId:d,decopilotId:y,savedLayout:p,opts:h,autosendValue:mt}),!1)};return{openSidePanel:g,setTaskId:b,createNewTask:async(m,d)=>{const h=crypto.randomUUID(),f=m??l.virtualmcpid??be(s.id).id;try{await e?.create({id:h,virtual_mcp_id:f,...d?{branch:d}:{}})}catch{}b(h,f)},openTab:m=>o(i||crypto.randomUUID(),d=>({...d,main:m}))}}function vn(){const t=P.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:r}=Ae(l),[i,o]=q.useState(!1),c=Ye(),g=a??"";let b;t[2]!==g?(b=Me(g),t[2]=g,t[3]=b):b=t[3];const u=!!a&&!r;let S;t[4]!==b||t[5]!==u?(S={...b,enabled:u},t[4]=b,t[5]=u,t[6]=S):S=t[6],re(S);const{data:m}=Z.useSession(),d=m?.user?.id;let h;t[7]!==a||t[8]!==d?(h=a&&d?Xe(d,a):null,t[7]=a,t[8]=d,t[9]=h):h=t[9];const f=h;let p,y;t[10]!==c?(p=()=>{const L=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),o(!0);return}ve(z)&&z.code==="BracketLeft"&&c.history.canGoBack()&&(z.preventDefault(),c.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},y=[c],t[10]=c,t[11]=p,t[12]=y):(p=t[11],y=t[12]),q.useEffect(p,y);let x;t[13]!==a?(x=ce.activeOrganization(a),t[13]=a,t[14]=x):x=t[14];let v;t[15]!==a||t[16]!==d?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(jn),z=ye(L);return L&&!z&&localStorage.setItem(X.lastOrgSlug(),a),d&&L&&et(d,a,L),L},t[15]=a,t[16]=d,t[17]=v):v=t[17];const N=f?f.data:void 0,j=f?.updatedAt;let k;t[18]!==v||t[19]!==N||t[20]!==j||t[21]!==x?(k={queryKey:x,queryFn:v,initialData:N,initialDataUpdatedAt:j,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=j,t[21]=x,t[22]=k):k=t[22];const{data:w}=Ne(k),_=w?.id,T=w?.slug,{data:A}=vt(_,T),O=_??"",I=T??"";let C;t[23]!==O||t[24]!==I?(C=xt({connectionId:bt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const $=!!_&&!!T;let E;if(t[26]!==C||t[27]!==$?(E={...C,enabled:$},t[26]=C,t[27]=$,t[28]=E):E=t[28],re(E),!w){let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(tt,{}),t[29]=L):L=t[29];let z;return t[30]!==a?(z=n.jsx(q.Suspense,{fallback:L,children:n.jsx(It,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(ye(w)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let L;return t[32]!==w.name?(L=n.jsx(Ze,{orgName:w.name}),t[32]=w.name,t[33]=L):L=t[33],L}if(A?.ssoRequired&&!A.authenticated){let L;return t[34]!==w.id||t[35]!==w.name||t[36]!==w.slug||t[37]!==A.domain?(L=n.jsx(xn,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:A.domain}),t[34]=w.id,t[35]=w.name,t[36]=w.slug,t[37]=A.domain,t[38]=L):L=t[38],L}const U=w.logo??null;let M;t[39]!==w||t[40]!==U?(M={...w,logo:U},t[39]=w,t[40]=U,t[41]=M):M=t[41];let Q;t[42]!==w?(Q=n.jsx(mn,{activeOrg:w}),t[42]=w,t[43]=Q):Q=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(Kt,{}),n.jsx(sn,{})]}),t[45]=se):se=t[45];let Y;t[46]!==i?(Y=n.jsx(Vt,{open:i,onOpenChange:o}),t[46]=i,t[47]=Y):Y=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(cn,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==M||t[50]!==Q||t[51]!==Y?(ie=n.jsxs(wn,{org:M,children:[Q,ne,se,Y,oe]}),t[49]=M,t[50]=Q,t[51]=Y,t[52]=ie):ie=t[52],ie}function jn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function kn(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(yt,{children:n.jsx(vn,{})}),t[0]=e):e=t[0],e}const Jn=Object.freeze(Object.defineProperty({__proto__:null,default:kn,usePanelActions:Sn},Symbol.toStringTag,{value:"Module"}));export{R as K,Hn as a,Un as f,ve as i,rn as m,Jn as s,Sn as u};
1
+ import{c as P,b as F,e as ae,j as n,B as D,t as te,bQ as ee,y as ke,a as Z,w as qe,x as Ne,K as ce,bR as Fe,bS as Be,G as X,m as ge,r as q,n as re,aw as he,v as Ue,bT as He,p as pe,bU as Je,bV as Ke,d as Ge,F as We,f as Ae,u as Ve,J as Qe,aW as Ye,bW as Xe,bX as ye,bY as Ze,bZ as et,S as tt,O as nt,b_ as st}from"./index-BH_FlvCl.js";import{A as de}from"./avatar-2jBZ0oLe.js";import{t as _e,a as ot}from"./Users03-Brr-YBon.js";import{i as it}from"./SearchLg-CDsIaigY.js";import{i as at,s as rt,a as B,n as lt}from"./Stars02-Bj8ktNiu.js";import{s as ct}from"./XClose-BeeXU30N.js";import{D as dt,q as ut,A as mt}from"./tab-id-DTfezOr5.js";import{i as K}from"./CheckCircle-B2TYFYU2.js";import{i as ft}from"./CpuChip01-CKGxncDz.js";import{i as xe}from"./FilterLines-Gvs8cXY9.js";import{i as gt}from"./Monitor01-CFzyQiRg.js";import{i as G}from"./Zap-DTi7UEaq.js";import{a as Te,b as Oe,d as Ce,e as Ee,h as ht,c as pt}from"./dialog-k8IF67S5.js";import{R as yt}from"./required-auth-layout-CUjsq5ga.js";import{a as be,m as xt,S as bt}from"./use-mcp-client-epZZ6uX_.js";import{c as wt}from"./hooks-Cqm3ievW.js";import{g as St}from"./use-organization-settings-Cs2jBFh8.js";import{u as vt}from"./use-org-sso-DZn58QZw.js";function jt(t){const e=P.c(49),{orgName:s,orgSlug:a,orgLogo:l,domain:r}=t,i=F();let o;e[0]!==a||e[1]!==i?(o=async()=>{const A=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await A.json();if(!A.ok||!O.success)throw new Error(O.error??i("common.autoDomainJoinScreen.joinError"));return O},e[0]=a,e[1]=i,e[2]=o):o=e[2];let c;e[3]!==a?(c=A=>{window.location.href=`/${A.slug??a}`},e[3]=a,e[4]=c):c=e[4];let g;e[5]!==i?(g=A=>{te.error(A instanceof Error?A.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=g):g=e[6];let b;e[7]!==o||e[8]!==c||e[9]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[7]=o,e[8]=c,e[9]=g,e[10]=b):b=e[10];const u=ae(b),S=kt;let m;e[11]!==l||e[12]!==s?(m=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(_e,{className:"h-6 w-6 text-primary"})}),e[11]=l,e[12]=s,e[13]=m):m=e[13];let d;e[14]!==s||e[15]!==i?(d=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=d):d=e[16];let h;e[17]!==d?(h=n.jsx("h3",{className:"text-lg font-medium",children:d}),e[17]=d,e[18]=h):h=e[18];let f;e[19]!==r||e[20]!==i?(f=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=f):f=e[21];let p;e[22]!==f?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[22]=f,e[23]=p):p=e[23];let y;e[24]!==h||e[25]!==p?(y=n.jsxs("div",{className:"space-y-2",children:[h,p]}),e[24]=h,e[25]=p,e[26]=y):y=e[26];let x;e[27]!==u?(x=()=>u.mutate(),e[27]=u,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==s||e[31]!==i?(v=u.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=u.isPending,e[30]=s,e[31]=i,e[32]=v):v=e[32];let N;e[33]!==u.isPending||e[34]!==x||e[35]!==v?(N=n.jsx(D,{onClick:x,disabled:u.isPending,children:v}),e[33]=u.isPending,e[34]=x,e[35]=v,e[36]=N):N=e[36];const j=u.isPending;let k;e[37]!==i?(k=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=k):k=e[38];let w;e[39]!==u.isPending||e[40]!==k?(w=n.jsx(D,{variant:"ghost",onClick:S,disabled:j,children:k}),e[39]=u.isPending,e[40]=k,e[41]=w):w=e[41];let _;e[42]!==N||e[43]!==w?(_=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,w]}),e[42]=N,e[43]=w,e[44]=_):_=e[44];let T;return e[45]!==y||e[46]!==_||e[47]!==m?(T=n.jsxs(ee,{children:[m,y,_]}),e[45]=y,e[46]=_,e[47]=m,e[48]=T):T=e[48],T}function kt(){window.location.href="/"}function we(t){const e=P.c(25),{orgSlug:s,orgName:a,reason:l}=t,r=F(),i=Nt,o=l==="not-found",c=o?it:ke;let g;e[0]!==o||e[1]!==r?(g=r(o?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=o,e[1]=r,e[2]=g):g=e[2];const b=g;let u;e[3]!==o||e[4]!==a||e[5]!==s||e[6]!==r?(u=o?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=o,e[4]=a,e[5]=s,e[6]=r,e[7]=u):u=e[7];const S=u;let m;e[8]!==c?(m=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(c,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=c,e[9]=m):m=e[9];let d;e[10]!==b?(d=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[10]=b,e[11]=d):d=e[11];let h;e[12]!==S?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[12]=S,e[13]=h):h=e[13];let f;e[14]!==d||e[15]!==h?(f=n.jsxs("div",{className:"space-y-2",children:[d,h]}),e[14]=d,e[15]=h,e[16]=f):f=e[16];let p;e[17]!==r?(p=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=p):p=e[18];let y;e[19]!==p?(y=n.jsx(D,{onClick:i,children:p}),e[19]=p,e[20]=y):y=e[20];let x;return e[21]!==m||e[22]!==f||e[23]!==y?(x=n.jsxs(ee,{children:[m,f,y]}),e[21]=m,e[22]=f,e[23]=y,e[24]=x):x=e[24],x}function Nt(){window.location.href="/"}function At(t){const e=P.c(59),{invitationId:s,orgName:a,orgSlug:l,orgLogo:r}=t,i=F();let o;e[0]!==s?(o=async()=>{const E=await Z.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=o):o=e[1];let c;e[2]!==l?(c=()=>{qe(),window.location.href=`/${l}`},e[2]=l,e[3]=c):c=e[3];let g;e[4]!==i?(g=E=>{te.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=g):g=e[5];let b;e[6]!==o||e[7]!==c||e[8]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[6]=o,e[7]=c,e[8]=g,e[9]=b):b=e[9];const u=ae(b);let S;e[10]!==s?(S=async()=>{const E=await Z.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=S):S=e[11];let m,d;e[12]!==i?(m=()=>{te.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},d=E=>{te.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=m,e[14]=d):(m=e[13],d=e[14]);let h;e[15]!==S||e[16]!==m||e[17]!==d?(h={mutationFn:S,onSuccess:m,onError:d},e[15]=S,e[16]=m,e[17]=d,e[18]=h):h=e[18];const f=ae(h),p=u.isPending||f.isPending;let y;e[19]!==r||e[20]!==a?(y=r?n.jsx(de,{url:r,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]=r,e[20]=a,e[21]=y):y=e[21];let x;e[22]!==a||e[23]!==i?(x=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=x):x=e[24];let v;e[25]!==x?(v=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=v):v=e[26];let N;e[27]!==i?(N=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=N):N=e[28];let j;e[29]!==N?(j=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=j):j=e[30];let k;e[31]!==v||e[32]!==j?(k=n.jsxs("div",{className:"space-y-2",children:[v,j]}),e[31]=v,e[32]=j,e[33]=k):k=e[33];let w;e[34]!==u?(w=()=>u.mutate(),e[34]=u,e[35]=w):w=e[35];let _;e[36]!==u.isPending||e[37]!==i?(_=u.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=u.isPending,e[37]=i,e[38]=_):_=e[38];let T;e[39]!==p||e[40]!==w||e[41]!==_?(T=n.jsx(D,{onClick:w,disabled:p,children:_}),e[39]=p,e[40]=w,e[41]=_,e[42]=T):T=e[42];let A;e[43]!==f?(A=()=>f.mutate(),e[43]=f,e[44]=A):A=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]!==p||e[49]!==A||e[50]!==O?(I=n.jsx(D,{variant:"ghost",onClick:A,disabled:p,children:O}),e[48]=p,e[49]=A,e[50]=O,e[51]=I):I=e[51];let C;e[52]!==T||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[T,I]}),e[52]=T,e[53]=I,e[54]=C):C=e[54];let $;return e[55]!==k||e[56]!==C||e[57]!==y?($=n.jsxs(ee,{children:[y,k,C]}),e[55]=k,e[56]=C,e[57]=y,e[58]=$):$=e[58],$}function _t(t){const e=P.c(23),{orgName:s,orgLogo:a}=t,l=F();let r;e[0]!==a||e[1]!==s?(r=a?n.jsx(de,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(rt,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==l?(i=l("common.requestPendingScreen.title"),e[3]=l,e[4]=i):i=e[4];let o;e[5]!==i?(o=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=o):o=e[6];let c;e[7]!==s||e[8]!==l?(c=l("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=l,e[9]=c):c=e[9];let g;e[10]!==c?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[10]=c,e[11]=g):g=e[11];let b;e[12]!==o||e[13]!==g?(b=n.jsxs("div",{className:"space-y-2",children:[o,g]}),e[12]=o,e[13]=g,e[14]=b):b=e[14];let u;e[15]!==l?(u=l("common.requestPendingScreen.goHome"),e[15]=l,e[16]=u):u=e[16];let S;e[17]!==u?(S=n.jsx(D,{variant:"ghost",onClick:Tt,children:u}),e[17]=u,e[18]=S):S=e[18];let m;return e[19]!==r||e[20]!==b||e[21]!==S?(m=n.jsxs(ee,{children:[r,b,S]}),e[19]=r,e[20]=b,e[21]=S,e[22]=m):m=e[22],m}function Tt(){window.location.href="/"}function Ot(t){const e=P.c(45),{orgName:s,orgSlug:a,orgLogo:l,domain:r}=t,i=F();let o;e[0]!==a?(o=async()=>{const T=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await T.json();if(!T.ok||!A.success)throw new Error(A.error??"Failed to request access");return A},e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=Et,e[2]=c):c=e[2];let g;e[3]!==i?(g=T=>{te.error(T instanceof Error?T.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=g):g=e[4];let b;e[5]!==o||e[6]!==g?(b={mutationFn:o,onSuccess:c,onError:g},e[5]=o,e[6]=g,e[7]=b):b=e[7];const u=ae(b);let S;e[8]!==l||e[9]!==s?(S=l?n.jsx(de,{url:l,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(_e,{className:"h-6 w-6 text-primary"})}),e[8]=l,e[9]=s,e[10]=S):S=e[10];let m;e[11]!==s||e[12]!==i?(m=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=m):m=e[13];let d;e[14]!==m?(d=n.jsx("h3",{className:"text-lg font-medium",children:m}),e[14]=m,e[15]=d):d=e[15];let h;e[16]!==r||e[17]!==i?(h=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=h):h=e[18];let f;e[19]!==h?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:h}),e[19]=h,e[20]=f):f=e[20];let p;e[21]!==d||e[22]!==f?(p=n.jsxs("div",{className:"space-y-2",children:[d,f]}),e[21]=d,e[22]=f,e[23]=p):p=e[23];let y;e[24]!==u?(y=()=>u.mutate(),e[24]=u,e[25]=y):y=e[25];let x;e[26]!==u.isPending||e[27]!==i?(x=u.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=u.isPending,e[27]=i,e[28]=x):x=e[28];let v;e[29]!==u.isPending||e[30]!==y||e[31]!==x?(v=n.jsx(D,{onClick:y,disabled:u.isPending,children:x}),e[29]=u.isPending,e[30]=y,e[31]=x,e[32]=v):v=e[32];const N=u.isPending;let j;e[33]!==i?(j=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=j):j=e[34];let k;e[35]!==u.isPending||e[36]!==j?(k=n.jsx(D,{variant:"ghost",onClick:Ct,disabled:N,children:j}),e[35]=u.isPending,e[36]=j,e[37]=k):k=e[37];let w;e[38]!==v||e[39]!==k?(w=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,k]}),e[38]=v,e[39]=k,e[40]=w):w=e[40];let _;return e[41]!==p||e[42]!==w||e[43]!==S?(_=n.jsxs(ee,{children:[S,p,w]}),e[41]=p,e[42]=w,e[43]=S,e[44]=_):_=e[44],_}function Ct(){window.location.href="/"}function Et(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Lt(t){const e=P.c(7);let s;e[0]!==t?(s=ce.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==a?(l={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=l):l=e[6],Ne(l)}function It({orgSlug:t}){const{data:e}=Lt(t);if(e.status!=="member"){Fe()?.org===t&&Be();const s=localStorage.getItem(X.lastOrgSlug())===t;if(s&&localStorage.removeItem(X.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(we,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(At,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(jt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Ot,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(_t,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(we,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Le(t){const e=P.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:l,title:r,description:i,icon:o,children:c,footerLeading:g,actions:b,onDismiss:u,tone:S}=t,m=S===void 0?"neutral":S,d=g||b;let h;e[0]!==m?(h=m==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=m,e[1]=h):h=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 p;e[3]!==a||e[4]!==u?(p=n.jsx(D,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:u,children:f}),e[3]=a,e[4]=u,e[5]=p):p=e[5];const y=o&&"flex items-start gap-3",x=c&&"pb-3";let v;e[6]!==y||e[7]!==x?(v=ge("p-4 pr-11",y,x),e[6]=y,e[7]=x,e[8]=v):v=e[8];let N;e[9]!==o?(N=o&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:o}),e[9]=o,e[10]=N):N=e[10];let j;e[11]!==l?(j=l&&n.jsx("p",{className:"text-xs text-muted-foreground",children:l}),e[11]=l,e[12]=j):j=e[12];let k;e[13]!==r?(k=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=k):k=e[14];let w;e[15]!==i?(w=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=w):w=e[16];let _;e[17]!==k||e[18]!==w||e[19]!==j?(_=n.jsxs("div",{children:[j,k,w]}),e[17]=k,e[18]=w,e[19]=j,e[20]=_):_=e[20];let T;e[21]!==c?(T=c&&n.jsx("div",{className:"mt-3",children:c}),e[21]=c,e[22]=T):T=e[22];let A;e[23]!==_||e[24]!==T?(A=n.jsxs("div",{className:"min-w-0 flex-1",children:[_,T]}),e[23]=_,e[24]=T,e[25]=A):A=e[25];let O;e[26]!==A||e[27]!==v||e[28]!==N?(O=n.jsxs("div",{className:v,children:[N,A]}),e[26]=A,e[27]=v,e[28]=N,e[29]=O):O=e[29];let I;e[30]!==b||e[31]!==g||e[32]!==d||e[33]!==m?(I=d&&n.jsxs("div",{className:ge("flex items-center justify-between gap-3 px-4 py-2.5",m==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:g}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:b})]}),e[30]=b,e[31]=g,e[32]=d,e[33]=m,e[34]=I):I=e[34];let C;return e[35]!==s||e[36]!==O||e[37]!==I||e[38]!==h||e[39]!==p||e[40]!==m?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":m,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:[h,p,O,I]}),e[35]=s,e[36]=O,e[37]=I,e[38]=h,e[39]=p,e[40]=m,e[41]=C):C=e[41],C}const Pt=[{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:G,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:B,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:ft,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:gt,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:B,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:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon: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:B,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:B,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:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:B,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:xe,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:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon: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:B,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:xe,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:B,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."}]}],Ie=Pt,le="studio.release-feed.v1",ue=new Set;let W="",V={},me=!1;function Dt(){if(me)return W||"{}";try{return localStorage.getItem(le)??"{}"}catch{return W||"{}"}}function Pe(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Se(){const t=Dt();return t!==W&&(W=t,V=Pe(t)),V}function $t(t){ue.add(t);const e=s=>{if(!(s.key!==le&&s.key!==null)){try{const a=localStorage.getItem(le)??"{}",r={...Pe(a),...V};V=r,W=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ue.delete(t),window.removeEventListener("storage",e)}}function zt(t){V=t,W=JSON.stringify(t);try{localStorage.setItem(le,W),me=!1}catch{me=!0}ue.forEach(e=>e())}function Rt(){const t=P.c(7),e=q.useSyncExternalStore($t,Se,Se);let s;t[0]!==e?(s=c=>!!e[c],t[0]=e,t[1]=s):s=t[1];const a=s,l=Mt;let r;t[2]!==e?(r=Ie.reduce((c,g)=>e[g.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let o;return t[4]!==a||t[5]!==i?(o={isSeen:a,markSeen:l,unseenCount:i},t[4]=a,t[5]=i,t[6]=o):o=t[6],o}function Mt(t){V[t]||zt({...V,[t]:{seenAt:new Date().toISOString()}})}const qt=720*60*60*1e3,Ft=10080*60*1e3;function Bt(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function Ut(t){const e=Ie[0];if(!e)return null;const s=Bt(e.date),a=t-s;return a<0||a>qt?null:e}function Ht(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 Jt(t,e){const s=Ht(t);return s===null?!1:e-s>=Ft}function Kt(){const t=P.c(41),e=F(),{data:s}=Z.useSession(),{isSeen:a,markSeen:l}=Rt(),[r,i]=q.useState(!1);let o,c,g;if(t[0]!==a||t[1]!==s?.user?.createdAt){g=Symbol.for("react.early_return_sentinel");e:{const j=Date.now();if(o=Ut(j),!o){g=null;break e}if(!Jt(s?.user?.createdAt,j)){g=null;break e}c=a(o.id)}t[0]=a,t[1]=s?.user?.createdAt,t[2]=o,t[3]=c,t[4]=g}else o=t[2],c=t[3],g=t[4];if(g!==Symbol.for("react.early_return_sentinel"))return g;if(c)return null;let b;t[5]!==e?(b=e("announcements.release.ariaLabel"),t[5]=e,t[6]=b):b=t[6];let u;t[7]!==e?(u=e("announcements.release.dismiss"),t[7]=e,t[8]=u):u=t[8];const S=o.eyebrow,m=o.title;let d;t[9]!==o.id||t[10]!==l?(d=()=>l(o.id),t[9]=o.id,t[10]=l,t[11]=d):d=t[11];let h;t[12]!==o.id||t[13]!==o.learnMoreHref||t[14]!==l||t[15]!==e?(h=o.learnMoreHref?n.jsx("a",{href:o.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>l(o.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[12]=o.id,t[13]=o.learnMoreHref,t[14]=l,t[15]=e,t[16]=h):h=t[16];let f;t[17]!==o.cta||t[18]!==o.id||t[19]!==l?(f=o.cta?"href"in o.cta?n.jsx(D,{asChild:!0,size:"sm",onClick:()=>l(o.id),children:n.jsx("a",{href:o.cta.href,children:o.cta.label})}):n.jsx(D,{size:"sm",onClick:()=>i(!0),children:o.cta.label}):null,t[17]=o.cta,t[18]=o.id,t[19]=l,t[20]=f):f=t[20];let p;t[21]!==o.bullets?(p=o.bullets.map(Gt),t[21]=o.bullets,t[22]=p):p=t[22];let y;t[23]!==p?(y=n.jsx("ul",{className:"flex flex-col gap-3",children:p}),t[23]=p,t[24]=y):y=t[24];let x;t[25]!==o.id||t[26]!==l?(x=j=>{i(j),j||l(o.id)},t[25]=o.id,t[26]=l,t[27]=x):x=t[27];let v;t[28]!==r||t[29]!==x?(v=n.jsx(dt,{open:r,onOpenChange:x}),t[28]=r,t[29]=x,t[30]=v):v=t[30];let N;return t[31]!==o.eyebrow||t[32]!==o.title||t[33]!==y||t[34]!==v||t[35]!==b||t[36]!==u||t[37]!==d||t[38]!==h||t[39]!==f?(N=n.jsxs(Le,{ariaLabel:b,dismissLabel:u,eyebrow:S,title:m,onDismiss:d,footerLeading:h,actions:f,children:[y,v]}),t[31]=o.eyebrow,t[32]=o.title,t[33]=y,t[34]=v,t[35]=b,t[36]=u,t[37]=d,t[38]=h,t[39]=f,t[40]=N):N=t[40],N}function Gt(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),H=De?"⌘":"Ctrl",R={keyboardShortcuts:{keys:[H,"K"],description:"Keyboard shortcuts"},back:{keys:[H,"["],description:"Back to previous"},focusChatInput:{keys:[H,"L"],description:"Focus chat input"},saveAndFormat:{keys:[H,"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:[H,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[H,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",H,"S"],description:"New task"},toggleDaemon:{keys:[H,"D"],description:"Toggle daemon logs"}},Wt=[{label:"General",shortcuts:[R.keyboardShortcuts,R.back,R.newTask,R.toggleDaemon]},{label:"Editor",shortcuts:[R.saveAndFormat]},{label:"Chat",shortcuts:[R.focusChatInput,R.togglePlanMode,R.sendMessage,R.newLine]},{label:"Questions",shortcuts:[R.selectOption]},{label:"Monitoring",shortcuts:[R.applyFilter]}];function ve(t){return De?t.metaKey:t.ctrlKey}function Vt(t){const e=P.c(11),{open:s,onOpenChange:a}=t,l=F();let r;e[0]!==l?(r=l("common.keyboardShortcutsDialog.title"),e[0]=l,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(Te,{children:n.jsx(Oe,{children:r})}),e[2]=r,e[3]=i):i=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex flex-col gap-4",children:Wt.map(Qt)}),e[4]=o):o=e[4];let c;e[5]!==i?(c=n.jsxs(Ce,{className:"sm:max-w-md",children:[i,o]}),e[5]=i,e[6]=c):c=e[6];let g;return e[7]!==a||e[8]!==s||e[9]!==c?(g=n.jsx(Ee,{open:s,onOpenChange:a,children:c}),e[7]=a,e[8]=s,e[9]=c,e[10]=g):g=e[10],g}function Qt(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(Yt)})]},t.label)}function Yt(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(Xt)})]},t.description)}function Xt(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 Zt=300*1e3,en=2;function tn(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function nn(t,e){return t.count>=en&&t.version!==null&&t.version!==e}function sn(){const t=P.c(31),e=F();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={queryKey:ce.appVersionCheck(),queryFn:an,refetchInterval:Zt,refetchIntervalInBackground:!0,staleTime:0},t[0]=s):s=t[0];const{data:a,dataUpdatedAt:l}=re(s),[r,i]=q.useState(0);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={version:null,count:0},t[1]=o):o=t[1];const[c,g]=q.useState(o);l!==r&&(i(l),g(w=>tn(w,a,"4.150.3")));const[b,u]=q.useState(null);if(!nn(c,b))return null;let S;t[2]!==e?(S=e("announcements.version.ariaLabel"),t[2]=e,t[3]=S):S=t[3];let m;t[4]!==e?(m=e("announcements.version.dismiss"),t[4]=e,t[5]=m):m=t[5];let d;t[6]!==e?(d=e("announcements.version.eyebrow"),t[6]=e,t[7]=d):d=t[7];let h;t[8]!==e?(h=e("announcements.version.title"),t[8]=e,t[9]=h):h=t[9];let f;t[10]!==e?(f=e("announcements.version.description"),t[10]=e,t[11]=f):f=t[11];let p;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(he,{size:16}),t[12]=p):p=t[12];let y;t[13]!==c.version?(y=()=>u(c.version),t[13]=c.version,t[14]=y):y=t[14];let x;t[15]!==e?(x=e("announcements.version.currentSession",{version:"4.150.3"}),t[15]=e,t[16]=x):x=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let N;t[19]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(he,{size:14}),t[19]=N):N=t[19];let j;t[20]!==v?(j=n.jsxs(D,{size:"sm",onClick:on,children:[v,N]}),t[20]=v,t[21]=j):j=t[21];let k;return t[22]!==j||t[23]!==S||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==f||t[28]!==y||t[29]!==x?(k=n.jsx(Le,{ariaLabel:S,dismissLabel:m,eyebrow:d,title:h,description:f,icon:p,tone:"system",onDismiss:y,footerLeading:x,actions:j}),t[22]=j,t[23]=S,t[24]=m,t[25]=d,t[26]=h,t[27]=f,t[28]=y,t[29]=x,t[30]=k):k=t[30],k}function on(){return window.location.reload()}async function an(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function rn(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const ln=Date.parse("2026-07-21T00:00:00Z"),je=t=>rn(X.ptBrAnnouncementSeen(t));function cn(){const t=P.c(35),e=F(),[s,a]=Ue(),{data:l,isPending:r}=Z.useSession(),i=l?.user,o=i?.id,c=i?.createdAt,g=c!=null&&new Date(c).getTime()<ln,b=He()==="pt-BR",u=!r&&!!o&&g&&b&&s.language==="en"&&!je(o).has(),[S,m]=q.useState(!1),[d,h]=q.useState(!1);!S&&!r&&(m(!0),u&&o&&(je(o).mark(),a(un),h(!0),pe("pt_br_auto_switch_shown")));let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=M=>{pe("pt_br_auto_switch_closed",{action:M}),h(!1)},t[0]=f):f=t[0];const p=f;let y;t[1]!==a?(y=()=>{a(dn),p("switch-back")},t[1]=a,t[2]=y):y=t[2];const x=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=M=>!M&&p("dismiss"),t[3]=v):v=t[3];let N;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=N):N=t[4];let j;t[5]!==e?(j=e("announcements.ptBr.title"),t[5]=e,t[6]=j):j=t[6];let k;t[7]!==j?(k=n.jsx(Oe,{children:j}),t[7]=j,t[8]=k):k=t[8];let w;t[9]!==e?(w=e("announcements.ptBr.description"),t[9]=e,t[10]=w):w=t[10];let _;t[11]!==w?(_=n.jsx(ht,{children:w}),t[11]=w,t[12]=_):_=t[12];let T;t[13]!==k||t[14]!==_?(T=n.jsxs(Te,{children:[k,_]}),t[13]=k,t[14]=_,t[15]=T):T=t[15];let A;t[16]!==e?(A=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=A):A=t[17];let O;t[18]!==x||t[19]!==A?(O=n.jsx(D,{variant:"outline",onClick:x,children:A}),t[18]=x,t[19]=A,t[20]=O):O=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>p("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 $;t[24]!==C?($=n.jsx(D,{onClick:I,children:C}),t[24]=C,t[25]=$):$=t[25];let E;t[26]!==O||t[27]!==$?(E=n.jsxs(pt,{children:[O,$]}),t[26]=O,t[27]=$,t[28]=E):E=t[28];let J;t[29]!==E||t[30]!==T?(J=n.jsxs(Ce,{className:"sm:max-w-md",children:[N,T,E]}),t[29]=E,t[30]=T,t[31]=J):J=t[31];let U;return t[32]!==d||t[33]!==J?(U=n.jsx(Ee,{open:d,onOpenChange:v,children:J}),t[32]=d,t[33]=J,t[34]=U):U=t[34],U}function dn(t){return{...t,language:"en"}}function un(t){return{...t,language:"pt-BR"}}function mn({activeOrg:t}){return t&&(Je(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Ke()),null}function fn(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:l,opts:r,autosendValue:i}=t,o={};s?o.virtualmcpid=s:e.virtualmcpid&&(o.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,b=(s??c)!==c;let u;if(r?.main)o.main=r.main;else if(l)l.main!==void 0&&(o.main=l.main),l.sidepanel!==void 0&&(u=l.sidepanel);else if(!b){const S=e.main;S&&typeof S=="string"&&!ut(S)&&(o.main=S)}return u!==void 0&&(o.sidepanel=u),r?.autosend&&(o.autosend=i),o}const $e="studio:thread-layout:v1",gn=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 hn(t,e,s,a=gn){const l=t.filter(([r])=>r!==e);for(l.push([e,ze(s)]);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(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function Re(t){try{sessionStorage.setItem($e,JSON.stringify(t))}catch{}}function pn(t,e){t&&Re(hn(fe(),t,e))}function yn(t){if(!t)return null;const e=fe().find(([s])=>s===t);return e?ze(e[1]):null}function Un(t){if(!t)return;const e=fe(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Re(s)}function Me(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 Hn(t){const e=P.c(10);let s;e[0]!==t?(s=Me(t),e[0]=t,e[1]=s):s=e[1];const a=re(s);let l;e[2]!==a.data?.prompts?(l=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=l):l=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==l||e[8]!==r?(i={isLoading:a.isLoading,prompts:l,tiles:r},e[6]=a.isLoading,e[7]=l,e[8]=r,e[9]=i):i=e[9],i}function xn(t){const e=P.c(31),{orgSlug:s,orgName:a,domain:l}=t,r=F();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const o=i,c=bn;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(ke,{className:"h-6 w-6 text-primary"})}),e[2]=g):g=e[2];let b;e[3]!==r?(b=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=b):b=e[4];let u;e[5]!==b?(u=n.jsx("h3",{className:"text-lg font-medium",children:b}),e[5]=b,e[6]=u):u=e[6];let S;e[7]!==l||e[8]!==a||e[9]!==r?(S=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),l?` ${r("common.ssoRequiredScreen.via",{domain:l})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=l,e[8]=a,e[9]=r,e[10]=S):S=e[10];let m;e[11]!==S?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[11]=S,e[12]=m):m=e[12];let d;e[13]!==u||e[14]!==m?(d=n.jsxs("div",{className:"space-y-2",children:[u,m]}),e[13]=u,e[14]=m,e[15]=d):d=e[15];let h;e[16]!==r?(h=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=h):h=e[17];let f;e[18]!==o||e[19]!==h?(f=n.jsx(D,{onClick:o,children:h}),e[18]=o,e[19]=h,e[20]=f):f=e[20];let p;e[21]!==r?(p=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=p):p=e[22];let y;e[23]!==p?(y=n.jsx(D,{variant:"ghost",onClick:c,children:p}),e[23]=p,e[24]=y):y=e[24];let x;e[25]!==y||e[26]!==f?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y]}),e[25]=y,e[26]=f,e[27]=x):x=e[27];let v;return e[28]!==x||e[29]!==d?(v=n.jsxs(ee,{children:[g,d,x]}),e[28]=x,e[29]=d,e[30]=v):v=e[30],v}function bn(){window.location.href="/"}function wn(t){const e=P.c(8),{org:s,children:a}=t,r=St(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==r?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:r,ui:null},e[0]=s.id,e[1]=s.name,e[2]=r,e[3]=i):i=e[3];const o=i;let c;return e[4]!==a||e[5]!==s||e[6]!==o?(c=n.jsx(st,{org:s,project:o,children:a}),e[4]=a,e[5]=s,e[6]=o,e[7]=c):c=e[7],c}function Sn(){const t=Ge(),e=wt(),{org:s}=We(),a=Ae({strict:!1}),l=Ve({strict:!1}),r=a.org??"",i=a.taskId??"",o=(m,d,h=!0)=>t({to:"/$org/$taskId",params:{org:r,taskId:m},search:d,replace:h}),c=(m,d=!0)=>o(i,m,d),g=m=>c(d=>({...d,sidepanel:m})),b=(m,d,h)=>{const f=!!i&&i===m;i&&!f&&pn(i,{main:l.main,sidepanel:l.sidepanel});const p=f?null:yn(m),y=be(s.id).id;return o(m,x=>fn({prev:x,virtualMcpId:d,decopilotId:y,savedLayout:p,opts:h,autosendValue:mt}),!1)};return{openSidePanel:g,setTaskId:b,createNewTask:async(m,d)=>{const h=crypto.randomUUID(),f=m??l.virtualmcpid??be(s.id).id;try{await e?.create({id:h,virtual_mcp_id:f,...d?{branch:d}:{}})}catch{}b(h,f)},openTab:m=>o(i||crypto.randomUUID(),d=>({...d,main:m}))}}function vn(){const t=P.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:r}=Ae(l),[i,o]=q.useState(!1),c=Ye(),g=a??"";let b;t[2]!==g?(b=Me(g),t[2]=g,t[3]=b):b=t[3];const u=!!a&&!r;let S;t[4]!==b||t[5]!==u?(S={...b,enabled:u},t[4]=b,t[5]=u,t[6]=S):S=t[6],re(S);const{data:m}=Z.useSession(),d=m?.user?.id;let h;t[7]!==a||t[8]!==d?(h=a&&d?Xe(d,a):null,t[7]=a,t[8]=d,t[9]=h):h=t[9];const f=h;let p,y;t[10]!==c?(p=()=>{const L=z=>{if(ve(z)&&z.code==="KeyK"){z.preventDefault(),o(!0);return}ve(z)&&z.code==="BracketLeft"&&c.history.canGoBack()&&(z.preventDefault(),c.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},y=[c],t[10]=c,t[11]=p,t[12]=y):(p=t[11],y=t[12]),q.useEffect(p,y);let x;t[13]!==a?(x=ce.activeOrganization(a),t[13]=a,t[14]=x):x=t[14];let v;t[15]!==a||t[16]!==d?(v=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Z.organization.getFullOrganization({query:{organizationSlug:a}}).finally(jn),z=ye(L);return L&&!z&&localStorage.setItem(X.lastOrgSlug(),a),d&&L&&et(d,a,L),L},t[15]=a,t[16]=d,t[17]=v):v=t[17];const N=f?f.data:void 0,j=f?.updatedAt;let k;t[18]!==v||t[19]!==N||t[20]!==j||t[21]!==x?(k={queryKey:x,queryFn:v,initialData:N,initialDataUpdatedAt:j,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=j,t[21]=x,t[22]=k):k=t[22];const{data:w}=Ne(k),_=w?.id,T=w?.slug,{data:A}=vt(_,T),O=_??"",I=T??"";let C;t[23]!==O||t[24]!==I?(C=xt({connectionId:bt,orgId:O,orgSlug:I}),t[23]=O,t[24]=I,t[25]=C):C=t[25];const $=!!_&&!!T;let E;if(t[26]!==C||t[27]!==$?(E={...C,enabled:$},t[26]=C,t[27]=$,t[28]=E):E=t[28],re(E),!w){let L;t[29]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(tt,{}),t[29]=L):L=t[29];let z;return t[30]!==a?(z=n.jsx(q.Suspense,{fallback:L,children:n.jsx(It,{orgSlug:a})}),t[30]=a,t[31]=z):z=t[31],z}if(ye(w)){localStorage.getItem(X.lastOrgSlug())===a&&localStorage.removeItem(X.lastOrgSlug());let L;return t[32]!==w.name?(L=n.jsx(Ze,{orgName:w.name}),t[32]=w.name,t[33]=L):L=t[33],L}if(A?.ssoRequired&&!A.authenticated){let L;return t[34]!==w.id||t[35]!==w.name||t[36]!==w.slug||t[37]!==A.domain?(L=n.jsx(xn,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:A.domain}),t[34]=w.id,t[35]=w.name,t[36]=w.slug,t[37]=A.domain,t[38]=L):L=t[38],L}const U=w.logo??null;let M;t[39]!==w||t[40]!==U?(M={...w,logo:U},t[39]=w,t[40]=U,t[41]=M):M=t[41];let Q;t[42]!==w?(Q=n.jsx(mn,{activeOrg:w}),t[42]=w,t[43]=Q):Q=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(Kt,{}),n.jsx(sn,{})]}),t[45]=se):se=t[45];let Y;t[46]!==i?(Y=n.jsx(Vt,{open:i,onOpenChange:o}),t[46]=i,t[47]=Y):Y=t[47];let oe;t[48]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(cn,{}),t[48]=oe):oe=t[48];let ie;return t[49]!==M||t[50]!==Q||t[51]!==Y?(ie=n.jsxs(wn,{org:M,children:[Q,ne,se,Y,oe]}),t[49]=M,t[50]=Q,t[51]=Y,t[52]=ie):ie=t[52],ie}function jn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function kn(){const t=P.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(yt,{children:n.jsx(vn,{})}),t[0]=e):e=t[0],e}const Jn=Object.freeze(Object.defineProperty({__proto__:null,default:kn,usePanelActions:Sn},Symbol.toStringTag,{value:"Module"}));export{R as K,Hn as a,Un as f,ve as i,rn as m,Jn as s,Sn as u};
@@ -1 +1 @@
1
- import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-BWQ8J_Ql.js";import{i as J}from"./LayoutLeft-DuThLaX3.js";import{u as K}from"./use-mobile-DLuY7pVt.js";import{i as Q}from"./X-6E3IZLpq.js";import{b as z,T as B,a as D,c as k}from"./tooltip-E9C3lYtr.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=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(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}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();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}=I();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,I as u};
1
+ import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-BH_FlvCl.js";import{i as J}from"./LayoutLeft-Dyg8dCMM.js";import{u as K}from"./use-mobile-CHEn9Vuf.js";import{i as Q}from"./X-b1CduA8m.js";import{b as z,T as B,a as D,c as k}from"./tooltip-5f345nRx.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=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(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}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();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}=I();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,I as u};
@@ -1 +1 @@
1
- import{c as n,m as c,j as i}from"./index-BWQ8J_Ql.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-BH_FlvCl.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-BWQ8J_Ql.js";import{D as z}from"./domain-settings-Dh870ukR.js";import{P as x}from"./index-EeV9OJhC.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-BzE_binL.js";import{I as d}from"./input-IzR9qH12.js";import{S as $}from"./switch-DEnDWJad.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-BwjPrTQu.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-DMX_R5s3.js";import{s as V}from"./Trash01-8tMNvAGj.js";import{R as W}from"./require-capability-DEFFZdkS.js";import"./studio-tools-BziqPhXE.js";import"./badge-LURmYsxa.js";import"./select-BeoMfuBi.js";import"./tooltip-E9C3lYtr.js";import"./Check-aJK60dGs.js";import"./ChevronDown-QKGLHDtk.js";import"./ChevronUp-Bua8mQg_.js";import"./sidebar-Dqyoi3Jo.js";import"./LayoutLeft-DuThLaX3.js";import"./use-mobile-DLuY7pVt.js";import"./X-6E3IZLpq.js";import"./card-lRKCCLQw.js";import"./ArrowUpRight-rLTsVWA_.js";import"./use-capability-0p8XXo7t.js";import"./access-gate-BtdxRPzC.js";import"./capability-load-error-DywZlInh.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-BH_FlvCl.js";import{D as z}from"./domain-settings-BqoJGIGn.js";import{P as x}from"./index-CI9qWtAz.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-BQTZb6rd.js";import{I as d}from"./input-D_5wC1aD.js";import{S as $}from"./switch-CQkWKPjL.js";import{a as H,b as G,c as J,d as K}from"./use-org-sso-DZn58QZw.js";import{c as Q,S as y,a as E,b as a,d as D}from"./settings-section-C-scXgTT.js";import{s as V}from"./Trash01-BrKPcSIO.js";import{R as W}from"./require-capability-DqCmC5MK.js";import"./studio-tools-D75sojFk.js";import"./badge-gG6vRyl9.js";import"./select-DQeN1iTO.js";import"./tooltip-5f345nRx.js";import"./Check-HAv3Qoh-.js";import"./ChevronDown-CHC7E66-.js";import"./ChevronUp-DbtLB7uL.js";import"./sidebar-D3dJYFFY.js";import"./LayoutLeft-Dyg8dCMM.js";import"./use-mobile-CHEn9Vuf.js";import"./X-b1CduA8m.js";import"./card-Bk2dJN_0.js";import"./ArrowUpRight-CbcmJ_TD.js";import"./use-capability-CXHTHN2p.js";import"./access-gate-BMlGI3KF.js";import"./capability-load-error-Dqfkupks.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-BWQ8J_Ql.js";import{i as ve}from"./AlertCircle-CAbc8MAP.js";import{i as Ce}from"./ChevronRight-ByhOJDuf.js";import{s as be}from"./Plus-DNcVUobv.js";import{s as _e}from"./Trash01-8tMNvAGj.js";import{I as re}from"./input-IzR9qH12.js";import{S as de}from"./switch-DEnDWJad.js";import{S as Re}from"./skeleton-mzmR9D0W.js";import{A as me}from"./avatar-Bl8FLdrm.js";import{P as ke,a as Ne,b as Pe}from"./popover-CkXP0cF6.js";import{b as fe}from"./use-connection-DhT-Eyoh.js";import{W as ne}from"./use-mcp-client-DxfTC5E_.js";import{P as te}from"./index-EeV9OJhC.js";import{u as Te}from"./use-registry-connections-Bw8B7hj8.js";import{j as we,k as Ae}from"./use-organization-settings-OE3Lr1-V.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-DMX_R5s3.js";import{R as Ee}from"./require-capability-DEFFZdkS.js";import"./User01-B1EqqZKM.js";import"./auth-BKADTSIm.js";import"./sidebar-Dqyoi3Jo.js";import"./LayoutLeft-DuThLaX3.js";import"./use-mobile-DLuY7pVt.js";import"./X-6E3IZLpq.js";import"./tooltip-E9C3lYtr.js";import"./studio-tools-BziqPhXE.js";import"./card-lRKCCLQw.js";import"./ArrowUpRight-rLTsVWA_.js";import"./use-capability-0p8XXo7t.js";import"./access-gate-BtdxRPzC.js";import"./capability-load-error-DywZlInh.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-BH_FlvCl.js";import{i as ve}from"./AlertCircle-9SzyWKyE.js";import{i as Ce}from"./ChevronRight-CcOjzlDN.js";import{s as be}from"./Plus-BVxAhxMz.js";import{s as _e}from"./Trash01-BrKPcSIO.js";import{I as re}from"./input-D_5wC1aD.js";import{S as de}from"./switch-CQkWKPjL.js";import{S as Re}from"./skeleton-Dtl2kVUh.js";import{A as me}from"./avatar-2jBZ0oLe.js";import{P as ke,a as Ne,b as Pe}from"./popover-BjTiOU-j.js";import{b as fe}from"./use-connection-aekGGpVs.js";import{W as ne}from"./use-mcp-client-epZZ6uX_.js";import{P as te}from"./index-CI9qWtAz.js";import{u as Te}from"./use-registry-connections-CcoxB7ml.js";import{j as we,k as Ae}from"./use-organization-settings-Cs2jBFh8.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-C-scXgTT.js";import{R as Ee}from"./require-capability-DqCmC5MK.js";import"./User01-D5zL4tme.js";import"./auth-CF8F6GlA.js";import"./sidebar-D3dJYFFY.js";import"./LayoutLeft-Dyg8dCMM.js";import"./use-mobile-CHEn9Vuf.js";import"./X-b1CduA8m.js";import"./tooltip-5f345nRx.js";import"./studio-tools-D75sojFk.js";import"./card-Bk2dJN_0.js";import"./ArrowUpRight-CbcmJ_TD.js";import"./use-capability-CXHTHN2p.js";import"./access-gate-BMlGI3KF.js";import"./capability-load-error-Dqfkupks.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-Bn38_zue.js","assets/index-BH_FlvCl.js","assets/index-DolLSrq-.css","assets/Tool02-B7PpgdMe.js","assets/CheckCircle-B2TYFYU2.js","assets/Settings02-BELTDGHE.js","assets/use-mcp-client-epZZ6uX_.js","assets/auth-CF8F6GlA.js","assets/useInfiniteQuery-B1VFJBv9.js","assets/use-infinite-scroll-BVTX2txG.js","assets/studio-tools-D75sojFk.js","assets/badge-gG6vRyl9.js","assets/input-D_5wC1aD.js","assets/dropdown-menu-BHrqHItr.js","assets/Check-HAv3Qoh-.js","assets/ChevronRight-CcOjzlDN.js","assets/DotsVertical-Df0bVocX.js","assets/table-CSJj0ga_.js","assets/toggle-group-BUQniaMs.js","assets/use-view-mode-Bq06vK1E.js","assets/use-mobile-CHEn9Vuf.js","assets/FilterLines-Gvs8cXY9.js","assets/SearchMd-BSTxqnhr.js","assets/dialog-k8IF67S5.js","assets/X-b1CduA8m.js","assets/AlertCircle-9SzyWKyE.js","assets/Upload01-INelJ_Lh.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-BQTZb6rd.js","assets/card-Bk2dJN_0.js","assets/Trash01-BrKPcSIO.js","assets/label-y0hp3C8E.js","assets/select-DQeN1iTO.js","assets/tooltip-5f345nRx.js","assets/ChevronDown-CHC7E66-.js","assets/ChevronUp-DbtLB7uL.js","assets/switch-CQkWKPjL.js","assets/textarea-Cwy8mcj3.js","assets/XCircle-COKwof4k.js","assets/checkbox-RL6gfPEZ.js","assets/Eye-BNpFccLX.js","assets/LinkExternal01-CtHit8P2.js","assets/use-copy-hYjjhj44.js","assets/Copy01-Bp9Lffnr.js","assets/Key01-DQiO6Zek.js","assets/Plus-BVxAhxMz.js","assets/mcp-oauth-34yo-foZ.js","assets/Play-BorSZmIL.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-BH_FlvCl.js";import{R as u}from"./require-capability-DqCmC5MK.js";import"./use-capability-CXHTHN2p.js";import"./access-gate-BMlGI3KF.js";import"./capability-load-error-Dqfkupks.js";const g=l.lazy(()=>p(()=>import("./registry-layout-Bn38_zue.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])));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-BWQ8J_Ql.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-BH_FlvCl.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,bA as A,bz as M,aA as z,c as H,m as g}from"./index-BWQ8J_Ql.js";var m="Switch",[U]=z(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=A(t),k=M(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,bA as A,bz as M,aA as z,c as H,m as g}from"./index-BH_FlvCl.js";var m="Switch",[U]=z(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=A(t),k=M(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{c as j,b as k,r as E,j as a,B as I,G as N}from"./index-BWQ8J_Ql.js";import{b as R,h as L,a as U,d as W,e as P}from"./dialog-BUJ-AcXn.js";import{i as $}from"./Check-aJK60dGs.js";import{a as B}from"./Copy01-MoyRnx9Y.js";function F(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function te(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function ne(t){const e=j.c(41),{open:i,onOpenChange:r}=t,n=k(),[s,O]=E.useState(!1);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=F(),e[0]=b):b=e[0];const _=b;let o;e[1]!==n?(o=n("downloadApp.title"),e[1]=n,e[2]=o):o=e[2];let l;e[3]!==o?(l=a.jsx(R,{children:o}),e[3]=o,e[4]=l):l=e[4];let c;e[5]!==n?(c=n("downloadApp.description"),e[5]=n,e[6]=c):c=e[6];let u;e[7]!==c?(u=a.jsx(L,{children:c}),e[7]=c,e[8]=u):u=e[8];let d;e[9]!==l||e[10]!==u?(d=a.jsxs(U,{children:[l,u]}),e[9]=l,e[10]=u,e[11]=d):d=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:_}),e[12]=w):w=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{navigator.clipboard.writeText(_).then(()=>{O(!0),setTimeout(()=>O(!1),2e3)})},e[13]=v):v=e[13];let f;e[14]!==s?(f=s?a.jsx($,{size:16}):a.jsx(B,{size:16}),e[14]=s,e[15]=f):f=e[15];let p;e[16]!==s||e[17]!==n?(p=n(s?"downloadApp.copiedLabel":"downloadApp.copyLabel"),e[16]=s,e[17]=n,e[18]=p):p=e[18];let m;e[19]!==p||e[20]!==f?(m=a.jsxs("div",{className:"flex flex-col gap-3",children:[w,a.jsxs(I,{type:"button",className:"w-full gap-2",onClick:v,children:[f,p]})]}),e[19]=p,e[20]=f,e[21]=m):m=e[21];let h;e[22]!==n?(h=n("downloadApp.terminalHint"),e[22]=n,e[23]=h):h=e[23];let T;e[24]!==h?(T=a.jsx("p",{children:h}),e[24]=h,e[25]=T):T=e[25];let g;e[26]!==n?(g=n("downloadApp.appleSiliconNote"),e[26]=n,e[27]=g):g=e[27];let y;e[28]!==g?(y=a.jsx("p",{children:g}),e[28]=g,e[29]=y):y=e[29];let A;e[30]!==T||e[31]!==y?(A=a.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[T,y]}),e[30]=T,e[31]=y,e[32]=A):A=e[32];let S;e[33]!==m||e[34]!==A||e[35]!==d?(S=a.jsxs(W,{className:"sm:max-w-md",children:[d,m,A]}),e[33]=m,e[34]=A,e[35]=d,e[36]=S):S=e[36];let x;return e[37]!==r||e[38]!==i||e[39]!==S?(x=a.jsx(P,{open:i,onOpenChange:r,children:S}),e[37]=r,e[38]=i,e[39]=S,e[40]=x):x=e[40],x}const M=1e4,ie="true";function C(t,e){return N.chatAutosend(t,e)}function V(t){return t==="pending"||t==="sending"}function Y(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!V(e.status)?null:e}function re(t,e,i,r,n=Date.now()){const s={message:r,createdAt:n,status:"pending"};return t.setItem(C(e,i),JSON.stringify(s)),s}function G(t,e,i){const r=C(e,i),n=Y(t.getItem(r));return n||(t.removeItem(r),null)}function se(t,e,i,r=Date.now()){const n=C(e,i),s=G(t,e,i);return!s||s.status!=="pending"?null:r-s.createdAt>=M?(t.removeItem(n),null):(t.setItem(n,JSON.stringify({...s,status:"sending"})),{message:s.message,createdAt:s.createdAt})}function ae(t,e,i){t.removeItem(C(e,i))}function J(t){if(!t||!t.startsWith("automation:"))return null;const e=t.slice(11);return e?{id:e}:null}function z(t,e){return`app:${t}:${e}`}function oe(t){if(!t||!t.startsWith("app:"))return null;const e=t.slice(4),i=e.indexOf(":");if(i<=0)return null;const r=e.slice(0,i),n=e.slice(i+1);return!r||!n?null:{connectionId:r,toolName:n}}function le(t){return`deck:${encodeURIComponent(t)}`}function ce(t){if(!t||!t.startsWith("deck:"))return null;const e=t.slice(5);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}function ue(t){return`file:${encodeURIComponent(t)}`}function de(t){if(!t||!t.startsWith("file:"))return null;const e=t.slice(5);if(!e)return null;try{return{key:decodeURIComponent(e)}}catch{return null}}function fe(t){return`library-file:${encodeURIComponent(t)}`}function pe(t){if(!t||!t.startsWith("library-file:"))return null;const e=t.slice(13);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}function me(t){return`code:${encodeURIComponent(t)}`}function he(t){if(!t)return null;if(t==="code")return{path:null};if(!t.startsWith("code:"))return null;const e=t.slice(5);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}const H=["overview","settings","automations","preview","code","content","git"],K=new Set(H),Te=new Set(["board","files"]);function ge(t){return t.startsWith("app:")||t.startsWith("automation:")||t.startsWith("file:")||t.startsWith("deck:")||t.startsWith("library-file:")||t.startsWith("code:")}const D=new Set(["instructions","connections","layout","settings"]);function ye(t){return!!t&&D.has(t)}function X(t){const e=t?.defaultMainView??null;if(!e||D.has(e.type))return"settings";if(K.has(e.type))return e.type;if(e.type==="ext-app"||e.type==="ext-apps"){if(e.id&&e.toolName)return z(e.id,e.toolName);const i=t?.tabs?.map(r=>r.id)??[];return e.id&&i.includes(e.id)?e.id:i[0]??"settings"}return t?.tabs?.[0]?.id??"settings"}function Ae(t){const e=t.mainParam===0?"0":t.mainParam,i=X(t.metadata);if(e==="0")return{mainOpen:!1,activeTab:i};if(e===void 0){const r=t.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:i}}return D.has(e)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:e}}function Se(t){return t.mainOpen&&t.clickedId===t.activeTab?0:t.clickedId}function be(t){return t.mainOpen?t.activeTab==="automations"?!0:J(t.activeTab)!==null:!1}function we(t){return t.mainOpen&&t.activeTab==="automations"?0:"automations"}export{ie as A,ne as D,H as F,Te as O,Ae as a,de as b,ce as c,pe as d,Se as e,z as f,me as g,fe as h,ye as i,he as j,oe as k,be as l,we as m,le as n,ue as o,J as p,ge as q,X as r,te as s,se as t,ae as u,re as w};
1
+ import{c as j,b as k,r as E,j as a,B as I,G as N}from"./index-BH_FlvCl.js";import{b as R,h as L,a as U,d as W,e as P}from"./dialog-k8IF67S5.js";import{i as $}from"./Check-HAv3Qoh-.js";import{a as B}from"./Copy01-Bp9Lffnr.js";function F(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function te(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function ne(t){const e=j.c(41),{open:i,onOpenChange:r}=t,n=k(),[s,O]=E.useState(!1);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=F(),e[0]=b):b=e[0];const _=b;let o;e[1]!==n?(o=n("downloadApp.title"),e[1]=n,e[2]=o):o=e[2];let l;e[3]!==o?(l=a.jsx(R,{children:o}),e[3]=o,e[4]=l):l=e[4];let c;e[5]!==n?(c=n("downloadApp.description"),e[5]=n,e[6]=c):c=e[6];let u;e[7]!==c?(u=a.jsx(L,{children:c}),e[7]=c,e[8]=u):u=e[8];let d;e[9]!==l||e[10]!==u?(d=a.jsxs(U,{children:[l,u]}),e[9]=l,e[10]=u,e[11]=d):d=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:_}),e[12]=w):w=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{navigator.clipboard.writeText(_).then(()=>{O(!0),setTimeout(()=>O(!1),2e3)})},e[13]=v):v=e[13];let f;e[14]!==s?(f=s?a.jsx($,{size:16}):a.jsx(B,{size:16}),e[14]=s,e[15]=f):f=e[15];let p;e[16]!==s||e[17]!==n?(p=n(s?"downloadApp.copiedLabel":"downloadApp.copyLabel"),e[16]=s,e[17]=n,e[18]=p):p=e[18];let m;e[19]!==p||e[20]!==f?(m=a.jsxs("div",{className:"flex flex-col gap-3",children:[w,a.jsxs(I,{type:"button",className:"w-full gap-2",onClick:v,children:[f,p]})]}),e[19]=p,e[20]=f,e[21]=m):m=e[21];let h;e[22]!==n?(h=n("downloadApp.terminalHint"),e[22]=n,e[23]=h):h=e[23];let T;e[24]!==h?(T=a.jsx("p",{children:h}),e[24]=h,e[25]=T):T=e[25];let g;e[26]!==n?(g=n("downloadApp.appleSiliconNote"),e[26]=n,e[27]=g):g=e[27];let y;e[28]!==g?(y=a.jsx("p",{children:g}),e[28]=g,e[29]=y):y=e[29];let A;e[30]!==T||e[31]!==y?(A=a.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[T,y]}),e[30]=T,e[31]=y,e[32]=A):A=e[32];let S;e[33]!==m||e[34]!==A||e[35]!==d?(S=a.jsxs(W,{className:"sm:max-w-md",children:[d,m,A]}),e[33]=m,e[34]=A,e[35]=d,e[36]=S):S=e[36];let x;return e[37]!==r||e[38]!==i||e[39]!==S?(x=a.jsx(P,{open:i,onOpenChange:r,children:S}),e[37]=r,e[38]=i,e[39]=S,e[40]=x):x=e[40],x}const M=1e4,ie="true";function C(t,e){return N.chatAutosend(t,e)}function V(t){return t==="pending"||t==="sending"}function Y(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!V(e.status)?null:e}function re(t,e,i,r,n=Date.now()){const s={message:r,createdAt:n,status:"pending"};return t.setItem(C(e,i),JSON.stringify(s)),s}function G(t,e,i){const r=C(e,i),n=Y(t.getItem(r));return n||(t.removeItem(r),null)}function se(t,e,i,r=Date.now()){const n=C(e,i),s=G(t,e,i);return!s||s.status!=="pending"?null:r-s.createdAt>=M?(t.removeItem(n),null):(t.setItem(n,JSON.stringify({...s,status:"sending"})),{message:s.message,createdAt:s.createdAt})}function ae(t,e,i){t.removeItem(C(e,i))}function J(t){if(!t||!t.startsWith("automation:"))return null;const e=t.slice(11);return e?{id:e}:null}function z(t,e){return`app:${t}:${e}`}function oe(t){if(!t||!t.startsWith("app:"))return null;const e=t.slice(4),i=e.indexOf(":");if(i<=0)return null;const r=e.slice(0,i),n=e.slice(i+1);return!r||!n?null:{connectionId:r,toolName:n}}function le(t){return`deck:${encodeURIComponent(t)}`}function ce(t){if(!t||!t.startsWith("deck:"))return null;const e=t.slice(5);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}function ue(t){return`file:${encodeURIComponent(t)}`}function de(t){if(!t||!t.startsWith("file:"))return null;const e=t.slice(5);if(!e)return null;try{return{key:decodeURIComponent(e)}}catch{return null}}function fe(t){return`library-file:${encodeURIComponent(t)}`}function pe(t){if(!t||!t.startsWith("library-file:"))return null;const e=t.slice(13);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}function me(t){return`code:${encodeURIComponent(t)}`}function he(t){if(!t)return null;if(t==="code")return{path:null};if(!t.startsWith("code:"))return null;const e=t.slice(5);if(!e)return null;try{return{path:decodeURIComponent(e)}}catch{return null}}const H=["overview","settings","automations","preview","code","content","git"],K=new Set(H),Te=new Set(["board","files"]);function ge(t){return t.startsWith("app:")||t.startsWith("automation:")||t.startsWith("file:")||t.startsWith("deck:")||t.startsWith("library-file:")||t.startsWith("code:")}const D=new Set(["instructions","connections","layout","settings"]);function ye(t){return!!t&&D.has(t)}function X(t){const e=t?.defaultMainView??null;if(!e||D.has(e.type))return"settings";if(K.has(e.type))return e.type;if(e.type==="ext-app"||e.type==="ext-apps"){if(e.id&&e.toolName)return z(e.id,e.toolName);const i=t?.tabs?.map(r=>r.id)??[];return e.id&&i.includes(e.id)?e.id:i[0]??"settings"}return t?.tabs?.[0]?.id??"settings"}function Ae(t){const e=t.mainParam===0?"0":t.mainParam,i=X(t.metadata);if(e==="0")return{mainOpen:!1,activeTab:i};if(e===void 0){const r=t.metadata?.defaultMainView??null;return{mainOpen:!(r==null||r.type==="chat"),activeTab:i}}return D.has(e)?{mainOpen:!0,activeTab:"settings"}:{mainOpen:!0,activeTab:e}}function Se(t){return t.mainOpen&&t.clickedId===t.activeTab?0:t.clickedId}function be(t){return t.mainOpen?t.activeTab==="automations"?!0:J(t.activeTab)!==null:!1}function we(t){return t.mainOpen&&t.activeTab==="automations"?0:"automations"}export{ie as A,ne as D,H as F,Te as O,Ae as a,de as b,ce as c,pe as d,Se as e,z as f,me as g,fe as h,ye as i,he as j,oe as k,be as l,we as m,le as n,ue as o,J as p,ge as q,X as r,te as s,se as t,ae as u,re as w};
@@ -1 +1 @@
1
- import{c,m as i,j as r}from"./index-BWQ8J_Ql.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-BH_FlvCl.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,bB as k,ay as p,bE as F,bD as y,bC 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-BWQ8J_Ql.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=A(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 E="TabsContent",R=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(E,a),l=A(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=E;function A(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,bB as k,ay as p,bE as F,bD as y,bC 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-BH_FlvCl.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=A(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 E="TabsContent",R=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(E,a),l=A(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=E;function A(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-BWQ8J_Ql.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-BH_FlvCl.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,bC as A,bD as T,aD as M,bB as S,aA as D,bu as F,c as C,m as P}from"./index-BWQ8J_Ql.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,bC as A,bD as T,aD as M,bB as S,aA as D,bu as F,c as C,m as P}from"./index-BH_FlvCl.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};