decocms 4.375.0 → 4.376.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/client/assets/{AlertCircle-CqW1GFxy.js → AlertCircle-Cm80uQMQ.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DYNRbtHa.js → AreaChart-BQQt0fit.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BGvcqKye.js → ArrowLeft-CI6_vwJl.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CfSh04kd.js → ArrowRight-YdifOChs.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DIK810PT.js → ArrowUp-CIJSr0Uy.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-CsHrela1.js → CartesianChart-DvyyqdLA.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-eFuhjKFT.js → CheckCircle-DmDAlxUx.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-QcSQ5rVq.js → ChevronUp-BAybpbAO.js} +1 -1
  9. package/dist/client/assets/{Copy01-BsZDIS3z.js → Copy01-BLG-yB9O.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-yw_JaYDH.js → CreditCard01-CuieiFwv.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-DCTIN1zx.js → DotsVertical-Qjn9bD7u.js} +1 -1
  12. package/dist/client/assets/{Download01-B4Q5hpED.js → Download01-CUdEmTJH.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-CTDVFTli.js → ErrorBarContext-CMYu_Fz1.js} +1 -1
  14. package/dist/client/assets/{Eye-C46dzrHd.js → Eye-C1v6-SBQ.js} +1 -1
  15. package/dist/client/assets/{Globe01-DlhUCcjG.js → Globe01-Ctrf78fu.js} +1 -1
  16. package/dist/client/assets/{Globe04-ClHubtty.js → Globe04-DeorlaCZ.js} +1 -1
  17. package/dist/client/assets/{Image01-DVR_EyJG.js → Image01-DDEEEqQF.js} +1 -1
  18. package/dist/client/assets/{Key01-muV6twoN.js → Key01-W5nMWqao.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-xdqdW3pr.js → LayoutLeft-v-gPxVBy.js} +1 -1
  20. package/dist/client/assets/{Line-hpj-dLud.js → Line-BH1zIGSI.js} +1 -1
  21. package/dist/client/assets/{Link01-BbJKwlY6.js → Link01-CAgdLkvZ.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-FZW_JKrN.js → LinkExternal01-CWguI2G0.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CN-5WdRa.js → Monitor01-DdH-ehTH.js} +1 -1
  24. package/dist/client/assets/{Package-CkvAk6JQ.js → Package-Ca1kJQJW.js} +1 -1
  25. package/dist/client/assets/{Palette-D8vRagJV.js → Palette-1NgeCtg4.js} +1 -1
  26. package/dist/client/assets/{Play-P0YcNy8v.js → Play-D9coBDJI.js} +1 -1
  27. package/dist/client/assets/{Plus-DcpbfgdJ.js → Plus-L4CMeo2h.js} +1 -1
  28. package/dist/client/assets/{SearchLg-7L27EznQ.js → SearchLg-CttLARhB.js} +1 -1
  29. package/dist/client/assets/{SearchMd-XFzJrarE.js → SearchMd-BjQ6aaMY.js} +1 -1
  30. package/dist/client/assets/{Sector-CLGxXMU7.js → Sector-Cz72810i.js} +1 -1
  31. package/dist/client/assets/{Settings02-CncEwCCz.js → Settings02-BW27aEc7.js} +1 -1
  32. package/dist/client/assets/{Share07-CxrO44KP.js → Share07-DWRoaK9G.js} +1 -1
  33. package/dist/client/assets/{Stars01-DyW-G6OS.js → Stars01-DlZJggen.js} +1 -1
  34. package/dist/client/assets/{Sun-xECmqRY7.js → Sun-CcIbq0UZ.js} +1 -1
  35. package/dist/client/assets/{Tool01-dwGgKodr.js → Tool01-B1CIPJlg.js} +1 -1
  36. package/dist/client/assets/{Tool02-CbeJXNE6.js → Tool02-CE2CsLyJ.js} +1 -1
  37. package/dist/client/assets/{Trash01-Cs1900Vx.js → Trash01-B82ZZMGA.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-BfIYShuZ.js → TrendUp01-BCNTgoYi.js} +1 -1
  39. package/dist/client/assets/{Upload01-odxUyqlC.js → Upload01-zkIbWeZQ.js} +1 -1
  40. package/dist/client/assets/{User01-C-kfOI2V.js → User01-BBjKoAPb.js} +1 -1
  41. package/dist/client/assets/{UserSquare-CBd8Lm1t.js → UserSquare-B6mag78j.js} +1 -1
  42. package/dist/client/assets/{Users01-DW5XXBNa.js → Users01-COhudXax.js} +1 -1
  43. package/dist/client/assets/{X-DgI4yqfX.js → X-CZ5u1gQz.js} +1 -1
  44. package/dist/client/assets/{XCircle-ChzUwnd9.js → XCircle-DVIMVh0g.js} +1 -1
  45. package/dist/client/assets/{XClose-Cu0FBQhr.js → XClose-BHW02Gld.js} +1 -1
  46. package/dist/client/assets/{Zap-BkWm3G14.js → Zap-B7SjQTF1.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-BYNmIOoy.js → ZoomOut-B3LU1sVM.js} +1 -1
  48. package/dist/client/assets/{access-gate-DrhvBokN.js → access-gate-BMbKi31w.js} +1 -1
  49. package/dist/client/assets/{add-connection-dialog-BNKRqesq.js → add-connection-dialog-Cj_p1y9t.js} +1 -1
  50. package/dist/client/assets/{agent-analytics-DhJQZGBL.js → agent-analytics-BJTe-WT2.js} +1 -1
  51. package/dist/client/assets/agent-app-DqFyNKtI.js +1 -0
  52. package/dist/client/assets/{agent-assets-BG71p0Uk.js → agent-assets-D3BKdiKm.js} +1 -1
  53. package/dist/client/assets/{agent-automation-CDChcSyV.js → agent-automation-BIgf2eVS.js} +1 -1
  54. package/dist/client/assets/{agent-automations-Ds_gyptW.js → agent-automations-KDO-QCaO.js} +1 -1
  55. package/dist/client/assets/{agent-connect-sources-BQVAyJ4p.js → agent-connect-sources-yvecGA00.js} +1 -1
  56. package/dist/client/assets/agent-deck-DIiGwoQx.js +1 -0
  57. package/dist/client/assets/{agent-e2e-Waa8S4qH.js → agent-e2e-DgZKhQJU.js} +1 -1
  58. package/dist/client/assets/{agent-experiments-DocmKFCq.js → agent-experiments-XbDm6E9w.js} +1 -1
  59. package/dist/client/assets/agent-file-x8n7RpuM.js +1 -0
  60. package/dist/client/assets/{agent-git-CcB_AU8a.js → agent-git-BRsFIPqF.js} +1 -1
  61. package/dist/client/assets/{agent-hosting-DqC3jsqS.js → agent-hosting-qLrSaTBn.js} +1 -1
  62. package/dist/client/assets/{agent-icon-DZmc5CaF.js → agent-icon-CFdmLldh.js} +1 -1
  63. package/dist/client/assets/agent-library-file-DxHboUkp.js +1 -0
  64. package/dist/client/assets/{agent-monitor-j0thXn_z.js → agent-monitor-DtdoOdMx.js} +1 -1
  65. package/dist/client/assets/{agent-overview-Se96_nVw.js → agent-overview-DtDD-Kvi.js} +1 -1
  66. package/dist/client/assets/agent-settings-CqXLHQLE.js +1 -0
  67. package/dist/client/assets/{agent-site-editor-BUv5taoc.js → agent-site-editor-Dkn6uW5_.js} +1 -1
  68. package/dist/client/assets/agent-site-editor-code-DZCjGWZ6.js +2 -0
  69. package/dist/client/assets/{agent-site-editor-content-BT2waE8I.js → agent-site-editor-content-DhLz2SwC.js} +2 -2
  70. package/dist/client/assets/{agent-site-editor-preview-BYZPX7tr.js → agent-site-editor-preview-eh-T4gl9.js} +3 -3
  71. package/dist/client/assets/agent-view-BszL8cjm.js +1 -0
  72. package/dist/client/assets/{agent-view-guard-B-yMTUz4.js → agent-view-guard-DT0MnC12.js} +1 -1
  73. package/dist/client/assets/{agents-list--UPC2z-V.js → agents-list-J7lqHacr.js} +1 -1
  74. package/dist/client/assets/{ai-providers-DoD-WkyR.js → ai-providers-Bu_ftgSH.js} +1 -1
  75. package/dist/client/assets/{alert-BiRypa2I.js → alert-DN6Jkx2F.js} +1 -1
  76. package/dist/client/assets/{alert-dialog-BYQAyeOC.js → alert-dialog-CtGv9jdd.js} +1 -1
  77. package/dist/client/assets/api-keys-437d_25Z.js +1 -0
  78. package/dist/client/assets/{api-keys-CFH8WzHp.js → api-keys-U1Ff83Yk.js} +1 -1
  79. package/dist/client/assets/app-editor-DnPd6p2P.js +1 -0
  80. package/dist/client/assets/{asset-utils-Db2ZBQHY.js → asset-utils-BcGTQmUM.js} +1 -1
  81. package/dist/client/assets/{auth-BCpLT4L2.js → auth-DbBN__xJ.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-CSzayJNY.js → auth-catchall-CPmi4Xjt.js} +1 -1
  83. package/dist/client/assets/{auth-entry-Bf9MzjUn.js → auth-entry-4lTFP5BN.js} +1 -1
  84. package/dist/client/assets/{auth-split-layout-B1xn3sDE.js → auth-split-layout-CgtQX21Q.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-DVNhuSYI.js → authenticate-and-persist-oauth-D3Kb-cEZ.js} +1 -1
  86. package/dist/client/assets/{automation-list-row-CfW-tzTh.js → automation-list-row-DhxW__CQ.js} +1 -1
  87. package/dist/client/assets/{automation-runs-CI1zLVwE.js → automation-runs-DJS5XAZ2.js} +1 -1
  88. package/dist/client/assets/{automations-DRLDJWNL.js → automations-B0KLCqBc.js} +1 -1
  89. package/dist/client/assets/{autosend-U0G_KEv2.js → autosend-BBTn4tWB.js} +1 -1
  90. package/dist/client/assets/{avatar-DxbODU4C.js → avatar-CQQzKV-7.js} +1 -1
  91. package/dist/client/assets/{badge-D6ygNqO6.js → badge-DdXiAz7d.js} +1 -1
  92. package/dist/client/assets/{block-document-BezbnyKl.js → block-document-Dh6zsJjY.js} +1 -1
  93. package/dist/client/assets/{blocks-preview-workspace-context-CTo5jpQ8.js → blocks-preview-workspace-context-DWfF3nV_.js} +1 -1
  94. package/dist/client/assets/{breadcrumb-DWcfFz9-.js → breadcrumb-gxV-Nw6I.js} +1 -1
  95. package/dist/client/assets/{buckets-CYMWAXId.js → buckets-A9cm4sVk.js} +1 -1
  96. package/dist/client/assets/{build-improve-prompt-doc-C7lr6nl8.js → build-improve-prompt-doc-DLYOL5qH.js} +1 -1
  97. package/dist/client/assets/{bulk-category-panel-Bj1SJBXK.js → bulk-category-panel-DblKZELB.js} +1 -1
  98. package/dist/client/assets/{calendar-PQ1Ftg13.js → calendar-C0OE00Yc.js} +1 -1
  99. package/dist/client/assets/{capability-load-error-CvIv1gsN.js → capability-load-error-VNoAtYvG.js} +1 -1
  100. package/dist/client/assets/category-editor-H2-UQUts.js +1 -0
  101. package/dist/client/assets/{chart-Dr36_7b5.js → chart-CrWliMuN.js} +1 -1
  102. package/dist/client/assets/{chat-context-BkliO4re.js → chat-context-BYHljAsB.js} +1 -1
  103. package/dist/client/assets/{chat-draft-CiN5fXJU.js → chat-draft-CaPL0UfA.js} +1 -1
  104. package/dist/client/assets/{checkbox-Cklt31AJ.js → checkbox-CK3yWTdA.js} +1 -1
  105. package/dist/client/assets/{choose-editor-DGrCIRT5.js → choose-editor-CT6dxgF8.js} +1 -1
  106. package/dist/client/assets/{cli-auth-success-BHmPrydv.js → cli-auth-success-SQxQIGtu.js} +1 -1
  107. package/dist/client/assets/{client-icons-CS1fp_mb.js → client-icons-DgwDqPvk.js} +1 -1
  108. package/dist/client/assets/{collapsible-DnZ_wlS4.js → collapsible-DRPvomdt.js} +1 -1
  109. package/dist/client/assets/{collection-detail-DwkABCiq.js → collection-detail-CbwHPL6H.js} +1 -1
  110. package/dist/client/assets/{collection-display-button-CODidBR9.js → collection-display-button-BKHXaGpa.js} +1 -1
  111. package/dist/client/assets/{collection-search-2f8pAB4Y.js → collection-search-DtjV9-VA.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-D2XJ_BvC.js → collection-table-wrapper-bdzzri_M.js} +1 -1
  113. package/dist/client/assets/{collection-tabs-CYx5-BiK.js → collection-tabs-Bsge5RiX.js} +1 -1
  114. package/dist/client/assets/{combobox-BxJAO8U7.js → combobox-CIm7mchb.js} +1 -1
  115. package/dist/client/assets/{command-s8BJjz1Z.js → command-0Ma0zNRD.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-idD3Wjuq.js → companion-mcps-section-CecbOJ2h.js} +1 -1
  117. package/dist/client/assets/{connect-YaAoKXfV.js → connect-Dq9coWz3.js} +1 -1
  118. package/dist/client/assets/{connect-layout-B5NqOhZR.js → connect-layout-DA1DXLPY.js} +1 -1
  119. package/dist/client/assets/{connection-ju8s9npF.js → connection-Cz2eR4ks.js} +1 -1
  120. package/dist/client/assets/{connection-card-CyoPC3yi.js → connection-card-CXTSDJwx.js} +1 -1
  121. package/dist/client/assets/{connection-detail-DUSw9X3H.js → connection-detail-DT02vAy0.js} +1 -1
  122. package/dist/client/assets/{connection-form-helpers-BKito2Bz.js → connection-form-helpers-BAGPYlIq.js} +1 -1
  123. package/dist/client/assets/{connections-B9YPH6e_.js → connections-dnHR3Nn0.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-Bd1vOpVb.js → create-organization-dialog-B5td_ZCy.js} +1 -1
  125. package/dist/client/assets/{decofile-api-tER_PaB4.js → decofile-api-DmitnqlG.js} +1 -1
  126. package/dist/client/assets/{decopilot-f7DFX3Qm.js → decopilot-Bu7UJCZD.js} +1 -1
  127. package/dist/client/assets/{dialog-CfR9zhfQ.js → dialog-CDUwK9Ky.js} +1 -1
  128. package/dist/client/assets/{discover-BuXt2vx3.js → discover-G79Mv2SV.js} +1 -1
  129. package/dist/client/assets/{domain-settings-CqFWBtGR.js → domain-settings-BDTtE0Ud.js} +1 -1
  130. package/dist/client/assets/{download-app-dialog-BP-_J1f-.js → download-app-dialog-Ds79HQNt.js} +1 -1
  131. package/dist/client/assets/{drawer-BiF0PtML.js → drawer-C82rjwjY.js} +1 -1
  132. package/dist/client/assets/{editor-DUpmzLo7.js → editor-eoiEWzaP.js} +1 -1
  133. package/dist/client/assets/{empty-state-9hlMmNlC.js → empty-state-CH7AalHb.js} +1 -1
  134. package/dist/client/assets/{empty-state-D6UqEEY-.js → empty-state-DE7c1tnW.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-DgcpMlth.js → extract-connection-data-BI0h7anK.js} +1 -1
  136. package/dist/client/assets/{feature-gate-D5GuzQQe.js → feature-gate-DqSV1UUr.js} +1 -1
  137. package/dist/client/assets/{feature-paywall-BikFTLog.js → feature-paywall-qa93jp54.js} +1 -1
  138. package/dist/client/assets/{file-explorer-CQocIpVZ.js → file-explorer-jsQSheKe.js} +1 -1
  139. package/dist/client/assets/{file-preview-DNlbJHv7.js → file-preview-DpBhyJPy.js} +1 -1
  140. package/dist/client/assets/{file-share-button-CO47V7vg.js → file-share-button-XI0XmzQG.js} +1 -1
  141. package/dist/client/assets/{file-type-icon-Dv-tVjqp.js → file-type-icon-BIj4oPmy.js} +1 -1
  142. package/dist/client/assets/{folder-icon-186o_xBL.js → folder-icon-C9QPDhMu.js} +1 -1
  143. package/dist/client/assets/{form-DHJlhF9m.js → form-C6A0elLx.js} +1 -1
  144. package/dist/client/assets/{gateway-client-4Nr9Lszn.js → gateway-client-eVjKfcK3.js} +1 -1
  145. package/dist/client/assets/{general-BCtaDRKE.js → general-DNyaqDEx.js} +1 -1
  146. package/dist/client/assets/{github-icon-B7rNxQCT.js → github-icon-Ctc2abJk.js} +1 -1
  147. package/dist/client/assets/{home-Dskdg6sU.js → home-C-Nl75Lr.js} +1 -1
  148. package/dist/client/assets/{hooks-Vq5fn_Sg.js → hooks-BOS6vZ4t.js} +1 -1
  149. package/dist/client/assets/{hooks-BB3WxPkJ.js → hooks-CMDCYMGT.js} +1 -1
  150. package/dist/client/assets/{icon-button-C0MdJ7W1.js → icon-button-MNO3PXmW.js} +1 -1
  151. package/dist/client/assets/{index-BxPwUex4.js → index-8nDSoss7.js} +1 -1
  152. package/dist/client/assets/{index-BCtojorK.js → index-B8lfU8Rm.js} +1 -1
  153. package/dist/client/assets/{index-BDzkh4SF.js → index-BeraXx-k.js} +1 -1
  154. package/dist/client/assets/{index-Ci8I2ZAh.js → index-BvJsKNld.js} +1 -1
  155. package/dist/client/assets/{index-Dxn1KDpE.js → index-C6pj24WF.js} +1 -1
  156. package/dist/client/assets/{index-X9VHKMKa.js → index-CKsDsbXr.js} +1 -1
  157. package/dist/client/assets/{index-DQZBt6Fl.js → index-COJyT2bn.js} +5 -5
  158. package/dist/client/assets/{index-CMgSStc4.js → index-Cx0ILH48.js} +1 -1
  159. package/dist/client/assets/{index-waKafOzk.js → index-CxNadzOa.js} +1 -1
  160. package/dist/client/assets/{index-CnX1wVk0.js → index-D522cKSf.js} +1 -1
  161. package/dist/client/assets/{index-C-9eP1YM.js → index-D8NqdUJn.js} +1 -1
  162. package/dist/client/assets/{index-BNtnQdj2.js → index-DY7FDVu8.js} +1 -1
  163. package/dist/client/assets/{index-BNnRrN_z.js → index-DciLqihQ.js} +1 -1
  164. package/dist/client/assets/{index-aeXfMtPI.js → index-DzEQCajj.js} +1 -1
  165. package/dist/client/assets/{index-redirect-2ysrmYvb.js → index-redirect-DKU1ip62.js} +1 -1
  166. package/dist/client/assets/{infiniteQueryObserver-DGwzP6OU.js → infiniteQueryObserver-C2EEO2RI.js} +1 -1
  167. package/dist/client/assets/{infra-billing-8H9IQAku.js → infra-billing-bVKrfvPU.js} +1 -1
  168. package/dist/client/assets/{input-Clcfr53P.js → input-AAPZUa2D.js} +1 -1
  169. package/dist/client/assets/{input-rh1Mv0Wr.js → input-BZsvuPI8.js} +1 -1
  170. package/dist/client/assets/{input-Tjg4Yj6g.js → input-DATWob-R.js} +1 -1
  171. package/dist/client/assets/{integration-icon-Dz7H1-MQ.js → integration-icon-G7jQWV_g.js} +1 -1
  172. package/dist/client/assets/{label-BNGvxM6S.js → label-BI62SaKd.js} +1 -1
  173. package/dist/client/assets/{last-preview-page-AQeXjWi9.js → last-preview-page-CbFesgQy.js} +1 -1
  174. package/dist/client/assets/{layout-X2JiO2W9.js → layout-CoeYcNBU.js} +1 -1
  175. package/dist/client/assets/{legacy-agents-deep-vurFyg9D.js → legacy-agents-deep-DE5YPvSr.js} +1 -1
  176. package/dist/client/assets/{legacy-main-redirect-Bbkf2fqL.js → legacy-main-redirect-vIYB7gjM.js} +1 -1
  177. package/dist/client/assets/{library-BGrUeG8I.js → library-D-UVT56D.js} +1 -1
  178. package/dist/client/assets/{login-Ks2wHpj_.js → login-ejU4PDpa.js} +1 -1
  179. package/dist/client/assets/{markdown-j472BGQe.js → markdown-g0iKgQki.js} +1 -1
  180. package/dist/client/assets/{mcp-app-renderer-CSEPd7DC.js → mcp-app-renderer-BPIxxtwm.js} +1 -1
  181. package/dist/client/assets/{mcp-oauth-8WwU56fl.js → mcp-oauth-BX-s6twV.js} +1 -1
  182. package/dist/client/assets/{members-DXX-_l1x.js → members-C04pGeFu.js} +1 -1
  183. package/dist/client/assets/{message-templates-BszS8o8W.js → message-templates-DLcbwkDV.js} +1 -1
  184. package/dist/client/assets/{mini-report-page-IeosqtjA.js → mini-report-page-BAgYoFbz.js} +1 -1
  185. package/dist/client/assets/{mock-board-DrA4dW9Q.js → mock-board-7v8Ts4Ol.js} +3 -3
  186. package/dist/client/assets/{monaco-editor-B4FcjfHJ.js → monaco-editor-B9RMz-15.js} +1 -1
  187. package/dist/client/assets/{monitoring-stats-row-ClsmEIaD.js → monitoring-stats-row-CL2jrlBt.js} +1 -1
  188. package/dist/client/assets/{multi-select-DjG7jWJv.js → multi-select-DVMawHIt.js} +1 -1
  189. package/dist/client/assets/{mustache-B7tW8rKl.js → mustache-B1tltvSE.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-CuG-N4Ag.js → oauth-callback-D1zWEN8a.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-ai-provider-BQiU_dV5.js → oauth-callback-ai-provider-CQppFGRu.js} +1 -1
  192. package/dist/client/assets/{onboarding-oOptdWYC.js → onboarding-ml0KhpSL.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-0eAIAyQZ.js → optimistic-project-sidebar-views-BVIwHavf.js} +1 -1
  194. package/dist/client/assets/{org-file-open-context-CV0BvKfM.js → org-file-open-context-BkTepFfD.js} +1 -1
  195. package/dist/client/assets/{organization-choice-DzIjaq6z.js → organization-choice-DyBOUTdt.js} +1 -1
  196. package/dist/client/assets/{orgs-Uh-4y791.js → orgs-d7uzFXRt.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-0XF8k2QH.js → page-seo-form-OxkYKmiI.js} +1 -1
  198. package/dist/client/assets/{pair-oDAsulNf.js → pair-PFcTXb_H.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-DWqjM2H6.js → plan-ladder-DDcW_40v.js} +1 -1
  200. package/dist/client/assets/{popover-hNLbYWT0.js → popover-KWKKOTZi.js} +1 -1
  201. package/dist/client/assets/{post-calendar-DzuJkfRI.js → post-calendar-DP5VNkMQ.js} +1 -1
  202. package/dist/client/assets/{post-editor-C1Tx2rOv.js → post-editor-DxNfyPHT.js} +1 -1
  203. package/dist/client/assets/{preview-content-DMGh32pv.js → preview-content-CQad4qRX.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-BGQQrh8x.js → preview-dialog-CJPiFSmS.js} +1 -1
  205. package/dist/client/assets/{primitives-BFH7BLqO.js → primitives-Z98a6m5P.js} +1 -1
  206. package/dist/client/assets/{profile-Buekam-F.js → profile-D5UD6t5O.js} +1 -1
  207. package/dist/client/assets/{project-app-view-vdLc6iv3.js → project-app-view-BdL--VkR.js} +1 -1
  208. package/dist/client/assets/{project-feed-DoakvNjk.js → project-feed-Cq-Ub_el.js} +1 -1
  209. package/dist/client/assets/{project-icon-DCwjX34f.js → project-icon-BLMwD5MF.js} +1 -1
  210. package/dist/client/assets/project-reports-z2TnU0xm.js +1 -0
  211. package/dist/client/assets/project-tasks-CfmYEIou.js +1 -0
  212. package/dist/client/assets/{prompts-CPY17-ZY.js → prompts-Bi0fUI_P.js} +1 -1
  213. package/dist/client/assets/record-editor-Wts8S4Mg.js +1 -0
  214. package/dist/client/assets/{redirect-editor-eNlr_Mfk.js → redirect-editor-Bviq55_I.js} +1 -1
  215. package/dist/client/assets/registry-BRbY-DYP.js +2 -0
  216. package/dist/client/assets/{registry-layout-DryRe-Z-.js → registry-layout-lqv7Wdye.js} +1 -1
  217. package/dist/client/assets/{reports-D1FePU5c.js → reports-AdPTt8B7.js} +1 -1
  218. package/dist/client/assets/reports-OyhFkK7G.js +1 -0
  219. package/dist/client/assets/{reports-onboarding-_i1HBu7w.js → reports-onboarding-C2Jgwku4.js} +1 -1
  220. package/dist/client/assets/{reports-tab-Dl6Dk6u1.js → reports-tab-DGt-VBx-.js} +2 -2
  221. package/dist/client/assets/{repositories-CIXZv6vt.js → repositories-CgzO6Xfa.js} +1 -1
  222. package/dist/client/assets/{repository-import-picker-Cm_I6qX6.js → repository-import-picker-DCQ2vIEE.js} +1 -1
  223. package/dist/client/assets/{repository-picker-BE31MYd2.js → repository-picker-DocVIjle.js} +1 -1
  224. package/dist/client/assets/{require-capability-DpBsO_NN.js → require-capability-BVZK0CKB.js} +1 -1
  225. package/dist/client/assets/{required-auth-layout-CLogPoNu.js → required-auth-layout-DIMyOwy5.js} +1 -1
  226. package/dist/client/assets/{reset-password-BtrZlUmp.js → reset-password-XjMxfJ3n.js} +1 -1
  227. package/dist/client/assets/{resizable-DW-7DjHg.js → resizable-DUfEbXfe.js} +1 -1
  228. package/dist/client/assets/{review-settings-CvxnEwkr.js → review-settings-DFWCbhzn.js} +1 -1
  229. package/dist/client/assets/{rich-text-link-control-C4o-c0sL.js → rich-text-link-control-CBLe2KA9.js} +1 -1
  230. package/dist/client/assets/{roles-DfAkE-T7.js → roles-DkYVAbVN.js} +1 -1
  231. package/dist/client/assets/{route-x1w0_XOS.js → route-BF20JrYe.js} +1 -1
  232. package/dist/client/assets/{route-DkpbXtY4.js → route-CIUEkw4I.js} +1 -1
  233. package/dist/client/assets/{route-BUOzO2CZ.js → route-cMO74U0h.js} +1 -1
  234. package/dist/client/assets/{route-page-header-ddubqYbl.js → route-page-header-KOzZ3zSC.js} +1 -1
  235. package/dist/client/assets/{runnable-block-editor-D7DBqRPo.js → runnable-block-editor-B6xxtm11.js} +1 -1
  236. package/dist/client/assets/{sandbox-lifecycle-context-H5kbI9ib.js → sandbox-lifecycle-context-CFucpFSZ.js} +1 -1
  237. package/dist/client/assets/{schema-D9hq6-Ko.js → schema-CbM5M5_P.js} +1 -1
  238. package/dist/client/assets/{scroll-area-COAhNkSc.js → scroll-area-BDQJDNZK.js} +1 -1
  239. package/dist/client/assets/{search-input-eDRvpCEQ.js → search-input-B77FxN5v.js} +1 -1
  240. package/dist/client/assets/{search-toggle-ukQDdkrg.js → search-toggle-B9yzj02B.js} +1 -1
  241. package/dist/client/assets/{secrets-DzQr3bGF.js → secrets-BwogSMcO.js} +1 -1
  242. package/dist/client/assets/{sections-editor-H_6KGCpg.js → sections-editor-Dsm_Gu_c.js} +2 -2
  243. package/dist/client/assets/{select-DKZw7VY5.js → select-DUlMM14m.js} +1 -1
  244. package/dist/client/assets/{select-model-kV4UP8Pg.js → select-model-KKC97NXx.js} +1 -1
  245. package/dist/client/assets/{seo-editor-B16rwVRf.js → seo-editor-Dfjag5vZ.js} +1 -1
  246. package/dist/client/assets/{separator-BVE7Budu.js → separator-DZWmhWB0.js} +1 -1
  247. package/dist/client/assets/{settings-tab-BtAzz40R.js → settings-tab-lYg4AdKB.js} +1 -1
  248. package/dist/client/assets/{sheet-DuM7cckc.js → sheet-CQ2b_TUH.js} +1 -1
  249. package/dist/client/assets/shell-layout-DlWc56wM.js +1 -0
  250. package/dist/client/assets/{sidebar-scwXsjFh.js → sidebar-De3saejW.js} +1 -1
  251. package/dist/client/assets/{skill-preview-DN9PhO9W.js → skill-preview-BFdu9YNy.js} +1 -1
  252. package/dist/client/assets/{skills-7D59_aEr.js → skills-Cfwk_77h.js} +1 -1
  253. package/dist/client/assets/{sso-DXKGvN7S.js → sso-BTz6fGa9.js} +1 -1
  254. package/dist/client/assets/{store-2S5Y_Sm_.js → store-B5b4Jbmh.js} +1 -1
  255. package/dist/client/assets/store-registry-kbKJW4Nd.js +2 -0
  256. package/dist/client/assets/{switch-UqleIRW2.js → switch-Cv3P8_Un.js} +1 -1
  257. package/dist/client/assets/{synced-repos-I3mzZrDI.js → synced-repos-C9ov5U1O.js} +1 -1
  258. package/dist/client/assets/{table-DY3yh4UN.js → table-DCTjMuv9.js} +1 -1
  259. package/dist/client/assets/{tabs-CWunSDaT.js → tabs-BJOAfe9D.js} +1 -1
  260. package/dist/client/assets/{task-board-CU3xz_UX.js → task-board-Bp0cTOfv.js} +1 -1
  261. package/dist/client/assets/{task-route-5uvHoI6U.js → task-route-x3-kZj1v.js} +1 -1
  262. package/dist/client/assets/{task-status-CbgGINwj.js → task-status-EKbRG__N.js} +1 -1
  263. package/dist/client/assets/{taskboard-analytics-BWpTxoly.js → taskboard-analytics-DReJVXv9.js} +1 -1
  264. package/dist/client/assets/tasks-BDezZi9y.js +1 -0
  265. package/dist/client/assets/{tasks-DEJodw4w.js → tasks-BybQtXDr.js} +1 -1
  266. package/dist/client/assets/{textarea-D07XC_67.js → textarea-C1epfjF6.js} +1 -1
  267. package/dist/client/assets/{thread-button-BQ25_n_A.js → thread-button-DN66G5HX.js} +1 -1
  268. package/dist/client/assets/{thread-intent-CPB41f6a.js → thread-intent-BcDy5Qvw.js} +1 -1
  269. package/dist/client/assets/{thread-route-CDYfrzkB.js → thread-route-B40TxKtZ.js} +1 -1
  270. package/dist/client/assets/{thread-route-DJwg4XWL.js → thread-route-rDRKbI2J.js} +1 -1
  271. package/dist/client/assets/{thread-sheet-body-PhMLKGpO.js → thread-sheet-body-Bsn8Kpj5.js} +1 -1
  272. package/dist/client/assets/{toggle-group-CRsJ0kJ-.js → toggle-group-CyMnbShe.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-CLaEn_t2.js → toolbar-icon-button-C96R_FY_.js} +1 -1
  274. package/dist/client/assets/{tooltip-BdIw7qeF.js → tooltip-B6UxRepU.js} +1 -1
  275. package/dist/client/assets/{track-D7Zl0Ub2.js → track-BEzb3jCL.js} +1 -1
  276. package/dist/client/assets/{types-BFditkVL.js → types-BxKZ_jsI.js} +1 -1
  277. package/dist/client/assets/{usage-stats-CydE9W4n.js → usage-stats-BJ71CdH2.js} +1 -1
  278. package/dist/client/assets/{use-ai-providers-Jte2cXEd.js → use-ai-providers-0RxxLOiu.js} +1 -1
  279. package/dist/client/assets/{use-automations-DMglF-Hp.js → use-automations-CyDS5Ktw.js} +1 -1
  280. package/dist/client/assets/{use-autosave-BK4aenoc.js → use-autosave-wvNipd2j.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-CWVubK_K.js → use-connect-companion-CXSMXGsq.js} +1 -1
  282. package/dist/client/assets/{use-connection-CLDZmFlP.js → use-connection-CREpIwwx.js} +1 -1
  283. package/dist/client/assets/{use-copy-BwelGe7h.js → use-copy-hi0SQQDr.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-C0nekJmJ.js → use-create-virtual-mcp-Cq5i2GpA.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-9ht16XX5.js → use-date-fns-locale-DUCeDUxy.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-CxvwYE3R.js → use-debounced-autosave-BAj9ckjy.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-DTrA4F64.js → use-debounced-value-Ln0OSes2.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-toD66YNU.js → use-deco-credits-Da3sZzrF.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-Cr8-gyRq.js → use-decopilot-events-MTn7eENv.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-pojdnt_G.js → use-delete-connection-PZXjPSLo.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-BtzBlxtt.js → use-deployment-admin-BMF3tuBD.js} +1 -1
  292. package/dist/client/assets/{use-entitlements-Dd8GRYfR.js → use-entitlements-Bm13wAEi.js} +1 -1
  293. package/dist/client/assets/{use-fast-preview-draft-url-6t7oVPGL.js → use-fast-preview-draft-url-BWy0d2IY.js} +1 -1
  294. package/dist/client/assets/{use-file-configs-DEt6cPMd.js → use-file-configs-nq2ETRGx.js} +1 -1
  295. package/dist/client/assets/{use-in-settings-CpoJAiS9.js → use-in-settings--8i6OF3k.js} +1 -1
  296. package/dist/client/assets/{use-infinite-scroll-BxfFw7w5.js → use-infinite-scroll-CegnlwHv.js} +1 -1
  297. package/dist/client/assets/{use-join-requests-CIDw0OFM.js → use-join-requests-CVepHmjR.js} +1 -1
  298. package/dist/client/assets/{use-main-panel-tabs-D1QVss-2.js → use-main-panel-tabs-CyThRv_u.js} +1 -1
  299. package/dist/client/assets/{use-mcp-auth-status-Cg-aCR2N.js → use-mcp-auth-status-BWuSQQAH.js} +1 -1
  300. package/dist/client/assets/{use-mcp-client-CuZ_CH4K.js → use-mcp-client-C5UR6qvr.js} +1 -1
  301. package/dist/client/assets/{use-mcp-prompts-SnT9jAGG.js → use-mcp-prompts-Blnpu7_M.js} +1 -1
  302. package/dist/client/assets/{use-mcp-tools-DjSYGU3r.js → use-mcp-tools-CD8JPL_x.js} +1 -1
  303. package/dist/client/assets/{use-members-DTIbBdqQ.js → use-members-Y6H4hQ9Q.js} +1 -1
  304. package/dist/client/assets/{use-mobile-BwXePCI-.js → use-mobile-_vYKejdu.js} +1 -1
  305. package/dist/client/assets/{use-navigate-to-agent-DIxyyobE.js → use-navigate-to-agent-ClzIzQwY.js} +1 -1
  306. package/dist/client/assets/{use-open-billing-url-CnWEYZe0.js → use-open-billing-url-CcQE2pzG.js} +1 -1
  307. package/dist/client/assets/{use-org-auth-client-D-YRClZm.js → use-org-auth-client-BdDuz-5f.js} +1 -1
  308. package/dist/client/assets/{use-org-fs-6rzJUZWB.js → use-org-fs-SXZbeDBx.js} +1 -1
  309. package/dist/client/assets/{use-org-repo-syncs-BPvYovov.js → use-org-repo-syncs-B0Np_qpl.js} +1 -1
  310. package/dist/client/assets/{use-org-sso-EA4En7Bf.js → use-org-sso-CVxh5evd.js} +1 -1
  311. package/dist/client/assets/{use-organization-roles-DjL7Q_JO.js → use-organization-roles-DZim0Q7v.js} +1 -1
  312. package/dist/client/assets/{use-organization-settings-rcECAo5J.js → use-organization-settings-BjpjaZHP.js} +1 -1
  313. package/dist/client/assets/{use-panel-navigate-CCrHg3rQ.js → use-panel-navigate-BDUxATfN.js} +1 -1
  314. package/dist/client/assets/{use-project-native-view-presence-D_C9jbvc.js → use-project-native-view-presence-CZq1xLx3.js} +1 -1
  315. package/dist/client/assets/{use-project-scope-ChdEK9JU.js → use-project-scope-9qKpoK4A.js} +1 -1
  316. package/dist/client/assets/{use-registry-connections-C8ZRYmvy.js → use-registry-connections-fr8foU7v.js} +1 -1
  317. package/dist/client/assets/{use-releases-B2PktYSE.js → use-releases-BPLuJ3hz.js} +1 -1
  318. package/dist/client/assets/{use-reports-diagnostic-Ffc8G8Yb.js → use-reports-diagnostic-ZhpoqRPl.js} +1 -1
  319. package/dist/client/assets/{use-route-default-main-DTBEGWiB.js → use-route-default-main-Crq9PhT0.js} +1 -1
  320. package/dist/client/assets/{use-secrets-C2UFcx4t.js → use-secrets-BCJR8hU3.js} +1 -1
  321. package/dist/client/assets/{use-section-preview-base-D8AdMeK_.js → use-section-preview-base-CreVubEU.js} +1 -1
  322. package/dist/client/assets/{use-session-runtime-Kk87TZ4U.js → use-session-runtime-CML40czH.js} +1 -1
  323. package/dist/client/assets/{use-tags-BZaCfmft.js → use-tags-Dm5jirF3.js} +1 -1
  324. package/dist/client/assets/{use-task-board-analytics-Dbi3TI9y.js → use-task-board-analytics-VrcaEcAN.js} +1 -1
  325. package/dist/client/assets/{use-task-metadata-DptBPkcd.js → use-task-metadata-Dh6utP45.js} +1 -1
  326. package/dist/client/assets/{use-thread-outputs-DE9doz4g.js → use-thread-outputs-DKQDdrQw.js} +1 -1
  327. package/dist/client/assets/{use-view-mode-CavAJ0r0.js → use-view-mode-CCd9XC2d.js} +1 -1
  328. package/dist/client/assets/{use-virtual-mcp-4T8Uqtz2.js → use-virtual-mcp-B5lofcUX.js} +1 -1
  329. package/dist/client/assets/useInfiniteQuery-DhQmSZKM.js +1 -0
  330. package/dist/client/assets/{useQueries-D3RKoZYz.js → useQueries-fVi3k4Rv.js} +1 -1
  331. package/dist/client/assets/useSuspenseInfiniteQuery-yOry54FA.js +1 -0
  332. package/dist/client/assets/{users-WBHQMz8R.js → users-CjycFAIE.js} +1 -1
  333. package/dist/client/assets/{utils-CyaFhLFV.js → utils-BtXzNzBw.js} +1 -1
  334. package/dist/client/assets/{variant-calendar-DAIHFkeQ.js → variant-calendar-DxlQRwR9.js} +1 -1
  335. package/dist/client/assets/{variant-matcher-override-Dyv3s-dG.js → variant-matcher-override-BuXSuXUw.js} +1 -1
  336. package/dist/client/assets/{view-mode-toggle-DEbfOadi.js → view-mode-toggle-BUqj2VVK.js} +1 -1
  337. package/dist/client/assets/{virtual-mcp-DXgT3asw.js → virtual-mcp-B55SeF2l.js} +1 -1
  338. package/dist/client/index.html +1 -1
  339. package/dist/server/cli.js +1 -1
  340. package/dist/server/server.js +1 -1
  341. package/package.json +1 -1
  342. package/dist/client/assets/agent-app-CwhHpeQZ.js +0 -1
  343. package/dist/client/assets/agent-deck-w5dW0RRF.js +0 -1
  344. package/dist/client/assets/agent-file-BNrxE2XH.js +0 -1
  345. package/dist/client/assets/agent-library-file-CcAfTvZD.js +0 -1
  346. package/dist/client/assets/agent-settings-BUJ9WCtJ.js +0 -1
  347. package/dist/client/assets/agent-site-editor-code-UGzk7VE6.js +0 -2
  348. package/dist/client/assets/agent-view-CljCxEEY.js +0 -1
  349. package/dist/client/assets/api-keys-Vr2mIxG4.js +0 -1
  350. package/dist/client/assets/app-editor-D_IiCvgl.js +0 -1
  351. package/dist/client/assets/category-editor-DliRWtls.js +0 -1
  352. package/dist/client/assets/project-reports-ClF5O16Z.js +0 -1
  353. package/dist/client/assets/project-tasks-6eulHBR4.js +0 -1
  354. package/dist/client/assets/record-editor-CRgsUtua.js +0 -1
  355. package/dist/client/assets/registry-AgS1bUyh.js +0 -2
  356. package/dist/client/assets/reports-C6IYfeap.js +0 -1
  357. package/dist/client/assets/shell-layout-D6lfQGd1.js +0 -1
  358. package/dist/client/assets/store-registry-BkpvGjQw.js +0 -2
  359. package/dist/client/assets/tasks-cQIvs8Qh.js +0 -1
  360. package/dist/client/assets/useInfiniteQuery-Ds6mCrD2.js +0 -1
  361. package/dist/client/assets/useSuspenseInfiniteQuery-M0UgyPh7.js +0 -1
@@ -1 +1 @@
1
- import{c as n,l as f,j as i,bh as N,bg as y,as as S,bi as v,bj as $,bm as C,bl as w}from"./index-DQZBt6Fl.js";import{i as k}from"./X-DgI4yqfX.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(R,{}),e[6]=m):m=e[6];const x=p==="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",b=p==="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",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="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 r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("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",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(C,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 classic:rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none compact:rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,E as b,P as c,_ as d};
1
+ import{c as n,l as f,j as i,bh as N,bg as y,as as S,bi as v,bj as $,bm as C,bl as w}from"./index-COJyT2bn.js";import{i as k}from"./X-CZ5u1gQz.js";function E(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(y,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function z(o){const e=n.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx($,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(w,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function O(o){const e=n.c(20);let t,s,a,l,c;e[0]!==o?({className:s,children:t,side:l,hideCloseButton:c,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=c):(t=e[1],s=e[2],a=e[3],l=e[4],c=e[5]);const p=l===void 0?"right":l,h=c===void 0?!1:c;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(R,{}),e[6]=m):m=e[6];const x=p==="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",b=p==="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",g=p==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",j=p==="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 r;e[7]!==s||e[8]!==x||e[9]!==b||e[10]!==g||e[11]!==j?(r=f("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",x,b,g,j,s),e[7]=s,e[8]=x,e[9]=b,e[10]=g,e[11]=j,e[12]=r):r=e[12];let d;e[13]!==h?(d=!h&&i.jsxs(C,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 classic:rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none compact:rounded-lg",children:[i.jsx(k,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=h,e[14]=d):d=e[14];let u;return e[15]!==t||e[16]!==a||e[17]!==r||e[18]!==d?(u=i.jsxs(z,{children:[m,i.jsxs(S,{"data-slot":"sheet-content",className:r,...a,children:[t,d]})]}),e[15]=t,e[16]=a,e[17]=r,e[18]=d,e[19]=u):u=e[19],u}function P(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function T(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=i.jsx(N,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _(o){const e=n.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=f("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=i.jsx(v,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}export{T as S,O as a,E as b,P as c,_ as d};
@@ -0,0 +1 @@
1
+ import{c as z,b as W,e as Ye,j as n,B as F,t as Ve,bQ as me,R as Tt,a as Ke,y as Wt,D as Nt,K as Ue,bR as Yt,bS as Qt,$ as Be,l as dt,aJ as Xt,p as pt,bT as Zt,r as V,a1 as en,x as _t,aa as ie,d as At,a0 as gt,z as Pt,m as He,q as ut,au as Ct,bU as tn,aB as nn,aH as yt,bV as sn,bW as on,bX as an,bY as rn,bZ as ln,T as cn,u as dn,a3 as un,b_ as mn,b$ as fn,k as Et,c0 as lt,c1 as gn,c2 as hn,O as pn,c3 as yn}from"./index-COJyT2bn.js";import{A as at}from"./avatar-CQQzKV-7.js";import{t as Ot}from"./Globe04-DeorlaCZ.js";import{i as bn}from"./SearchLg-CttLARhB.js";import{ad as xn,ac as wn,ae as ee,r as Sn,af as vn,n as bt,g as jn,f as kn,ag as Tn,e as Nn}from"./agent-icon-CFdmLldh.js";import{s as _n}from"./XClose-BHW02Gld.js";import{D as An}from"./download-app-dialog-Ds79HQNt.js";import{a as Pn,u as Cn}from"./use-project-scope-9qKpoK4A.js";import{u as It,a as En}from"./use-panel-navigate-BDUxATfN.js";import{i as ae}from"./CheckCircle-DmDAlxUx.js";import{i as ct}from"./Tool02-CE2CsLyJ.js";import{i as ot}from"./Monitor01-DdH-ehTH.js";import{i as re}from"./Zap-B7SjQTF1.js";import{c as Lt,d as $t,b as Dt,D as Rt,h as On,e as In}from"./dialog-CDUwK9Ky.js";import{i as Ln}from"./Share07-DWRoaK9G.js";import{s as xt}from"./Plus-L4CMeo2h.js";import{a as $n}from"./Settings02-BW27aEc7.js";import{b as le,a as Ge,f as Dn,e as Rn,c as Mn,C as zn}from"./command-0Ma0zNRD.js";import{I as Fn}from"./integration-icon-G7jQWV_g.js";import{P as qn}from"./project-icon-BLMwD5MF.js";import{a as Bn,m as Kn}from"./use-mcp-client-C5UR6qvr.js";import{S as Hn,u as Un}from"./hooks-BOS6vZ4t.js";import{u as Gn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Jn}from"./required-auth-layout-DIMyOwy5.js";import{A as Vn}from"./autosend-BBTn4tWB.js";import{u as Wn,a as Yn,b as Qn,c as Xn}from"./thread-route-B40TxKtZ.js";import{b as Zn}from"./use-organization-settings-BjpjaZHP.js";import{u as es}from"./use-org-sso-CVxh5evd.js";function ts(t){const e=z.c(49),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let d;e[0]!==r||e[1]!==i?(d=async()=>{const j=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),P=await j.json();if(!j.ok||!P.success)throw new Error(P.error??i("common.autoDomainJoinScreen.joinError"));return P},e[0]=r,e[1]=i,e[2]=d):d=e[2];let m;e[3]!==r?(m=j=>{window.location.href=`/${j.slug??r}`},e[3]=r,e[4]=m):m=e[4];let f;e[5]!==i?(f=j=>{Ve.error(j instanceof Error?j.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=f):f=e[6];let S;e[7]!==d||e[8]!==m||e[9]!==f?(S={mutationFn:d,onSuccess:m,onError:f},e[7]=d,e[8]=m,e[9]=f,e[10]=S):S=e[10];const c=Ye(S),b=ns;let g;e[11]!==o||e[12]!==s?(g=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[11]=o,e[12]=s,e[13]=g):g=e[13];let x;e[14]!==s||e[15]!==i?(x=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=x):x=e[16];let l;e[17]!==x?(l=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[17]=x,e[18]=l):l=e[18];let u;e[19]!==a||e[20]!==i?(u=i("common.autoDomainJoinScreen.joinDescription",{domain:a}),e[19]=a,e[20]=i,e[21]=u):u=e[21];let p;e[22]!==u?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[22]=u,e[23]=p):p=e[23];let y;e[24]!==l||e[25]!==p?(y=n.jsxs("div",{className:"space-y-2",children:[l,p]}),e[24]=l,e[25]=p,e[26]=y):y=e[26];let w;e[27]!==c?(w=()=>c.mutate(),e[27]=c,e[28]=w):w=e[28];let v;e[29]!==c.isPending||e[30]!==s||e[31]!==i?(v=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=i,e[32]=v):v=e[32];let N;e[33]!==c.isPending||e[34]!==w||e[35]!==v?(N=n.jsx(F,{onClick:w,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=w,e[35]=v,e[36]=N):N=e[36];const A=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let _;e[39]!==c.isPending||e[40]!==T?(_=n.jsx(F,{variant:"ghost",onClick:b,disabled:A,children:T}),e[39]=c.isPending,e[40]=T,e[41]=_):_=e[41];let h;e[42]!==N||e[43]!==_?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,_]}),e[42]=N,e[43]=_,e[44]=h):h=e[44];let k;return e[45]!==y||e[46]!==h||e[47]!==g?(k=n.jsxs(me,{children:[g,y,h]}),e[45]=y,e[46]=h,e[47]=g,e[48]=k):k=e[48],k}function ns(){window.location.href="/"}function wt(t){const e=z.c(25),{orgSlug:s,orgName:r,reason:o}=t,a=W(),i=ss,d=o==="not-found",m=d?bn:Tt;let f;e[0]!==d||e[1]!==a?(f=a(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=a,e[2]=f):f=e[2];const S=f;let c;e[3]!==d||e[4]!==r||e[5]!==s||e[6]!==a?(c=d?n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[a("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:r??s}),".",n.jsx("br",{}),a("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=r,e[5]=s,e[6]=a,e[7]=c):c=e[7];const b=c;let g;e[8]!==m?(g=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(m,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=m,e[9]=g):g=e[9];let x;e[10]!==S?(x=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[10]=S,e[11]=x):x=e[11];let l;e[12]!==b?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),e[12]=b,e[13]=l):l=e[13];let u;e[14]!==x||e[15]!==l?(u=n.jsxs("div",{className:"space-y-2",children:[x,l]}),e[14]=x,e[15]=l,e[16]=u):u=e[16];let p;e[17]!==a?(p=a("common.noAccessScreen.goToHome"),e[17]=a,e[18]=p):p=e[18];let y;e[19]!==p?(y=n.jsx(F,{onClick:i,children:p}),e[19]=p,e[20]=y):y=e[20];let w;return e[21]!==g||e[22]!==u||e[23]!==y?(w=n.jsxs(me,{children:[g,u,y]}),e[21]=g,e[22]=u,e[23]=y,e[24]=w):w=e[24],w}function ss(){window.location.href="/"}function os(t){const e=z.c(59),{invitationId:s,orgName:r,orgSlug:o,orgLogo:a}=t,i=W();let d;e[0]!==s?(d=async()=>{const E=await Ke.organization.acceptInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[0]=s,e[1]=d):d=e[1];let m;e[2]!==o?(m=()=>{Wt(),window.location.href=`/${o}`},e[2]=o,e[3]=m):m=e[3];let f;e[4]!==i?(f=E=>{Ve.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=f):f=e[5];let S;e[6]!==d||e[7]!==m||e[8]!==f?(S={mutationFn:d,onSuccess:m,onError:f},e[6]=d,e[7]=m,e[8]=f,e[9]=S):S=e[9];const c=Ye(S);let b;e[10]!==s?(b=async()=>{const E=await Ke.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=b):b=e[11];let g,x;e[12]!==i?(g=()=>{Ve.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},x=E=>{Ve.error(E instanceof Error?E.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=g,e[14]=x):(g=e[13],x=e[14]);let l;e[15]!==b||e[16]!==g||e[17]!==x?(l={mutationFn:b,onSuccess:g,onError:x},e[15]=b,e[16]=g,e[17]=x,e[18]=l):l=e[18];const u=Ye(l),p=c.isPending||u.isPending;let y;e[19]!==a||e[20]!==r?(y=a?n.jsx(at,{url:a,fallback:r.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(xn,{className:"h-6 w-6 text-primary"})}),e[19]=a,e[20]=r,e[21]=y):y=e[21];let w;e[22]!==r||e[23]!==i?(w=i("common.pendingInviteScreen.invitedTo",{orgName:r}),e[22]=r,e[23]=i,e[24]=w):w=e[24];let v;e[25]!==w?(v=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[25]=w,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 A;e[29]!==N?(A=n.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[29]=N,e[30]=A):A=e[30];let T;e[31]!==v||e[32]!==A?(T=n.jsxs("div",{className:"space-y-2",children:[v,A]}),e[31]=v,e[32]=A,e[33]=T):T=e[33];let _;e[34]!==c?(_=()=>c.mutate(),e[34]=c,e[35]=_):_=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let k;e[39]!==p||e[40]!==_||e[41]!==h?(k=n.jsx(F,{onClick:_,disabled:p,children:h}),e[39]=p,e[40]=_,e[41]=h,e[42]=k):k=e[42];let j;e[43]!==u?(j=()=>u.mutate(),e[43]=u,e[44]=j):j=e[44];let P;e[45]!==u.isPending||e[46]!==i?(P=u.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=u.isPending,e[46]=i,e[47]=P):P=e[47];let O;e[48]!==p||e[49]!==j||e[50]!==P?(O=n.jsx(F,{variant:"ghost",onClick:j,disabled:p,children:P}),e[48]=p,e[49]=j,e[50]=P,e[51]=O):O=e[51];let C;e[52]!==k||e[53]!==O?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[k,O]}),e[52]=k,e[53]=O,e[54]=C):C=e[54];let I;return e[55]!==T||e[56]!==C||e[57]!==y?(I=n.jsxs(me,{children:[y,T,C]}),e[55]=T,e[56]=C,e[57]=y,e[58]=I):I=e[58],I}function is(t){const e=z.c(23),{orgName:s,orgLogo:r}=t,o=W();let a;e[0]!==r||e[1]!==s?(a=r?n.jsx(at,{url:r,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(wn,{className:"h-6 w-6 text-primary"})}),e[0]=r,e[1]=s,e[2]=a):a=e[2];let i;e[3]!==o?(i=o("common.requestPendingScreen.title"),e[3]=o,e[4]=i):i=e[4];let d;e[5]!==i?(d=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=d):d=e[6];let m;e[7]!==s||e[8]!==o?(m=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=m):m=e[9];let f;e[10]!==m?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[10]=m,e[11]=f):f=e[11];let S;e[12]!==d||e[13]!==f?(S=n.jsxs("div",{className:"space-y-2",children:[d,f]}),e[12]=d,e[13]=f,e[14]=S):S=e[14];let c;e[15]!==o?(c=o("common.requestPendingScreen.goHome"),e[15]=o,e[16]=c):c=e[16];let b;e[17]!==c?(b=n.jsx(F,{variant:"ghost",onClick:as,children:c}),e[17]=c,e[18]=b):b=e[18];let g;return e[19]!==a||e[20]!==S||e[21]!==b?(g=n.jsxs(me,{children:[a,S,b]}),e[19]=a,e[20]=S,e[21]=b,e[22]=g):g=e[22],g}function as(){window.location.href="/"}function rs(t){const e=z.c(45),{orgName:s,orgSlug:r,orgLogo:o,domain:a}=t,i=W();let d;e[0]!==r?(d=async()=>{const k=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),j=await k.json();if(!k.ok||!j.success)throw new Error(j.error??"Failed to request access");return j},e[0]=r,e[1]=d):d=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=cs,e[2]=m):m=e[2];let f;e[3]!==i?(f=k=>{Ve.error(k instanceof Error?k.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=f):f=e[4];let S;e[5]!==d||e[6]!==f?(S={mutationFn:d,onSuccess:m,onError:f},e[5]=d,e[6]=f,e[7]=S):S=e[7];const c=Ye(S);let b;e[8]!==o||e[9]!==s?(b=o?n.jsx(at,{url:o,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Ot,{className:"h-6 w-6 text-primary"})}),e[8]=o,e[9]=s,e[10]=b):b=e[10];let g;e[11]!==s||e[12]!==i?(g=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=g):g=e[13];let x;e[14]!==g?(x=n.jsx("h3",{className:"text-lg font-medium",children:g}),e[14]=g,e[15]=x):x=e[15];let l;e[16]!==a||e[17]!==i?(l=i("common.requestToJoinScreen.description",{domain:a}),e[16]=a,e[17]=i,e[18]=l):l=e[18];let u;e[19]!==l?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[19]=l,e[20]=u):u=e[20];let p;e[21]!==x||e[22]!==u?(p=n.jsxs("div",{className:"space-y-2",children:[x,u]}),e[21]=x,e[22]=u,e[23]=p):p=e[23];let y;e[24]!==c?(y=()=>c.mutate(),e[24]=c,e[25]=y):y=e[25];let w;e[26]!==c.isPending||e[27]!==i?(w=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=w):w=e[28];let v;e[29]!==c.isPending||e[30]!==y||e[31]!==w?(v=n.jsx(F,{onClick:y,disabled:c.isPending,children:w}),e[29]=c.isPending,e[30]=y,e[31]=w,e[32]=v):v=e[32];const N=c.isPending;let A;e[33]!==i?(A=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=A):A=e[34];let T;e[35]!==c.isPending||e[36]!==A?(T=n.jsx(F,{variant:"ghost",onClick:ls,disabled:N,children:A}),e[35]=c.isPending,e[36]=A,e[37]=T):T=e[37];let _;e[38]!==v||e[39]!==T?(_=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,T]}),e[38]=v,e[39]=T,e[40]=_):_=e[40];let h;return e[41]!==p||e[42]!==_||e[43]!==b?(h=n.jsxs(me,{children:[b,p,_]}),e[41]=p,e[42]=_,e[43]=b,e[44]=h):h=e[44],h}function ls(){window.location.href="/"}function cs(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function ds(t){const e=z.c(7);let s;e[0]!==t?(s=Ue.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==t?(r=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=r):r=e[3];let o;return e[4]!==s||e[5]!==r?(o={queryKey:s,queryFn:r,refetchOnWindowFocus:!1},e[4]=s,e[5]=r,e[6]=o):o=e[6],Nt(o)}function us({orgSlug:t}){const{data:e}=ds(t);if(e.status!=="member"){Yt()?.org===t&&Qt();const s=localStorage.getItem(Be.lastOrgSlug())===t;if(s&&localStorage.removeItem(Be.lastOrgSlug()),s&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(wt,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(os,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ts,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(rs,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(is,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(wt,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Mt(t){const e=z.c(42),{ariaLabel:s,dismissLabel:r,eyebrow:o,title:a,description:i,icon:d,children:m,footerLeading:f,actions:S,onDismiss:c,tone:b}=t,g=b===void 0?"neutral":b,x=f||S;let l;e[0]!==g?(l=g==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=g,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(_n,{size:14}),e[2]=u):u=e[2];let p;e[3]!==r||e[4]!==c?(p=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":r,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:u}),e[3]=r,e[4]=c,e[5]=p):p=e[5];const y=d&&"flex items-start gap-3",w=m&&"pb-3";let v;e[6]!==y||e[7]!==w?(v=dt("p-4 pr-11",y,w),e[6]=y,e[7]=w,e[8]=v):v=e[8];let N;e[9]!==d?(N=d&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:d}),e[9]=d,e[10]=N):N=e[10];let A;e[11]!==o?(A=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=A):A=e[12];let T;e[13]!==a?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:a}),e[13]=a,e[14]=T):T=e[14];let _;e[15]!==i?(_=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=_):_=e[16];let h;e[17]!==T||e[18]!==_||e[19]!==A?(h=n.jsxs("div",{children:[A,T,_]}),e[17]=T,e[18]=_,e[19]=A,e[20]=h):h=e[20];let k;e[21]!==m?(k=m&&n.jsx("div",{className:"mt-3",children:m}),e[21]=m,e[22]=k):k=e[22];let j;e[23]!==h||e[24]!==k?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,k]}),e[23]=h,e[24]=k,e[25]=j):j=e[25];let P;e[26]!==j||e[27]!==v||e[28]!==N?(P=n.jsxs("div",{className:v,children:[N,j]}),e[26]=j,e[27]=v,e[28]=N,e[29]=P):P=e[29];let O;e[30]!==S||e[31]!==f||e[32]!==x||e[33]!==g?(O=x&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",g==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:f}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:S})]}),e[30]=S,e[31]=f,e[32]=x,e[33]=g,e[34]=O):O=e[34];let C;return e[35]!==s||e[36]!==P||e[37]!==O||e[38]!==l||e[39]!==p||e[40]!==g?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":g,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:[l,p,P,O]}),e[35]=s,e[36]=P,e[37]=O,e[38]=l,e[39]=p,e[40]=g,e[41]=C):C=e[41],C}const ms={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function zt(t){return`[data-tour="${ms[t]}"]`}const fs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function gs(t){return fs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function hs(t,e){return gs(e).map(s=>({element:zt(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const ps=zt("switcher"),ys=30;function Ft(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function bs(t,e){return hs(t,e).filter(s=>typeof s.element=="string"&&Ft(s.element))}function xs(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:r})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const o=document.createElement("button");o.type="button",o.className="driver-popover-footer-btn layout-tour-skip",o.textContent=t("layoutTour.skip"),o.addEventListener("click",()=>r.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Je=!1},steps:e}}let Je=!1;async function ws(){return(await Xt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function Ss(t,e){if(Je)return;Je=!0;let s=0;const r=()=>{if(!Ft(ps)&&s++<ys){requestAnimationFrame(r);return}const o=bs(t,e);if(o.length===0){Je=!1;return}ws().then(a=>{a(xs(t,o)).drive()}).catch(()=>{Je=!1})};r()}function vs(t){return t!=="off"}function ri(t){if(!t.hasSource)return[];const e=["site-editor"];return vs(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function qt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function li(t){return t.reportsOnly&&!t.onReportAgent&&qt(t.tabId)}const js=[{id:"new-layout",date:"2026-09-17",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:ot,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:ct,title:"Consistent sidebar navigation",body:"Settings and project pages now use a predictable sidebar for sections, instead of scattered tabs and buttons."},{icon:ee,title:"Refined controls & mobile",body:"Buttons and toolbars have been redesigned for clarity. The layout adapts gracefully to smaller screens with the same consistent structure."}],cta:{label:"Try it now",action:"enable-new-layout"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:pt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:ee,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:ot,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:ot,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ae,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:re,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:re,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:ee,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:Zt,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:ot,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:ee,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ae,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:re,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:ee,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:ae,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:re,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:ae,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:ee,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:re,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:ee,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:ae,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:re,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:ee,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:ae,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:re,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:ee,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:ct,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:ae,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:pt,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:re,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:ae,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:ee,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:ct,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:ee,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:Sn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Bt=js,it="studio.release-feed.v1",mt=new Set;let de="",ue={},ft=!1;function ks(){if(ft)return de||"{}";try{return localStorage.getItem(it)??"{}"}catch{return de||"{}"}}function Kt(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=ks();return t!==de&&(de=t,ue=Kt(t)),ue}function Ts(t){mt.add(t);const e=s=>{if(!(s.key!==it&&s.key!==null)){try{const r=localStorage.getItem(it)??"{}",a={...Kt(r),...ue};ue=a,de=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function Ns(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(it,de),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function _s(){const t=z.c(7),e=V.useSyncExternalStore(Ts,St,St);let s;t[0]!==e?(s=m=>!!e[m],t[0]=e,t[1]=s):s=t[1];const r=s,o=As;let a;t[2]!==e?(a=Bt.reduce((m,f)=>e[f.id]?m:m+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let d;return t[4]!==r||t[5]!==i?(d={isSeen:r,markSeen:o,unseenCount:i},t[4]=r,t[5]=i,t[6]=d):d=t[6],d}function As(t){ue[t]||Ns({...ue,[t]:{seenAt:new Date().toISOString()}})}const Ps=720*60*60*1e3,Cs=10080*60*1e3;function Es(t){const[e,s,r]=t.split("-").map(Number);return!e||!s||!r?new Date(t).getTime():new Date(e,s-1,r).getTime()}function Os(t){const e=Bt[0];if(!e)return null;const s=Es(e.date),r=t-s;return r<0||r>Ps?null:e}function Is(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 Ls(t,e){const s=Is(t);return s===null?!1:e-s>=Cs}function $s(){const t=z.c(57),e=W(),s=Pn(),r=en(),o=It(),a=!!s,i=r===ie.home&&!s;let d;t[0]!==o||t[1]!==a?(d=a&&!!o&&qt(o),t[0]=o,t[1]=a,t[2]=d):d=t[2];const m=d,{data:f}=Ke.useSession(),{isSeen:S,markSeen:c}=_s(),[,b]=_t(),[g,x]=V.useState(!1);let l,u,p;if(t[3]!==S||t[4]!==f?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{const M=Date.now();if(l=Os(M),!l){p=null;break e}if(!Ls(f?.user?.createdAt,M)){p=null;break e}u=S(l.id)}t[3]=S,t[4]=f?.user?.createdAt,t[5]=l,t[6]=u,t[7]=p}else l=t[5],u=t[6],p=t[7];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(u)return null;let y;t[8]!==l.id||t[9]!==a||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==e?(y=()=>{c(l.id),Ss(e,{onOrgHome:i,inProject:a,onSiteEditor:m})},t[8]=l.id,t[9]=a,t[10]=c,t[11]=i,t[12]=m,t[13]=e,t[14]=y):y=t[14];const w=y;let v;t[15]!==l.id||t[16]!==c||t[17]!==b?(v=()=>{b(Rs),c(l.id)},t[15]=l.id,t[16]=c,t[17]=b,t[18]=v):v=t[18];const N=v;let A;t[19]!==e?(A=e("announcements.release.ariaLabel"),t[19]=e,t[20]=A):A=t[20];let T;t[21]!==e?(T=e("announcements.release.dismiss"),t[21]=e,t[22]=T):T=t[22];const _=l.eyebrow,h=l.title;let k;t[23]!==l.id||t[24]!==c?(k=()=>c(l.id),t[23]=l.id,t[24]=c,t[25]=k):k=t[25];let j;t[26]!==l.id||t[27]!==l.learnMoreHref||t[28]!==c||t[29]!==e?(j=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[26]=l.id,t[27]=l.learnMoreHref,t[28]=c,t[29]=e,t[30]=j):j=t[30];let P;t[31]!==l.cta||t[32]!==l.id||t[33]!==N||t[34]!==c||t[35]!==w?(P=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:w,children:l.cta.label}):l.cta.action==="enable-new-layout"?n.jsx(F,{size:"sm",onClick:N,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>x(!0),children:l.cta.label}):null,t[31]=l.cta,t[32]=l.id,t[33]=N,t[34]=c,t[35]=w,t[36]=P):P=t[36];let O;t[37]!==l.bullets?(O=l.bullets.map(Ds),t[37]=l.bullets,t[38]=O):O=t[38];let C;t[39]!==O?(C=n.jsx("ul",{className:"flex flex-col gap-3",children:O}),t[39]=O,t[40]=C):C=t[40];let I;t[41]!==l.id||t[42]!==c?(I=M=>{x(M),M||c(l.id)},t[41]=l.id,t[42]=c,t[43]=I):I=t[43];let E;t[44]!==g||t[45]!==I?(E=n.jsx(An,{open:g,onOpenChange:I}),t[44]=g,t[45]=I,t[46]=E):E=t[46];let D;return t[47]!==l.eyebrow||t[48]!==l.title||t[49]!==j||t[50]!==P||t[51]!==C||t[52]!==E||t[53]!==A||t[54]!==T||t[55]!==k?(D=n.jsxs(Mt,{ariaLabel:A,dismissLabel:T,eyebrow:_,title:h,onDismiss:k,footerLeading:j,actions:P,children:[C,E]}),t[47]=l.eyebrow,t[48]=l.title,t[49]=j,t[50]=P,t[51]=C,t[52]=E,t[53]=A,t[54]=T,t[55]=k,t[56]=D):D=t[56],D}function Ds(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)}function Rs(t){return{...t,compactPageLayout:!0}}const Ht=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ce=Ht?"⌘":"Ctrl",J={commandPalette:{keys:[ce,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[ce,"["],description:"Back to previous"},focusChatInput:{keys:[ce,"L"],description:"Focus chat input"},saveAndFormat:{keys:[ce,"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:[ce,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[ce,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",ce,"S"],description:"New task"},toggleDaemon:{keys:[ce,"D"],description:"Toggle daemon logs"}},Ms=[{label:"General",shortcuts:[J.commandPalette,J.keyboardShortcuts,J.back,J.newTask,J.toggleDaemon]},{label:"Editor",shortcuts:[J.saveAndFormat]},{label:"Chat",shortcuts:[J.focusChatInput,J.togglePlanMode,J.sendMessage,J.newLine]},{label:"Questions",shortcuts:[J.selectOption]},{label:"Monitoring",shortcuts:[J.applyFilter]}];function vt(t){return Ht?t.metaKey:t.ctrlKey}function zs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Fs(t){const e=z.c(11),{open:s,onOpenChange:r}=t,o=W();let a;e[0]!==o?(a=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==a?(i=n.jsx(Lt,{children:n.jsx($t,{children:a})}),e[2]=a,e[3]=i):i=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:Ms.map(qs)}),e[4]=d):d=e[4];let m;e[5]!==i?(m=n.jsxs(Dt,{className:"sm:max-w-md",children:[i,d]}),e[5]=i,e[6]=m):m=e[6];let f;return e[7]!==r||e[8]!==s||e[9]!==m?(f=n.jsx(Rt,{open:s,onOpenChange:r,children:m}),e[7]=r,e[8]=s,e[9]=m,e[10]=f):f=e[10],f}function qs(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(Bs)})]},t.label)}function Bs(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(Ks)})]},t.description)}function Ks(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 jt=8;function Hs(t){const{org:e}=gt(),s=Bn({connectionId:Pt,orgId:e.id,orgSlug:e.slug}),{data:r}=He({queryKey:Ue.globalSearch(e.id,t,jt),enabled:!!s&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!s)return[];try{return(await s.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:jt}})).structuredContent?.items??[]}catch{return[]}}});return r??[]}function Us(t){const e=z.c(195),{open:s,onOpenChange:r}=t,o=W(),a=At(),{org:i}=gt(),{projects:d,hasProjects:m}=Cn(),[f,S]=V.useState(""),c=V.useDeferredValue(f),b=Hs(c);let g;e[0]!==r?(g=()=>{r(!1),S("")},e[0]=r,e[1]=g):g=e[1];const x=g;let l;e[2]!==x?(l=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),x()},e[2]=x,e[3]=l):l=e[3];const u=l;let p;e[4]!==a||e[5]!==i.id||e[6]!==i.slug?(p=q=>{if(q.type==="connection"){if(!q.slug){a({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}a({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:q.slug}});return}if(q.type==="task"){a({to:ie.tasks,params:{org:i.slug,taskKey:q.key??void 0}});return}const Y=Ct(i.id).id;tn(a,nn({org:i.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=a,e[5]=i.id,e[6]=i.slug,e[7]=p):p=e[7];const y=p;let w;e[8]!==f?(w=[f],e[8]=f,e[9]=w):w=e[9];const v=w;let N,A,T,_,h,k,j,P,O,C,I,E,D;if(e[10]!==x||e[11]!==u||e[12]!==m||e[13]!==b||e[14]!==a||e[15]!==r||e[16]!==s||e[17]!==y||e[18]!==i.slug||e[19]!==d||e[20]!==v||e[21]!==o||e[22]!==f){const q=b.filter(Js),Y=b.filter(Gs);let ne;e[36]!==i.slug?(ne={org:i.slug},e[36]=i.slug,e[37]=ne):ne=e[37];const R=ne;let te;e[38]!==o?(te=o("sidebar.navDestinations.home"),e[38]=o,e[39]=te):te=e[39];let Q;e[40]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(jn,{"aria-hidden":"true"}),e[40]=Q):Q=e[40];let K;e[41]!==R||e[42]!==te?(K={key:"home",label:te,icon:Q,to:ie.home,params:R},e[41]=R,e[42]=te,e[43]=K):K=e[43];let X;e[44]!==o?(X=o("sidebar.navDestinations.reports"),e[44]=o,e[45]=X):X=e[45];let se;e[46]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(kn,{"aria-hidden":"true"}),e[46]=se):se=e[46];let H;e[47]!==R||e[48]!==X?(H={key:"reports",label:X,icon:se,to:ie.reports,params:R},e[47]=R,e[48]=X,e[49]=H):H=e[49];let U;e[50]!==o?(U=o("sidebar.navDestinations.tasks"),e[50]=o,e[51]=U):U=e[51];let oe;e[52]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(bt,{"aria-hidden":"true"}),e[52]=oe):oe=e[52];let Z;e[53]!==i.slug?(Z={org:i.slug,taskKey:void 0},e[53]=i.slug,e[54]=Z):Z=e[54];let L;e[55]!==U||e[56]!==Z?(L={key:"tasks",label:U,icon:oe,to:ie.tasks,params:Z},e[55]=U,e[56]=Z,e[57]=L):L=e[57];let B;e[58]!==o?(B=o("sidebar.navDestinations.library"),e[58]=o,e[59]=B):B=e[59];let Qe;e[60]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(Ln,{"aria-hidden":"true"}),e[60]=Qe):Qe=e[60];let fe;e[61]!==R||e[62]!==B?(fe={key:"library",label:B,icon:Qe,to:ie.library,params:R},e[61]=R,e[62]=B,e[63]=fe):fe=e[63];let ge;e[64]!==o?(ge=o("sidebar.navDestinations.discover"),e[64]=o,e[65]=ge):ge=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(Tn,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let he;e[67]!==R||e[68]!==ge?(he={key:"discover",label:ge,icon:Xe,to:ie.discover,params:R},e[67]=R,e[68]=ge,e[69]=he):he=e[69];let Ze;e[70]!==K||e[71]!==H||e[72]!==L||e[73]!==fe||e[74]!==he?(Ze=[K,H,L,fe,he],e[70]=K,e[71]=H,e[72]=L,e[73]=fe,e[74]=he,e[75]=Ze):Ze=e[75];const rt=Ze;A=Dn,_=s,e[76]!==x||e[77]!==r?(h=$=>$?r(!0):x(),e[76]=x,e[77]=r,e[78]=h):h=e[78],e[79]!==o?(k=o("commandPalette.title"),e[79]=o,e[80]=k):k=e[80],e[81]!==o?(j=o("commandPalette.description"),e[81]=o,e[82]=j):j=e[82];let pe;e[83]!==o?(pe=o("commandPalette.placeholder"),e[83]=o,e[84]=pe):pe=e[84];let ye;e[85]!==o?(ye=o("commandPalette.placeholder"),e[85]=o,e[86]=ye):ye=e[86],e[87]!==pe||e[88]!==ye||e[89]!==f?(P=n.jsx(Rn,{placeholder:pe,"aria-label":ye,value:f,onValueChange:S}),e[87]=pe,e[88]=ye,e[89]=f,e[90]=P):P=e[90],N=Mn;let be;e[91]!==o?(be=o("commandPalette.empty"),e[91]=o,e[92]=be):be=e[92],e[93]!==be?(O=n.jsx(zn,{children:be}),e[93]=be,e[94]=O):O=e[94];let xe;e[95]!==o?(xe=o("commandPalette.goTo"),e[95]=o,e[96]=xe):xe=e[96];let we;e[97]!==rt||e[98]!==u||e[99]!==a?(we=rt.map($=>n.jsxs(le,{onSelect:()=>u(()=>a({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=u,e[99]=a,e[100]=we):we=e[100],e[101]!==xe||e[102]!==we?(C=n.jsx(Ge,{heading:xe,children:we}),e[101]=xe,e[102]=we,e[103]=C):C=e[103],e[104]!==u||e[105]!==m||e[106]!==a||e[107]!==i.slug||e[108]!==d||e[109]!==o?(I=m&&n.jsx(Ge,{heading:o("commandPalette.projects"),children:d.map($=>n.jsxs(le,{value:`project ${$.title}`,onSelect:()=>u(()=>a({to:ie.projects,params:{org:i.slug,agentId:$.id}}),"project"),children:[n.jsx(qn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=u,e[105]=m,e[106]=a,e[107]=i.slug,e[108]=d,e[109]=o,e[110]=I):I=e[110];let Se;e[111]!==o?(Se=o("commandPalette.actions"),e[111]=o,e[112]=Se):Se=e[112];let ve;e[113]!==o?(ve=o("commandPalette.newProject"),e[113]=o,e[114]=ve):ve=e[114];let je;e[115]!==u||e[116]!==a||e[117]!==R?(je=()=>u(()=>a({to:ie.home,params:R}),"new_project"),e[115]=u,e[116]=a,e[117]=R,e[118]=je):je=e[118];let et;e[119]===Symbol.for("react.memo_cache_sentinel")?(et=n.jsx(xt,{"aria-hidden":"true"}),e[119]=et):et=e[119];let ke;e[120]!==o?(ke=o("commandPalette.newProject"),e[120]=o,e[121]=ke):ke=e[121];let Te;e[122]!==ke?(Te=n.jsx("span",{children:ke}),e[122]=ke,e[123]=Te):Te=e[123];let Ne;e[124]!==ve||e[125]!==je||e[126]!==Te?(Ne=n.jsxs(le,{value:ve,onSelect:je,children:[et,Te]}),e[124]=ve,e[125]=je,e[126]=Te,e[127]=Ne):Ne=e[127];let _e;e[128]!==o?(_e=o("commandPalette.inviteTeammate"),e[128]=o,e[129]=_e):_e=e[129];let Ae;e[130]!==u||e[131]!==a||e[132]!==R?(Ae=()=>u(()=>a({to:"/$org/settings/members",params:R}),"invite"),e[130]=u,e[131]=a,e[132]=R,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(Nn,{"aria-hidden":"true"}),e[134]=tt):tt=e[134];let Pe;e[135]!==o?(Pe=o("commandPalette.inviteTeammate"),e[135]=o,e[136]=Pe):Pe=e[136];let Ce;e[137]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[137]=Pe,e[138]=Ce):Ce=e[138];let Ee;e[139]!==_e||e[140]!==Ae||e[141]!==Ce?(Ee=n.jsxs(le,{value:_e,onSelect:Ae,children:[tt,Ce]}),e[139]=_e,e[140]=Ae,e[141]=Ce,e[142]=Ee):Ee=e[142];let Oe;e[143]!==o?(Oe=o("commandPalette.addConnection"),e[143]=o,e[144]=Oe):Oe=e[144];let Ie;e[145]!==u||e[146]!==a||e[147]!==R?(Ie=()=>u(()=>a({to:"/$org/settings/connections",params:R,search:{tab:"all"}}),"add_connection"),e[145]=u,e[146]=a,e[147]=R,e[148]=Ie):Ie=e[148];let nt;e[149]===Symbol.for("react.memo_cache_sentinel")?(nt=n.jsx(xt,{"aria-hidden":"true"}),e[149]=nt):nt=e[149];let Le;e[150]!==o?(Le=o("commandPalette.addConnection"),e[150]=o,e[151]=Le):Le=e[151];let $e;e[152]!==Le?($e=n.jsx("span",{children:Le}),e[152]=Le,e[153]=$e):$e=e[153];let De;e[154]!==Oe||e[155]!==Ie||e[156]!==$e?(De=n.jsxs(le,{value:Oe,onSelect:Ie,children:[nt,$e]}),e[154]=Oe,e[155]=Ie,e[156]=$e,e[157]=De):De=e[157];let Re;e[158]!==o?(Re=o("commandPalette.settings"),e[158]=o,e[159]=Re):Re=e[159];let Me;e[160]!==u||e[161]!==a||e[162]!==R?(Me=()=>u(()=>a({to:"/$org/settings/general",params:R}),"settings"),e[160]=u,e[161]=a,e[162]=R,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx($n,{"aria-hidden":"true"}),e[164]=st):st=e[164];let ze;e[165]!==o?(ze=o("commandPalette.settings"),e[165]=o,e[166]=ze):ze=e[166];let Fe;e[167]!==ze?(Fe=n.jsx("span",{children:ze}),e[167]=ze,e[168]=Fe):Fe=e[168];let qe;e[169]!==Re||e[170]!==Me||e[171]!==Fe?(qe=n.jsxs(le,{value:Re,onSelect:Me,children:[st,Fe]}),e[169]=Re,e[170]=Me,e[171]=Fe,e[172]=qe):qe=e[172],e[173]!==Se||e[174]!==Ne||e[175]!==Ee||e[176]!==De||e[177]!==qe?(E=n.jsxs(Ge,{heading:Se,children:[Ne,Ee,De,qe]}),e[173]=Se,e[174]=Ne,e[175]=Ee,e[176]=De,e[177]=qe,e[178]=E):E=e[178],D=q.length>0&&n.jsx(Ge,{heading:o("commandPalette.connections"),children:q.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>y($),"connection"),children:[n.jsx(Fn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),T=Y.length>0&&n.jsx(Ge,{heading:o("commandPalette.results"),children:Y.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>u(()=>y($),$.type),children:[$.type==="thread"?n.jsx(vn,{"aria-hidden":"true"}):n.jsx(bt,{"aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title}),$.type==="task"&&$.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:$.key})]},`${$.type}:${$.id}`))}),e[10]=x,e[11]=u,e[12]=m,e[13]=b,e[14]=a,e[15]=r,e[16]=s,e[17]=y,e[18]=i.slug,e[19]=d,e[20]=v,e[21]=o,e[22]=f,e[23]=N,e[24]=A,e[25]=T,e[26]=_,e[27]=h,e[28]=k,e[29]=j,e[30]=P,e[31]=O,e[32]=C,e[33]=I,e[34]=E,e[35]=D}else N=e[23],A=e[24],T=e[25],_=e[26],h=e[27],k=e[28],j=e[29],P=e[30],O=e[31],C=e[32],I=e[33],E=e[34],D=e[35];let M;e[179]!==N||e[180]!==T||e[181]!==O||e[182]!==C||e[183]!==I||e[184]!==E||e[185]!==D?(M=n.jsxs(N,{children:[O,C,I,E,D,T]}),e[179]=N,e[180]=T,e[181]=O,e[182]=C,e[183]=I,e[184]=E,e[185]=D,e[186]=M):M=e[186];let G;return e[187]!==A||e[188]!==_||e[189]!==h||e[190]!==k||e[191]!==j||e[192]!==P||e[193]!==M?(G=n.jsxs(A,{open:_,onOpenChange:h,title:k,description:j,children:[P,M]}),e[187]=A,e[188]=_,e[189]=h,e[190]=k,e[191]=j,e[192]=P,e[193]=M,e[194]=G):G=e[194],G}function Gs(t){return t.type!=="connection"}function Js(t){return t.type==="connection"}const We=new Hn(!1);function Vs(){We.set(!0)}function Ws(){We.set(!1)}function Ys(){const t=z.c(2),e=V.useSyncExternalStore(We.subscribe,We.get);let s;return t[0]!==e?(s=[e,We.set],t[0]=e,t[1]=s):s=t[1],s}const Qs=300*1e3,Xs=2;function Zs(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 eo(t,e){return t.count>=Xs&&t.version!==null&&t.version!==e}function to(){const t=z.c(43),e=W(),s=Gn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={mutationFn:so},t[0]=r):r=t[0];const o=Ye(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:Ue.appVersionCheck(),queryFn:no,refetchInterval:Qs,refetchIntervalInBackground:!0,staleTime:0},t[1]=a):a=t[1];const{data:i,dataUpdatedAt:d}=He(a),[m,f]=V.useState(0);let S;t[2]===Symbol.for("react.memo_cache_sentinel")?(S={version:null,count:0},t[2]=S):S=t[2];const[c,b]=V.useState(S);d!==m&&(f(d),b(M=>Zs(M,i,"4.376.0")));const[g,x]=V.useState(null),l=s;let u;t[3]!==s||t[4]!==o?(u=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=u):u=t[5];const p=u,y="announcements.version.refresh";if(!eo(c,g))return null;let w;t[6]!==e?(w=e("announcements.version.ariaLabel"),t[6]=e,t[7]=w):w=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let N;t[10]!==e?(N=e("announcements.version.eyebrow"),t[10]=e,t[11]=N):N=t[11];let A;t[12]!==e?(A=e("announcements.version.title"),t[12]=e,t[13]=A):A=t[13];const T="announcements.version.description";let _;t[14]!==e||t[15]!==T?(_=e(T),t[14]=e,t[15]=T,t[16]=_):_=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(yt,{size:16}),t[17]=h):h=t[17];let k;t[18]!==c.version?(k=()=>x(c.version),t[18]=c.version,t[19]=k):k=t[19];let j;t[20]!==e?(j=e("announcements.version.currentSession",{version:"4.376.0"}),t[20]=e,t[21]=j):j=t[21];let P;t[22]!==y||t[23]!==e?(P=e(y),t[22]=y,t[23]=e,t[24]=P):P=t[24];const O=l;let C;t[25]!==O?(C=dt(O),t[25]=O,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let E;t[29]!==p||t[30]!==l||t[31]!==P||t[32]!==I?(E=n.jsxs(F,{size:"sm",disabled:l,onClick:p,children:[P,I]}),t[29]=p,t[30]=l,t[31]=P,t[32]=I,t[33]=E):E=t[33];let D;return t[34]!==k||t[35]!==j||t[36]!==E||t[37]!==w||t[38]!==v||t[39]!==N||t[40]!==A||t[41]!==_?(D=n.jsx(Mt,{ariaLabel:w,dismissLabel:v,eyebrow:N,title:A,description:_,icon:h,tone:"system",onDismiss:k,footerLeading:j,actions:E}),t[34]=k,t[35]=j,t[36]=E,t[37]=w,t[38]=v,t[39]=N,t[40]=A,t[41]=_,t[42]=D):D=t[42],D}async function no(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function so(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function oo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const io=Date.parse("2026-07-21T00:00:00Z"),kt=t=>oo(Be.ptBrAnnouncementSeen(t));function ao(){const t=z.c(35),e=W(),[s,r]=_t(),{data:o,isPending:a}=Ke.useSession(),i=o?.user,d=i?.id,m=i?.createdAt,f=m!=null&&new Date(m).getTime()<io,S=sn()==="pt-BR",c=!a&&!!d&&f&&S&&s.language==="en"&&!kt(d).has(),[b,g]=V.useState(!1),[x,l]=V.useState(!1);!b&&!a&&(g(!0),c&&d&&(kt(d).mark(),r(lo),l(!0),ut("pt_br_auto_switch_shown")));let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=G=>{ut("pt_br_auto_switch_closed",{action:G}),l(!1)},t[0]=u):u=t[0];const p=u;let y;t[1]!==r?(y=()=>{r(ro),p("switch-back")},t[1]=r,t[2]=y):y=t[2];const w=y;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=G=>!G&&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 A;t[5]!==e?(A=e("announcements.ptBr.title"),t[5]=e,t[6]=A):A=t[6];let T;t[7]!==A?(T=n.jsx($t,{children:A}),t[7]=A,t[8]=T):T=t[8];let _;t[9]!==e?(_=e("announcements.ptBr.description"),t[9]=e,t[10]=_):_=t[10];let h;t[11]!==_?(h=n.jsx(On,{children:_}),t[11]=_,t[12]=h):h=t[12];let k;t[13]!==T||t[14]!==h?(k=n.jsxs(Lt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=k):k=t[15];let j;t[16]!==e?(j=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=j):j=t[17];let P;t[18]!==w||t[19]!==j?(P=n.jsx(F,{variant:"outline",onClick:w,children:j}),t[18]=w,t[19]=j,t[20]=P):P=t[20];let O;t[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>p("ok"),t[21]=O):O=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(F,{onClick:O,children:C}),t[24]=C,t[25]=I):I=t[25];let E;t[26]!==P||t[27]!==I?(E=n.jsxs(In,{children:[P,I]}),t[26]=P,t[27]=I,t[28]=E):E=t[28];let D;t[29]!==E||t[30]!==k?(D=n.jsxs(Dt,{className:"sm:max-w-md",children:[N,k,E]}),t[29]=E,t[30]=k,t[31]=D):D=t[31];let M;return t[32]!==x||t[33]!==D?(M=n.jsx(Rt,{open:x,onOpenChange:v,children:D}),t[32]=x,t[33]=D,t[34]=M):M=t[34],M}function ro(t){return{...t,language:"en"}}function lo(t){return{...t,language:"pt-BR"}}function co(t){const e=on(t);return typeof e=="string"?e:void 0}function uo(){return co("experiment-pipeline-check"),null}function mo(t){const e=z.c(1),{activeOrg:s}=t;if(!s)return null;an(s.id,{name:s.name??void 0,slug:s.slug??void 0}),rn();let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(uo,{}),e[0]=r):r=e[0],r}function fo(t){const{prev:e,virtualMcpId:s,decopilotId:r,savedLayout:o,opts:a,autosendValue:i}=t,d={mainpanel:void 0};s?d.virtualmcpid=s:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const m=typeof e.virtualmcpid=="string"?e.virtualmcpid:r,S=(s??m)!==m;let c,b;return a?.panel?b=a.panel:o?(b=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(d.mainpanel=o.mainpanel)):!S&&e.tabId&&!ln(e.tabId)&&(b=e.tabId),c!==void 0&&(d.sidepanel=c),a?.autosend&&(d.autosend=i),{tabId:b,search:d}}const Ut="studio:thread-layout:v4",go=50;function Gt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function ho(t,e,s,r=go){const o=t.filter(([a])=>a!==e);for(o.push([e,Gt(s)]);o.length>r;)o.shift();return o}function ht(){try{const t=sessionStorage.getItem(Ut);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 Jt(t){try{sessionStorage.setItem(Ut,JSON.stringify(t))}catch{}}function po(t,e){t&&Jt(ho(ht(),t,e))}function yo(t){if(!t)return null;const e=ht().find(([s])=>s===t);return e?Gt(e[1]):null}function ci(t){if(!t)return;const e=ht(),s=e.filter(([r])=>r!==t);s.length!==e.length&&Jt(s)}function Vt(t){return{queryKey:Ue.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 di(t){const e=z.c(10);let s;e[0]!==t?(s=Vt(t),e[0]=t,e[1]=s):s=e[1];const r=He(s);let o;e[2]!==r.data?.prompts?(o=r.data?.prompts??[],e[2]=r.data?.prompts,e[3]=o):o=e[3];let a;e[4]!==r.data?.tiles?(a=r.data?.tiles??[],e[4]=r.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==r.isLoading||e[7]!==o||e[8]!==a?(i={isLoading:r.isLoading,prompts:o,tiles:a},e[6]=r.isLoading,e[7]=o,e[8]=a,e[9]=i):i=e[9],i}function bo(t){const e=z.c(31),{orgSlug:s,orgName:r,domain:o}=t,a=W();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const d=i,m=xo;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Tt,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let S;e[3]!==a?(S=a("common.ssoRequiredScreen.title"),e[3]=a,e[4]=S):S=e[4];let c;e[5]!==S?(c=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[5]=S,e[6]=c):c=e[6];let b;e[7]!==o||e[8]!==r||e[9]!==a?(b=r?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:r})," ",a("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${a("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):a("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=r,e[9]=a,e[10]=b):b=e[10];let g;e[11]!==b?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:b}),e[11]=b,e[12]=g):g=e[12];let x;e[13]!==c||e[14]!==g?(x=n.jsxs("div",{className:"space-y-2",children:[c,g]}),e[13]=c,e[14]=g,e[15]=x):x=e[15];let l;e[16]!==a?(l=a("common.ssoRequiredScreen.signInWithSso"),e[16]=a,e[17]=l):l=e[17];let u;e[18]!==d||e[19]!==l?(u=n.jsx(F,{onClick:d,children:l}),e[18]=d,e[19]=l,e[20]=u):u=e[20];let p;e[21]!==a?(p=a("common.ssoRequiredScreen.goBack"),e[21]=a,e[22]=p):p=e[22];let y;e[23]!==p?(y=n.jsx(F,{variant:"ghost",onClick:m,children:p}),e[23]=p,e[24]=y):y=e[24];let w;e[25]!==y||e[26]!==u?(w=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[u,y]}),e[25]=y,e[26]=u,e[27]=w):w=e[27];let v;return e[28]!==w||e[29]!==x?(v=n.jsxs(me,{children:[f,x,w]}),e[28]=w,e[29]=x,e[30]=v):v=e[30],v}function xo(){window.location.href="/"}function wo(t){const e=z.c(27),{notice:s,orgSlug:r}=t,o=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(cn,{className:"h-6 w-6 text-destructive"})}),e[0]=a):a=e[0];let i;e[1]!==s.title?(i=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=i):i=e[2];let d;e[3]!==s.message?(d=n.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=d):d=e[4];let m;e[5]!==i||e[6]!==d?(m=n.jsxs("div",{className:"space-y-2",children:[i,d]}),e[5]=i,e[6]=d,e[7]=m):m=e[7];let f;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(f=s.ctaUrl&&s.ctaLabel?n.jsx(F,{asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=f):f=e[10];const S=`/${encodeURIComponent(r)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let b;e[13]!==S||e[14]!==c?(b=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:S,children:c})}),e[13]=S,e[14]=c,e[15]=b):b=e[15];let g;e[16]!==o?(g=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=g):g=e[17];let x;e[18]!==g?(x=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:g})}),e[18]=g,e[19]=x):x=e[19];let l;e[20]!==x||e[21]!==f||e[22]!==b?(l=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,b,x]}),e[20]=x,e[21]=f,e[22]=b,e[23]=l):l=e[23];let u;return e[24]!==l||e[25]!==m?(u=n.jsxs(me,{children:[a,m,l]}),e[24]=l,e[25]=m,e[26]=u):u=e[26],u}function So(t){const e=z.c(8);let s;e[0]!==t?(s=Ue.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==t?(r=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=r):r=e[3];const o=!!t;let a;return e[4]!==s||e[5]!==r||e[6]!==o?(a={queryKey:s,queryFn:r,enabled:o,staleTime:6e4},e[4]=s,e[5]=r,e[6]=o,e[7]=a):a=e[7],He(a)}const vo="/settings/infra-billing";function jo(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(vo)}function ko(t){const e=z.c(8),{org:s,children:r}=t,a=Zn(s.id,s.slug)?.enabled_plugins??null;let i;e[0]!==s.id||e[1]!==s.name||e[2]!==a?(i={id:s.id,organizationId:s.id,slug:"_org",name:s.name,enabledPlugins:a,ui:null},e[0]=s.id,e[1]=s.name,e[2]=a,e[3]=i):i=e[3];const d=i;let m;return e[4]!==r||e[5]!==s||e[6]!==d?(m=n.jsx(yn,{org:s,project:d,children:r}),e[4]=r,e[5]=s,e[6]=d,e[7]=m):m=e[7],m}function To(){const t=At(),e=Un(),{org:s}=gt(),r=dn({strict:!1}),o=It(),{openPanel:a,closePanel:i}=En(),d=Wn(),m=Yn(),f=Qn(),S=Xn(),c=(l,u=!0)=>t({to:".",search:l,replace:u}),b=()=>c(l=>({...l,sidepanel:!0})),g=(l,u,p)=>{const y=!!m&&m===l;m&&!y&&po(m,{tab:o,mainpanel:r.mainpanel,sidepanel:r.sidepanel});const w=y?null:yo(l),v=Ct(s.id).id,N=fo({prev:{virtualmcpid:d,tabId:o},virtualMcpId:u,decopilotId:v,savedLayout:w,opts:p,autosendValue:Vn});return S(l,()=>N.search,{virtualMcpId:u,view:{tabId:N.tabId}})};return{openSidePanel:b,setTaskId:g,createNewTask:async(l,u,p)=>{const y=crypto.randomUUID(),w=l??f;try{await e?.create({id:y,virtual_mcp_id:w,...u?{branch:u}:{}})}catch{}g(y,w,p)},openTab:a,closeTab:i}}const No=new Set(["/$org/","/$org/home"]);function _o(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Ao},t[0]=e):e=t[0],Et(e)}function Ao(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&No.has(e)}function Po(){const t=z.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const r=un(e)?.params.org,[o,a]=V.useState(!1),[i,d]=Ys(),m=mn(),f=_o(),S=r??"";let c;t[1]!==S?(c=Vt(S),t[1]=S,t[2]=c):c=t[2];const b=!!r&&f;let g;t[3]!==c||t[4]!==b?(g={...c,enabled:b},t[3]=c,t[4]=b,t[5]=g):g=t[5],He(g);const{data:x}=Ke.useSession(),l=x?.user?.id;let u;t[6]!==r||t[7]!==l?(u=r&&l?fn(l,r):null,t[6]=r,t[7]=l,t[8]=u):u=t[8];const p=u;let y,w;t[9]!==m?(y=()=>{const L=B=>{if(vt(B)&&B.code==="KeyK"){B.preventDefault(),Vs();return}if(B.key==="?"&&!zs(B.target)){B.preventDefault(),a(!0);return}vt(B)&&B.code==="BracketLeft"&&m.history.canGoBack()&&(B.preventDefault(),m.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},w=[m],t[9]=m,t[10]=y,t[11]=w):(y=t[10],w=t[11]),V.useEffect(y,w);let v;t[12]!==r?(v=Ue.activeOrganization(r),t[12]=r,t[13]=v):v=t[13];let N;t[14]!==r||t[15]!==l?(N=async()=>{if(!r)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Ke.organization.getFullOrganization({query:{organizationSlug:r}}).finally(Eo),B=lt(L);return L&&!B&&localStorage.setItem(Be.lastOrgSlug(),r),l&&L&&hn(l,r,L),L},t[14]=r,t[15]=l,t[16]=N):N=t[16];const A=p?p.data:void 0,T=p?.updatedAt;let _;t[17]!==A||t[18]!==T||t[19]!==v||t[20]!==N?(_={queryKey:v,queryFn:N,initialData:A,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=A,t[18]=T,t[19]=v,t[20]=N,t[21]=_):_=t[21];const{data:h}=Nt(_),k=h?.id,j=h?.slug,{data:P}=es(k,j),O=!!P?.ssoRequired&&!P.authenticated,{data:C}=So(j);let I;t[22]===Symbol.for("react.memo_cache_sentinel")?(I={select:Co},t[22]=I):I=t[22];const E=Et(I),D=C?.severity==="block"&&!jo(E),M=k??"",G=j??"";let q;t[23]!==M||t[24]!==G?(q=Kn({connectionId:Pt,orgId:M,orgSlug:G}),t[23]=M,t[24]=G,t[25]=q):q=t[25];const Y=!!k&&!!j;let ne;if(t[26]!==q||t[27]!==Y?(ne={...q,enabled:Y},t[26]=q,t[27]=Y,t[28]=ne):ne=t[28],He(ne),(!h||lt(h)||O||D)&&Ws(),!h){let L;return t[29]!==r?(L=n.jsx(us,{orgSlug:r}),t[29]=r,t[30]=L):L=t[30],L}if(lt(h)){localStorage.getItem(Be.lastOrgSlug())===r&&localStorage.removeItem(Be.lastOrgSlug());let L;return t[31]!==h.name?(L=n.jsx(gn,{orgName:h.name}),t[31]=h.name,t[32]=L):L=t[32],L}if(D&&C){let L;return t[33]!==h.slug||t[34]!==C?(L=n.jsx(wo,{notice:C,orgSlug:h.slug}),t[33]=h.slug,t[34]=C,t[35]=L):L=t[35],L}if(O){let L;return t[36]!==h.id||t[37]!==h.name||t[38]!==h.slug||t[39]!==P.domain?(L=n.jsx(bo,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:P.domain}),t[36]=h.id,t[37]=h.name,t[38]=h.slug,t[39]=P.domain,t[40]=L):L=t[40],L}const te=h.logo??null;let Q;t[41]!==h||t[42]!==te?(Q={...h,logo:te},t[41]=h,t[42]=te,t[43]=Q):Q=t[43];let K;t[44]!==h?(K=n.jsx(mo,{activeOrg:h}),t[44]=h,t[45]=K):K=t[45];let X;t[46]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(pn,{}),t[46]=X):X=t[46];let se;t[47]===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($s,{}),n.jsx(to,{})]}),t[47]=se):se=t[47];let H;t[48]!==i||t[49]!==d?(H=i&&n.jsx(Us,{open:i,onOpenChange:d}),t[48]=i,t[49]=d,t[50]=H):H=t[50];let U;t[51]!==o?(U=n.jsx(Fs,{open:o,onOpenChange:a}),t[51]=o,t[52]=U):U=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(ao,{}),t[53]=oe):oe=t[53];let Z;return t[54]!==Q||t[55]!==K||t[56]!==H||t[57]!==U?(Z=n.jsxs(ko,{org:Q,children:[K,X,se,H,U,oe]}),t[54]=Q,t[55]=K,t[56]=H,t[57]=U,t[58]=Z):Z=t[58],Z}function Co(t){return t.location.pathname}function Eo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Oo(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Jn,{children:n.jsx(Po,{})}),t[0]=e):e=t[0],e}const ui=Object.freeze(Object.defineProperty({__proto__:null,default:Oo,usePanelActions:To},Symbol.toStringTag,{value:"Module"}));export{J as K,ms as L,To as a,vt as b,vs as c,di as d,ui as e,ci as f,qt as i,Vs as o,ri as r,li as s,So as u};
@@ -1 +1 @@
1
- import{r as O,c as y,j as o,l as N,B as A,be as P,aF as R}from"./index-DQZBt6Fl.js";import{i as H}from"./LayoutLeft-xdqdW3pr.js";import{u as V}from"./use-mobile-BwXePCI-.js";import{b as W,c as F,S as L,d as q,a as G}from"./sheet-DuM7cckc.js";import{b as $,T as z,a as B,c as E}from"./tooltip-BdIw7qeF.js";const J="15rem",K="18rem",Q="4.5rem",k=O.createContext(null);function D(){const l=O.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=y.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,r=V(),[n,x]=O.useState(d),[f,g]=O.useState(!1),c=a!==void 0,b=c?a:n;let S;e[0]!==c||e[1]!==i?(S=C=>{c||x(C),i?.(C)},e[0]=c,e[1]=i,e[2]=S):S=e[2];const u=S;let w;e[3]!==r||e[4]!==b||e[5]!==u?(w=()=>{r?g(U):u(!b)},e[3]=r,e[4]=b,e[5]=u,e[6]=w):w=e[6];const j=w,m=b?"expanded":"collapsed";let p;e[7]!==r||e[8]!==b||e[9]!==f||e[10]!==u||e[11]!==m||e[12]!==j?(p={state:m,open:b,setOpen:u,isMobile:r,openMobile:f,setOpenMobile:g,toggleSidebar:j},e[7]=r,e[8]=b,e[9]=f,e[10]=u,e[11]=m,e[12]=j,e[13]=p):p=e[13];const v=p;let h;e[14]!==t?(h=o.jsx($,{delayDuration:0,children:t}),e[14]=t,e[15]=h):h=e[15];let _;return e[16]!==v||e[17]!==h?(_=o.jsx(k.Provider,{value:v,children:h}),e[16]=v,e[17]=h,e[18]=_):_=e[18],_}function U(l){return!l}function le(l){const e=y.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const r=d;let n;e[7]!==s?(n=N("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=n):n=e[8];let x;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==n?(x=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=n,e[13]=x):x=e[13],x}function re(l){const e=y.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const r=i===void 0?"left":i,n=d===void 0?"sidebar":d,{isMobile:x,state:f,openMobile:g,setOpenMobile:c}=D();if(x){let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_={"--sidebar-width":K},e[6]=_):_=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsxs(F,{className:"sr-only",children:[o.jsx(L,{children:"Sidebar"}),o.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=C):C=e[7];let M;e[8]!==t?(M=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=M):M=e[9];let I;e[10]!==r||e[11]!==M?(I=o.jsxs(G,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:_,side:r,children:[C,M]}),e[10]=r,e[11]=M,e[12]=I):I=e[12];let T;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==I?(T=o.jsx(W,{open:g,onOpenChange:c,...a,children:I}),e[13]=g,e[14]=a,e[15]=c,e[16]=I,e[17]=T):T=e[17],T}const b=f==="expanded",S=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let u;e[18]!==S?(u=N("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",S),e[18]=S,e[19]=u):u=e[19];const w=b?void 0:"icon",j=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==j?(m=N("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",j,s),e[20]=s,e[21]=j,e[22]=m):m=e[22];let p;e[23]!==t?(p=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]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=o.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let h;return e[29]!==r||e[30]!==f||e[31]!==u||e[32]!==w||e[33]!==v||e[34]!==n?(h=o.jsx("div",{className:u,"data-state":f,"data-collapsible":w,"data-variant":n,"data-side":r,"data-slot":"sidebar",children:v}),e[29]=r,e[30]=f,e[31]=u,e[32]=w,e[33]=v,e[34]=n,e[35]=h):h=e[35],h}function ne(l){const e=y.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=D();let d;e[4]!==t?(d=N("size-7",t),e[4]=t,e[5]=d):d=e[5];let r;e[6]!==s||e[7]!==i?(r=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=r):r=e[8];let n,x;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(H,{}),x=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=x):(n=e[9],x=e[10]);let f;e[11]!==a||e[12]!==d||e[13]!==r?(f=o.jsx(z,{asChild:!0,children:o.jsxs(A,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:r,...a,children:[n,x]})}),e[11]=a,e[12]=d,e[13]=r,e[14]=f):f=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs(B,{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(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==f?(c=o.jsx($,{delayDuration:300,children:o.jsxs(E,{children:[f,g]})}),e[16]=f,e[17]=c):c=e[17],c}function X(l){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:l},l)}function oe(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("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 i;return e[5]!==s||e[6]!==a?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("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 i;return e[5]!==s||e[6]!==a?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=R("peer/menu-button flex w-full cursor-pointer 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 classic:[&_svg]:opacity-60 classic:hover:[&_svg]:opacity-100 compact:[&_svg:not([class*='text-'])]:text-muted-foreground compact:hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{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 classic:group-data-[state=collapsed]/sidebar:w-full! classic:group-data-[state=collapsed]/sidebar:aspect-square! classic:group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! classic: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 compact:group-data-[state=collapsed]/sidebar:size-8! compact:group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function pe(l){const e=y.c(28);let t,s,a,i,d,r,n;e[0]!==l?({asChild:a,isActive:i,variant:d,size:r,tooltip:n,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=r,e[7]=n):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],r=e[6],n=e[7]);const x=a===void 0?!1:a,f=i===void 0?!1:i,g=d===void 0?"default":d,c=r===void 0?"default":r,b=x?P:"button",{isMobile:S}=D();let u;e[8]!==t||e[9]!==c||e[10]!==g?(u=N(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=u):u=e[11];let w;e[12]!==b||e[13]!==f||e[14]!==s||e[15]!==c||e[16]!==u?(w=o.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":f,className:u,...s}),e[12]=b,e[13]=f,e[14]=s,e[15]=c,e[16]=u,e[17]=w):w=e[17];const j=w;if(!n)return j;if(typeof n=="string"){let h;e[18]!==n?(h={children:n},e[18]=n,e[19]=h):h=e[19],n=h}let m;e[20]!==j?(m=o.jsx(z,{asChild:!0,children:j}),e[20]=j,e[21]=m):m=e[21];let p;e[22]!==S||e[23]!==n?(p=o.jsx(B,{side:"right",align:"center",hidden:S,...n}),e[22]=S,e[23]=n,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=o.jsxs(E,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ie as S,le as a,oe as b,pe as c,ue as d,fe as e,de as f,ce as g,re as h,ne as i,D as u};
1
+ import{r as O,c as y,j as o,l as N,B as A,be as P,aF as R}from"./index-COJyT2bn.js";import{i as H}from"./LayoutLeft-v-gPxVBy.js";import{u as V}from"./use-mobile-_vYKejdu.js";import{b as W,c as F,S as L,d as q,a as G}from"./sheet-CQ2b_TUH.js";import{b as $,T as z,a as B,c as E}from"./tooltip-B6UxRepU.js";const J="15rem",K="18rem",Q="4.5rem",k=O.createContext(null);function D(){const l=O.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ie(l){const e=y.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,r=V(),[n,x]=O.useState(d),[f,g]=O.useState(!1),c=a!==void 0,b=c?a:n;let S;e[0]!==c||e[1]!==i?(S=C=>{c||x(C),i?.(C)},e[0]=c,e[1]=i,e[2]=S):S=e[2];const u=S;let w;e[3]!==r||e[4]!==b||e[5]!==u?(w=()=>{r?g(U):u(!b)},e[3]=r,e[4]=b,e[5]=u,e[6]=w):w=e[6];const j=w,m=b?"expanded":"collapsed";let p;e[7]!==r||e[8]!==b||e[9]!==f||e[10]!==u||e[11]!==m||e[12]!==j?(p={state:m,open:b,setOpen:u,isMobile:r,openMobile:f,setOpenMobile:g,toggleSidebar:j},e[7]=r,e[8]=b,e[9]=f,e[10]=u,e[11]=m,e[12]=j,e[13]=p):p=e[13];const v=p;let h;e[14]!==t?(h=o.jsx($,{delayDuration:0,children:t}),e[14]=t,e[15]=h):h=e[15];let _;return e[16]!==v||e[17]!==h?(_=o.jsx(k.Provider,{value:v,children:h}),e[16]=v,e[17]=h,e[18]=_):_=e[18],_}function U(l){return!l}function le(l){const e=y.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const r=d;let n;e[7]!==s?(n=N("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=n):n=e[8];let x;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==n?(x=o.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:n,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=n,e[13]=x):x=e[13],x}function re(l){const e=y.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const r=i===void 0?"left":i,n=d===void 0?"sidebar":d,{isMobile:x,state:f,openMobile:g,setOpenMobile:c}=D();if(x){let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_={"--sidebar-width":K},e[6]=_):_=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsxs(F,{className:"sr-only",children:[o.jsx(L,{children:"Sidebar"}),o.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=C):C=e[7];let M;e[8]!==t?(M=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=M):M=e[9];let I;e[10]!==r||e[11]!==M?(I=o.jsxs(G,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:_,side:r,children:[C,M]}),e[10]=r,e[11]=M,e[12]=I):I=e[12];let T;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==I?(T=o.jsx(W,{open:g,onOpenChange:c,...a,children:I}),e[13]=g,e[14]=a,e[15]=c,e[16]=I,e[17]=T):T=e[17],T}const b=f==="expanded",S=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let u;e[18]!==S?(u=N("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",S),e[18]=S,e[19]=u):u=e[19];const w=b?void 0:"icon",j=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==j?(m=N("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",j,s),e[20]=s,e[21]=j,e[22]=m):m=e[22];let p;e[23]!==t?(p=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]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=o.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let h;return e[29]!==r||e[30]!==f||e[31]!==u||e[32]!==w||e[33]!==v||e[34]!==n?(h=o.jsx("div",{className:u,"data-state":f,"data-collapsible":w,"data-variant":n,"data-side":r,"data-slot":"sidebar",children:v}),e[29]=r,e[30]=f,e[31]=u,e[32]=w,e[33]=v,e[34]=n,e[35]=h):h=e[35],h}function ne(l){const e=y.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=D();let d;e[4]!==t?(d=N("size-7",t),e[4]=t,e[5]=d):d=e[5];let r;e[6]!==s||e[7]!==i?(r=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=r):r=e[8];let n,x;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(H,{}),x=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=x):(n=e[9],x=e[10]);let f;e[11]!==a||e[12]!==d||e[13]!==r?(f=o.jsx(z,{asChild:!0,children:o.jsxs(A,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:r,...a,children:[n,x]})}),e[11]=a,e[12]=d,e[13]=r,e[14]=f):f=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs(B,{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(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==f?(c=o.jsx($,{delayDuration:300,children:o.jsxs(E,{children:[f,g]})}),e[16]=f,e[17]=c):c=e[17],c}function X(l){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:l},l)}function oe(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("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 i;return e[5]!==s||e[6]!==a?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("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 i;return e[5]!==s||e[6]!==a?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=y.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=N("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=R("peer/menu-button flex w-full cursor-pointer 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 classic:[&_svg]:opacity-60 classic:hover:[&_svg]:opacity-100 compact:[&_svg:not([class*='text-'])]:text-muted-foreground compact:hover:[&_svg:not([class*='text-'])]:text-sidebar-foreground",{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 classic:group-data-[state=collapsed]/sidebar:w-full! classic:group-data-[state=collapsed]/sidebar:aspect-square! classic:group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! classic: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 compact:group-data-[state=collapsed]/sidebar:size-8! compact:group-data-[state=collapsed]/sidebar:rounded-full",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function pe(l){const e=y.c(28);let t,s,a,i,d,r,n;e[0]!==l?({asChild:a,isActive:i,variant:d,size:r,tooltip:n,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=r,e[7]=n):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],r=e[6],n=e[7]);const x=a===void 0?!1:a,f=i===void 0?!1:i,g=d===void 0?"default":d,c=r===void 0?"default":r,b=x?P:"button",{isMobile:S}=D();let u;e[8]!==t||e[9]!==c||e[10]!==g?(u=N(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=u):u=e[11];let w;e[12]!==b||e[13]!==f||e[14]!==s||e[15]!==c||e[16]!==u?(w=o.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":f,className:u,...s}),e[12]=b,e[13]=f,e[14]=s,e[15]=c,e[16]=u,e[17]=w):w=e[17];const j=w;if(!n)return j;if(typeof n=="string"){let h;e[18]!==n?(h={children:n},e[18]=n,e[19]=h):h=e[19],n=h}let m;e[20]!==j?(m=o.jsx(z,{asChild:!0,children:j}),e[20]=j,e[21]=m):m=e[21];let p;e[22]!==S||e[23]!==n?(p=o.jsx(B,{side:"right",align:"center",hidden:S,...n}),e[22]=S,e[23]=n,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=o.jsxs(E,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ie as S,le as a,oe as b,pe as c,ue as d,fe as e,de as f,ce as g,re as h,ne as i,D as u};
@@ -1 +1 @@
1
- import{c as E,j as s,r as K,aP as u,l as M,B as T}from"./index-DQZBt6Fl.js";import{b as R,D as _,d as q,i as A}from"./dialog-CfR9zhfQ.js";import{i as $}from"./X-DgI4yqfX.js";import{i as G}from"./Zap-BkWm3G14.js";import{M as H}from"./markdown-j472BGQe.js";import{F as J}from"./file-preview-DNlbJHv7.js";import{F as Q}from"./file-type-icon-Dv-tVjqp.js";import{i as V,c as W,n as X}from"./use-org-fs-6rzJUZWB.js";import{p as Y,b as c}from"./location-oTTXFrSF.js";import{p as Z}from"./skill-md-ChfVs4uF.js";function ee(n){const e=E.c(18),{skillPath:m,onClose:a,variant:t}=n,i=Y(m),{volume:r,dirPath:o}=i,F=V(),U=F(r??"",`${o}/SKILL.md`),d=W(U),D=X(r??"",o);let g;e[0]!==o?(g=c(o),e[0]=o,e[1]=g):g=e[1];const B=g;let j;e[2]!==d.data?(j=d.data?Z(d.data):null,e[2]=d.data,e[3]=j):j=e[3];const b=j,v=te;let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=(l,h)=>v(l.path)?-1:v(h.path)?1:c(l.path).localeCompare(c(h.path)),e[4]=N):N=e[4];const L=(D.data??[]).filter(se).sort(N),[P,I]=K.useState(null),x=P===null?null:L.find(l=>l.path===P)??null,k=b?.name??B;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:s.jsx(G,{size:18})}),e[5]=w):w=e[5];let f;e[6]!==k||e[7]!==t?(f=t==="dialog"?s.jsx(q,{className:"flex-1 truncate text-base font-medium text-foreground",children:k}):s.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:k}),e[6]=k,e[7]=t,e[8]=f):f=e[8];let p;e[9]!==a||e[10]!==t?(p=t==="dialog"?s.jsx(A,{asChild:!0,children:s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:s.jsx($,{size:16})})}):s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:a,children:s.jsx($,{size:16})}),e[9]=a,e[10]=t,e[11]=p):p=e[11];let y;e[12]!==f||e[13]!==p?(y=s.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[w,f,p]}),e[12]=f,e[13]=p,e[14]=y):y=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=C):C=e[15];const O="relative flex min-w-0 flex-1 flex-col overflow-y-auto",z=x?s.jsx(J,{file:{key:x.path,filename:c(x.path),size:x.size,downloadUrl:F(r??"",x.path)}}):d.isPending?s.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[s.jsx(u,{className:"h-4 w-1/3"}),s.jsx(u,{className:"h-3 w-full"}),s.jsx(u,{className:"h-3 w-5/6"}),s.jsx(u,{className:"h-3 w-2/3"})]}):d.isError||!b?s.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),s.jsx("p",{className:"text-base text-muted-foreground",children:b.description??"Claude Code skill"})]}),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:s.jsx(H,{id:`skill-preview-${m}`,text:b.body})})]});let S;return e[16]!==z?(S=s.jsx("div",{className:O,children:z}),e[16]=z,e[17]=S):S=e[17],s.jsxs(s.Fragment,{children:[y,s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[C,D.isPending?s.jsx(u,{className:"mx-2 h-4 w-24"}):L.map(l=>{const h=v(l.path)?x===null:P===l.path;return s.jsxs("button",{type:"button",onClick:()=>I(v(l.path)?null:l.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",h?"bg-background shadow-sm":"hover:bg-muted/60"),children:[s.jsx(Q,{filename:c(l.path),className:"h-6 w-5 shrink-0"}),s.jsx("span",{className:M("truncate text-sm",h?"text-foreground":"text-muted-foreground"),children:c(l.path)})]},l.path)})]}),S]})]})}function se(n){return n.kind==="file"}function te(n){return c(n)==="SKILL.md"}function fe(n){const e=E.c(8),{skillPath:m,onClose:a}=n;let t;e[0]!==a?(t=o=>{o||a()},e[0]=a,e[1]=t):t=e[1];let i;e[2]!==a||e[3]!==m?(i=s.jsx(R,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:s.jsx(ee,{skillPath:m,onClose:a,variant:"dialog"})}),e[2]=a,e[3]=m,e[4]=i):i=e[4];let r;return e[5]!==t||e[6]!==i?(r=s.jsx(_,{open:!0,onOpenChange:t,children:i}),e[5]=t,e[6]=i,e[7]=r):r=e[7],r}export{fe as S};
1
+ import{c as E,j as s,r as K,aP as u,l as M,B as T}from"./index-COJyT2bn.js";import{b as R,D as _,d as q,i as A}from"./dialog-CDUwK9Ky.js";import{i as $}from"./X-CZ5u1gQz.js";import{i as G}from"./Zap-B7SjQTF1.js";import{M as H}from"./markdown-g0iKgQki.js";import{F as J}from"./file-preview-DpBhyJPy.js";import{F as Q}from"./file-type-icon-BIj4oPmy.js";import{i as V,c as W,n as X}from"./use-org-fs-SXZbeDBx.js";import{p as Y,b as c}from"./location-oTTXFrSF.js";import{p as Z}from"./skill-md-ChfVs4uF.js";function ee(n){const e=E.c(18),{skillPath:m,onClose:a,variant:t}=n,i=Y(m),{volume:r,dirPath:o}=i,F=V(),U=F(r??"",`${o}/SKILL.md`),d=W(U),D=X(r??"",o);let g;e[0]!==o?(g=c(o),e[0]=o,e[1]=g):g=e[1];const B=g;let j;e[2]!==d.data?(j=d.data?Z(d.data):null,e[2]=d.data,e[3]=j):j=e[3];const b=j,v=te;let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=(l,h)=>v(l.path)?-1:v(h.path)?1:c(l.path).localeCompare(c(h.path)),e[4]=N):N=e[4];const L=(D.data??[]).filter(se).sort(N),[P,I]=K.useState(null),x=P===null?null:L.find(l=>l.path===P)??null,k=b?.name??B;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:s.jsx(G,{size:18})}),e[5]=w):w=e[5];let f;e[6]!==k||e[7]!==t?(f=t==="dialog"?s.jsx(q,{className:"flex-1 truncate text-base font-medium text-foreground",children:k}):s.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:k}),e[6]=k,e[7]=t,e[8]=f):f=e[8];let p;e[9]!==a||e[10]!==t?(p=t==="dialog"?s.jsx(A,{asChild:!0,children:s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:s.jsx($,{size:16})})}):s.jsx(T,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:a,children:s.jsx($,{size:16})}),e[9]=a,e[10]=t,e[11]=p):p=e[11];let y;e[12]!==f||e[13]!==p?(y=s.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[w,f,p]}),e[12]=f,e[13]=p,e[14]=y):y=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=C):C=e[15];const O="relative flex min-w-0 flex-1 flex-col overflow-y-auto",z=x?s.jsx(J,{file:{key:x.path,filename:c(x.path),size:x.size,downloadUrl:F(r??"",x.path)}}):d.isPending?s.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[s.jsx(u,{className:"h-4 w-1/3"}),s.jsx(u,{className:"h-3 w-full"}),s.jsx(u,{className:"h-3 w-5/6"}),s.jsx(u,{className:"h-3 w-2/3"})]}):d.isError||!b?s.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),s.jsx("p",{className:"text-base text-muted-foreground",children:b.description??"Claude Code skill"})]}),s.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:s.jsx(H,{id:`skill-preview-${m}`,text:b.body})})]});let S;return e[16]!==z?(S=s.jsx("div",{className:O,children:z}),e[16]=z,e[17]=S):S=e[17],s.jsxs(s.Fragment,{children:[y,s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[C,D.isPending?s.jsx(u,{className:"mx-2 h-4 w-24"}):L.map(l=>{const h=v(l.path)?x===null:P===l.path;return s.jsxs("button",{type:"button",onClick:()=>I(v(l.path)?null:l.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",h?"bg-background shadow-sm":"hover:bg-muted/60"),children:[s.jsx(Q,{filename:c(l.path),className:"h-6 w-5 shrink-0"}),s.jsx("span",{className:M("truncate text-sm",h?"text-foreground":"text-muted-foreground"),children:c(l.path)})]},l.path)})]}),S]})]})}function se(n){return n.kind==="file"}function te(n){return c(n)==="SKILL.md"}function fe(n){const e=E.c(8),{skillPath:m,onClose:a}=n;let t;e[0]!==a?(t=o=>{o||a()},e[0]=a,e[1]=t):t=e[1];let i;e[2]!==a||e[3]!==m?(i=s.jsx(R,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:s.jsx(ee,{skillPath:m,onClose:a,variant:"dialog"})}),e[2]=a,e[3]=m,e[4]=i):i=e[4];let r;return e[5]!==t||e[6]!==i?(r=s.jsx(_,{open:!0,onOpenChange:t,children:i}),e[5]=t,e[6]=i,e[7]=r):r=e[7],r}export{fe as S};
@@ -1 +1 @@
1
- import{Z as ae,b as te,a0 as se,o as ce,r as T,j as t,B as G,n as L,aP as me,T as de,t as D,aj as pe,c as ie,l as ue,I as ge,F as fe,H as he,G as xe,K as Q,eM as je}from"./index-DQZBt6Fl.js";import{i as ke}from"./DotsVertical-DCTIN1zx.js";import{a as ve}from"./Package-CkvAk6JQ.js";import{s as ye}from"./Trash01-Cs1900Vx.js";import{i as Se}from"./Upload01-odxUyqlC.js";import{i as le}from"./Zap-BkWm3G14.js";import{S as be}from"./search-input-eDRvpCEQ.js";import{f as we,e as Ce,b as De,A as Ne,a as Pe,d as Ee,c as Ae,g as Te}from"./alert-dialog-BYQAyeOC.js";import{E as Z}from"./empty-state-9hlMmNlC.js";import{C as Me}from"./collection-tabs-CYx5-BiK.js";import{F as Ie}from"./folder-icon-186o_xBL.js";import{p as Oe,h as ze,q as Fe}from"./use-org-fs-6rzJUZWB.js";import{H as J,d as $e}from"./location-oTTXFrSF.js";import{S as Re}from"./skill-preview-DN9PhO9W.js";import{p as Le}from"./skill-md-ChfVs4uF.js";import"./SearchMd-XFzJrarE.js";import"./badge-D6ygNqO6.js";import"./Eye-C46dzrHd.js";import"./dialog-CfR9zhfQ.js";import"./X-DgI4yqfX.js";import"./markdown-j472BGQe.js";import"./Copy01-BsZDIS3z.js";import"./Download01-B4Q5hpED.js";import"./ZoomOut-BYNmIOoy.js";import"./org-file-open-context-CV0BvKfM.js";import"./use-mobile-BwXePCI-.js";import"./use-panel-navigate-CCrHg3rQ.js";import"./thread-route-CDYfrzkB.js";import"./use-project-scope-ChdEK9JU.js";import"./use-virtual-mcp-4T8Uqtz2.js";import"./use-mcp-client-CuZ_CH4K.js";import"./auth-BCpLT4L2.js";import"./github-repo-BknN0SVI.js";import"./file-preview-DNlbJHv7.js";import"./utils-CyaFhLFV.js";import"./Image01-DVR_EyJG.js";import"./editor-DUpmzLo7.js";import"./file-type-icon-Dv-tVjqp.js";const V=200,_e=new Set(["node_modules","__pycache__"]);function U(r){const[,...e]=r.webkitRelativePath.split("/");return e.length>0?e.join("/"):r.name}function Be(r){return U(r).split("/").every(e=>!e.startsWith(".")&&!_e.has(e))}function Ke(r){return r.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function He(r,e){const i=new Map;for(const l of r){const o=U(l).split("/");o.pop();const c=["skills",e,...o].join("/");i.set(c,[...i.get(c)??[],l])}return i}async function qe(r,e){const l=(await Promise.allSettled([...r].map(([o,c])=>e({dir:o,files:c})))).find(o=>o.status==="rejected");if(l)throw l.reason}function Qe(r,e){const i=Le(e),l=`skills/${r}`;return{id:`home/${l}`,name:i.name??r,description:i.description,source:"home",volume:J,path:l,sandboxPath:`org/${J}/${l}`}}const _="*";function B(r){return r.volume==="home"}function re(r,e){const i=r.indexOf(":");return i===-1?{label:e,glyph:le}:{label:r.slice(i+1),glyph:r.startsWith("repo:")?pe:ve}}function Ge(r){const e=ie.c(48),{entry:i,pending:l,onOpen:o,onDelete:c}=r,a=te(),{org:S}=se();let m;e[0]!==i.source||e[1]!==S.name?(m=re(i.source,S.name),e[0]=i.source,e[1]=S.name,e[2]=m):m=e[2];const{label:M,glyph:I}=m;let O;e[3]!==i?(O=B(i),e[3]=i,e[4]=O):O=e[4];const F=O,z=l?"opacity-60":"hover:bg-muted/50";let p;e[5]!==z?(p=ue("relative transition-colors group overflow-hidden flex flex-col h-full",z),e[5]=z,e[6]=p):p=e[6];let f;e[7]!==i.name||e[8]!==o||e[9]!==l?(f=!l&&t.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=o,e[9]=l,e[10]=f):f=e[10];const b=F?"default":"system",N=!F;let w;e[11]!==I||e[12]!==b||e[13]!==N?(w=t.jsx(Ie,{glyph:I,tone:b,readOnly:N,className:"size-8 shrink-0"}),e[11]=I,e[12]=b,e[13]=N,e[14]=w):w=e[14];let h;e[15]!==c||e[16]!==a?(h=c&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ge,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(ke,{size:16})})}),t.jsx(he,{align:"end",children:t.jsxs(xe,{variant:"destructive",onClick:K=>{K.stopPropagation(),c()},children:[t.jsx(ye,{size:16}),a("settings.skills.deleteButton")]})})]})}),e[15]=c,e[16]=a,e[17]=h):h=e[17];let x;e[18]!==w||e[19]!==h?(x=t.jsxs("div",{className:"flex items-start justify-between",children:[w,h]}),e[18]=w,e[19]=h,e[20]=x):x=e[20];let j;e[21]!==i.name?(j=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=j):j=e[22];let C;e[23]!==i.description||e[24]!==a?(C=i.description||a("settings.skills.noDescription"),e[23]=i.description,e[24]=a,e[25]=C):C=e[25];let k;e[26]!==C?(k=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:C}),e[26]=C,e[27]=k):k=e[27];let d;e[28]!==j||e[29]!==k?(d=t.jsxs("div",{className:"flex flex-col gap-1",children:[j,k]}),e[28]=j,e[29]=k,e[30]=d):d=e[30];let v;e[31]!==x||e[32]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,d]}),e[31]=x,e[32]=d,e[33]=v):v=e[33];let u;e[34]!==M||e[35]!==l||e[36]!==a?(u=l?a("settings.skills.importing"):M,e[34]=M,e[35]=l,e[36]=a,e[37]=u):u=e[37];let y;e[38]!==u?(y=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:u})})}),e[38]=u,e[39]=y):y=e[39];let g;e[40]!==v||e[41]!==y?(g=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,y]}),e[40]=v,e[41]=y,e[42]=g):g=e[42];let P;return e[43]!==l||e[44]!==g||e[45]!==p||e[46]!==f?(P=t.jsxs(je,{"aria-busy":l,className:p,children:[f,g]}),e[43]=l,e[44]=g,e[45]=p,e[46]=f,e[47]=P):P=e[47],P}function ee(r){const e=ie.c(2),{children:i}=r;let l;return e[0]!==i?(l=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=l):l=e[1],l}function Tt(){const r=ae(),e=te(),{org:i}=se(),l=Oe(),{remove:o,upload:c}=ze("home"),a=ce(),S=T.useRef(null),[m,M]=T.useState(""),[I,O]=T.useState(_),[F,z]=T.useState(!1),[p,f]=T.useState(null),[b,N]=T.useState(null),[w,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:Q.slashSkills(i.id)}),a.invalidateQueries({queryKey:Q.orgFsSkills(i.id)})},j=s=>a.setQueryData(Q.slashSkills(i.id),n=>s(n??[]));async function C(s){const n=[...s??[]];if(S.current&&(S.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){D.error(e("settings.skills.importNeedsFolder"));return}const q=E.split("/")[0]??"",R=n.filter(Be),W=R.find(A=>U(A)==="SKILL.md");if(!W){D.error(e("settings.skills.importMissingSkillMd"));return}if(R.length>V){D.error(e("settings.skills.importTooManyFiles",{count:String(R.length),max:String(V)}));return}const $=Ke(q),X=`skills/${$}`;let Y=!1;z(!0);try{if(await Fe(i.slug,"home",X)){D.error(e("settings.skills.importSlugTaken",{slug:$}));return}Y=!0;const A=Qe($,await W.text());j(oe=>[A,...oe]),h(A.id),await qe(He(R,$),c.mutateAsync),D.success(e("settings.skills.importSuccess",{name:$}))}catch(A){Y&&await o.mutateAsync(X).catch(()=>{}),D.error(A instanceof Error?A.message:e("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=m.toLowerCase(),d=(l.data??[]).filter(s=>s.name.toLowerCase().includes(k)||(s.description??"").toLowerCase().includes(k)).sort((s,n)=>Number(B(n))-Number(B(s))||s.name.localeCompare(n.name)),v=new Set((l.data??[]).map(s=>s.source)),u=new Map;for(const s of d)u.set(s.source,(u.get(s.source)??0)+1);const y=[{id:_,label:e("settings.skills.filterAll"),count:d.length},...[...v].map(s=>({id:s,label:re(s,i.name).label,count:u.get(s)??0}))],g=v.has(I)?I:_,P=g===_?d:d.filter(s=>s.source===g),K=s=>f($e(s.volume,s.path)),ne=async()=>{if(!b)return;const{id:s,path:n}=b;N(null),j(E=>E.filter(q=>q.id!==s));try{await o.mutateAsync(n),D.success(e("settings.skills.deleteSuccess"))}catch(E){D.error(E instanceof Error?E.message:e("settings.skills.deleteError"))}finally{x()}},H=t.jsxs(G,{size:"sm",disabled:F,onClick:()=>S.current?.click(),children:[t.jsx(Se,{size:14}),e(F?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(L,{children:[t.jsx(L.Content,{children:t.jsx(L.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(L.Title,{actions:r&&H,children:e("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(be,{value:m,onChange:M,placeholder:e("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:s=>{s.key==="Escape"&&(M(""),s.target.blur())}}),!r&&H,t.jsx("input",{ref:S,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:s=>{C(s.target.files)}})]}),y.length>2&&t.jsx(Me,{placement:"page",tabs:y,activeTab:g,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(s,n)=>t.jsx(me,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Z,{image:t.jsx(de,{size:48,className:"text-muted-foreground"}),title:e("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:e("settings.skills.errorDescription"),actions:t.jsx(G,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:e("settings.skills.retry")})})}):P.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Z,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:e(m?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:m?e("settings.skills.noResultsDescription",{search:m}):e("settings.skills.emptyDescription"),actions:!r&&!m&&H})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:P.map(s=>{const n=s.id===w;return t.jsx(Ge,{entry:s,pending:n,onOpen:()=>K(s),onDelete:B(s)&&!n?()=>N(s):void 0},s.id)})})})]})})}),p&&t.jsx(Re,{skillPath:p,onClose:()=>f(null)},p),t.jsx(we,{open:b!==null,onOpenChange:s=>!s&&N(null),children:t.jsxs(Ce,{children:[t.jsxs(De,{children:[t.jsx(Ne,{children:e("settings.skills.deleteDialogTitle")}),t.jsx(Pe,{children:e("settings.skills.deleteDialogDescription",{name:b?.name??""})})]}),t.jsxs(Ee,{children:[t.jsx(Ae,{children:e("settings.skills.cancel")}),t.jsx(Te,{onClick:ne,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:e("settings.skills.deleteButton")})]})]})})]})}export{Tt as default};
1
+ import{Z as ae,b as te,a0 as se,o as ce,r as T,j as t,B as G,n as L,aP as me,T as de,t as D,aj as pe,c as ie,l as ue,I as ge,F as fe,H as he,G as xe,K as Q,eM as je}from"./index-COJyT2bn.js";import{i as ke}from"./DotsVertical-Qjn9bD7u.js";import{a as ve}from"./Package-Ca1kJQJW.js";import{s as ye}from"./Trash01-B82ZZMGA.js";import{i as Se}from"./Upload01-zkIbWeZQ.js";import{i as le}from"./Zap-B7SjQTF1.js";import{S as be}from"./search-input-B77FxN5v.js";import{f as we,e as Ce,b as De,A as Ne,a as Pe,d as Ee,c as Ae,g as Te}from"./alert-dialog-CtGv9jdd.js";import{E as Z}from"./empty-state-CH7AalHb.js";import{C as Me}from"./collection-tabs-Bsge5RiX.js";import{F as Ie}from"./folder-icon-C9QPDhMu.js";import{p as Oe,h as ze,q as Fe}from"./use-org-fs-SXZbeDBx.js";import{H as J,d as $e}from"./location-oTTXFrSF.js";import{S as Re}from"./skill-preview-BFdu9YNy.js";import{p as Le}from"./skill-md-ChfVs4uF.js";import"./SearchMd-BjQ6aaMY.js";import"./badge-DdXiAz7d.js";import"./Eye-C1v6-SBQ.js";import"./dialog-CDUwK9Ky.js";import"./X-CZ5u1gQz.js";import"./markdown-g0iKgQki.js";import"./Copy01-BLG-yB9O.js";import"./Download01-CUdEmTJH.js";import"./ZoomOut-B3LU1sVM.js";import"./org-file-open-context-BkTepFfD.js";import"./use-mobile-_vYKejdu.js";import"./use-panel-navigate-BDUxATfN.js";import"./thread-route-B40TxKtZ.js";import"./use-project-scope-9qKpoK4A.js";import"./use-virtual-mcp-B5lofcUX.js";import"./use-mcp-client-C5UR6qvr.js";import"./auth-DbBN__xJ.js";import"./github-repo-BknN0SVI.js";import"./file-preview-DpBhyJPy.js";import"./utils-BtXzNzBw.js";import"./Image01-DDEEEqQF.js";import"./editor-eoiEWzaP.js";import"./file-type-icon-BIj4oPmy.js";const V=200,_e=new Set(["node_modules","__pycache__"]);function U(r){const[,...e]=r.webkitRelativePath.split("/");return e.length>0?e.join("/"):r.name}function Be(r){return U(r).split("/").every(e=>!e.startsWith(".")&&!_e.has(e))}function Ke(r){return r.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function He(r,e){const i=new Map;for(const l of r){const o=U(l).split("/");o.pop();const c=["skills",e,...o].join("/");i.set(c,[...i.get(c)??[],l])}return i}async function qe(r,e){const l=(await Promise.allSettled([...r].map(([o,c])=>e({dir:o,files:c})))).find(o=>o.status==="rejected");if(l)throw l.reason}function Qe(r,e){const i=Le(e),l=`skills/${r}`;return{id:`home/${l}`,name:i.name??r,description:i.description,source:"home",volume:J,path:l,sandboxPath:`org/${J}/${l}`}}const _="*";function B(r){return r.volume==="home"}function re(r,e){const i=r.indexOf(":");return i===-1?{label:e,glyph:le}:{label:r.slice(i+1),glyph:r.startsWith("repo:")?pe:ve}}function Ge(r){const e=ie.c(48),{entry:i,pending:l,onOpen:o,onDelete:c}=r,a=te(),{org:S}=se();let m;e[0]!==i.source||e[1]!==S.name?(m=re(i.source,S.name),e[0]=i.source,e[1]=S.name,e[2]=m):m=e[2];const{label:M,glyph:I}=m;let O;e[3]!==i?(O=B(i),e[3]=i,e[4]=O):O=e[4];const F=O,z=l?"opacity-60":"hover:bg-muted/50";let p;e[5]!==z?(p=ue("relative transition-colors group overflow-hidden flex flex-col h-full",z),e[5]=z,e[6]=p):p=e[6];let f;e[7]!==i.name||e[8]!==o||e[9]!==l?(f=!l&&t.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=o,e[9]=l,e[10]=f):f=e[10];const b=F?"default":"system",N=!F;let w;e[11]!==I||e[12]!==b||e[13]!==N?(w=t.jsx(Ie,{glyph:I,tone:b,readOnly:N,className:"size-8 shrink-0"}),e[11]=I,e[12]=b,e[13]=N,e[14]=w):w=e[14];let h;e[15]!==c||e[16]!==a?(h=c&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ge,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(ke,{size:16})})}),t.jsx(he,{align:"end",children:t.jsxs(xe,{variant:"destructive",onClick:K=>{K.stopPropagation(),c()},children:[t.jsx(ye,{size:16}),a("settings.skills.deleteButton")]})})]})}),e[15]=c,e[16]=a,e[17]=h):h=e[17];let x;e[18]!==w||e[19]!==h?(x=t.jsxs("div",{className:"flex items-start justify-between",children:[w,h]}),e[18]=w,e[19]=h,e[20]=x):x=e[20];let j;e[21]!==i.name?(j=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=j):j=e[22];let C;e[23]!==i.description||e[24]!==a?(C=i.description||a("settings.skills.noDescription"),e[23]=i.description,e[24]=a,e[25]=C):C=e[25];let k;e[26]!==C?(k=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:C}),e[26]=C,e[27]=k):k=e[27];let d;e[28]!==j||e[29]!==k?(d=t.jsxs("div",{className:"flex flex-col gap-1",children:[j,k]}),e[28]=j,e[29]=k,e[30]=d):d=e[30];let v;e[31]!==x||e[32]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,d]}),e[31]=x,e[32]=d,e[33]=v):v=e[33];let u;e[34]!==M||e[35]!==l||e[36]!==a?(u=l?a("settings.skills.importing"):M,e[34]=M,e[35]=l,e[36]=a,e[37]=u):u=e[37];let y;e[38]!==u?(y=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:u})})}),e[38]=u,e[39]=y):y=e[39];let g;e[40]!==v||e[41]!==y?(g=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,y]}),e[40]=v,e[41]=y,e[42]=g):g=e[42];let P;return e[43]!==l||e[44]!==g||e[45]!==p||e[46]!==f?(P=t.jsxs(je,{"aria-busy":l,className:p,children:[f,g]}),e[43]=l,e[44]=g,e[45]=p,e[46]=f,e[47]=P):P=e[47],P}function ee(r){const e=ie.c(2),{children:i}=r;let l;return e[0]!==i?(l=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=l):l=e[1],l}function Tt(){const r=ae(),e=te(),{org:i}=se(),l=Oe(),{remove:o,upload:c}=ze("home"),a=ce(),S=T.useRef(null),[m,M]=T.useState(""),[I,O]=T.useState(_),[F,z]=T.useState(!1),[p,f]=T.useState(null),[b,N]=T.useState(null),[w,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:Q.slashSkills(i.id)}),a.invalidateQueries({queryKey:Q.orgFsSkills(i.id)})},j=s=>a.setQueryData(Q.slashSkills(i.id),n=>s(n??[]));async function C(s){const n=[...s??[]];if(S.current&&(S.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){D.error(e("settings.skills.importNeedsFolder"));return}const q=E.split("/")[0]??"",R=n.filter(Be),W=R.find(A=>U(A)==="SKILL.md");if(!W){D.error(e("settings.skills.importMissingSkillMd"));return}if(R.length>V){D.error(e("settings.skills.importTooManyFiles",{count:String(R.length),max:String(V)}));return}const $=Ke(q),X=`skills/${$}`;let Y=!1;z(!0);try{if(await Fe(i.slug,"home",X)){D.error(e("settings.skills.importSlugTaken",{slug:$}));return}Y=!0;const A=Qe($,await W.text());j(oe=>[A,...oe]),h(A.id),await qe(He(R,$),c.mutateAsync),D.success(e("settings.skills.importSuccess",{name:$}))}catch(A){Y&&await o.mutateAsync(X).catch(()=>{}),D.error(A instanceof Error?A.message:e("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=m.toLowerCase(),d=(l.data??[]).filter(s=>s.name.toLowerCase().includes(k)||(s.description??"").toLowerCase().includes(k)).sort((s,n)=>Number(B(n))-Number(B(s))||s.name.localeCompare(n.name)),v=new Set((l.data??[]).map(s=>s.source)),u=new Map;for(const s of d)u.set(s.source,(u.get(s.source)??0)+1);const y=[{id:_,label:e("settings.skills.filterAll"),count:d.length},...[...v].map(s=>({id:s,label:re(s,i.name).label,count:u.get(s)??0}))],g=v.has(I)?I:_,P=g===_?d:d.filter(s=>s.source===g),K=s=>f($e(s.volume,s.path)),ne=async()=>{if(!b)return;const{id:s,path:n}=b;N(null),j(E=>E.filter(q=>q.id!==s));try{await o.mutateAsync(n),D.success(e("settings.skills.deleteSuccess"))}catch(E){D.error(E instanceof Error?E.message:e("settings.skills.deleteError"))}finally{x()}},H=t.jsxs(G,{size:"sm",disabled:F,onClick:()=>S.current?.click(),children:[t.jsx(Se,{size:14}),e(F?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(L,{children:[t.jsx(L.Content,{children:t.jsx(L.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(L.Title,{actions:r&&H,children:e("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(be,{value:m,onChange:M,placeholder:e("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:s=>{s.key==="Escape"&&(M(""),s.target.blur())}}),!r&&H,t.jsx("input",{ref:S,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:s=>{C(s.target.files)}})]}),y.length>2&&t.jsx(Me,{placement:"page",tabs:y,activeTab:g,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(s,n)=>t.jsx(me,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Z,{image:t.jsx(de,{size:48,className:"text-muted-foreground"}),title:e("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:e("settings.skills.errorDescription"),actions:t.jsx(G,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:e("settings.skills.retry")})})}):P.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Z,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:e(m?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:m?e("settings.skills.noResultsDescription",{search:m}):e("settings.skills.emptyDescription"),actions:!r&&!m&&H})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:P.map(s=>{const n=s.id===w;return t.jsx(Ge,{entry:s,pending:n,onOpen:()=>K(s),onDelete:B(s)&&!n?()=>N(s):void 0},s.id)})})})]})})}),p&&t.jsx(Re,{skillPath:p,onClose:()=>f(null)},p),t.jsx(we,{open:b!==null,onOpenChange:s=>!s&&N(null),children:t.jsxs(Ce,{children:[t.jsxs(De,{children:[t.jsx(Ne,{children:e("settings.skills.deleteDialogTitle")}),t.jsx(Pe,{children:e("settings.skills.deleteDialogDescription",{name:b?.name??""})})]}),t.jsxs(Ee,{children:[t.jsx(Ae,{children:e("settings.skills.cancel")}),t.jsx(Te,{onClick:ne,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:e("settings.skills.deleteButton")})]})]})})]})}export{Tt as default};
@@ -1 +1 @@
1
- import{b as B,a0 as L,r as v,j as e,n as x,e$ as k,dX as y,dY as E,dZ as a,fy as D,B as m,q as C,t as c,c as z}from"./index-DQZBt6Fl.js";import{D as T}from"./domain-settings-CqFWBtGR.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as $}from"./alert-dialog-BYQAyeOC.js";import{I as d}from"./input-rh1Mv0Wr.js";import{S as H}from"./switch-UqleIRW2.js";import{a as X,b as Y,c as Z,d as G}from"./use-org-sso-EA4En7Bf.js";import{s as J}from"./Trash01-Cs1900Vx.js";import{R as K}from"./require-capability-DpBsO_NN.js";import"./badge-D6ygNqO6.js";import"./select-DKZw7VY5.js";import"./index-BNnRrN_z.js";import"./ChevronUp-QcSQ5rVq.js";import"./access-gate-DrhvBokN.js";import"./capability-load-error-CvIv1gsN.js";function Q(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=X(o.id,o.slug),h=Y(o.id,o.slug),S=Z(o.id,o.slug),b=G(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),u=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(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!u&&!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(u?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!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.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[u&&!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(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(m,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(J,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(m,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(m,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!u||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&&u?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(m,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(m,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(K,{capability:"org:manage",area:"security",children:e.jsx(Q,{})}),s[0]=o):o=s[0],o}export{ue as default};
1
+ import{b as B,a0 as L,r as v,j as e,n as x,e$ as k,dX as y,dY as E,dZ as a,fy as D,B as m,q as C,t as c,c as z}from"./index-COJyT2bn.js";import{D as T}from"./domain-settings-BDTtE0Ud.js";import{f as O,e as R,b as q,A as F,d as M,c as U,g as $}from"./alert-dialog-CtGv9jdd.js";import{I as d}from"./input-BZsvuPI8.js";import{S as H}from"./switch-Cv3P8_Un.js";import{a as X,b as Y,c as Z,d as G}from"./use-org-sso-CVxh5evd.js";import{s as J}from"./Trash01-B82ZZMGA.js";import{R as K}from"./require-capability-BVZK0CKB.js";import"./badge-DdXiAz7d.js";import"./select-DUlMM14m.js";import"./index-DciLqihQ.js";import"./ChevronUp-BAybpbAO.js";import"./access-gate-BMbKi31w.js";import"./capability-load-error-VNoAtYvG.js";function Q(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=X(o.id,o.slug),h=Y(o.id,o.slug),S=Z(o.id,o.slug),b=G(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),u=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(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!u&&!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(u?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!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.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[u&&!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(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(m,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(J,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(m,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(m,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!u||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&&u?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(m,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(m,{onClick:_,disabled:h.isPending,size:"sm",children:h.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(q,{children:e.jsx(F,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.orgSso.removeButton")})]})]})})]})}function ue(){const s=z.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(K,{capability:"org:manage",area:"security",children:e.jsx(Q,{})}),s[0]=o):o=s[0],o}export{ue as default};
@@ -1 +1 @@
1
- import{c as Z,b as ee,j as i,n as se,r as J,e$ as pe,aP as xe,E as Se,a0 as he,o as ye,W as ne,dZ as X,B as V,d as je,f as ve,an as be,q as ce,K as Ce,dY as oe,dX as le,e as _e,t as de}from"./index-DQZBt6Fl.js";import{i as Re}from"./AlertCircle-CqW1GFxy.js";import{s as ke}from"./Plus-DcpbfgdJ.js";import{s as Ne}from"./Trash01-Cs1900Vx.js";import{I as ae}from"./input-rh1Mv0Wr.js";import{S as me}from"./switch-UqleIRW2.js";import{A as fe}from"./avatar-DxbODU4C.js";import{P as Pe,a as Te,b as we}from"./popover-hNLbYWT0.js";import{b as ue}from"./use-connection-CLDZmFlP.js";import{u as Ae}from"./use-registry-connections-C8ZRYmvy.js";import{f as ze,m as Ee}from"./use-organization-settings-rcECAo5J.js";import{R as $e}from"./require-capability-DpBsO_NN.js";import"./User01-C-kfOI2V.js";import"./use-mcp-client-CuZ_CH4K.js";import"./auth-BCpLT4L2.js";import"./schema-D9hq6-Ko.js";import"./task-board-CU3xz_UX.js";import"./access-gate-DrhvBokN.js";import"./capability-load-error-CvIv1gsN.js";function Me(t){const e=Z.c(6),{error:l}=t,c=ee();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Re,{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 Fe(t){const e=Z.c(74),{onCancel:l,onSuccess:c}=t,s=ee(),o=ue(),[r,d]=J.useState(""),[a,p]=J.useState(""),[v,A]=J.useState("");let S;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==v||e[4]!==a?(S=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:v||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]=v,e[4]=a,e[5]=S):S=e[5];let b;e[6]!==c||e[7]!==s?(b=j=>{ce("store_private_registry_added",{connection_id:j}),de.success(s("settings.orgStore.privateRegistryAdded")),c(j)},e[6]=c,e[7]=s,e[8]=b):b=e[8];let f;e[9]!==s?(f=j=>{de.error(s("settings.orgStore.failedAddRegistry",{error:j.message}))},e[9]=s,e[10]=f):f=e[10];let C;e[11]!==S||e[12]!==b||e[13]!==f?(C={mutationFn:S,onSuccess:b,onError:f},e[11]=S,e[12]=b,e[13]=f,e[14]=C):C=e[14];const{mutate:x,isPending:m}=_e(C);let u;e[15]!==s?(u=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=u):u=e[16];let h;e[17]!==s?(h=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=h):h=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=j=>d(j.target.value),e[19]=y):y=e[19];let g;e[20]!==r||e[21]!==h?(g=i.jsx(ae,{placeholder:h,value:r,onChange:y,className:"w-[280px]"}),e[20]=r,e[21]=h,e[22]=g):g=e[22];let _;e[23]!==u||e[24]!==g?(_=i.jsx(X,{title:u,action:g}),e[23]=u,e[24]=g,e[25]=_):_=e[25];let k;e[26]!==s?(k=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=k):k=e[27];let M;e[28]!==s?(M=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=M):M=e[29];let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=j=>p(j.target.value),e[30]=B):B=e[30];let Y;e[31]!==M||e[32]!==a?(Y=i.jsx(ae,{placeholder:M,value:a,onChange:B,className:"w-[280px]"}),e[31]=M,e[32]=a,e[33]=Y):Y=e[33];let q;e[34]!==k||e[35]!==Y?(q=i.jsx(X,{title:k,action:Y}),e[34]=k,e[35]=Y,e[36]=q):q=e[36];let O;e[37]!==s?(O=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=O):O=e[38];let z;e[39]!==s?(z=s("settings.orgStore.optional"),e[39]=s,e[40]=z):z=e[40];let R;e[41]!==s?(R=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=R):R=e[42];let U;e[43]===Symbol.for("react.memo_cache_sentinel")?(U=j=>A(j.target.value),e[43]=U):U=e[43];let F;e[44]!==R||e[45]!==v?(F=i.jsx(ae,{type:"password",placeholder:R,value:v,onChange:U,className:"w-[280px]"}),e[44]=R,e[45]=v,e[46]=F):F=e[46];let E;e[47]!==O||e[48]!==z||e[49]!==F?(E=i.jsx(X,{title:O,description:z,action:F}),e[47]=O,e[48]=z,e[49]=F,e[50]=E):E=e[50];let I;e[51]!==s?(I=s("settings.orgStore.cancel"),e[51]=s,e[52]=I):I=e[52];let N;e[53]!==m||e[54]!==l||e[55]!==I?(N=i.jsx(V,{variant:"ghost",size:"sm",onClick:l,disabled:m,children:I}),e[53]=m,e[54]=l,e[55]=I,e[56]=N):N=e[56];let D;e[57]!==x?(D=()=>x(),e[57]=x,e[58]=D):D=e[58];const L=!a||m;let P;e[59]!==m||e[60]!==s?(P=s(m?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=m,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==D||e[63]!==L||e[64]!==P?(T=i.jsx(V,{size:"sm",onClick:D,disabled:L,children:P}),e[62]=D,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==N||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[N,T]}),e[66]=N,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==q||e[70]!==E||e[71]!==w||e[72]!==_?($=i.jsxs(oe,{children:[_,q,E,w]}),e[69]=q,e[70]=E,e[71]=w,e[72]=_,e[73]=$):$=e[73],$}function ie(t){const e=Z.c(32),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:d,href:a,disabled:p}=t,v=ee(),A=je();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:b}=ve(S);let f;e[1]!==p||e[2]!==o||e[3]!==a||e[4]!==A||e[5]!==r||e[6]!==b?(f=()=>{a?A({to:a,params:{org:b}}):p||r(!o)},e[1]=p,e[2]=o,e[3]=a,e[4]=A,e[5]=r,e[6]=b,e[7]=f):f=e[7];const C=f;let x;e[8]!==s||e[9]!==l?(x=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(fe,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[8]=s,e[9]=l,e[10]=x):x=e[10];let m;e[11]!==d||e[12]!==v?(m=d&&i.jsxs(Pe,{children:[i.jsx(Te,{asChild:!0,children:i.jsx(V,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:De,children:i.jsx(Ne,{size:14})})}),i.jsx(we,{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:v("settings.orgStore.removeRegistry")}),i.jsx(V,{variant:"destructive",size:"xs",onClick:k=>{k.stopPropagation(),d()},children:v("settings.orgStore.remove")})]})})]}),e[11]=d,e[12]=v,e[13]=m):m=e[13];let u;e[14]!==r?(u=k=>r(k),e[14]=r,e[15]=u):u=e[15];let h;e[16]!==p||e[17]!==o||e[18]!==u?(h=i.jsx(me,{checked:o,disabled:p,onClick:Ie,onCheckedChange:u}),e[16]=p,e[17]=o,e[18]=u,e[19]=h):h=e[19];let y;e[20]!==a?(y=a&&i.jsx(be,{size:14,className:"text-muted-foreground"}),e[20]=a,e[21]=y):y=e[21];let g;e[22]!==m||e[23]!==h||e[24]!==y?(g=i.jsxs("div",{className:"flex items-center gap-2",children:[m,h,y]}),e[22]=m,e[23]=h,e[24]=y,e[25]=g):g=e[25];let _;return e[26]!==c||e[27]!==C||e[28]!==l||e[29]!==x||e[30]!==g?(_=i.jsx(X,{title:l,description:c,onClick:C,icon:x,action:g}),e[26]=c,e[27]=C,e[28]=l,e[29]=x,e[30]=g,e[31]=_):_=e[31],_}function Ie(t){return t.stopPropagation()}function De(t){return t.stopPropagation()}function Le(){const t=Z.c(80),e=ee(),{org:l}=he(),c=Ae(),s=ue(),o=ze(),{mutateAsync:r,isPending:d}=Ee(),a=ye(),[p,v]=J.useState(!1);let A,S,b,f,C,x;if(t[0]!==s||t[1]!==d||t[2]!==l.id||t[3]!==a||t[4]!==o||t[5]!==c||t[6]!==p||t[7]!==e||t[8]!==r){const y=ne.REGISTRY(l.id),g=n=>{if(!o)return n===y;const K=o.registries[n];return K?K.enabled:n===y},_=ne.COMMUNITY_REGISTRY(l.id),k=c.find(n=>n.id===y),M=c.find(n=>n.id===_||n.id==="community-registry"),B=M?.id??_,Y=ne.SELF(l.id),q=new Set([y,_,"community-registry",Y]),O=c.filter(n=>!q.has(n.id));let z;t[15]!==o||t[16]!==r?(z=async(n,K)=>{ce("store_registry_toggled",{connection_id:n,enabled:K});const ge=o??{registries:{},blockedMcps:[]};await r({...ge,registries:{...ge.registries,[n]:{enabled:K}}})},t[15]=o,t[16]=r,t[17]=z):z=t[17];const R=z;let U;t[18]!==s||t[19]!==l.id||t[20]!==a?(U=async n=>{ce("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),a.invalidateQueries({queryKey:Ce.organizationSettings(l.id)})},t[18]=s,t[19]=l.id,t[20]=a,t[21]=U):U=t[21];const F=U;let E;t[22]!==o||t[23]!==r?(E=async n=>{v(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[22]=o,t[23]=r,t[24]=E):E=t[24];const I=E;let N;t[25]!==e?(N=e("settings.orgStore.decoStoreSection"),t[25]=e,t[26]=N):N=t[26];const D=k?i.jsx(ie,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:k.icon,enabled:g(y),onToggle:n=>R(y,n),disabled:d}):i.jsx(X,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let L;t[27]!==D?(L=i.jsx(oe,{children:D}),t[27]=D,t[28]=L):L=t[28],t[29]!==N||t[30]!==L?(C=i.jsx(le,{title:N,children:L}),t[29]=N,t[30]=L,t[31]=C):C=t[31];let P;t[32]!==e?(P=e("settings.orgStore.privateRegistriesSection"),t[32]=e,t[33]=P):P=t[33];let T;t[34]!==p||t[35]!==e?(T=p?void 0:i.jsxs(V,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[i.jsx(ke,{size:14}),e("settings.orgStore.addRegistry")]}),t[34]=p,t[35]=e,t[36]=T):T=t[36];let w;t[37]!==I||t[38]!==p?(w=p&&i.jsx(Fe,{onCancel:()=>v(!1),onSuccess:I}),t[37]=I,t[38]=p,t[39]=w):w=t[39];let $;t[40]!==e?($=e("settings.orgStore.privateRegistry"),t[40]=e,t[41]=$):$=t[41];let j;t[42]!==e?(j=e("settings.orgStore.privateRegistryDescription"),t[42]=e,t[43]=j):j=t[43];let G;t[44]!==g?(G=g("self"),t[44]=g,t[45]=G):G=t[45];let Q;t[46]!==R?(Q=n=>R("self",n),t[46]=R,t[47]=Q):Q=t[47];let W;t[48]!==$||t[49]!==j||t[50]!==G||t[51]!==Q?(W=i.jsx(ie,{name:$,description:j,enabled:G,onToggle:Q,href:"/$org/settings/store/registry"}),t[48]=$,t[49]=j,t[50]=G,t[51]=Q,t[52]=W):W=t[52];let te;t[53]!==F||t[54]!==R||t[55]!==g||t[56]!==d||t[57]!==e?(te=n=>i.jsx(ie,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:g(n.id),onToggle:K=>R(n.id,K),onDelete:()=>F(n.id),disabled:d},n.id),t[53]=F,t[54]=R,t[55]=g,t[56]=d,t[57]=e,t[58]=te):te=t[58];const re=O.map(te);let H;t[59]!==W||t[60]!==re?(H=i.jsxs(oe,{children:[W,re]}),t[59]=W,t[60]=re,t[61]=H):H=t[61],t[62]!==P||t[63]!==T||t[64]!==w||t[65]!==H?(x=i.jsxs(le,{title:P,actions:T,children:[w,H]}),t[62]=P,t[63]=T,t[64]=w,t[65]=H,t[66]=x):x=t[66],S=le,t[67]!==e?(f=e("settings.orgStore.communitySection"),t[67]=e,t[68]=f):f=t[68],A=oe,b=M?i.jsx(ie,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:M.icon,enabled:g(B),onToggle:n=>R(B,n),disabled:d}):i.jsx(X,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(fe,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(me,{checked:!1,disabled:!0,onCheckedChange:Ke})}),t[0]=s,t[1]=d,t[2]=l.id,t[3]=a,t[4]=o,t[5]=c,t[6]=p,t[7]=e,t[8]=r,t[9]=A,t[10]=S,t[11]=b,t[12]=f,t[13]=C,t[14]=x}else A=t[9],S=t[10],b=t[11],f=t[12],C=t[13],x=t[14];let m;t[69]!==A||t[70]!==b?(m=i.jsx(A,{children:b}),t[69]=A,t[70]=b,t[71]=m):m=t[71];let u;t[72]!==S||t[73]!==f||t[74]!==m?(u=i.jsx(S,{title:f,children:m}),t[72]=S,t[73]=f,t[74]=m,t[75]=u):u=t[75];let h;return t[76]!==C||t[77]!==x||t[78]!==u?(h=i.jsxs(i.Fragment,{children:[C,x,u]}),t[76]=C,t[77]=x,t[78]=u,t[79]=h):h=t[79],h}function Ke(){}function Ue(){const t=Z.c(13),e=ee();let l;t[0]!==e?(l=p=>{const{error:v}=p;return i.jsx(Me,{error:v??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(xe,{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(se.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(Le,{}),t[7]=r):r=t[7];let d;t[8]!==o?(d=i.jsx(J.Suspense,{fallback:c,children:i.jsx(se,{children:i.jsx(se.Content,{children:i.jsx(se.Container,{children:i.jsxs(pe,{children:[o,r]})})})})}),t[8]=o,t[9]=d):d=t[9];let a;return t[10]!==l||t[11]!==d?(a=i.jsx(Se,{fallback:l,children:d}),t[10]=l,t[11]=d,t[12]=a):a=t[12],a}function lt(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx($e,{capability:"registry:manage",area:"the store",children:i.jsx(Ue,{})}),t[0]=e):e=t[0],e}export{lt as default};
1
+ import{c as Z,b as ee,j as i,n as se,r as J,e$ as pe,aP as xe,E as Se,a0 as he,o as ye,W as ne,dZ as X,B as V,d as je,f as ve,an as be,q as ce,K as Ce,dY as oe,dX as le,e as _e,t as de}from"./index-COJyT2bn.js";import{i as Re}from"./AlertCircle-Cm80uQMQ.js";import{s as ke}from"./Plus-L4CMeo2h.js";import{s as Ne}from"./Trash01-B82ZZMGA.js";import{I as ae}from"./input-BZsvuPI8.js";import{S as me}from"./switch-Cv3P8_Un.js";import{A as fe}from"./avatar-CQQzKV-7.js";import{P as Pe,a as Te,b as we}from"./popover-KWKKOTZi.js";import{b as ue}from"./use-connection-CREpIwwx.js";import{u as Ae}from"./use-registry-connections-fr8foU7v.js";import{f as ze,m as Ee}from"./use-organization-settings-BjpjaZHP.js";import{R as $e}from"./require-capability-BVZK0CKB.js";import"./User01-BBjKoAPb.js";import"./use-mcp-client-C5UR6qvr.js";import"./auth-DbBN__xJ.js";import"./schema-CbM5M5_P.js";import"./task-board-Bp0cTOfv.js";import"./access-gate-BMbKi31w.js";import"./capability-load-error-VNoAtYvG.js";function Me(t){const e=Z.c(6),{error:l}=t,c=ee();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Re,{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 Fe(t){const e=Z.c(74),{onCancel:l,onSuccess:c}=t,s=ee(),o=ue(),[r,d]=J.useState(""),[a,p]=J.useState(""),[v,A]=J.useState("");let S;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==v||e[4]!==a?(S=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:v||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]=v,e[4]=a,e[5]=S):S=e[5];let b;e[6]!==c||e[7]!==s?(b=j=>{ce("store_private_registry_added",{connection_id:j}),de.success(s("settings.orgStore.privateRegistryAdded")),c(j)},e[6]=c,e[7]=s,e[8]=b):b=e[8];let f;e[9]!==s?(f=j=>{de.error(s("settings.orgStore.failedAddRegistry",{error:j.message}))},e[9]=s,e[10]=f):f=e[10];let C;e[11]!==S||e[12]!==b||e[13]!==f?(C={mutationFn:S,onSuccess:b,onError:f},e[11]=S,e[12]=b,e[13]=f,e[14]=C):C=e[14];const{mutate:x,isPending:m}=_e(C);let u;e[15]!==s?(u=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=u):u=e[16];let h;e[17]!==s?(h=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=h):h=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=j=>d(j.target.value),e[19]=y):y=e[19];let g;e[20]!==r||e[21]!==h?(g=i.jsx(ae,{placeholder:h,value:r,onChange:y,className:"w-[280px]"}),e[20]=r,e[21]=h,e[22]=g):g=e[22];let _;e[23]!==u||e[24]!==g?(_=i.jsx(X,{title:u,action:g}),e[23]=u,e[24]=g,e[25]=_):_=e[25];let k;e[26]!==s?(k=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=k):k=e[27];let M;e[28]!==s?(M=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=M):M=e[29];let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=j=>p(j.target.value),e[30]=B):B=e[30];let Y;e[31]!==M||e[32]!==a?(Y=i.jsx(ae,{placeholder:M,value:a,onChange:B,className:"w-[280px]"}),e[31]=M,e[32]=a,e[33]=Y):Y=e[33];let q;e[34]!==k||e[35]!==Y?(q=i.jsx(X,{title:k,action:Y}),e[34]=k,e[35]=Y,e[36]=q):q=e[36];let O;e[37]!==s?(O=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=O):O=e[38];let z;e[39]!==s?(z=s("settings.orgStore.optional"),e[39]=s,e[40]=z):z=e[40];let R;e[41]!==s?(R=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=R):R=e[42];let U;e[43]===Symbol.for("react.memo_cache_sentinel")?(U=j=>A(j.target.value),e[43]=U):U=e[43];let F;e[44]!==R||e[45]!==v?(F=i.jsx(ae,{type:"password",placeholder:R,value:v,onChange:U,className:"w-[280px]"}),e[44]=R,e[45]=v,e[46]=F):F=e[46];let E;e[47]!==O||e[48]!==z||e[49]!==F?(E=i.jsx(X,{title:O,description:z,action:F}),e[47]=O,e[48]=z,e[49]=F,e[50]=E):E=e[50];let I;e[51]!==s?(I=s("settings.orgStore.cancel"),e[51]=s,e[52]=I):I=e[52];let N;e[53]!==m||e[54]!==l||e[55]!==I?(N=i.jsx(V,{variant:"ghost",size:"sm",onClick:l,disabled:m,children:I}),e[53]=m,e[54]=l,e[55]=I,e[56]=N):N=e[56];let D;e[57]!==x?(D=()=>x(),e[57]=x,e[58]=D):D=e[58];const L=!a||m;let P;e[59]!==m||e[60]!==s?(P=s(m?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=m,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==D||e[63]!==L||e[64]!==P?(T=i.jsx(V,{size:"sm",onClick:D,disabled:L,children:P}),e[62]=D,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==N||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[N,T]}),e[66]=N,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==q||e[70]!==E||e[71]!==w||e[72]!==_?($=i.jsxs(oe,{children:[_,q,E,w]}),e[69]=q,e[70]=E,e[71]=w,e[72]=_,e[73]=$):$=e[73],$}function ie(t){const e=Z.c(32),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:d,href:a,disabled:p}=t,v=ee(),A=je();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={from:"/shell/$org"},e[0]=S):S=e[0];const{org:b}=ve(S);let f;e[1]!==p||e[2]!==o||e[3]!==a||e[4]!==A||e[5]!==r||e[6]!==b?(f=()=>{a?A({to:a,params:{org:b}}):p||r(!o)},e[1]=p,e[2]=o,e[3]=a,e[4]=A,e[5]=r,e[6]=b,e[7]=f):f=e[7];const C=f;let x;e[8]!==s||e[9]!==l?(x=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(fe,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[8]=s,e[9]=l,e[10]=x):x=e[10];let m;e[11]!==d||e[12]!==v?(m=d&&i.jsxs(Pe,{children:[i.jsx(Te,{asChild:!0,children:i.jsx(V,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:De,children:i.jsx(Ne,{size:14})})}),i.jsx(we,{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:v("settings.orgStore.removeRegistry")}),i.jsx(V,{variant:"destructive",size:"xs",onClick:k=>{k.stopPropagation(),d()},children:v("settings.orgStore.remove")})]})})]}),e[11]=d,e[12]=v,e[13]=m):m=e[13];let u;e[14]!==r?(u=k=>r(k),e[14]=r,e[15]=u):u=e[15];let h;e[16]!==p||e[17]!==o||e[18]!==u?(h=i.jsx(me,{checked:o,disabled:p,onClick:Ie,onCheckedChange:u}),e[16]=p,e[17]=o,e[18]=u,e[19]=h):h=e[19];let y;e[20]!==a?(y=a&&i.jsx(be,{size:14,className:"text-muted-foreground"}),e[20]=a,e[21]=y):y=e[21];let g;e[22]!==m||e[23]!==h||e[24]!==y?(g=i.jsxs("div",{className:"flex items-center gap-2",children:[m,h,y]}),e[22]=m,e[23]=h,e[24]=y,e[25]=g):g=e[25];let _;return e[26]!==c||e[27]!==C||e[28]!==l||e[29]!==x||e[30]!==g?(_=i.jsx(X,{title:l,description:c,onClick:C,icon:x,action:g}),e[26]=c,e[27]=C,e[28]=l,e[29]=x,e[30]=g,e[31]=_):_=e[31],_}function Ie(t){return t.stopPropagation()}function De(t){return t.stopPropagation()}function Le(){const t=Z.c(80),e=ee(),{org:l}=he(),c=Ae(),s=ue(),o=ze(),{mutateAsync:r,isPending:d}=Ee(),a=ye(),[p,v]=J.useState(!1);let A,S,b,f,C,x;if(t[0]!==s||t[1]!==d||t[2]!==l.id||t[3]!==a||t[4]!==o||t[5]!==c||t[6]!==p||t[7]!==e||t[8]!==r){const y=ne.REGISTRY(l.id),g=n=>{if(!o)return n===y;const K=o.registries[n];return K?K.enabled:n===y},_=ne.COMMUNITY_REGISTRY(l.id),k=c.find(n=>n.id===y),M=c.find(n=>n.id===_||n.id==="community-registry"),B=M?.id??_,Y=ne.SELF(l.id),q=new Set([y,_,"community-registry",Y]),O=c.filter(n=>!q.has(n.id));let z;t[15]!==o||t[16]!==r?(z=async(n,K)=>{ce("store_registry_toggled",{connection_id:n,enabled:K});const ge=o??{registries:{},blockedMcps:[]};await r({...ge,registries:{...ge.registries,[n]:{enabled:K}}})},t[15]=o,t[16]=r,t[17]=z):z=t[17];const R=z;let U;t[18]!==s||t[19]!==l.id||t[20]!==a?(U=async n=>{ce("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),a.invalidateQueries({queryKey:Ce.organizationSettings(l.id)})},t[18]=s,t[19]=l.id,t[20]=a,t[21]=U):U=t[21];const F=U;let E;t[22]!==o||t[23]!==r?(E=async n=>{v(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[22]=o,t[23]=r,t[24]=E):E=t[24];const I=E;let N;t[25]!==e?(N=e("settings.orgStore.decoStoreSection"),t[25]=e,t[26]=N):N=t[26];const D=k?i.jsx(ie,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:k.icon,enabled:g(y),onToggle:n=>R(y,n),disabled:d}):i.jsx(X,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let L;t[27]!==D?(L=i.jsx(oe,{children:D}),t[27]=D,t[28]=L):L=t[28],t[29]!==N||t[30]!==L?(C=i.jsx(le,{title:N,children:L}),t[29]=N,t[30]=L,t[31]=C):C=t[31];let P;t[32]!==e?(P=e("settings.orgStore.privateRegistriesSection"),t[32]=e,t[33]=P):P=t[33];let T;t[34]!==p||t[35]!==e?(T=p?void 0:i.jsxs(V,{variant:"outline",size:"sm",onClick:()=>v(!0),children:[i.jsx(ke,{size:14}),e("settings.orgStore.addRegistry")]}),t[34]=p,t[35]=e,t[36]=T):T=t[36];let w;t[37]!==I||t[38]!==p?(w=p&&i.jsx(Fe,{onCancel:()=>v(!1),onSuccess:I}),t[37]=I,t[38]=p,t[39]=w):w=t[39];let $;t[40]!==e?($=e("settings.orgStore.privateRegistry"),t[40]=e,t[41]=$):$=t[41];let j;t[42]!==e?(j=e("settings.orgStore.privateRegistryDescription"),t[42]=e,t[43]=j):j=t[43];let G;t[44]!==g?(G=g("self"),t[44]=g,t[45]=G):G=t[45];let Q;t[46]!==R?(Q=n=>R("self",n),t[46]=R,t[47]=Q):Q=t[47];let W;t[48]!==$||t[49]!==j||t[50]!==G||t[51]!==Q?(W=i.jsx(ie,{name:$,description:j,enabled:G,onToggle:Q,href:"/$org/settings/store/registry"}),t[48]=$,t[49]=j,t[50]=G,t[51]=Q,t[52]=W):W=t[52];let te;t[53]!==F||t[54]!==R||t[55]!==g||t[56]!==d||t[57]!==e?(te=n=>i.jsx(ie,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:g(n.id),onToggle:K=>R(n.id,K),onDelete:()=>F(n.id),disabled:d},n.id),t[53]=F,t[54]=R,t[55]=g,t[56]=d,t[57]=e,t[58]=te):te=t[58];const re=O.map(te);let H;t[59]!==W||t[60]!==re?(H=i.jsxs(oe,{children:[W,re]}),t[59]=W,t[60]=re,t[61]=H):H=t[61],t[62]!==P||t[63]!==T||t[64]!==w||t[65]!==H?(x=i.jsxs(le,{title:P,actions:T,children:[w,H]}),t[62]=P,t[63]=T,t[64]=w,t[65]=H,t[66]=x):x=t[66],S=le,t[67]!==e?(f=e("settings.orgStore.communitySection"),t[67]=e,t[68]=f):f=t[68],A=oe,b=M?i.jsx(ie,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:M.icon,enabled:g(B),onToggle:n=>R(B,n),disabled:d}):i.jsx(X,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(fe,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(me,{checked:!1,disabled:!0,onCheckedChange:Ke})}),t[0]=s,t[1]=d,t[2]=l.id,t[3]=a,t[4]=o,t[5]=c,t[6]=p,t[7]=e,t[8]=r,t[9]=A,t[10]=S,t[11]=b,t[12]=f,t[13]=C,t[14]=x}else A=t[9],S=t[10],b=t[11],f=t[12],C=t[13],x=t[14];let m;t[69]!==A||t[70]!==b?(m=i.jsx(A,{children:b}),t[69]=A,t[70]=b,t[71]=m):m=t[71];let u;t[72]!==S||t[73]!==f||t[74]!==m?(u=i.jsx(S,{title:f,children:m}),t[72]=S,t[73]=f,t[74]=m,t[75]=u):u=t[75];let h;return t[76]!==C||t[77]!==x||t[78]!==u?(h=i.jsxs(i.Fragment,{children:[C,x,u]}),t[76]=C,t[77]=x,t[78]=u,t[79]=h):h=t[79],h}function Ke(){}function Ue(){const t=Z.c(13),e=ee();let l;t[0]!==e?(l=p=>{const{error:v}=p;return i.jsx(Me,{error:v??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(xe,{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(se.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(Le,{}),t[7]=r):r=t[7];let d;t[8]!==o?(d=i.jsx(J.Suspense,{fallback:c,children:i.jsx(se,{children:i.jsx(se.Content,{children:i.jsx(se.Container,{children:i.jsxs(pe,{children:[o,r]})})})})}),t[8]=o,t[9]=d):d=t[9];let a;return t[10]!==l||t[11]!==d?(a=i.jsx(Se,{fallback:l,children:d}),t[10]=l,t[11]=d,t[12]=a):a=t[12],a}function lt(){const t=Z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx($e,{capability:"registry:manage",area:"the store",children:i.jsx(Ue,{})}),t[0]=e):e=t[0],e}export{lt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-lqv7Wdye.js","assets/index-COJyT2bn.js","assets/index-CCCwF5vG.css","assets/Tool02-CE2CsLyJ.js","assets/CheckCircle-DmDAlxUx.js","assets/Settings02-BW27aEc7.js","assets/use-mcp-client-C5UR6qvr.js","assets/auth-DbBN__xJ.js","assets/useInfiniteQuery-DhQmSZKM.js","assets/infiniteQueryObserver-C2EEO2RI.js","assets/badge-DdXiAz7d.js","assets/input-BZsvuPI8.js","assets/table-DCTjMuv9.js","assets/toggle-group-CyMnbShe.js","assets/use-view-mode-CCd9XC2d.js","assets/use-mobile-_vYKejdu.js","assets/DotsVertical-Qjn9bD7u.js","assets/Globe01-Ctrf78fu.js","assets/SearchMd-BjQ6aaMY.js","assets/dialog-CDUwK9Ky.js","assets/X-CZ5u1gQz.js","assets/AlertCircle-Cm80uQMQ.js","assets/Download01-CUdEmTJH.js","assets/Upload01-zkIbWeZQ.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-CtGv9jdd.js","assets/Trash01-B82ZZMGA.js","assets/label-BI62SaKd.js","assets/select-DUlMM14m.js","assets/index-DciLqihQ.js","assets/ChevronUp-BAybpbAO.js","assets/switch-Cv3P8_Un.js","assets/textarea-C1epfjF6.js","assets/ArrowLeft-CI6_vwJl.js","assets/ArrowRight-YdifOChs.js","assets/Link01-CAgdLkvZ.js","assets/safe-image-url-D5z803Ot.js","assets/checkbox-CK3yWTdA.js","assets/Eye-C1v6-SBQ.js","assets/LinkExternal01-CWguI2G0.js","assets/XCircle-DVIMVh0g.js","assets/use-infinite-scroll-CegnlwHv.js","assets/use-copy-hi0SQQDr.js","assets/Copy01-BLG-yB9O.js","assets/Key01-W5nMWqao.js","assets/Plus-L4CMeo2h.js","assets/tooltip-B6UxRepU.js","assets/mcp-oauth-BX-s6twV.js","assets/Play-D9coBDJI.js"])))=>i.map(i=>d[i]);
2
+ import{c as n,d as c,f as m,j as t,h as f,r as l,aJ as p}from"./index-COJyT2bn.js";import{R as u}from"./require-capability-BVZK0CKB.js";import"./access-gate-BMbKi31w.js";import"./capability-load-error-VNoAtYvG.js";const g=l.lazy(()=>p(()=>import("./registry-layout-lqv7Wdye.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])));function h(){const e=n.c(5),i=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=m(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,{className:"size-5 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{h as default};
@@ -1 +1 @@
1
- import{r as c,j as i,bp as C,bn as y,bv as T,bq as I,bF as M,bK as H,bG as q,c as z,l as g}from"./index-DQZBt6Fl.js";var m="Switch",[A]=q(m),[U,F]=A(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...v}=a,[p,h]=c.useState(null),w=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(U,{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,...v,ref:w,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const v=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==t&&h){const w=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(w)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function G(a){const e=z.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
1
+ import{r as c,j as i,bp as C,bn as y,bv as T,bq as I,bF as M,bK as H,bG as q,c as z,l as g}from"./index-COJyT2bn.js";var m="Switch",[A]=q(m),[U,F]=A(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...v}=a,[p,h]=c.useState(null),w=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(U,{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,...v,ref:w,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const v=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==t&&h){const w=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(w)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function G(a){const e=z.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
@@ -1 +1 @@
1
- import{c as se,j as s,fs as ye,b as ue,r as ae,B as te,aj as ge,l as je,t as ce,aP as Re}from"./index-DQZBt6Fl.js";import{s as xe}from"./Plus-DcpbfgdJ.js";import{A as be,a as ve,b as Se,c as De,g as Ne,d as Pe,e as _e,f as Ce}from"./alert-dialog-BYQAyeOC.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-CfR9zhfQ.js";import{I as Ie}from"./input-rh1Mv0Wr.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-BE31MYd2.js";import{u as Ge,d as Be,h as He,t as qe}from"./use-org-repo-syncs-BPvYovov.js";import{R as Le}from"./require-capability-DpBsO_NN.js";import"./X-DgI4yqfX.js";import"./ArrowLeft-BGvcqKye.js";import"./LinkExternal01-FZW_JKrN.js";import"./tooltip-BdIw7qeF.js";import"./index-BNnRrN_z.js";import"./label-BNGvxM6S.js";import"./github-icon-B7rNxQCT.js";import"./useInfiniteQuery-Ds6mCrD2.js";import"./infiniteQueryObserver-DGwzP6OU.js";import"./avatar-DxbODU4C.js";import"./User01-C-kfOI2V.js";import"./collection-search-2f8pAB4Y.js";import"./SearchMd-XFzJrarE.js";import"./use-debounced-value-DTrA4F64.js";import"./use-org-fs-6rzJUZWB.js";import"./DotsVertical-DCTIN1zx.js";import"./Download01-B4Q5hpED.js";import"./Share07-CxrO44KP.js";import"./Globe01-DlhUCcjG.js";import"./Key01-muV6twoN.js";import"./Palette-D8vRagJV.js";import"./Trash01-Cs1900Vx.js";import"./Zap-BkWm3G14.js";import"./file-type-icon-Dv-tVjqp.js";import"./folder-icon-186o_xBL.js";import"./Eye-C46dzrHd.js";import"./skill-md-ChfVs4uF.js";import"./access-gate-DrhvBokN.js";import"./capability-load-error-CvIv1gsN.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:l,onRemove:i}=e,o=ue();let u;t[0]!==l||t[1]!==o?(u=Je(l,o),t[0]=l,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==l.repositoryId||t[4]!==r.data?(f=r.data?.find(_=>_.id===l.repositoryId),t[3]=l.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${l.repoOwner}/${l.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==l.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[10]=l.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const P=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==P?(D=je("text-xs mt-0.5 truncate",P),t[15]=P,t[16]=D):D=t[16];let R;t[17]!==l.volume||t[18]!==o?(R=o("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[17]=l.volume,t[18]=o,t[19]=R):R=t[19];let b;t[20]!==m.label||t[21]!==R||t[22]!==D?(b=s.jsxs("p",{className:D,children:[R," ·"," ",m.label]}),t[20]=m.label,t[21]=R,t[22]=D,t[23]=b):b=t[23];let x;t[24]!==b||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,b]}),t[24]=b,t[25]=S,t[26]=x):x=t[26];let h;t[27]!==x||t[28]!==g?(h=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=h):h=t[29];let y;t[30]!==o?(y=o("settings.syncedRepos.remove"),t[30]=o,t[31]=y):y=t[31];let j;t[32]!==i||t[33]!==y?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:i,children:y}),t[32]=i,t[33]=y,t[34]=j):j=t[34];let N;return t[35]!==h||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[h,j]}),t[35]=h,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:l}=e,i=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==i?(r=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==i?(c=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=c):c=t[14];let d;t[15]!==l||t[16]!==c?(d=s.jsxs(te,{onClick:l,size:"sm",className:"mt-2",children:[g,c]}),t[15]=l,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),l=Ge(),i=Be(),o=He(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||i.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let P;e[5]!==c||e[6]!==o||e[7]!==t?(P=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=P):P=e[8];const D=P;if(l.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Re,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let R;e[10]!==l.data?(R=l.data??[],e[10]=l.data,e[11]=R):R=e[11];const b=R;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let h;e[14]!==x?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=h):h=e[15];let y;e[16]!==b||e[17]!==t?(y=b.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=b,e[17]=t,e[18]=y):y=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let _;e[22]!==u||e[23]!==j?(_=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=_):_=e[24];const de=r!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>{a||f(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let A;e[28]!==C?(A=s.jsx(Ae,{children:C}),e[28]=C,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=a=>g(a.target.value),e[38]=le):le=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:le,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const he=i.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==i.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:he,children:I}),e[47]=i.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==i.isPending||e[51]!==n?(F=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==i.isPending||e[54]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=T):T=e[55];let G;e[56]!==S||e[57]!==F||e[58]!==T?(G=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=G):G=e[59];let B;e[60]!==$||e[61]!==G?(B=s.jsxs(ze,{children:[$,G]}),e[60]=$,e[61]=G,e[62]=B):B=e[62];let H;e[63]!==z||e[64]!==O||e[65]!==B?(H=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=H):H=e[66];let q;e[67]!==H||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:ie,children:H}),e[67]=H,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(be,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(Pe,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(_e,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Ce,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==h||e[103]!==ee||e[104]!==y||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[h,y,_,q,ee]}),e[101]=q,e[102]=h,e[103]=ee,e[104]=y,e[105]=_,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function Et(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{Et as default};
1
+ import{c as se,j as s,fs as ye,b as ue,r as ae,B as te,aj as ge,l as je,t as ce,aP as Re}from"./index-COJyT2bn.js";import{s as xe}from"./Plus-L4CMeo2h.js";import{A as be,a as ve,b as Se,c as De,g as Ne,d as Pe,e as _e,f as Ce}from"./alert-dialog-CtGv9jdd.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-CDUwK9Ky.js";import{I as Ie}from"./input-BZsvuPI8.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-DocVIjle.js";import{u as Ge,d as Be,h as He,t as qe}from"./use-org-repo-syncs-B0Np_qpl.js";import{R as Le}from"./require-capability-BVZK0CKB.js";import"./X-CZ5u1gQz.js";import"./ArrowLeft-CI6_vwJl.js";import"./LinkExternal01-CWguI2G0.js";import"./tooltip-B6UxRepU.js";import"./index-DciLqihQ.js";import"./label-BI62SaKd.js";import"./github-icon-Ctc2abJk.js";import"./useInfiniteQuery-DhQmSZKM.js";import"./infiniteQueryObserver-C2EEO2RI.js";import"./avatar-CQQzKV-7.js";import"./User01-BBjKoAPb.js";import"./collection-search-DtjV9-VA.js";import"./SearchMd-BjQ6aaMY.js";import"./use-debounced-value-Ln0OSes2.js";import"./use-org-fs-SXZbeDBx.js";import"./DotsVertical-Qjn9bD7u.js";import"./Download01-CUdEmTJH.js";import"./Share07-DWRoaK9G.js";import"./Globe01-Ctrf78fu.js";import"./Key01-W5nMWqao.js";import"./Palette-1NgeCtg4.js";import"./Trash01-B82ZZMGA.js";import"./Zap-B7SjQTF1.js";import"./file-type-icon-BIj4oPmy.js";import"./folder-icon-C9QPDhMu.js";import"./Eye-C1v6-SBQ.js";import"./skill-md-ChfVs4uF.js";import"./access-gate-BMbKi31w.js";import"./capability-load-error-VNoAtYvG.js";function Ve(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Je(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:qe(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ke(e){const t=se.c(38),{config:l,onRemove:i}=e,o=ue();let u;t[0]!==l||t[1]!==o?(u=Je(l,o),t[0]=l,t[1]=o,t[2]=u):u=t[2];const m=u,r=$e();let f;t[3]!==l.repositoryId||t[4]!==r.data?(f=r.data?.find(_=>_.id===l.repositoryId),t[3]=l.repositoryId,t[4]=r.data,t[5]=f):f=t[5];const n=f;let g;t[6]!==n?(g=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:n?s.jsx(Fe,{provider:n.provider,size:16,className:"text-muted-foreground"}):s.jsx(ge,{size:16,className:"text-muted-foreground"})}),t[6]=n,t[7]=g):g=t[7];const c=n?.path??`${l.repoOwner}/${l.repoName}`;let d;t[8]!==c?(d=s.jsx("span",{className:"font-medium text-sm truncate",children:c}),t[8]=c,t[9]=d):d=t[9];let p;t[10]!==l.ref?(p=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[10]=l.ref,t[11]=p):p=t[11];let S;t[12]!==d||t[13]!==p?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[d,p]}),t[12]=d,t[13]=p,t[14]=S):S=t[14];const P=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==P?(D=je("text-xs mt-0.5 truncate",P),t[15]=P,t[16]=D):D=t[16];let R;t[17]!==l.volume||t[18]!==o?(R=o("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[17]=l.volume,t[18]=o,t[19]=R):R=t[19];let b;t[20]!==m.label||t[21]!==R||t[22]!==D?(b=s.jsxs("p",{className:D,children:[R," ·"," ",m.label]}),t[20]=m.label,t[21]=R,t[22]=D,t[23]=b):b=t[23];let x;t[24]!==b||t[25]!==S?(x=s.jsxs("div",{className:"min-w-0",children:[S,b]}),t[24]=b,t[25]=S,t[26]=x):x=t[26];let h;t[27]!==x||t[28]!==g?(h=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[g,x]}),t[27]=x,t[28]=g,t[29]=h):h=t[29];let y;t[30]!==o?(y=o("settings.syncedRepos.remove"),t[30]=o,t[31]=y):y=t[31];let j;t[32]!==i||t[33]!==y?(j=s.jsx(te,{variant:"outline",size:"sm",onClick:i,children:y}),t[32]=i,t[33]=y,t[34]=j):j=t[34];let N;return t[35]!==h||t[36]!==j?(N=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[h,j]}),t[35]=h,t[36]=j,t[37]=N):N=t[37],N}function Me(e){const t=se.c(21),{onAdd:l}=e,i=ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(ge,{size:20,className:"text-muted-foreground"})}),t[0]=o):o=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let m;t[3]!==u?(m=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=m):m=t[4];let r;t[5]!==i?(r=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=r):r=t[6];let f;t[7]!==r?(f=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:r}),t[7]=r,t[8]=f):f=t[8];let n;t[9]!==m||t[10]!==f?(n=s.jsxs("div",{children:[m,f]}),t[9]=m,t[10]=f,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(xe,{size:14}),t[12]=g):g=t[12];let c;t[13]!==i?(c=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=c):c=t[14];let d;t[15]!==l||t[16]!==c?(d=s.jsxs(te,{onClick:l,size:"sm",className:"mt-2",children:[g,c]}),t[15]=l,t[16]=c,t[17]=d):d=t[17];let p;return t[18]!==n||t[19]!==d?(p=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[o,n,d]}),t[18]=n,t[19]=d,t[20]=p):p=t[20],p}function Qe(){const e=se.c(107),t=ue(),l=Ge(),i=Be(),o=He(),[u,m]=ae.useState(!1),[r,f]=ae.useState(null),[n,g]=ae.useState(""),[c,d]=ae.useState(null);let p;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==n?(p=function(){!r||!n.trim()||i.mutate({repositoryId:r.id,volume:n.trim()},{onSuccess:v=>{f(null),ce.success(t("settings.syncedRepos.created",{volume:v.volume}))},onError:v=>{ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=n,e[4]=p):p=e[4];const S=p;let P;e[5]!==c||e[6]!==o||e[7]!==t?(P=function(){c&&o.mutate(c.id,{onSuccess:()=>ce.success(t("settings.syncedRepos.removed")),onError:v=>ce.error(v instanceof Error?v.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=c,e[6]=o,e[7]=t,e[8]=P):P=e[8];const D=P;if(l.isPending){let a;return e[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Re,{className:"h-32 w-full"}),e[9]=a):a=e[9],a}let R;e[10]!==l.data?(R=l.data??[],e[10]=l.data,e[11]=R):R=e[11];const b=R;let x;e[12]!==t?(x=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=x):x=e[13];let h;e[14]!==x?(h=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[14]=x,e[15]=h):h=e[15];let y;e[16]!==b||e[17]!==t?(y=b.length===0?s.jsx(Me,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(te,{onClick:()=>m(!0),size:"sm",children:[s.jsx(xe,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(a=>s.jsx(Ke,{config:a,onRemove:()=>d(a)},a.id))})]}),e[16]=b,e[17]=t,e[18]=y):y=e[18];let j;e[19]!==t?(j=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=j):j=e[20];let N;e[21]===Symbol.for("react.memo_cache_sentinel")?(N=a=>{const{repository:v}=a;m(!1),f(v),g(Ve(v.path.split("/").at(-1)??v.path))},e[21]=N):N=e[21];let _;e[22]!==u||e[23]!==j?(_=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=_):_=e[24];const de=r!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=a=>{a||f(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let A;e[28]!==C?(A=s.jsx(Ae,{children:C}),e[28]=C,e[29]=A):A=e[29];const me=r?r.path:"";let k;e[30]!==t||e[31]!==me?(k=t("settings.syncedRepos.nameDialogDescription",{repo:me}),e[30]=t,e[31]=me,e[32]=k):k=e[32];let w;e[33]!==k?(w=s.jsx(ke,{children:k}),e[33]=k,e[34]=w):w=e[34];let z;e[35]!==A||e[36]!==w?(z=s.jsxs(we,{children:[A,w]}),e[35]=A,e[36]=w,e[37]=z):z=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=a=>g(a.target.value),e[38]=le):le=e[38];let E;e[39]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=E):E=e[40];let O;e[41]!==E||e[42]!==n?(O=s.jsx(Ie,{value:n,onChange:le,placeholder:E,autoFocus:!0}),e[41]=E,e[42]=n,e[43]=O):O=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>f(null),e[44]=ne):ne=e[44];const he=i.isPending;let I;e[45]!==t?(I=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=I):I=e[46];let $;e[47]!==i.isPending||e[48]!==I?($=s.jsx(te,{variant:"outline",onClick:ne,disabled:he,children:I}),e[47]=i.isPending,e[48]=I,e[49]=$):$=e[49];let F;e[50]!==i.isPending||e[51]!==n?(F=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=F):F=e[52];let T;e[53]!==i.isPending||e[54]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=T):T=e[55];let G;e[56]!==S||e[57]!==F||e[58]!==T?(G=s.jsx(te,{disabled:F,onClick:S,children:T}),e[56]=S,e[57]=F,e[58]=T,e[59]=G):G=e[59];let B;e[60]!==$||e[61]!==G?(B=s.jsxs(ze,{children:[$,G]}),e[60]=$,e[61]=G,e[62]=B):B=e[62];let H;e[63]!==z||e[64]!==O||e[65]!==B?(H=s.jsxs(Ee,{className:"sm:max-w-sm",children:[z,O,B]}),e[63]=z,e[64]=O,e[65]=B,e[66]=H):H=e[66];let q;e[67]!==H||e[68]!==de?(q=s.jsx(Oe,{open:de,onOpenChange:ie,children:H}),e[67]=H,e[68]=de,e[69]=q):q=e[69];const fe=c!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=a=>{a||d(null)},e[70]=oe):oe=e[70];const pe=c?.volume??"";let L;e[71]!==t||e[72]!==pe?(L=t("settings.syncedRepos.removeTitle",{volume:pe}),e[71]=t,e[72]=pe,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(be,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==t?(J=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=J):J=e[77];let K;e[78]!==J?(K=s.jsx(ve,{children:J}),e[78]=J,e[79]=K):K=e[79];let M;e[80]!==V||e[81]!==K?(M=s.jsxs(Se,{children:[V,K]}),e[80]=V,e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==Q?(U=s.jsx(De,{children:Q}),e[85]=Q,e[86]=U):U=e[86];let W;e[87]!==t?(W=t("settings.syncedRepos.remove"),e[87]=t,e[88]=W):W=e[88];let X;e[89]!==D||e[90]!==W?(X=s.jsx(Ne,{onClick:D,children:W}),e[89]=D,e[90]=W,e[91]=X):X=e[91];let Y;e[92]!==U||e[93]!==X?(Y=s.jsxs(Pe,{children:[U,X]}),e[92]=U,e[93]=X,e[94]=Y):Y=e[94];let Z;e[95]!==M||e[96]!==Y?(Z=s.jsxs(_e,{children:[M,Y]}),e[95]=M,e[96]=Y,e[97]=Z):Z=e[97];let ee;e[98]!==fe||e[99]!==Z?(ee=s.jsx(Ce,{open:fe,onOpenChange:oe,children:Z}),e[98]=fe,e[99]=Z,e[100]=ee):ee=e[100];let re;return e[101]!==q||e[102]!==h||e[103]!==ee||e[104]!==y||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[h,y,_,q,ee]}),e[101]=q,e[102]=h,e[103]=ee,e[104]=y,e[105]=_,e[106]=re):re=e[106],re}function Ue(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Qe,{})}),e[0]=t):t=e[0],t}function Et(){const e=se.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Le,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{Et as default};
@@ -1 +1 @@
1
- import{c,l as i,j as r}from"./index-DQZBt6Fl.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 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("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 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("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{m as T,f as a,p as b,x as c,b as d,d as e};
1
+ import{c,l as i,j as r}from"./index-COJyT2bn.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 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("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 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("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{m as T,f as a,p as b,x as c,b as d,d as e};
@@ -1 +1 @@
1
- import{r as v,j as d,er as k,bp as p,bq as T,et as M,dk as P,bu as S,bv as F,bo as V,es as y,bG as D,c as x,l as g}from"./index-DQZBt6Fl.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=F({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(M,{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=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{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 R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(P,{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})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function 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(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function 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(q,{"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(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};
1
+ import{r as v,j as d,er as k,bp as p,bq as T,et as M,dk as P,bu as S,bv as F,bo as V,es as y,bG as D,c as x,l as g}from"./index-COJyT2bn.js";var m="Tabs",[G]=D(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=S(i),[c,b]=F({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:V(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(M,{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=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{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 R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(P,{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})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,q=_,B=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function 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(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function 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(q,{"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(B,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,O as b,U as c};