decocms 4.123.9 → 4.125.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 (244) hide show
  1. package/dist/client/assets/{AlertCircle-nsAOhmc5.js → AlertCircle-DvfBlYrL.js} +1 -1
  2. package/dist/client/assets/{AreaChart-COvvWTHK.js → AreaChart-BWXnmVtl.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-W78pWgya.js → ArrowRight-K0PcGsAS.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-D_vtmz11.js → ArrowUp-DldyVTkl.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-CE7N_ssY.js → ArrowUpRight-DkqOJwYV.js} +1 -1
  6. package/dist/client/assets/{Check-CbFEdDFo.js → Check-6GOKlhGR.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-vxKWSGjq.js → CheckCircle-9L_WEhjd.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-CXe6JgOB.js → ChevronDown-D6K15SiY.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-5eA6ROzl.js → ChevronRight-BINVR94A.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-ClePnk1p.js → ChevronUp-DXmlrw7j.js} +1 -1
  11. package/dist/client/assets/{Copy01-D_I4zLJq.js → Copy01-DWcfJ6do.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DF3Be14k.js → DotsVertical-BcxA0H0A.js} +1 -1
  13. package/dist/client/assets/{Eye-CCFNdeEl.js → Eye-DxciQ4X_.js} +1 -1
  14. package/dist/client/assets/{FilterLines-CV0dxqQH.js → FilterLines-CCcxnxPP.js} +1 -1
  15. package/dist/client/assets/{Globe01-K7604lAF.js → Globe01-CyO9gcZQ.js} +1 -1
  16. package/dist/client/assets/{Globe04-SqHL90_b.js → Globe04-5OrQ3MTy.js} +1 -1
  17. package/dist/client/assets/{HardDrive-D5BssK7-.js → HardDrive-BzO9Ubxq.js} +1 -1
  18. package/dist/client/assets/{Image01-sKA_S9si.js → Image01-B3kPPocy.js} +1 -1
  19. package/dist/client/assets/{Key01-HnuEM_kB.js → Key01-Ck9xvZVC.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-B8qL2spL.js → LayoutLeft-D2sYGMB7.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BIeTlaI1.js → LinkExternal01-zAHttdgm.js} +1 -1
  22. package/dist/client/assets/{LogOut01-Dzrbv7eq.js → LogOut01-BBickpvV.js} +1 -1
  23. package/dist/client/assets/{Monitor01-ahykGWr6.js → Monitor01-JOpdz6lu.js} +1 -1
  24. package/dist/client/assets/{Package-DMX0KLYy.js → Package-BRrTF7o_.js} +1 -1
  25. package/dist/client/assets/{Palette-9lXole3j.js → Palette-We4HTFm2.js} +1 -1
  26. package/dist/client/assets/{Play-anRYH6K1.js → Play-Cbcre7D7.js} +1 -1
  27. package/dist/client/assets/{Plus-DS3KKDHn.js → Plus-SIohDtsd.js} +1 -1
  28. package/dist/client/assets/{SearchLg-z8IAxAgb.js → SearchLg-DhgY47Db.js} +1 -1
  29. package/dist/client/assets/{SearchMd-w82MFsfG.js → SearchMd-B358aeAc.js} +1 -1
  30. package/dist/client/assets/{Settings02-DBXlrfF_.js → Settings02-qZ1nu4UL.js} +1 -1
  31. package/dist/client/assets/{Shield01-4mocQmSI.js → Shield01-B1SuVOA4.js} +1 -1
  32. package/dist/client/assets/{Star01-Bf8yuwps.js → Star01-1OoCGUWI.js} +1 -1
  33. package/dist/client/assets/{Stars01-ByFhj5mQ.js → Stars01-DdCa_LJT.js} +1 -1
  34. package/dist/client/assets/{Stars02-B2okzw6k.js → Stars02-CUwVycc9.js} +1 -1
  35. package/dist/client/assets/{Sun-eT24COyo.js → Sun-Mn-iAMZy.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-BVz6HjlA.js → SwitchHorizontal01-C8dryIxw.js} +1 -1
  37. package/dist/client/assets/{Tool01-Bxryucq9.js → Tool01-ue8ZSTBu.js} +1 -1
  38. package/dist/client/assets/{Tool02-DXkhQkf7.js → Tool02-Dx39xjiX.js} +1 -1
  39. package/dist/client/assets/{Trash01-JNWsD9zI.js → Trash01-C_B2puls.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-lmorDXaS.js → TrendUp01-DNzoZibO.js} +1 -1
  41. package/dist/client/assets/{Upload01-iZa_BxIK.js → Upload01-C71fAuEP.js} +1 -1
  42. package/dist/client/assets/{User01-BVJUnJoI.js → User01-5JLGItxs.js} +1 -1
  43. package/dist/client/assets/{Users01-ClFkkNN7.js → Users01-VJm2IsPn.js} +1 -1
  44. package/dist/client/assets/{Users03-DDFwhuFu.js → Users03-CAM8GcdD.js} +1 -1
  45. package/dist/client/assets/{X-CUF99Lsu.js → X-YK9anGVG.js} +1 -1
  46. package/dist/client/assets/{XCircle-BTCzfXYC.js → XCircle-nNktCk-D.js} +1 -1
  47. package/dist/client/assets/{XClose-BAe5iaCX.js → XClose-CB5HyGcC.js} +1 -1
  48. package/dist/client/assets/{Zap-DZcAzV7c.js → Zap-BhoH6xTC.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-Bp70BKvB.js → ZapSquare-CVD42dNd.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-QXkH5zvj.js → ZoomOut-BxkGtahn.js} +1 -1
  51. package/dist/client/assets/{access-gate-CkbeCvYc.js → access-gate-BYB6IOGG.js} +1 -1
  52. package/dist/client/assets/add-section-modal-DqdZxv2N.js +1 -0
  53. package/dist/client/assets/{agent-icon-CaI0GdpH.js → agent-icon-Dev4TdKP.js} +1 -1
  54. package/dist/client/assets/{agents-list-BFuEOYoR.js → agents-list-CtHKIF4N.js} +1 -1
  55. package/dist/client/assets/{ai-providers-BezjsaBy.js → ai-providers-D1ywcWRo.js} +1 -1
  56. package/dist/client/assets/{alert-BICZmvJ3.js → alert-D0utymhp.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-BIM3ZQ61.js → alert-dialog-CjSul7G9.js} +1 -1
  58. package/dist/client/assets/{app-editor-BjHtIAfU.js → app-editor-0Y_2ILhi.js} +1 -1
  59. package/dist/client/assets/{auth-uY-yd_Qx.js → auth-BZRVg8ck.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-DuLg4ksr.js → auth-catchall-DQH3O9pf.js} +1 -1
  61. package/dist/client/assets/{auth-entry-D_4ILbuF.js → auth-entry-DDYO7W-P.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-CCza2ifT.js → auth-split-layout-BUmwEgK6.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CHKgbLri.js → authenticate-and-persist-oauth-D7GT9tA-.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-BgIWcdHf.js → automation-list-row-Zno4svqN.js} +1 -1
  65. package/dist/client/assets/{automation-runs-vYAByajM.js → automation-runs-B5g626U_.js} +1 -1
  66. package/dist/client/assets/{automations-BLwuU6AI.js → automations-BiV1a-dd.js} +1 -1
  67. package/dist/client/assets/{autosend-Cu5ph7K1.js → autosend-C9-kwqep.js} +1 -1
  68. package/dist/client/assets/{avatar-Bipd5UEy.js → avatar-GcuRDpnC.js} +1 -1
  69. package/dist/client/assets/{badge-C3f1raKX.js → badge-DBpyOFLb.js} +1 -1
  70. package/dist/client/assets/{block-document-C8YGje15.js → block-document-BMeDg_Ed.js} +2 -2
  71. package/dist/client/assets/{brand-context-DyCI1w8L.js → brand-context-D1ZrmkfV.js} +1 -1
  72. package/dist/client/assets/{buckets-CZ2hMVao.js → buckets-d4y3uiG5.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-DrnFvo5I.js → bulk-category-panel-DVeSnpfF.js} +1 -1
  74. package/dist/client/assets/{calendar-CaYhlf3J.js → calendar-DSyZYysh.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-oSOBjNiW.js → capability-load-error-DSXapAP0.js} +1 -1
  76. package/dist/client/assets/{card-Cz1w-KeT.js → card-CrYaoQbI.js} +1 -1
  77. package/dist/client/assets/category-editor-wCZemtPn.js +1 -0
  78. package/dist/client/assets/{chat-context-DrudQqbN.js → chat-context-CH9M1POl.js} +1 -1
  79. package/dist/client/assets/{checkbox-HZxDl7MX.js → checkbox-ftPwjSb4.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-DEViHtnN.js → cli-auth-success-Dg_MCI_P.js} +1 -1
  81. package/dist/client/assets/{collection-detail-BFhVDLOx.js → collection-detail-BfPLSGGx.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-DRpGuADu.js → collection-display-button-C8JfjXWc.js} +1 -1
  83. package/dist/client/assets/{collection-search-BKwi5gox.js → collection-search-Clr4qw7r.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-DZ2wVNQR.js → collection-table-wrapper-BnqxTdBn.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-C2hvedKX.js → collection-tabs-BRp9MTcw.js} +1 -1
  86. package/dist/client/assets/{command-CzcPmc98.js → command-DbFzg0Ix.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-B74-dzK0.js → commerce-onboarding-BV177pws.js} +1 -1
  88. package/dist/client/assets/{companions-core-CEPgmi_H.js → companions-core-BZvN_jY1.js} +1 -1
  89. package/dist/client/assets/{connect-C8HMBeok.js → connect-DKYbS5Jd.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-CTgRGfG0.js → connect-desktop-dialog-iKO3Pf42.js} +1 -1
  91. package/dist/client/assets/{connection-D2Pupsdd.js → connection-BiZ69GQ3.js} +1 -1
  92. package/dist/client/assets/{connection-card-COtpZU4g.js → connection-card-Bmy_0W2Y.js} +1 -1
  93. package/dist/client/assets/{connection-detail-CxfBbaEV.js → connection-detail-DBy3LTGL.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-CS6sBlKC.js → connection-form-helpers-kpZCeheC.js} +1 -1
  95. package/dist/client/assets/{connections-XXELJwpZ.js → connections-T8kJarOL.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-DScO8nLg.js → decopilot-sse-pool-BZzIo0CP.js} +1 -1
  97. package/dist/client/assets/{dialog-C9LdhEJ8.js → dialog-BLLPuSkh.js} +1 -1
  98. package/dist/client/assets/{domain-settings-BrGk7au0.js → domain-settings-eu3OocOq.js} +1 -1
  99. package/dist/client/assets/{drawer-iJbxlBHN.js → drawer-CqgBx9ma.js} +1 -1
  100. package/dist/client/assets/dropdown-menu-BvspipA8.js +1 -0
  101. package/dist/client/assets/{empty-state-Cm4v9nCd.js → empty-state-BbT4pQZU.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-bvDVBCCK.js → extract-connection-data-BvB2j9Z0.js} +1 -1
  103. package/dist/client/assets/file-explorer-D4aNaiPS.js +2 -0
  104. package/dist/client/assets/{file-type-icon-BFz-fAWJ.js → file-type-icon-DqqHwwEy.js} +1 -1
  105. package/dist/client/assets/{files-DI8kH-Qq.js → files-D0dL8gBi.js} +1 -1
  106. package/dist/client/assets/{form-ujVNSHLD.js → form-DMLPR4HN.js} +1 -1
  107. package/dist/client/assets/{general-C2c5f_Cu.js → general-B46oiC8m.js} +1 -1
  108. package/dist/client/assets/{github-repo-picker-CjqIThyB.js → github-repo-picker-B9VuEVcu.js} +1 -1
  109. package/dist/client/assets/{hooks-DppbqdpU.js → hooks-CLS683Io.js} +1 -1
  110. package/dist/client/assets/index-2J9eNNF9.js +1 -0
  111. package/dist/client/assets/{index-CeTww2Kq.js → index-6Ysvu-Cc.js} +2 -2
  112. package/dist/client/assets/{index-Bq-qtjfv.js → index-B61_ZLgS.js} +1 -1
  113. package/dist/client/assets/{index-fi0f1C_U.js → index-BgxPtxOZ.js} +5 -5
  114. package/dist/client/assets/{index-CggwapSx.js → index-BoVzJ4Oy.js} +1 -1
  115. package/dist/client/assets/{index-BRynC73_.js → index-CAzwvRqV.js} +1 -1
  116. package/dist/client/assets/{index-DFtHrGGw.js → index-COMayckQ.js} +1 -1
  117. package/dist/client/assets/{index-By7vVH6Z.js → index-CX8Y224E.js} +1 -1
  118. package/dist/client/assets/{index-rt1Yq-xm.js → index-Cdxjphpo.js} +3 -3
  119. package/dist/client/assets/{index-B4pWthKK.js → index-CoOuRc44.js} +1 -1
  120. package/dist/client/assets/{index-rMEa2YJG.js → index-Cv18L-zj.js} +1 -1
  121. package/dist/client/assets/index-DBC4gRwz.css +1 -0
  122. package/dist/client/assets/{index-CWYTgJsi.js → index-DSdazh5c.js} +5 -5
  123. package/dist/client/assets/{index-H0oW1Dgr.js → index-Dcu3F3N4.js} +1 -1
  124. package/dist/client/assets/{index-redirect-AVPe1SSk.js → index-redirect-DEYmC6io.js} +1 -1
  125. package/dist/client/assets/{input-CB7a8Fqy.js → input-CSaE3mqO.js} +1 -1
  126. package/dist/client/assets/{integration-icon-CDDsl6LV.js → integration-icon-BRmcaiHQ.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-BQzvNXpQ.js → invite-member-dialog-BGpnUN63.js} +1 -1
  128. package/dist/client/assets/{label-B6kQLTZ2.js → label-DSiEjeBl.js} +1 -1
  129. package/dist/client/assets/{layout-DAO8axcv.js → layout-DOWDs3vA.js} +1 -1
  130. package/dist/client/assets/{login-DEWE8IhN.js → login-C3pv5Pp1.js} +1 -1
  131. package/dist/client/assets/{mcp-oauth-BdVW-uBg.js → mcp-oauth-BLKedGJf.js} +1 -1
  132. package/dist/client/assets/{members-C1MitF9D.js → members-7wM8Q1PI.js} +1 -1
  133. package/dist/client/assets/{monaco-editor-BAb_NIlJ.js → monaco-editor-DHg2OOqj.js} +1 -1
  134. package/dist/client/assets/{monitoring-stats-row-BVQqegLf.js → monitoring-stats-row-C07WyAj8.js} +1 -1
  135. package/dist/client/assets/{multi-select-Cq2iiOsd.js → multi-select-uQi-y9F_.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-DxYzI6p1.js → oauth-callback-DETpTouu.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-ai-provider-BBvudKeu.js → oauth-callback-ai-provider-DBtin7_d.js} +1 -1
  138. package/dist/client/assets/{onboarding-CRXPhUzH.js → onboarding-D_d7iQsr.js} +1 -1
  139. package/dist/client/assets/{org-install-Bk1fDRvr.js → org-install-D1V6sW2s.js} +1 -1
  140. package/dist/client/assets/{org-layout-CfSOES_e.js → org-layout-DR6ZTN3U.js} +1 -1
  141. package/dist/client/assets/{organization-choice-COUGNAy0.js → organization-choice-CwxZ8J2d.js} +1 -1
  142. package/dist/client/assets/{orgs-DhsywB_d.js → orgs-Diyn7qQu.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-B_rosXuT.js → page-seo-form-B0EsBx9R.js} +1 -1
  144. package/dist/client/assets/page-seo-sheet-CgivSSdq.js +1 -0
  145. package/dist/client/assets/{popover-KcB6zphY.js → popover-D6oxOcZ4.js} +1 -1
  146. package/dist/client/assets/{post-editor-DO-2PHbj.js → post-editor-COKBeatI.js} +1 -1
  147. package/dist/client/assets/{primitives-Cgj0Xdzj.js → primitives-F-Eqr0_L.js} +1 -1
  148. package/dist/client/assets/{profile-D8fy7_qz.js → profile-D3GHg9o_.js} +1 -1
  149. package/dist/client/assets/project-app-view-BSSBPOjC.js +1 -0
  150. package/dist/client/assets/record-editor-ca_oGIG1.js +1 -0
  151. package/dist/client/assets/{redirect-editor-COGZkybC.js → redirect-editor-C2vx7FrF.js} +1 -1
  152. package/dist/client/assets/registry-CanEck9j.js +2 -0
  153. package/dist/client/assets/{registry-layout-D_xzQ7SH.js → registry-layout-CS2KKIp_.js} +1 -1
  154. package/dist/client/assets/{reports-DfigvYnl.js → reports-CPc8oCju.js} +1 -1
  155. package/dist/client/assets/{require-capability-BShwVM7q.js → require-capability-DUILy85y.js} +1 -1
  156. package/dist/client/assets/{required-auth-layout-D1lQLs9o.js → required-auth-layout-DzCrTphn.js} +1 -1
  157. package/dist/client/assets/{reset-password-DgKPQ9Q0.js → reset-password-HhC7ke8n.js} +1 -1
  158. package/dist/client/assets/roles-DetAta3A.js +1 -0
  159. package/dist/client/assets/{search-input-CMG5kT0r.js → search-input-CWNriSyB.js} +1 -1
  160. package/dist/client/assets/{secrets-DOD_JAS7.js → secrets-D6-sih5_.js} +1 -1
  161. package/dist/client/assets/sections-editor-DfUCGibT.js +2 -0
  162. package/dist/client/assets/{select-Dj6isKXJ.js → select-BNu0UqXJ.js} +1 -1
  163. package/dist/client/assets/{select-model-DTCkZwPH.js → select-model-Cf_p0TLX.js} +1 -1
  164. package/dist/client/assets/{self-tool-result-Dyt4J_bB.js → self-tool-result-CAEPfhr5.js} +1 -1
  165. package/dist/client/assets/{seo-editor-8eiSAnPG.js → seo-editor-DZuvVKMY.js} +1 -1
  166. package/dist/client/assets/{settings-layout-Cov48Axa.js → settings-layout-BAM6vRJ3.js} +1 -1
  167. package/dist/client/assets/{settings-section-DJ-LhHo0.js → settings-section-Bqwkr4KE.js} +1 -1
  168. package/dist/client/assets/{shell-controls-DqhiNxKe.js → shell-controls-vaP2981n.js} +1 -1
  169. package/dist/client/assets/{shell-layout-CRMkjcoU.js → shell-layout-DOlkGNlz.js} +1 -1
  170. package/dist/client/assets/{sidebar-5EbmaKfu.js → sidebar-BE5rbtRj.js} +1 -1
  171. package/dist/client/assets/{skeleton-CPE6o86c.js → skeleton-CVpUTj9M.js} +1 -1
  172. package/dist/client/assets/{sso-CGCZT8eB.js → sso-BZQVFXpT.js} +1 -1
  173. package/dist/client/assets/{store-CyblY7RP.js → store-C8rEYFtK.js} +1 -1
  174. package/dist/client/assets/store-registry-DJc1sPuW.js +2 -0
  175. package/dist/client/assets/{studio-tools-DyE5uoU2.js → studio-tools-CB0BsNyF.js} +1 -1
  176. package/dist/client/assets/{switch-BrBVeEiU.js → switch-CgliPAJw.js} +1 -1
  177. package/dist/client/assets/{table-BMvSP1FF.js → table-CWKekb51.js} +1 -1
  178. package/dist/client/assets/{tabs-DNTKvnYl.js → tabs-CuZTXp8u.js} +1 -1
  179. package/dist/client/assets/{textarea-DTuWp8dQ.js → textarea-BWA7VPpy.js} +1 -1
  180. package/dist/client/assets/{toggle-group-HR0MkXiQ.js → toggle-group-DOA3nzfo.js} +1 -1
  181. package/dist/client/assets/{toolbar-BoNyAuGH.js → toolbar-B-UUEyB8.js} +1 -1
  182. package/dist/client/assets/{toolbar-icon-button-BrVVEPAi.js → toolbar-icon-button-ZEdqZB84.js} +1 -1
  183. package/dist/client/assets/{tooltip-eTUejMvR.js → tooltip-3_lehhdo.js} +1 -1
  184. package/dist/client/assets/{use-ai-providers-DXcmm9Eo.js → use-ai-providers-Dx4DLoDP.js} +1 -1
  185. package/dist/client/assets/{use-api-keys-P_3VMNpU.js → use-api-keys-rQGzgECJ.js} +1 -1
  186. package/dist/client/assets/{use-automations-CyQ634sI.js → use-automations-BlgSr3l1.js} +1 -1
  187. package/dist/client/assets/{use-autosave-DFf6mjHW.js → use-autosave-DN3i3kNV.js} +1 -1
  188. package/dist/client/assets/{use-capability-DrqR3_St.js → use-capability-CNwJHk2z.js} +1 -1
  189. package/dist/client/assets/{use-clock-tick-D5Vy5Dow.js → use-clock-tick-jpmK11cv.js} +1 -1
  190. package/dist/client/assets/{use-connection-DQmaXrND.js → use-connection-BiY49XSx.js} +1 -1
  191. package/dist/client/assets/{use-copy-CILQcfx6.js → use-copy-BcdmJlLN.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-DmqPJKm7.js → use-create-virtual-mcp-CfhMpfVO.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-Cpb_4lIc.js → use-debounced-autosave-DGkouUV3.js} +1 -1
  194. package/dist/client/assets/{use-debounced-value-ypDUqPbN.js → use-debounced-value-BCj3lKWl.js} +1 -1
  195. package/dist/client/assets/{use-deco-credits-BkHvXdZJ.js → use-deco-credits-DGCZEoDr.js} +1 -1
  196. package/dist/client/assets/{use-decopilot-events-BzrOUotP.js → use-decopilot-events-DVGi0LdZ.js} +1 -1
  197. package/dist/client/assets/{use-delete-connection-CcNSb7GW.js → use-delete-connection-WbHVrZDS.js} +1 -1
  198. package/dist/client/assets/{use-deployment-admin-DdvgTrBf.js → use-deployment-admin-B4X4V8G-.js} +1 -1
  199. package/dist/client/assets/{use-file-configs-CxWcieBs.js → use-file-configs-CvbfKRwx.js} +1 -1
  200. package/dist/client/assets/{use-infinite-scroll-unU2jvvl.js → use-infinite-scroll-D-NPdfDw.js} +1 -1
  201. package/dist/client/assets/{use-join-requests-BFxl6FoG.js → use-join-requests-CVc1HBst.js} +1 -1
  202. package/dist/client/assets/{use-mcp-auth-status-CmPv2iz1.js → use-mcp-auth-status-B_jWlS2Z.js} +1 -1
  203. package/dist/client/assets/{use-mcp-client-D0JJUSC_.js → use-mcp-client-ef4ksNyA.js} +1 -1
  204. package/dist/client/assets/{use-mcp-tools-C4VVy_zP.js → use-mcp-tools-D8KT2fVf.js} +1 -1
  205. package/dist/client/assets/{use-members-Bo_LaHq3.js → use-members-0GKD4bJn.js} +1 -1
  206. package/dist/client/assets/{use-mobile-BBy2stTu.js → use-mobile-B5jZs1VP.js} +1 -1
  207. package/dist/client/assets/{use-navigate-to-agent-CVCBKtMO.js → use-navigate-to-agent-DLUfBudT.js} +1 -1
  208. package/dist/client/assets/{use-org-auth-client-BuQouTOU.js → use-org-auth-client-DgCAgruj.js} +1 -1
  209. package/dist/client/assets/{use-org-sso-DTdBxyH-.js → use-org-sso-Dp3twfT1.js} +1 -1
  210. package/dist/client/assets/{use-organization-roles-B1MPKRxw.js → use-organization-roles-CbTmmfbh.js} +1 -1
  211. package/dist/client/assets/{use-organization-settings-BpIk1GGk.js → use-organization-settings-RSUliLhn.js} +1 -1
  212. package/dist/client/assets/{use-registry-app-DNGwSCwE.js → use-registry-app-BVjdDftO.js} +1 -1
  213. package/dist/client/assets/{use-registry-connections-DvPR6a-P.js → use-registry-connections-DC7a1mBV.js} +1 -1
  214. package/dist/client/assets/{use-secrets-Dy18M2CK.js → use-secrets-B07BZaq3.js} +1 -1
  215. package/dist/client/assets/{use-status-sounds-CcXDiWAj.js → use-status-sounds-kuYb8Hy6.js} +1 -1
  216. package/dist/client/assets/{use-view-mode-BaFDl4Go.js → use-view-mode-BIDCBuEA.js} +1 -1
  217. package/dist/client/assets/{use-virtual-mcp-PPiLqJsk.js → use-virtual-mcp-4fMvIeYr.js} +1 -1
  218. package/dist/client/assets/useInfiniteQuery-C-Py1iBX.js +1 -0
  219. package/dist/client/assets/{useQueries-Coq8StiF.js → useQueries-DZEnrhzP.js} +1 -1
  220. package/dist/client/assets/{useRouterState-ByV3ZJe_.js → useRouterState-i4JOavHA.js} +1 -1
  221. package/dist/client/assets/useSuspenseInfiniteQuery-_UDJx_DH.js +1 -0
  222. package/dist/client/assets/{users-DpjAuRyW.js → users-BqYgoBC0.js} +1 -1
  223. package/dist/client/assets/{variant-calendar-C9xzKBq4.js → variant-calendar-DlFvCzAU.js} +1 -1
  224. package/dist/client/assets/{view-mode-toggle-DtsG85-8.js → view-mode-toggle-D1vG0072.js} +1 -1
  225. package/dist/client/index.html +2 -2
  226. package/dist/server/cli.js +644 -640
  227. package/dist/server/migrate.js +106 -102
  228. package/dist/server/server.js +455 -455
  229. package/package.json +1 -1
  230. package/dist/client/assets/add-section-modal-BfT4ro60.js +0 -1
  231. package/dist/client/assets/category-editor-C_5gsuSF.js +0 -1
  232. package/dist/client/assets/dropdown-menu-Cga-_vD5.js +0 -1
  233. package/dist/client/assets/file-explorer-CXzu3lsX.js +0 -2
  234. package/dist/client/assets/index-BtlIRb9g.js +0 -1
  235. package/dist/client/assets/index-DUF5arcS.css +0 -1
  236. package/dist/client/assets/page-seo-sheet-C2Y0yi73.js +0 -1
  237. package/dist/client/assets/project-app-view-CNS5CIa_.js +0 -1
  238. package/dist/client/assets/record-editor-3BeUaMBD.js +0 -1
  239. package/dist/client/assets/registry-DAY9NKnP.js +0 -2
  240. package/dist/client/assets/roles-Bz0K8eHy.js +0 -1
  241. package/dist/client/assets/sections-editor-DW7FtQIr.js +0 -2
  242. package/dist/client/assets/store-registry-BQX4ge-T.js +0 -2
  243. package/dist/client/assets/useInfiniteQuery-CXTRQ-Dk.js +0 -1
  244. package/dist/client/assets/useSuspenseInfiniteQuery-CZk_wXzA.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.123.9",
3
+ "version": "4.125.0",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as F,b as K,r as g,j as r,m as Q}from"./index-fi0f1C_U.js";import{$ as W}from"./agent-icon-CaI0GdpH.js";import{i as Y}from"./SearchMd-w82MFsfG.js";import{e as Z,d as ee,b as te,a as re}from"./dialog-C9LdhEJ8.js";import{I as se}from"./input-CB7a8Fqy.js";import{p as le,b as oe,q as ie,t as X,G as ne}from"./index-CWYTgJsi.js";const ce=12,q=new Set,_=new Set;function ae(){for(const i of _)i()}function fe(i){return q.has(i)?!0:q.size>=ce?!1:(q.add(i),!0)}function J(i){q.delete(i)&&ae()}function ue(i){return _.add(i),()=>{_.delete(i)}}function de(i,e){const t=g.useRef(!1),[v,a]=g.useState(!1),n=g.useRef(null),f=g.useRef(null),o=g.useRef(null),s=g.useRef(i);s.current=i;const[c]=g.useState(()=>{const l=()=>{o.current?.(),o.current=null},u=()=>t.current?!0:fe(e)?(t.current=!0,a(!0),l(),!0):!1;return m=>{if(f.current=m,n.current&&(n.current.disconnect(),n.current=null),l(),!m){t.current&&(J(e),t.current=!1,a(!1));return}queueMicrotask(()=>{if(f.current!==m)return;const x=new IntersectionObserver(d=>{if(d[0]?.isIntersecting??!1){!u()&&!o.current&&(o.current=ue(()=>{f.current===m&&u()}));return}l(),t.current&&(J(e),t.current=!1,a(!1))},{root:s.current.current,rootMargin:"160px 0px"});x.observe(m),n.current=x})}});return{ref:c,iframeActive:v}}function me(i){const e=F.c(8),{previewUrl:t,title:v,scrollRootRef:a,slotId:n}=i,{ref:f,iframeActive:o}=de(a,n),[s,c]=g.useState(!1);let l;e[0]!==o||e[1]!==s||e[2]!==t||e[3]!==v?(l=o?r.jsxs(r.Fragment,{children:[!s&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(W,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${v}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>c(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(W,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=o,e[1]=s,e[2]=t,e[3]=v,e[4]=l):l=e[4];let u;return e[5]!==f||e[6]!==l?(u=r.jsx("div",{ref:f,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:l}),e[5]=f,e[6]=l,e[7]=u):u=e[7],u}function pe(i){const e=F.c(26),{entry:t,previewUrl:v,scrollRootRef:a,onSelect:n}=i,f=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let o;e[0]!==f?(o=Q("group flex flex-col overflow-hidden rounded-lg border bg-card text-left transition-colors","hover:border-primary/40 hover:bg-accent/30",f),e[0]=f,e[1]=o):o=e[1];let s;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==v||e[5]!==a?(s=r.jsx(me,{previewUrl:v,title:t.title,scrollRootRef:a,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=v,e[5]=a,e[6]=s):s=e[6];let c;e[7]!==t.isSavedBlock?(c=t.isSavedBlock?{color:ne}:void 0,e[7]=t.isSavedBlock,e[8]=c):c=e[8];let l;e[9]!==c?(l=r.jsx(W,{className:"h-4 w-4 shrink-0",style:c}),e[9]=c,e[10]=l):l=e[10];let u;e[11]!==t.title?(u=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[11]=t.title,e[12]=u):u=e[12];let m;e[13]!==t.description?(m=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[13]=t.description,e[14]=m):m=e[14];let x;e[15]!==u||e[16]!==m?(x=r.jsxs("div",{className:"min-w-0 flex-1",children:[u,m]}),e[15]=u,e[16]=m,e[17]=x):x=e[17];let d;e[18]!==l||e[19]!==x?(d=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[l,x]}),e[18]=l,e[19]=x,e[20]=d):d=e[20];let h;return e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==d?(h=r.jsxs("button",{type:"button",onClick:n,className:o,children:[s,d]}),e[21]=n,e[22]=o,e[23]=s,e[24]=d,e[25]=h):h=e[25],h}function be(i){const e=F.c(51),{open:t,onOpenChange:v,meta:a,decofile:n,previewBaseUrl:f,onSelect:o}=i,s=K(),[c,l]=g.useState(""),[u,m]=g.useState(t),x=g.useRef(null);t!==u&&(m(t),t&&l(""));let d,h,S,b,j,N,y,R,w,C,T;if(e[0]!==n||e[1]!==a||e[2]!==v||e[3]!==o||e[4]!==t||e[5]!==f||e[6]!==c||e[7]!==s){const z=t&&a&&n?le(a,n):[],D=a?oe(a):"",G=n?ie(n):void 0,H=new Map;if(t&&D)for(const p of z)H.set(p.resolveType,X(f,D,p.previewBlock,G));const M=c.trim().toLowerCase(),V=M?z.filter(p=>p.title.toLowerCase().includes(M)||p.resolveType.toLowerCase().includes(M)||p.description?.toLowerCase().includes(M)):z;h=Z,C=t,T=v,d=ee,y="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let A;e[19]!==s?(A=s("sectionsEditor.addSectionModal.title"),e[19]=s,e[20]=A):A=e[20];let E;e[21]!==A?(E=r.jsx(te,{children:A}),e[21]=A,e[22]=E):E=e[22];let U;e[23]===Symbol.for("react.memo_cache_sentinel")?(U=r.jsx(Y,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=U):U=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=p=>l(p.target.value),e[24]=$):$=e[24];let O;e[25]!==s?(O=s("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=s,e[26]=O):O=e[26];let k;e[27]!==c||e[28]!==O?(k=r.jsxs("div",{className:"relative pt-2",children:[U,r.jsx(se,{value:c,onChange:$,placeholder:O,className:"h-9 pl-8"})]}),e[27]=c,e[28]=O,e[29]=k):k=e[29],e[30]!==E||e[31]!==k?(w=r.jsxs(re,{className:"shrink-0 border-b px-4 py-3 text-left",children:[E,k]}),e[30]=E,e[31]=k,e[32]=w):w=e[32],j=x,N="min-h-0 flex-1 overflow-y-auto",S="p-4",b=V.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:s("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V.map(p=>r.jsx(pe,{entry:p,scrollRootRef:x,previewUrl:H.get(p.resolveType)??X(f,D,p.previewBlock,G),onSelect:()=>o(p)},p.resolveType))}),e[0]=n,e[1]=a,e[2]=v,e[3]=o,e[4]=t,e[5]=f,e[6]=c,e[7]=s,e[8]=d,e[9]=h,e[10]=S,e[11]=b,e[12]=j,e[13]=N,e[14]=y,e[15]=R,e[16]=w,e[17]=C,e[18]=T}else d=e[8],h=e[9],S=e[10],b=e[11],j=e[12],N=e[13],y=e[14],R=e[15],w=e[16],C=e[17],T=e[18];let I;e[33]!==S||e[34]!==b?(I=r.jsx("div",{className:S,children:b}),e[33]=S,e[34]=b,e[35]=I):I=e[35];let L;e[36]!==I||e[37]!==j||e[38]!==N?(L=r.jsx("div",{ref:j,className:N,children:I}),e[36]=I,e[37]=j,e[38]=N,e[39]=L):L=e[39];let P;e[40]!==d||e[41]!==L||e[42]!==y||e[43]!==R||e[44]!==w?(P=r.jsxs(d,{closeButtonClassName:y,className:R,children:[w,L]}),e[40]=d,e[41]=L,e[42]=y,e[43]=R,e[44]=w,e[45]=P):P=e[45];let B;return e[46]!==h||e[47]!==P||e[48]!==C||e[49]!==T?(B=r.jsx(h,{open:C,onOpenChange:T,children:P}),e[46]=h,e[47]=P,e[48]=C,e[49]=T,e[50]=B):B=e[50],B}export{be as A};
@@ -1 +0,0 @@
1
- import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-fi0f1C_U.js";import{i as Z}from"./ArrowRight-W78pWgya.js";import{b as U}from"./ZoomOut-QXkH5zvj.js";import{n as _}from"./LinkExternal01-BIeTlaI1.js";import{aP as K}from"./agent-icon-CaI0GdpH.js";import{A as tt,a as ot,b as et,c as rt,d as it,e as st,f as at,g as nt}from"./alert-dialog-BIM3ZQ61.js";import{I as W}from"./input-CB7a8Fqy.js";import{L as q}from"./label-B6kQLTZ2.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-CWYTgJsi.js";import{c as ft,B as ht,a as yt}from"./block-document-C8YGje15.js";import{u as bt}from"./use-autosave-DFf6mjHW.js";import{t as jt}from"./ChevronDown-CXe6JgOB.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-vYAByajM.js";import{s as b,E as Nt}from"./primitives-Cgj0Xdzj.js";import"./AlertCircle-nsAOhmc5.js";import"./Tool01-Bxryucq9.js";import"./ArrowUp-D_vtmz11.js";import"./Settings02-DBXlrfF_.js";import"./Tool02-DXkhQkf7.js";import"./ArrowUpRight-CE7N_ssY.js";import"./TrendUp01-lmorDXaS.js";import"./ZapSquare-Bp70BKvB.js";import"./Users03-DDFwhuFu.js";import"./CheckCircle-vxKWSGjq.js";import"./Check-CbFEdDFo.js";import"./ChevronRight-5eA6ROzl.js";import"./ChevronUp-ClePnk1p.js";import"./DotsVertical-DF3Be14k.js";import"./Stars02-B2okzw6k.js";import"./Copy01-D_I4zLJq.js";import"./Globe01-K7604lAF.js";import"./Eye-CCFNdeEl.js";import"./FilterLines-CV0dxqQH.js";import"./Star01-Bf8yuwps.js";import"./Globe04-SqHL90_b.js";import"./SwitchHorizontal01-BVz6HjlA.js";import"./HardDrive-D5BssK7-.js";import"./Image01-sKA_S9si.js";import"./Key01-HnuEM_kB.js";import"./LayoutLeft-B8qL2spL.js";import"./XCircle-BTCzfXYC.js";import"./LogOut01-Dzrbv7eq.js";import"./Monitor01-ahykGWr6.js";import"./Sun-eT24COyo.js";import"./Package-DMX0KLYy.js";import"./Palette-9lXole3j.js";import"./Play-anRYH6K1.js";import"./Plus-DS3KKDHn.js";import"./SearchLg-z8IAxAgb.js";import"./SearchMd-w82MFsfG.js";import"./Shield01-4mocQmSI.js";import"./Stars01-ByFhj5mQ.js";import"./Trash01-JNWsD9zI.js";import"./Upload01-iZa_BxIK.js";import"./User01-BVJUnJoI.js";import"./Users01-ClFkkNN7.js";import"./XClose-BAe5iaCX.js";import"./X-CUF99Lsu.js";import"./Zap-DZcAzV7c.js";import"./chat-context-DrudQqbN.js";import"./autosend-Cu5ph7K1.js";import"./hooks-DppbqdpU.js";import"./use-mcp-client-D0JJUSC_.js";import"./auth-uY-yd_Qx.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DScO8nLg.js";import"./studio-tools-DyE5uoU2.js";import"./use-virtual-mcp-PPiLqJsk.js";import"./use-ai-providers-DXcmm9Eo.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-BzrOUotP.js";import"./use-organization-settings-BpIk1GGk.js";import"./tooltip-eTUejMvR.js";import"./dialog-C9LdhEJ8.js";import"./drawer-iJbxlBHN.js";import"./collection-search-BKwi5gox.js";import"./use-mobile-BBy2stTu.js";import"./AreaChart-COvvWTHK.js";import"./index-Bq-qtjfv.js";import"./calendar-CaYhlf3J.js";import"./shell-layout-CRMkjcoU.js";import"./avatar-Bipd5UEy.js";import"./required-auth-layout-D1lQLs9o.js";import"./use-org-sso-DTdBxyH-.js";import"./index-rt1Yq-xm.js";import"./get-initials-D-f_fDFw.js";import"./popover-KcB6zphY.js";import"./use-registry-app-DNGwSCwE.js";import"./use-mcp-tools-C4VVy_zP.js";import"./use-connection-DQmaXrND.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CHKgbLri.js";import"./mcp-oauth-BdVW-uBg.js";import"./extract-connection-data-bvDVBCCK.js";import"./metadata-dUsYcpuu.js";import"./use-members-Bo_LaHq3.js";import"./use-org-auth-client-BuQouTOU.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-Cga-_vD5.js";import"./use-copy-CILQcfx6.js";import"./command-CzcPmc98.js";import"./index-CggwapSx.js";import"./companions-core-CEPgmi_H.js";import"./form-ujVNSHLD.js";import"./select-Dj6isKXJ.js";import"./tabs-DNTKvnYl.js";import"./toggle-group-HR0MkXiQ.js";import"./use-deco-credits-BkHvXdZJ.js";import"./sidebar-5EbmaKfu.js";import"./toolbar-icon-button-BrVVEPAi.js";import"./skeleton-CPE6o86c.js";import"./github-repo-picker-CjqIThyB.js";import"./use-debounced-value-ypDUqPbN.js";import"./use-navigate-to-agent-CVCBKtMO.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-COtpZU4g.js";import"./use-registry-connections-DvPR6a-P.js";import"./useInfiniteQuery-CXTRQ-Dk.js";import"./use-infinite-scroll-unU2jvvl.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Cz1w-KeT.js";import"./integration-icon-CDDsl6LV.js";import"./textarea-DTuWp8dQ.js";import"./connection-form-helpers-CS6sBlKC.js";import"./collection-tabs-C2hvedKX.js";import"./badge-C3f1raKX.js";import"./useSuspenseInfiniteQuery-CZk_wXzA.js";import"./connect-desktop-dialog-CTgRGfG0.js";import"./select-model-DTCkZwPH.js";import"./checkbox-HZxDl7MX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DJ-LhHo0.js";import"./index-rMEa2YJG.js";import"./file-type-icon-BFz-fAWJ.js";import"./toolbar-BoNyAuGH.js";import"./index-BRynC73_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CcXDiWAj.js";import"./empty-state-Cm4v9nCd.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DrqR3_St.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-CmPv2iz1.js";import"./use-debounced-autosave-Cpb_4lIc.js";import"./index-B4pWthKK.js";import"./search-input-CMG5kT0r.js";import"./switch-BrBVeEiU.js";import"./use-secrets-Dy18M2CK.js";import"./useQueries-Coq8StiF.js";import"./monaco-editor-BAb_NIlJ.js";import"./use-file-configs-CxWcieBs.js";import"./use-automations-CyQ634sI.js";import"./automation-list-row-BgIWcdHf.js";import"./table-BMvSP1FF.js";import"./use-clock-tick-D5Vy5Dow.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function Sr({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:R,payload:O}of gt(u,"posts")){const L=ut(O,e,{name:J,slug:S});L!==O&&(await a.mutateAsync({blockKey:R,data:B(R,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Sr as CategoryEditor};
@@ -1 +0,0 @@
1
- import{c,j as i,dz as f,dA as m,m as u,dB as g,dC as x,dD as v,dE as b,dF as h,dG as w,dH as j,dI as N,dJ as z,dK as _,dL as y,dM as p}from"./index-fi0f1C_U.js";import{i as D}from"./Check-CbFEdDFo.js";import{i as $}from"./ChevronRight-5eA6ROzl.js";import{i as M}from"./DotsVertical-DF3Be14k.js";function R(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function G(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function L(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(D,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function O(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function A(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function B(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function F(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function H(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function J(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx($,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function K(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,G as a,E as b,R as c,H as d,J as e,K as f,O as g,A as h,F as i,B as j,L as k};
@@ -1,2 +0,0 @@
1
- import{c as se,b as Me,r as u,j as r,k as fe,B as De,dZ as Jt,ax as Zt,aD as xe,d_ as en,d$ as tn,e0 as nn,e1 as rn,bG as on,e2 as sn,e3 as lt,az as an,e4 as ln,e5 as cn,e6 as dn,e7 as un,e8 as fn,e9 as pn,ea as mn,eb as xn,ec as hn,m as le,o as gn,t as ne,K as Ze}from"./index-fi0f1C_U.js";import{F as bn,l as yn}from"./index-BRynC73_.js";import{g as vn,aN as Cn,aO as wn}from"./agent-icon-CaI0GdpH.js";import{s as Nn}from"./XClose-BAe5iaCX.js";import{m as jn}from"./automation-runs-vYAByajM.js";import{c as et,T as tt,a as nt}from"./tooltip-eTUejMvR.js";import{b as En}from"./chat-context-DrudQqbN.js";import{u as Sn}from"./shell-layout-CRMkjcoU.js";import{s as we,a as rt,f as Dn}from"./index-CWYTgJsi.js";import{b as Mn,h as Rn,a as Tn,c as Pn,d as Fn,e as kn}from"./dialog-C9LdhEJ8.js";import{I as ot}from"./input-CB7a8Fqy.js";import{c as An,d as On,b as Ln,f as In,g as $n,e as Kn,a as zn,A as _n}from"./alert-dialog-BIM3ZQ61.js";import{t as Gn}from"./ChevronDown-CXe6JgOB.js";import{i as Bn}from"./ChevronRight-5eA6ROzl.js";import{a as Vn}from"./ZoomOut-QXkH5zvj.js";import{w as Un,E as Hn,x as Ae,y as Wn,z as qn,A as Qn,C as Xn,D as re,G as Ne,I as Oe,J as je,g as Le,K as Ie,M as Yn,s as Jn,N as Zn,O as $e,P as Ee,Q as Ke,U as er,V as tr,W as nr,X as rr}from"./index-rMEa2YJG.js";import"./AlertCircle-nsAOhmc5.js";import"./Tool01-Bxryucq9.js";import"./ArrowUp-D_vtmz11.js";import"./Settings02-DBXlrfF_.js";import"./Tool02-DXkhQkf7.js";import"./ArrowRight-W78pWgya.js";import"./ArrowUpRight-CE7N_ssY.js";import"./TrendUp01-lmorDXaS.js";import"./ZapSquare-Bp70BKvB.js";import"./Users03-DDFwhuFu.js";import"./CheckCircle-vxKWSGjq.js";import"./Check-CbFEdDFo.js";import"./ChevronUp-ClePnk1p.js";import"./DotsVertical-DF3Be14k.js";import"./Stars02-B2okzw6k.js";import"./Copy01-D_I4zLJq.js";import"./Globe01-K7604lAF.js";import"./Eye-CCFNdeEl.js";import"./FilterLines-CV0dxqQH.js";import"./Star01-Bf8yuwps.js";import"./Globe04-SqHL90_b.js";import"./SwitchHorizontal01-BVz6HjlA.js";import"./HardDrive-D5BssK7-.js";import"./Image01-sKA_S9si.js";import"./Key01-HnuEM_kB.js";import"./LayoutLeft-B8qL2spL.js";import"./XCircle-BTCzfXYC.js";import"./LinkExternal01-BIeTlaI1.js";import"./LogOut01-Dzrbv7eq.js";import"./Monitor01-ahykGWr6.js";import"./Sun-eT24COyo.js";import"./Package-DMX0KLYy.js";import"./Palette-9lXole3j.js";import"./Play-anRYH6K1.js";import"./Plus-DS3KKDHn.js";import"./SearchLg-z8IAxAgb.js";import"./SearchMd-w82MFsfG.js";import"./Shield01-4mocQmSI.js";import"./Stars01-ByFhj5mQ.js";import"./Trash01-JNWsD9zI.js";import"./Upload01-iZa_BxIK.js";import"./User01-BVJUnJoI.js";import"./Users01-ClFkkNN7.js";import"./X-CUF99Lsu.js";import"./Zap-DZcAzV7c.js";import"./select-Dj6isKXJ.js";import"./useInfiniteQuery-CXTRQ-Dk.js";import"./use-infinite-scroll-unU2jvvl.js";import"./use-connection-DQmaXrND.js";import"./use-mcp-client-D0JJUSC_.js";import"./auth-uY-yd_Qx.js";import"./use-virtual-mcp-PPiLqJsk.js";import"./card-Cz1w-KeT.js";import"./sidebar-5EbmaKfu.js";import"./use-mobile-BBy2stTu.js";import"./table-BMvSP1FF.js";import"./empty-state-Cm4v9nCd.js";import"./use-members-Bo_LaHq3.js";import"./use-org-auth-client-BuQouTOU.js";import"./use-clock-tick-D5Vy5Dow.js";import"./use-automations-CyQ634sI.js";import"./studio-tools-DyE5uoU2.js";import"./useSuspenseInfiniteQuery-CZk_wXzA.js";import"./avatar-Bipd5UEy.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CILQcfx6.js";import"./file-type-icon-BFz-fAWJ.js";import"./tab-id-BijBBRwE.js";import"./hooks-DppbqdpU.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-DScO8nLg.js";import"./monaco-editor-BAb_NIlJ.js";import"./index-Bq-qtjfv.js";import"./calendar-CaYhlf3J.js";import"./integration-icon-CDDsl6LV.js";import"./use-navigate-to-agent-CVCBKtMO.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-COvvWTHK.js";import"./form-ujVNSHLD.js";import"./label-B6kQLTZ2.js";import"./autosend-Cu5ph7K1.js";import"./use-ai-providers-DXcmm9Eo.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BzrOUotP.js";import"./use-organization-settings-BpIk1GGk.js";import"./required-auth-layout-D1lQLs9o.js";import"./use-org-sso-DTdBxyH-.js";import"./drawer-iJbxlBHN.js";import"./collection-search-BKwi5gox.js";import"./index-rt1Yq-xm.js";import"./get-initials-D-f_fDFw.js";import"./popover-KcB6zphY.js";import"./use-registry-app-DNGwSCwE.js";import"./use-mcp-tools-C4VVy_zP.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CHKgbLri.js";import"./mcp-oauth-BdVW-uBg.js";import"./extract-connection-data-bvDVBCCK.js";import"./metadata-dUsYcpuu.js";import"./dropdown-menu-Cga-_vD5.js";import"./command-CzcPmc98.js";import"./index-CggwapSx.js";import"./companions-core-CEPgmi_H.js";import"./tabs-DNTKvnYl.js";import"./toggle-group-HR0MkXiQ.js";import"./use-deco-credits-BkHvXdZJ.js";import"./toolbar-icon-button-BrVVEPAi.js";import"./skeleton-CPE6o86c.js";import"./github-repo-picker-CjqIThyB.js";import"./use-debounced-value-ypDUqPbN.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-COtpZU4g.js";import"./use-registry-connections-DvPR6a-P.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DTuWp8dQ.js";import"./connection-form-helpers-CS6sBlKC.js";import"./collection-tabs-C2hvedKX.js";import"./badge-C3f1raKX.js";import"./connect-desktop-dialog-CTgRGfG0.js";import"./select-model-DTCkZwPH.js";import"./checkbox-HZxDl7MX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-DJ-LhHo0.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CcXDiWAj.js";import"./toolbar-BoNyAuGH.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-DrqR3_St.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-CmPv2iz1.js";import"./use-debounced-autosave-Cpb_4lIc.js";import"./index-B4pWthKK.js";import"./search-input-CMG5kT0r.js";import"./switch-BrBVeEiU.js";import"./use-secrets-Dy18M2CK.js";import"./useQueries-Coq8StiF.js";import"./use-file-configs-CxWcieBs.js";import"./automation-list-row-BgIWcdHf.js";const or={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function sr(a){const e=se.c(71),{open:s,mode:i,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:v}=a,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,F]=u.useState(j),[Z,W]=u.useState(s),y=or[i];s!==Z&&(W(s),s&&F(j));let b;e[0]!==d||e[1]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const k=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(Mn,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Rn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Tn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>F(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let $;e[38]!==R||e[39]!==G?($=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=$):$=e[40];let q;e[41]!==v?(q=()=>v(!1),e[41]=v,e[42]=q):q=e[42];let K;e[43]!==x?(K=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=K):K=e[44];let z;e[45]!==d||e[46]!==q||e[47]!==K?(z=r.jsx(De,{type:"button",variant:"outline",onClick:q,disabled:d,children:K}),e[45]=d,e[46]=q,e[47]=K,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let O;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(O=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=O):O=e[55];let V;e[56]!==B||e[57]!==O?(V=r.jsx(De,{type:"submit",disabled:B,children:O}),e[56]=B,e[57]=O,e[58]=V):V=e[58];let L;e[59]!==z||e[60]!==V?(L=r.jsxs(Pn,{children:[z,V]}),e[59]=z,e[60]=V,e[61]=L):L=e[61];let U;e[62]!==I||e[63]!==$||e[64]!==L||e[65]!==N?(U=r.jsx(Fn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,$,L]})}),e[62]=I,e[63]=$,e[64]=L,e[65]=N,e[66]=U):U=e[66];let ee;return e[67]!==k||e[68]!==s||e[69]!==U?(ee=r.jsx(kn,{open:s,onOpenChange:k,children:U}),e[67]=k,e[68]=s,e[69]=U,e[70]=ee):ee=e[70],ee}function ir(a){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:i,fsActionPending:l,onOpenChange:m,onConfirm:h}=a,f=Me(),v=s?.kind==="directory",j=s!==null,d=v?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(An,{children:x}),e[3]=x,e[4]=g):g=e[4];let F;e[5]!==f?(F=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=F):F=e[6];const Z=s?.name;let W;e[7]!==Z?(W=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=W):W=e[8];let y;e[9]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==i.length||e[13]!==f?(b=i.length>0&&r.jsxs(r.Fragment,{children:[" ",i.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:i.length})]}),e[12]=i.length,e[13]=f,e[14]=b):b=e[14];let k;e[15]!==F||e[16]!==W||e[17]!==y||e[18]!==b?(k=r.jsxs(On,{children:[F," ",W,y,b]}),e[15]=F,e[16]=W,e[17]=y,e[18]=b,e[19]=k):k=e[19];let A;e[20]!==k||e[21]!==g?(A=r.jsxs(Ln,{children:[g,k]}),e[20]=k,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(In,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx($n,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Kn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(zn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(_n,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ar]=an(ze,[lt]),J=lt(),[lr,ct]=ar(ze),dt=a=>{const{__scopeContextMenu:e,children:s,onOpenChange:i,dir:l,modal:m=!0}=a,[h,f]=u.useState(!1),v=J(e),j=on(i),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(lr,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...v,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,disabled:i=!1,...l}=a,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{i&&d()},[i,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:v}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":i?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...a.style},onContextMenu:i?a.onContextMenu:xe(a.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:i?a.onPointerDown:xe(a.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:i?a.onPointerMove:xe(a.onPointerMove,Se(d)),onPointerCancel:i?a.onPointerCancel:xe(a.onPointerCancel,Se(d)),onPointerUp:i?a.onPointerUp:xe(a.onPointerUp,Se(d))})]})});ft.displayName=ut;var cr="ContextMenuPortal",pt=a=>{const{__scopeContextMenu:e,...s}=a,i=J(e);return r.jsx(nn,{...i,...s})};pt.displayName=cr;var mt="ContextMenuContent",xt=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...i,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{a.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{a.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var dr="ContextMenuGroup",ur=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(ln,{...l,...i,ref:e})});ur.displayName=dr;var fr="ContextMenuLabel",pr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(cn,{...l,...i,ref:e})});pr.displayName=fr;var mr="ContextMenuItem",ht=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(en,{...l,...i,ref:e})});ht.displayName=mr;var xr="ContextMenuCheckboxItem",hr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(dn,{...l,...i,ref:e})});hr.displayName=xr;var gr="ContextMenuRadioGroup",br=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(un,{...l,...i,ref:e})});br.displayName=gr;var yr="ContextMenuRadioItem",vr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(fn,{...l,...i,ref:e})});vr.displayName=yr;var Cr="ContextMenuItemIndicator",wr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(pn,{...l,...i,ref:e})});wr.displayName=Cr;var Nr="ContextMenuSeparator",gt=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(tn,{...l,...i,ref:e})});gt.displayName=Nr;var jr="ContextMenuArrow",Er=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(mn,{...l,...i,ref:e})});Er.displayName=jr;var Sr="ContextMenuSubTrigger",Dr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(xn,{...l,...i,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubContent",Rr=u.forwardRef((a,e)=>{const{__scopeContextMenu:s,...i}=a,l=J(s);return r.jsx(hn,{...l,...i,ref:e,style:{...a.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rr.displayName=Mr;function Se(a){return e=>e.pointerType!=="mouse"?a(e):void 0}var Tr=dt,Pr=ft,Fr=pt,kr=xt,Ar=ht,Or=gt;function Lr(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Tr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=i):i=e[3],i}function Ir(a){const e=se.c(4);let s;e[0]!==a?({...s}=a,e[0]=a,e[1]=s):s=e[1];let i;return e[2]!==s?(i=r.jsx(Pr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=i):i=e[3],i}function $r(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Fr,{children:r.jsx(kr,{"data-slot":"context-menu-content",className:l,...i})}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}function ue(a){const e=se.c(12);let s,i,l,m;e[0]!==a?({className:s,inset:i,variant:m,...l}=a,e[0]=a,e[1]=s,e[2]=i,e[3]=l,e[4]=m):(s=e[1],i=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let v;return e[7]!==i||e[8]!==l||e[9]!==f||e[10]!==h?(v=r.jsx(Ar,{"data-slot":"context-menu-item","data-inset":i,"data-variant":h,className:f,...l}),e[7]=i,e[8]=l,e[9]=f,e[10]=h,e[11]=v):v=e[11],v}function st(a){const e=se.c(8);let s,i;e[0]!==a?({className:s,...i}=a,e[0]=a,e[1]=s,e[2]=i):(s=e[1],i=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==i||e[6]!==l?(m=r.jsx(Or,{"data-slot":"context-menu-separator",className:l,...i}),e[5]=i,e[6]=l,e[7]=m):m=e[7],m}const Kr="#d9a441";function zr(a){const e=se.c(63),{node:s,depth:i,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:v,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:F,onRename:Z,onDelete:W}=a,y=h===void 0?!1:h,b=Me(),k=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${i*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==k||e[10]!==l||e[11]!==y?(R=k?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Bn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Vn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=k,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(st,{}),e[31]=$):$=e[31];let q;e[32]!==b?(q=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=q):q=e[33];let K;e[34]!==g||e[35]!==q?(K=r.jsx(ue,{onSelect:g,children:q}),e[34]=g,e[35]=q,e[36]=K):K=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==F||e[40]!==z?(B=r.jsx(ue,{onSelect:F,children:z}),e[39]=F,e[40]=z,e[41]=B):B=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(st,{}),e[42]=O):O=e[42];let V;e[43]!==b?(V=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=V):V=e[44];let L;e[45]!==Z||e[46]!==V?(L=r.jsx(ue,{onSelect:Z,children:V}),e[45]=Z,e[46]=V,e[47]=L):L=e[47];let U;e[48]!==b?(U=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=U):U=e[49];let ee;e[50]!==W||e[51]!==U?(ee=r.jsx(ue,{variant:"destructive",onSelect:W,children:U}),e[50]=W,e[51]=U,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==K||e[56]!==B||e[57]!==L||e[58]!==ee?(_=r.jsxs($r,{className:"w-52",children:[X,G,$,K,B,O,L,ee]}),e[53]=X,e[54]=G,e[55]=K,e[56]=B,e[57]=L,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Lr,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}yn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const it=200,_r=2,Gr=250,at=200;function Br(a,e,s,i){return`/api/${a}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${i}`}function Vr(a){const e=se.c(9),{text:s,query:i}=a;let l,m,h;if(e[0]!==i||e[1]!==s){const{leadingEllipsis:v,segments:j}=Yn(s,i);l="truncate font-mono text-muted-foreground",m=v&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Ur),e[0]=i,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Ur(a,e){return a.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:a.text},e):r.jsx("span",{children:a.text},e)}function Gi({orgSlug:a,virtualMcpId:e,branch:s,openPath:i}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[v,j]=u.useState(new Set),[d,x]=u.useState(null),[g,F]=u.useState(null),[Z,W]=u.useState([]),[y,b]=u.useState(""),[k,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),$=u.useRef(0),q=u.useRef(null),K=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),O=u.useRef(0),V=u.useRef(null),L=u.useRef(null),U=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ie,he]=u.useState(null),{sendMessage:bt}=En(),{openSidePanel:yt}=Sn(),ge=gn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ae(t,n){const o=await fetch(Br(a,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(a,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=nr(t);if(!n)return;const o=`${a}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(a,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){W(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const C=t(c);C&&o.set(C,p)}return o}),F(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);F(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ae("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Ie(o))C.add(ce);return C.add(o),C}),F({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=je(o),p=Ee(c,n);if(p===o){oe(null);return}if(Ke(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("rename",{from:re(o),to:re(p)}),Ge(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ae("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Zn(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,q.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(i&&i!==Rt){Tt(i);const t=i;queueMicrotask(()=>{Un(t)&&me(t)})}async function Fe(t){const n=await ae("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==$.current)return!1;let c=!1;return m(p=>{const C=n?rr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=$.current,c=(async()=>{const p=await Fe({pattern:"**/*",path:re(t),limit:Ae}),C=Ve(p,!0,o);return!C&&o===$.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ue(t){if(!$e(t,K.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function Ft(t,n){const o=new Set(K.current);for(const c of Ie(n)){if(!$e(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++$.current;V.current=null,L.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await Fe({pattern:"**/*",limit:Ae,maxDepth:Hn});Ve(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ae("read",{path:re(t),full:!0}),c=Jn(o.content??"");te(p=>{const C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}catch{}}}function kt(){O.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=$.current,n=V.current;if(n&&n.generation===t)return n.files;const o=L.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Fe({pattern:"**/*",limit:Ae});return $.current===t&&(V.current={generation:t,files:p.files}),p.files})();L.current={generation:t,promise:c};try{return await c}finally{L.current?.generation===t&&(L.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==O.current)return;A(er(o,t,at))}catch{if(n!==O.current)return;A([])}}async function Lt(t,n){D(!0);try{const o=await ae("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:it});if(n!==O.current)return;S(tr(o.results??"")),N((o.matchCount??0)>=it)}catch{if(n!==O.current)return;S([]),N(!1)}finally{n===O.current&&D(!1)}}function It(t){const n=t.trim(),o=++O.current;Ot(n,o),n.length<_r?(S(null),D(!1),N(!1)):Lt(n,o)}function $t(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){kt();return}B.current=setTimeout(()=>{It(t)},Gr)}function We(t){const n=U.current;if(!n||n.path!==d)return;U.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Kt(t){U.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&We(Re.current)}async function zt(t,n){try{await ae("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(a,e,s)});try{const o=await Dn(a,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),F({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||W(n=>[...n,t]),He(t)}function Gt(t){W(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if($e(t,K.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function Ut(t){await q.current,await Ft(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Ut(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Wt=Wn(h,f),Xe=qn(Wt,v),ke=k?.length??0,Ye=Qn(I??[]),Je=I?.length??0,de=d?_.get(d):null,qt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Te?wt(Te.path):[],Xt=(t,n)=>{Re.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ie)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ie.filePath}\``,`**Lines:** ${ie.lineStart}–${ie.lineEnd}`];if(ie.selectedCode){const o=Le(ie.filePath),c=ie.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
2
- `)}]}),he(null)}return R&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=v.has(n.path),C=g?.path===n.path,ce=Xn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx(zr,{node:n,depth:o,isExpanded:p,isSelected:C,isLoading:Ce,fileVisual:Oe(n.name),onSelect:()=>F(n),onOpen:()=>{c?Vt(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Pe(n)},n.path)}),!y&&T&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),ke>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[ke,ke>=at?"+":""]})]}),k!==null&&k.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),k?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:p}=Oe(n),C=d===t;return r.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",C&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),P&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!P&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Oe(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>Kt(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Vr,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:C=>{C.stopPropagation(),Gt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ie&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Yt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(bn,{language:Le(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Xt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[w(qt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Le(d)]})]})]}),r.jsx(sr,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(ir,{deleteTarget:Te,deleteDirtyPaths:Qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Pe(null)},onConfirm:t=>{Dt(w,t)}})]})}export{Gi as FileExplorer};
@@ -1 +0,0 @@
1
- import{c as I,b as B,j as s,B as be,d as ae,F as Q,G as fs,r as G,E as Xe,H as ps,x as hs,K as Mt,e as it,p as V,I as $e,m as H,a as Ae,J as xs,v as gs,t as ce,M as bs,P as js,L as vs,n as ys,R as _s,k as Ss,f as Ns,u as It,O as Cs,U as ks}from"./index-fi0f1C_U.js";import{u as _e,S as Qe,a as Je,b as J,c as Y,d as q,e as Tt,f as ws,g as Pt,h as Ms,i as Ge,j as Is,k as Ts,l as Ps}from"./sidebar-5EbmaKfu.js";import{u as At}from"./use-mobile-BBy2stTu.js";import{C as As,p as Re,s as zs,a as $s,n as Os}from"./self-tool-result-Dyt4J_bB.js";import{f as Es,b as Ze,e as et,g as Ds,d as zt,h as $t,a as Ot}from"./dialog-C9LdhEJ8.js";import{f as Rs}from"./tab-id-BijBBRwE.js";import{C as Fs,W as Et,g as Ls,u as Dt,S as Rt,a as rt}from"./use-mcp-client-D0JJUSC_.js";import{i as tt}from"./ArrowRight-W78pWgya.js";import{i as Ft}from"./ChevronRight-5eA6ROzl.js";import{i as Gs}from"./X-CUF99Lsu.js";import{S as se}from"./skeleton-CPE6o86c.js";import{i as Lt}from"./LayoutLeft-B8qL2spL.js";import{O as He,A as st,u as Hs,a as Bs,g as Us,b as Ws,c as Ks}from"./use-deco-credits-BkHvXdZJ.js";import{T as ke}from"./toolbar-icon-button-BrVVEPAi.js";import{P as Gt,a as Ht,b as Bt}from"./popover-KcB6zphY.js";import{D as qs,a as Vs,b as Ys}from"./drawer-iJbxlBHN.js";import{A as Be}from"./avatar-Bipd5UEy.js";import{T as je,a as ve,b as Ut,c as ye}from"./tooltip-eTUejMvR.js";import{a as Ue}from"./Copy01-D_I4zLJq.js";import{n as Xs,i as Qs}from"./Globe01-K7604lAF.js";import{i as Js}from"./ZoomOut-QXkH5zvj.js";import{n as Zs}from"./LinkExternal01-BIeTlaI1.js";import{i as at}from"./LogOut01-Dzrbv7eq.js";import{i as We}from"./Monitor01-ahykGWr6.js";import{n as en,a as tn}from"./Sun-eT24COyo.js";import{a as Oe}from"./Settings02-DBXlrfF_.js";import{i as sn}from"./Shield01-4mocQmSI.js";import{t as Wt,a as nn,i as on,b as ct,c as ln,d as rn,e as Kt,A as Ce,s as an,f as cn,g as dn,h as mn}from"./agent-icon-CaI0GdpH.js";import{a as un}from"./Users03-DDFwhuFu.js";import{u as fn}from"./use-deployment-admin-DdvgTrBf.js";import"./index-H0oW1Dgr.js";import{a as qt}from"./XCircle-BTCzfXYC.js";import{a as pn}from"./ZapSquare-Bp70BKvB.js";import{I as Vt}from"./invite-member-dialog-BQzvNXpQ.js";import{u as dt}from"./use-copy-CILQcfx6.js";import{i as Ke}from"./Check-CbFEdDFo.js";import{m as hn,u as xn,c as gn}from"./use-api-keys-P_3VMNpU.js";import{u as bn,C as jn}from"./chat-context-DrudQqbN.js";import{v as vn,C as mt}from"./connect-desktop-dialog-CTgRGfG0.js";import{u as nt}from"./use-organization-settings-BpIk1GGk.js";import{i as yn}from"./FilterLines-CV0dxqQH.js";import{T as _n,a as Sn}from"./toggle-group-HR0MkXiQ.js";import{u as Yt,a as Nn}from"./use-virtual-mcp-PPiLqJsk.js";import{u as Cn,a as Xt,b as kn,T as wn}from"./hooks-DppbqdpU.js";import{u as Qt,f as Mn}from"./shell-layout-CRMkjcoU.js";import{C as In,a as Tn,b as Pn,c as An,d as zn}from"./command-CzcPmc98.js";import{u as Jt}from"./studio-tools-DyE5uoU2.js";import{i as Zt}from"./Zap-DZcAzV7c.js";import{S as es,M as $n}from"./shell-controls-DqhiNxKe.js";import{n as On}from"./Stars02-B2okzw6k.js";import{g as En,u as Dn,S as Rn}from"./use-clock-tick-D5Vy5Dow.js";import{a as Fn}from"./format-time-BnbuEtat.js";import{t as Ln}from"./ChevronDown-CXe6JgOB.js";import{S as ts}from"./use-navigate-to-agent-CVCBKtMO.js";import{T as xe}from"./toolbar-BoNyAuGH.js";import"./integration-icon-CDDsl6LV.js";import"./Tool02-DXkhQkf7.js";import"./companions-core-CEPgmi_H.js";import"./extract-connection-data-bvDVBCCK.js";import"./metadata-dUsYcpuu.js";import"./github-repo-scope-DjMZbiKa.js";import"./CheckCircle-vxKWSGjq.js";import"./form-ujVNSHLD.js";import"./label-B6kQLTZ2.js";import"./input-CB7a8Fqy.js";import"./Eye-CCFNdeEl.js";import"./use-debounced-value-ypDUqPbN.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-Coq8StiF.js";import"./authenticate-and-persist-oauth-CHKgbLri.js";import"./mcp-oauth-BdVW-uBg.js";import"./auth-uY-yd_Qx.js";import"./Plus-DS3KKDHn.js";import"./SearchMd-w82MFsfG.js";import"./XClose-BAe5iaCX.js";import"./alert-dialog-BIM3ZQ61.js";import"./use-registry-app-DNGwSCwE.js";import"./use-mcp-tools-C4VVy_zP.js";import"./github-repo-picker-CjqIThyB.js";import"./collection-search-BKwi5gox.js";import"./use-connection-DQmaXrND.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-COtpZU4g.js";import"./use-registry-connections-DvPR6a-P.js";import"./useInfiniteQuery-CXTRQ-Dk.js";import"./use-infinite-scroll-unU2jvvl.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-Cz1w-KeT.js";import"./select-Dj6isKXJ.js";import"./ChevronUp-ClePnk1p.js";import"./textarea-DTuWp8dQ.js";import"./Star01-Bf8yuwps.js";import"./connection-form-helpers-CS6sBlKC.js";import"./Trash01-JNWsD9zI.js";import"./collection-tabs-C2hvedKX.js";import"./badge-C3f1raKX.js";import"./useSuspenseInfiniteQuery-CZk_wXzA.js";import"./use-ai-providers-DXcmm9Eo.js";import"./User01-BVJUnJoI.js";import"./AlertCircle-nsAOhmc5.js";import"./Tool01-Bxryucq9.js";import"./ArrowUp-D_vtmz11.js";import"./ArrowUpRight-CE7N_ssY.js";import"./TrendUp01-lmorDXaS.js";import"./DotsVertical-DF3Be14k.js";import"./Globe04-SqHL90_b.js";import"./SwitchHorizontal01-BVz6HjlA.js";import"./HardDrive-D5BssK7-.js";import"./Image01-sKA_S9si.js";import"./Key01-HnuEM_kB.js";import"./Package-DMX0KLYy.js";import"./Palette-9lXole3j.js";import"./Play-anRYH6K1.js";import"./SearchLg-z8IAxAgb.js";import"./Stars01-ByFhj5mQ.js";import"./Upload01-iZa_BxIK.js";import"./Users01-ClFkkNN7.js";import"./use-org-auth-client-BuQouTOU.js";import"./use-organization-roles-B1MPKRxw.js";import"./autosend-Cu5ph7K1.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-BzrOUotP.js";import"./decopilot-sse-pool-DScO8nLg.js";import"./required-auth-layout-D1lQLs9o.js";import"./use-org-sso-DTdBxyH-.js";import"./index-CggwapSx.js";import"./differenceInSeconds-NQ4PDo0z.js";const Gn="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Hn(){const t=I.c(13),e=B();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=l):l=t[2];let o;t[3]!==l?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",l,"”"]}),t[3]=l,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:Gn,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=i):i=t[5];let r;t[6]!==e?(r=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let a;t[8]!==r?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=a):a=t[9];let d;return t[10]!==o||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[n,o,a]}),t[10]=o,t[11]=a,t[12]=d):d=t[12],d}function Bn(t){const e=I.c(22),{siteHost:n,footer:l,onClose:o,children:i}=t,r=B(),a=n?`https://www.google.com/s2/favicons?domain=${n}&sz=128`:null;let d;e[0]!==o||e[1]!==r?(d=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(Gs,{size:18})}),e[0]=o,e[1]=r,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let u;e[5]!==a||e[6]!==n?(u=n&&s.jsxs(s.Fragment,{children:[s.jsx(Ft,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:n})]}),e[5]=a,e[6]=n,e[7]=u):u=e[7];let p;e[8]!==u?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,u]}),e[8]=u,e[9]=p):p=e[9];let x;e[10]!==l?(x=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:l}),e[10]=l,e[11]=x):x=e[11];let f;e[12]!==i||e[13]!==p||e[14]!==x?(f=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[p,i,x]}),e[12]=i,e[13]=p,e[14]=x,e[15]=f):f=e[15];let g,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),h=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=g,e[17]=h):(g=e[16],h=e[17]);let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:justify-center lg:p-14",children:[g,h,s.jsx("div",{className:"relative z-10",children:s.jsx(Hn,{})})]}),e[18]=b):b=e[18];let v;return e[19]!==d||e[20]!==f?(v=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,f,b]}),e[19]=d,e[20]=f,e[21]=v):v=e[21],v}function Un(t){const e=I.c(5),{ready:n,pending:l,label:o,onClick:i,children:r}=t,a=l||!n,d=n&&!l?r:null;let c;return e[0]!==o||e[1]!==i||e[2]!==a||e[3]!==d?(c=s.jsxs(be,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:a,children:[o,d]}),e[0]=o,e[1]=i,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function Wn(t){const e=I.c(22),{siteUrl:n}=t,l=ae(),{org:o}=Q(),i=B();let r;e[0]!==l||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(fs.sidebarOpen(),JSON.stringify(!1)),l({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Ls(o.id),main:Rs(Et.COMMERCE_DISCOVERY(o.id),Fs),sidepanel:0}})},e[0]=l,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Es,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==i?(c=i("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=i,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(Ze,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let u;e[9]!==a||e[10]!==i?(u=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:i("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(be,{type:"button",size:"xl",className:"w-full",onClick:a,children:[i("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(tt,{size:18})]})]}),e[9]=a,e[10]=i,e[11]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(As,{}),e[12]=p):p=e[12];let x;e[13]!==a||e[14]!==n?(x=s.jsx(G.Suspense,{fallback:p,children:s.jsx(Yn,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=x):x=e[15];let f;e[16]!==u||e[17]!==x?(f=s.jsx(Xe,{fallback:u,children:x}),e[16]=u,e[17]=x,e[18]=f):f=e[18];let g;return e[19]!==m||e[20]!==f?(g=s.jsx(et,{open:!0,children:s.jsxs(Ds,{children:[d,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vn,onPointerDownOutside:qn,onInteractOutside:Kn,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,f]})]})}),e[19]=m,e[20]=f,e[21]=g):g=e[21],g}function Kn(t){return t.preventDefault()}function qn(t){return t.preventDefault()}function Vn(t){return t.preventDefault()}function Yn({siteUrlFromUrl:t,onComplete:e}){const n=B(),{org:l}=Q(),o=Et.COMMERCE_DISCOVERY(l.id),i=Dt({connectionId:Rt,orgId:l.id,orgSlug:l.slug}),a=hs({queryKey:Mt.commerceDiscoveryConnection(l.id,o),queryFn:async()=>{const y=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return Re(y)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=zs(c),[u,p]=G.useState(!0),[x,f]=G.useState(null),g=it({mutationFn:async y=>Re(await i.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}})),retry:!1}),h=it({mutationFn:async y=>Re(await i.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:y}})),retry:!1}),b=async()=>{f(null),V("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:l.id});const y=c?Os(c):null;if(y?.ok)try{let j=await h.mutateAsync(y.value);if(j.triggered||(V("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:l.id,reason:j.reason??"not_upgraded"}),await g.mutateAsync(y.value),j=await h.mutateAsync(y.value)),!j.triggered){V("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:l.id,error:j.reason??"not_triggered"}),f(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(j){V("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:l.id,error:j instanceof Error?j.message:String(j)}),f(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},v=u;return s.jsx(Bn,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[x?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:x}):null,s.jsx(Un,{ready:v,pending:h.isPending,label:h.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(v?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{b()},children:s.jsx(tt,{size:18})})]}),children:s.jsx($s,{org:l,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function Xn(t){const e=I.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=B(),{state:i,isMobile:r}=_e();if(r||i==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let u;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(u=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=u):u=e[10],u}const ot=240,Qn=400,Jn="sidebar.width";function Ne(t){return Math.max(ot,Math.min(Qn,t))}function Zn(){const t=I.c(11),[e,n]=$e(Jn,eo),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=m=>{m.preventDefault();const u=m.clientX,p=Ne(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),f=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of f)b.style.transition="none";const g=b=>{const v=Ne(p+(b.clientX-u));x?.style.setProperty("--sidebar-width",`${v}px`)},h=b=>{const v=Ne(p+(b.clientX-u));n(v);for(const y of f)y.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",h)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let r;t[3]!==n?(r=()=>{n(ot)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=Ne(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function eo(t){return typeof t=="number"?Ne(t):ot}function ss(){return[]}function ns(t){const e=I.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let o;return e[1]!==n?(o=s.jsxs(Qe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(Je,{children:s.jsx(J,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function os(t){const e=I.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=_e();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{V("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&o(!1)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const r=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=H(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let p;return e[14]!==n.key||e[15]!==c||e[16]!==u?(p=s.jsx(q,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=p):p=e[17],p}function to(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Tt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(no),e[2]=n.group.items,e[3]=i):i=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(r=s.jsx(ns,{label:l,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(so),e[8]=n.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}case"custom":return n.content}}function so(t){return s.jsx(os,{item:t},t.key)}function no(t){return s.jsx(os,{item:t},t.key)}function oo(t){const e=I.c(17),{sections:n,footer:l,additionalContent:o,header:i,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==i?(c=i&&s.jsx(ws,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:i}),e[0]=i,e[1]=c):c=e[1];let m;e[2]!==a?(m=H("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let u;e[4]!==n?(u=n.map(lo),e[4]=n,e[5]=u):u=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let x;e[8]!==m||e[9]!==u||e[10]!==p?(x=s.jsxs(Pt,{className:m,children:[u,p]}),e[8]=m,e[9]=u,e[10]=p,e[11]=x):x=e[11];let f;return e[12]!==l||e[13]!==c||e[14]!==x||e[15]!==d?(f=s.jsxs(Ms,{variant:d,children:[c,x,l]}),e[12]=l,e[13]=c,e[14]=x,e[15]=d,e[16]=f):f=e[16],f}function lo(t,e){return s.jsx(to,{section:t},e)}function ls(t){const e=I.c(2);let n;return e[0]!==t?(n=s.jsx(oo,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function ut(t){const e=I.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=H(o),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==n||e[3]!==l?(r=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(Y,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==i||e[16]!==c?(m=s.jsx(q,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function io(t){const e=I.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Tt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(ut,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(ns,{label:o,defaultExpanded:i,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==l||e[12]!==n.items){let r;e[14]!==l?(r=a=>s.jsx(ut,{item:a,onClose:l},a.key),e[14]=l,e[15]=r):r=e[15],o=n.items.map(r),e[11]=l,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Je,{children:s.jsx(J,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function ro(t){const e=I.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(He,{}),e[0]=r):r=e[0];let a;e[1]!==l?(a=s.jsx(st,{onNavigate:l}),e[1]=l,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=B();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Lt,{size:16}),e[6]=u):u=e[6];let p;e[7]!==l||e[8]!==m?(p=s.jsx(ke,{onClick:l,"aria-label":m,children:u}),e[7]=l,e[8]=m,e[9]=p):p=e[9];let x;e[10]!==a||e[11]!==p?(x=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,p]}),e[10]=a,e[11]=p,e[12]=x):x=e[12];let f;if(e[13]!==l||e[14]!==n){let v;e[16]!==l?(v=(y,j)=>s.jsx(io,{section:y,onClose:l},j),e[16]=l,e[17]=v):v=e[17],f=n.map(v),e[13]=l,e[14]=n,e[15]=f}else f=e[15];let g;e[18]!==i?(g=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[18]=i,e[19]=g):g=e[19];let h;e[20]!==g||e[21]!==f?(h=s.jsxs(Pt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[f,g]}),e[20]=g,e[21]=f,e[22]=h):h=e[22];let b;return e[23]!==o||e[24]!==h||e[25]!==x?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[x,h,o]}),e[23]=o,e[24]=h,e[25]=x,e[26]=b):b=e[26],b}function ge(t){const e=I.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=H("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const i=o;if(n.href){const m=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let p;e[2]!==n.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=p):p=e[3];let x;e[4]!==n.label?(x=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=x):x=e[5];let f;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==m||e[10]!==u||e[11]!==p||e[12]!==x?(f=s.jsxs("a",{href:n.href,target:m,rel:u,className:i,onClick:l,children:[p,x]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=m,e[10]=u,e[11]=p,e[12]=x,e[13]=f):f=e[13],f}let r;e[14]!==n||e[15]!==l?(r=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==i||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:i,children:[a,d]}),e[21]=i,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function ao(){const t=I.c(4),e=B();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=l):l=t[3],l}function ft(t){const e=I.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=B(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=H("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let m;e[2]!==c||e[3]!==l?(m=s.jsx(Be,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=m):m=e[4];let u;e[5]!==r||e[6]!==n?.name?(u=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=u):u=e[7];let p;e[8]!==u?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:u}),e[8]=u,e[9]=p):p=e[9];let x;e[10]!==o?(x=o&&s.jsx(ao,{}),e[10]=o,e[11]=x):x=e[11];let f;e[12]!==p||e[13]!==x?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[p,x]}),e[12]=p,e[13]=x,e[14]=f):f=e[14];const g=n?.email;let h;e[15]!==g?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=h):h=e[16];let b;e[17]!==h||e[18]!==f?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[f,h]}),e[17]=h,e[18]=f,e[19]=b):b=e[19];let v;e[20]!==r||e[21]!==n?(v=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ce.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=v):v=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ue,{size:14}),e[23]=y):y=e[23];let j;e[24]!==v?(j=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[24]=v,e[25]=j):j=e[25];let _;e[26]!==r?(_=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=_):_=e[27];let C;e[28]!==_?(C=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:_})}),e[28]=_,e[29]=C):C=e[29];let N;e[30]!==j||e[31]!==C?(N=s.jsx(Ut,{delayDuration:300,children:s.jsxs(ye,{children:[j,C]})}),e[30]=j,e[31]=C,e[32]=N):N=e[32];let S;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==m?(S=s.jsxs("div",{className:d,children:[m,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=m,e[37]=S):S=e[37],S}function pt(t){const e=I.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=B(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=H("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let _;e[7]!==a||e[8]!==l.theme||e[9]!==o?(_=C=>{const{value:N,icon:S,label:w}=C;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(k=>({...k,theme:N})),className:H(a,"rounded-md flex items-center justify-center transition-colors",l.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:S},N)},e[7]=a,e[8]=l.theme,e[9]=o,e[10]=_):_=e[10],m=n.map(_),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=m}else m=e[6];let u;e[11]!==m?(u=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=u):u=e[12];let p;e[13]!==l.enableSounds||e[14]!==r?(p=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=p):p=e[15];let x;e[16]!==o?(x=()=>o(co),e[16]=o,e[17]=x):x=e[17];const f=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==a||e[19]!==f?(g=H(a,"rounded-md flex items-center justify-center transition-colors",f),e[18]=a,e[19]=f,e[20]=g):g=e[20];let h;e[21]!==l.enableSounds?(h=l.enableSounds?s.jsx(nn,{size:14}):s.jsx(on,{size:14}),e[21]=l.enableSounds,e[22]=h):h=e[22];let b;e[23]!==p||e[24]!==x||e[25]!==g||e[26]!==h?(b=s.jsx("button",{type:"button","aria-label":p,onClick:x,className:g,children:h}),e[23]=p,e[24]=x,e[25]=g,e[26]=h,e[27]=b):b=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.123.9"]}),e[28]=v):v=e[28];let y;e[29]!==b?(y=s.jsxs("div",{className:"flex items-center gap-2",children:[b,v]}),e[29]=b,e[30]=y):y=e[30];let j;return e[31]!==y||e[32]!==c||e[33]!==u?(j=s.jsxs("div",{className:c,children:[u,y]}),e[31]=y,e[32]=c,e[33]=u,e[34]=j):j=e[34],j}function co(t){return{...t,enableSounds:!t.enableSounds}}function ht(t){const e=I.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:u,isMobile:p}=t;if(p){let j;e[0]!==a||e[1]!==n||e[2]!==l?(j=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=j):j=e[3];let _;if(e[4]!==u||e[5]!==o){let T;e[7]!==u?(T=M=>s.jsx(ge,{item:M,onClose:u},M.key),e[7]=u,e[8]=T):T=e[8],_=o.map(T),e[4]=u,e[5]=o,e[6]=_}else _=e[6];let C;e[9]!==u||e[10]!==r?(C=r&&s.jsx(ge,{item:r,onClose:u}),e[9]=u,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==u||e[13]!==i?(N=s.jsx(ge,{item:i,onClose:u}),e[12]=u,e[13]=i,e[14]=N):N=e[14];let S;e[15]!==_||e[16]!==C||e[17]!==N?(S=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[_,C,N]})}),e[15]=_,e[16]=C,e[17]=N,e[18]=S):S=e[18];let w;e[19]!==c||e[20]!==m||e[21]!==d?(w=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=w):w=e[22];let k;return e[23]!==j||e[24]!==S||e[25]!==w?(k=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,S,w]}),e[23]=j,e[24]=S,e[25]=w,e[26]=k):k=e[26],k}let x;e[27]!==a||e[28]!==n||e[29]!==l?(x=s.jsx(ft,{user:n,userImage:l,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=l,e[30]=x):x=e[30];let f;if(e[31]!==u||e[32]!==o){let j;e[34]!==u?(j=_=>s.jsx(ge,{item:_,onClose:u},_.key),e[34]=u,e[35]=j):j=e[35],f=o.map(j),e[31]=u,e[32]=o,e[33]=f}else f=e[33];let g;e[36]!==u||e[37]!==r?(g=r&&s.jsx(ge,{item:r,onClose:u}),e[36]=u,e[37]=r,e[38]=g):g=e[38];let h;e[39]!==u||e[40]!==i?(h=s.jsx(ge,{item:i,onClose:u}),e[39]=u,e[40]=i,e[41]=h):h=e[41];let b;e[42]!==f||e[43]!==g||e[44]!==h?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[f,g,h]}),e[42]=f,e[43]=g,e[44]=h,e[45]=b):b=e[45];let v;e[46]!==c||e[47]!==m||e[48]!==d?(v=s.jsx(pt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=v):v=e[49];let y;return e[50]!==x||e[51]!==b||e[52]!==v?(y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[x,b,v]})}),e[50]=x,e[51]=b,e[52]=v,e[53]=y):y=e[53],y}function qe(){const t=I.c(99),e=B(),{data:n}=Ae.useSession(),{org:l}=Q(),o=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=xs(i)?.params.org,[d,c]=gs(),m=At(),{isAdmin:u}=fn(),[p,x]=G.useState(!1),f=n?.user,g=f?.image,h=!!n?.session?.impersonatedBy;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>x(!1),t[1]=b):b=t[1];const v=b;let y;t[2]!==e?(y=e("common.accountPopover.preferences"),t[2]=e,t[3]=y):y=t[3];let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Oe,{size:16}),t[4]=j):j=t[4];let _;t[5]!==o||t[6]!==a?(_=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=_):_=t[7];let C;t[8]!==y||t[9]!==_?(C={key:"preferences",label:y,icon:j,onClick:_},t[8]=y,t[9]=_,t[10]=C):C=t[10];let N;t[11]!==l||t[12]!==o||t[13]!==e?(N=l?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(Xs,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Zs,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:l.slug}})}}]:[],t[11]=l,t[12]=o,t[13]=e,t[14]=N):N=t[14];let S;t[15]!==e?(S=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=S):S=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Js,{size:16}),t[17]=w):w=t[17];let k;t[18]!==S?(k={key:"terms",label:S,icon:w,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=S,t[19]=k):k=t[19];let T;t[20]!==e?(T=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=T):T=t[21];let M;t[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(sn,{size:16}),t[22]=M):M=t[22];let $;t[23]!==T?($={key:"privacy",label:T,icon:M,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=T,t[24]=$):$=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let z;t[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(bs,{className:"w-4 h-4"}),t[27]=z):z=t[27];let R;t[28]!==A?(R={key:"github",label:A,icon:z,href:"https://github.com/decocms/studio",external:!0},t[28]=A,t[29]=R):R=t[29];let E;t[30]!==e?(E=e("common.accountPopover.community"),t[30]=e,t[31]=E):E=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(un,{size:16}),t[32]=O):O=t[32];let D;t[33]!==E?(D={key:"community",label:E,icon:O,href:"https://decocms.com/discord",external:!0},t[33]=E,t[34]=D):D=t[34];let F;t[35]!==e?(F=e("common.accountPopover.homepage"),t[35]=e,t[36]=F):F=t[36];let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Qs,{size:16}),t[37]=K):K=t[37];let Z;t[38]!==F?(Z={key:"homepage",label:F,icon:K,href:"https://decocms.com",external:!0},t[38]=F,t[39]=Z):Z=t[39];let ne;t[40]!==u||t[41]!==o||t[42]!==e?(ne=u?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Wt,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=u,t[41]=o,t[42]=e,t[43]=ne):ne=t[43];let de;t[44]!==$||t[45]!==R||t[46]!==D||t[47]!==Z||t[48]!==ne||t[49]!==C||t[50]!==N||t[51]!==k?(de=[C,...N,k,$,R,D,Z,...ne],t[44]=$,t[45]=R,t[46]=D,t[47]=Z,t[48]=ne,t[49]=C,t[50]=N,t[51]=k,t[52]=de):de=t[52];const oe=de;let ee;t[53]!==e?(ee=e("common.accountPopover.signOut"),t[53]=e,t[54]=ee):ee=t[54];let le;t[55]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(at,{size:16}),t[55]=le):le=t[55];let me;t[56]!==ee?(me={key:"logout",label:ee,icon:le,onClick:uo},t[56]=ee,t[57]=me):me=t[57];const Se=me;let ue;t[58]!==h||t[59]!==e?(ue=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(at,{size:16}),onClick:async()=>{const{error:lt}=await Ae.admin.stopImpersonating();if(lt){ce.error(lt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=h,t[59]=e,t[60]=ue):ue=t[60];const fe=ue;let pe;t[61]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(en,{size:14}),t[61]=pe):pe=t[61];let ie;t[62]!==e?(ie=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=ie):ie=t[63];let X;t[64]!==ie?(X={value:"light",icon:pe,label:ie},t[64]=ie,t[65]=X):X=t[65];let he;t[66]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(tn,{size:14}),t[66]=he):he=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let P;t[69]!==te?(P={value:"dark",icon:he,label:te},t[69]=te,t[70]=P):P=t[70];let L;t[71]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(We,{size:14}),t[71]=L):L=t[71];let W;t[72]!==e?(W=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=W):W=t[73];let U;t[74]!==W?(U={value:"system",icon:L,label:W},t[74]=W,t[75]=U):U=t[75];let re;t[76]!==X||t[77]!==P||t[78]!==U?(re=[X,P,U],t[76]=X,t[77]=P,t[78]=U,t[79]=re):re=t[79];const De=re;let we;t[80]!==h||t[81]!==m||t[82]!==oe||t[83]!==d||t[84]!==c||t[85]!==Se||t[86]!==fe||t[87]!==De||t[88]!==f||t[89]!==g?(we={user:f,userImage:g,menuItems:oe,signOutItem:Se,stopImpersonatingItem:fe,isImpersonating:h,themeOptions:De,preferences:d,setPreferences:c,close:v,isMobile:m},t[80]=h,t[81]=m,t[82]=oe,t[83]=d,t[84]=c,t[85]=Se,t[86]=fe,t[87]=De,t[88]=f,t[89]=g,t[90]=we):we=t[90];const Me=we;let Ie;return t[91]!==h||t[92]!==m||t[93]!==p||t[94]!==Me||t[95]!==e||t[96]!==f?.name||t[97]!==g?(Ie=s.jsx(s.Fragment,{children:m?s.jsxs(qs,{open:p,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:H("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",h&&"border-2 border-dashed border-warning"),children:[s.jsx(Be,{url:g,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(Vs,{className:"h-[80dvh] p-0",children:[s.jsx(Ys,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(ht,{...Me})]})]}):s.jsxs(Gt,{open:p,onOpenChange:x,children:[s.jsx(Ht,{asChild:!0,children:s.jsxs(Y,{tooltip:f?.name??e("common.accountPopover.defaultAccountLabel"),className:H("rounded-md",h&&"border-2 border-dashed border-warning"),children:[s.jsx(Be,{url:g,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Bt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:mo,children:s.jsx(ht,{...Me})})]})}),t[91]=h,t[92]=m,t[93]=p,t[94]=Me,t[95]=e,t[96]=f?.name,t[97]=g,t[98]=Ie):Ie=t[98],Ie}function mo(t){return t.preventDefault()}function uo(){V("signed_out",{source:"account_popover"}),js(),Ae.signOut()}const fo=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],po="Connect: ";function ho(){return typeof window>"u"?"unknown host":window.location.hostname}function xo(t){const e=I.c(45),{onClose:n}=t,{org:l}=Q();let o;e[0]!==l.slug?(o=hn(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=xn(),[a,d]=G.useState(null),c=dt(),m=dt();let u;e[2]!==r||e[3]!==l.slug?(u=()=>{r.mutate({name:`${po}Claude Code on ${ho()}`,permissions:{"*":["*"]}},{onSuccess:R=>{const E=gn(l.slug,R.key);d(E),V("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(E).then(vo,jo)},onError:bo})},e[2]=r,e[3]=l.slug,e[4]=u):u=e[4];const p=u;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"size-8 rounded-lg bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(qt,{size:17})}),e[5]=x):x=e[5];let f;e[6]!==l.name?(f=s.jsxs(Ze,{className:"flex items-center gap-2.5",children:[x,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=f):f=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($t,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let h;e[9]!==f?(h=s.jsxs(Ot,{children:[f,g]}),e[9]=f,e[10]=h):h=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("ul",{className:"flex flex-col gap-2 text-sm",children:fo.map(go)}),e[11]=b):b=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ct,{size:15,className:"text-muted-foreground"}),e[12]=v):v=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[v,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=y):y=e[13];let j;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==p?(j=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[y,a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-lg border border-border bg-background p-3 max-h-32 overflow-y-auto",children:s.jsx("code",{className:"text-xs leading-relaxed break-all font-mono text-foreground/90 whitespace-pre-wrap",children:a})}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",onClick:()=>{c.handleCopy(a),V("connect_studio_copy",{target:"claude-code"}),ce.success("Command copied — paste it in your terminal")},children:[c.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),c.copied?"Copied":"Copy command"]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2",children:[s.jsx(Wt,{size:14,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-xs leading-relaxed text-foreground/80",children:["No login step — this command embeds a"," ",s.jsx("span",{className:"font-medium text-foreground",children:"full-access token"}),". Treat it like a password; revoke it any time in Settings → Connect."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"One command, no browser login. We'll mint a scoped access token and embed it so Claude Code connects instantly."}),s.jsxs(be,{size:"sm",className:"gap-1.5 self-start",disabled:r.isPending,onClick:p,children:[s.jsx(ct,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=p,e[18]=j):j=e[18];let _,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(ln,{size:15,className:"text-muted-foreground"}),"Claude Desktop or claude.ai"]}),C=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Add a custom connector in Settings → Connectors and paste this URL. Claude signs in with OAuth on first use."}),e[19]=_,e[20]=C):(_=e[19],C=e[20]);let N;e[21]!==i?(N=s.jsx("code",{className:"text-xs flex-1 min-w-0 truncate font-mono text-foreground/90",children:i}),e[21]=i,e[22]=N):N=e[22];let S;e[23]!==i||e[24]!==m?(S=()=>{m.handleCopy(i),V("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=m,e[25]=S):S=e[25];let w;e[26]!==m.copied?(w=m.copied?s.jsx(Ke,{size:14}):s.jsx(Ue,{size:14}),e[26]=m.copied,e[27]=w):w=e[27];let k;e[28]!==S||e[29]!==w?(k=s.jsx(be,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"Copy URL",onClick:S,children:w}),e[28]=S,e[29]=w,e[30]=k):k=e[30];let T;e[31]!==N||e[32]!==k?(T=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[_,C,s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 pl-3 pr-1.5 py-1.5 min-w-0",children:[N,k]})]}),e[31]=N,e[32]=k,e[33]=T):T=e[33];let M;e[34]!==l.slug?(M={org:l.slug},e[34]=l.slug,e[35]=M):M=e[35];let $;e[36]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(tt,{size:12}),e[36]=$):$=e[36];let A;e[37]!==n||e[38]!==M?(A=s.jsx("div",{className:"flex items-center border-t border-border pt-3",children:s.jsx(be,{asChild:!0,variant:"link",size:"sm",className:"px-0 text-xs gap-1",children:s.jsxs(vs,{to:"/$org/settings/connect",params:M,onClick:n,children:["More clients & API keys ",$]})})}),e[37]=n,e[38]=M,e[39]=A):A=e[39];let z;return e[40]!==j||e[41]!==T||e[42]!==A||e[43]!==h?(z=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[h,b,j,T,A]}),e[40]=j,e[41]=T,e[42]=A,e[43]=h,e[44]=z):z=e[44],z}function go(t){return s.jsxs("li",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"size-4 rounded-full bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Ke,{size:11,strokeWidth:3})}),s.jsx("span",{className:"text-foreground",children:t})]},t)}function bo(t){return ce.error(t.message)}function jo(){return ce.success("Command ready — copy it below")}function vo(){return ce.success("Command copied — paste it in your terminal")}function yo(t){const e=I.c(6),{open:n,onOpenChange:l}=t;let o;e[0]!==l?(o=s.jsx(zt,{className:"max-w-lg gap-4",children:s.jsx(xo,{onClose:()=>l(!1)})}),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==n||e[4]!==o?(i=s.jsx(et,{open:n,onOpenChange:l,children:o}),e[2]=l,e[3]=n,e[4]=o,e[5]=i):i=e[5],i}function Ve(t){const e=I.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=B(),i=bn(),[r,a]=G.useState(!1);let d,c;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online||e[4]!==o){const j=vn(i.capabilities,o);let _;e[7]!==i.online||e[8]!==o?(_=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=_):_=e[9],d=_,c=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??o("header.linkedDesktopIndicator.desktopLinked")}),s.jsx("span",{className:"text-muted-foreground",children:j.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:j.join(", ")}):o("header.linkedDesktopIndicator.noCliAgents")})]}):s.jsx("span",{className:"text-xs",children:o("header.linkedDesktopIndicator.desktopDisconnected")}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d,e[6]=c}else d=e[5],c=e[6];const m=c;if(l==="full"){let j,_;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=()=>a(!0),_=s.jsx(We,{}),e[10]=j,e[11]=_):(j=e[10],_=e[11]);let C;e[12]!==d?(C=s.jsx("span",{children:d}),e[12]=d,e[13]=C):C=e[13];let N;e[14]!==i.online?(N=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[14]=i.online,e[15]=N):N=e[15];let S;e[16]!==d||e[17]!==C||e[18]!==N?(S=s.jsx(je,{asChild:!0,children:s.jsxs(Y,{tooltip:d,onClick:j,children:[_,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=S):S=e[19];let w;e[20]!==m?(w=s.jsx(ve,{side:"right",children:m}),e[20]=m,e[21]=w):w=e[21];let k;e[22]!==S||e[23]!==w?(k=s.jsxs(ye,{children:[S,w]}),e[22]=S,e[23]=w,e[24]=k):k=e[24];let T;e[25]!==r?(T=s.jsx(mt,{open:r,onOpenChange:a}),e[25]=r,e[26]=T):T=e[26];let M;return e[27]!==T||e[28]!==k?(M=s.jsxs(s.Fragment,{children:[k,T]}),e[27]=T,e[28]=k,e[29]=M):M=e[29],M}let u;e[30]===Symbol.for("react.memo_cache_sentinel")?(u=()=>a(!0),e[30]=u):u=e[30];let p;e[31]!==i.online||e[32]!==o?(p=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=p):p=e[33];let x;e[34]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(We,{size:16}),e[34]=x):x=e[34];let f;e[35]!==i.online?(f=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[35]=i.online,e[36]=f):f=e[36];let g;e[37]!==p||e[38]!==f?(g=s.jsx(je,{asChild:!0,children:s.jsxs(ke,{onClick:u,"aria-label":p,children:[x,f]})}),e[37]=p,e[38]=f,e[39]=g):g=e[39];let h;e[40]!==m?(h=s.jsx(ve,{side:"bottom",children:m}),e[40]=m,e[41]=h):h=e[41];let b;e[42]!==g||e[43]!==h?(b=s.jsxs(ye,{children:[g,h]}),e[42]=g,e[43]=h,e[44]=b):b=e[44];let v;e[45]!==r?(v=s.jsx(mt,{open:r,onOpenChange:a}),e[45]=r,e[46]=v):v=e[46];let y;return e[47]!==v||e[48]!==b?(y=s.jsxs(s.Fragment,{children:[b,v]}),e[47]=v,e[48]=b,e[49]=y):y=e[49],y}class _o extends G.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function So(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function No(){const t=I.c(17),e=ae(),{org:n}=Q(),{hasDecoKey:l,balanceDollars:o}=Hs();if(!l)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=H(o!=null&&So(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(rn,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==m?(u=s.jsx(J,{children:s.jsx(q,{children:s.jsxs(Y,{tooltip:i,className:r,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function xt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(_o,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(No,{})})}),t[0]=e):e=t[0],e}function Co(){const t=I.c(14),e=B(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==i||t[12]!==d?(c=s.jsxs(Y,{tooltip:o,onClick:i,children:[r,d]}),t[10]=o,t[11]=i,t[12]=d,t[13]=c):c=t[13],c}function ko(){const t=I.c(9),e=B(),n=ae(),{org:l}=Q();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Oe,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==i?(a=s.jsx("button",{type:"button","aria-label":o,onClick:i,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=i,t[8]=a):a=t[8],a}function gt(){const t=I.c(33),e=B(),[n,l]=G.useState(!1),[o,i]=G.useState(!1);let r;t[0]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Kt,{}),t[2]=a):a=t[2];let d;t[3]!==e?(d=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==d?(c=s.jsx("span",{children:d}),t[5]=d,t[6]=c):c=t[6];let m;t[7]!==r||t[8]!==c?(m=s.jsx(q,{children:s.jsx(Vt,{trigger:s.jsxs(Y,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=m):m=t[9];let u;t[10]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=u):u=t[11];let p,x;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(!0),x=s.jsx(pn,{}),t[12]=p,t[13]=x):(p=t[12],x=t[13]);let f;t[14]!==e?(f=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=f):f=t[15];let g;t[16]!==f?(g=s.jsx("span",{children:f}),t[16]=f,t[17]=g):g=t[17];let h;t[18]!==u||t[19]!==g?(h=s.jsx(q,{children:s.jsxs(Y,{tooltip:u,onClick:p,children:[x,g]})}),t[18]=u,t[19]=g,t[20]=h):h=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(q,{children:s.jsxs(Y,{tooltip:"Connect to Claude",onClick:()=>{V("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(qt,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let v;t[22]!==h||t[23]!==m?(v=s.jsxs(J,{className:"gap-0.5",children:[m,h,b]}),t[22]=h,t[23]=m,t[24]=v):v=t[24];let y;t[25]!==n?(y=s.jsx(Bs,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=y):y=t[26];let j;t[27]!==o?(j=s.jsx(yo,{open:o,onOpenChange:i}),t[27]=o,t[28]=j):j=t[28];let _;return t[29]!==v||t[30]!==y||t[31]!==j?(_=s.jsxs(s.Fragment,{children:[v,y,j]}),t[29]=v,t[30]=y,t[31]=j,t[32]=_):_=t[32],_}function bt(){const t=I.c(10),e=B();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Kt,{}),t[2]=l):l=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=s.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==n||t[8]!==i?(r=s.jsx(J,{className:"gap-0.5",children:s.jsx(q,{children:s.jsx(Vt,{trigger:s.jsxs(Y,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function wo(){const t=I.c(19),{state:e}=_e(),n=e==="collapsed",l=nt(),o=!l;if(n){let m;t[0]!==l?(m=l?s.jsx(bt,{}):s.jsx(gt,{}),t[0]=l,t[1]=m):m=t[1];let u;t[2]!==o?(u=o&&s.jsx(xt,{}),t[2]=o,t[3]=u):u=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(q,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(Ve,{})})}),t[4]=p):p=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(q,{children:s.jsx(Co,{})}),t[5]=x):x=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(J,{children:[p,x,s.jsx(q,{children:s.jsx(qe,{})})]}),t[6]=f):f=t[6];let g;return t[7]!==m||t[8]!==u?(g=s.jsxs(Ge,{className:"px-2 pb-3 gap-1",children:[m,u,f]}),t[7]=m,t[8]=u,t[9]=g):g=t[9],g}let i;t[10]!==l?(i=l?s.jsx(bt,{}):s.jsx(gt,{}),t[10]=l,t[11]=i):i=t[11];let r;t[12]!==o?(r=o&&s.jsx(xt,{}),t[12]=o,t[13]=r):r=t[13];let a;t[14]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(q,{children:s.jsx(Ve,{variant:"full"})}),t[14]=a):a=t[14];let d;t[15]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(J,{className:"gap-0.5",children:[a,s.jsx(q,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(qe,{})}),s.jsx(ko,{})]})})]}),t[15]=d):d=t[15];let c;return t[16]!==i||t[17]!==r?(c=s.jsxs(Ge,{className:"px-2 pb-3 gap-0.5",children:[i,r,d]}),t[16]=i,t[17]=r,t[18]=c):c=t[18],c}function Mo(){const t=I.c(11),e=B(),n=ae(),{org:l}=Q(),{setOpenMobile:o}=_e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(J,{children:s.jsx(q,{children:s.jsx(qe,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=r):r=t[2];let a;t[3]!==n||t[4]!==l.slug||t[5]!==o?(a=()=>{n({to:"/$org/settings",params:{org:l.slug}}),o(!1)},t[3]=n,t[4]=l.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Oe,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==r||t[9]!==a?(c=s.jsx(Ge,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(ke,{"aria-label":r,onClick:a,children:d})]})}),t[8]=r,t[9]=a,t[10]=c):c=t[10],c}function jt(t){const e=I.c(15),{className:n,wrapperClassName:l,children:o}=t,[i,r]=G.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&r(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const v=b.currentTarget;r(v.scrollHeight-v.scrollTop>v.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=H("relative",l),e[2]=l,e[3]=u):u=e[3];let p;e[4]!==o||e[5]!==n?(p=s.jsx("div",{ref:d,onScroll:m,className:n,children:o}),e[4]=o,e[5]=n,e[6]=p):p=e[6];const x=i?"opacity-100":"opacity-0";let f;e[7]!==x?(f=H("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==f?(g=s.jsx("div",{"aria-hidden":!0,className:f}),e[9]=f,e[10]=g):g=e[10];let h;return e[11]!==u||e[12]!==p||e[13]!==g?(h=s.jsxs("div",{className:u,children:[p,g]}),e[11]=u,e[12]=p,e[13]=g,e[14]=h):h=e[14],h}function Io(t){const e=I.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=B();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(To,{virtualMcpId:n,size:i}):s.jsx(Ce,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==r?(d=o&&s.jsx("span",{"aria-label":r("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(Zt,{size:10,className:"text-white"})}),e[3]=o,e[4]=r,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function To(t){const e=I.c(6),{virtualMcpId:n,size:l}=t,o=Yt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(Ce,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=o.icon??null;let r;return e[2]!==o.title||e[3]!==l||e[4]!==i?(r=s.jsx(Ce,{icon:i,name:o.title,size:l}),e[2]=o.title,e[3]=l,e[4]=i,e[5]=r):r=e[5],r}function vt(t){const e=I.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=Q(),{setTaskId:a}=Qt(),d=Jt(),c=B();let m,u,p;e[0]!==r.id||e[1]!==o?(p=o.trim(),u=ys,m=Mt.globalSearch(r.id,p),e[0]=r.id,e[1]=o,e[2]=m,e[3]=u,e[4]=p):(m=e[2],u=e[3],p=e[4]);const x=n&&p.length>0;let f;e[5]!==d||e[6]!==p?(f=async()=>await d.call("GLOBAL_SEARCH",{query:p,limit:20}),e[5]=d,e[6]=p,e[7]=f):f=e[7];let g;e[8]!==m||e[9]!==x||e[10]!==f?(g={queryKey:m,enabled:x,queryFn:f,staleTime:1e4},e[8]=m,e[9]=x,e[10]=f,e[11]=g):g=e[11];const{data:h,isFetching:b}=u(g);let v;e[12]!==h?.items?(v=h?.items??[],e[12]=h?.items,e[13]=v):v=e[13];const y=v;let j;e[14]!==l?(j=F=>{F||i(""),l(F)},e[14]=l,e[15]=j):j=e[15];const _=j;let C;e[16]!==_||e[17]!==a?(C=F=>{_(!1),a(F.id,F.virtual_mcp_id??void 0)},e[16]=_,e[17]=a,e[18]=C):C=e[18];const N=C;let S;e[19]!==c?(S=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=S):S=e[20];let w;e[21]!==S?(w=s.jsx(Ze,{children:S}),e[21]=S,e[22]=w):w=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let T;e[25]!==k?(T=s.jsx($t,{children:k}),e[25]=k,e[26]=T):T=e[26];let M;e[27]!==w||e[28]!==T?(M=s.jsxs(Ot,{className:"sr-only",children:[w,T]}),e[27]=w,e[28]=T,e[29]=M):M=e[29];let $;e[30]!==c?($=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=$):$=e[31];let A;e[32]!==o||e[33]!==$?(A=s.jsx(Pn,{value:o,onValueChange:i,placeholder:$}),e[32]=o,e[33]=$,e[34]=A):A=e[34];let z;e[35]!==N||e[36]!==b||e[37]!==y||e[38]!==c||e[39]!==p?(z=p?b&&y.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):y.length===0?s.jsx(In,{children:c("tasksPanel.globalSearchDialog.noResults")}):y.map(F=>F.type==="thread"?s.jsxs(Tn,{value:`thread:${F.id}:${F.title}`,onSelect:()=>N(F),className:"gap-2.5",children:[s.jsx(Io,{virtualMcpId:F.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:F.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(F.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${F.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.startTyping")}),e[35]=N,e[36]=b,e[37]=y,e[38]=c,e[39]=p,e[40]=z):z=e[40];let R;e[41]!==z?(R=s.jsx(An,{children:z}),e[41]=z,e[42]=R):R=e[42];let E;e[43]!==A||e[44]!==R?(E=s.jsxs(zn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,R]}),e[43]=A,e[44]=R,e[45]=E):E=e[45];let O;e[46]!==M||e[47]!==E?(O=s.jsxs(zt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[M,E]}),e[46]=M,e[47]=E,e[48]=O):O=e[48];let D;return e[49]!==_||e[50]!==n||e[51]!==O?(D=s.jsx(et,{open:n,onOpenChange:_,children:O}),e[49]=_,e[50]=n,e[51]=O,e[52]=D):D=e[52],D}function Po(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=I.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=B(),u=En(n.status),p=u.icon,x=n.metadata?.kind==="tool_call_run",f=Yt(x?void 0:n.virtual_mcp_id);let g;e[0]!==f?(g=Us(f),e[0]=f,e[1]=g):g=e[1];const h=g;Dn(6e4);const b=r||!!n.trigger_id,v=n.id,y="button",j=0;let _;e[2]!==o?(_=K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),o())},e[2]=o,e[3]=_):_=e[3];const C=c?"-ml-4 pl-6":"pl-[7px]",N=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let S;e[4]!==C||e[5]!==N?(S=H("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",C,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=C,e[5]=N,e[6]=S):S=e[6];let w;e[7]!==x||e[8]!==a||e[9]!==f?.icon||e[10]!==f?.title?(w=a&&!x&&s.jsx(Ce,{icon:f?.icon??null,name:f?.title??"?",size:"2xs"}),e[7]=x,e[8]=a,e[9]=f?.icon,e[10]=f?.title,e[11]=w):w=e[11];let k;e[12]!==b||e[13]!==m?(k=b&&s.jsx(Zt,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=m,e[14]=k):k=e[14];let T;e[15]!==m||e[16]!==n.title?(T=n.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=n.title,e[17]=T):T=e[17];let M;e[18]!==T?(M=s.jsx("div",{className:"text-sm text-foreground truncate",children:T}),e[18]=T,e[19]=M):M=e[19];let $;e[20]!==k||e[21]!==M?($=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[k,M]}),e[20]=k,e[21]=M,e[22]=$):$=e[22];let A;e[23]!==h||e[24]!==l||e[25]!==n.branch||e[26]!==n.updated_at?(A=n.updated_at&&s.jsxs("div",{className:H("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Po(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):h?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[h.owner,"/",h.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Fn(new Date(n.updated_at))})]}),e[23]=h,e[24]=l,e[25]=n.branch,e[26]=n.updated_at,e[27]=A):A=e[27];let z;e[28]!==$||e[29]!==A?(z=s.jsxs("div",{className:"flex-1 min-w-0",children:[$,A]}),e[28]=$,e[29]=A,e[30]=z):z=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!d&&s.jsx("span",{className:H("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:u.label}),children:s.jsx(p,{size:14,className:H(u.iconClassName,n.status==="in_progress"&&"animate-spin")})});let O;e[31]!==i||e[32]!==m?(O=i&&s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:K=>{K.stopPropagation(),i()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(_s,{size:14})})}),s.jsx(ve,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=m,e[33]=O):O=e[33];let D;e[34]!==E||e[35]!==O?(D=s.jsxs("div",{className:R,children:[E,O]}),e[34]=E,e[35]=O,e[36]=D):D=e[36];let F;return e[37]!==o||e[38]!==z||e[39]!==D||e[40]!==_||e[41]!==S||e[42]!==w||e[43]!==n.id?(F=s.jsxs("div",{"data-task-id":v,role:y,tabIndex:j,onClick:o,onKeyDown:_,className:S,children:[w,z,D]}),e[37]=o,e[38]=z,e[39]=D,e[40]=_,e[41]=S,e[42]=w,e[43]=n.id,e[44]=F):F=e[44],F}const yt=["requires_action","in_progress","failed","expired","completed"];function Ao(t){const e=new Map(yt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return yt.map(n=>({status:n,threads:e.get(n)}))}const zo="sidebar.group.expanded.";function $o(t,e){const n=I.c(3),[l,o]=$e(`${zo}${t}`,e);let i;return n[0]!==l||n[1]!==o?(i=[l,o],n[0]=l,n[1]=o,n[2]=i):i=n[2],i}function rs(t){const e=I.c(18),{onClick:n,isFetching:l,indented:o}=t,i=B();let r;e[0]!==i?(r=i("sidebar.showMoreButton.ariaLabel"),e[0]=i,e[1]=r):r=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=H("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==l?(c=l&&s.jsx(Ss,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==l||e[7]!==i?(m=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=m):m=e[8];let u;e[9]!==m?(u=s.jsx("span",{children:m}),e[9]=m,e[10]=u):u=e[10];let p;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==u?(p=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,u]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=u,e[17]=p):p=e[17],p}function Oo(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Eo(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Pe=0;const Ye=[];function Do(){for(;Pe<as&&Ye.length>0;){const t=Ye.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Do()})};Pe<as?l():Ye.push(l)})}const Ee=10;function _t(t,e,n,l,o){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const r={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return r.status=e,r}function Ro(t,e,n,l){let o=0;for(const i of t)ds(i,e,n,l)&&o++;return o}function Fe(t,e,n,l){return Ro(t,e,n,l)}function Fo(t,e){return!!(t>=Ee||t===0&&e)}function St(t,e){return t<e}function Lo(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const ze=new Map,Te=new Map;function Go(t,e){return e?t>=Ee?!0:null:!1}function Nt(t){return ze.get(t)}function Ho(t,e){ze.set(t,e)}function Bo(t,e,n){const l=ze.get(t);if(l!==void 0){n(l);return}let o=Te.get(t);o||(o=cs(e).then(i=>(ze.set(t,i),Te.delete(t),i)).catch(()=>(Te.delete(t),Promise.reject(new Error("group probe failed")))),Te.set(t,o)),o.then(n,()=>n(!1))}function Ct(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ee,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Uo(t,e,n,l,o){let i=0;for(const r of t)e.has(r.id)||ds(r,n,l,o)&&i++;return i}function Wo(t,e,n,l){const o=I.c(8),{org:i}=Q(),r=Oo(i.id,t,e,n);let a;o[0]!==n?(a=Eo(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,m]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const u=Cn(),{threads:p,hasMore:x}=Xt(),f=Fe(p,t,e,n),g=Fo(f,x),h=Go(f,x),b=Jt();if(c.identity===r&&c.serverHasMore===null){const N=h??Nt(r);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&h===null&&Nt(r)===void 0&&c.probeSubscribedIdentity!==r&&(m(N=>N.identity===r?{...N,isProbing:!0,probeSubscribedIdentity:r}:N),Bo(r,async()=>{const N=_t(t,e,0,n,1),S=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:w}=Ct(S),k=Fe(u.threads.get(),t,e,n);return w===void 0?!1:St(k,w)},N=>{m(S=>S.identity!==r?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const S=r;m(w=>w.identity===S?{...w,isFetching:!0}:w);try{const w=Fe(p,t,e,n),k=_t(t,e,w,n,Ee),T=await cs(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:M,hasMore:$,totalCount:A}=Ct(T),z=new Set(p.map(Ko)),R=Uo(M,z,t,e,n),E=w;u.mergeThreads(M),m(O=>{if(O.identity!==S)return O;let D;return A!==void 0?D=St(E+R,A):D=M.length===0||R===0?!1:$,Ho(S,D),{...O,isFetching:!1,serverHasMore:D}})}catch(w){const k=w,T=k instanceof Error?k.message:String(k);ce.error(`Could not load more tasks: ${T}`),m(M=>M.identity===S?{...M,isFetching:!1}:M)}},j=c.isFetching||c.isProbing,_=!d&&!j&&Lo(g,c.serverHasMore);let C;return o[2]!==j||o[3]!==y||o[4]!==_||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:_,isFetching:j,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},o[2]=j,o[3]=y,o[4]=_,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function Ko(t){return t.id}function qo(t){const e=I.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:p,serverHasMore:x}=Wo("status",n,d),[f,g]=G.useState(!1);!f&&l.length===0&&x===!0&&!c&&!m&&(g(!0),queueMicrotask(()=>{u()}));let h;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let y;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(y=j=>s.jsx(is,{task:j,isActive:o===j.id,onClick:()=>i(j),onArchive:a&&j.created_by===d.currentUserId?()=>r(j):void 0,showAutomationBadge:!!j.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},j.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=y):y=e[12],h=l.map(y),e[0]=o,e[1]=a,e[2]=d,e[3]=r,e[4]=i,e[5]=l,e[6]=h}else h=e[6];let b;e[13]!==p||e[14]!==c||e[15]!==u?(b=(p||c)&&s.jsx(rs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=p,e[14]=c,e[15]=u,e[16]=b):b=e[16];let v;return e[17]!==h||e[18]!==b?(v=s.jsxs(s.Fragment,{children:[h,b]}),e[17]=h,e[18]=b,e[19]=v):v=e[19],v}function Vo(t){const e=I.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=Rn[n],m=c.icon,[u,p]=$o(`status-${n}`,!1);let x;e[0]!==u||e[1]!==p?(x=function(){p(!u)},e[0]=u,e[1]=p,e[2]=x):x=e[2];const f=x;let g;e[3]!==f?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),f())},e[3]=f,e[4]=g):g=e[4];let h;e[5]!==m||e[6]!==c.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=h):h=e[7];let b;e[8]!==u?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(Ln,{size:14}):s.jsx(Ft,{size:14})}),e[8]=u,e[9]=b):b=e[9];let v;e[10]!==h||e[11]!==b?(v=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,b]}),e[10]=h,e[11]=b,e[12]=v):v=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let j;e[15]!==l.length?(j=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=j):j=e[16];let _;e[17]!==u||e[18]!==f||e[19]!==g||e[20]!==v||e[21]!==y||e[22]!==j?(_=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:f,onKeyDown:g,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[v,y,j]}),e[17]=u,e[18]=f,e[19]=g,e[20]=v,e[21]=y,e[22]=j,e[23]=_):_=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==u||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(qo,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=u,e[27]=d,e[28]=r,e[29]=i,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==_||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,C]}),e[33]=_,e[34]=C,e[35]=N):N=e[35],N}function kt(t){const e=I.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(On,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const b=u?"No chats match your filters":"No chats yet";let v;return e[1]!==b?(v=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=v):v=e[2],v}const p=n.length>1||d;if(l==="status"){let h;if(e[3]!==o||e[4]!==p||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let v;e[10]!==o||e[11]!==p||e[12]!==a||e[13]!==r||e[14]!==i?(v=y=>s.jsx(Vo,{status:y.status,threads:y.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:p,filters:a},y.status),e[10]=o,e[11]=p,e[12]=a,e[13]=r,e[14]=i,e[15]=v):v=e[15],h=Ao(n).map(v),e[3]=o,e[4]=p,e[5]=a,e[6]=r,e[7]=i,e[8]=n,e[9]=h}else h=e[9];let b;return e[16]!==h?(b=s.jsx(s.Fragment,{children:h}),e[16]=h,e[17]=b):b=e[17],b}let x;if(e[18]!==o||e[19]!==p||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let h;e[25]!==o||e[26]!==p||e[27]!==a||e[28]!==r||e[29]!==i?(h=b=>s.jsx(is,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:p&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=p,e[27]=a,e[28]=r,e[29]=i,e[30]=h):h=e[30],x=n.map(h),e[18]=o,e[19]=p,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=x}else x=e[24];let f;e[31]!==d||e[32]!==c||e[33]!==m?(f=(d||c)&&s.jsx(rs,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=f):f=e[34];let g;return e[35]!==x||e[36]!==f?(g=s.jsxs(s.Fragment,{children:[x,f]}),e[35]=x,e[36]=f,e[37]=g):g=e[37],g}function Yo(t,e,n){if(!n)return;const l=t.findIndex(o=>o.id===e);if(l!==-1){for(let o=l+1;o<t.length;o++){const i=t[o];if(i?.created_by===n)return i}for(let o=l-1;o>=0;o--){const i=t[o];if(i?.created_by===n)return i}}}function wt(t){const e=I.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const p=o&&"bg-sidebar-accent text-foreground";let x;e[4]!==p?(x=H("md:size-[34px] rounded-lg",p),e[4]=p,e[5]=x):x=e[5];let f;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(f=s.jsx(je,{asChild:!0,children:s.jsx(ke,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=f):f=e[10];let g;e[11]!==n?(g=s.jsx(ve,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let h;return e[13]!==r||e[14]!==f||e[15]!==g?(h=s.jsxs(ye,{open:r,children:[f,g]}),e[13]=r,e[14]=f,e[15]=g,e[16]=h):h=e[16],h}function Le(t){const e=I.c(13),{label:n,value:l,onChange:o,options:i}=t;let r;e[0]!==n?(r=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==o?(a=u=>u&&o(u),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Xo),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Sn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==r||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=m):m=e[12],m}function Xo(t){return s.jsxs(_n,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ms({onNavigate:t}={}){const e=B(),{data:n}=Ae.useSession(),l=n?.user?.id,{org:o}=Q(),i=Dt({connectionId:Rt,orgId:o.id,orgSlug:o.slug}),r=rt(o.id).id,a=Nn(),{threads:d,hasMore:c,isFetchingMore:m,fetchNextPage:u}=Xt(),p=d.filter(P=>!P.hidden),{hide:x,setScope:f}=kn(),g=ae(),{setTaskId:h,createNewTask:b}=Qt(),v=Ns({strict:!1}),y=It({strict:!1}),j=v.taskId??null,_=y.virtualmcpid??d.find(P=>P.id===j)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...p].sort((P,L)=>(L.updated_at??"").localeCompare(P.updated_at??"")),[S,w]=G.useState("all"),[k,T]=G.useState("flat"),[M,$]=$e("sidebar-threads-scope-all",!1),[A,z]=G.useState(!1),[R,E]=G.useState(!1),O={type:S,member:"mine",currentUserId:l??null},D={};M||(D.created_by="me"),f(D);const F=P=>l?P.filter(L=>L.created_by===l):[],K=P=>S==="automation"?P.filter(L=>!!L.trigger_id):S==="manual"?P.filter(L=>!L.trigger_id):P,Z=F(N),ne=K(Z),de=K(N),oe=M?de:ne,ee=P=>{if(l&&P.created_by&&P.created_by!==l)return;const L=P.id===j;if(x(P.id),Mn(P.id),!L)return;const W=Yo(oe,P.id,l);C(),W?h(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},le=P=>{C(),h(P.id,P.virtual_mcp_id)},me=async P=>{try{const L=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:P,limit:1,offset:0}});return((L.structuredContent??L).items?.length??0)===0}catch{return!1}},Se=async()=>{const P=_??r;V("sidebar_new_thread_clicked",{virtual_mcp_id:P});const L=Z.find(W=>W.virtual_mcp_id===P&&W.title==="New chat");if(L&&await me(L.id)){C(),h(L.id,P);return}C(),b(P)},{state:ue,isMobile:fe,toggleSidebar:pe}=_e();if(ue==="collapsed"&&!fe){const P=rt(o.id),L=new Map((a??[]).map(U=>[U.id,U])),W=U=>(U?L.get(U):void 0)??(U===r?P:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Ws,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Y,{tooltip:o.name,children:s.jsx(Ks,{org:o,size:"sm"})})})}),s.jsxs(J,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(q,{children:s.jsx(Y,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:pe,children:s.jsx(Lt,{size:16})})}),oe.map(U=>{const re=W(U.virtual_mcp_id);return s.jsx(q,{children:s.jsx(Y,{"aria-label":U.title||e("sidebar.taskGroupsList.newChat"),tooltip:U.title||e("sidebar.taskGroupsList.newChat"),isActive:U.id===j,onClick:()=>le(U),children:s.jsx(Ce,{icon:re?.icon??null,name:re?.title??"Agent",size:"xs"})})},U.id)})]})]})}const X=k!=="flat"||S!=="all"||M===!0,he=s.jsxs(Gt,{children:[s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx(Ht,{asChild:!0,children:s.jsxs(ke,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:X,className:"md:size-[34px] rounded-lg",children:[s.jsx(yn,{size:16}),X&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ve,{side:"bottom",children:e("sidebar.taskGroupsList.filterChats")})]}),s.jsxs(Bt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Le,{label:e("sidebar.taskGroupsList.filterView"),value:k,onChange:P=>{V("tasks_panel_group_by_changed",{to_value:P}),T(P)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(an,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(cn,{size:13})}]}),s.jsx(Le,{label:e("sidebar.taskGroupsList.filterType"),value:S,onChange:P=>{V("tasks_panel_filter_changed",{to_value:P}),w(P)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(Le,{label:e("sidebar.taskGroupsList.filterScope"),value:M?"team":"mine",onChange:P=>$(P==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),te=P=>s.jsx(Ut,{delayDuration:300,children:s.jsxs("div",{className:H("shrink-0 flex items-center justify-between",P?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!P&&s.jsx(es,{className:"md:size-[34px] rounded-lg"}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(wt,{label:e("sidebar.taskGroupsList.searchChats"),onClick:()=>{V("tasks_panel_search_opened"),E(!0),z(!0)},children:s.jsx(dn,{size:16})}),s.jsx(wt,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{Se()},children:s.jsx(mn,{size:16})})]})]})});return fe?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!0),s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:j,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:X})}),R&&s.jsx(vt,{open:A,onOpenChange:z})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[te(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(jt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(kt,{threads:oe,groupBy:k,activeTaskId:j,onSelectTask:le,onArchiveTask:ee,filters:O,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:X})})}),R&&s.jsx(vt,{open:A,onOpenChange:z})]})}const Qo=5,Jo=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function us(){const t=I.c(3),{state:e}=_e();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Qo}).map(tl)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"})]}),s.jsx(se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Jo.map(Zo)})]}),t[2]=l):l=t[2],l}function Zo(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(se,{className:"size-5 rounded-full shrink-0"}),s.jsx(se,{className:H("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(el)})]},e)}function el(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(se,{className:"h-3 flex-1 rounded-sm"})},e)}function tl(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function sl(){const t=I.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(He,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(He,{}),s.jsx(st,{})]}),t[1]=n):n=t[1],n}function nl(){const t=I.c(5),e=ss();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(wo,{}),l=s.jsx(sl,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[2]=o):o=t[2];let i;return t[3]!==e?(i=s.jsx(ts,{children:s.jsx(ls,{sections:e,footer:n,header:l,additionalContent:o})}),t[3]=e,t[4]=i):i=t[4],i}function ol(t){const e=I.c(8),{onClose:n}=t,l=ss();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Mo,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(us,{}),e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx(Xe,{children:s.jsx(G.Suspense,{fallback:i,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==r?(a=s.jsx(ts,{children:s.jsx(ro,{sections:l,onClose:n,footer:o,additionalContent:r})}),e[4]=n,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}const ll="sidebar.open";function il(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ks,{}),t[0]=e):e=t[0],e}function Tr(){const t=I.c(37),e=At(),n=nt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{connect:o,siteUrl:i}=It(l),r=o==="1",[a,d]=$e(ll,!1),{width:c,wrapperRef:m,onStartResize:u,resetWidth:p}=Zn(),x=e;let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{}),t[1]=f):f=t[1];let g;t[2]!==n?(g=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(st,{})}),t[2]=n,t[3]=g):g=t[3];let h,b,v,y,j;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ve,{}),b=s.jsx(xe.TogglesSlot,{}),v=s.jsx(xe.TabsSlot,{className:"shrink-0"}),y=s.jsx(xe.CenterSlot,{}),j=s.jsx(xe.RightSlot,{}),t[4]=h,t[5]=b,t[6]=v,t[7]=y,t[8]=j):(h=t[4],b=t[5],v=t[6],y=t[7],j=t[8]);let _;t[9]!==g?(_=s.jsx(xe.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[f,g,h,b,v,y,j]})}),t[9]=g,t[10]=_):_=t[10];const C=_;let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={background:"transparent",containerType:"inline-size"},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Is,{className:"flex flex-col min-h-0",style:N,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(G.Suspense,{fallback:s.jsx(il,{}),children:s.jsx(Cs,{})})})})}),t[12]=S):S=t[12];const w=S,k=x&&C,T=`${c}px`;let M;t[13]!==T?(M={"--sidebar-width":T,"--sidebar-width-icon":"3.125rem"},t[13]=T,t[14]=M):M=t[14];const $=M;let A;t[15]!==e||t[16]!==u||t[17]!==p?(A=!e&&s.jsxs(s.Fragment,{children:[s.jsx(nl,{}),s.jsx(Xn,{onPointerDown:u,onDoubleClick:p})]}),t[15]=e,t[16]=u,t[17]=p,t[18]=A):A=t[18];let z;t[19]!==$||t[20]!==A||t[21]!==m?(z=s.jsxs(Ts,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:$,children:[A,w]}),t[19]=$,t[20]=A,t[21]=m,t[22]=z):z=t[22];let R;t[23]!==e?(R=e&&s.jsx($n,{renderSidebar:rl}),t[23]=e,t[24]=R):R=t[24];let E;t[25]!==i||t[26]!==r?(E=r&&s.jsx(Wn,{siteUrl:i}),t[25]=i,t[26]=r,t[27]=E):E=t[27];let O;t[28]!==k||t[29]!==z||t[30]!==R||t[31]!==E?(O=s.jsx(jn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,z,R,E]})}),t[28]=k,t[29]=z,t[30]=R,t[31]=E,t[32]=O):O=t[32];let D;return t[33]!==d||t[34]!==a||t[35]!==O?(D=s.jsx(wn,{children:s.jsx(xe.Provider,{children:s.jsx(Ps,{open:a,onOpenChange:d,children:O})})}),t[33]=d,t[34]=a,t[35]=O,t[36]=D):D=t[36],D}function rl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(ol,{onClose:e})})})}export{Tr as default};