decocms 4.388.4 → 4.389.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 (373) hide show
  1. package/dist/client/assets/{AlertCircle-Cat-Fy2i.js → AlertCircle-CVkVxygv.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CSNer7sZ.js → AreaChart-lVePxdbV.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DuxVUo5_.js → ArrowLeft-CN6aZBvX.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CsoDgnUj.js → ArrowRight-FqJnNh3f.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CbPBDOpZ.js → ArrowUp-bOLRJZuX.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-DgQehil3.js → CartesianChart-C3Zko_Et.js} +1 -1
  7. package/dist/client/assets/{Check-BZXRTDaX.js → Check-DL_AGZMy.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-Cj4PQGuv.js → CheckCircle-DtMp-qqq.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DGt31MPD.js → ChevronUp-B6mY-MC1.js} +1 -1
  10. package/dist/client/assets/{Copy01-B6hr4CBg.js → Copy01-6lOOhJcp.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-CiYLi_pR.js → CreditCard01-DdYfDHIS.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-BITRq5d-.js → DotsVertical-CAjUqtRp.js} +1 -1
  13. package/dist/client/assets/{Download01-CsYfHghd.js → Download01-Dq8Pn8XY.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-zVAOL4kJ.js → ErrorBarContext-B26KvZ3G.js} +1 -1
  15. package/dist/client/assets/{Eye-rQUtSbk6.js → Eye-B5e-ilzV.js} +1 -1
  16. package/dist/client/assets/{Globe04-C_9DD9oO.js → Globe04-_nV993le.js} +1 -1
  17. package/dist/client/assets/{Image01-BLIf6uY9.js → Image01-CkJtDP-I.js} +1 -1
  18. package/dist/client/assets/{Key01-SGIR_QrT.js → Key01-BCuGindq.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-GBQ0rQxQ.js → LayoutLeft-U0F-Da_p.js} +1 -1
  20. package/dist/client/assets/{Line-y7nkMb-C.js → Line-BA6i0Sln.js} +1 -1
  21. package/dist/client/assets/{Link01-BnVQGp2l.js → Link01-BjTxU_bP.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-Dh0AABP8.js → LinkExternal01-DSUCZUJp.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CxisI5ut.js → Monitor01-r707obGd.js} +1 -1
  24. package/dist/client/assets/{Package-DsU1cU6S.js → Package-D2jMN__x.js} +1 -1
  25. package/dist/client/assets/{Palette-CzoNEzRs.js → Palette-DebiHmrq.js} +1 -1
  26. package/dist/client/assets/{Plus-qASEo4cN.js → Plus-BbELO07z.js} +1 -1
  27. package/dist/client/assets/{SearchLg-qmi8uaeX.js → SearchLg-C9MObDBB.js} +1 -1
  28. package/dist/client/assets/{SearchMd-B6NDUgzQ.js → SearchMd-B1Foybfh.js} +1 -1
  29. package/dist/client/assets/{Sector-DK9KwpRN.js → Sector-OiAocllE.js} +1 -1
  30. package/dist/client/assets/{Share07-CMPYQYHk.js → Share07-B2WnpDWD.js} +1 -1
  31. package/dist/client/assets/{Stars01-cdnol_cb.js → Stars01-DUL2jKUJ.js} +1 -1
  32. package/dist/client/assets/{Sun-BSFyLDhg.js → Sun-BKxdX8hu.js} +1 -1
  33. package/dist/client/assets/{Tool01-H9OcfGdq.js → Tool01-BvNT4KDI.js} +1 -1
  34. package/dist/client/assets/{Trash01-mB4s-hrv.js → Trash01-BLoRPhD3.js} +1 -1
  35. package/dist/client/assets/{Upload01-Uv_jtHIk.js → Upload01-CNb1qfRO.js} +1 -1
  36. package/dist/client/assets/{User01-DHGCVvV3.js → User01-U5CIC-GP.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BfT6tB5U.js → UserSquare-CZakdYWe.js} +1 -1
  38. package/dist/client/assets/{Users01-C_qUmfZB.js → Users01-C6BprSkC.js} +1 -1
  39. package/dist/client/assets/{X-vKTIsgL1.js → X-BNszojyh.js} +1 -1
  40. package/dist/client/assets/{XCircle-Cu2Sy8Aw.js → XCircle-BuDwhQqF.js} +1 -1
  41. package/dist/client/assets/{XClose-DFUqDOc8.js → XClose-D_JLFZFT.js} +1 -1
  42. package/dist/client/assets/{Zap-CSRFlEXK.js → Zap-BCwjglMw.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-Burao8Eg.js → ZoomOut-q6Y0RhlM.js} +1 -1
  44. package/dist/client/assets/{access-gate-Bbnx_Qh-.js → access-gate-Clo8Jex8.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-DzNaYAxM.js → add-connection-dialog-C5SXdxkT.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-C0sV-7Xb.js → agent-analytics-es8O9CL0.js} +2 -2
  47. package/dist/client/assets/agent-app-CGYFJjq5.js +1 -0
  48. package/dist/client/assets/{agent-assets-OnbttXnX.js → agent-assets-Dy169ySy.js} +1 -1
  49. package/dist/client/assets/{agent-automation-BSmqRx9Q.js → agent-automation-D1R1huVt.js} +6 -6
  50. package/dist/client/assets/{agent-automations-D7yiwZb3.js → agent-automations-BVBbNAeW.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-CTElBaoM.js → agent-connect-sources-BYoUrpVF.js} +1 -1
  52. package/dist/client/assets/agent-deck-sqReTFoM.js +1 -0
  53. package/dist/client/assets/{agent-e2e-36-yunOr.js → agent-e2e-DxRXY84q.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-B5DGYFrd.js → agent-experiments-_dQ2BC_Q.js} +1 -1
  55. package/dist/client/assets/agent-file-CGmxIBgM.js +1 -0
  56. package/dist/client/assets/{agent-git-BYVAaPsW.js → agent-git-B2s_zuHj.js} +2 -2
  57. package/dist/client/assets/{agent-hosting-BbmS530x.js → agent-hosting-BGGSrQLd.js} +1 -1
  58. package/dist/client/assets/{agent-icon-CzsnrYjD.js → agent-icon-CSebdE0g.js} +1 -1
  59. package/dist/client/assets/agent-library-file-CK_Y2Pye.js +1 -0
  60. package/dist/client/assets/{agent-monitor-C27DYrEB.js → agent-monitor-Dd5ty7vm.js} +1 -1
  61. package/dist/client/assets/{agent-overview-DsQze4i5.js → agent-overview-Cm3ny-qk.js} +1 -1
  62. package/dist/client/assets/agent-settings-B-c4VHd9.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-BNuBiz19.js → agent-site-editor-CDYe7KMp.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-C2ptd6Is.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-B7A6sQQt.js +2 -0
  66. package/dist/client/assets/agent-site-editor-preview-sULLmso9.js +518 -0
  67. package/dist/client/assets/agent-view-C2yjGU43.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-C4pdkmKc.js → agent-view-guard-a8AZfEO9.js} +1 -1
  69. package/dist/client/assets/{agents-list-B3F1REj8.js → agents-list-oZyF4Ii3.js} +1 -1
  70. package/dist/client/assets/{ai-providers-BYHAVCy5.js → ai-providers-BlScv4nl.js} +2 -2
  71. package/dist/client/assets/{alert-DsW1KUvt.js → alert-DsihHj7h.js} +1 -1
  72. package/dist/client/assets/{alert-dialog-Dg6YJ6PP.js → alert-dialog-DeRt3vSN.js} +1 -1
  73. package/dist/client/assets/{api-keys-DDd9VBHu.js → api-keys-C9NfUH35.js} +1 -1
  74. package/dist/client/assets/api-keys-D3tjigFv.js +1 -0
  75. package/dist/client/assets/app-editor-D_REDtDg.js +1 -0
  76. package/dist/client/assets/{asset-utils-DOWh4JzZ.js → asset-utils-BS06OXCA.js} +1 -1
  77. package/dist/client/assets/{auth-D3Q2r2cz.js → auth-B-OXMWGw.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-M53zUwPP.js → auth-catchall-CLBv3q5z.js} +1 -1
  79. package/dist/client/assets/{auth-entry-CQhZUGUz.js → auth-entry-uRCGi0qy.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-Cp7zhn_p.js → auth-split-layout-C9jB6J1h.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-DG9xWGRs.js → authenticate-and-persist-oauth-B71_ZhsC.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-DuetYP8A.js → automation-list-row-BX3OvbcZ.js} +1 -1
  83. package/dist/client/assets/{automation-runs-DrVjV_Uv.js → automation-runs-CUFGFLxs.js} +1 -1
  84. package/dist/client/assets/automations-DGcV2mJq.js +1 -0
  85. package/dist/client/assets/{autosend-C5knIVwo.js → autosend-pQ9pD2-2.js} +1 -1
  86. package/dist/client/assets/{avatar-CLf3yQhN.js → avatar-GIuLZx2C.js} +1 -1
  87. package/dist/client/assets/{badge-DuB4cqrw.js → badge-DS3KIYvS.js} +1 -1
  88. package/dist/client/assets/{block-document-DZ3zGn-U.js → block-document-WF9-dn_8.js} +3 -3
  89. package/dist/client/assets/blocks-preview-workspace-context-BlZqg5yu.js +1 -0
  90. package/dist/client/assets/{breadcrumb-SXbKtw7u.js → breadcrumb-D6xZIsj2.js} +1 -1
  91. package/dist/client/assets/{buckets-D7jxbA8X.js → buckets-CNixgGHU.js} +1 -1
  92. package/dist/client/assets/{build-improve-prompt-doc-DKo7W0US.js → build-improve-prompt-doc-DeGFReow.js} +1 -1
  93. package/dist/client/assets/{bulk-category-panel-CS9EslBN.js → bulk-category-panel-BS5_T4uL.js} +1 -1
  94. package/dist/client/assets/{calendar-D41RMBsP.js → calendar-D4hMMrVq.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-CYpF4fm6.js → capability-load-error-BjI2iK0-.js} +1 -1
  96. package/dist/client/assets/category-editor-BFX9U9Yh.js +1 -0
  97. package/dist/client/assets/{chart-CdmZzz30.js → chart-CdPsiu6K.js} +1 -1
  98. package/dist/client/assets/{chat-context-D1GbDSrr.js → chat-context-HOmU0YHH.js} +6 -6
  99. package/dist/client/assets/{chat-draft-VYqGGS3B.js → chat-draft-BdxqYU8-.js} +1 -1
  100. package/dist/client/assets/{checkbox-BKGUJJNh.js → checkbox-DBYfq56y.js} +1 -1
  101. package/dist/client/assets/{choose-editor-Dkb9gjmg.js → choose-editor-DSxVv7hu.js} +1 -1
  102. package/dist/client/assets/{claim-phase-copy-0btUuJoC.js → claim-phase-copy-njXeDF0h.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-BFRzX7yY.js → cli-auth-success-uK8yk1Sb.js} +1 -1
  104. package/dist/client/assets/{client-icons-CIit2qYG.js → client-icons-CaoDPAaa.js} +1 -1
  105. package/dist/client/assets/{collapsible-eiDLfZY7.js → collapsible-BpIxv8-d.js} +1 -1
  106. package/dist/client/assets/{collection-detail-D6aw3A-V.js → collection-detail-vK2X038F.js} +1 -1
  107. package/dist/client/assets/{collection-display-button-D9O76Rnp.js → collection-display-button-ChjN1roR.js} +1 -1
  108. package/dist/client/assets/{collection-search-BQXOJg8a.js → collection-search-DyuqjLWs.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-zKpdBBAO.js → collection-table-wrapper-CNNpAz5Y.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-BWQrYrdS.js → collection-tabs-3_QvnkN-.js} +1 -1
  111. package/dist/client/assets/combobox-OP-CbRFf.js +1 -0
  112. package/dist/client/assets/command-ByUEKQB9.js +1 -0
  113. package/dist/client/assets/{companion-mcps-section-8c0rXQex.js → companion-mcps-section-6HKE7JJ2.js} +1 -1
  114. package/dist/client/assets/{connect-B9ZzFP7o.js → connect-CsNBKbv0.js} +2 -2
  115. package/dist/client/assets/{connect-layout-CSTvrhGM.js → connect-layout-DVtCwqcX.js} +1 -1
  116. package/dist/client/assets/{connection-DzM2SOZ6.js → connection-DR9gf0au.js} +1 -1
  117. package/dist/client/assets/{connection-card-DF11WhqU.js → connection-card-BOo8yulu.js} +1 -1
  118. package/dist/client/assets/{connection-detail-Dimacfl3.js → connection-detail-BqzECTqG.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-CyBATU5Y.js → connection-form-helpers-D5P5OxyV.js} +1 -1
  120. package/dist/client/assets/{connections-C_1m4t4b.js → connections-DH9JM6iR.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-Cy1fVEro.js → create-organization-dialog-S8LtKHhd.js} +1 -1
  122. package/dist/client/assets/{decofile-api-DkM3ZQFM.js → decofile-api-CWaaGMA2.js} +1 -1
  123. package/dist/client/assets/{decopilot-YckYKTsg.js → decopilot-B7-O9fZC.js} +2 -2
  124. package/dist/client/assets/{dialog-C36x61_J.js → dialog-BG6kEGFR.js} +1 -1
  125. package/dist/client/assets/{discover-CqgNMlsp.js → discover-OS0btTyd.js} +1 -1
  126. package/dist/client/assets/{domain-settings-D6TBWbch.js → domain-settings-BrbTzYfK.js} +1 -1
  127. package/dist/client/assets/{download-app-dialog-7J000m-o.js → download-app-dialog-NqW4PLAx.js} +1 -1
  128. package/dist/client/assets/{drawer-CsJzOKcM.js → drawer-Bl-PPIzX.js} +1 -1
  129. package/dist/client/assets/{editor-BQuCFEpz.js → editor-BiwQpn1s.js} +1 -1
  130. package/dist/client/assets/{empty-state-ClBiZqLf.js → empty-state-BpI78UAU.js} +1 -1
  131. package/dist/client/assets/{empty-state-gVTYQvW1.js → empty-state-DzReaOau.js} +1 -1
  132. package/dist/client/assets/{extract-connection-data-BIqslos8.js → extract-connection-data-BimwPioU.js} +1 -1
  133. package/dist/client/assets/{feature-gate-DLeaUXYN.js → feature-gate-B63BZEdG.js} +1 -1
  134. package/dist/client/assets/{feature-paywall-lhh7GOr7.js → feature-paywall-DwNmZ-M9.js} +1 -1
  135. package/dist/client/assets/{file-explorer-BRRFAgbe.js → file-explorer-DLzYcbz9.js} +1 -1
  136. package/dist/client/assets/{file-preview-DobzjEc2.js → file-preview-DCBxvWAy.js} +1 -1
  137. package/dist/client/assets/{file-share-button-6XYGV6w8.js → file-share-button-Cz0mgdAm.js} +1 -1
  138. package/dist/client/assets/{file-type-icon-CFRsMAQ4.js → file-type-icon-Cbv1Det1.js} +1 -1
  139. package/dist/client/assets/{folder-icon-CxyYiSJb.js → folder-icon-DltflRpD.js} +1 -1
  140. package/dist/client/assets/{form-CXSt7_li.js → form-Bx8qGby0.js} +1 -1
  141. package/dist/client/assets/{gateway-client-BF14HPqj.js → gateway-client-DiyAsoDf.js} +1 -1
  142. package/dist/client/assets/{general-0kms2_Mb.js → general-DTp5FT8F.js} +1 -1
  143. package/dist/client/assets/{github-icon-CIx0jkrL.js → github-icon-Bx6tzbBb.js} +1 -1
  144. package/dist/client/assets/{home-CyQJcQvg.js → home-tpS1TH6x.js} +1 -1
  145. package/dist/client/assets/{hooks-enzgIMXj.js → hooks-ZOtfl4oi.js} +2 -2
  146. package/dist/client/assets/{hooks-C8t7cMQJ.js → hooks-lZSCdRwc.js} +1 -1
  147. package/dist/client/assets/{icon-button-Df-IeDHT.js → icon-button-BudvJWM8.js} +1 -1
  148. package/dist/client/assets/{index-Ci3v6d1n.js → index-B7pMCohP.js} +1 -1
  149. package/dist/client/assets/index-B88q0man.css +1 -0
  150. package/dist/client/assets/{index-B7z_63F4.js → index-B8ZawsDP.js} +1 -1
  151. package/dist/client/assets/{index-DC9_5qIh.js → index-B9lZAmmH.js} +1 -1
  152. package/dist/client/assets/{index-DowxFM-Z.js → index-Bzch_Lwn.js} +1 -1
  153. package/dist/client/assets/{index-ClQyNrgO.js → index-C-u7JO1Y.js} +1 -1
  154. package/dist/client/assets/{index-Doi07Y6T.js → index-C0e8Nw2i.js} +1 -1
  155. package/dist/client/assets/{index-Byz-UaqT.js → index-CR8U3UFH.js} +1 -1
  156. package/dist/client/assets/{index-doEaURqC.js → index-CyBVTyGa.js} +7 -7
  157. package/dist/client/assets/{index-DV9UJZA2.js → index-CzuzrcF3.js} +1 -1
  158. package/dist/client/assets/{index-BoSUEB27.js → index-DeVdNW-7.js} +1 -1
  159. package/dist/client/assets/{index-CDAG9yf3.js → index-DmF8NlWI.js} +1 -1
  160. package/dist/client/assets/{index-BODjkOG4.js → index-DmsjOEhK.js} +1 -1
  161. package/dist/client/assets/{index-C4LzZ3-O.js → index-DtBnPwzh.js} +1 -1
  162. package/dist/client/assets/{index-D9padtMD.js → index-nJTy1ykh.js} +1 -1
  163. package/dist/client/assets/{index-redirect-XY4L95T5.js → index-redirect-lSGpveHC.js} +1 -1
  164. package/dist/client/assets/{infiniteQueryObserver-CxJm0T6_.js → infiniteQueryObserver-COZ-9XSO.js} +1 -1
  165. package/dist/client/assets/{infra-billing-zdKJ_MUK.js → infra-billing-ZSvY9y-Y.js} +1 -1
  166. package/dist/client/assets/input-D5Zi_pUc.js +1 -0
  167. package/dist/client/assets/{input-BT236l5B.js → input-DMG-B3VZ.js} +2 -2
  168. package/dist/client/assets/{input-CLIoB1hh.js → input-DOIUaBAK.js} +1 -1
  169. package/dist/client/assets/{integration-icon-Crk6WRxP.js → integration-icon-mTqkOE6y.js} +1 -1
  170. package/dist/client/assets/{label-tAsQMZ2G.js → label-DVhvlWqs.js} +1 -1
  171. package/dist/client/assets/{last-preview-page-002026Ee.js → last-preview-page-Cc9l6ICr.js} +1 -1
  172. package/dist/client/assets/{layout-CCpqo3zm.js → layout-0DaHUY7Z.js} +1 -1
  173. package/dist/client/assets/{legacy-agents-deep-Cj78AYzA.js → legacy-agents-deep-O9zXW4qh.js} +1 -1
  174. package/dist/client/assets/{legacy-main-redirect-Dn96iLn4.js → legacy-main-redirect-MeePJHje.js} +1 -1
  175. package/dist/client/assets/{library-BuoDGyY9.js → library-DHdWNZX-.js} +1 -1
  176. package/dist/client/assets/{login-DqL9YZRz.js → login-CXyISdG5.js} +1 -1
  177. package/dist/client/assets/{markdown-D0jNOMCX.js → markdown-DCPDulUN.js} +1 -1
  178. package/dist/client/assets/{mcp-app-renderer-BvLPqeD1.js → mcp-app-renderer-DBdofBbE.js} +2 -2
  179. package/dist/client/assets/{mcp-oauth-61IHYJoj.js → mcp-oauth-DdNMjTqu.js} +1 -1
  180. package/dist/client/assets/{members-BcXF5gIl.js → members-YBQ4CS4C.js} +1 -1
  181. package/dist/client/assets/{message-templates-CUQwBtaa.js → message-templates-B-vmK4Xp.js} +1 -1
  182. package/dist/client/assets/{mini-report-page-DbALNxiX.js → mini-report-page-DekMuoTa.js} +1 -1
  183. package/dist/client/assets/{mock-board-D9-PmaL9.js → mock-board-D9NUZPwb.js} +9 -9
  184. package/dist/client/assets/{monaco-editor-xB6SdWXy.js → monaco-editor-tpWF7AL5.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-CTbrFT2U.js → monitoring-stats-row-D_bvL4CA.js} +1 -1
  186. package/dist/client/assets/{multi-select-BPlBOZll.js → multi-select-C3lQgqH3.js} +1 -1
  187. package/dist/client/assets/{mustache-Btjjkmrx.js → mustache-BU3hKYND.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-D8-Vh_4C.js → oauth-callback-BiuyznT3.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-ai-provider-Dpai0ql-.js → oauth-callback-ai-provider-DqtXAIB8.js} +1 -1
  190. package/dist/client/assets/{onboarding-uOVvp-Mg.js → onboarding-BS368ORS.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-BQt56FI4.js → optimistic-project-sidebar-views-BfkTIuSj.js} +1 -1
  192. package/dist/client/assets/org-file-open-context-Bh_zBQ2O.js +1 -0
  193. package/dist/client/assets/{organization-choice-9DpczJ4c.js → organization-choice-GuO7qGDl.js} +1 -1
  194. package/dist/client/assets/{orgs-B6tWlX0C.js → orgs-DhHpNlvn.js} +1 -1
  195. package/dist/client/assets/page-seo-form-BML1eDhR.js +1 -0
  196. package/dist/client/assets/{pair-BIUMok9W.js → pair-CIltybgP.js} +1 -1
  197. package/dist/client/assets/{plan-ladder-DjuDG4EH.js → plan-ladder-BEYdYGx8.js} +1 -1
  198. package/dist/client/assets/{popover-GUR8piky.js → popover-CUdTfYte.js} +1 -1
  199. package/dist/client/assets/post-calendar-BVrfveN8.js +1 -0
  200. package/dist/client/assets/post-editor-LBOMfHyI.js +1 -0
  201. package/dist/client/assets/{preview-content-CkHbAlf-.js → preview-content-D7H_AlKU.js} +1 -1
  202. package/dist/client/assets/{preview-dialog-DUI33rZ8.js → preview-dialog-CUz95NoQ.js} +1 -1
  203. package/dist/client/assets/{primitives-CHkTFFF-.js → primitives-CyfO2GN8.js} +1 -1
  204. package/dist/client/assets/{profile-BIFbXoSW.js → profile-BNPVU14n.js} +1 -1
  205. package/dist/client/assets/{project-app-view-ZkgOByQo.js → project-app-view-Dm6c4g3t.js} +1 -1
  206. package/dist/client/assets/{project-feed-DGoAUO34.js → project-feed-orYCz9U3.js} +1 -1
  207. package/dist/client/assets/{project-icon-mjklzNJs.js → project-icon-DWnsLAeJ.js} +1 -1
  208. package/dist/client/assets/project-reports-DhaLYRaZ.js +1 -0
  209. package/dist/client/assets/project-tasks-Dzzzm0ET.js +1 -0
  210. package/dist/client/assets/{prompts-BwsVrHFI.js → prompts-Dpv9Ex1_.js} +1 -1
  211. package/dist/client/assets/record-editor-BQ-gbw4b.js +1 -0
  212. package/dist/client/assets/redirect-editor-eLzPdMVZ.js +1 -0
  213. package/dist/client/assets/reports-8U4sSr1z.js +1 -0
  214. package/dist/client/assets/{reports-ChF6GDQz.js → reports-CUfYm0DC.js} +1 -1
  215. package/dist/client/assets/{reports-onboarding-ukyewr1e.js → reports-onboarding-V3a9FHx8.js} +1 -1
  216. package/dist/client/assets/{reports-tab-Cxq1-mux.js → reports-tab-Bx7-g2HC.js} +2 -2
  217. package/dist/client/assets/{repositories-D7d8VzOE.js → repositories-Bbw6GL37.js} +1 -1
  218. package/dist/client/assets/{repository-import-picker-B6ijLkOL.js → repository-import-picker-74Y3ta69.js} +1 -1
  219. package/dist/client/assets/{repository-picker-Ca5oB9j5.js → repository-picker-dKTE5PS5.js} +1 -1
  220. package/dist/client/assets/{require-capability-vhXMBpff.js → require-capability-QoYjHav_.js} +1 -1
  221. package/dist/client/assets/{required-auth-layout-DbGCmQgx.js → required-auth-layout-BgLvQHTP.js} +1 -1
  222. package/dist/client/assets/{reset-password-DrRaSkr-.js → reset-password-ateNgI6E.js} +1 -1
  223. package/dist/client/assets/{resizable-WgWAPECX.js → resizable-D6HLmII4.js} +1 -1
  224. package/dist/client/assets/{review-settings-BzcjRJO0.js → review-settings-jZZT0JG1.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-i_tw_Jd2.js → rich-text-link-control-0ZhNexVb.js} +2 -2
  226. package/dist/client/assets/{roles-DTbcvvsD.js → roles-ERYsouVf.js} +1 -1
  227. package/dist/client/assets/{route-BRh6VH3Q.js → route-D5DT7lzH.js} +1 -1
  228. package/dist/client/assets/{route-B8hLxHmX.js → route-DW_oVxtq.js} +1 -1
  229. package/dist/client/assets/{route-DsWfLZyf.js → route-HgZwHfFA.js} +1 -1
  230. package/dist/client/assets/{route-page-header-tbVW9ntg.js → route-page-header-BHdnDvfR.js} +1 -1
  231. package/dist/client/assets/runnable-block-editor-DrtKYS1k.js +17 -0
  232. package/dist/client/assets/{sandbox-lifecycle-context-CvyFr09R.js → sandbox-lifecycle-context-LNZL2c0K.js} +2 -2
  233. package/dist/client/assets/{schema-BVqtjcyJ.js → schema-DSsDEA1v.js} +1 -1
  234. package/dist/client/assets/{scroll-area-Cve7MqyA.js → scroll-area-CmvmQLS1.js} +1 -1
  235. package/dist/client/assets/{search-input-CCUlZDzf.js → search-input-0hd-PWUF.js} +1 -1
  236. package/dist/client/assets/{search-toggle-BtmGTpxl.js → search-toggle-Bp6o4xvm.js} +1 -1
  237. package/dist/client/assets/{secret-picker-DVWtSCXk.js → secret-picker--QwK1qR-.js} +1 -1
  238. package/dist/client/assets/{secrets-dQAYGJYM.js → secrets-ODT01eOm.js} +1 -1
  239. package/dist/client/assets/sections-editor-DwSDIcRs.js +1 -0
  240. package/dist/client/assets/select-CDhEibGy.js +1 -0
  241. package/dist/client/assets/{select-model-Bnz73VTx.js → select-model-Dd7JcBMF.js} +1 -1
  242. package/dist/client/assets/seo-editor-BMnaZ5KR.js +1 -0
  243. package/dist/client/assets/{separator-JATiwE_2.js → separator-D-_LXjFg.js} +1 -1
  244. package/dist/client/assets/{settings-tab-CE0tP2vq.js → settings-tab-CKxa2O9d.js} +4 -4
  245. package/dist/client/assets/{sheet-ZoEgH6s-.js → sheet-DH_REC9j.js} +1 -1
  246. package/dist/client/assets/shell-layout-B3x_9fo1.js +1 -0
  247. package/dist/client/assets/{sidebar-Cz1S2PSM.js → sidebar-CxoDmdm4.js} +1 -1
  248. package/dist/client/assets/{skill-preview-BP5xxsO4.js → skill-preview-D4GrMJU0.js} +1 -1
  249. package/dist/client/assets/{skills-D52kTkau.js → skills-BYtnT-vq.js} +1 -1
  250. package/dist/client/assets/{sso-DAgB-pSG.js → sso-C8v2EdhJ.js} +1 -1
  251. package/dist/client/assets/{switch-BNLiV_oA.js → switch-C7dIR4UF.js} +1 -1
  252. package/dist/client/assets/{synced-repos-BzaJ7fNm.js → synced-repos-BNAaKJnR.js} +1 -1
  253. package/dist/client/assets/{table-D7l9brRh.js → table-B9OXzOjU.js} +1 -1
  254. package/dist/client/assets/{tabs-Gq0qvZI4.js → tabs-D6s_HA-y.js} +1 -1
  255. package/dist/client/assets/{task-board-BXLBBo-B.js → task-board-Qj-6Ctqf.js} +1 -1
  256. package/dist/client/assets/{task-route-BpYPpL3v.js → task-route-9wqWimw6.js} +1 -1
  257. package/dist/client/assets/{task-status-C7fhyr8_.js → task-status-D5cWLC8O.js} +1 -1
  258. package/dist/client/assets/{taskboard-analytics-Bhbjv4p8.js → taskboard-analytics-BtiQkIih.js} +1 -1
  259. package/dist/client/assets/{tasks-C2avg53f.js → tasks-BF0fu0p2.js} +2 -2
  260. package/dist/client/assets/tasks-D4PEOEIP.js +1 -0
  261. package/dist/client/assets/textarea-TE2JJa-B.js +1 -0
  262. package/dist/client/assets/{thread-button-CzoAkKWi.js → thread-button-DUOTtsFE.js} +1 -1
  263. package/dist/client/assets/{thread-intent-DuCE7MYG.js → thread-intent-jq9HKW3p.js} +1 -1
  264. package/dist/client/assets/{thread-route-C5QqTXOt.js → thread-route-C47YRRAe.js} +1 -1
  265. package/dist/client/assets/{thread-route-BBKn0p1b.js → thread-route-JcpQ-ikA.js} +1 -1
  266. package/dist/client/assets/{thread-sheet-body-C52UGBXx.js → thread-sheet-body-DvAYJwTc.js} +1 -1
  267. package/dist/client/assets/{toggle-group-DHrftnUg.js → toggle-group-Dv_lnjT7.js} +1 -1
  268. package/dist/client/assets/{toolbar-icon-button-iy_uLVVB.js → toolbar-icon-button-Cq75cloK.js} +1 -1
  269. package/dist/client/assets/{tooltip-C91IS2ON.js → tooltip-BjUMPvkB.js} +1 -1
  270. package/dist/client/assets/{track-CpCOxAsM.js → track-CNE2_M0H.js} +1 -1
  271. package/dist/client/assets/{types-BCbJ4Eml.js → types-Bxr6Ak0g.js} +3 -3
  272. package/dist/client/assets/{usage-stats-P7Ebxq4V.js → usage-stats-Bug-9_EL.js} +1 -1
  273. package/dist/client/assets/{use-ai-providers-CJ2ga4nx.js → use-ai-providers-ShRDl02e.js} +1 -1
  274. package/dist/client/assets/{use-automations-V0dkF89H.js → use-automations-qnBbEhgN.js} +1 -1
  275. package/dist/client/assets/{use-autosave-ClFMVO3A.js → use-autosave-exq2JPmQ.js} +1 -1
  276. package/dist/client/assets/{use-connect-companion-CXK99yF4.js → use-connect-companion-DQoSkSuB.js} +1 -1
  277. package/dist/client/assets/{use-connection-PgTQPnAp.js → use-connection-WQuJ5yl_.js} +1 -1
  278. package/dist/client/assets/{use-copy-CGJ-16i-.js → use-copy-CPOYPvBF.js} +1 -1
  279. package/dist/client/assets/{use-create-virtual-mcp-D4lB4pbk.js → use-create-virtual-mcp-Da7cL0aL.js} +1 -1
  280. package/dist/client/assets/{use-date-fns-locale-VjB0j61V.js → use-date-fns-locale-BcOQz_O6.js} +1 -1
  281. package/dist/client/assets/{use-debounced-autosave-Du2G3qf3.js → use-debounced-autosave-BnbZSVdn.js} +1 -1
  282. package/dist/client/assets/{use-debounced-value-CG2jgHBI.js → use-debounced-value-DHN-wkc6.js} +1 -1
  283. package/dist/client/assets/{use-deco-credits-DU8sJrax.js → use-deco-credits-Fltfd2iB.js} +1 -1
  284. package/dist/client/assets/{use-decopilot-events-x0K7Zb7m.js → use-decopilot-events-DF_mJ7FX.js} +1 -1
  285. package/dist/client/assets/{use-delete-connection-Pe3fW9Dc.js → use-delete-connection-Di7K1zHS.js} +1 -1
  286. package/dist/client/assets/{use-deployment-admin-CWwZo7oV.js → use-deployment-admin-Ney-Hrk_.js} +1 -1
  287. package/dist/client/assets/{use-entitlements-pN-YIa6T.js → use-entitlements-D6f3xZaU.js} +1 -1
  288. package/dist/client/assets/{use-fast-preview-draft-url-CCQm80wV.js → use-fast-preview-draft-url-B6rIt3gA.js} +1 -1
  289. package/dist/client/assets/{use-file-configs-CzJCjBKX.js → use-file-configs-Cd7oj9Fw.js} +1 -1
  290. package/dist/client/assets/{use-in-settings-DplznXN9.js → use-in-settings-8fsBM1xN.js} +1 -1
  291. package/dist/client/assets/{use-infinite-scroll-Bm905rys.js → use-infinite-scroll-BCiTqxTQ.js} +1 -1
  292. package/dist/client/assets/{use-join-requests-D4wrlTl5.js → use-join-requests-BFN9i-Es.js} +1 -1
  293. package/dist/client/assets/use-main-panel-tabs-Wh3mzXf2.js +1 -0
  294. package/dist/client/assets/{use-mcp-auth-status-BnAPI8Zf.js → use-mcp-auth-status-B1aTfNe_.js} +1 -1
  295. package/dist/client/assets/{use-mcp-client-D2DgMGL-.js → use-mcp-client-CqKNXJW7.js} +1 -1
  296. package/dist/client/assets/{use-mcp-prompts-UNzUvECH.js → use-mcp-prompts-DpED8Vrg.js} +1 -1
  297. package/dist/client/assets/{use-mcp-tools-CtMvHJK9.js → use-mcp-tools-BgkfMsvS.js} +1 -1
  298. package/dist/client/assets/{use-members-C_tB-qI-.js → use-members-CeW4sAKm.js} +1 -1
  299. package/dist/client/assets/{use-mobile-DYpKQ1eP.js → use-mobile-CUQu4L8c.js} +1 -1
  300. package/dist/client/assets/{use-navigate-to-agent-TwlhlbmB.js → use-navigate-to-agent-W6hb3mqs.js} +1 -1
  301. package/dist/client/assets/{use-open-billing-url-BrlDdS6U.js → use-open-billing-url-KLMgEPxW.js} +1 -1
  302. package/dist/client/assets/{use-org-auth-client-BkVvw_9f.js → use-org-auth-client-zTkj17z7.js} +1 -1
  303. package/dist/client/assets/{use-org-fs-Bbl2QQqg.js → use-org-fs-B1IHOZ9S.js} +1 -1
  304. package/dist/client/assets/{use-org-repo-syncs-Ds4sFbSY.js → use-org-repo-syncs-CksqUgv6.js} +1 -1
  305. package/dist/client/assets/{use-org-sso-BnqcEd47.js → use-org-sso-CI1_4UQM.js} +1 -1
  306. package/dist/client/assets/{use-organization-roles-3K_wbMHo.js → use-organization-roles-DeV7SnLa.js} +1 -1
  307. package/dist/client/assets/{use-organization-settings-Wh36EN0I.js → use-organization-settings-4gJ9Tp49.js} +1 -1
  308. package/dist/client/assets/{use-panel-navigate-xYH0iX8e.js → use-panel-navigate-Bg-MVKv6.js} +1 -1
  309. package/dist/client/assets/{use-project-native-view-presence-U59DT0hQ.js → use-project-native-view-presence-C3jxCCXQ.js} +1 -1
  310. package/dist/client/assets/{use-project-scope-CENQvfVc.js → use-project-scope-CRdwBUT7.js} +1 -1
  311. package/dist/client/assets/{use-releases-_xbQ8yPk.js → use-releases-nsAtxjuW.js} +1 -1
  312. package/dist/client/assets/{use-reports-diagnostic-Cz_g9Pum.js → use-reports-diagnostic-CtuJZ5jH.js} +1 -1
  313. package/dist/client/assets/{use-route-default-main-evb2BAGs.js → use-route-default-main-DA5X9xDG.js} +1 -1
  314. package/dist/client/assets/{use-secrets-44zj-3N9.js → use-secrets-BfDHS5Uq.js} +1 -1
  315. package/dist/client/assets/use-section-preview-base-DW4RpMx9.js +1 -0
  316. package/dist/client/assets/{use-session-runtime-COugfsOm.js → use-session-runtime-DiG_Qt8i.js} +1 -1
  317. package/dist/client/assets/{use-tags-BqebMAjW.js → use-tags-BloUFB1L.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-CElip-Jh.js → use-task-board-analytics-C7hgblhm.js} +1 -1
  319. package/dist/client/assets/{use-task-metadata-Dhub_XGT.js → use-task-metadata-ehugU85S.js} +1 -1
  320. package/dist/client/assets/{use-thread-outputs-DldRsY9l.js → use-thread-outputs-C9_GjCjS.js} +1 -1
  321. package/dist/client/assets/{use-virtual-mcp-B-mdsJbn.js → use-virtual-mcp-Vg_Ogz61.js} +1 -1
  322. package/dist/client/assets/useInfiniteQuery-DebjMHv1.js +1 -0
  323. package/dist/client/assets/{useQueries-CrUxqve0.js → useQueries-CDvJYO-m.js} +1 -1
  324. package/dist/client/assets/useSuspenseInfiniteQuery-CqRV1dKR.js +1 -0
  325. package/dist/client/assets/{users-XpLTDG6s.js → users-BC2i5HSG.js} +1 -1
  326. package/dist/client/assets/{utils-BcFrUaDf.js → utils-Bf0RpmgB.js} +1 -1
  327. package/dist/client/assets/variant-calendar-BWeWEpfR.js +1 -0
  328. package/dist/client/assets/{variant-matcher-override-DWffsqol.js → variant-matcher-override-fLxntWss.js} +1 -1
  329. package/dist/client/assets/{view-mode-toggle-Bsk0Q0dk.js → view-mode-toggle-DQkw8yuh.js} +1 -1
  330. package/dist/client/assets/{virtual-mcp-Bj7Y16hO.js → virtual-mcp-S8IoUqby.js} +1 -1
  331. package/dist/client/index.html +2 -2
  332. package/dist/server/cli.js +1 -1
  333. package/dist/server/server.js +1 -1
  334. package/package.json +1 -1
  335. package/dist/client/assets/agent-app-D8aCkILQ.js +0 -1
  336. package/dist/client/assets/agent-deck-JfSkYOo0.js +0 -1
  337. package/dist/client/assets/agent-file-BQkNRXR6.js +0 -1
  338. package/dist/client/assets/agent-library-file-B_9ZfsqS.js +0 -1
  339. package/dist/client/assets/agent-settings-Dlb-w-aW.js +0 -1
  340. package/dist/client/assets/agent-site-editor-code-Cg74frt9.js +0 -2
  341. package/dist/client/assets/agent-site-editor-content-BMF_TO-O.js +0 -2
  342. package/dist/client/assets/agent-site-editor-preview-DfUEy_mW.js +0 -518
  343. package/dist/client/assets/agent-view-9ku1NYkG.js +0 -1
  344. package/dist/client/assets/api-keys-CB0BbOJK.js +0 -1
  345. package/dist/client/assets/app-editor-6ntO4YLY.js +0 -1
  346. package/dist/client/assets/automations-CflFKE1S.js +0 -1
  347. package/dist/client/assets/blocks-preview-workspace-context-CGrONP0s.js +0 -1
  348. package/dist/client/assets/category-editor-CMewSARd.js +0 -1
  349. package/dist/client/assets/combobox-B1IXE26_.js +0 -1
  350. package/dist/client/assets/command-CDaLB2Ox.js +0 -1
  351. package/dist/client/assets/index-xA_kfo6T.css +0 -1
  352. package/dist/client/assets/input-BK5Sp8hZ.js +0 -1
  353. package/dist/client/assets/org-file-open-context-DodrnIMR.js +0 -1
  354. package/dist/client/assets/page-seo-form-Dbz3eu1p.js +0 -1
  355. package/dist/client/assets/post-calendar-FfQIYQQi.js +0 -1
  356. package/dist/client/assets/post-editor-YU4-WfQ7.js +0 -1
  357. package/dist/client/assets/project-reports-DVMPWWFi.js +0 -1
  358. package/dist/client/assets/project-tasks-Jy5UvQy6.js +0 -1
  359. package/dist/client/assets/record-editor-CXOCBCZ1.js +0 -1
  360. package/dist/client/assets/redirect-editor-MDe3fibH.js +0 -1
  361. package/dist/client/assets/reports-DwYY1RWm.js +0 -1
  362. package/dist/client/assets/runnable-block-editor-CdEmnBad.js +0 -16
  363. package/dist/client/assets/sections-editor-C6cdGUNk.js +0 -2
  364. package/dist/client/assets/select-oEHCSTZi.js +0 -1
  365. package/dist/client/assets/seo-editor-BD39YQzP.js +0 -1
  366. package/dist/client/assets/shell-layout-BNVBlKMe.js +0 -1
  367. package/dist/client/assets/tasks-aGbeVyrS.js +0 -1
  368. package/dist/client/assets/textarea-B9cyNs7j.js +0 -1
  369. package/dist/client/assets/use-main-panel-tabs-BcprnHpG.js +0 -1
  370. package/dist/client/assets/use-section-preview-base-BbxztEDH.js +0 -1
  371. package/dist/client/assets/useInfiniteQuery-DCZL7BN4.js +0 -1
  372. package/dist/client/assets/useSuspenseInfiniteQuery-C0KSbZH8.js +0 -1
  373. package/dist/client/assets/variant-calendar-BPWkuyHy.js +0 -1
@@ -1 +1 @@
1
- import{c as n,l as f,j as i,bh as N,bg as y,ar as S,bi as v,bj as $,bm as C,bl as w}from"./index-doEaURqC.js";import{i as k}from"./X-vKTIsgL1.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,bj as N,bi as y,ar as S,bk as v,bl as $,bo as C,bn as w}from"./index-CyBVTyGa.js";import{i as k}from"./X-BNszojyh.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 M,b as W,e as Ye,j as n,B as F,t as Ve,bS as me,R as Nt,a as Be,y as Qt,D as _t,K as Ue,bT as Xt,bU as Zt,$ as Ke,l as dt,aI as en,p as pt,bV as tn,r as J,a1 as nn,x as At,a9 as ie,d as Pt,a0 as ht,z as Ct,m as He,q as ut,at as Et,bW as sn,aA as on,aG as yt,bX as an,bY as rn,bZ as ln,b_ as cn,b$ as dn,T as un,u as mn,a3 as fn,c0 as hn,c1 as gn,k as It,c2 as lt,c3 as pn,c4 as yn,O as bn,c5 as xn}from"./index-CyBVTyGa.js";import{A as at}from"./avatar-GIuLZx2C.js";import{t as Ot}from"./Globe04-_nV993le.js";import{i as wn}from"./SearchLg-C9MObDBB.js";import{af as Sn,ae as vn,o as ct,S as jn,ag as te,r as kn,ah as Tn,n as bt,g as Nn,f as _n,ai as An,e as Pn}from"./agent-icon-CSebdE0g.js";import{s as Cn}from"./XClose-D_JLFZFT.js";import{D as En}from"./download-app-dialog-NqW4PLAx.js";import{a as In,u as On}from"./use-project-scope-CRdwBUT7.js";import{u as Lt,a as Ln}from"./use-panel-navigate-Bg-MVKv6.js";import{i as ae}from"./CheckCircle-DtMp-qqq.js";import{i as ot}from"./Monitor01-r707obGd.js";import{i as re}from"./Zap-BCwjglMw.js";import{c as $t,d as Dt,b as Rt,D as Mt,h as $n,e as Dn}from"./dialog-BG6kEGFR.js";import{a as Rn}from"./Share07-B2WnpDWD.js";import{s as xt}from"./Plus-BbELO07z.js";import{a as Mn}from"./Tool01-BvNT4KDI.js";import{b as le,a as Ge,f as zn,e as Fn,c as qn,C as Kn}from"./command-ByUEKQB9.js";import{I as Bn}from"./integration-icon-mTqkOE6y.js";import{P as Hn}from"./project-icon-DWnsLAeJ.js";import{a as Un,m as Gn}from"./use-mcp-client-CqKNXJW7.js";import{S as Jn,u as Vn}from"./hooks-lZSCdRwc.js";import{u as Wn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Yn}from"./required-auth-layout-BgLvQHTP.js";import{A as Qn}from"./autosend-pQ9pD2-2.js";import{u as Xn,a as Zn,b as es,c as ts}from"./thread-route-JcpQ-ikA.js";import{u as ns}from"./use-org-sso-CI1_4UQM.js";function ss(t){const e=M.c(49),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let d;e[0]!==a||e[1]!==r?(d=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await k.json();if(!k.ok||!A.success)throw new Error(A.error??r("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=r,e[2]=d):d=e[2];let u;e[3]!==a?(u=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=u):u=e[4];let f;e[5]!==r?(f=k=>{Ve.error(k instanceof Error?k.message:r("common.autoDomainJoinScreen.joinError"))},e[5]=r,e[6]=f):f=e[6];let S;e[7]!==d||e[8]!==u||e[9]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[7]=d,e[8]=u,e[9]=f,e[10]=S):S=e[10];const c=Ye(S),y=os;let h;e[11]!==o||e[12]!==s?(h=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]=h):h=e[13];let w;e[14]!==s||e[15]!==r?(w=r("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=r,e[16]=w):w=e[16];let m;e[17]!==w?(m=n.jsx("h3",{className:"text-lg font-medium",children:w}),e[17]=w,e[18]=m):m=e[18];let l;e[19]!==i||e[20]!==r?(l=r("common.autoDomainJoinScreen.joinDescription",{domain:i}),e[19]=i,e[20]=r,e[21]=l):l=e[21];let b;e[22]!==l?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[22]=l,e[23]=b):b=e[23];let p;e[24]!==m||e[25]!==b?(p=n.jsxs("div",{className:"space-y-2",children:[m,b]}),e[24]=m,e[25]=b,e[26]=p):p=e[26];let x;e[27]!==c?(x=()=>c.mutate(),e[27]=c,e[28]=x):x=e[28];let v;e[29]!==c.isPending||e[30]!==s||e[31]!==r?(v=c.isPending?r("common.autoDomainJoinScreen.joining"):r("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=c.isPending,e[30]=s,e[31]=r,e[32]=v):v=e[32];let T;e[33]!==c.isPending||e[34]!==x||e[35]!==v?(T=n.jsx(F,{onClick:x,disabled:c.isPending,children:v}),e[33]=c.isPending,e[34]=x,e[35]=v,e[36]=T):T=e[36];const P=c.isPending;let N;e[37]!==r?(N=r("common.autoDomainJoinScreen.goHome"),e[37]=r,e[38]=N):N=e[38];let j;e[39]!==c.isPending||e[40]!==N?(j=n.jsx(F,{variant:"ghost",onClick:y,disabled:P,children:N}),e[39]=c.isPending,e[40]=N,e[41]=j):j=e[41];let g;e[42]!==T||e[43]!==j?(g=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[T,j]}),e[42]=T,e[43]=j,e[44]=g):g=e[44];let _;return e[45]!==p||e[46]!==g||e[47]!==h?(_=n.jsxs(me,{children:[h,p,g]}),e[45]=p,e[46]=g,e[47]=h,e[48]=_):_=e[48],_}function os(){window.location.href="/"}function wt(t){const e=M.c(25),{orgSlug:s,orgName:a,reason:o}=t,i=W(),r=is,d=o==="not-found",u=d?wn:Nt;let f;e[0]!==d||e[1]!==i?(f=i(d?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=d,e[1]=i,e[2]=f):f=e[2];const S=f;let c;e[3]!==d||e[4]!==a||e[5]!==s||e[6]!==i?(c=d?n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:s}),"."]}):n.jsxs(n.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??s}),".",n.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=d,e[4]=a,e[5]=s,e[6]=i,e[7]=c):c=e[7];const y=c;let h;e[8]!==u?(h=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(u,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=u,e[9]=h):h=e[9];let w;e[10]!==S?(w=n.jsx("h3",{className:"text-lg font-medium",children:S}),e[10]=S,e[11]=w):w=e[11];let m;e[12]!==y?(m=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=m):m=e[13];let l;e[14]!==w||e[15]!==m?(l=n.jsxs("div",{className:"space-y-2",children:[w,m]}),e[14]=w,e[15]=m,e[16]=l):l=e[16];let b;e[17]!==i?(b=i("common.noAccessScreen.goToHome"),e[17]=i,e[18]=b):b=e[18];let p;e[19]!==b?(p=n.jsx(F,{onClick:r,children:b}),e[19]=b,e[20]=p):p=e[20];let x;return e[21]!==h||e[22]!==l||e[23]!==p?(x=n.jsxs(me,{children:[h,l,p]}),e[21]=h,e[22]=l,e[23]=p,e[24]=x):x=e[24],x}function is(){window.location.href="/"}function as(t){const e=M.c(59),{invitationId:s,orgName:a,orgSlug:o,orgLogo:i}=t,r=W();let d;e[0]!==s?(d=async()=>{const E=await Be.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 u;e[2]!==o?(u=()=>{Qt(),window.location.href=`/${o}`},e[2]=o,e[3]=u):u=e[3];let f;e[4]!==r?(f=E=>{Ve.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToAccept"))},e[4]=r,e[5]=f):f=e[5];let S;e[6]!==d||e[7]!==u||e[8]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[6]=d,e[7]=u,e[8]=f,e[9]=S):S=e[9];const c=Ye(S);let y;e[10]!==s?(y=async()=>{const E=await Be.organization.rejectInvitation({invitationId:s});if(E.error)throw new Error(E.error.message);return E.data},e[10]=s,e[11]=y):y=e[11];let h,w;e[12]!==r?(h=()=>{Ve.success(r("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},w=E=>{Ve.error(E instanceof Error?E.message:r("common.pendingInviteScreen.failedToDecline"))},e[12]=r,e[13]=h,e[14]=w):(h=e[13],w=e[14]);let m;e[15]!==y||e[16]!==h||e[17]!==w?(m={mutationFn:y,onSuccess:h,onError:w},e[15]=y,e[16]=h,e[17]=w,e[18]=m):m=e[18];const l=Ye(m),b=c.isPending||l.isPending;let p;e[19]!==i||e[20]!==a?(p=i?n.jsx(at,{url:i,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(Sn,{className:"h-6 w-6 text-primary"})}),e[19]=i,e[20]=a,e[21]=p):p=e[21];let x;e[22]!==a||e[23]!==r?(x=r("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=r,e[24]=x):x=e[24];let v;e[25]!==x?(v=n.jsx("h3",{className:"text-lg font-medium",children:x}),e[25]=x,e[26]=v):v=e[26];let T;e[27]!==r?(T=r("common.pendingInviteScreen.acceptDescription"),e[27]=r,e[28]=T):T=e[28];let P;e[29]!==T?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:T}),e[29]=T,e[30]=P):P=e[30];let N;e[31]!==v||e[32]!==P?(N=n.jsxs("div",{className:"space-y-2",children:[v,P]}),e[31]=v,e[32]=P,e[33]=N):N=e[33];let j;e[34]!==c?(j=()=>c.mutate(),e[34]=c,e[35]=j):j=e[35];let g;e[36]!==c.isPending||e[37]!==r?(g=c.isPending?r("common.pendingInviteScreen.acceptingButton"):r("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=r,e[38]=g):g=e[38];let _;e[39]!==b||e[40]!==j||e[41]!==g?(_=n.jsx(F,{onClick:j,disabled:b,children:g}),e[39]=b,e[40]=j,e[41]=g,e[42]=_):_=e[42];let k;e[43]!==l?(k=()=>l.mutate(),e[43]=l,e[44]=k):k=e[44];let A;e[45]!==l.isPending||e[46]!==r?(A=l.isPending?r("common.pendingInviteScreen.decliningButton"):r("common.pendingInviteScreen.declineButton"),e[45]=l.isPending,e[46]=r,e[47]=A):A=e[47];let I;e[48]!==b||e[49]!==k||e[50]!==A?(I=n.jsx(F,{variant:"ghost",onClick:k,disabled:b,children:A}),e[48]=b,e[49]=k,e[50]=A,e[51]=I):I=e[51];let C;e[52]!==_||e[53]!==I?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,I]}),e[52]=_,e[53]=I,e[54]=C):C=e[54];let O;return e[55]!==N||e[56]!==C||e[57]!==p?(O=n.jsxs(me,{children:[p,N,C]}),e[55]=N,e[56]=C,e[57]=p,e[58]=O):O=e[58],O}function rs(t){const e=M.c(23),{orgName:s,orgLogo:a}=t,o=W();let i;e[0]!==a||e[1]!==s?(i=a?n.jsx(at,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(vn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==o?(r=o("common.requestPendingScreen.title"),e[3]=o,e[4]=r):r=e[4];let d;e[5]!==r?(d=n.jsx("h3",{className:"text-lg font-medium",children:r}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==s||e[8]!==o?(u=o("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=o,e[9]=u):u=e[9];let f;e[10]!==u?(f=n.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[10]=u,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 y;e[17]!==c?(y=n.jsx(F,{variant:"ghost",onClick:ls,children:c}),e[17]=c,e[18]=y):y=e[18];let h;return e[19]!==i||e[20]!==S||e[21]!==y?(h=n.jsxs(me,{children:[i,S,y]}),e[19]=i,e[20]=S,e[21]=y,e[22]=h):h=e[22],h}function ls(){window.location.href="/"}function cs(t){const e=M.c(45),{orgName:s,orgSlug:a,orgLogo:o,domain:i}=t,r=W();let d;e[0]!==a?(d=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await _.json();if(!_.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=us,e[2]=u):u=e[2];let f;e[3]!==r?(f=_=>{Ve.error(_ instanceof Error?_.message:r("common.requestToJoinScreen.failedToRequest"))},e[3]=r,e[4]=f):f=e[4];let S;e[5]!==d||e[6]!==f?(S={mutationFn:d,onSuccess:u,onError:f},e[5]=d,e[6]=f,e[7]=S):S=e[7];const c=Ye(S);let y;e[8]!==o||e[9]!==s?(y=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]=y):y=e[10];let h;e[11]!==s||e[12]!==r?(h=r("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=r,e[13]=h):h=e[13];let w;e[14]!==h?(w=n.jsx("h3",{className:"text-lg font-medium",children:h}),e[14]=h,e[15]=w):w=e[15];let m;e[16]!==i||e[17]!==r?(m=r("common.requestToJoinScreen.description",{domain:i}),e[16]=i,e[17]=r,e[18]=m):m=e[18];let l;e[19]!==m?(l=n.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=l):l=e[20];let b;e[21]!==w||e[22]!==l?(b=n.jsxs("div",{className:"space-y-2",children:[w,l]}),e[21]=w,e[22]=l,e[23]=b):b=e[23];let p;e[24]!==c?(p=()=>c.mutate(),e[24]=c,e[25]=p):p=e[25];let x;e[26]!==c.isPending||e[27]!==r?(x=c.isPending?r("common.requestToJoinScreen.requesting"):r("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=r,e[28]=x):x=e[28];let v;e[29]!==c.isPending||e[30]!==p||e[31]!==x?(v=n.jsx(F,{onClick:p,disabled:c.isPending,children:x}),e[29]=c.isPending,e[30]=p,e[31]=x,e[32]=v):v=e[32];const T=c.isPending;let P;e[33]!==r?(P=r("common.requestToJoinScreen.goToHome"),e[33]=r,e[34]=P):P=e[34];let N;e[35]!==c.isPending||e[36]!==P?(N=n.jsx(F,{variant:"ghost",onClick:ds,disabled:T,children:P}),e[35]=c.isPending,e[36]=P,e[37]=N):N=e[37];let j;e[38]!==v||e[39]!==N?(j=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,N]}),e[38]=v,e[39]=N,e[40]=j):j=e[40];let g;return e[41]!==b||e[42]!==j||e[43]!==y?(g=n.jsxs(me,{children:[y,b,j]}),e[41]=b,e[42]=j,e[43]=y,e[44]=g):g=e[44],g}function ds(){window.location.href="/"}function us(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function ms(t){const e=M.c(7);let s;e[0]!==t?(s=Ue.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!i.ok)throw new Error(`org-access-status failed (${i.status})`);return await i.json()},e[2]=t,e[3]=a):a=e[3];let o;return e[4]!==s||e[5]!==a?(o={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=o):o=e[6],_t(o)}function fs({orgSlug:t}){const{data:e}=ms(t);if(e.status!=="member"){Xt()?.org===t&&Zt();const s=localStorage.getItem(Ke.lastOrgSlug())===t;if(s&&localStorage.removeItem(Ke.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(as,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(ss,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(cs,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(rs,{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 zt(t){const e=M.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:o,title:i,description:r,icon:d,children:u,footerLeading:f,actions:S,onDismiss:c,tone:y}=t,h=y===void 0?"neutral":y,w=f||S;let m;e[0]!==h?(m=h==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=h,e[1]=m):m=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Cn,{size:14}),e[2]=l):l=e[2];let b;e[3]!==a||e[4]!==c?(b=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:l}),e[3]=a,e[4]=c,e[5]=b):b=e[5];const p=d&&"flex items-start gap-3",x=u&&"pb-3";let v;e[6]!==p||e[7]!==x?(v=dt("p-4 pr-11",p,x),e[6]=p,e[7]=x,e[8]=v):v=e[8];let T;e[9]!==d?(T=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]=T):T=e[10];let P;e[11]!==o?(P=o&&n.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[11]=o,e[12]=P):P=e[12];let N;e[13]!==i?(N=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:i}),e[13]=i,e[14]=N):N=e[14];let j;e[15]!==r?(j=r&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:r}),e[15]=r,e[16]=j):j=e[16];let g;e[17]!==N||e[18]!==j||e[19]!==P?(g=n.jsxs("div",{children:[P,N,j]}),e[17]=N,e[18]=j,e[19]=P,e[20]=g):g=e[20];let _;e[21]!==u?(_=u&&n.jsx("div",{className:"mt-3",children:u}),e[21]=u,e[22]=_):_=e[22];let k;e[23]!==g||e[24]!==_?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[g,_]}),e[23]=g,e[24]=_,e[25]=k):k=e[25];let A;e[26]!==k||e[27]!==v||e[28]!==T?(A=n.jsxs("div",{className:v,children:[T,k]}),e[26]=k,e[27]=v,e[28]=T,e[29]=A):A=e[29];let I;e[30]!==S||e[31]!==f||e[32]!==w||e[33]!==h?(I=w&&n.jsxs("div",{className:dt("flex items-center justify-between gap-3 px-4 py-2.5",h==="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]=w,e[33]=h,e[34]=I):I=e[34];let C;return e[35]!==s||e[36]!==A||e[37]!==I||e[38]!==m||e[39]!==b||e[40]!==h?(C=n.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":h,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:[m,b,A,I]}),e[35]=s,e[36]=A,e[37]=I,e[38]=m,e[39]=b,e[40]=h,e[41]=C):C=e[41],C}const hs={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 Ft(t){return`[data-tour="${hs[t]}"]`}const gs=[{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 ps(t){return gs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ys(t,e){return ps(e).map(s=>({element:Ft(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const bs=Ft("switcher"),xs=30;function qt(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function ws(t,e){return ys(t,e).filter(s=>typeof s.element=="string"&&qt(s.element))}function Ss(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:a})=>{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",()=>a.destroy()),s.footerButtons.insertBefore(o,s.footerButtons.firstChild)},onDestroyed:()=>{Je=!1},steps:e}}let Je=!1;async function vs(){return(await en(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function js(t,e){if(Je)return;Je=!0;let s=0;const a=()=>{if(!qt(bs)&&s++<xs){requestAnimationFrame(a);return}const o=ws(t,e);if(o.length===0){Je=!1;return}vs().then(i=>{i(Ss(t,o)).drive()}).catch(()=>{Je=!1})};a()}function ks(t){return t!=="off"}function ci(t){if(!t.hasSource)return[];const e=["site-editor"];return ks(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function Kt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function di(t){return t.reportsOnly&&!t.onReportAgent&&Kt(t.tabId)}const Ts=[{id:"new-layout",date:"2026-09-22",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 navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:jn,title:"Site editor redesigned",body:"Every block wears the same icon and the same actions, the variant you are editing is named in the header beside the block it belongs to, and picking a section is now a search rather than a scroll."}],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:te,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:te,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:tn,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:te,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:te,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:te,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:te,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:te,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:te,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:te,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:te,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:kn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Bt=Ts,it="studio.release-feed.v1",mt=new Set;let de="",ue={},ft=!1;function Ns(){if(ft)return de||"{}";try{return localStorage.getItem(it)??"{}"}catch{return de||"{}"}}function Ht(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function St(){const t=Ns();return t!==de&&(de=t,ue=Ht(t)),ue}function _s(t){mt.add(t);const e=s=>{if(!(s.key!==it&&s.key!==null)){try{const a=localStorage.getItem(it)??"{}",i={...Ht(a),...ue};ue=i,de=JSON.stringify(i)}catch{}t()}};return window.addEventListener("storage",e),()=>{mt.delete(t),window.removeEventListener("storage",e)}}function As(t){ue=t,de=JSON.stringify(t);try{localStorage.setItem(it,de),ft=!1}catch{ft=!0}mt.forEach(e=>e())}function Ps(){const t=M.c(7),e=J.useSyncExternalStore(_s,St,St);let s;t[0]!==e?(s=u=>!!e[u],t[0]=e,t[1]=s):s=t[1];const a=s,o=Cs;let i;t[2]!==e?(i=Bt.reduce((u,f)=>e[f.id]?u:u+1,0),t[2]=e,t[3]=i):i=t[3];const r=i;let d;return t[4]!==a||t[5]!==r?(d={isSeen:a,markSeen:o,unseenCount:r},t[4]=a,t[5]=r,t[6]=d):d=t[6],d}function Cs(t){ue[t]||As({...ue,[t]:{seenAt:new Date().toISOString()}})}const vt=new Map;function Ut(t){let e=vt.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},vt.set(t,e)),e}function Es(t,e){const s=Ut(t);return s.subscribers.add(e),s.intervalId===null&&(s.intervalId=setInterval(()=>{s.now=Date.now();for(const a of s.subscribers)a()},t)),()=>{s.subscribers.delete(e),s.subscribers.size===0&&s.intervalId!==null&&(clearInterval(s.intervalId),s.intervalId=null)}}function Is(t){const e=M.c(4),s=t===void 0?6e4:t;let a;e[0]!==s?(a=()=>Ut(s).now,e[0]=s,e[1]=a):a=e[1];const o=a;let i;return e[2]!==s?(i=r=>Es(s,r),e[2]=s,e[3]=i):i=e[3],J.useSyncExternalStore(i,o,o)}const Os=720*60*60*1e3,Ls=10080*60*1e3;function $s(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function Ds(t){const e=Bt[0];if(!e)return null;const s=$s(e.date),a=t-s;return a<0||a>Os?null:e}function Rs(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 Ms(t,e){const s=Rs(t);return s===null?!1:e-s>=Ls}function zs(){const t=M.c(58),e=W(),s=In(),a=nn(),o=Lt(),i=!!s,r=a===ie.home&&!s;let d;t[0]!==o||t[1]!==i?(d=i&&!!o&&Kt(o),t[0]=o,t[1]=i,t[2]=d):d=t[2];const u=d,{data:f}=Be.useSession(),{isSeen:S,markSeen:c}=Ps(),[,y]=At(),[h,w]=J.useState(!1),m=Is(6e4);let l,b,p;if(t[3]!==S||t[4]!==m||t[5]!==f?.user?.createdAt){p=Symbol.for("react.early_return_sentinel");e:{if(l=Ds(m),!l){p=null;break e}if(!Ms(f?.user?.createdAt,m)){p=null;break e}b=S(l.id)}t[3]=S,t[4]=m,t[5]=f?.user?.createdAt,t[6]=l,t[7]=b,t[8]=p}else l=t[6],b=t[7],p=t[8];if(p!==Symbol.for("react.early_return_sentinel"))return p;if(b)return null;let x;t[9]!==l.id||t[10]!==i||t[11]!==c||t[12]!==r||t[13]!==u||t[14]!==e?(x=()=>{c(l.id),js(e,{onOrgHome:r,inProject:i,onSiteEditor:u})},t[9]=l.id,t[10]=i,t[11]=c,t[12]=r,t[13]=u,t[14]=e,t[15]=x):x=t[15];const v=x;let T;t[16]!==l.id||t[17]!==c||t[18]!==y?(T=()=>{y(qs),c(l.id)},t[16]=l.id,t[17]=c,t[18]=y,t[19]=T):T=t[19];const P=T;let N;t[20]!==e?(N=e("announcements.release.ariaLabel"),t[20]=e,t[21]=N):N=t[21];let j;t[22]!==e?(j=e("announcements.release.dismiss"),t[22]=e,t[23]=j):j=t[23];const g=l.eyebrow,_=l.title;let k;t[24]!==l.id||t[25]!==c?(k=()=>c(l.id),t[24]=l.id,t[25]=c,t[26]=k):k=t[26];let A;t[27]!==l.id||t[28]!==l.learnMoreHref||t[29]!==c||t[30]!==e?(A=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[27]=l.id,t[28]=l.learnMoreHref,t[29]=c,t[30]=e,t[31]=A):A=t[31];let I;t[32]!==l.cta||t[33]!==l.id||t[34]!==P||t[35]!==c||t[36]!==v?(I=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:v,children:l.cta.label}):l.cta.action==="enable-new-layout"?n.jsx(F,{size:"sm",onClick:P,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>w(!0),children:l.cta.label}):null,t[32]=l.cta,t[33]=l.id,t[34]=P,t[35]=c,t[36]=v,t[37]=I):I=t[37];let C;t[38]!==l.bullets?(C=l.bullets.map(Fs),t[38]=l.bullets,t[39]=C):C=t[39];let O;t[40]!==C?(O=n.jsx("ul",{className:"flex flex-col gap-3",children:C}),t[40]=C,t[41]=O):O=t[41];let E;t[42]!==l.id||t[43]!==c?(E=B=>{w(B),B||c(l.id)},t[42]=l.id,t[43]=c,t[44]=E):E=t[44];let D;t[45]!==h||t[46]!==E?(D=n.jsx(En,{open:h,onOpenChange:E}),t[45]=h,t[46]=E,t[47]=D):D=t[47];let z;return t[48]!==l.eyebrow||t[49]!==l.title||t[50]!==A||t[51]!==I||t[52]!==O||t[53]!==D||t[54]!==N||t[55]!==j||t[56]!==k?(z=n.jsxs(zt,{ariaLabel:N,dismissLabel:j,eyebrow:g,title:_,onDismiss:k,footerLeading:A,actions:I,children:[O,D]}),t[48]=l.eyebrow,t[49]=l.title,t[50]=A,t[51]=I,t[52]=O,t[53]=D,t[54]=N,t[55]=j,t[56]=k,t[57]=z):z=t[57],z}function Fs(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 qs(t){return{...t,compactPageLayout:!0}}const Gt=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),ce=Gt?"⌘":"Ctrl",V={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"}},Ks=[{label:"General",shortcuts:[V.commandPalette,V.keyboardShortcuts,V.back,V.newTask,V.toggleDaemon]},{label:"Editor",shortcuts:[V.saveAndFormat]},{label:"Chat",shortcuts:[V.focusChatInput,V.togglePlanMode,V.sendMessage,V.newLine]},{label:"Questions",shortcuts:[V.selectOption]},{label:"Monitoring",shortcuts:[V.applyFilter]}];function jt(t){return Gt?t.metaKey:t.ctrlKey}function Bs(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Hs(t){const e=M.c(11),{open:s,onOpenChange:a}=t,o=W();let i;e[0]!==o?(i=o("common.keyboardShortcutsDialog.title"),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==i?(r=n.jsx($t,{children:n.jsx(Dt,{children:i})}),e[2]=i,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex flex-col gap-4",children:Ks.map(Us)}),e[4]=d):d=e[4];let u;e[5]!==r?(u=n.jsxs(Rt,{className:"sm:max-w-md",children:[r,d]}),e[5]=r,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==s||e[9]!==u?(f=n.jsx(Mt,{open:s,onOpenChange:a,children:u}),e[7]=a,e[8]=s,e[9]=u,e[10]=f):f=e[10],f}function Us(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(Gs)})]},t.label)}function Gs(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(Js)})]},t.description)}function Js(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 kt=8;function Vs(t){const{org:e}=ht(),s=Un({connectionId:Ct,orgId:e.id,orgSlug:e.slug}),{data:a}=He({queryKey:Ue.globalSearch(e.id,t,kt),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:kt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Ws(t){const e=M.c(195),{open:s,onOpenChange:a}=t,o=W(),i=Pt(),{org:r}=ht(),{projects:d,hasProjects:u}=On(),[f,S]=J.useState(""),c=J.useDeferredValue(f),y=Vs(c);let h;e[0]!==a?(h=()=>{a(!1),S("")},e[0]=a,e[1]=h):h=e[1];const w=h;let m;e[2]!==w?(m=(q,Y)=>{ut("command_palette_used",{kind:Y}),q(),w()},e[2]=w,e[3]=m):m=e[3];const l=m;let b;e[4]!==i||e[5]!==r.id||e[6]!==r.slug?(b=q=>{if(q.type==="connection"){if(!q.slug){i({to:"/$org/settings/connections",params:{org:r.slug},search:{tab:"all"}});return}i({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:q.slug}});return}if(q.type==="task"){i({to:ie.tasks,params:{org:r.slug,taskKey:q.key??void 0}});return}const Y=Et(r.id).id;sn(i,on({org:r.slug,agentId:q.virtual_mcp_id??Y,superAgentId:Y}),{search:()=>({thread:q.id}),replace:!1})},e[4]=i,e[5]=r.id,e[6]=r.slug,e[7]=b):b=e[7];const p=b;let x;e[8]!==f?(x=[f],e[8]=f,e[9]=x):x=e[9];const v=x;let T,P,N,j,g,_,k,A,I,C,O,E,D;if(e[10]!==w||e[11]!==l||e[12]!==u||e[13]!==y||e[14]!==i||e[15]!==a||e[16]!==s||e[17]!==p||e[18]!==r.slug||e[19]!==d||e[20]!==v||e[21]!==o||e[22]!==f){const q=y.filter(Qs),Y=y.filter(Ys);let ne;e[36]!==r.slug?(ne={org:r.slug},e[36]=r.slug,e[37]=ne):ne=e[37];const R=ne;let ee;e[38]!==o?(ee=o("sidebar.navDestinations.home"),e[38]=o,e[39]=ee):ee=e[39];let Q;e[40]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(Nn,{"aria-hidden":"true"}),e[40]=Q):Q=e[40];let H;e[41]!==R||e[42]!==ee?(H={key:"home",label:ee,icon:Q,to:ie.home,params:R},e[41]=R,e[42]=ee,e[43]=H):H=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(_n,{"aria-hidden":"true"}),e[46]=se):se=e[46];let U;e[47]!==R||e[48]!==X?(U={key:"reports",label:X,icon:se,to:ie.reports,params:R},e[47]=R,e[48]=X,e[49]=U):U=e[49];let G;e[50]!==o?(G=o("sidebar.navDestinations.tasks"),e[50]=o,e[51]=G):G=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]!==r.slug?(Z={org:r.slug,taskKey:void 0},e[53]=r.slug,e[54]=Z):Z=e[54];let L;e[55]!==G||e[56]!==Z?(L={key:"tasks",label:G,icon:oe,to:ie.tasks,params:Z},e[55]=G,e[56]=Z,e[57]=L):L=e[57];let K;e[58]!==o?(K=o("sidebar.navDestinations.library"),e[58]=o,e[59]=K):K=e[59];let Qe;e[60]===Symbol.for("react.memo_cache_sentinel")?(Qe=n.jsx(Rn,{"aria-hidden":"true"}),e[60]=Qe):Qe=e[60];let fe;e[61]!==R||e[62]!==K?(fe={key:"library",label:K,icon:Qe,to:ie.library,params:R},e[61]=R,e[62]=K,e[63]=fe):fe=e[63];let he;e[64]!==o?(he=o("sidebar.navDestinations.discover"),e[64]=o,e[65]=he):he=e[65];let Xe;e[66]===Symbol.for("react.memo_cache_sentinel")?(Xe=n.jsx(An,{"aria-hidden":"true"}),e[66]=Xe):Xe=e[66];let ge;e[67]!==R||e[68]!==he?(ge={key:"discover",label:he,icon:Xe,to:ie.discover,params:R},e[67]=R,e[68]=he,e[69]=ge):ge=e[69];let Ze;e[70]!==H||e[71]!==U||e[72]!==L||e[73]!==fe||e[74]!==ge?(Ze=[H,U,L,fe,ge],e[70]=H,e[71]=U,e[72]=L,e[73]=fe,e[74]=ge,e[75]=Ze):Ze=e[75];const rt=Ze;P=zn,j=s,e[76]!==w||e[77]!==a?(g=$=>$?a(!0):w(),e[76]=w,e[77]=a,e[78]=g):g=e[78],e[79]!==o?(_=o("commandPalette.title"),e[79]=o,e[80]=_):_=e[80],e[81]!==o?(k=o("commandPalette.description"),e[81]=o,e[82]=k):k=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?(A=n.jsx(Fn,{placeholder:pe,"aria-label":ye,value:f,onValueChange:S}),e[87]=pe,e[88]=ye,e[89]=f,e[90]=A):A=e[90],T=qn;let be;e[91]!==o?(be=o("commandPalette.empty"),e[91]=o,e[92]=be):be=e[92],e[93]!==be?(I=n.jsx(Kn,{children:be}),e[93]=be,e[94]=I):I=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]!==l||e[99]!==i?(we=rt.map($=>n.jsxs(le,{onSelect:()=>l(()=>i({to:$.to,params:$.params}),"destination"),children:[$.icon,n.jsx("span",{children:$.label})]},$.key)),e[97]=rt,e[98]=l,e[99]=i,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]!==l||e[105]!==u||e[106]!==i||e[107]!==r.slug||e[108]!==d||e[109]!==o?(O=u&&n.jsx(Ge,{heading:o("commandPalette.projects"),children:d.map($=>n.jsxs(le,{value:`project ${$.title}`,onSelect:()=>l(()=>i({to:ie.projects,params:{org:r.slug,agentId:$.id}}),"project"),children:[n.jsx(Hn,{icon:$.icon,name:$.title,"aria-hidden":"true"}),n.jsx("span",{children:$.title})]},$.id))}),e[104]=l,e[105]=u,e[106]=i,e[107]=r.slug,e[108]=d,e[109]=o,e[110]=O):O=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]!==l||e[116]!==i||e[117]!==R?(je=()=>l(()=>i({to:ie.home,params:R}),"new_project"),e[115]=l,e[116]=i,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]!==l||e[131]!==i||e[132]!==R?(Ae=()=>l(()=>i({to:"/$org/settings/members",params:R}),"invite"),e[130]=l,e[131]=i,e[132]=R,e[133]=Ae):Ae=e[133];let tt;e[134]===Symbol.for("react.memo_cache_sentinel")?(tt=n.jsx(Pn,{"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 Ie;e[143]!==o?(Ie=o("commandPalette.addConnection"),e[143]=o,e[144]=Ie):Ie=e[144];let Oe;e[145]!==l||e[146]!==i||e[147]!==R?(Oe=()=>l(()=>i({to:"/$org/settings/connections",params:R,search:{tab:"all"}}),"add_connection"),e[145]=l,e[146]=i,e[147]=R,e[148]=Oe):Oe=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]!==Ie||e[155]!==Oe||e[156]!==$e?(De=n.jsxs(le,{value:Ie,onSelect:Oe,children:[nt,$e]}),e[154]=Ie,e[155]=Oe,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]!==l||e[161]!==i||e[162]!==R?(Me=()=>l(()=>i({to:"/$org/settings/general",params:R}),"settings"),e[160]=l,e[161]=i,e[162]=R,e[163]=Me):Me=e[163];let st;e[164]===Symbol.for("react.memo_cache_sentinel")?(st=n.jsx(Mn,{"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:()=>l(()=>p($),"connection"),children:[n.jsx(Bn,{icon:$.icon,name:$.title,size:"2xs","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:$.title})]},`connection:${$.id}`))}),N=Y.length>0&&n.jsx(Ge,{heading:o("commandPalette.results"),children:Y.map($=>n.jsxs(le,{value:`${$.title} ${$.id}`,keywords:v,onSelect:()=>l(()=>p($),$.type),children:[$.type==="thread"?n.jsx(Tn,{"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]=w,e[11]=l,e[12]=u,e[13]=y,e[14]=i,e[15]=a,e[16]=s,e[17]=p,e[18]=r.slug,e[19]=d,e[20]=v,e[21]=o,e[22]=f,e[23]=T,e[24]=P,e[25]=N,e[26]=j,e[27]=g,e[28]=_,e[29]=k,e[30]=A,e[31]=I,e[32]=C,e[33]=O,e[34]=E,e[35]=D}else T=e[23],P=e[24],N=e[25],j=e[26],g=e[27],_=e[28],k=e[29],A=e[30],I=e[31],C=e[32],O=e[33],E=e[34],D=e[35];let z;e[179]!==T||e[180]!==N||e[181]!==I||e[182]!==C||e[183]!==O||e[184]!==E||e[185]!==D?(z=n.jsxs(T,{children:[I,C,O,E,D,N]}),e[179]=T,e[180]=N,e[181]=I,e[182]=C,e[183]=O,e[184]=E,e[185]=D,e[186]=z):z=e[186];let B;return e[187]!==P||e[188]!==j||e[189]!==g||e[190]!==_||e[191]!==k||e[192]!==A||e[193]!==z?(B=n.jsxs(P,{open:j,onOpenChange:g,title:_,description:k,children:[A,z]}),e[187]=P,e[188]=j,e[189]=g,e[190]=_,e[191]=k,e[192]=A,e[193]=z,e[194]=B):B=e[194],B}function Ys(t){return t.type!=="connection"}function Qs(t){return t.type==="connection"}const We=new Jn(!1);function Xs(){We.set(!0)}function Zs(){We.set(!1)}function eo(){const t=M.c(2),e=J.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 to=300*1e3,no=2;function so(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 oo(t,e){return t.count>=no&&t.version!==null&&t.version!==e}function io(){const t=M.c(43),e=W(),s=Wn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:ro},t[0]=a):a=t[0];const o=Ye(a);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:Ue.appVersionCheck(),queryFn:ao,refetchInterval:to,refetchIntervalInBackground:!0,staleTime:0},t[1]=i):i=t[1];const{data:r,dataUpdatedAt:d}=He(i),[u,f]=J.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,y]=J.useState(S);d!==u&&(f(d),y(z=>so(z,r,"4.389.0")));const[h,w]=J.useState(null),m=s;let l;t[3]!==s||t[4]!==o?(l=()=>window.location.reload(),t[3]=s,t[4]=o,t[5]=l):l=t[5];const b=l,p="announcements.version.refresh";if(!oo(c,h))return null;let x;t[6]!==e?(x=e("announcements.version.ariaLabel"),t[6]=e,t[7]=x):x=t[7];let v;t[8]!==e?(v=e("announcements.version.dismiss"),t[8]=e,t[9]=v):v=t[9];let T;t[10]!==e?(T=e("announcements.version.eyebrow"),t[10]=e,t[11]=T):T=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const N="announcements.version.description";let j;t[14]!==e||t[15]!==N?(j=e(N),t[14]=e,t[15]=N,t[16]=j):j=t[16];let g;t[17]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(yt,{size:16}),t[17]=g):g=t[17];let _;t[18]!==c.version?(_=()=>w(c.version),t[18]=c.version,t[19]=_):_=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.389.0"}),t[20]=e,t[21]=k):k=t[21];let A;t[22]!==p||t[23]!==e?(A=e(p),t[22]=p,t[23]=e,t[24]=A):A=t[24];const I=m;let C;t[25]!==I?(C=dt(I),t[25]=I,t[26]=C):C=t[26];let O;t[27]!==C?(O=n.jsx(yt,{size:14,className:C}),t[27]=C,t[28]=O):O=t[28];let E;t[29]!==b||t[30]!==m||t[31]!==A||t[32]!==O?(E=n.jsxs(F,{size:"sm",disabled:m,onClick:b,children:[A,O]}),t[29]=b,t[30]=m,t[31]=A,t[32]=O,t[33]=E):E=t[33];let D;return t[34]!==_||t[35]!==k||t[36]!==E||t[37]!==x||t[38]!==v||t[39]!==T||t[40]!==P||t[41]!==j?(D=n.jsx(zt,{ariaLabel:x,dismissLabel:v,eyebrow:T,title:P,description:j,icon:g,tone:"system",onDismiss:_,footerLeading:k,actions:E}),t[34]=_,t[35]=k,t[36]=E,t[37]=x,t[38]=v,t[39]=T,t[40]=P,t[41]=j,t[42]=D):D=t[42],D}async function ao(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function ro(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function lo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const co=Date.parse("2026-07-21T00:00:00Z"),Tt=t=>lo(Ke.ptBrAnnouncementSeen(t));function uo(){const t=M.c(35),e=W(),[s,a]=At(),{data:o,isPending:i}=Be.useSession(),r=o?.user,d=r?.id,u=r?.createdAt,f=u!=null&&new Date(u).getTime()<co,S=an()==="pt-BR",c=!i&&!!d&&f&&S&&s.language==="en"&&!Tt(d).has(),[y,h]=J.useState(!1),[w,m]=J.useState(!1);!y&&!i&&(h(!0),c&&d&&(Tt(d).mark(),a(fo),m(!0),ut("pt_br_auto_switch_shown")));let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=B=>{ut("pt_br_auto_switch_closed",{action:B}),m(!1)},t[0]=l):l=t[0];const b=l;let p;t[1]!==a?(p=()=>{a(mo),b("switch-back")},t[1]=a,t[2]=p):p=t[2];const x=p;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=B=>!B&&b("dismiss"),t[3]=v):v=t[3];let T;t[4]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=T):T=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let N;t[7]!==P?(N=n.jsx(Dt,{children:P}),t[7]=P,t[8]=N):N=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let g;t[11]!==j?(g=n.jsx($n,{children:j}),t[11]=j,t[12]=g):g=t[12];let _;t[13]!==N||t[14]!==g?(_=n.jsxs($t,{children:[N,g]}),t[13]=N,t[14]=g,t[15]=_):_=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let A;t[18]!==x||t[19]!==k?(A=n.jsx(F,{variant:"outline",onClick:x,children:k}),t[18]=x,t[19]=k,t[20]=A):A=t[20];let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I=()=>b("ok"),t[21]=I):I=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let O;t[24]!==C?(O=n.jsx(F,{onClick:I,children:C}),t[24]=C,t[25]=O):O=t[25];let E;t[26]!==A||t[27]!==O?(E=n.jsxs(Dn,{children:[A,O]}),t[26]=A,t[27]=O,t[28]=E):E=t[28];let D;t[29]!==E||t[30]!==_?(D=n.jsxs(Rt,{className:"sm:max-w-md",children:[T,_,E]}),t[29]=E,t[30]=_,t[31]=D):D=t[31];let z;return t[32]!==w||t[33]!==D?(z=n.jsx(Mt,{open:w,onOpenChange:v,children:D}),t[32]=w,t[33]=D,t[34]=z):z=t[34],z}function mo(t){return{...t,language:"en"}}function fo(t){return{...t,language:"pt-BR"}}function ho(t){const e=rn(t);return typeof e=="string"?e:void 0}function go(){return ho("experiment-pipeline-check"),null}function po(t){const e=M.c(1),{activeOrg:s}=t;if(!s)return null;ln(s.id,{name:s.name??void 0,slug:s.slug??void 0}),cn();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(go,{}),e[0]=a):a=e[0],a}function yo(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:o,opts:i,autosendValue:r}=t,d={mainpanel:void 0};s?d.virtualmcpid=s:e.virtualmcpid&&(d.virtualmcpid=e.virtualmcpid);const u=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,S=(s??u)!==u;let c,y;return i?.panel?y=i.panel:o?(y=o.tab,o.sidepanel!==void 0&&(c=o.sidepanel),o.mainpanel!==void 0&&(d.mainpanel=o.mainpanel)):!S&&e.tabId&&!dn(e.tabId)&&(y=e.tabId),c!==void 0&&(d.sidepanel=c),i?.autosend&&(d.autosend=r),{tabId:y,search:d}}const Jt="studio:thread-layout:v4",bo=50;function Vt(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 xo(t,e,s,a=bo){const o=t.filter(([i])=>i!==e);for(o.push([e,Vt(s)]);o.length>a;)o.shift();return o}function gt(){try{const t=sessionStorage.getItem(Jt);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 Wt(t){try{sessionStorage.setItem(Jt,JSON.stringify(t))}catch{}}function wo(t,e){t&&Wt(xo(gt(),t,e))}function So(t){if(!t)return null;const e=gt().find(([s])=>s===t);return e?Vt(e[1]):null}function ui(t){if(!t)return;const e=gt(),s=e.filter(([a])=>a!==t);s.length!==e.length&&Wt(s)}function Yt(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 mi(t){const e=M.c(10);let s;e[0]!==t?(s=Yt(t),e[0]=t,e[1]=s):s=e[1];const a=He(s);let o;e[2]!==a.data?.prompts?(o=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=o):o=e[3];let i;e[4]!==a.data?.tiles?(i=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=i):i=e[5];let r;return e[6]!==a.isLoading||e[7]!==o||e[8]!==i?(r={isLoading:a.isLoading,prompts:o,tiles:i},e[6]=a.isLoading,e[7]=o,e[8]=i,e[9]=r):r=e[9],r}function vo(t){const e=M.c(31),{orgSlug:s,orgName:a,domain:o}=t,i=W();let r;e[0]!==s?(r=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=r):r=e[1];const d=r,u=jo;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(Nt,{className:"h-6 w-6 text-primary"})}),e[2]=f):f=e[2];let S;e[3]!==i?(S=i("common.ssoRequiredScreen.title"),e[3]=i,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 y;e[7]!==o||e[8]!==a||e[9]!==i?(y=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",i("common.ssoRequiredScreen.requiresSsoAuth"),o?` ${i("common.ssoRequiredScreen.via",{domain:o})}`:"","."]}):i("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=o,e[8]=a,e[9]=i,e[10]=y):y=e[10];let h;e[11]!==y?(h=n.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[11]=y,e[12]=h):h=e[12];let w;e[13]!==c||e[14]!==h?(w=n.jsxs("div",{className:"space-y-2",children:[c,h]}),e[13]=c,e[14]=h,e[15]=w):w=e[15];let m;e[16]!==i?(m=i("common.ssoRequiredScreen.signInWithSso"),e[16]=i,e[17]=m):m=e[17];let l;e[18]!==d||e[19]!==m?(l=n.jsx(F,{onClick:d,children:m}),e[18]=d,e[19]=m,e[20]=l):l=e[20];let b;e[21]!==i?(b=i("common.ssoRequiredScreen.goBack"),e[21]=i,e[22]=b):b=e[22];let p;e[23]!==b?(p=n.jsx(F,{variant:"ghost",onClick:u,children:b}),e[23]=b,e[24]=p):p=e[24];let x;e[25]!==p||e[26]!==l?(x=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[l,p]}),e[25]=p,e[26]=l,e[27]=x):x=e[27];let v;return e[28]!==x||e[29]!==w?(v=n.jsxs(me,{children:[f,w,x]}),e[28]=x,e[29]=w,e[30]=v):v=e[30],v}function jo(){window.location.href="/"}function ko(t){const e=M.c(27),{notice:s,orgSlug:a}=t,o=W();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:n.jsx(un,{className:"h-6 w-6 text-destructive"})}),e[0]=i):i=e[0];let r;e[1]!==s.title?(r=n.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=r):r=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 u;e[5]!==r||e[6]!==d?(u=n.jsxs("div",{className:"space-y-2",children:[r,d]}),e[5]=r,e[6]=d,e[7]=u):u=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(a)}/settings/infra-billing`;let c;e[11]!==o?(c=o("common.blockedOrgScreen.goToBilling"),e[11]=o,e[12]=c):c=e[12];let y;e[13]!==S||e[14]!==c?(y=n.jsx(F,{variant:"outline",asChild:!0,children:n.jsx("a",{href:S,children:c})}),e[13]=S,e[14]=c,e[15]=y):y=e[15];let h;e[16]!==o?(h=o("common.blockedOrgScreen.switchOrg"),e[16]=o,e[17]=h):h=e[17];let w;e[18]!==h?(w=n.jsx(F,{variant:"ghost",asChild:!0,children:n.jsx("a",{href:"/",children:h})}),e[18]=h,e[19]=w):w=e[19];let m;e[20]!==w||e[21]!==f||e[22]!==y?(m=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,y,w]}),e[20]=w,e[21]=f,e[22]=y,e[23]=m):m=e[23];let l;return e[24]!==m||e[25]!==u?(l=n.jsxs(me,{children:[i,u,m]}),e[24]=m,e[25]=u,e[26]=l):l=e[26],l}function To(t){const e=M.c(8);let s;e[0]!==t?(s=Ue.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/${t}/notice`,{credentials:"include"});return r.ok?(await r.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const o=!!t;let i;return e[4]!==s||e[5]!==a||e[6]!==o?(i={queryKey:s,queryFn:a,enabled:o,staleTime:6e4},e[4]=s,e[5]=a,e[6]=o,e[7]=i):i=e[7],He(i)}const No="/settings/infra-billing";function _o(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(No)}function Ao(t){const e=M.c(7),{org:s,children:a}=t;let o;e[0]!==s.id||e[1]!==s.name?(o={id:s.id,organizationId:s.id,slug:"_org",name:s.name,ui:null},e[0]=s.id,e[1]=s.name,e[2]=o):o=e[2];const i=o;let r;return e[3]!==a||e[4]!==s||e[5]!==i?(r=n.jsx(xn,{org:s,project:i,children:a}),e[3]=a,e[4]=s,e[5]=i,e[6]=r):r=e[6],r}function Po(){const t=Pt(),e=Vn(),{org:s}=ht(),a=mn({strict:!1}),o=Lt(),{openPanel:i,closePanel:r}=Ln(),d=Xn(),u=Zn(),f=es(),S=ts(),c=(m,l=!0)=>t({to:".",search:m,replace:l}),y=()=>c(m=>({...m,sidepanel:!0})),h=(m,l,b)=>{const p=!!u&&u===m;u&&!p&&wo(u,{tab:o,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const x=p?null:So(m),v=Et(s.id).id,T=yo({prev:{virtualmcpid:d,tabId:o},virtualMcpId:l,decopilotId:v,savedLayout:x,opts:b,autosendValue:Qn});return S(m,()=>T.search,{virtualMcpId:l,view:{tabId:T.tabId}})};return{openSidePanel:y,setTaskId:h,createNewTask:async(m,l,b)=>{const p=crypto.randomUUID(),x=m??f;try{await e?.create({id:p,virtual_mcp_id:x,...l?{branch:l}:{}})}catch{}h(p,x,b)},openTab:i,closeTab:r}}const Co=new Set(["/$org/","/$org/home"]);function Eo(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:Io},t[0]=e):e=t[0],It(e)}function Io(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&Co.has(e)}function Oo(){const t=M.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 a=fn(e)?.params.org,[o,i]=J.useState(!1),[r,d]=eo(),u=hn(),f=Eo(),S=a??"";let c;t[1]!==S?(c=Yt(S),t[1]=S,t[2]=c):c=t[2];const y=!!a&&f;let h;t[3]!==c||t[4]!==y?(h={...c,enabled:y},t[3]=c,t[4]=y,t[5]=h):h=t[5],He(h);const{data:w}=Be.useSession(),m=w?.user?.id;let l;t[6]!==a||t[7]!==m?(l=a&&m?gn(m,a):null,t[6]=a,t[7]=m,t[8]=l):l=t[8];const b=l;let p,x;t[9]!==u?(p=()=>{const L=K=>{if(jt(K)&&K.code==="KeyK"){K.preventDefault(),Xs();return}if(K.key==="?"&&!Bs(K.target)){K.preventDefault(),i(!0);return}jt(K)&&K.code==="BracketLeft"&&u.history.canGoBack()&&(K.preventDefault(),u.history.back())};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},x=[u],t[9]=u,t[10]=p,t[11]=x):(p=t[10],x=t[11]),J.useEffect(p,x);let v;t[12]!==a?(v=Ue.activeOrganization(a),t[12]=a,t[13]=v):v=t[13];let T;t[14]!==a||t[15]!==m?(T=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:L}=await Be.organization.getFullOrganization({query:{organizationSlug:a}}).finally($o),K=lt(L);return L&&!K&&localStorage.setItem(Ke.lastOrgSlug(),a),m&&L&&yn(m,a,L),L},t[14]=a,t[15]=m,t[16]=T):T=t[16];const P=b?b.data:void 0,N=b?.updatedAt;let j;t[17]!==P||t[18]!==N||t[19]!==v||t[20]!==T?(j={queryKey:v,queryFn:T,initialData:P,initialDataUpdatedAt:N,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=N,t[19]=v,t[20]=T,t[21]=j):j=t[21];const{data:g}=_t(j),_=g?.id,k=g?.slug,{data:A}=ns(_,k),I=!!A?.ssoRequired&&!A.authenticated,{data:C}=To(k);let O;t[22]===Symbol.for("react.memo_cache_sentinel")?(O={select:Lo},t[22]=O):O=t[22];const E=It(O),D=C?.severity==="block"&&!_o(E),z=_??"",B=k??"";let q;t[23]!==z||t[24]!==B?(q=Gn({connectionId:Ct,orgId:z,orgSlug:B}),t[23]=z,t[24]=B,t[25]=q):q=t[25];const Y=!!_&&!!k;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),(!g||lt(g)||I||D)&&Zs(),!g){let L;return t[29]!==a?(L=n.jsx(fs,{orgSlug:a}),t[29]=a,t[30]=L):L=t[30],L}if(lt(g)){localStorage.getItem(Ke.lastOrgSlug())===a&&localStorage.removeItem(Ke.lastOrgSlug());let L;return t[31]!==g.name?(L=n.jsx(pn,{orgName:g.name}),t[31]=g.name,t[32]=L):L=t[32],L}if(D&&C){let L;return t[33]!==g.slug||t[34]!==C?(L=n.jsx(ko,{notice:C,orgSlug:g.slug}),t[33]=g.slug,t[34]=C,t[35]=L):L=t[35],L}if(I){let L;return t[36]!==g.id||t[37]!==g.name||t[38]!==g.slug||t[39]!==A.domain?(L=n.jsx(vo,{orgId:g.id,orgSlug:g.slug,orgName:g.name,domain:A.domain}),t[36]=g.id,t[37]=g.name,t[38]=g.slug,t[39]=A.domain,t[40]=L):L=t[40],L}const ee=g.logo??null;let Q;t[41]!==g||t[42]!==ee?(Q={...g,logo:ee},t[41]=g,t[42]=ee,t[43]=Q):Q=t[43];let H;t[44]!==g?(H=n.jsx(po,{activeOrg:g}),t[44]=g,t[45]=H):H=t[45];let X;t[46]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(bn,{}),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(zs,{}),n.jsx(io,{})]}),t[47]=se):se=t[47];let U;t[48]!==r||t[49]!==d?(U=r&&n.jsx(Ws,{open:r,onOpenChange:d}),t[48]=r,t[49]=d,t[50]=U):U=t[50];let G;t[51]!==o?(G=n.jsx(Hs,{open:o,onOpenChange:i}),t[51]=o,t[52]=G):G=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(uo,{}),t[53]=oe):oe=t[53];let Z;return t[54]!==Q||t[55]!==H||t[56]!==U||t[57]!==G?(Z=n.jsxs(Ao,{org:Q,children:[H,X,se,U,G,oe]}),t[54]=Q,t[55]=H,t[56]=U,t[57]=G,t[58]=Z):Z=t[58],Z}function Lo(t){return t.location.pathname}function $o(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Do(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Yn,{children:n.jsx(Oo,{})}),t[0]=e):e=t[0],e}const fi=Object.freeze(Object.defineProperty({__proto__:null,default:Do,usePanelActions:Po},Symbol.toStringTag,{value:"Module"}));export{V as K,hs as L,Po as a,Is as b,jt as c,ks as d,mi as e,ui as f,fi as g,Kt as i,Xs as o,ci as r,di as s,To as u};
@@ -1 +1 @@
1
- import{r as O,c as y,j as o,l as N,B as A,be as P,aE as R}from"./index-doEaURqC.js";import{i as H}from"./LayoutLeft-GBQ0rQxQ.js";import{u as V}from"./use-mobile-DYpKQ1eP.js";import{b as W,c as L,S as q,d as F,a as G}from"./sheet-ZoEgH6s-.js";import{b as E,T as $,a as z,c as B}from"./tooltip-C91IS2ON.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(E,{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(L,{className:"sr-only",children:[o.jsx(q,{children:"Sidebar"}),o.jsx(F,{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($,{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(z,{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(E,{delayDuration:300,children:o.jsxs(B,{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($,{asChild:!0,children:j}),e[20]=j,e[21]=m):m=e[21];let p;e[22]!==S||e[23]!==n?(p=o.jsx(z,{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(B,{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,bg as P,aE as R}from"./index-CyBVTyGa.js";import{i as H}from"./LayoutLeft-U0F-Da_p.js";import{u as V}from"./use-mobile-CUQu4L8c.js";import{b as W,c as L,S as q,d as F,a as G}from"./sheet-DH_REC9j.js";import{b as E,T as $,a as z,c as B}from"./tooltip-BjUMPvkB.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(E,{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(L,{className:"sr-only",children:[o.jsx(q,{children:"Sidebar"}),o.jsx(F,{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($,{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(z,{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(E,{delayDuration:300,children:o.jsxs(B,{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($,{asChild:!0,children:j}),e[20]=j,e[21]=m):m=e[21];let p;e[22]!==S||e[23]!==n?(p=o.jsx(z,{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(B,{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-doEaURqC.js";import{b as R,D as _,d as q,i as A}from"./dialog-C36x61_J.js";import{i as $}from"./X-vKTIsgL1.js";import{i as G}from"./Zap-CSRFlEXK.js";import{M as H}from"./markdown-D0jNOMCX.js";import{F as J}from"./file-preview-DobzjEc2.js";import{F as Q}from"./file-type-icon-CFRsMAQ4.js";import{i as V,c as W,n as X}from"./use-org-fs-Bbl2QQqg.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 R,aR as u,l as M,B as T}from"./index-CyBVTyGa.js";import{b as K,D as _,d as q,i as A}from"./dialog-BG6kEGFR.js";import{i as $}from"./X-BNszojyh.js";import{i as G}from"./Zap-BCwjglMw.js";import{M as H}from"./markdown-DCPDulUN.js";import{F as J}from"./file-preview-DCBxvWAy.js";import{F as Q}from"./file-type-icon-Cbv1Det1.js";import{i as V,c as W,n as X}from"./use-org-fs-B1IHOZ9S.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,P=V(),U=P(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),[z,I]=R.useState(null),x=z===null?null:L.find(l=>l.path===z)??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",F=x?s.jsx(J,{file:{key:x.path,filename:c(x.path),size:x.size,downloadUrl:P(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]!==F?(S=s.jsx("div",{className:O,children:F}),e[16]=F,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:z===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(K,{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 R,aP as me,T as de,t as D,ai as pe,c as ie,l as ue,I as ge,F as fe,H as he,G as xe,K as Q,eL as je}from"./index-doEaURqC.js";import{i as ke}from"./DotsVertical-BITRq5d-.js";import{a as ve}from"./Package-DsU1cU6S.js";import{s as ye}from"./Trash01-mB4s-hrv.js";import{i as Se}from"./Upload01-Uv_jtHIk.js";import{i as le}from"./Zap-CSRFlEXK.js";import{S as be}from"./search-input-CCUlZDzf.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-Dg6YJ6PP.js";import{E as Z}from"./empty-state-ClBiZqLf.js";import{C as Me}from"./collection-tabs-BWQrYrdS.js";import{F as Ie}from"./folder-icon-CxyYiSJb.js";import{p as Oe,h as ze,q as Fe}from"./use-org-fs-Bbl2QQqg.js";import{H as J,d as $e}from"./location-oTTXFrSF.js";import{S as Le}from"./skill-preview-BP5xxsO4.js";import{p as Re}from"./skill-md-ChfVs4uF.js";import"./SearchMd-B6NDUgzQ.js";import"./badge-DuB4cqrw.js";import"./Eye-rQUtSbk6.js";import"./dialog-C36x61_J.js";import"./X-vKTIsgL1.js";import"./markdown-D0jNOMCX.js";import"./Check-BZXRTDaX.js";import"./Copy01-B6hr4CBg.js";import"./Download01-CsYfHghd.js";import"./ZoomOut-Burao8Eg.js";import"./org-file-open-context-DodrnIMR.js";import"./use-mobile-DYpKQ1eP.js";import"./use-panel-navigate-xYH0iX8e.js";import"./thread-route-BBKn0p1b.js";import"./use-project-scope-CENQvfVc.js";import"./use-virtual-mcp-B-mdsJbn.js";import"./use-mcp-client-D2DgMGL-.js";import"./auth-D3Q2r2cz.js";import"./github-repo-BknN0SVI.js";import"./file-preview-DobzjEc2.js";import"./utils-BcFrUaDf.js";import"./Image01-BLIf6uY9.js";import"./editor-BQuCFEpz.js";import"./file-type-icon-CFRsMAQ4.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=Re(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 Mt(){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]??"",L=n.filter(Be),W=L.find(A=>U(A)==="SKILL.md");if(!W){D.error(e("settings.skills.importMissingSkillMd"));return}if(L.length>V){D.error(e("settings.skills.importTooManyFiles",{count:String(L.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(L,$),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(R,{children:[t.jsx(R.Content,{children:t.jsx(R.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(R.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(Le,{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{Mt 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,aR as me,T as de,t as D,ai 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-CyBVTyGa.js";import{i as ke}from"./DotsVertical-CAjUqtRp.js";import{a as ve}from"./Package-D2jMN__x.js";import{s as ye}from"./Trash01-BLoRPhD3.js";import{i as Se}from"./Upload01-CNb1qfRO.js";import{i as le}from"./Zap-BCwjglMw.js";import{S as be}from"./search-input-0hd-PWUF.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-DeRt3vSN.js";import{E as Z}from"./empty-state-BpI78UAU.js";import{C as Me}from"./collection-tabs-3_QvnkN-.js";import{F as Ie}from"./folder-icon-DltflRpD.js";import{p as Oe,h as ze,q as Fe}from"./use-org-fs-B1IHOZ9S.js";import{H as J,d as Re}from"./location-oTTXFrSF.js";import{S as $e}from"./skill-preview-D4GrMJU0.js";import{p as Le}from"./skill-md-ChfVs4uF.js";import"./SearchMd-B1Foybfh.js";import"./badge-DS3KIYvS.js";import"./Eye-B5e-ilzV.js";import"./dialog-BG6kEGFR.js";import"./X-BNszojyh.js";import"./markdown-DCPDulUN.js";import"./Check-DL_AGZMy.js";import"./Copy01-6lOOhJcp.js";import"./Download01-Dq8Pn8XY.js";import"./ZoomOut-q6Y0RhlM.js";import"./org-file-open-context-Bh_zBQ2O.js";import"./use-mobile-CUQu4L8c.js";import"./use-panel-navigate-Bg-MVKv6.js";import"./thread-route-JcpQ-ikA.js";import"./use-project-scope-CRdwBUT7.js";import"./use-virtual-mcp-Vg_Ogz61.js";import"./use-mcp-client-CqKNXJW7.js";import"./auth-B-OXMWGw.js";import"./github-repo-BknN0SVI.js";import"./file-preview-DCBxvWAy.js";import"./utils-Bf0RpmgB.js";import"./Image01-CkJtDP-I.js";import"./editor-BiwQpn1s.js";import"./file-type-icon-Cbv1Det1.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 Mt(){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]??"",$=n.filter(Be),W=$.find(A=>U(A)==="SKILL.md");if(!W){D.error(e("settings.skills.importMissingSkillMd"));return}if($.length>V){D.error(e("settings.skills.importTooManyFiles",{count:String($.length),max:String(V)}));return}const R=Ke(q),X=`skills/${R}`;let Y=!1;z(!0);try{if(await Fe(i.slug,"home",X)){D.error(e("settings.skills.importSlugTaken",{slug:R}));return}Y=!0;const A=Qe(R,await W.text());j(oe=>[A,...oe]),h(A.id),await qe(He($,R),c.mutateAsync),D.success(e("settings.skills.importSuccess",{name:R}))}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(Re(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($e,{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{Mt 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 E,dY as y,dZ as a,fx as D,B as u,q as C,t as c,c as z}from"./index-doEaURqC.js";import{D as T}from"./domain-settings-D6TBWbch.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-Dg6YJ6PP.js";import{I as d}from"./input-BK5Sp8hZ.js";import{S as H}from"./switch-BNLiV_oA.js";import{a as X,b as Y,c as Z,d as G}from"./use-org-sso-BnqcEd47.js";import{s as J}from"./Trash01-mB4s-hrv.js";import{R as K}from"./require-capability-vhXMBpff.js";import"./badge-DuB4cqrw.js";import"./select-oEHCSTZi.js";import"./index-C4LzZ3-O.js";import"./Check-BZXRTDaX.js";import"./ChevronUp-DGt31MPD.js";import"./access-gate-Bbnx_Qh-.js";import"./capability-load-error-CYpF4fm6.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),m=f?.configured&&f.config,n=f?.config,_=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},N=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),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:[m&&!g&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{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(u,{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(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:_,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(E,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:N,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,dY as y,dZ as E,d_ as a,fy as D,B as u,q as C,t as c,c as z}from"./index-CyBVTyGa.js";import{D as T}from"./domain-settings-BrbTzYfK.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-DeRt3vSN.js";import{I as d}from"./input-D5Zi_pUc.js";import{S as H}from"./switch-C7dIR4UF.js";import{a as Y,b as Z,c as G,d as J}from"./use-org-sso-CI1_4UQM.js";import{s as K}from"./Trash01-BLoRPhD3.js";import{R as Q}from"./require-capability-QoYjHav_.js";import"./badge-DS3KIYvS.js";import"./select-CDhEibGy.js";import"./index-DtBnPwzh.js";import"./Check-DL_AGZMy.js";import"./ChevronUp-B6mY-MC1.js";import"./access-gate-Clo8Jex8.js";import"./capability-load-error-BjI2iK0-.js";function V(){const s=B(),{org:o}=L(),{data:f,isLoading:I}=Y(o.id,o.slug),h=Z(o.id,o.slug),S=G(o.id,o.slug),b=J(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),m=f?.configured&&f.config,n=f?.config,_=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},N=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await h.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),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:[m&&!g&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:A,disabled:b.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(K,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:_,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(y,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:N,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(Q,{capability:"org:manage",area:"security",children:e.jsx(V,{})}),s[0]=o):o=s[0],o}export{ue 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-doEaURqC.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,br as C,bp as y,bx as I,bs as T,bH as M,bM as H,bI as z,c as A,l as g}from"./index-CyBVTyGa.js";var m="Switch",[U]=z(m),[q,L]=U(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,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:T(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=L(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 O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(a){return a?"checked":"unchecked"}var $=E,D=R;function W(a){const e=A.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(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{c as se,j as s,fr as ye,b as ue,r as ae,B as te,ai as ge,l as je,t as ce,aP as Re}from"./index-doEaURqC.js";import{s as xe}from"./Plus-qASEo4cN.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-Dg6YJ6PP.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-C36x61_J.js";import{I as Ie}from"./input-BK5Sp8hZ.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-Ca5oB9j5.js";import{u as Ge,d as Be,h as He,t as qe}from"./use-org-repo-syncs-Ds4sFbSY.js";import{R as Le}from"./require-capability-vhXMBpff.js";import"./X-vKTIsgL1.js";import"./ArrowLeft-DuxVUo5_.js";import"./LinkExternal01-Dh0AABP8.js";import"./tooltip-C91IS2ON.js";import"./index-C4LzZ3-O.js";import"./label-tAsQMZ2G.js";import"./github-icon-CIx0jkrL.js";import"./useInfiniteQuery-DCZL7BN4.js";import"./infiniteQueryObserver-CxJm0T6_.js";import"./avatar-CLf3yQhN.js";import"./User01-DHGCVvV3.js";import"./collection-search-BQXOJg8a.js";import"./SearchMd-B6NDUgzQ.js";import"./use-debounced-value-CG2jgHBI.js";import"./use-org-fs-Bbl2QQqg.js";import"./DotsVertical-BITRq5d-.js";import"./Download01-CsYfHghd.js";import"./Share07-CMPYQYHk.js";import"./Key01-SGIR_QrT.js";import"./Palette-CzoNEzRs.js";import"./Trash01-mB4s-hrv.js";import"./Zap-CSRFlEXK.js";import"./file-type-icon-CFRsMAQ4.js";import"./folder-icon-CxyYiSJb.js";import"./Eye-rQUtSbk6.js";import"./skill-md-ChfVs4uF.js";import"./access-gate-Bbnx_Qh-.js";import"./capability-load-error-CYpF4fm6.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 zt(){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{zt as default};
1
+ import{c as se,j as s,fs as ye,b as ue,r as ae,B as te,ai as ge,l as je,t as ce,aR as Re}from"./index-CyBVTyGa.js";import{s as xe}from"./Plus-BbELO07z.js";import{A as be,a as ve,b as Se,c as De,g as Ne,d as _e,e as Ce,f as Pe}from"./alert-dialog-DeRt3vSN.js";import{d as Ae,h as ke,c as we,e as ze,b as Ee,D as Oe}from"./dialog-BG6kEGFR.js";import{I as Ie}from"./input-D5Zi_pUc.js";import{u as $e,G as Fe,R as Te}from"./repository-picker-dKTE5PS5.js";import{u as Ge,d as Be,h as He,t as qe}from"./use-org-repo-syncs-CksqUgv6.js";import{R as Le}from"./require-capability-QoYjHav_.js";import"./X-BNszojyh.js";import"./ArrowLeft-CN6aZBvX.js";import"./LinkExternal01-DSUCZUJp.js";import"./tooltip-BjUMPvkB.js";import"./index-DtBnPwzh.js";import"./label-DVhvlWqs.js";import"./github-icon-Bx6tzbBb.js";import"./useInfiniteQuery-DebjMHv1.js";import"./infiniteQueryObserver-COZ-9XSO.js";import"./avatar-GIuLZx2C.js";import"./User01-U5CIC-GP.js";import"./collection-search-DyuqjLWs.js";import"./SearchMd-B1Foybfh.js";import"./use-debounced-value-DHN-wkc6.js";import"./use-org-fs-B1IHOZ9S.js";import"./DotsVertical-CAjUqtRp.js";import"./Download01-Dq8Pn8XY.js";import"./Share07-B2WnpDWD.js";import"./Key01-BCuGindq.js";import"./Palette-DebiHmrq.js";import"./Trash01-BLoRPhD3.js";import"./Zap-BCwjglMw.js";import"./file-type-icon-Cbv1Det1.js";import"./folder-icon-DltflRpD.js";import"./Eye-B5e-ilzV.js";import"./skill-md-ChfVs4uF.js";import"./access-gate-Clo8Jex8.js";import"./capability-load-error-BjI2iK0-.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(C=>C.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 _=m.error?"text-destructive":"text-muted-foreground";let D;t[15]!==_?(D=je("text-xs mt-0.5 truncate",_),t[15]=_,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 _;e[5]!==c||e[6]!==o||e[7]!==t?(_=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]=_):_=e[8];const D=_;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 C;e[22]!==u||e[23]!==j?(C=s.jsx(Te,{open:u,onOpenChange:m,title:j,onPicked:N}),e[22]=u,e[23]=j,e[24]=C):C=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 P;e[26]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=P):P=e[27];let A;e[28]!==P?(A=s.jsx(Ae,{children:P}),e[28]=P,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(_e,{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(Ce,{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(Pe,{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]!==C?(re=s.jsxs(s.Fragment,{children:[h,y,C,q,ee]}),e[101]=q,e[102]=h,e[103]=ee,e[104]=y,e[105]=C,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 zt(){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{zt as default};
@@ -1 +1 @@
1
- import{c,l as i,j as r}from"./index-doEaURqC.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-CyBVTyGa.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-doEaURqC.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,es as k,br as p,bs as T,eu as M,dm as P,bw as S,bx as F,bq as V,et as y,bI as D,c as x,l as g}from"./index-CyBVTyGa.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",I=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})})});I.displayName=N;var j="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(j,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=j;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=I,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 +1 @@
1
- import{o as s}from"./schema-BVqtjcyJ.js";const T="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function w(e){return e.createdBy==="system"}const p="chore",d=["reviewer"],_={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const S=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],D={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[_[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>d.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const i=a.data??{};if(i.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&i.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const h="task-board.item.updated",b="task-board.item.deleted",N="task-board.item.prs.updated",C=4e3;export{S as C,p as D,D as L,d as R,T as S,h as T,b as a,N as b,c,L as d,m as e,u as f,g,C as h,w as i,A as n,R as r};
1
+ import{o as s}from"./schema-DSsDEA1v.js";const T="super-agent",o=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=o[0];function A(e){return o[e%o.length]??c}function w(e){return e.createdBy==="system"}const p="chore",d=["reviewer"],_={reviewer:"Reviewer"},E=["QA Agent","Code Reviewer"];function R(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const S=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],D={queue:"todo"},L=["approved","merged","post_deploy_validation"];function u(e,t){return e?[_[t],...E].some(r=>e.startsWith(`${r}:`)):!1}function g(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(t=>d.some(r=>u(t,r)))}function f(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=f(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const i=a.data??{};if(i.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&i.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function m(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const h="task-board.item.updated",b="task-board.item.deleted",N="task-board.item.prs.updated",C=4e3;export{S as C,p as D,D as L,d as R,T as S,h as T,b as a,N as b,c,L as d,m as e,u as f,g,C as h,w as i,A as n,R as r};