decocms 4.584.5 → 4.584.6

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 (472) hide show
  1. package/dist/client/assets/{AlertCircle-mj0sz0gj.js → AlertCircle-CPiOwWun.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DSUaBnyJ.js → AreaChart-DviRRHwS.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft--TSM2Ux3.js → ArrowLeft-BmNyLgKT.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BVFSrvKf.js → ArrowRight-eaR9pEFa.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-D2bbOB2w.js → ArrowUp-jEyjY7ti.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-CTUEdBiB.js → BookOpen01-anezSoTd.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DynFqoj3.js → CartesianChart-CCoStszf.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-_BlSk5IS.js → CategoricalChart-D4s5JRnh.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-BsBF4S8u.js → CheckCircle-Cyt1BwLE.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CNlehUMA.js → ChevronDown-DHu3fSw0.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BdBrg7yc.js → ChevronSelectorVertical-CADaAEiD.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BIaMfxq-.js → ChevronUp-XsNgN3o9.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-gHUc2u28.js → CreditCard01-Cu1-B7H4.js} +1 -1
  14. package/dist/client/assets/{Eye-Xo5rS9iJ.js → Eye-w_JiO-fJ.js} +1 -1
  15. package/dist/client/assets/{File02-uZRQiPOp.js → File02-CG-VTATo.js} +1 -1
  16. package/dist/client/assets/{Globe04-DhsnPBDD.js → Globe04-OpdFYH01.js} +1 -1
  17. package/dist/client/assets/{Image01-C5Xqhwp5.js → Image01-Y2lD5lzL.js} +1 -1
  18. package/dist/client/assets/{Key01-h9Y3uaT_.js → Key01-BzZWEKIv.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-CPMSR00X.js → LayoutLeft-BRKXPCjt.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-CxV1rDqL.js → LinkBroken01-oT9QqlUI.js} +1 -1
  21. package/dist/client/assets/MessageCircle01-Ccsb6qrK.js +1 -0
  22. package/dist/client/assets/{Minus-D55MDhYc.js → Minus-CqZyDWGo.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CBUOgSaC.js → Monitor01-BwGctKTP.js} +1 -1
  24. package/dist/client/assets/{Play-zsnTCnBK.js → Play-CBJR-IvJ.js} +1 -1
  25. package/dist/client/assets/{Plus-DAYIm6ow.js → Plus-INbg-jHc.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-Ccilwreq.js → ReferenceLine-xYjCzhRl.js} +1 -1
  27. package/dist/client/assets/{SearchMd-CTSUPag9.js → SearchMd-zyGFO7cc.js} +1 -1
  28. package/dist/client/assets/{ShoppingBag01-CF4EYiC_.js → ShoppingBag01-DM_RSubP.js} +1 -1
  29. package/dist/client/assets/{Sun-B-xu6eHR.js → Sun-DjNmeFt2.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-qTGCOGX6.js → SwitchHorizontal01-Cfysn-sK.js} +1 -1
  31. package/dist/client/assets/{Tool01-Bscrvuft.js → Tool01-BR1SF2OD.js} +1 -1
  32. package/dist/client/assets/{Tooltip-EHWPdrLL.js → Tooltip-A8NJxZe2.js} +1 -1
  33. package/dist/client/assets/{Trash01-CevYpZEM.js → Trash01-thCRPjRX.js} +1 -1
  34. package/dist/client/assets/{TrendUp01-DMf7H3tv.js → TrendUp01-PuhB09lM.js} +1 -1
  35. package/dist/client/assets/{Upload01-C_8HEOMT.js → Upload01-phZoBZ05.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-4mEtfdkD.js → UserCheck01-D6gLgI3l.js} +1 -1
  37. package/dist/client/assets/{UserSquare-oo1b4ulW.js → UserSquare-BHfTOZb7.js} +1 -1
  38. package/dist/client/assets/{Users01-av_p4B03.js → Users01-DVJrVMQW.js} +1 -1
  39. package/dist/client/assets/{XClose-WYCPZpkD.js → XClose-_lsllZaX.js} +1 -1
  40. package/dist/client/assets/{Zap-C-VVHO-P.js → Zap-B4USkjaG.js} +1 -1
  41. package/dist/client/assets/{access-gate-CBj6VxJ7.js → access-gate-BNdHKm1_.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-CVC64Gmd.js → add-connection-dialog-6UuPoub8.js} +1 -1
  43. package/dist/client/assets/agent-app-lmDlBMa5.js +1 -0
  44. package/dist/client/assets/agent-assets-BN7WhmKl.js +1 -0
  45. package/dist/client/assets/{agent-automation-e9KFVJPg.js → agent-automation-v65X1xNt.js} +1 -1
  46. package/dist/client/assets/agent-automations-BeeN_BVh.js +1 -0
  47. package/dist/client/assets/agent-blog-BFEHxit4.js +2 -0
  48. package/dist/client/assets/agent-blog-post-B1rvGpYz.js +2 -0
  49. package/dist/client/assets/agent-calendar-DBKIf8Hf.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-DEMFK1PG.js → agent-capabilities-BTvAxwai.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-DaR7U6rn.js +1 -0
  52. package/dist/client/assets/agent-deck-CIU6uWE2.js +1 -0
  53. package/dist/client/assets/agent-e2e-110pSWXT.js +1 -0
  54. package/dist/client/assets/agent-experiments-DJt8HpNL.js +1 -0
  55. package/dist/client/assets/agent-file-DhEq-PgR.js +1 -0
  56. package/dist/client/assets/agent-hosting-De3hAgD0.js +1 -0
  57. package/dist/client/assets/agent-icon-BHVUedtV.js +1 -0
  58. package/dist/client/assets/agent-library-Br8v5MtW.js +1 -0
  59. package/dist/client/assets/agent-library-file-B0DaymPI.js +1 -0
  60. package/dist/client/assets/agent-overview-CSM2fYNF.js +1 -0
  61. package/dist/client/assets/{agent-releases-D4ESN3iT.js → agent-releases-DughmMr9.js} +1 -1
  62. package/dist/client/assets/agent-settings-B-H1WO5c.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-DBCTlamd.js → agent-site-editor-CkKxXUCS.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-gGn1LR2B.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-N_B-mw4A.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-DLVtRjzS.js +1 -0
  67. package/dist/client/assets/agent-view-CrGDO6Mp.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-BZTSZPH3.js → agent-view-guard-_mDgSmkI.js} +1 -1
  69. package/dist/client/assets/{ai-providers-Bd027SSh.js → ai-providers-Cxi9FSbe.js} +1 -1
  70. package/dist/client/assets/{alert-fpttYoSQ.js → alert-DxQDfLz2.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-BqryzJvo.js → analytics-sections-Dh2b8_pn.js} +1 -1
  72. package/dist/client/assets/api-keys-B2pOUk_Z.js +1 -0
  73. package/dist/client/assets/{api-keys-DLlJejJF.js → api-keys-Be2yLPsn.js} +1 -1
  74. package/dist/client/assets/app-editor-QhVYHGub.js +1 -0
  75. package/dist/client/assets/{asset-utils-C_CFQkKi.js → asset-utils-D9WZTXXH.js} +1 -1
  76. package/dist/client/assets/{auth-BOZ5swZI.js → auth-Bl-k7r97.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-DXChUDcZ.js → auth-catchall-ByvekoyT.js} +1 -1
  78. package/dist/client/assets/{auth-entry-DMbaj7KI.js → auth-entry-BPxiAcBl.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-DNd6b-pH.js → auth-split-layout-DgG0w0d3.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-Cj46Ik0_.js → authenticate-and-persist-oauth-C1fZAYJ2.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-Cpitkm-C.js → automation-list-row-B3jZpRQS.js} +1 -1
  82. package/dist/client/assets/{automation-runs-BxBjhLC7.js → automation-runs-TDsSFV6_.js} +1 -1
  83. package/dist/client/assets/automations-DFpmHeuU.js +1 -0
  84. package/dist/client/assets/{badge-CEYLDtOG.js → badge-D21Nz4Kd.js} +1 -1
  85. package/dist/client/assets/{block-document-DJdZyw2U.js → block-document-DPaNpm7b.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-LI4fVaaR.js → blocks-preview-workspace-context-C1jP5wlw.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-Bx0tgd5u.js → blocks-tab-states-CRdiUDZv.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-6gNfi5Cv.js → blog-preview-url-DuOaesBL.js} +1 -1
  89. package/dist/client/assets/{blog-schema-BKDvfgHw.js → blog-schema-DejZvpsz.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-BClmYTyo.js → blog-source-gate-BE11jy2O.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-eJ0uCj97.js → blog-view-gate-CbTFiiJR.js} +1 -1
  92. package/dist/client/assets/{buckets-DWNc5IQi.js → buckets-BoV3lkvR.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-CncoFUT6.js → build-improve-prompt-doc-B4DjxnO3.js} +1 -1
  94. package/dist/client/assets/{calendar-B0VrIuVV.js → calendar-DBDouA4h.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-D7_TKHDu.js → capability-load-error-Bn6ne_sq.js} +1 -1
  96. package/dist/client/assets/category-editor-Ckuu4IrY.js +1 -0
  97. package/dist/client/assets/{category-tree-T_JTuIiu.js → category-tree-DA278Cug.js} +1 -1
  98. package/dist/client/assets/{chart-Ef5OJL7Y.js → chart-B0Dqhb4y.js} +1 -1
  99. package/dist/client/assets/{chat-context-BUMEnIPW.js → chat-context-CN0ge7G_.js} +1 -1
  100. package/dist/client/assets/{chat-draft-B7hvjq7e.js → chat-draft-2YOnJD42.js} +1 -1
  101. package/dist/client/assets/{checkbox-BUvWR-iD.js → checkbox-B1iPgrjx.js} +1 -1
  102. package/dist/client/assets/choose-editor-Di3gRusv.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-CIy6cPVO.js → cli-auth-success-CgfmAJWB.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-D1TcT96z.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-BNAdDXxB.js → cms-store-drafts-u7ki7lCC.js} +1 -1
  106. package/dist/client/assets/{collapsible-DYCInqz3.js → collapsible-Cw6OK2nn.js} +1 -1
  107. package/dist/client/assets/collection-detail-B-bIqzEz.js +1 -0
  108. package/dist/client/assets/{collection-display-button-C3xi0T_X.js → collection-display-button-CuVi5neC.js} +1 -1
  109. package/dist/client/assets/{collection-search-CMlKHTQ0.js → collection-search-Z4PinuXc.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-DbIa5pBT.js → collection-table-wrapper-8J2sfJZU.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-ZW6Qb_Ul.js → collection-tabs-attgS7fY.js} +1 -1
  112. package/dist/client/assets/{combobox-CMR7JQ5s.js → combobox-DEB0BlzS.js} +1 -1
  113. package/dist/client/assets/{command-DAachgGl.js → command-_zJuKDCi.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-DFAviA9V.js → companion-mcps-section-DGVC3-Wp.js} +1 -1
  115. package/dist/client/assets/{config-CVrGKu1z.js → config-BATJRdlj.js} +1 -1
  116. package/dist/client/assets/{connect-Dv780Ao_.js → connect-Dmfr5UlW.js} +3 -3
  117. package/dist/client/assets/{connect-key-BcTw1Dit.js → connect-key-68KXBKIV.js} +1 -1
  118. package/dist/client/assets/{connect-layout-DVKIDoAk.js → connect-layout-B8CasJUP.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-DmvQjMo_.js → connect-source-dialog-Czz2ct9m.js} +1 -1
  120. package/dist/client/assets/{connection-CqG6Tj46.js → connection-DbiyGcIj.js} +1 -1
  121. package/dist/client/assets/{connection-card-CMRGPAUW.js → connection-card-Cm_8ZjFM.js} +1 -1
  122. package/dist/client/assets/connection-detail-B2CQl_iE.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-BliOgdtt.js → connection-form-helpers-Bf8srwIN.js} +1 -1
  124. package/dist/client/assets/{connection-slug-BMyTAhb7.js → connection-slug-BFmtX8Pj.js} +1 -1
  125. package/dist/client/assets/connections-DVLBrRQx.js +1 -0
  126. package/dist/client/assets/{content-tab-B1BKIfBg.js → content-tab-B2Ay_G8-.js} +3 -3
  127. package/dist/client/assets/context-a4VYLopJ.js +1 -0
  128. package/dist/client/assets/{context-menu-dPQDOknl.js → context-menu-DkzmRTYN.js} +1 -1
  129. package/dist/client/assets/{context-shell-CU-clPo7.js → context-shell-C0Osmy2y.js} +4 -4
  130. package/dist/client/assets/{create-organization-dialog-BMVp8RKI.js → create-organization-dialog-sc0Ji-Lm.js} +1 -1
  131. package/dist/client/assets/{daily-pulse-BIfjhIvm.js → daily-pulse-Cug1zKXO.js} +1 -1
  132. package/dist/client/assets/{delete-copy-Dyr7i9lK.js → delete-copy-oEZ7hmoE.js} +1 -1
  133. package/dist/client/assets/{device-hint-DBfDHhL1.js → device-hint-0Up2oNr2.js} +1 -1
  134. package/dist/client/assets/discover-BbnMDogo.js +1 -0
  135. package/dist/client/assets/{domain-settings-l_JDVQfq.js → domain-settings-A82VOj7n.js} +1 -1
  136. package/dist/client/assets/{drawer-BtNmmbgW.js → drawer-GUKur5v4.js} +1 -1
  137. package/dist/client/assets/{editor-DJNkhCaU.js → editor-DFpyUa_U.js} +1 -1
  138. package/dist/client/assets/{editor-classes-D6VscvFm.js → editor-classes-BrZH4rK_.js} +1 -1
  139. package/dist/client/assets/{empty-message-BFHsH7_h.js → empty-message-pNIo6swu.js} +1 -1
  140. package/dist/client/assets/{empty-state-Y9RPHES1.js → empty-state-BO8_YMfm.js} +1 -1
  141. package/dist/client/assets/{empty-state-FI4NppsL.js → empty-state-BlGH7QIy.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-Bp3jeDLT.js → experiments-tab-choice-N83ua-pV.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-jaNfclWY.js → extract-connection-data-CZ3WadBx.js} +1 -1
  144. package/dist/client/assets/{feature-gate-32y7GiUu.js → feature-gate-CmVeJQy1.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-nyy14OlO.js → feature-paywall-CxB3q7CQ.js} +1 -1
  146. package/dist/client/assets/file-explorer-DEJ_qRIq.js +2 -0
  147. package/dist/client/assets/{file-preview-DOlPWZsT.js → file-preview-D0PiXMMr.js} +1 -1
  148. package/dist/client/assets/{file-share-button-fnsd2V0Q.js → file-share-button-CTn6vuhs.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-Bw6tHUJI.js → file-type-icon-BoZOJHAX.js} +1 -1
  150. package/dist/client/assets/{folder-icon-A6dxvF3y.js → folder-icon-Db4s-PbL.js} +1 -1
  151. package/dist/client/assets/{form-CE_i7Gc_.js → form-CAsgx2CK.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-D0o7MHwc.js → frame-navigation-BzE9s8s7.js} +1 -1
  153. package/dist/client/assets/{gateway-client-CuVQGtSK.js → gateway-client-zNeoWGKO.js} +1 -1
  154. package/dist/client/assets/{general-CF4LBOhX.js → general-DmuSgNby.js} +1 -1
  155. package/dist/client/assets/{github-icon-BBtraw32.js → github-icon-CIUXCHYd.js} +1 -1
  156. package/dist/client/assets/{held-block-view-BCDffeao.js → held-block-view-Ce7FjzFo.js} +1 -1
  157. package/dist/client/assets/home-DfvWLWjX.js +1 -0
  158. package/dist/client/assets/{home-overview-CvjbBnOC.js → home-overview-DrTiQovk.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-BV7FtBoJ.js → hosted-reconcile-OWVjsnRk.js} +1 -1
  160. package/dist/client/assets/{icon-button-vJpGdaXv.js → icon-button-B2FYU_Bm.js} +1 -1
  161. package/dist/client/assets/{index-BDN2Il8W.js → index-6N05u2FT.js} +1 -1
  162. package/dist/client/assets/{index-Bq8aKp2l.js → index-8HE48uEz.js} +1 -1
  163. package/dist/client/assets/{index-BO5G51Y2.js → index-BUiCUWOI.js} +1 -1
  164. package/dist/client/assets/{index-C-SbeINf.js → index-BYMPhxVC.js} +1 -1
  165. package/dist/client/assets/{index-CJvXv5nj.js → index-C8tbN8yc.js} +1 -1
  166. package/dist/client/assets/{index-DqFWx3BB.js → index-CDCs_KiA.js} +1 -1
  167. package/dist/client/assets/{index-FE1RDBz7.js → index-Cd1d2KVB.js} +1 -1
  168. package/dist/client/assets/{index-CvQo8gKP.js → index-CexiDE6J.js} +1 -1
  169. package/dist/client/assets/{index-DvdlZugw.js → index-Cz7ziqq8.js} +1 -1
  170. package/dist/client/assets/{index-DN6wMhlh.js → index-D-GlxhqC.js} +1 -1
  171. package/dist/client/assets/{index-BBKDsc5X.js → index-DFgV3_JA.js} +1 -1
  172. package/dist/client/assets/index-DIG6wtlF.js +4 -0
  173. package/dist/client/assets/index-DbzQIfNo.js +1 -0
  174. package/dist/client/assets/{index-BfWp2Wnw.js → index-FR7-LkFs.js} +3 -3
  175. package/dist/client/assets/{index-C_tC1dxx.js → index-GXFk32Bw.js} +1 -1
  176. package/dist/client/assets/{index-BFZAeRbT.js → index-HW6xhQCR.js} +1 -1
  177. package/dist/client/assets/{index-redirect-Bl5G9WWk.js → index-redirect-CYieSEon.js} +1 -1
  178. package/dist/client/assets/{index-CcEK8GbM.js → index-y09j8GJz.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-1nr0P0K0.js → infiniteQueryObserver-Bo9y-Vk0.js} +1 -1
  180. package/dist/client/assets/{infra-billing-ho67U0rR.js → infra-billing-D3tyPPPr.js} +1 -1
  181. package/dist/client/assets/{input-BJ5cUSYm.js → input-PMXl5ojy.js} +4 -4
  182. package/dist/client/assets/{input-BNlFS4tL.js → input-oqagqAas.js} +1 -1
  183. package/dist/client/assets/{integration-icon-C4zzzxaS.js → integration-icon-D_iw-M-g.js} +1 -1
  184. package/dist/client/assets/{item-actions-B-wWhBMR.js → item-actions-WlA-gUNT.js} +1 -1
  185. package/dist/client/assets/{jira-icon-geKtCB2v.js → jira-icon-hVbN0Tf4.js} +1 -1
  186. package/dist/client/assets/{label-CWaQ3ANC.js → label-BrDhuinX.js} +1 -1
  187. package/dist/client/assets/{layout-D8a54-AV.js → layout-CldmtRbE.js} +1 -1
  188. package/dist/client/assets/{legacy-admin-welcome-dialog-BnEG9TvC.js → legacy-admin-welcome-dialog-CCTtGdld.js} +1 -1
  189. package/dist/client/assets/{legacy-agents-deep-D40bR2el.js → legacy-agents-deep-CS8Mx6L7.js} +1 -1
  190. package/dist/client/assets/{legacy-main-redirect-Fa4p1NoA.js → legacy-main-redirect-DjyGSD7M.js} +1 -1
  191. package/dist/client/assets/library-BeqMbeTr.js +1 -0
  192. package/dist/client/assets/{library-tab-Bxyd3n6f.js → library-tab-B6NZkMbf.js} +1 -1
  193. package/dist/client/assets/{login-Cdi7iEkU.js → login-YS1-2Nue.js} +1 -1
  194. package/dist/client/assets/{markdown-NetMLX1B.js → markdown-CV0DScZs.js} +1 -1
  195. package/dist/client/assets/{mcp-app-renderer-OOnse3pT.js → mcp-app-renderer-BD-0mBhr.js} +1 -1
  196. package/dist/client/assets/{mcp-oauth-C138KPCE.js → mcp-oauth-ByqxUWfx.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-DOaDVyhA.js → mcp-oauth-DjAD5Pae.js} +1 -1
  198. package/dist/client/assets/{members-r0zAY-Qq.js → members-BzSWZ_o7.js} +1 -1
  199. package/dist/client/assets/{memory-aLB_WhbI.js → memory-D4hrI4rc.js} +1 -1
  200. package/dist/client/assets/{mock-board-Dl0qBjh7.js → mock-board-BbC-KPvo.js} +3 -3
  201. package/dist/client/assets/{monaco-editor-BJmxWrxj.js → monaco-editor-BrHCIY9F.js} +1 -1
  202. package/dist/client/assets/{monitoring-Cd-32_wp.js → monitoring-BaOt4SvI.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-C4l9QgAZ.js → monitoring-stats-row-BoT5RyWa.js} +1 -1
  204. package/dist/client/assets/{multi-select-B_L-qOo_.js → multi-select-CkLH9zDR.js} +1 -1
  205. package/dist/client/assets/{mustache-DsBc8nE5.js → mustache-DbskuLzt.js} +1 -1
  206. package/dist/client/assets/{named-rule-step-C6gSKxIZ.js → named-rule-step-CrkqnZE0.js} +1 -1
  207. package/dist/client/assets/{named-rule-view-D6a00Kd0.js → named-rule-view-pW8NYIwe.js} +1 -1
  208. package/dist/client/assets/{new-project-dialog-B6Lwo0Gj.js → new-project-dialog-BZf8-lvn.js} +1 -1
  209. package/dist/client/assets/{new-project-store-DQsI7Up8.js → new-project-store-D6y4lbf2.js} +1 -1
  210. package/dist/client/assets/{oauth-callback-ZiXhFHTL.js → oauth-callback-BAwQm-0A.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-ai-provider-G3iL8oeJ.js → oauth-callback-ai-provider-DjnR_ws7.js} +1 -1
  212. package/dist/client/assets/{oauth-consent-BXyh0gna.js → oauth-consent-BgXPtZDW.js} +1 -1
  213. package/dist/client/assets/{onboarding-DAsPAll8.js → onboarding-C7bUxdmN.js} +1 -1
  214. package/dist/client/assets/openai-conversation-CaTme7tS.js +3 -0
  215. package/dist/client/assets/{optimistic-project-sidebar-views-DFcCZ-o3.js → optimistic-project-sidebar-views-BiUQva9l.js} +1 -1
  216. package/dist/client/assets/{order-monitor-day-C70gELqf.js → order-monitor-day-BkApoxgW.js} +1 -1
  217. package/dist/client/assets/{organization-choice-DU0Iu2sl.js → organization-choice-D4iDv_H1.js} +1 -1
  218. package/dist/client/assets/{orgs-BX0lk0zT.js → orgs-DTRrUWgx.js} +1 -1
  219. package/dist/client/assets/{own-accounts-section-F5Hyapdn.js → own-accounts-section-xDHmjKlb.js} +1 -1
  220. package/dist/client/assets/{pair-B9IOPXjq.js → pair-UrNHmvwT.js} +6 -6
  221. package/dist/client/assets/{parse-sections--l6s_VwH.js → parse-sections-l0PaukKn.js} +4 -4
  222. package/dist/client/assets/plan-Bj7w0fs-.js +1 -0
  223. package/dist/client/assets/{plan-ladder-NC686t6f.js → plan-ladder-CypWDEbr.js} +1 -1
  224. package/dist/client/assets/{plan-usage-card-WBfanqrN.js → plan-usage-card-Cj8t_uV_.js} +1 -1
  225. package/dist/client/assets/{popover-oFcDtUvN.js → popover-7x26sV4l.js} +1 -1
  226. package/dist/client/assets/post-calendar-DVbpAHSG.js +1 -0
  227. package/dist/client/assets/{post-editor-CcQmW5GV.js → post-editor-BgQsbRBJ.js} +2 -2
  228. package/dist/client/assets/preview-content-5lf6CQ1G.js +1 -0
  229. package/dist/client/assets/{preview-dialog-Cded3kAU.js → preview-dialog-a9oPKORm.js} +1 -1
  230. package/dist/client/assets/{preview-panel-rChZiu-N.js → preview-panel-B-fYqCTc.js} +1 -1
  231. package/dist/client/assets/{preview-tab-zxzhDMiQ.js → preview-tab-CbOIy4cw.js} +3 -3
  232. package/dist/client/assets/{product-picker-dialog-CX9KvtZh.js → product-picker-dialog-BBOB74pM.js} +1 -1
  233. package/dist/client/assets/{profile-NWB9QWdA.js → profile-Dpdofwex.js} +1 -1
  234. package/dist/client/assets/project-app-view-B-IV2rxA.js +1 -0
  235. package/dist/client/assets/{project-apps-D28U2fPi.js → project-apps-FcEysJSf.js} +1 -1
  236. package/dist/client/assets/{project-icon-WyFXKdgN.js → project-icon-BakFKgaM.js} +1 -1
  237. package/dist/client/assets/{project-index-COi5kduS.js → project-index-CH5Eesm9.js} +1 -1
  238. package/dist/client/assets/project-reports-BMkuATss.js +1 -0
  239. package/dist/client/assets/project-tasks-CgegKZFV.js +1 -0
  240. package/dist/client/assets/projects-DCEjx7vT.js +1 -0
  241. package/dist/client/assets/{projects-empty-state-Dvqp2Zzy.js → projects-empty-state-BwEHnw3B.js} +1 -1
  242. package/dist/client/assets/{prompts-DhLlttmt.js → prompts-BekDCd-q.js} +1 -1
  243. package/dist/client/assets/record-editor-BhOWKOqq.js +1 -0
  244. package/dist/client/assets/redirect-editor-DsJ26zj5.js +1 -0
  245. package/dist/client/assets/{reports-CREVrO7v.js → reports-BbFa4xYC.js} +1 -1
  246. package/dist/client/assets/reports-ezYUNDvN.js +1 -0
  247. package/dist/client/assets/reports-onboarding-BDB7TzgU.js +1 -0
  248. package/dist/client/assets/{reports-tab-C197xYdE.js → reports-tab-Q20Na5hW.js} +2 -2
  249. package/dist/client/assets/{repositories-CWMzkWDA.js → repositories-BdnVmM98.js} +1 -1
  250. package/dist/client/assets/repositories-DRNmonrv.js +1 -0
  251. package/dist/client/assets/{repository-binding-BDu0tU0n.js → repository-binding-DdJXPhL-.js} +1 -1
  252. package/dist/client/assets/{repository-picker-DKoD0HVQ.js → repository-picker-DcD51j3V.js} +1 -1
  253. package/dist/client/assets/{require-capability-DXiZ0OON.js → require-capability-Bw_S94S7.js} +1 -1
  254. package/dist/client/assets/{required-auth-layout-ZTLOobSH.js → required-auth-layout-81VJBEp9.js} +1 -1
  255. package/dist/client/assets/{reset-password-DiEnHrUJ.js → reset-password-DHH7NYOb.js} +1 -1
  256. package/dist/client/assets/resizable-BrnNepSm.js +1 -0
  257. package/dist/client/assets/{resolve-tab-icon-C99S9oDL.js → resolve-tab-icon-BAO1NHl-.js} +1 -1
  258. package/dist/client/assets/{review-settings-Brit3pLv.js → review-settings-vBNXtecT.js} +1 -1
  259. package/dist/client/assets/{role-color-Ddqyp0w6.js → role-color-BaWVUb4j.js} +1 -1
  260. package/dist/client/assets/roles-CSUXrIEf.js +1 -0
  261. package/dist/client/assets/route-BUh0V4ZY.js +1 -0
  262. package/dist/client/assets/route-BuT3rimp.js +1 -0
  263. package/dist/client/assets/route-DXSlTAFB.js +1 -0
  264. package/dist/client/assets/{route-page-header-BeG7kyQP.js → route-page-header-Bjz66AQK.js} +1 -1
  265. package/dist/client/assets/{sandbox-git-api-Bwhb8cKq.js → sandbox-git-api-B4kiB_OO.js} +1 -1
  266. package/dist/client/assets/{sandbox-lifecycle-context-Dq2ETPAf.js → sandbox-lifecycle-context-DIPvnGzU.js} +1 -1
  267. package/dist/client/assets/{save-status-BXxefOdA.js → save-status-DUnwCvL6.js} +1 -1
  268. package/dist/client/assets/{schema-CI1Jg9rW.js → schema-CpgLVA1f.js} +1 -1
  269. package/dist/client/assets/{schema-BJIhJXy6.js → schema-Do1srOed.js} +1 -1
  270. package/dist/client/assets/{scroll-area-Dt-NcLdT.js → scroll-area-Cg0VHNwx.js} +1 -1
  271. package/dist/client/assets/{search-input-BjRiuWL9.js → search-input-DLh0nlr5.js} +1 -1
  272. package/dist/client/assets/{search-toggle-BOD5VZ7W.js → search-toggle-n3MSbxdh.js} +1 -1
  273. package/dist/client/assets/{secret-picker-CHt8ZrjG.js → secret-picker-CA4076-F.js} +1 -1
  274. package/dist/client/assets/{secrets-DGZeS_5r.js → secrets-Nc9lZJ4O.js} +1 -1
  275. package/dist/client/assets/{section-array-field-CYFq6Yfv.js → section-array-field-CVPQhOEL.js} +1 -1
  276. package/dist/client/assets/{sections-DBJ1YFK4.js → sections-Cq-1B8bG.js} +1 -1
  277. package/dist/client/assets/sections-editor-DC8FnTKc.js +1 -0
  278. package/dist/client/assets/{select-BXZoshA8.js → select-DO5UmbiK.js} +1 -1
  279. package/dist/client/assets/{select-model-Corsllp1.js → select-model-BxYeGUNe.js} +1 -1
  280. package/dist/client/assets/{seo-editor-CG0nowoP.js → seo-editor-Cb_-6pbC.js} +1 -1
  281. package/dist/client/assets/{separator-Jij0j-j1.js → separator-ClPt1qls.js} +1 -1
  282. package/dist/client/assets/{session-runtime-DFmRKpVg.js → session-runtime-ByRl2V_-.js} +1 -1
  283. package/dist/client/assets/settings-tab-BB4vDZAN.js +1 -0
  284. package/dist/client/assets/{sheet-DT44IVE2.js → sheet-Ba_kC1AK.js} +1 -1
  285. package/dist/client/assets/shell-layout-hxOVAb6r.js +1 -0
  286. package/dist/client/assets/{site-draft-actions-ChPsoqte.js → site-draft-actions-DS6SP7w_.js} +1 -1
  287. package/dist/client/assets/{site-draft-view-CIc7HrWU.js → site-draft-view-DoBMGNxF.js} +1 -1
  288. package/dist/client/assets/site-editor-BzkmccDr.js +1 -0
  289. package/dist/client/assets/{site-editor-toast-D2nHZREM.js → site-editor-toast-CksZ_DBd.js} +1 -1
  290. package/dist/client/assets/skills-CgFC9u75.js +1 -0
  291. package/dist/client/assets/{slider-DCaB9Ine.js → slider-BNKhoqMv.js} +1 -1
  292. package/dist/client/assets/{sortable.esm-CfU7eu9S.js → sortable.esm-DW0wRpPm.js} +1 -1
  293. package/dist/client/assets/{sso-BEMT6JJw.js → sso-BrpFyhwL.js} +1 -1
  294. package/dist/client/assets/{suggestion-BO6GNdWk.js → suggestion-DNn_oFJd.js} +1 -1
  295. package/dist/client/assets/{super-agent-icon-Cu5ZQ2qC.js → super-agent-icon-Cvg_K_iL.js} +1 -1
  296. package/dist/client/assets/{switch-CfCCzQdg.js → switch-BHmi6NG_.js} +1 -1
  297. package/dist/client/assets/{synced-repos-gHf8sPwV.js → synced-repos-DRSlgzhQ.js} +1 -1
  298. package/dist/client/assets/{tab-icon-glyph-hPo-Gg9t.js → tab-icon-glyph-C0mr7ZyN.js} +1 -1
  299. package/dist/client/assets/{table-BG-lRGNn.js → table-Vs3bc_5a.js} +1 -1
  300. package/dist/client/assets/{tabs-DQRKyhjY.js → tabs-DD53shfE.js} +1 -1
  301. package/dist/client/assets/{task-board-B-hxKp5U.js → task-board-WdgeTNaU.js} +1 -1
  302. package/dist/client/assets/{task-key-DjK7Kw8s.js → task-key-BOhf6PeF.js} +1 -1
  303. package/dist/client/assets/{task-route-BwC6Um2K.js → task-route-CKQNtOSa.js} +1 -1
  304. package/dist/client/assets/{task-status-BiZeTmx1.js → task-status-DDLp4MtP.js} +1 -1
  305. package/dist/client/assets/taskboard-analytics-D59d7L_v.js +1 -0
  306. package/dist/client/assets/{tasks-Dac_YLSj.js → tasks-BJ9tMJk-.js} +1 -1
  307. package/dist/client/assets/tasks-Ch925UQU.js +1 -0
  308. package/dist/client/assets/{textarea-DAZ3avm9.js → textarea-HB4U7ZGE.js} +1 -1
  309. package/dist/client/assets/thread-analytics-_YhjJKsQ.js +1 -0
  310. package/dist/client/assets/thread-button-Qhfu18qZ.js +1 -0
  311. package/dist/client/assets/{thread-intent-BtcwbxTJ.js → thread-intent-DDQe6PKd.js} +1 -1
  312. package/dist/client/assets/{thread-route-Ds6Wombz.js → thread-route-H2DC02zF.js} +1 -1
  313. package/dist/client/assets/thread-route-nxXeVQI9.js +1 -0
  314. package/dist/client/assets/{thread-sheet-body-Kjk5YJ_A.js → thread-sheet-body-B63iYWkR.js} +1 -1
  315. package/dist/client/assets/{time-range-picker-y-R1DMgB.js → time-range-picker-D62EphZs.js} +1 -1
  316. package/dist/client/assets/{toggle-group-BgBCZLaa.js → toggle-group-DsHNAW_o.js} +1 -1
  317. package/dist/client/assets/{tool-set-selector-tZKV1bCv.js → tool-set-selector-q7g0t0TT.js} +1 -1
  318. package/dist/client/assets/{toolbar-icon-button-CaY1wsmY.js → toolbar-icon-button-D2GZy3ji.js} +1 -1
  319. package/dist/client/assets/{tooltip-CqV-qcYU.js → tooltip-zEsMTxPP.js} +1 -1
  320. package/dist/client/assets/{tooltipContext-5-7GWaNH.js → tooltipContext-DnSCkdE2.js} +1 -1
  321. package/dist/client/assets/{track-qijzY7O9.js → track-CUdkdM9q.js} +1 -1
  322. package/dist/client/assets/{types-DRaoZ_4I.js → types-DMMPR8qW.js} +1 -1
  323. package/dist/client/assets/{url-slug-CTOX8lQF.js → url-slug-DDGhX66k.js} +1 -1
  324. package/dist/client/assets/{usage-stats-BXxRbW0f.js → usage-stats-DV0A8cEM.js} +1 -1
  325. package/dist/client/assets/{use-ai-providers-DgsrHLV3.js → use-ai-providers-CTFkZoGo.js} +1 -1
  326. package/dist/client/assets/{use-api-keys-1S0yfr-w.js → use-api-keys-hOWMp9oQ.js} +1 -1
  327. package/dist/client/assets/{use-apply-named-rule-DK9k5f8X.js → use-apply-named-rule-CTLfcvn0.js} +1 -1
  328. package/dist/client/assets/use-ask-in-chat-BSMZ4qaC.js +1 -0
  329. package/dist/client/assets/{use-automations-lWDVj-CU.js → use-automations-DCTTlEcO.js} +1 -1
  330. package/dist/client/assets/{use-autosave-CQIToQsM.js → use-autosave-Rfdg2I1F.js} +1 -1
  331. package/dist/client/assets/use-blocks-v8-project-ou9QCF6v.js +1 -0
  332. package/dist/client/assets/use-blog-view-Ba0QG6QU.js +1 -0
  333. package/dist/client/assets/{use-chat-layout-state-CS1wv5hl.js → use-chat-layout-state-vbFKmjxB.js} +1 -1
  334. package/dist/client/assets/{use-cms-publish-actions-BoXieLUR.js → use-cms-publish-actions-BHXk9tUC.js} +1 -1
  335. package/dist/client/assets/{use-connect-companion-C2Xf2qzV.js → use-connect-companion-BnUK_glG.js} +1 -1
  336. package/dist/client/assets/{use-connection-Df8_gpBB.js → use-connection-BHM3BFUr.js} +1 -1
  337. package/dist/client/assets/{use-content-sync-DzzCDnXY.js → use-content-sync-BApKNkG6.js} +1 -1
  338. package/dist/client/assets/{use-copy-CCrC_M79.js → use-copy-d7u6BVsA.js} +1 -1
  339. package/dist/client/assets/{use-current-view-B5rf1h54.js → use-current-view-D_ifkjui.js} +1 -1
  340. package/dist/client/assets/{use-date-fns-locale-Csnyj6_G.js → use-date-fns-locale-BfEJ9DKB.js} +1 -1
  341. package/dist/client/assets/{use-debounced-autosave-BNJwBoKC.js → use-debounced-autosave-C8qW25SA.js} +1 -1
  342. package/dist/client/assets/{use-debounced-value-DFWDa0qH.js → use-debounced-value-COFfhICA.js} +1 -1
  343. package/dist/client/assets/{use-deco-credits-CuB-vVK3.js → use-deco-credits-BcE9Lgca.js} +1 -1
  344. package/dist/client/assets/{use-decopilot-events-B7ke0MhO.js → use-decopilot-events-DY8bcy2g.js} +1 -1
  345. package/dist/client/assets/{use-delete-block-ZPB3I9Ns.js → use-delete-block-CGqlkyBO.js} +1 -1
  346. package/dist/client/assets/{use-delete-connection-Zvzh2eht.js → use-delete-connection-D1aTQQJm.js} +1 -1
  347. package/dist/client/assets/{use-deployment-admin-B4GqO2uv.js → use-deployment-admin-DgU-c4bG.js} +1 -1
  348. package/dist/client/assets/{use-entitlements-CQZj5lkl.js → use-entitlements-b0vun-2_.js} +1 -1
  349. package/dist/client/assets/{use-fast-preview-draft-url-DYyM21UT.js → use-fast-preview-draft-url-DncEMB04.js} +1 -1
  350. package/dist/client/assets/{use-file-configs-CyAC1Jn2.js → use-file-configs-CwMKmvEP.js} +1 -1
  351. package/dist/client/assets/{use-id-selection-CE2G3E6f.js → use-id-selection-DCKB_8sF.js} +1 -1
  352. package/dist/client/assets/{use-in-settings-CRUM5hPE.js → use-in-settings-CK5SsWhS.js} +1 -1
  353. package/dist/client/assets/{use-inbox-feed-uWC2MWJH.js → use-inbox-feed-CHFMf-DP.js} +1 -1
  354. package/dist/client/assets/{use-infinite-scroll-Cz_t92ww.js → use-infinite-scroll-BhP62VAS.js} +1 -1
  355. package/dist/client/assets/{use-join-requests-CS1fqgjk.js → use-join-requests-DeocFvqW.js} +1 -1
  356. package/dist/client/assets/{use-main-panel-tabs-DwCoiX2k.js → use-main-panel-tabs-Du7tjex6.js} +1 -1
  357. package/dist/client/assets/{use-mcp-auth-status-CyjIfVIk.js → use-mcp-auth-status-BQeDa9px.js} +1 -1
  358. package/dist/client/assets/{use-mcp-client-HASDr5yn.js → use-mcp-client-B9e5PyU5.js} +1 -1
  359. package/dist/client/assets/{use-mcp-prompts-CEtDj9VE.js → use-mcp-prompts-DgapPQcC.js} +1 -1
  360. package/dist/client/assets/{use-mcp-tools-CLfN0BYV.js → use-mcp-tools-CxV8OmMI.js} +1 -1
  361. package/dist/client/assets/{use-mobile-UoyYEGbQ.js → use-mobile-Dcp3TiKi.js} +1 -1
  362. package/dist/client/assets/{use-move-blocks-CFb10aGP.js → use-move-blocks-B_Oh4K4K.js} +1 -1
  363. package/dist/client/assets/{use-navigate-to-agent-C4y9eC4A.js → use-navigate-to-agent-8EROExiH.js} +1 -1
  364. package/dist/client/assets/{use-never-published-D71BtZNY.js → use-never-published-Ct3dv44f.js} +1 -1
  365. package/dist/client/assets/{use-org-fs-BAgR3Jkh.js → use-org-fs-CaJ4jOuW.js} +1 -1
  366. package/dist/client/assets/{use-org-notice-DQ7N3XWA.js → use-org-notice-CsHPv0ZT.js} +1 -1
  367. package/dist/client/assets/{use-org-repo-syncs-C556S9To.js → use-org-repo-syncs-ClD66yFB.js} +1 -1
  368. package/dist/client/assets/{use-org-sso-DrDj5K7f.js → use-org-sso-ClZgaz67.js} +1 -1
  369. package/dist/client/assets/{use-organization-settings-BliP9B1t.js → use-organization-settings-D9Z_MLl2.js} +1 -1
  370. package/dist/client/assets/{use-panel-navigate-db4k7dl4.js → use-panel-navigate-ajPZ-O4i.js} +1 -1
  371. package/dist/client/assets/{use-project-native-view-presence-DPg5UqE1.js → use-project-native-view-presence-DhvS9eeS.js} +1 -1
  372. package/dist/client/assets/{use-project-scope-CFftAYVY.js → use-project-scope-DbG1jNVV.js} +1 -1
  373. package/dist/client/assets/{use-recent-apps-CS-hhWwQ.js → use-recent-apps-DaKCzULH.js} +1 -1
  374. package/dist/client/assets/{use-reports-diagnostic-CYymDS51.js → use-reports-diagnostic-BiwUdSSa.js} +1 -1
  375. package/dist/client/assets/{use-sandbox-events-rgvK0R-0.js → use-sandbox-events-DYuy4eXR.js} +1 -1
  376. package/dist/client/assets/{use-secrets-Y_pjIaUL.js → use-secrets-BDnSckIs.js} +1 -1
  377. package/dist/client/assets/{use-section-preview-base-Bkq2jdsn.js → use-section-preview-base-BA-kLqNd.js} +1 -1
  378. package/dist/client/assets/{use-sidebar-collapsed-BtrwP1AE.js → use-sidebar-collapsed-BnOq_oEM.js} +1 -1
  379. package/dist/client/assets/{use-tags-CFlTqeDj.js → use-tags-C6EDrEBG.js} +1 -1
  380. package/dist/client/assets/{use-task-board-analytics-Bm2Eiqvn.js → use-task-board-analytics-DeDE1IEl.js} +1 -1
  381. package/dist/client/assets/{use-task-board-item-prs-BCP6vVwh.js → use-task-board-item-prs-C9H7e6IC.js} +1 -1
  382. package/dist/client/assets/{use-task-board-items-CQPrgy8Z.js → use-task-board-items-C2I9m2B-.js} +1 -1
  383. package/dist/client/assets/{use-task-board-prompts-CywAfsLX.js → use-task-board-prompts-D6cb0B6a.js} +1 -1
  384. package/dist/client/assets/{use-task-metadata-BIpPNwtn.js → use-task-metadata-CQcB7BzK.js} +1 -1
  385. package/dist/client/assets/{use-thread-outputs-BMHx59-u.js → use-thread-outputs-KaWkhSGH.js} +1 -1
  386. package/dist/client/assets/{use-view-draft-kind-DkapSxnZ.js → use-view-draft-kind-CBmzgnXH.js} +1 -1
  387. package/dist/client/assets/{use-voice-input-DyQL3diM.js → use-voice-input-CChbkXIH.js} +1 -1
  388. package/dist/client/assets/useInfiniteQuery-f2vaHavl.js +1 -0
  389. package/dist/client/assets/{useQueries-Bay3GQsV.js → useQueries-DUm4FupI.js} +1 -1
  390. package/dist/client/assets/useSuspenseInfiniteQuery-CSNG6COy.js +1 -0
  391. package/dist/client/assets/{users-DTrW9ZIm.js → users-B87pV5ii.js} +1 -1
  392. package/dist/client/assets/{utils-D1ABa-c2.js → utils-O_zWQ9Z7.js} +1 -1
  393. package/dist/client/assets/variant-calendar-Bh22mlda.js +1 -0
  394. package/dist/client/assets/{variant-matcher-override-y-sjVy0V.js → variant-matcher-override-BLYg6qNr.js} +1 -1
  395. package/dist/client/assets/{view-header-CJ8vxIod.js → view-header-CDvRMzUc.js} +1 -1
  396. package/dist/client/assets/{virtual-mcp-m1o-7tiO.js → virtual-mcp-9Ocfu-kl.js} +1 -1
  397. package/dist/client/assets/{watch-sse-pool-gEMXX-QL.js → watch-sse-pool-DvEr2HwM.js} +1 -1
  398. package/dist/client/index.html +1 -1
  399. package/dist/server/server.js +1 -1
  400. package/package.json +1 -1
  401. package/dist/client/assets/Minimize01-BIynG3Ze.js +0 -1
  402. package/dist/client/assets/agent-app-Ba7JDwY6.js +0 -1
  403. package/dist/client/assets/agent-assets-DlGJDJr0.js +0 -1
  404. package/dist/client/assets/agent-automations-DHP9-Rvp.js +0 -1
  405. package/dist/client/assets/agent-blog-MchyO8b5.js +0 -2
  406. package/dist/client/assets/agent-blog-post-DUN7iPWt.js +0 -2
  407. package/dist/client/assets/agent-calendar-De-Im46e.js +0 -1
  408. package/dist/client/assets/agent-connect-sources-DkfqQk5b.js +0 -1
  409. package/dist/client/assets/agent-deck-Cx2e4txV.js +0 -1
  410. package/dist/client/assets/agent-e2e-cuAg7vvT.js +0 -1
  411. package/dist/client/assets/agent-experiments-CKleoVAf.js +0 -1
  412. package/dist/client/assets/agent-file-BrkmoibI.js +0 -1
  413. package/dist/client/assets/agent-hosting-D__8hPs9.js +0 -1
  414. package/dist/client/assets/agent-icon-Bq_Z7esB.js +0 -1
  415. package/dist/client/assets/agent-library-BfblIp1v.js +0 -1
  416. package/dist/client/assets/agent-library-file-C7p2ZAks.js +0 -1
  417. package/dist/client/assets/agent-overview-NZBYrRRV.js +0 -1
  418. package/dist/client/assets/agent-settings-iY554avh.js +0 -1
  419. package/dist/client/assets/agent-site-editor-code-CaQ191md.js +0 -2
  420. package/dist/client/assets/agent-site-editor-content-4-gXvHBG.js +0 -1
  421. package/dist/client/assets/agent-site-editor-preview-BE075svj.js +0 -1
  422. package/dist/client/assets/agent-view-D12VaGvy.js +0 -1
  423. package/dist/client/assets/api-keys-CQkJKCWp.js +0 -1
  424. package/dist/client/assets/app-editor-CPq25Dfa.js +0 -1
  425. package/dist/client/assets/automations-DhtUKYcW.js +0 -1
  426. package/dist/client/assets/category-editor-Jfh1FEbD.js +0 -1
  427. package/dist/client/assets/choose-editor-C_rrZDqX.js +0 -1
  428. package/dist/client/assets/cms-settings-editor-agl-pdfk.js +0 -1
  429. package/dist/client/assets/collection-detail-BX7pAFmI.js +0 -1
  430. package/dist/client/assets/connection-detail-B2bDZqoS.js +0 -1
  431. package/dist/client/assets/connections-osURCVgm.js +0 -1
  432. package/dist/client/assets/context-SebnQ-fG.js +0 -1
  433. package/dist/client/assets/discover-4UiUWkTa.js +0 -1
  434. package/dist/client/assets/file-explorer-Berv-DjA.js +0 -2
  435. package/dist/client/assets/home-D5e51VDk.js +0 -1
  436. package/dist/client/assets/index-Cu5PtngA.js +0 -4
  437. package/dist/client/assets/index-DVC5Xh86.js +0 -1
  438. package/dist/client/assets/library-OBxcrPA6.js +0 -1
  439. package/dist/client/assets/openai-conversation-BAjqwRPV.js +0 -3
  440. package/dist/client/assets/plan-vHZHG0_E.js +0 -1
  441. package/dist/client/assets/post-calendar-DzBDM3b2.js +0 -1
  442. package/dist/client/assets/preview-content-MbQf8RGA.js +0 -1
  443. package/dist/client/assets/project-app-view-gJDZKZ8F.js +0 -1
  444. package/dist/client/assets/project-reports-DFICoZ3P.js +0 -1
  445. package/dist/client/assets/project-tasks-DHsoMFaC.js +0 -1
  446. package/dist/client/assets/projects-Cm9td8_E.js +0 -1
  447. package/dist/client/assets/record-editor-BaN-J3uT.js +0 -1
  448. package/dist/client/assets/redirect-editor-Dk4GjAcP.js +0 -1
  449. package/dist/client/assets/reports-BjhUDxT0.js +0 -1
  450. package/dist/client/assets/reports-onboarding-DlCteX2-.js +0 -1
  451. package/dist/client/assets/repositories-CpGjSRVu.js +0 -1
  452. package/dist/client/assets/resizable-BArMfXUk.js +0 -1
  453. package/dist/client/assets/roles-C9wYF2gv.js +0 -1
  454. package/dist/client/assets/route-Bhee4AVm.js +0 -1
  455. package/dist/client/assets/route-C0X_ekZH.js +0 -1
  456. package/dist/client/assets/route-cMh_8Xc3.js +0 -1
  457. package/dist/client/assets/sections-editor--Z8msN1o.js +0 -1
  458. package/dist/client/assets/settings-tab-PpyKi5jL.js +0 -1
  459. package/dist/client/assets/shell-layout-CQs-sSUy.js +0 -1
  460. package/dist/client/assets/site-editor-89VkH7GW.js +0 -1
  461. package/dist/client/assets/skills-CgUWJjrb.js +0 -1
  462. package/dist/client/assets/taskboard-analytics-C1hsIKyF.js +0 -1
  463. package/dist/client/assets/tasks-Cvrxb3RD.js +0 -1
  464. package/dist/client/assets/thread-analytics-DGVyUEMu.js +0 -1
  465. package/dist/client/assets/thread-button-Dy4pRky4.js +0 -1
  466. package/dist/client/assets/thread-route-BKnIUDl3.js +0 -1
  467. package/dist/client/assets/use-ask-in-chat-CC9ew9W1.js +0 -1
  468. package/dist/client/assets/use-blocks-v8-project-DwTQhXO1.js +0 -1
  469. package/dist/client/assets/use-blog-view-9w6CHFwT.js +0 -1
  470. package/dist/client/assets/useInfiniteQuery-D5Avp4ip.js +0 -1
  471. package/dist/client/assets/useSuspenseInfiniteQuery-BlIdZ7Pt.js +0 -1
  472. package/dist/client/assets/variant-calendar-CK1882s5.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as D,a4 as ie,ak as Ce,a as fe,K as he,i as pe,b as Z,j as n,r as H,x as Yt,aS as Qt,w as Zt,v as Xt,D as Jt,m as ae,ab as es,h as Ie,B as Ve,aT as ts,ar as pt,t as ss,as as ns,aU as ge,d as Me,E as ye,J as as,aV as rs,aR as Ae,R as xt,X as is,aW as ls,Y as os,aX as Je,au as cs,Z as ds,_ as us,n as et,aY as fs,f as je,U as tt,l as gt,e as ms,u as Ge,aZ as hs,a_ as ps,O as bt,N as vt,a$ as xs,P as Fe}from"./index-FR7-LkFs.js";import{u as gs,C as te,w as bs}from"./index-BYMPhxVC.js";import{u as Le,b as qe,c as be,d as vs,e as ys,s as js,C as Ss}from"./chat-context-CN0ge7G_.js";import{f as ks,b as yt,c as Ts}from"./use-navigate-to-agent-8EROExiH.js";import{d as jt}from"./session-runtime-ByRl2V_-.js";import{s as St,u as kt}from"./use-voice-input-CChbkXIH.js";import{u as $e,a as Tt,b as We,c as _s,d as Ns,e as _t,g as Nt,f as ws}from"./thread-intent-DDQe6PKd.js";import{u as Ye,a as Ps,f as Cs}from"./shell-layout-hxOVAb6r.js";import{a as wt,b as Is,c as Ms}from"./thread-route-H2DC02zF.js";import{u as As,a as Pt,g as _e,b as xe}from"./repository-binding-DdJXPhL-.js";import{b as Ct,a as Ls,u as $s}from"./use-organization-settings-D9Z_MLl2.js";import{u as Qe,d as Es,v as Ds,i as Bs}from"./use-view-draft-kind-CBmzgnXH.js";import{c as Rs,C as Fs,e as Os,b as zs,a as Ks,f as Us}from"./command-_zJuKDCi.js";import{A as Ne,x as Hs,y as Vs,z as Gs,B as qs,C as It,n as Ws,k as Ys}from"./agent-icon-BHVUedtV.js";import{i as Mt}from"./Zap-B4USkjaG.js";import{c as Ee,T as De,a as Be}from"./tooltip-zEsMTxPP.js";import{g as Qs,S as Zs}from"./task-status-DDLp4MtP.js";import{t as Ze}from"./ChevronDown-DHu3fSw0.js";import{u as Xs,s as At}from"./use-ai-providers-CTFkZoGo.js";import{i as Xe}from"./AlertCircle-CPiOwWun.js";import{i as Js}from"./CheckCircle-Cyt1BwLE.js";import{b as st}from"./UserCheck01-D6gLgI3l.js";import{s as nt}from"./XClose-_lsllZaX.js";import{I as Lt}from"./integration-icon-D_iw-M-g.js";import{b as en}from"./use-entitlements-b0vun-2_.js";import{O as tn}from"./pair-UrNHmvwT.js";import{u as sn,a as nn}from"./use-thread-outputs-KaWkhSGH.js";import{u as an}from"./use-deco-credits-BcE9Lgca.js";import{C as rn,u as ln,V as on,a as cn}from"./input-PMXl5ojy.js";import{a as dn}from"./agent-capabilities-BTvAxwai.js";import{o as un,s as fn,u as mn,S as hn}from"./sandbox-lifecycle-context-DIPvnGzU.js";import{E as $t}from"./empty-state-BO8_YMfm.js";import{m as pn,u as xn}from"./use-chat-layout-state-vbFKmjxB.js";import{u as gn,a as bn,i as vn,n as yn,b as jn}from"./cms-store-drafts-u7ki7lCC.js";import{b as at}from"./use-blocks-v8-project-ou9QCF6v.js";import{ChatLayout as rt,useOptionalChatLayout as Sn,OpenMainPanelButton as kn}from"./index-DbzQIfNo.js";import{S as Tn}from"./route-page-header-Bjz66AQK.js";import{S as _n}from"./search-input-DLh0nlr5.js";import{a as Nn,b as wn,P as Pn}from"./popover-7x26sV4l.js";import{T as Et}from"./toolbar-icon-button-D2GZy3ji.js";import{L as Cn,s as In}from"./use-org-notice-CsHPv0ZT.js";import{a as Dt,u as Mn}from"./use-panel-navigate-ajPZ-O4i.js";import{u as Bt}from"./use-main-panel-tabs-Du7tjex6.js";import{T as we}from"./tab-icon-glyph-C0mr7ZyN.js";import{a as An}from"./UserSquare-BHfTOZb7.js";import{t as Ln}from"./MessageCircle01-Ccsb6qrK.js";import{b as $n,c as Rt,S as En,d as Dn}from"./select-DO5UmbiK.js";import{S as Bn}from"./use-sandbox-events-DYuy4eXR.js";import{L as Rn}from"./project-apps-FcEysJSf.js";import{L as Ft,a as Fn}from"./legacy-main-redirect-DjyGSD7M.js";import{u as On}from"./use-mobile-Dcp3TiKi.js";import{L as zn}from"./preview-dialog-a9oPKORm.js";import{O as Kn}from"./markdown-CV0DScZs.js";import{B as it}from"./blocks-preview-workspace-context-C1jP5wlw.js";import{p as Un}from"./virtual-mcp-9Ocfu-kl.js";import"./ArrowUp-jEyjY7ti.js";import"./index-HW6xhQCR.js";import"./checkbox-B1iPgrjx.js";import"./Minus-CqZyDWGo.js";import"./ArrowLeft-BmNyLgKT.js";import"./ChevronSelectorVertical-CADaAEiD.js";import"./Key01-BzZWEKIv.js";import"./Tool01-BR1SF2OD.js";import"./SearchMd-zyGFO7cc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./Monitor01-BwGctKTP.js";import"./Eye-w_JiO-fJ.js";import"./Image01-Y2lD5lzL.js";import"./ArrowRight-eaR9pEFa.js";import"./feature-paywall-CxB3q7CQ.js";import"./plan-ladder-CypWDEbr.js";import"./use-mcp-client-B9e5PyU5.js";import"./auth-Bl-k7r97.js";import"./use-current-view-D_ifkjui.js";import"./use-in-settings-CK5SsWhS.js";import"./use-project-scope-DbG1jNVV.js";import"./use-decopilot-events-DY8bcy2g.js";import"./watch-sse-pool-DvEr2HwM.js";import"./task-board-WdgeTNaU.js";import"./schema-Do1srOed.js";import"./backoff-CrEUbyZT.js";import"./use-blog-view-Ba0QG6QU.js";import"./drawer-GUKur5v4.js";import"./delay-CnY5UFtP.js";import"./Globe04-OpdFYH01.js";import"./use-deployment-admin-DgU-c4bG.js";import"./admin-fetch-BhTJlAsX.js";import"./Plus-INbg-jHc.js";import"./project-icon-BakFKgaM.js";import"./use-debounced-value-COFfhICA.js";import"./new-project-dialog-BZf8-lvn.js";import"./label-BrDhuinX.js";import"./repository-picker-DcD51j3V.js";import"./github-icon-CIUXCHYd.js";import"./useInfiniteQuery-f2vaHavl.js";import"./infiniteQueryObserver-Bo9y-Vk0.js";import"./collection-search-Z4PinuXc.js";import"./BookOpen01-anezSoTd.js";import"./ShoppingBag01-DM_RSubP.js";import"./new-project-store-D6y4lbf2.js";import"./legacy-admin-welcome-dialog-CCTtGdld.js";import"./required-auth-layout-81VJBEp9.js";import"./use-org-sso-ClZgaz67.js";import"./index-GXFk32Bw.js";import"./TrendUp01-PuhB09lM.js";import"./ChevronUp-XsNgN3o9.js";import"./LinkBroken01-oT9QqlUI.js";import"./CreditCard01-Cu1-B7H4.js";import"./File02-CG-VTATo.js";import"./SwitchHorizontal01-Cfysn-sK.js";import"./LayoutLeft-BRKXPCjt.js";import"./Sun-DjNmeFt2.js";import"./Play-CBJR-IvJ.js";import"./Trash01-thCRPjRX.js";import"./Upload01-phZoBZ05.js";import"./Users01-DVJrVMQW.js";import"./index-CexiDE6J.js";import"./collapsible-Cw6OK2nn.js";import"./use-copy-d7u6BVsA.js";import"./usage-stats-DV0A8cEM.js";import"./utils-CVEq3hMx.js";import"./gateway-client-zNeoWGKO.js";import"./form-CAsgx2CK.js";import"./task-key-BOhf6PeF.js";import"./use-task-board-items-C2I9m2B-.js";import"./config-BATJRdlj.js";import"./task-route-CKQNtOSa.js";import"./project-index-CH5Eesm9.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BD-0mBhr.js";import"./types-DMMPR8qW.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-Ba_kC1AK.js";import"./use-connection-BHM3BFUr.js";import"./use-mcp-prompts-DgapPQcC.js";import"./file-type-icon-BoZOJHAX.js";import"./icon-button-B2FYU_Bm.js";import"./chat-draft-2YOnJD42.js";import"./tabs-DD53shfE.js";import"./active-indicator-CCMhAsc_.js";import"./toggle-group-DsHNAW_o.js";import"./input-oqagqAas.js";import"./suggestion-DNn_oFJd.js";import"./use-org-fs-CaJ4jOuW.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-6UuPoub8.js";import"./extract-connection-data-CZ3WadBx.js";import"./metadata-D72DunRR.js";import"./connection-DbiyGcIj.js";import"./url-slug-DDGhX66k.js";import"./connection-card-Cm_8ZjFM.js";import"./connection-slug-BFmtX8Pj.js";import"./textarea-HB4U7ZGE.js";import"./schema-CpgLVA1f.js";import"./connection-form-helpers-Bf8srwIN.js";import"./authenticate-and-persist-oauth-C1fZAYJ2.js";import"./mcp-oauth-DjAD5Pae.js";import"./mcp-oauth-ByqxUWfx.js";import"./collection-tabs-attgS7fY.js";import"./badge-D21Nz4Kd.js";import"./use-infinite-scroll-BhP62VAS.js";import"./useSuspenseInfiniteQuery-CSNG6COy.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./serial-task-queue-CGOeQgpr.js";import"./thread-button-Qhfu18qZ.js";import"./use-sidebar-collapsed-BnOq_oEM.js";import"./resizable-BrnNepSm.js";import"./use-mcp-tools-CxV8OmMI.js";import"./resolve-tab-icon-BAO1NHl-.js";import"./use-task-metadata-CQcB7BzK.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-DhvS9eeS.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-CwMKmvEP.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-5lf6CQ1G.js";import"./file-share-button-CTn6vuhs.js";import"./file-preview-D0PiXMMr.js";import"./utils-O_zWQ9Z7.js";import"./editor-DFpyUa_U.js";const Hn=50;function Vn(t,e){const s=D.c(15),{org:r}=ie(),i=Ce(),{data:a}=fe.useSession(),l=a?.user?.id??"";let o;s[0]!==r.id||s[1]!==l||s[2]!==t?(o=he.agentEntryThreads(r.id,l,t),s[0]=r.id,s[1]=l,s[2]=t,s[3]=o):o=s[3];const d=e&&!!l;let c;s[4]!==i||s[5]!==t?(c=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:Hn,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=c):c=s[6];let u;s[7]!==o||s[8]!==d||s[9]!==c?(u={queryKey:o,enabled:d,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:c},s[7]=o,s[8]=d,s[9]=c,s[10]=u):u=s[10];const f=pe(u);if(!e||!l){let p;return s[11]===Symbol.for("react.memo_cache_sentinel")?(p={status:"idle"},s[11]=p):p=s[11],p}if(!f.data||f.isFetching){let p;return s[12]===Symbol.for("react.memo_cache_sentinel")?(p={status:"loading"},s[12]=p):p=s[12],p}let m;return s[13]!==f.data?(m={status:"ready",threads:f.data},s[13]=f.data,s[14]=m):m=s[14],m}function Gn(t){return!!t.harness_id||!!t.title&&t.title!=="New chat"}function qn(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||Gn(s))}function Wn(){const t=D.c(2),e=As()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?jt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function Yn(t){const e=D.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=Z();let o;e[0]!==a||e[1]!==s?(o=s?n.jsx(Qn,{virtualMcpId:s,size:a}):n.jsx(Ne,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=o):o=e[2];let d;e[3]!==i||e[4]!==l?(d=i&&n.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Mt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=d):d=e[5];let c;return e[6]!==o||e[7]!==d?(c=n.jsxs("div",{className:"relative shrink-0",children:[o,d]}),e[6]=o,e[7]=d,e[8]=c):c=e[8],c}function Qn(t){const e=D.c(6),{virtualMcpId:s,size:r}=t,i=Pt(s);if(!i){let o;return e[0]!==r?(o=n.jsx(Ne,{icon:null,name:"?",size:r}),e[0]=r,e[1]=o):o=e[1],o}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=n.jsx(Ne,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const lt=["thread"];function Zn(t){const e=D.c(53),{open:s,onOpenChange:r,initialQuery:i}=t,a=i===void 0?"":i,[l,o]=H.useState(a),{org:d}=ie(),{setTaskId:c}=Ye(),u=Ce(),f=Z();let m,p,y,b;e[0]!==d.id||e[1]!==l?(b=l.trim(),m=b?20:10,y=pe,p=he.globalSearch(d.id,b,m,lt),e[0]=d.id,e[1]=l,e[2]=m,e[3]=p,e[4]=y,e[5]=b):(m=e[2],p=e[3],y=e[4],b=e[5]);let g;e[6]!==m||e[7]!==u||e[8]!==b?(g=async()=>{const w=await u.call("GLOBAL_SEARCH",{query:b,limit:m,types:[...lt]});return{...w,items:w.items.filter(Xn)}},e[6]=m,e[7]=u,e[8]=b,e[9]=g):g=e[9];let x;e[10]!==s||e[11]!==p||e[12]!==g?(x={queryKey:p,enabled:s,queryFn:g,staleTime:1e4},e[10]=s,e[11]=p,e[12]=g,e[13]=x):x=e[13];const{data:S,isFetching:j}=y(x);let v;e[14]!==S?.items?(v=S?.items??[],e[14]=S?.items,e[15]=v):v=e[15];const h=v;let k;e[16]!==r?(k=w=>{w||o(""),r(w)},e[16]=r,e[17]=k):k=e[17];const T=k;let _;e[18]!==T||e[19]!==c?(_=w=>{T(!1),c(w.id,w.virtual_mcp_id??void 0)},e[18]=T,e[19]=c,e[20]=_):_=e[20];const P=_;let N;e[21]!==f?(N=f("tasksPanel.globalSearchDialog.title"),e[21]=f,e[22]=N):N=e[22];let C;e[23]!==N?(C=n.jsx(Yt,{children:N}),e[23]=N,e[24]=C):C=e[24];let I;e[25]!==f?(I=f("tasksPanel.globalSearchDialog.description"),e[25]=f,e[26]=I):I=e[26];let E;e[27]!==I?(E=n.jsx(Qt,{children:I}),e[27]=I,e[28]=E):E=e[28];let $;e[29]!==C||e[30]!==E?($=n.jsxs(Zt,{className:"sr-only",children:[C,E]}),e[29]=C,e[30]=E,e[31]=$):$=e[31];let M;e[32]!==f?(M=f("tasksPanel.globalSearchDialog.placeholder"),e[32]=f,e[33]=M):M=e[33];let R;e[34]!==l||e[35]!==M?(R=n.jsx(Ks,{value:l,onValueChange:o,placeholder:M}),e[34]=l,e[35]=M,e[36]=R):R=e[36];let F;e[37]!==P||e[38]!==j||e[39]!==h||e[40]!==f||e[41]!==b?(F=n.jsx(Rs,{children:j&&h.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:f("tasksPanel.globalSearchDialog.searching")}):h.length===0?n.jsx(Fs,{children:f("tasksPanel.globalSearchDialog.noResults")}):n.jsx(Os,{heading:b?void 0:f("tasksPanel.globalSearchDialog.recent"),children:h.map(w=>w.type==="thread"?n.jsxs(zs,{value:`thread:${w.id}:${w.title}`,onSelect:()=>P(w),className:"gap-2.5",children:[n.jsx(Yn,{virtualMcpId:w.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:w.title||f("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(w.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${w.id}`):null)})}),e[37]=P,e[38]=j,e[39]=h,e[40]=f,e[41]=b,e[42]=F):F=e[42];let L;e[43]!==R||e[44]!==F?(L=n.jsxs(Us,{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:[R,F]}),e[43]=R,e[44]=F,e[45]=L):L=e[45];let A;e[46]!==$||e[47]!==L?(A=n.jsxs(Xt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[$,L]}),e[46]=$,e[47]=L,e[48]=A):A=e[48];let O;return e[49]!==T||e[50]!==s||e[51]!==A?(O=n.jsx(Jt,{open:s,onOpenChange:T,children:A}),e[49]=T,e[50]=s,e[51]=A,e[52]=O):O=e[52],O}function Xn(t){return t.type==="thread"}function Jn(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function ea(t){return t==="ephemeral"||t.startsWith("thread:")}function Ot(t){const e=D.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:o,hideStatusIdle:d,indented:c}=t,u=Z(),f=Qs(s.status),m=f.icon,p=s.metadata?.kind==="tool_call_run",y=Pt(p?void 0:s.virtual_mcp_id);let b;e[0]!==y?(b=_e(y),e[0]=y,e[1]=b):b=e[1];const g=b;Ps(6e4);const x=l||!!s.trigger_id,S=s.id,j="button",v=0;let h;e[2]!==i?(h=w=>{w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),i())},e[2]=i,e[3]=h):h=e[3];const k=c?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let _;e[4]!==k||e[5]!==T?(_=ae("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=_):_=e[6];let P;e[7]!==p||e[8]!==o||e[9]!==y?.icon||e[10]!==y?.title?(P=o&&!p&&n.jsx(Ne,{icon:y?.icon??null,name:y?.title??"?",size:"2xs"}),e[7]=p,e[8]=o,e[9]=y?.icon,e[10]=y?.title,e[11]=P):P=e[11];let N;e[12]!==x||e[13]!==u?(N=x&&n.jsx(Mt,{size:12,"aria-label":u("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=u,e[14]=N):N=e[14];let C;e[15]!==u||e[16]!==s.title?(C=s.title||u("tasksPanel.taskRow.untitledTask"),e[15]=u,e[16]=s.title,e[17]=C):C=e[17];let I;e[18]!==C?(I=n.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[18]=C,e[19]=I):I=e[19];let E;e[20]!==N||e[21]!==I?(E=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[N,I]}),e[20]=N,e[21]=I,e[22]=E):E=e[22];let $;e[23]!==r||e[24]!==g||e[25]!==s.branch||e[26]!==s.updated_at?($=s.updated_at&&n.jsxs("div",{className:ae("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!ea(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):g?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:es(new Date(s.updated_at))})]}),e[23]=r,e[24]=g,e[25]=s.branch,e[26]=s.updated_at,e[27]=$):$=e[27];let M;e[28]!==E||e[29]!==$?(M=n.jsxs("div",{className:"flex-1 min-w-0",children:[E,$]}),e[28]=E,e[29]=$,e[30]=M):M=e[30];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!d&&n.jsx("span",{className:ae("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":u("tasksPanel.taskRow.statusLabel",{status:u(f.labelKey)}),children:s.status==="in_progress"?n.jsx(Ie,{className:ae("size-3.5",f.iconClassName)}):n.jsx(m,{size:14,className:f.iconClassName})});let L;e[31]!==a||e[32]!==u?(L=a&&n.jsxs(Ee,{children:[n.jsx(De,{asChild:!0,children:n.jsx(Ve,{variant:"ghost",size:"icon","aria-label":u("tasksPanel.taskRow.archiveTask"),onClick:w=>{w.stopPropagation(),a()},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 text-muted-foreground",children:n.jsx(ts,{className:"size-3.5"})})}),n.jsx(Be,{side:"right",children:u("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=u,e[33]=L):L=e[33];let A;e[34]!==F||e[35]!==L?(A=n.jsxs("div",{className:R,children:[F,L]}),e[34]=F,e[35]=L,e[36]=A):A=e[36];let O;return e[37]!==i||e[38]!==M||e[39]!==A||e[40]!==h||e[41]!==_||e[42]!==P||e[43]!==s.id?(O=n.jsxs("div",{"data-task-id":S,role:j,tabIndex:v,onClick:i,onKeyDown:h,className:_,children:[P,M,A]}),e[37]=i,e[38]=M,e[39]=A,e[40]=h,e[41]=_,e[42]=P,e[43]=s.id,e[44]=O):O=e[44],O}const ot=["requires_action","in_progress","failed","expired","completed"];function ta(t){const e=new Map(ot.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return ot.map(s=>({status:s,threads:e.get(s)}))}const ct=["today","yesterday","week","month","older"];function sa(t,e){const s=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate());return Math.round((r.getTime()-s.getTime())/864e5)}function na(t,e){if(!t)return"older";const s=sa(new Date(t),e);return s<=0?"today":s===1?"yesterday":s<7?"week":s<30?"month":"older"}function aa(t,e){const s=new Map(ct.map(r=>[r,[]]));for(const r of t)s.get(na(r.updated_at,e))?.push(r);return ct.map(r=>({bucket:r,threads:s.get(r)??[]})).filter(r=>r.threads.length>0)}const ra="sidebar.group.expanded.";function ia(t,e){const s=D.c(3),[r,i]=pt(`${ra}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function zt(t){const e=D.c(18),{onClick:s,isFetching:r,indented:i}=t,a=Z();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const o=i?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==o?(d=ae("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",o,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==r?(c=r&&n.jsx(Ie,{className:"size-3.5"}),e[4]=r,e[5]=c):c=e[5];let u;e[6]!==r||e[7]!==a?(u=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=u):u=e[8];let f;e[9]!==u?(f=n.jsx("span",{children:u}),e[9]=u,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==s||e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==f?(m=n.jsxs("button",{type:"button","aria-label":l,onClick:s,disabled:r,className:d,children:[c,f]}),e[11]=r,e[12]=s,e[13]=l,e[14]=d,e[15]=c,e[16]=f,e[17]=m):m=e[17],m}function la(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function oa(t){return t.member==="mine"&&!t.currentUserId}const Kt=4;let Te=0;const Ue=[];function ca(){for(;Te<Kt&&Ue.length>0;){const t=Ue.shift();t&&t()}}function Ut(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,ca()})};Te<Kt?r():Ue.push(r)})}const Re=10;function dt(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function da(t,e,s,r){let i=0;for(const a of t)Ht(a,e,s,r)&&i++;return i}function Oe(t,e,s,r){return da(t,e,s,r)}function ua(t,e){return!!(t>=Re||t===0&&e)}function ut(t,e){return t<e}function fa(t,e){return e===!1?!1:e===!0?!0:t}function Ht(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Pe=new Map,Se=new Map;function ma(t,e){return e?t>=Re?!0:null:!1}function ft(t){return Pe.get(t)}function ha(t,e){Pe.set(t,e)}function pa(t,e,s){const r=Pe.get(t);if(r!==void 0){s(r);return}let i=Se.get(t);i||(i=Ut(e).then(a=>(Pe.set(t,a),Se.delete(t),a)).catch(()=>(Se.delete(t),Promise.reject(new Error("group probe failed")))),Se.set(t,i)),i.then(s,()=>s(!1))}function mt(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Re,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function xa(t,e,s,r,i){let a=0;for(const l of t)e.has(l.id)||Ht(l,s,r,i)&&a++;return a}function ga(t,e,s,r){const i=D.c(8),{org:a}=ie(),l=la(a.id,t,e,s);let o;i[0]!==s?(o=oa(s),i[0]=s,i[1]=o):o=i[1];const d=o,[c,u]=H.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==l&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=$e(),{threads:m,hasMore:p}=Tt(),y=Oe(m,t,e,s),b=ua(y,p),g=ma(y,p),x=Ce();if(c.identity===l&&c.serverHasMore===null){const T=g??ft(l);T!==void 0&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:T})}!d&&c.identity===l&&c.serverHasMore===null&&g===null&&ft(l)===void 0&&c.probeSubscribedIdentity!==l&&(u(T=>T.identity===l?{...T,isProbing:!0,probeSubscribedIdentity:l}:T),pa(l,async()=>{const T=dt(t,e,0,s,1),_=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:P}=mt(_),N=Oe(f.threads.get(),t,e,s);return P===void 0?!1:ut(N,P)},T=>{u(_=>_.identity!==l?_:{..._,isProbing:!1,serverHasMore:T})}));const j=async function(){if(c.isFetching||c.isProbing||d)return;const _=l;u(P=>P.identity===_?{...P,isFetching:!0}:P);try{const P=Oe(m,t,e,s),N=dt(t,e,P,s,Re),C=await Ut(()=>x.call("COLLECTION_THREADS_LIST",N)),{items:I,hasMore:E,totalCount:$}=mt(C),M=new Set(m.map(ba)),R=xa(I,M,t,e,s),F=P;f.mergeThreads(I),u(L=>{if(L.identity!==_)return L;let A;return $!==void 0?A=ut(F+R,$):A=I.length===0||R===0?!1:E,ha(_,A),{...L,isFetching:!1,serverHasMore:A}})}catch(P){const N=P,C=N instanceof Error?N.message:String(N);ss.error(`Could not load more tasks: ${C}`),u(I=>I.identity===_?{...I,isFetching:!1}:I)}},v=c.isFetching||c.isProbing,h=!d&&!v&&fa(b,c.serverHasMore);let k;return i[2]!==v||i[3]!==j||i[4]!==h||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(k={hasMore:h,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:j},i[2]=v,i[3]=j,i[4]=h,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=k):k=i[7],k}function ba(t){return t.id}function va(t){const e=D.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:o,filters:d}=t,{isFetching:c,isProbing:u,loadMore:f,hasMore:m,serverHasMore:p}=ga("status",s,d),[y,b]=H.useState(!1);!y&&r.length===0&&p===!0&&!c&&!u&&(b(!0),queueMicrotask(()=>{f()}));let g;if(e[0]!==i||e[1]!==o||e[2]!==d||e[3]!==l||e[4]!==a||e[5]!==r){let j;e[7]!==i||e[8]!==o||e[9]!==d||e[10]!==l||e[11]!==a?(j=v=>n.jsx(Ot,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:o&&v.created_by===d.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=o,e[9]=d,e[10]=l,e[11]=a,e[12]=j):j=e[12],g=r.map(j),e[0]=i,e[1]=o,e[2]=d,e[3]=l,e[4]=a,e[5]=r,e[6]=g}else g=e[6];let x;e[13]!==m||e[14]!==c||e[15]!==f?(x=(m||c)&&n.jsx(zt,{onClick:()=>{f()},isFetching:c,indented:!0}),e[13]=m,e[14]=c,e[15]=f,e[16]=x):x=e[16];let S;return e[17]!==g||e[18]!==x?(S=n.jsxs(n.Fragment,{children:[g,x]}),e[17]=g,e[18]=x,e[19]=S):S=e[19],S}function ya(t){const e=D.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:o,filters:d}=t,c=Z(),u=Zs[s],f=u.icon,[m,p]=ia(`status-${s}`,!1);let y;e[0]!==m||e[1]!==p?(y=function(){p(!m)},e[0]=m,e[1]=p,e[2]=y):y=e[2];const b=y;let g;e[3]!==u.labelKey||e[4]!==c?(g=c("sidebar.taskGroupsList.toggleStatusGroup",{status:c(u.labelKey)}),e[3]=u.labelKey,e[4]=c,e[5]=g):g=e[5];let x;e[6]!==b?(x=C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),b())},e[6]=b,e[7]=x):x=e[7];let S;e[8]!==f||e[9]!==u.iconClassName?(S=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(f,{size:12,className:u.iconClassName})}),e[8]=f,e[9]=u.iconClassName,e[10]=S):S=e[10];let j;e[11]!==m?(j=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?n.jsx(Ze,{size:14}):n.jsx(ns,{size:14})}),e[11]=m,e[12]=j):j=e[12];let v;e[13]!==S||e[14]!==j?(v=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[S,j]}),e[13]=S,e[14]=j,e[15]=v):v=e[15];let h;e[16]!==u.labelKey||e[17]!==c?(h=c(u.labelKey),e[16]=u.labelKey,e[17]=c,e[18]=h):h=e[18];let k;e[19]!==h?(k=n.jsx("span",{className:"flex-1 truncate",children:h}),e[19]=h,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let _;e[23]!==m||e[24]!==b||e[25]!==g||e[26]!==x||e[27]!==v||e[28]!==k||e[29]!==T?(_=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":g,onClick:b,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[v,k,T]}),e[23]=m,e[24]=b,e[25]=g,e[26]=x,e[27]=v,e[28]=k,e[29]=T,e[30]=_):_=e[30];let P;e[31]!==i||e[32]!==o||e[33]!==m||e[34]!==d||e[35]!==l||e[36]!==a||e[37]!==s||e[38]!==r?(P=m&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(va,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:o,filters:d})}),e[31]=i,e[32]=o,e[33]=m,e[34]=d,e[35]=l,e[36]=a,e[37]=s,e[38]=r,e[39]=P):P=e[39];let N;return e[40]!==_||e[41]!==P?(N=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,P]}),e[40]=_,e[41]=P,e[42]=N):N=e[42],N}const ja={today:"sidebar.myThreadsSection.today",yesterday:"sidebar.myThreadsSection.yesterday",week:"sidebar.myThreadsSection.previousWeek",month:"sidebar.myThreadsSection.previousMonth",older:"sidebar.myThreadsSection.older"};function Sa(t){const e=D.c(43),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:o,hasMore:d,isFetchingMore:c,onLoadMore:u,filtersActive:f}=t,m=Z();if(s.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Hs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let S;e[1]!==f||e[2]!==m?(S=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=S):S=e[3];let j;return e[4]!==S?(j=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:S})]}),e[4]=S,e[5]=j):j=e[5],j}const p=s.length>1||d;if(r==="status"){let x;if(e[6]!==i||e[7]!==p||e[8]!==o||e[9]!==l||e[10]!==a||e[11]!==s){let j;e[13]!==i||e[14]!==p||e[15]!==o||e[16]!==l||e[17]!==a?(j=v=>n.jsx(ya,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:p,filters:o},v.status),e[13]=i,e[14]=p,e[15]=o,e[16]=l,e[17]=a,e[18]=j):j=e[18],x=ta(s).map(j),e[6]=i,e[7]=p,e[8]=o,e[9]=l,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let S;return e[19]!==x?(S=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=S):S=e[20],S}let y;if(e[21]!==i||e[22]!==p||e[23]!==o||e[24]!==l||e[25]!==a||e[26]!==m||e[27]!==s){let x;e[29]!==i||e[30]!==p||e[31]!==o||e[32]!==l||e[33]!==a||e[34]!==m?(x=S=>n.jsxs("section",{className:"flex flex-col gap-0.5",children:[n.jsx("h3",{className:"px-2.5 pt-3 pb-1 text-xs font-medium text-muted-foreground first:pt-1",children:m(ja[S.bucket])}),S.threads.map(j=>n.jsx(Ot,{task:j,isActive:i===j.id,onClick:()=>a(j),onArchive:p&&j.created_by===o.currentUserId?()=>l(j):void 0},j.id))]},S.bucket),e[29]=i,e[30]=p,e[31]=o,e[32]=l,e[33]=a,e[34]=m,e[35]=x):x=e[35],y=aa(s,new Date).map(x),e[21]=i,e[22]=p,e[23]=o,e[24]=l,e[25]=a,e[26]=m,e[27]=s,e[28]=y}else y=e[28];let b;e[36]!==d||e[37]!==c||e[38]!==u?(b=(d||c)&&n.jsx(zt,{onClick:u,isFetching:c}),e[36]=d,e[37]=c,e[38]=u,e[39]=b):b=e[39];let g;return e[40]!==y||e[41]!==b?(g=n.jsxs(n.Fragment,{children:[y,b]}),e[40]=y,e[41]=b,e[42]=g):g=e[42],g}function ka(t){const e=D.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Sa,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Vt(t){const e=D.c(60);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=fe.useSession(),a=i?.user?.id,{org:l}=ie();let o;e[2]!==l.id?(o=ge(l.id),e[2]=l.id,e[3]=o):o=e[3];const d=o.id,c=Wn(),u=Ct(),f=Qe(),{threads:m,hasMore:p,isFetchingMore:y,fetchNextPage:b}=Tt(),g=m.filter(wa),{hide:x,setScope:S}=We(),j=Me(),{setTaskId:v,createNewTask:h}=Ye(),k=wt();let T;e[4]!==r?(T=()=>{r?.()},e[4]=r,e[5]=T):T=e[5];const _=T,P=[...g].sort(Na),[N,C]=H.useState("flat"),[I,E]=pt("sidebar-threads-scope-all",!1),[$,M]=H.useState(!1),[R,F]=H.useState(!1);let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L={query:"",count:0},e[6]=L):L=e[6];const[A,O]=H.useState(L);let w;e[7]!==M?(w=Q=>{const ce=Q===void 0?"":Q;ye("tasks_panel_search_opened"),O(ue=>({query:ce,count:ue.count+1})),F(!0),M(!0)},e[7]=M,e[8]=w):w=e[8];const V=w,U=a??null;let W;e[9]!==U?(W={type:"manual",member:"mine",currentUserId:U},e[9]=U,e[10]=W):W=e[10];const oe=W,le={};I||(le.created_by="me"),S(le);let ee;e[11]!==a?(ee=Q=>a?Q.filter(ce=>ce.created_by===a):[],e[11]=a,e[12]=ee):ee=e[12];const ne=ee,re=Ta,G=qn(re(I?P:ne(P)),k);let X;e[13]!==k||e[14]!==_||e[15]!==a||e[16]!==x||e[17]!==j||e[18]!==l.slug||e[19]!==v||e[20]!==G?(X=Q=>{if(a&&Q.created_by&&Q.created_by!==a)return;const ce=Q.id===k;if(x(Q.id),Cs(Q.id),!ce)return;const ue=Jn(G,Q.id,a);_(),ue?v(ue.id,ue.virtual_mcp_id):j({to:"/$org",params:{org:l.slug}})},e[13]=k,e[14]=_,e[15]=a,e[16]=x,e[17]=j,e[18]=l.slug,e[19]=v,e[20]=G,e[21]=X):X=e[21];const K=X;let B;e[22]!==_||e[23]!==v?(B=Q=>{_(),v(Q.id,Q.virtual_mcp_id)},e[22]=_,e[23]=v,e[24]=B):B=e[24];const z=B;let q;e[25]!==k||e[26]!==m||e[27]!==_||e[28]!==h||e[29]!==a||e[30]!==d||e[31]!==f||e[32]!==c||e[33]!==u||e[34]!==v?(q=()=>{const Q=d;ye("sidebar_new_thread_clicked",{virtual_mcp_id:Q}),_();const ce=ks(m,Q,a,c(Q),{blogDrafts:f==="blog"});if(ce){v(ce.id,ce.virtual_mcp_id,{newThread:!0});return}const ue=u?null:m.find(Wt=>Wt.id===k)?.branch??null;h(Q,ue)},e[25]=k,e[26]=m,e[27]=_,e[28]=h,e[29]=a,e[30]=d,e[31]=f,e[32]=c,e[33]=u,e[34]=v,e[35]=q):q=e[35];const J=q;let Y;e[36]!==b?(Y=()=>{b()},e[36]=b,e[37]=Y):Y=e[37];const se=N!=="flat"||I;let de;e[38]!==R||e[39]!==$||e[40]!==A||e[41]!==M?(de=R?n.jsx(Zn,{open:$,onOpenChange:M,initialQuery:A.query},A.count):null,e[38]=R,e[39]=$,e[40]=A,e[41]=M,e[42]=de):de=e[42];let me;return e[43]!==k||e[44]!==K||e[45]!==oe||e[46]!==N||e[47]!==p||e[48]!==y||e[49]!==J||e[50]!==V||e[51]!==z||e[52]!==C||e[53]!==E||e[54]!==I||e[55]!==Y||e[56]!==se||e[57]!==de||e[58]!==G?(me={threads:G,activeTaskId:k,filters:oe,hasMore:p,isFetchingMore:y,loadMore:Y,groupBy:N,setGroupBy:C,showAll:I,setShowAll:E,filtersActive:se,selectTask:z,archiveTask:K,newThread:J,openSearch:V,searchDialog:de},e[43]=k,e[44]=K,e[45]=oe,e[46]=N,e[47]=p,e[48]=y,e[49]=J,e[50]=V,e[51]=z,e[52]=C,e[53]=E,e[54]=I,e[55]=Y,e[56]=se,e[57]=de,e[58]=G,e[59]=me):me=e[59],me}function Ta(t){return t.filter(_a)}function _a(t){return!t.trigger_id}function Na(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function wa(t){return!t.hidden}const Pa=4;function Ca(t){const e=D.c(19),{thread:s,onSelect:r}=t,i=Z(),[a]=as();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={poll:!1},e[0]=l):l=e[0];const{changeCount:o}=gs(s.virtual_mcp_id,s.branch,l);let d;e[1]!==i||e[2]!==s.title?(d=s.title||i("tasksPanel.taskRow.untitledTask"),e[1]=i,e[2]=s.title,e[3]=d):d=e[3];let c;e[4]!==d?(c=n.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:d}),e[4]=d,e[5]=c):c=e[5];let u;e[6]!==o||e[7]!==i?(u=o>0&&n.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-muted-foreground",children:[n.jsx("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-success"}),i("chat.emptyState.draftPending")]}),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a.language||e[10]!==s.updated_at?(f=rs(new Date(s.updated_at),a.language),e[9]=a.language,e[10]=s.updated_at,e[11]=f):f=e[11];let m;e[12]!==f?(m=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f}),e[12]=f,e[13]=m):m=e[13];let p;return e[14]!==r||e[15]!==c||e[16]!==u||e[17]!==m?(p=n.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center gap-3 rounded-lg px-2 py-2 text-left text-sm transition-colors hover:bg-accent",children:[c,u,m]}),e[14]=r,e[15]=c,e[16]=u,e[17]=m,e[18]=p):p=e[18],p}function Ia(){const t=D.c(28),e=Z(),s=Vt(),r=s.threads;let i,a,l,o,d;if(t[0]!==s||t[1]!==e){d=Symbol.for("react.early_return_sentinel");e:{let m;t[7]!==s.activeTaskId?(m=g=>g.id!==s.activeTaskId,t[7]=s.activeTaskId,t[8]=m):m=t[8];const p=r.filter(m).slice(0,Pa);if(p.length===0){let g;t[9]!==e?(g=e("chat.emptyState.start"),t[9]=e,t[10]=g):g=t[10];let x;t[11]!==g?(x=n.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center px-6",children:n.jsx("p",{className:"text-sm text-muted-foreground",children:g})}),t[11]=g,t[12]=x):x=t[12],d=x;break e}o="flex min-h-0 flex-1 flex-col justify-end overflow-y-auto",a="mx-auto w-full max-w-2xl px-2.5 pb-2";let y;t[13]!==e?(y=e("chat.emptyState.continue"),t[13]=e,t[14]=y):y=t[14],t[15]!==y?(l=n.jsx("h2",{className:"px-2 pb-1 text-sm text-muted-foreground",children:y}),t[15]=y,t[16]=l):l=t[16];let b;t[17]!==s?(b=g=>n.jsx("li",{children:n.jsx(Ca,{thread:g,onSelect:()=>s.selectTask(g)})},g.id),t[17]=s,t[18]=b):b=t[18],i=p.map(b)}t[0]=s,t[1]=e,t[2]=i,t[3]=a,t[4]=l,t[5]=o,t[6]=d}else i=t[2],a=t[3],l=t[4],o=t[5],d=t[6];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;t[19]!==i?(c=n.jsx("ul",{children:i}),t[19]=i,t[20]=c):c=t[20];let u;t[21]!==a||t[22]!==l||t[23]!==c?(u=n.jsxs("section",{className:a,children:[l,c]}),t[21]=a,t[22]=l,t[23]=c,t[24]=u):u=t[24];let f;return t[25]!==o||t[26]!==u?(f=n.jsx("div",{className:o,children:u}),t[25]=o,t[26]=u,t[27]=f):f=t[27],f}function Ma({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Aa(){const t=D.c(26),e=Xs(),s=Le(),r=Ct(),i=Ls("chat_harness_codex"),{org:a}=ie(),{data:l}=fe.useSession(),o=l?.user.id??"",d=Ce(),c=e.some($a);let u;t[0]!==a.id||t[1]!==o?(u=he.claudeSubscription(a.id,o),t[0]=a.id,t[1]=o,t[2]=u):u=t[2];let f;t[3]!==d?(f=()=>d.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=d,t[4]=f):f=t[4];const m=r&&!i&&!c;let p;t[5]!==u||t[6]!==f||t[7]!==m?(p={queryKey:u,queryFn:f,enabled:m},t[5]=u,t[6]=f,t[7]=m,t[8]=p):p=t[8];const y=pe(p);let b;t[9]!==a.id?(b=he.githubCopilot(a.id),t[9]=a.id,t[10]=b):b=t[10];let g;t[11]!==d?(g=()=>d.call("GITHUB_COPILOT_STATUS",{}),t[11]=d,t[12]=g):g=t[12];const x=r&&!i&&!c;let S;t[13]!==b||t[14]!==g||t[15]!==x?(S={queryKey:b,queryFn:g,enabled:x},t[13]=b,t[14]=g,t[15]=x,t[16]=S):S=t[16];const j=pe(S);let v;t[17]!==a.id||t[18]!==o?(v=he.codexSubscription(a.id,o),t[17]=a.id,t[18]=o,t[19]=v):v=t[19];let h;t[20]!==d?(h=()=>d.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=d,t[21]=h):h=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==v||t[24]!==h?(T={queryKey:v,queryFn:h,enabled:k},t[22]=k,t[23]=v,t[24]=h,t[25]=T):T=t[25];const _=pe(T);return r&&i&&!s?.isThreadLocked?e.some(La)||_.data?.connected!==!1?null:"codex-provider":Ma({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:c||y.data?.connected!==!1||j.data?.connected!==!1||!!j.data?.orgShare})}function La(t){return St(t.providerId)}function $a(t){return At(t.providerId)}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Ea(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Da(t){const e=D.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Ba),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Ba(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Ra(t){const e=D.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=Z(),l=s+r+i,o=l>0?s/l*100:0,d=l>0?r/l*100:0,c=l>0?i/l*100:0;let u;e[0]!==o?(u=o>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${o}%`}}),e[0]=o,e[1]=u):u=e[1];let f;e[2]!==d?(f=d>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${d}%`}}),e[2]=d,e[3]=f):f=e[3];let m;e[4]!==c?(m=c>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${c}%`}}),e[4]=c,e[5]=m):m=e[5];let p;e[6]!==u||e[7]!==f||e[8]!==m?(p=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[u,f,m]}),e[6]=u,e[7]=f,e[8]=m,e[9]=p):p=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=y):y=e[10];let b;e[11]!==a||e[12]!==o?(b=a("chat.contextPanel.userPercent",{pct:o.toFixed(1)}),e[11]=a,e[12]=o,e[13]=b):b=e[13];let g;e[14]!==b?(g=n.jsxs("div",{className:"flex items-center gap-1.5",children:[y,n.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[14]=b,e[15]=g):g=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let S;e[17]!==d||e[18]!==a?(S=a("chat.contextPanel.assistantPercent",{pct:d.toFixed(1)}),e[17]=d,e[18]=a,e[19]=S):S=e[19];let j;e[20]!==S?(j=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:S})]}),e[20]=S,e[21]=j):j=e[21];let v;e[22]!==c||e[23]!==i||e[24]!==a?(v=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:c.toFixed(1)})})]}),e[22]=c,e[23]=i,e[24]=a,e[25]=v):v=e[25];let h;e[26]!==j||e[27]!==v||e[28]!==g?(h=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[g,j,v]}),e[26]=j,e[27]=v,e[28]=g,e[29]=h):h=e[29];let k;return e[30]!==h||e[31]!==p?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[p,h]}),e[30]=h,e[31]=p,e[32]=k):k=e[32],k}function Fa(t){const e=D.c(14),{agentId:s,isError:r}=t,i=xe(s),a=Z();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const o=l,d=i?.icon??null;let c;e[3]!==d||e[4]!==o?(c=n.jsx(Lt,{icon:d,name:o,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=d,e[4]=o,e[5]=c):c=e[5];const u=r?"text-destructive":"text-foreground";let f;e[6]!==u?(f=ae("shrink-0 font-medium",u),e[6]=u,e[7]=f):f=e[7];let m;e[8]!==o||e[9]!==f?(m=n.jsx("span",{className:f,children:o}),e[8]=o,e[9]=f,e[10]=m):m=e[10];let p;return e[11]!==c||e[12]!==m?(p=n.jsxs(n.Fragment,{children:[c,m]}),e[11]=c,e[12]=m,e[13]=p):p=e[13],p}function Oa(t){const e=D.c(12),{isError:s}=t,r=Z();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=n.jsx(Lt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const o=s?"text-destructive":"text-foreground";let d;e[4]!==o?(d=ae("shrink-0 font-medium",o),e[4]=o,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d?(c=n.jsx("span",{className:d,children:a}),e[6]=a,e[7]=d,e[8]=c):c=e[8];let u;return e[9]!==l||e[10]!==c?(u=n.jsxs(n.Fragment,{children:[l,c]}),e[9]=l,e[10]=c,e[11]=u):u=e[11],u}function za(t){const e=D.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",l=s.state==="approval-requested";let o;e[0]!==a?(o=n.jsx(Oa,{isError:a}),e[0]=a,e[1]=o):o=e[1];let d;e[2]!==r||e[3]!==a?(d=n.jsx(Fa,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=d):d=e[4];let c;e[5]!==o||e[6]!==d?(c=n.jsx(H.Suspense,{fallback:o,children:d}),e[5]=o,e[6]=d,e[7]=c):c=e[7];let u;e[8]!==s.input?(u=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=u):u=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Ie,{className:"size-3 text-muted-foreground"}):a?n.jsx(Vs,{size:12,className:"text-destructive"}):l?n.jsx(Xe,{size:12,className:"text-warning"}):n.jsx(Js,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==c||e[15]!==u||e[16]!==f?(m=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[c,u,f]}),e[14]=c,e[15]=u,e[16]=f,e[17]=m):m=e[17],m}function Ka(t){const e=D.c(51),{onClose:s,back:r,className:i}=t,a=Z(),[l,o]=H.useState(null),{messages:d}=qe(),{activeTask:c}=be(),{selectedModel:u,selectedVirtualMcp:f}=vs(),m=ys(d),p=[...d].reverse().find(er),y=p?.metadata?.usage,b=[...d].reverse().find(Ja)?.metadata?.models?.thinking,g=p?.metadata?.modelLimits?.contextWindow??(!b||b.id===u?.modelId?u?.limits?.contextWindow:null)??null,x=y?.contextTokens??0,S=g&&g>0?(x/g*100).toFixed(1):null,j=d;let v;e[0]!==j?(v=j.filter(Xa).reduce(Za,0),e[0]=j,e[1]=v):v=e[1];const h=v,k=d;let T;e[2]!==k?(T=k.filter(Qa).reduce(Ya,0),e[2]=k,e[3]=T):T=e[3];const _=T,P=Math.max(0,m.totalTokens-h-_),N=d[0],C=d.at(-1),I=N?.metadata?.created_at??c?.created_at,E=C?.metadata?.created_at??c?.updated_at,$=d.filter(Wa),M=d.flatMap(Ga),R=Ea(b?.id??u?.modelId),F=f?.title??"Super Agent",L=en(),A=[{label:a("chat.contextPanel.sessionLabel"),value:c?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:$.length},{label:a("chat.contextPanel.agentLabel"),value:F},...L?[{label:a("chat.contextPanel.modelLabel"),value:R}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:g?ve(g):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:S!==null?`${S}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...L?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(I)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(E)}];if(!c&&$.length===0){let G;e[4]!==i?(G=ae("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let X;e[6]!==a?(X=a("chat.contextPanel.title"),e[6]=a,e[7]=X):X=e[7];let K;e[8]!==X?(K=n.jsx("span",{className:"text-sm font-medium text-foreground",children:X}),e[8]=X,e[9]=K):K=e[9];let B;e[10]!==r?(B=r?n.jsx(st,{size:14,className:"text-muted-foreground"}):n.jsx(nt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=B):B=e[11];let z;e[12]!==s||e[13]!==B?(z=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:B}),e[12]=s,e[13]=B,e[14]=z):z=e[14];let q;e[15]!==K||e[16]!==z?(q=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[K,z]}),e[15]=K,e[16]=z,e[17]=q):q=e[17];let J;e[18]!==a?(J=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=J):J=e[19];let Y;e[20]!==J?(Y=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:J})}),e[20]=J,e[21]=Y):Y=e[21];let se;return e[22]!==q||e[23]!==Y||e[24]!==G?(se=n.jsxs("div",{className:G,children:[q,Y]}),e[22]=q,e[23]=Y,e[24]=G,e[25]=se):se=e[25],se}let O;e[26]!==i?(O=ae("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=O):O=e[27];let w;e[28]!==a?(w=a("chat.contextPanel.title"),e[28]=a,e[29]=w):w=e[29];let V;e[30]!==w?(V=n.jsx("span",{className:"text-sm font-medium text-foreground",children:w}),e[30]=w,e[31]=V):V=e[31];let U;e[32]!==r?(U=r?n.jsx(st,{className:"size-3.5"}):n.jsx(nt,{className:"size-3.5"}),e[32]=r,e[33]=U):U=e[33];let W;e[34]!==s||e[35]!==U?(W=n.jsx(Ve,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:U}),e[34]=s,e[35]=U,e[36]=W):W=e[36];let oe;e[37]!==V||e[38]!==W?(oe=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[V,W]}),e[37]=V,e[38]=W,e[39]=oe):oe=e[39];let le;e[40]!==a?(le=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=le):le=e[41];let ee;e[42]!==le?(ee=n.jsx("span",{className:"text-xs text-muted-foreground",children:le}),e[42]=le,e[43]=ee):ee=e[43];let ne;e[44]!==_||e[45]!==P||e[46]!==h?(ne=n.jsx(Ra,{userTokens:h,assistantTokens:_,otherTokens:P}),e[44]=_,e[45]=P,e[46]=h,e[47]=ne):ne=e[47];let re;return e[48]!==ee||e[49]!==ne?(re=n.jsxs("div",{className:"flex flex-col gap-3",children:[ee,ne]}),e[48]=ee,e[49]=ne,e[50]=re):re=e[50],n.jsxs("div",{className:O,children:[oe,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:M.map(Va)})]}),n.jsx(Da,{items:A}),re,$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(G=>{const X=G.metadata?.created_at,K=l?.id===G.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>o(K?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ae("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),X&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(X)})]}),K&&n.jsxs(n.Fragment,{children:[G.role==="assistant"&&(()=>{const B=G.metadata?._request;if(!B)return null;const z=B.systemSections??[],q=Math.max(1,...z.map(Ha)),J=z.reduce(Ua,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[B.activeTools??0," / ",B.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),z.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(J/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),z.map((Y,se)=>{const de=Y.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${se}`,me=Y.chars/q*100,Q=Math.round(Y.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:de}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",Q.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${me}%`}})})]},se)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function Ua(t,e){return t+e.chars}function Ha(t){return t.chars}function Va(t,e){return n.jsx(za,{part:t},e)}function Ga(t){return(t.parts??[]).filter(qa)}function qa(t){return t.type==="tool-subtask"}function Wa(t){return t.role!=="system"}function Ya(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function Qa(t){return t.role==="assistant"}function Za(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function Xa(t){return t.role==="user"}function Ja(t){return t.role==="assistant"&&t.metadata?.models}function er(t){return t.role==="assistant"&&t.metadata?.usage}function ht(t){const e=D.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let o;e[0]!==l?(o=ae(l),e[0]=l,e[1]=o):o=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=d):d=e[2];const c=r&&"-rotate-90";let u;e[3]!==c?(u=ae("size-4 text-muted-foreground transition-transform",c),e[3]=c,e[4]=u):u=e[4];let f;e[5]!==u?(f=n.jsx(Ze,{className:u}),e[5]=u,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[d,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let p;e[10]!==r||e[11]!==s?(p=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(tr)}),e[10]=r,e[11]=s,e[12]=p):p=e[12];let y;return e[13]!==o||e[14]!==m||e[15]!==p?(y=n.jsxs("div",{className:o,children:[m,p]}),e[13]=o,e[14]=m,e[15]=p,e[16]=y):y=e[16],y}function tr(t){return n.jsx(tn,{file:t},t.key)}function sr(){const t=D.c(13),e=Le()?.taskId??null,s=sn();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=nn(e,r),[a,l]=H.useState(!1),[o,d]=H.useState(!0);if(!e||!i||i.length===0)return null;let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=()=>l(ar),t[2]=c):c=t[2];let u;t[3]!==a||t[4]!==i?(u=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ht,{variant:"card",outputs:i,collapsed:a,onToggle:c})}),t[3]=a,t[4]=i,t[5]=u):u=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>d(nr),t[6]=f):f=t[6];let m;t[7]!==o||t[8]!==i?(m=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ht,{variant:"bar",outputs:i,collapsed:o,onToggle:f})}),t[7]=o,t[8]=i,t[9]=m):m=t[9];let p;return t[10]!==u||t[11]!==m?(p=n.jsxs(n.Fragment,{children:[u,m]}),t[10]=u,t[11]=m,t[12]=p):p=t[12],p}function nr(t){return!t}function ar(t){return!t}function rr(){const t=D.c(1);H.use(qe().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(rn,{children:n.jsx(ir,{})}),t[0]=e):e=t[0],e}function ir(){const t=D.c(29),{active:e}=ln(),{org:s}=ie(),r=Le(),{isChatEmpty:i}=qe(),[a,l]=H.useState("chat"),o=an(),d=Z(),c=Aa(),{runtime:u}=kt(r?.virtualMcpId);if(c!==null&&u!=="cms"){let _;return t[0]!==c||t[1]!==d?(_=n.jsx(te,{className:"animate-in fade-in-0 duration-200",children:n.jsx(te.Main,{className:"flex flex-col items-center",children:n.jsx(te.EmptyState,{children:c==="codex-provider"?n.jsx(te.NoAiProviderEmptyState,{title:d("settings.codexSubscription.setupHeading"),description:d("settings.codexSubscription.setupDescription"),providerFilter:St}):c==="claude-code-provider"?n.jsx(te.NoAiProviderEmptyState,{title:d("chat.noAiProviderEmptyState.supportedHeading"),description:d("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:At}):n.jsx(te.NoAiProviderEmptyState,{})})})}),t[0]=c,t[1]=d,t[2]=_):_=t[2],_}let m;t[3]!==o.hasDecoKey||t[4]!==o.hasOnlyDecoProvider||t[5]!==o.isLoading||t[6]!==o.isZeroBalance||t[7]!==i||t[8]!==s?(m=o.hasDecoKey&&o.isZeroBalance&&o.hasOnlyDecoProvider&&!o.isLoading&&i&&!bs(s.id),t[3]=o.hasDecoKey,t[4]=o.hasOnlyDecoProvider,t[5]=o.isLoading,t[6]=o.isZeroBalance,t[7]=i,t[8]=s,t[9]=m):m=t[9];const p=m;let y;t[10]!==p?(y=p&&n.jsx(te.CreditsEmptyState,{}),t[10]=p,t[11]=y):y=t[11];let b;t[12]!==a||t[13]!==i||t[14]!==u||t[15]!==e?(b=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ae("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&u!=="cms"?n.jsxs(n.Fragment,{children:[n.jsx(Ia,{}),n.jsx(te.Footer,{children:n.jsx(te.Input,{onOpenContextPanel:()=>l("context")})})]}):n.jsxs(n.Fragment,{children:[n.jsxs(te.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(sr,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(te.Messages,{})})]}),n.jsx(te.Footer,{children:n.jsx(te.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[12]=a,t[13]=i,t[14]=u,t[15]=e,t[16]=b):b=t[16];let g;t[17]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(on,{}),t[17]=g):g=t[17];const x=a!=="context"?!0:void 0,S=a!=="context",j=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let v;t[18]!==j?(v=ae("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",j),t[18]=j,t[19]=v):v=t[19];let h;t[20]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ka,{back:!0,onClose:()=>l("chat")}),t[20]=h):h=t[20];let k;t[21]!==x||t[22]!==S||t[23]!==v?(k=n.jsx("div",{inert:x,"aria-hidden":S,className:v,children:h}),t[21]=x,t[22]=S,t[23]=v,t[24]=k):k=t[24];let T;return t[25]!==y||t[26]!==b||t[27]!==k?(T=n.jsxs(te,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[y,b,g,k]}),t[25]=y,t[26]=b,t[27]=k,t[28]=T):T=t[28],T}function lr(){const t=D.c(7),e=Z();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ae,{children:n.jsx(rr,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(xt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function or(t){const e=D.c(10),{org:s}=ie(),r=_s(),{data:i}=fe.useSession(),a=i?.user?.id,l=t?.id??null,o=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let d;e[0]!==s.id||e[1]!==l?(d=he.viewedThreadMetadataRefresh(s.id,l??""),e[0]=s.id,e[1]=l,e[2]=d):d=e[2];const c=!!r&&!!l&&o;let u;e[3]!==r||e[4]!==l?(u=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=u):u=e[5];let f;e[6]!==d||e[7]!==c||e[8]!==u?(f={queryKey:d,enabled:c,staleTime:Number.POSITIVE_INFINITY,queryFn:u},e[6]=d,e[7]=c,e[8]=u,e[9]=f):f=e[9],pe(f)}function ke(t){const e=D.c(8),{label:s,selected:r,onSelect:i}=t;let a;e[0]!==s?(a=n.jsx("span",{className:"flex-1 truncate",children:s}),e[0]=s,e[1]=a):a=e[1];let l;e[2]!==r?(l=r&&n.jsx(ls,{size:14,className:"shrink-0"}),e[2]=r,e[3]=l):l=e[3];let o;return e[4]!==i||e[5]!==a||e[6]!==l?(o=n.jsxs(os,{onSelect:i,children:[a,l]}),e[4]=i,e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function cr(t){const e=D.c(70),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=Z();let l;e[0]!==s?(l=w=>{ye("tasks_panel_group_by_changed",{to_value:w}),s.setGroupBy(w)},e[0]=s,e[1]=l):l=e[1];const o=l;let d;e[2]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[2]=a,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Gs,{size:16}),e[4]=c):c=e[4];let u;e[5]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[5]=s.filtersActive,e[6]=u):u=e[6];let f;e[7]!==i||e[8]!==s.filtersActive||e[9]!==d||e[10]!==u?(f=n.jsx(De,{asChild:!0,children:n.jsx(is,{asChild:!0,children:n.jsxs(Et,{"aria-label":d,active:s.filtersActive,className:i,children:[c,u]})})}),e[7]=i,e[8]=s.filtersActive,e[9]=d,e[10]=u,e[11]=f):f=e[11];let m;e[12]!==a?(m=a("sidebar.taskGroupsList.filterChats"),e[12]=a,e[13]=m):m=e[13];let p;e[14]!==m?(p=n.jsx(Be,{side:"bottom",children:m}),e[14]=m,e[15]=p):p=e[15];let y;e[16]!==f||e[17]!==p?(y=n.jsxs(Ee,{children:[f,p]}),e[16]=f,e[17]=p,e[18]=y):y=e[18];let b;e[19]!==a?(b=a("sidebar.taskGroupsList.filterView"),e[19]=a,e[20]=b):b=e[20];let g;e[21]!==b?(g=n.jsx(Je,{className:"text-xs font-normal text-muted-foreground",children:b}),e[21]=b,e[22]=g):g=e[22];let x;e[23]!==a?(x=a("sidebar.taskGroupsList.viewList"),e[23]=a,e[24]=x):x=e[24];const S=s.groupBy==="flat";let j;e[25]!==o?(j=()=>o("flat"),e[25]=o,e[26]=j):j=e[26];let v;e[27]!==x||e[28]!==S||e[29]!==j?(v=n.jsx(ke,{label:x,selected:S,onSelect:j}),e[27]=x,e[28]=S,e[29]=j,e[30]=v):v=e[30];let h;e[31]!==a?(h=a("sidebar.taskGroupsList.viewStatus"),e[31]=a,e[32]=h):h=e[32];const k=s.groupBy==="status";let T;e[33]!==o?(T=()=>o("status"),e[33]=o,e[34]=T):T=e[34];let _;e[35]!==h||e[36]!==k||e[37]!==T?(_=n.jsx(ke,{label:h,selected:k,onSelect:T}),e[35]=h,e[36]=k,e[37]=T,e[38]=_):_=e[38];let P;e[39]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(cs,{}),e[39]=P):P=e[39];let N;e[40]!==a?(N=a("sidebar.taskGroupsList.filterScope"),e[40]=a,e[41]=N):N=e[41];let C;e[42]!==N?(C=n.jsx(Je,{className:"text-xs font-normal text-muted-foreground",children:N}),e[42]=N,e[43]=C):C=e[43];let I;e[44]!==a?(I=a("sidebar.taskGroupsList.scopeMine"),e[44]=a,e[45]=I):I=e[45];const E=!s.showAll;let $;e[46]!==s?($=()=>s.setShowAll(!1),e[46]=s,e[47]=$):$=e[47];let M;e[48]!==I||e[49]!==E||e[50]!==$?(M=n.jsx(ke,{label:I,selected:E,onSelect:$}),e[48]=I,e[49]=E,e[50]=$,e[51]=M):M=e[51];let R;e[52]!==a?(R=a("sidebar.taskGroupsList.scopeTeam"),e[52]=a,e[53]=R):R=e[53];let F;e[54]!==s?(F=()=>s.setShowAll(!0),e[54]=s,e[55]=F):F=e[55];let L;e[56]!==s.showAll||e[57]!==R||e[58]!==F?(L=n.jsx(ke,{label:R,selected:s.showAll,onSelect:F}),e[56]=s.showAll,e[57]=R,e[58]=F,e[59]=L):L=e[59];let A;e[60]!==g||e[61]!==v||e[62]!==_||e[63]!==C||e[64]!==M||e[65]!==L?(A=n.jsxs(ds,{align:"end",className:"w-52",children:[g,v,_,P,C,M,L]}),e[60]=g,e[61]=v,e[62]=_,e[63]=C,e[64]=M,e[65]=L,e[66]=A):A=e[66];let O;return e[67]!==A||e[68]!==y?(O=n.jsxs(us,{children:[y,A]}),e[67]=A,e[68]=y,e[69]=O):O=e[69],O}function dr(){const t=D.c(72),e=Z(),[s,r]=H.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Vt(i),l=Le()?.activeTask;let o;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(o=l?.title||a.threads.find(W=>W.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=o):o=t[5];const d=o,[c,u]=H.useState("");let f,m;t[6]!==a||t[7]!==c?(f=c.trim().toLowerCase(),m=f?{...a,threads:a.threads.filter(W=>(W.title??"").toLowerCase().includes(f))}:a,t[6]=a,t[7]=c,t[8]=f,t[9]=m):(f=t[8],m=t[9]);const p=m;let y;t[10]!==a||t[11]!==c?(y=()=>{r(!1),a.openSearch(c.trim())},t[10]=a,t[11]=c,t[12]=y):y=t[12];const b=y;let g;t[13]===Symbol.for("react.memo_cache_sentinel")?(g=W=>{W||u(""),r(W)},t[13]=g):g=t[13];const x=g;let S;t[14]!==e?(S=e("chat.threadsMenu.chats"),t[14]=e,t[15]=S):S=t[15];const j=s&&"bg-sidebar-accent";let v;t[16]!==j?(v=ae("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",j),t[16]=j,t[17]=v):v=t[17];let h;t[18]!==d?(h=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:d}),t[18]=d,t[19]=h):h=t[19];let k;t[20]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[20]=k):k=t[20];let T;t[21]!==S||t[22]!==v||t[23]!==h?(T=n.jsx(De,{asChild:!0,children:n.jsx(Nn,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":S,className:v,children:[h,k]})})}),t[21]=S,t[22]=v,t[23]=h,t[24]=T):T=t[24];let _;t[25]!==e?(_=e("chat.threadsMenu.chats"),t[25]=e,t[26]=_):_=t[26];let P;t[27]!==_?(P=n.jsx(Be,{side:"bottom",children:_}),t[27]=_,t[28]=P):P=t[28];let N;t[29]!==T||t[30]!==P?(N=n.jsxs(Ee,{children:[T,P]}),t[29]=T,t[30]=P,t[31]=N):N=t[31];let C;t[32]!==e?(C=e("chat.threadsMenu.searchPlaceholder"),t[32]=e,t[33]=C):C=t[33];let I;t[34]!==p||t[35]!==f||t[36]!==b?(I=W=>{W.key==="Enter"&&f&&p.threads.length===0&&b()},t[34]=p,t[35]=f,t[36]=b,t[37]=I):I=t[37];let E;t[38]!==c||t[39]!==C||t[40]!==I?(E=n.jsx(_n,{value:c,onChange:u,placeholder:C,className:"flex-1",onKeyDown:I}),t[38]=c,t[39]=C,t[40]=I,t[41]=E):E=t[41];let $;t[42]!==a?($=n.jsx(cr,{panel:a,className:"size-8"}),t[42]=a,t[43]=$):$=t[43];let M;t[44]!==e?(M=e("sidebar.taskGroupsList.newChat"),t[44]=e,t[45]=M):M=t[45];let R;t[46]===Symbol.for("react.memo_cache_sentinel")?(R=n.jsx(It,{size:16}),t[46]=R):R=t[46];let F;t[47]!==a.newThread||t[48]!==M?(F=n.jsx(Et,{"aria-label":M,onClick:a.newThread,className:"size-8",children:R}),t[47]=a.newThread,t[48]=M,t[49]=F):F=t[49];let L;t[50]!==E||t[51]!==$||t[52]!==F?(L=n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[E,$,F]}),t[50]=E,t[51]=$,t[52]=F,t[53]=L):L=t[53];let A;t[54]!==p?(A=n.jsx("div",{className:"flex max-h-[70vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(ka,{panel:p})}),t[54]=p,t[55]=A):A=t[55];let O;t[56]!==f||t[57]!==b||t[58]!==c||t[59]!==e?(O=f&&n.jsxs("button",{type:"button",onClick:b,className:"flex shrink-0 items-center gap-2 rounded-md px-2.5 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[n.jsx(qs,{size:14,className:"shrink-0"}),n.jsx("span",{className:"truncate",children:e("chat.threadsMenu.searchEverywhere",{query:c.trim()})})]}),t[56]=f,t[57]=b,t[58]=c,t[59]=e,t[60]=O):O=t[60];let w;t[61]!==L||t[62]!==A||t[63]!==O?(w=n.jsxs(wn,{align:"start",side:"bottom",className:"flex w-[26rem] max-w-[calc(100vw-2rem)] flex-col gap-2 p-2",children:[L,A,O]}),t[61]=L,t[62]=A,t[63]=O,t[64]=w):w=t[64];let V;t[65]!==s||t[66]!==N||t[67]!==w?(V=n.jsxs(Pn,{open:s,onOpenChange:x,children:[N,w]}),t[65]=s,t[66]=N,t[67]=w,t[68]=V):V=t[68];let U;return t[69]!==a.searchDialog||t[70]!==V?(U=n.jsxs(n.Fragment,{children:[V,a.searchDialog]}),t[69]=a.searchDialog,t[70]=V,t[71]=U):U=t[71],U}function ur(){const t=D.c(16),e=Z(),{org:s}=ie(),{createNewTask:r}=Ye();let i;t[0]!==r||t[1]!==s.id?(i=()=>{r(ge(s.id).id,null)},t[0]=r,t[1]=s.id,t[2]=i):i=t[2];const a=i;let l;t[3]!==e?(l=e("sidebar.taskGroupsList.newChat"),t[3]=e,t[4]=l):l=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(It,{size:16}),t[5]=o):o=t[5];let d;t[6]!==a||t[7]!==l?(d=n.jsx(De,{asChild:!0,children:n.jsx("button",{type:"button",onClick:a,"aria-label":l,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:o})}),t[6]=a,t[7]=l,t[8]=d):d=t[8];let c;t[9]!==e?(c=e("sidebar.taskGroupsList.newChat"),t[9]=e,t[10]=c):c=t[10];let u;t[11]!==c?(u=n.jsx(Be,{side:"bottom",children:c}),t[11]=c,t[12]=u):u=t[12];let f;return t[13]!==d||t[14]!==u?(f=n.jsxs(Ee,{children:[d,u]}),t[13]=d,t[14]=u,t[15]=f):f=t[15],f}function fr(t){const e=D.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Dt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:l,activeTab:o,mainOpen:d}=Bt(a);if(l.length===0)return null;let c;if(e[3]!==o||e[4]!==d||e[5]!==i||e[6]!==l||e[7]!==s){let f;e[9]!==o||e[10]!==d||e[11]!==i||e[12]!==s?(f=m=>{const p=m.id==="automations"?fs({activeTab:o,mainOpen:d}):d&&m.id===o;return n.jsxs(et.Tab,{active:p,title:m.title,onClick:()=>{p||(ye("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(we,{icon:m.icon})}),n.jsx("span",{className:"md:@max-[40rem]/panel-toolbar:sr-only",children:m.title})]},m.id)},e[9]=o,e[10]=d,e[11]=i,e[12]=s,e[13]=f):f=e[13],c=l.map(f),e[3]=o,e[4]=d,e[5]=i,e[6]=l,e[7]=s,e[8]=c}else c=e[8];let u;return e[14]!==c?(u=n.jsx(et.Tabs,{"data-tour":Cn.surfaceTabs,children:c}),e[14]=c,e[15]=u):u=e[15],u}function mr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ke="__mobile-main-panel-tab-select__",He="main";function hr({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const pr={kind:"component",Component:Ln},xr={kind:"component",Component:Ws},gr={kind:"component",Component:Ys},br={kind:"component",Component:An};function vr({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:pr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:He,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:br}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:xr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:gr}]:[]]}function yr(t){const e=D.c(53),{virtualMcpId:s,taskId:r}=t,i=Z(),a=Me(),{openPanel:l}=Dt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const d=je(o);let c;e[1]!==r||e[2]!==s?(c={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=c):c=e[3];const{tabs:u,activeTab:f,mainOpen:m}=Bt(c),{org:p}=ie(),y=$s();let b;e[4]!==p.id?(b=tt(p.id),e[4]=p.id,e[5]=b):b=e[5];const g=s===b;let x,S,j,v,h,k,T,_,P,N;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==g||e[10]!==l||e[11]!==p.id||e[12]!==d.org||e[13]!==d.taskId||e[14]!==y||e[15]!==i||e[16]!==u||e[17]!==s){v=Symbol.for("react.early_return_sentinel");e:{const E=vr({tabs:u,overlayEnabled:!!(d.org&&d.taskId),t:i}),$=m?E.find(U=>U.value===f)?.value??He:"chat",M=E.find(U=>U.value===$),R=M?.title??hr({tabs:u,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=U=>{a({to:".",search:W=>({...W,...pn(U)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const L=F;let A;e[30]!==g||e[31]!==l||e[32]!==p.id||e[33]!==y||e[34]!==L||e[35]!==s?(A=U=>{if(U!==Ke){if(ye("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:U,source:"mobile_select"}),In({reportsOnly:y,onReportAgent:g,tabId:U})){l(U,{virtualmcpid:tt(p.id),search:kr});return}if(U==="chat"||U===He){L(U==="chat"?"chat":"main");return}l(U,{search:Sr})}},e[30]=g,e[31]=l,e[32]=p.id,e[33]=y,e[34]=L,e[35]=s,e[36]=A):A=e[36];const O=A,w=E.find(U=>U.value!==$);if(E.length===2&&w){v=n.jsxs("button",{type:"button",onClick:()=>O(w.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:w.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:w.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:w.title})]});break e}S=En,P=Ke,N=O;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],j=n.jsx($n,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[M&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:M.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:R})]})}),x=Dn,h="end",k="w-56",e[39]!==R?(T=n.jsx(Rt,{value:Ke,disabled:!0,hideCheck:!0,className:"hidden",children:R}),e[39]=R,e[40]=T):T=e[40],_=E.map(jr)}e[6]=f,e[7]=m,e[8]=a,e[9]=g,e[10]=l,e[11]=p.id,e[12]=d.org,e[13]=d.taskId,e[14]=y,e[15]=i,e[16]=u,e[17]=s,e[18]=x,e[19]=S,e[20]=j,e[21]=v,e[22]=h,e[23]=k,e[24]=T,e[25]=_,e[26]=P,e[27]=N}else x=e[18],S=e[19],j=e[20],v=e[21],h=e[22],k=e[23],T=e[24],_=e[25],P=e[26],N=e[27];if(v!==Symbol.for("react.early_return_sentinel"))return v;let C;e[41]!==x||e[42]!==h||e[43]!==k||e[44]!==T||e[45]!==_?(C=n.jsxs(x,{align:h,className:k,children:[T,_]}),e[41]=x,e[42]=h,e[43]=k,e[44]=T,e[45]=_,e[46]=C):C=e[46];let I;return e[47]!==S||e[48]!==j||e[49]!==C||e[50]!==P||e[51]!==N?(I=n.jsxs(S,{value:P,onValueChange:N,children:[j,C]}),e[47]=S,e[48]=j,e[49]=C,e[50]=P,e[51]=N,e[52]=I):I=e[52],I}function jr(t){return n.jsx(Rt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function Sr(t){return{...t,sidepanel:!1}}function kr(t){return{...t,thread:void 0,sidepanel:!1}}function Tr(){const t=D.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:_r},t[0]=e):e=t[0];const s=gt(e);if(!s)return!1;let r;return t[1]!==s?(r=s==="app"||Rn.includes(s),t[1]=s,t[2]=r):r=t[2],r}function _r(t){const{staticData:e}=t.matches.findLast(Nr)??{};return e?.siteEditorView?"site-editor":e?.mainView==="blog-post"?"blog":e?.mainView}function Nr(t){return t.staticData.mainView}function Gt(t,e,s){const r=D.c(33),i=$e(),{locator:a}=ie(),l=H.useSyncExternalStore(i.threads.subscribe,i.threads.get),o=H.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let d;r[0]!==t||r[1]!==l?(d=t===null?null:l.find(h=>h.id===t&&!h.partial)??null,r[0]=t,r[1]=l,r[2]=d):d=r[2];const c=d,[u,f]=H.useState(void 0),[m,p]=H.useState(t);m!==t&&(p(t),f(void 0));let y,b;r[3]!==u||r[4]!==t||r[5]!==c||r[6]!==i||r[7]!==o.kind?(y=()=>{t!==null&&(c||o.kind!=="loading"&&u===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(h=>{f(h)})))},b=[t,c,o.kind,u,i],r[3]=u,r[4]=t,r[5]=c,r[6]=i,r[7]=o.kind,r[8]=y,r[9]=b):(y=r[8],b=r[9]),H.useEffect(y,b);let g;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(g={mutationFn:async h=>{const k=s?.(h);return i.create({id:h,virtual_mcp_id:e,...k?{branch:k}:{},...Ns(sessionStorage,a,h)})}},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=g):g=r[14];const x=ms(g);let S,j;if(r[15]!==x||r[16]!==u||r[17]!==t||r[18]!==c||r[19]!==o.kind?(S=()=>{t!==null&&(c||u===null&&o.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},j=[t,c,u,o.kind,x],r[15]=x,r[16]=u,r[17]=t,r[18]=c,r[19]=o.kind,r[20]=S,r[21]=j):(S=r[20],j=r[21]),H.useEffect(S,j),t===null){let h;return r[22]===Symbol.for("react.memo_cache_sentinel")?(h={status:"ready",task:null},r[22]=h):h=r[22],h}if(c){let h;return r[23]!==c?(h={status:"ready",task:c},r[23]=c,r[24]=h):h=r[24],h}if(u&&typeof u=="object"){let h;return r[25]!==u?(h={status:"ready",task:u},r[25]=u,r[26]=h):h=r[26],h}if(x.data){let h;return r[27]!==x.data?(h={status:"ready",task:x.data},r[27]=x.data,r[28]=h):h=r[28],h}if(x.isError){let h;return r[29]!==x.error?(h={status:"error",error:x.error},r[29]=x.error,r[30]=h):h=r[30],h}if(x.isPending||o.kind!=="loading"){let h;return r[31]===Symbol.for("react.memo_cache_sentinel")?(h={status:"creating"},r[31]=h):h=r[31],h}let v;return r[32]===Symbol.for("react.memo_cache_sentinel")?(v={status:"loading"},r[32]=v):v=r[32],v}function wr(t){const e=D.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=je(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Ge(a);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={select:Pr},e[2]=o):o=e[2];const d=gt(o),{org:c}=ie();let u;e[3]!==c||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==d||e[8]!==l?(u=i.org?hs({pathname:d,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ge(c.id).id,search:l}):null,e[3]=c,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=d,e[8]=l,e[9]=u):u=e[9];const f=u;let m;return e[10]!==s||e[11]!==f?(m=f?n.jsx(Ft,{target:f}):s,e[10]=s,e[11]=f,e[12]=m):m=e[12],m}function Pr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Cr(){const t=D.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ge(r),{org:a}=ie(),{org:l,taskId:o}=s;if(!l||o===void 0)return null;let d;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==o?(d=ps({org:l,taskId:o,fallbackAgentId:ge(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=o,t[6]=d):d=t[6],d}function Ir(){const t=D.c(2),e=Cr();let s;return t[0]!==e?(s=e?n.jsx(Ft,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function Mr(){const t=D.c(6),e=On(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ge(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:Ar}),t[1]=s,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=n.jsx(zn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Ar(t){const{preview:e,...s}=t;return s}function Lr(t){const e=D.c(11),{children:s}=t,r=Z();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==s?(l=s??n.jsx(lr,{}),e[4]=s,e[5]=l):l=e[5];let o;e[6]!==l?(o=n.jsx(Ae,{children:l}),e[6]=l,e[7]=o):o=e[7];let d;return e[8]!==a||e[9]!==o?(d=n.jsx(xt,{fallback:a,children:o}),e[8]=a,e[9]=o,e[10]=d):d=e[10],d}function $r(t){const e=D.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(te.ThreadlessStreamSource,{},r):n.jsx(te.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let l;return e[3]!==i||e[4]!==a?(l=n.jsx(te.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=l):l=e[5],l}function Er(t){const e=D.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],H.useLayoutEffect(i),null}function qt({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=Z(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:o,isThreadLocked:d}=be(),c=Qe(),{data:u}=fe.useSession(),f=u?.user?.id,m=!js(l?.harness_id),p=un({agentSandboxMap:s,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),y=e||dn(l?.metadata),b=H.useRef(null),g=m&&fn({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveRepository:y,branch:a??null,attempted:b.current===(l?.id??null)});H.useEffect(()=>{if(!g||!l)return;b.current=l.id;const w=u?.user?.name||u?.user?.email?.split("@")[0];o(c==="blog"?_t(w):Nt(w))},[g,l,u,o,c]);const x=kt(t),S=x.resolved?x.runtime:null,j=xe(t),v=yt(j,a),{releases:h,createRelease:k,markSandbox:T}=gn(t),_=bn(t,at(j)),P=at(j)&&a?vn(a,_.data):!1,N=!!f&&l?.created_by===f,C=!!S&&N&&!!a&&a!==v&&!h.some(w=>w.branch===a)&&!_.isLoading&&P!==!0,I=H.useRef(null);H.useEffect(()=>{!C||!a||!S||I.current!==a&&(I.current=a,k({branch:a,name:jn(h,i(Es(a))),color:yn(h.length),createdBy:f,createdAt:new Date().toISOString(),runtime:S}).catch(()=>{}))},[C,a,S,h,k,f,i]);const E=S==="sandbox"&&d&&N&&h.some(w=>w.branch===a&&w.runtime!=="sandbox"),[$,M]=H.useState(null);if(E&&a&&$!==a){M(a);const w=a;queueMicrotask(()=>{T(w).catch(()=>{})})}const R=mn(t,a??void 0),L=(f&&a?Un(p?.[f]?.[a]):{})["agent-sandbox"]??null,A=L?.previewUrl??null,O=m&&S!=="cms"&&(!!L||R);return m?S==="cms"?n.jsx(it,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r}):n.jsx(Bn,{resetKey:l?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:A,enabled:O,children:n.jsx(hn,{resetKey:l?.id??"no-thread",executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveRepository:y,vmEntry:L,threadId:l?.id??null,children:n.jsx(it,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx($t,{image:n.jsx(Xe,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Dr(t){const e=D.c(5),{followProject:s,children:r}=t,{org:i}=ie(),{virtualMcpId:a,activeTask:l}=be(),o=xe(a),d=Qe();if(!(a!==ge(i.id).id)||l?.virtual_mcp_id===a&&Ds(d,l,o?.metadata))return r;const u=`${a}:${d??""}`;let f;return e[0]!==r||e[1]!==d||e[2]!==s||e[3]!==u?(f=n.jsx(Br,{draftKind:d,followProject:s,children:r},u),e[0]=r,e[1]=d,e[2]=s,e[3]=u,e[4]=f):f=e[4],f}function Br(t){const e=D.c(39),{draftKind:s,followProject:r,children:i}=t,a=be(),l=a.virtualMcpId,o=xe(l);let d;e[0]!==o?(d=o&&_e(o),e[0]=o,e[1]=d):d=e[1];const c=!!d,u=yt(o,null),{data:f}=fe.useSession(),m=f?.user?.id,p=We(),y=$e(),b=H.useSyncExternalStore(y.threads.subscribe,y.threads.get),g=H.useSyncExternalStore(y.threadsStatus.subscribe,y.threadsStatus.get).kind==="loading",[x,S]=H.useState(null);let j;e[2]!==u||e[3]!==s||e[4]!==o?.metadata||e[5]!==c||e[6]!==l||e[7]!==m?(j=V=>Ts(V.filter(U=>Bs(s,U,o?.metadata)),l,m,jt(o?.metadata),c,{baseBranch:u,releases:o?.metadata?.releases??void 0}),e[2]=u,e[3]=s,e[4]=o?.metadata,e[5]=c,e[6]=l,e[7]=m,e[8]=j):j=e[8];const v=j;let h;e[9]!==v||e[10]!==x||e[11]!==b||e[12]!==g?(h=x||g?void 0:v(b),e[9]=v,e[10]=x,e[11]=b,e[12]=g,e[13]=h):h=e[13];const k=h,T=Vn(l,!x&&!g&&!k);if(!x&&!g&&T.status!=="loading"){const V=k??(T.status==="ready"?v(T.threads):void 0);S(V?{threadId:V.id}:c?{threadId:crypto.randomUUID(),branch:s==="blog"?_t(ws(f?.user)):Nt(f?.user?.name||f?.user?.email?.split("@")[0])}:{threadId:null})}let _;e[14]!==x?(_=V=>V===x?.threadId?x.branch:void 0,e[14]=x,e[15]=_):_=e[15];const P=Gt(x?.threadId??null,l,_),N=P.status==="ready"?P.task:null,C=N?.harness_id!=null,I=N?.harness_id??null,E=N?.branch??null,$=N?.branch??null;let M;e[16]!==N||e[17]!==p?(M=V=>{N&&p.setBranch(N.id,V)},e[16]=N,e[17]=p,e[18]=M):M=e[18];let R;e[19]!==a||e[20]!==C||e[21]!==I||e[22]!==E||e[23]!==$||e[24]!==M||e[25]!==N?(R={...a,activeTask:N,isThreadLocked:C,lockedHarness:I,lockedBranch:E,currentBranch:$,setCurrentTaskBranch:M},e[19]=a,e[20]=C,e[21]=I,e[22]=E,e[23]=$,e[24]=M,e[25]=N,e[26]=R):R=e[26];const F=R,L=o?.metadata?.sandboxMap;let A;e[27]!==r||e[28]!==N?(A=r&&N&&n.jsx(vt,{to:".",replace:!0,search:V=>({...V,thread:N.id})}),e[27]=r,e[28]=N,e[29]=A):A=e[29];let O;e[30]!==i||e[31]!==c||e[32]!==l||e[33]!==L||e[34]!==A?(O=n.jsxs(qt,{virtualMcpId:l,hasActiveRepository:c,sandboxMap:L,children:[i,A]}),e[30]=i,e[31]=c,e[32]=l,e[33]=L,e[34]=A,e[35]=O):O=e[35];let w;return e[36]!==O||e[37]!==F?(w=n.jsx(Ss,{value:F,children:O}),e[36]=O,e[37]=F,e[38]=w):w=e[38],w}function Rr(){const t=D.c(13),{virtualMcpId:e,taskId:s}=be(),r=Sn()?.contentOpen===!1;let i;t[0]!==r?(i=n.jsx(Tn,{showOnDesktop:r}),t[0]=r,t[1]=i):i=t[1];let a,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(kn,{}),l=n.jsx(dr,{}),t[2]=a,t[3]=l):(a=t[2],l=t[3]);let o;t[4]!==i?(o=n.jsxs(Fe.Topbar.Left,{children:[i,a,l]}),t[4]=i,t[5]=o):o=t[5];let d;t[6]!==s||t[7]!==e?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(yr,{virtualMcpId:e,taskId:s})}),t[6]=s,t[7]=e,t[8]=d):d=t[8];let c;t[9]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Fe.Topbar.Right,{className:"shrink-0",children:n.jsx(ur,{})}),t[9]=c):c=t[9];let u;return t[10]!==o||t[11]!==d?(u=n.jsxs(Fe.Topbar,{className:"border-b border-border/60 pr-3 pl-1",children:[o,d,c]}),t[10]=o,t[11]=d,t[12]=u):u=t[12],u}function Fr(t){const e=D.c(28),{layout:s,followProject:r,onNewTaskRef:i,createNewTask:a}=t,{virtualMcpId:l,taskId:o}=be(),d=Mn()??"overview",c=Tr(),[u,f]=H.useState(null),m=u===d,p=c?m:s.threadOpen;let y;e[0]!==d||e[1]!==s||e[2]!==c||e[3]!==m?(y=c?()=>f(m?null:d):s.toggleFullscreen,e[0]=d,e[1]=s,e[2]=c,e[3]=m,e[4]=y):y=e[4];const b=y;let g;e[5]!==a||e[6]!==i?(g=n.jsx(Er,{onNewTaskRef:i,createNewTask:a}),e[5]=a,e[6]=i,e[7]=g):g=e[7];let x;e[8]!==o||e[9]!==l?(x=n.jsx(fr,{virtualMcpId:l,taskId:o}),e[8]=o,e[9]=l,e[10]=x):x=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(bt,{}),e[11]=S):S=e[11];let j;e[12]!==r?(j=n.jsx(Dr,{followProject:r,children:S}),e[12]=r,e[13]=j):j=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Rr,{}),e[14]=v):v=e[14];const h=o??"threadless";let k;e[15]!==h?(k=n.jsx(rt.Thread,{topbar:v,children:n.jsx(Lr,{},h)}),e[15]=h,e[16]=k):k=e[16];let T;e[17]!==d||e[18]!==s||e[19]!==x||e[20]!==j||e[21]!==k||e[22]!==p||e[23]!==b?(T=n.jsxs(rt,{...s,threadOpen:p,toggleFullscreen:b,contentKey:d,contentNavigation:x,children:[j,k]}),e[17]=d,e[18]=s,e[19]=x,e[20]=j,e[21]=k,e[22]=p,e[23]=b,e[24]=T):T=e[24];let _;return e[25]!==g||e[26]!==T?(_=n.jsxs(n.Fragment,{children:[g,T]}),e[25]=g,e[26]=T,e[27]=_):_=e[27],_}function Or(){const t=D.c(77),e=Z(),s=Me(),r=Is(),{create:i}=We(),{org:a}=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const d=je(l).org??"",c=wt(),u=Ms();let f;t[1]!==a.id?(f=ge(a.id),t[1]=a.id,t[2]=f):f=t[2];const m=f.id,[p]=H.useState(Ur),{data:y}=fe.useSession(),b=$e(),g=H.useSyncExternalStore(b.threads.subscribe,b.threads.get),x=H.useSyncExternalStore(b.threadsStatus.subscribe,b.threadsStatus.get),S=xe(u),[j,v]=H.useState(!1);c!==null&&j&&v(!1);const h=Gt(c,m);or(h.status==="ready"?h.task:null);const k=(h.status==="ready"?h.task?.virtual_mcp_id:void 0)??m,T=xe(k),[_,P]=H.useState(null);_!==null&&_!==u?P(null):_===null&&h.status==="ready"&&(k===u||!(S&&_e(S)))&&P(u);const N=S?.metadata?.ui?.layout??null;let C;t[3]!==N?(C=N?{defaultMainView:N.defaultMainView??null,chatDefaultOpen:N.chatDefaultOpen??null}:null,t[3]=N,t[4]=C):C=t[4];const E=xn(C);let $;t[5]!==p||t[6]!==c?($=mr({routeThreadId:c,fallbackKey:p}),t[5]=p,t[6]=c,t[7]=$):$=t[7];const{threadId:M,providerKey:R}=$;let F;t[8]!==i||t[9]!==r||t[10]!==m?(F=async()=>{const K=crypto.randomUUID();try{await i({id:K,virtual_mcp_id:m})}catch{}r(K,Kr)},t[8]=i,t[9]=r,t[10]=m,t[11]=F):F=t[11];const L=F,A=H.useRef(null);let O,w;if(t[12]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{const K=B=>{xs(B)&&B.shiftKey&&B.code==="KeyS"&&!B.repeat&&(B.preventDefault(),A.current?.())};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},w=[],t[12]=O,t[13]=w):(O=t[12],w=t[13]),H.useEffect(O,w),c===null&&!j&&x.kind!=="loading"){let K;if(t[14]!==y?.user?.id||t[15]!==m||t[16]!==g){let z;t[18]!==y?.user?.id||t[19]!==m?(z=q=>!q.hidden&&q.virtual_mcp_id===m&&q.created_by===y?.user?.id,t[18]=y?.user?.id,t[19]=m,t[20]=z):z=t[20],K=g.filter(z).sort(zr).at(0),t[14]=y?.user?.id,t[15]=m,t[16]=g,t[17]=K}else K=t[17];const B=K;if(B){let z;return t[21]!==B.id?(z=n.jsx(vt,{to:".",replace:!0,search:q=>({...q,thread:B.id})}),t[21]=B.id,t[22]=z):z=t[22],z}v(!0)}if(h.status==="creating"||h.status==="loading"){let K;t[23]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Ie,{className:"size-4 mr-2"}),t[23]=K):K=t[23];let B;t[24]!==e?(B=e("agentShellLayout.agentShellLayout.creatingTask"),t[24]=e,t[25]=B):B=t[25];let z;return t[26]!==B?(z=n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[K,B]})}),t[26]=B,t[27]=z):z=t[27],z}if(h.status==="error"){let K;t[28]!==e?(K=e("agentShellLayout.agentShellLayout.taskUnavailable"),t[28]=e,t[29]=K):K=t[29];let B;t[30]!==K?(B=n.jsx("div",{className:"font-medium",children:K}),t[30]=K,t[31]=B):B=t[31];let z;t[32]!==h.error.message?(z=n.jsx("div",{className:"text-muted-foreground",children:h.error.message}),t[32]=h.error.message,t[33]=z):z=t[33];let q;return t[34]!==B||t[35]!==z?(q=n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[B,z]})}),t[34]=B,t[35]=z,t[36]=q):q=t[36],q}if(!S){let K;t[37]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(Xe,{size:48,className:"text-muted-foreground"}),t[37]=K):K=t[37];let B;t[38]!==e?(B=e("agentShellLayout.agentShellLayout.agentNotFound"),t[38]=e,t[39]=B):B=t[39];let z;t[40]!==e||t[41]!==u?(z=e("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:u}),t[40]=e,t[41]=u,t[42]=z):z=t[42];let q;t[43]!==s||t[44]!==d?(q=()=>s({to:"/$org",params:{org:d}}),t[43]=s,t[44]=d,t[45]=q):q=t[45];let J;t[46]!==e?(J=e("agentShellLayout.agentShellLayout.goToOrgHome"),t[46]=e,t[47]=J):J=t[47];let Y;t[48]!==q||t[49]!==J?(Y=n.jsx(Ve,{variant:"outline",onClick:q,children:J}),t[48]=q,t[49]=J,t[50]=Y):Y=t[50];let se;return t[51]!==Y||t[52]!==B||t[53]!==z?(se=n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx($t,{image:K,title:B,description:z,actions:Y})})}),t[51]=Y,t[52]=B,t[53]=z,t[54]=se):se=t[54],se}const V=h.status==="ready"?h.task:null;let U;t[55]!==T?(U=T&&_e(T),t[55]=T,t[56]=U):U=t[56];const W=!!U,oe=T?.metadata?.sandboxMap,le=_!==u;let ee;t[57]!==L||t[58]!==E||t[59]!==le?(ee=n.jsx(Ae,{children:n.jsx(Fr,{layout:E,followProject:le,onNewTaskRef:A,createNewTask:L})}),t[57]=L,t[58]=E,t[59]=le,t[60]=ee):ee=t[60];let ne;t[61]!==R||t[62]!==ee||t[63]!==M?(ne=n.jsx($r,{threadId:M,providerKey:R,children:ee}),t[61]=R,t[62]=ee,t[63]=M,t[64]=ne):ne=t[64];let re;t[65]!==k||t[66]!==oe||t[67]!==ne||t[68]!==W?(re=n.jsx(qt,{virtualMcpId:k,hasActiveRepository:W,sandboxMap:oe,children:ne}),t[65]=k,t[66]=oe,t[67]=ne,t[68]=W,t[69]=re):re=t[69];let G;t[70]!==E||t[71]!==re?(G=n.jsx(cn,{layout:E,children:re}),t[70]=E,t[71]=re,t[72]=G):G=t[72];let X;return t[73]!==k||t[74]!==G||t[75]!==V?(X=n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(te.Provider,{virtualMcpId:k,task:V,children:G},k)}),t[73]=k,t[74]=G,t[75]=V,t[76]=X):X=t[76],X}function zr(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Kr(){return{}}function Ur(){return crypto.randomUUID()}function uc(){const t=D.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ir,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(bt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ae,{children:n.jsx(wr,{children:n.jsx(Fn,{children:n.jsxs(Kn,{children:[n.jsx(Or,{}),n.jsx(Mr,{})]})})})}),t[3]=r):r=t[3],r}export{uc as default};
@@ -1 +1 @@
1
- import{c as H,b as I,a4 as $,j as u,n as R,m as _}from"./index-BfWp2Wnw.js";import{i as v}from"./LayoutLeft-CPMSR00X.js";import{c as w,u as D}from"./use-sidebar-collapsed-BtrwP1AE.js";import{T as P,a as B,c as E}from"./tooltip-CqV-qcYU.js";import{T as O}from"./toolbar-icon-button-CaY1wsmY.js";import{u as z}from"./use-project-scope-CFftAYVY.js";import{a as A}from"./use-current-view-B5rf1h54.js";function M(y){const e=H.c(34),{actions:f,navigation:j,trailingActions:a}=y,s=I(),{org:t}=$(),x=z(),{project:g,title:o,isHome:r,inSettings:p}=A();let l;e[0]!==g?.title||e[1]!==s?(l=g?.title??s("common.loading"),e[0]=g?.title,e[1]=s,e[2]=l):l=e[2];const i=l,c=x??"";let d;e[3]!==t.slug||e[4]!==c?(d={to:"/$org/projects/$agentId",params:{org:t.slug,agentId:c}},e[3]=t.slug,e[4]=c,e[5]=d):d=e[5];const h=d;let m;if(e[6]!==p||e[7]!==r||e[8]!==t.slug||e[9]!==h||e[10]!==i||e[11]!==x||e[12]!==s||e[13]!==o){if(m=[],p){let n;e[15]!==s?(n=s("sidebar.navDestinations.settings"),e[15]=s,e[16]=n):n=e[16];let b;e[17]!==t.slug?(b={to:"/$org/settings/general",params:{org:t.slug}},e[17]=t.slug,e[18]=b):b=e[18];let C;e[19]!==n||e[20]!==b?(C={key:"settings",label:n,link:b},e[19]=n,e[20]=b,e[21]=C):C=e[21],m.push(C)}else if(x&&!r){let n;e[22]!==h||e[23]!==i?(n={key:"project",label:i,link:h},e[22]=h,e[23]=i,e[24]=n):n=e[24],m.push(n)}let k;e[25]!==o?(k={key:"page",label:o},e[25]=o,e[26]=k):k=e[26],m.push(k),e[6]=p,e[7]=r,e[8]=t.slug,e[9]=h,e[10]=i,e[11]=x,e[12]=s,e[13]=o,e[14]=m}else m=e[14];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=u.jsx(L,{}),e[27]=S):S=e[27];let T;return e[28]!==f||e[29]!==m||e[30]!==j||e[31]!==t.name||e[32]!==a?(T=u.jsx(R.Header,{leading:S,breadcrumbs:m,scope:t.name,actions:f,navigation:j,trailingActions:a}),e[28]=f,e[29]=m,e[30]=j,e[31]=t.name,e[32]=a,e[33]=T):T=e[33],T}function L(y){const e=H.c(16),{showOnDesktop:f}=y,j=f===void 0?!0:f,a=I(),{toggleSidebar:s}=w(),t=D(),g=!(j&&t)&&"md:hidden";let o;e[0]!==g?(o=_(g),e[0]=g,e[1]=o):o=e[1];let r;e[2]!==a?(r=a("page.expandSidebar"),e[2]=a,e[3]=r):r=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=u.jsx(v,{size:16}),e[4]=p):p=e[4];let l;e[5]!==o||e[6]!==r||e[7]!==s?(l=u.jsx(P,{asChild:!0,children:u.jsx(O,{className:o,onClick:s,"aria-label":r,children:p})}),e[5]=o,e[6]=r,e[7]=s,e[8]=l):l=e[8];let i;e[9]!==a?(i=a("page.expandSidebar"),e[9]=a,e[10]=i):i=e[10];let c;e[11]!==i?(c=u.jsx(B,{side:"bottom",children:i}),e[11]=i,e[12]=c):c=e[12];let d;return e[13]!==l||e[14]!==c?(d=u.jsxs(E,{children:[l,c]}),e[13]=l,e[14]=c,e[15]=d):d=e[15],d}export{M as R,L as S};
1
+ import{c as H,b as I,a4 as $,j as u,n as R,m as _}from"./index-FR7-LkFs.js";import{i as v}from"./LayoutLeft-BRKXPCjt.js";import{c as w,u as D}from"./use-sidebar-collapsed-BnOq_oEM.js";import{T as P,a as B,c as E}from"./tooltip-zEsMTxPP.js";import{T as O}from"./toolbar-icon-button-D2GZy3ji.js";import{u as z}from"./use-project-scope-DbG1jNVV.js";import{a as A}from"./use-current-view-D_ifkjui.js";function M(y){const e=H.c(34),{actions:f,navigation:j,trailingActions:a}=y,s=I(),{org:t}=$(),x=z(),{project:g,title:o,isHome:r,inSettings:p}=A();let l;e[0]!==g?.title||e[1]!==s?(l=g?.title??s("common.loading"),e[0]=g?.title,e[1]=s,e[2]=l):l=e[2];const i=l,c=x??"";let d;e[3]!==t.slug||e[4]!==c?(d={to:"/$org/projects/$agentId",params:{org:t.slug,agentId:c}},e[3]=t.slug,e[4]=c,e[5]=d):d=e[5];const h=d;let m;if(e[6]!==p||e[7]!==r||e[8]!==t.slug||e[9]!==h||e[10]!==i||e[11]!==x||e[12]!==s||e[13]!==o){if(m=[],p){let n;e[15]!==s?(n=s("sidebar.navDestinations.settings"),e[15]=s,e[16]=n):n=e[16];let b;e[17]!==t.slug?(b={to:"/$org/settings/general",params:{org:t.slug}},e[17]=t.slug,e[18]=b):b=e[18];let C;e[19]!==n||e[20]!==b?(C={key:"settings",label:n,link:b},e[19]=n,e[20]=b,e[21]=C):C=e[21],m.push(C)}else if(x&&!r){let n;e[22]!==h||e[23]!==i?(n={key:"project",label:i,link:h},e[22]=h,e[23]=i,e[24]=n):n=e[24],m.push(n)}let k;e[25]!==o?(k={key:"page",label:o},e[25]=o,e[26]=k):k=e[26],m.push(k),e[6]=p,e[7]=r,e[8]=t.slug,e[9]=h,e[10]=i,e[11]=x,e[12]=s,e[13]=o,e[14]=m}else m=e[14];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=u.jsx(L,{}),e[27]=S):S=e[27];let T;return e[28]!==f||e[29]!==m||e[30]!==j||e[31]!==t.name||e[32]!==a?(T=u.jsx(R.Header,{leading:S,breadcrumbs:m,scope:t.name,actions:f,navigation:j,trailingActions:a}),e[28]=f,e[29]=m,e[30]=j,e[31]=t.name,e[32]=a,e[33]=T):T=e[33],T}function L(y){const e=H.c(16),{showOnDesktop:f}=y,j=f===void 0?!0:f,a=I(),{toggleSidebar:s}=w(),t=D(),g=!(j&&t)&&"md:hidden";let o;e[0]!==g?(o=_(g),e[0]=g,e[1]=o):o=e[1];let r;e[2]!==a?(r=a("page.expandSidebar"),e[2]=a,e[3]=r):r=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=u.jsx(v,{size:16}),e[4]=p):p=e[4];let l;e[5]!==o||e[6]!==r||e[7]!==s?(l=u.jsx(P,{asChild:!0,children:u.jsx(O,{className:o,onClick:s,"aria-label":r,children:p})}),e[5]=o,e[6]=r,e[7]=s,e[8]=l):l=e[8];let i;e[9]!==a?(i=a("page.expandSidebar"),e[9]=a,e[10]=i):i=e[10];let c;e[11]!==i?(c=u.jsx(B,{side:"bottom",children:i}),e[11]=i,e[12]=c):c=e[12];let d;return e[13]!==l||e[14]!==c?(d=u.jsxs(E,{children:[l,c]}),e[13]=l,e[14]=c,e[15]=d):d=e[15],d}export{M as R,L as S};
@@ -1 +1 @@
1
- import{b as S}from"./sandbox-url-D3mC8qhT.js";import{aF as h,bv as g,aG as c,dC as O}from"./index-BfWp2Wnw.js";function s(e,n){return S(e,`git/${n}`)}class l extends Error{constructor(n,t){super(n),this.status=t,this.name="SandboxGitError"}status}function F(e){return e instanceof l&&(e.status===503||e.status===410||e.status===404)}function P(e,n){return n instanceof l&&n.status===429?!1:e<1}const G=h({code:O("block-deleted-on-base"),error:c(),blocks:g(h({path:c(),key:c(),renamedTo:c().optional(),missingRefs:g(c())})).min(1)});class p extends Error{constructor(n,t){super(n),this.blocks=t,this.name="BlocksDeletedOnBaseError"}blocks}async function i(e){let n;try{n=await e.json()}catch{throw new l(`Request failed (${e.status})`,e.status)}const t=e.status===409?G.safeParse(n):null;if(t?.success)throw new p(t.data.error,t.data.blocks);if(!e.ok)throw new l(typeof n.error=="string"?n.error:`Request failed (${e.status})`,e.status);return n}function o(e,n){return fetch(e,{cache:"no-store",...n})}async function k(e){const n=await o(s(e,"status"),void 0);return i(n)}async function u(e,n){const t=await o(s(e,"diff"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...n?.base?{base:n.base}:{},...n?.headSha?{headSha:n.headSha}:{}})});return i(t)}function B(e){const n={};for(const[t,r]of Object.entries(e.diffs))d(t)||f(t)||(n[t]=r);return{...e,diffs:n}}async function N(e,n){const t=await o(s(e,"publish"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({message:n})});await i(t)}async function I(e,n,t){const r=await o(s(e,"rebase"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({base:n,...t?{resolutions:t}:{}})});await i(r)}function d(e){return e==="blocks.gen.json"||e.endsWith("/blocks.gen.json")}function f(e){return e==="static/tailwind.css"||e.endsWith("/static/tailwind.css")}function j(e){return d(e)||f(e)||e.endsWith("generate.digests.json")||e.endsWith("meta.gen.json")}function x(e){return e?e.conflicted.length>0||e.renamed.length>0?!0:[...e.modified,...e.created,...e.deleted,...e.not_added,...e.staged].some(n=>!j(n)):!1}function L(e){return e?!x(e)&&(e.aheadOfBase??0)===0&&(e.unpushed??0)===0:!1}function T(e){return e===".deco"||e.endsWith("/.deco")||e.startsWith(".deco/")||e.includes("/.deco/")}function b(e){return e.length===0?!1:e.every(n=>T(n)||d(n)||f(n))}function y(e){return e?b(Object.keys(e.diffs)):!1}const D="smart";function U(e){return e==="code-review"||e==="open"||e==="smart"?e:D}function H(e){let n=5381;const t=r=>{for(let a=0;a<r.length;a++)n=(n<<5)+n+r.charCodeAt(a)|0};for(const r of Object.keys(e.diffs).sort()){const a=e.diffs[r];t(r),t("\0from:"),t(a?.from??""),t("\0to:"),t(a?.to??""),t("\0\0")}return(n>>>0).toString(36)}async function K(e,n){const t=await o(s(e,"judge-review"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({status:n.status,diff:B(n.diff),...n.language?{language:n.language}:{}})});return i(t)}async function Q(e,n){const t=await o(s(e,"discard"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({filepaths:n})});await i(t)}const v="current";function $(e){return e?.[v]??null}function M(e,n,t){return["sandbox-git-status",e,n,t]}function E(e){return["sandbox-git-status",e.orgSlug,e.virtualMcpId,e.branch,e.threadId]}const R=5e3;function Y(e){return{queryKey:E(e),queryFn:()=>k(e),staleTime:R,retry:P}}function _(e){return e?e.modified.length+e.created.length+e.deleted.length+e.not_added.length+e.renamed.length:0}function C(e){return e?_(e)>0||e.staged.length>0||e.conflicted.length>0:!1}function J(e,n){return{diffs:{...e?.diffs??{},...n?.diffs??{}},...e?.mergeBaseSha?{mergeBaseSha:e.mergeBaseSha}:{}}}function W(e){return e.aheadOfBase===void 0||e.aheadOfBase>0||e.ahead>0||(e.unpushed??0)>0}async function z(e,n,t,r){if(r?.fastPreview)return u(e,{base:t});const a=n.headSha?{base:t,headSha:n.headSha}:{base:t},[m,w]=await Promise.all([W(n)?u(e,a):null,C(n)?u(e):null]);return J(m,w)}function V(e,n="code-review"){return n==="open"?{allowed:!0,reason:null}:y(e)?{allowed:!0,reason:null}:{allowed:!1,reason:null}}function X(e,n){return e.length===0?{allowed:!1,reason:null}:n==="open"?{allowed:!0,reason:null}:b(e)?{allowed:!0,reason:null}:n==="smart"?{allowed:!1,reason:null,pending:!0}:{allowed:!1,reason:null}}function Z(e,n){return n!=="smart"||!e||Object.keys(e.diffs).length===0?!1:!y(e)}function ee(e,n){if(n)return{allowed:!1,reason:null,pending:!0};if(!e)return{allowed:!0,reason:null};if(!e.requiresReview)return{allowed:!0,reason:null};const t=e.reason?.trim();return{allowed:!1,reason:t||null}}export{p as B,M as a,Y as b,F as c,z as d,K as e,k as f,X as g,C as h,j as i,V as j,ee as k,$ as l,W as m,Z as n,x as o,U as p,I as q,H as r,E as s,L as t,N as u,Q as v};
1
+ import{b as S}from"./sandbox-url-D3mC8qhT.js";import{aF as h,bv as g,aG as c,dC as O}from"./index-FR7-LkFs.js";function s(e,n){return S(e,`git/${n}`)}class l extends Error{constructor(n,t){super(n),this.status=t,this.name="SandboxGitError"}status}function F(e){return e instanceof l&&(e.status===503||e.status===410||e.status===404)}function P(e,n){return n instanceof l&&n.status===429?!1:e<1}const G=h({code:O("block-deleted-on-base"),error:c(),blocks:g(h({path:c(),key:c(),renamedTo:c().optional(),missingRefs:g(c())})).min(1)});class p extends Error{constructor(n,t){super(n),this.blocks=t,this.name="BlocksDeletedOnBaseError"}blocks}async function i(e){let n;try{n=await e.json()}catch{throw new l(`Request failed (${e.status})`,e.status)}const t=e.status===409?G.safeParse(n):null;if(t?.success)throw new p(t.data.error,t.data.blocks);if(!e.ok)throw new l(typeof n.error=="string"?n.error:`Request failed (${e.status})`,e.status);return n}function o(e,n){return fetch(e,{cache:"no-store",...n})}async function k(e){const n=await o(s(e,"status"),void 0);return i(n)}async function u(e,n){const t=await o(s(e,"diff"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...n?.base?{base:n.base}:{},...n?.headSha?{headSha:n.headSha}:{}})});return i(t)}function B(e){const n={};for(const[t,r]of Object.entries(e.diffs))d(t)||f(t)||(n[t]=r);return{...e,diffs:n}}async function N(e,n){const t=await o(s(e,"publish"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({message:n})});await i(t)}async function I(e,n,t){const r=await o(s(e,"rebase"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({base:n,...t?{resolutions:t}:{}})});await i(r)}function d(e){return e==="blocks.gen.json"||e.endsWith("/blocks.gen.json")}function f(e){return e==="static/tailwind.css"||e.endsWith("/static/tailwind.css")}function j(e){return d(e)||f(e)||e.endsWith("generate.digests.json")||e.endsWith("meta.gen.json")}function x(e){return e?e.conflicted.length>0||e.renamed.length>0?!0:[...e.modified,...e.created,...e.deleted,...e.not_added,...e.staged].some(n=>!j(n)):!1}function L(e){return e?!x(e)&&(e.aheadOfBase??0)===0&&(e.unpushed??0)===0:!1}function T(e){return e===".deco"||e.endsWith("/.deco")||e.startsWith(".deco/")||e.includes("/.deco/")}function b(e){return e.length===0?!1:e.every(n=>T(n)||d(n)||f(n))}function y(e){return e?b(Object.keys(e.diffs)):!1}const D="smart";function U(e){return e==="code-review"||e==="open"||e==="smart"?e:D}function H(e){let n=5381;const t=r=>{for(let a=0;a<r.length;a++)n=(n<<5)+n+r.charCodeAt(a)|0};for(const r of Object.keys(e.diffs).sort()){const a=e.diffs[r];t(r),t("\0from:"),t(a?.from??""),t("\0to:"),t(a?.to??""),t("\0\0")}return(n>>>0).toString(36)}async function K(e,n){const t=await o(s(e,"judge-review"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({status:n.status,diff:B(n.diff),...n.language?{language:n.language}:{}})});return i(t)}async function Q(e,n){const t=await o(s(e,"discard"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({filepaths:n})});await i(t)}const v="current";function $(e){return e?.[v]??null}function M(e,n,t){return["sandbox-git-status",e,n,t]}function E(e){return["sandbox-git-status",e.orgSlug,e.virtualMcpId,e.branch,e.threadId]}const R=5e3;function Y(e){return{queryKey:E(e),queryFn:()=>k(e),staleTime:R,retry:P}}function _(e){return e?e.modified.length+e.created.length+e.deleted.length+e.not_added.length+e.renamed.length:0}function C(e){return e?_(e)>0||e.staged.length>0||e.conflicted.length>0:!1}function J(e,n){return{diffs:{...e?.diffs??{},...n?.diffs??{}},...e?.mergeBaseSha?{mergeBaseSha:e.mergeBaseSha}:{}}}function W(e){return e.aheadOfBase===void 0||e.aheadOfBase>0||e.ahead>0||(e.unpushed??0)>0}async function z(e,n,t,r){if(r?.fastPreview)return u(e,{base:t});const a=n.headSha?{base:t,headSha:n.headSha}:{base:t},[m,w]=await Promise.all([W(n)?u(e,a):null,C(n)?u(e):null]);return J(m,w)}function V(e,n="code-review"){return n==="open"?{allowed:!0,reason:null}:y(e)?{allowed:!0,reason:null}:{allowed:!1,reason:null}}function X(e,n){return e.length===0?{allowed:!1,reason:null}:n==="open"?{allowed:!0,reason:null}:b(e)?{allowed:!0,reason:null}:n==="smart"?{allowed:!1,reason:null,pending:!0}:{allowed:!1,reason:null}}function Z(e,n){return n!=="smart"||!e||Object.keys(e.diffs).length===0?!1:!y(e)}function ee(e,n){if(n)return{allowed:!1,reason:null,pending:!0};if(!e)return{allowed:!0,reason:null};if(!e.requiresReview)return{allowed:!0,reason:null};const t=e.reason?.trim();return{allowed:!1,reason:t||null}}export{p as B,M as a,Y as b,F as c,z as d,K as e,k as f,X as g,C as h,j as i,V as j,ee as k,$ as l,W as m,Z as n,x as o,U as p,I as q,H as r,E as s,L as t,N as u,Q as v};
@@ -1 +1 @@
1
- import{q as P,r as i,ee as ce,ec as le,e as de,cG as X,c as q,j as I,a4 as fe,T as Se}from"./index-BfWp2Wnw.js";import{h as me,c as pe,u as ye}from"./chat-context-BUMEnIPW.js";import{u as Ee}from"./use-mcp-client-HASDr5yn.js";import{u as he}from"./use-voice-input-DyQL3diM.js";import{c as xe}from"./thread-intent-BtcwbxTJ.js";import{e as Re}from"./backoff-CrEUbyZT.js";import{u as we}from"./use-sandbox-events-rgvK0R-0.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function j(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=j(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(o=>n.subscribe(()=>{const u=ce(s.current,j(n,r.current));s.current!==u&&(s.current=u,le.schedule(o))}),[n]),()=>s.current,()=>s.current)}async function be(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const Y=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),L=new Set,g={mark:(e,t)=>L.add(`${e}::${t}`),clear:(e,t)=>L.delete(`${e}::${t}`),isStopped:(e,t)=>L.has(`${e}::${t}`)};function _e(e,t){const n=P();return de({mutationKey:Y,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>Re(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),o=w.get(s);if(o)return o;const u=(async()=>(await be(e,"SANDBOX_START",r)).structuredContent)();w.set(s,u);try{return await u}finally{w.get(s)===u&&w.delete(s)}},onSuccess:()=>{X(n),t?.onStarted?.()}})}function ze(e,t){const n=q.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:Y,predicate:o=>{if(!e)return!1;const u=o.state.variables;return!u||u.virtualMcpId!==e?!1:(u.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function Le(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function Ze(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function ge(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function et(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,o=e.ownerId??r;if(!r||!o||!s)return t;const u=n?.[o]?.[s];return u?{...t??{},[r]:{...t?.[r]??{},[s]:u}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Q=2,De=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function G(e){return De.has(e)}function $e(e){return e.executionEnabled&&e.failedReason!==null&&G(e.failedReason)&&e.attempts<Q&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const Oe={branch:null,count:0,handled:!1};function Ve(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Be(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function J(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:J(n,t.branch??r),url:t.previewUrl})}const Ke={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},M=i.createContext(Ke);function tt(){return i.use(M)}const W=me(M);function nt(e){const t=q.c(10);let n,r,s;t[0]!==e?({resetKey:s,children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s):(n=t[1],r=t[2],s=t[3]);let o;t[4]!==r||t[5]!==s?(o=I.jsx(Ne,{...r},s),t[4]=r,t[5]=s,t[6]=o):o=t[6];let u;return t[7]!==n||t[8]!==o?(u=I.jsx(W.Host,{source:o,children:n}),t[7]=n,t[8]=o,t[9]=u):u=t[9],u}function Ne(e){return W.usePublish(He(e)),null}function He({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:o,threadId:u}){const{org:b}=fe(),{setCurrentTaskBranch:l}=pe(),z=xe(),p=we(),Z=P(),D=he(t),ee=D.resolved?D.runtime:null,d=ye()?.taskId??null,$=Ee({connectionId:Se,orgId:b.id,orgSlug:b.slug}),c=_e($,{onStarted:()=>{u&&z?.refreshThreadMetadata(u)}}),{mutate:f,reset:te}=c,[ne,S]=i.useState(null),C=i.useRef(new Set),k=i.useRef(null),[O,x]=i.useState(Oe),E=Ve(O,n);E!==O&&x(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:o,seeded:y?null:ne,key:J(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),re=p.status.state==="paused",se=!y||!G(y.reason)||E.count>=Q,oe=Be({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:se}),B=Ue({previewUrl:V,appPaused:re,userStopped:h,startError:oe}),ae=Fe(B),_=n??"",ue=C.current.has(_),F=Le({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:o,userStopped:h,isPending:c.isPending,attempted:ue,sessionRuntime:ee});i.useEffect(()=>{if(!F||!t)return;C.current.add(_);const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] auto-start failed:",a)}})},[F,_,n,t,d,f,l,S]);const R=p.notFound?o?.sandboxHandle??null:null,v=ge({executionEnabled:e,notFound:p.notFound,deadVmId:R,lastDeadVmId:k.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!v||!R||!t)return;k.current=R;const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] self-heal failed:",a)}})},[v,R,t,n,d,f,l,S]);const K=$e({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){x(a=>a.handled?{...a,handled:!1}:a);return}if(!K||!t)return;x(a=>({...a,handled:!0,count:a.count+1}));const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",a)}})},[y,K,t,n,d,f,l,S]);const U=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] user start failed:",a)}})},N=async()=>{if(!(!e||!t||!n)&&o){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}X(Z)}},ie=async()=>{await N(),U()},H=()=>{C.current=new Set,k.current=null,x({branch:n,count:0,handled:!1}),te(),U()};return{branch:n,previewState:B,status:ae,vmEntry:o,previewUrl:V,userStopped:h,start:U,stop:N,restart:ie,retry:H,resume:H}}export{nt as S,tt as a,_e as b,et as o,Ze as s,ze as u};
1
+ import{q as P,r as i,ee as ce,ec as le,e as de,cG as X,c as q,j as I,a4 as fe,T as Se}from"./index-FR7-LkFs.js";import{h as me,c as pe,u as ye}from"./chat-context-CN0ge7G_.js";import{u as Ee}from"./use-mcp-client-B9e5PyU5.js";import{u as he}from"./use-voice-input-CChbkXIH.js";import{c as xe}from"./thread-intent-DDQe6PKd.js";import{e as Re}from"./backoff-CrEUbyZT.js";import{u as we}from"./use-sandbox-events-DYuy4eXR.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function j(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=j(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(o=>n.subscribe(()=>{const u=ce(s.current,j(n,r.current));s.current!==u&&(s.current=u,le.schedule(o))}),[n]),()=>s.current,()=>s.current)}async function be(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const Y=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),L=new Set,g={mark:(e,t)=>L.add(`${e}::${t}`),clear:(e,t)=>L.delete(`${e}::${t}`),isStopped:(e,t)=>L.has(`${e}::${t}`)};function _e(e,t){const n=P();return de({mutationKey:Y,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>Re(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),o=w.get(s);if(o)return o;const u=(async()=>(await be(e,"SANDBOX_START",r)).structuredContent)();w.set(s,u);try{return await u}finally{w.get(s)===u&&w.delete(s)}},onSuccess:()=>{X(n),t?.onStarted?.()}})}function ze(e,t){const n=q.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:Y,predicate:o=>{if(!e)return!1;const u=o.state.variables;return!u||u.virtualMcpId!==e?!1:(u.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function Le(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function Ze(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function ge(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function et(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,o=e.ownerId??r;if(!r||!o||!s)return t;const u=n?.[o]?.[s];return u?{...t??{},[r]:{...t?.[r]??{},[s]:u}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Q=2,De=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function G(e){return De.has(e)}function $e(e){return e.executionEnabled&&e.failedReason!==null&&G(e.failedReason)&&e.attempts<Q&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const Oe={branch:null,count:0,handled:!1};function Ve(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Be(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function J(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:J(n,t.branch??r),url:t.previewUrl})}const Ke={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},M=i.createContext(Ke);function tt(){return i.use(M)}const W=me(M);function nt(e){const t=q.c(10);let n,r,s;t[0]!==e?({resetKey:s,children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s):(n=t[1],r=t[2],s=t[3]);let o;t[4]!==r||t[5]!==s?(o=I.jsx(Ne,{...r},s),t[4]=r,t[5]=s,t[6]=o):o=t[6];let u;return t[7]!==n||t[8]!==o?(u=I.jsx(W.Host,{source:o,children:n}),t[7]=n,t[8]=o,t[9]=u):u=t[9],u}function Ne(e){return W.usePublish(He(e)),null}function He({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:o,threadId:u}){const{org:b}=fe(),{setCurrentTaskBranch:l}=pe(),z=xe(),p=we(),Z=P(),D=he(t),ee=D.resolved?D.runtime:null,d=ye()?.taskId??null,$=Ee({connectionId:Se,orgId:b.id,orgSlug:b.slug}),c=_e($,{onStarted:()=>{u&&z?.refreshThreadMetadata(u)}}),{mutate:f,reset:te}=c,[ne,S]=i.useState(null),C=i.useRef(new Set),k=i.useRef(null),[O,x]=i.useState(Oe),E=Ve(O,n);E!==O&&x(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:o,seeded:y?null:ne,key:J(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),re=p.status.state==="paused",se=!y||!G(y.reason)||E.count>=Q,oe=Be({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:se}),B=Ue({previewUrl:V,appPaused:re,userStopped:h,startError:oe}),ae=Fe(B),_=n??"",ue=C.current.has(_),F=Le({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:o,userStopped:h,isPending:c.isPending,attempted:ue,sessionRuntime:ee});i.useEffect(()=>{if(!F||!t)return;C.current.add(_);const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] auto-start failed:",a)}})},[F,_,n,t,d,f,l,S]);const R=p.notFound?o?.sandboxHandle??null:null,v=ge({executionEnabled:e,notFound:p.notFound,deadVmId:R,lastDeadVmId:k.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!v||!R||!t)return;k.current=R;const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] self-heal failed:",a)}})},[v,R,t,n,d,f,l,S]);const K=$e({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){x(a=>a.handled?{...a,handled:!1}:a);return}if(!K||!t)return;x(a=>({...a,handled:!0,count:a.count+1}));const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",a)}})},[y,K,t,n,d,f,l,S]);const U=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:a=>{T({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] user start failed:",a)}})},N=async()=>{if(!(!e||!t||!n)&&o){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}X(Z)}},ie=async()=>{await N(),U()},H=()=>{C.current=new Set,k.current=null,x({branch:n,count:0,handled:!1}),te(),U()};return{branch:n,previewState:B,status:ae,vmEntry:o,previewUrl:V,userStopped:h,start:U,stop:N,restart:ie,retry:H,resume:H}}export{nt as S,tt as a,_e as b,et as o,Ze as s,ze as u};
@@ -1 +1 @@
1
- import{c as U,r as I,a4 as Ve,eJ as Ue,b as ee,m as O,j as r,a5 as Qe,et as Ge,B as Ne,t as se,I as We,h as Ye,aW as Ke}from"./index-BfWp2Wnw.js";import{a as Pe}from"./Image01-C5Xqhwp5.js";import{s as He}from"./Trash01-CevYpZEM.js";import{i as Re}from"./Upload01-C_8HEOMT.js";import{r as Je,L as Xe,s as Ze,F as et,i as $e}from"./use-never-published-D71BtZNY.js";import{L as Ce}from"./label-CWaQ3ANC.js";import{T as Se,a as ke,c as Ee}from"./tooltip-CqV-qcYU.js";import{b as Ie}from"./repository-binding-BDu0tU0n.js";import{u as tt}from"./chat-context-BUMEnIPW.js";import{u as Fe,a6 as st,h as it,b as rt,a7 as nt}from"./site-editor-toast-D2nHZREM.js";import{c as ot}from"./use-organization-settings-BliP9B1t.js";import{a as at}from"./SwitchHorizontal01-qTGCOGX6.js";import{a as lt,b as ct,P as dt}from"./popover-oFcDtUvN.js";import{S as ft}from"./switch-CfCCzQdg.js";import{T as ut,a as mt}from"./toggle-group-BgBCZLaa.js";import{m as pt}from"./match-site-slug-config-B47_xZCi.js";import{u as gt}from"./use-file-configs-CyAC1Jn2.js";import{u as xt}from"./asset-utils-C_CFQkKi.js";import{i as ht}from"./AlertCircle-mj0sz0gj.js";const Oe=I.createContext(null);function cs(t){const e=U.c(3),{children:s}=t,n=tt(),a=Fe(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==a.kind||e[1]!==s?(o=I.createElement(Oe.Provider,{value:a.kind},s),e[0]=a.kind,e[1]=s,e[2]=o):o=e[2],o}function vt(){const t=U.c(4),e=I.useContext(Oe),{org:s}=Ve(),n=ot("new_blocks_editor"),a=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==a?(o=st({backend:e,hasOrg:a,orgFlag:n}),t[0]=e,t[1]=n,t[2]=a,t[3]=o):o=t[3],o}function yt(){return vt()??!1}function bt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),a=Ue(n);if(typeof a=="string")return a;const o=s.map(i=>Ue(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function jt(t){const e=U.c(29),{className:s}=t,n=ee();if(yt()){let c;e[0]!==n?(c=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==s?(m=O("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=m):m=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Qe,{className:"size-3.5"}),e[4]=x):x=e[4];let p;e[5]!==c||e[6]!==m?(p=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":c,className:m,children:x})}),e[5]=c,e[6]=m,e[7]=p):p=e[7];let h;e[8]!==n?(h=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=h):h=e[9];let g;e[10]!==h?(g=r.jsx(ke,{className:"max-w-56",children:h}),e[10]=h,e[11]=g):g=e[11];let w;return e[12]!==p||e[13]!==g?(w=r.jsxs(Ee,{children:[p,g]}),e[12]=p,e[13]=g,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=O("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let d;e[22]!==n?(d=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=d):d=e[23];let l;e[24]!==d?(l=r.jsx(ke,{className:"max-w-56",children:d}),e[24]=d,e[25]=l):l=e[25];let u;return e[26]!==f||e[27]!==l?(u=r.jsxs(Ee,{children:[f,l]}),e[26]=f,e[27]=l,e[28]=u):u=e[28],u}const Me=I.createContext({required:!1,invalid:!1});function wt(){return I.useContext(Me)}function ds(t){const e=U.c(6),{required:s,invalid:n,children:a}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==a||e[4]!==o?(i=r.jsx(Me.Provider,{value:o,children:a}),e[3]=a,e[4]=o,e[5]=i):i=e[5],i}function fs(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const Nt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function De(t){return Ie(t)?.metadata?.fieldDescriptionTooltips??!1}function Ct(t){const e=U.c(9),{description:s,virtualMcpId:n,children:a}=t,o=De(n);if(!s||!o)return a;let i;e[0]!==a?(i=I.cloneElement(a,{className:O(a.props.className,Nt)}),e[0]=a,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(Se,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let d;e[4]!==s?(d=r.jsx(ke,{className:"max-w-64",children:s}),e[4]=s,e[5]=d):d=e[5];let l;return e[6]!==f||e[7]!==d?(l=r.jsxs(Ee,{delayDuration:300,children:[f,d]}),e[6]=f,e[7]=d,e[8]=l):l=e[8],l}function St(t){const e=U.c(17),{htmlFor:s,label:n,description:a,labelClassName:o,virtualMcpId:i}=t,f=De(i),{required:d,invalid:l}=wt();let u;e[0]!==l||e[1]!==d?(u=d&&l&&r.jsx(jt,{className:"mt-0.5 self-start"}),e[0]=l,e[1]=d,e[2]=u):u=e[2];let c;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(c=r.jsxs(Ce,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=c):c=e[7];const m=c;if(!f){let p;e[8]!==a?(p=a&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:a}),e[8]=a,e[9]=p):p=e[9];let h;return e[10]!==m||e[11]!==p?(h=r.jsxs("div",{className:"space-y-0.5",children:[m,p]}),e[10]=m,e[11]=p,e[12]=h):h=e[12],h}let x;return e[13]!==a||e[14]!==m||e[15]!==i?(x=r.jsx(Ct,{description:a,virtualMcpId:i,children:m}),e[13]=a,e[14]=m,e[15]=i,e[16]=x):x=e[16],x}function kt(t){const e=ee(),s=Ie(t?.virtualMcpId),n=Fe(t?.virtualMcpId,t?.branch),{connection:a}=rt(t?.virtualMcpId),o=nt(n,a);if(s?.metadata?.assetStorageConfigId||!o||!t||n.kind!=="protocol"||!n.describe.assets)return null;const{maxBytes:i}=n.describe.assets,f=d=>`${o}/assets/${encodeURIComponent(d)}`;return async d=>{if(d.size>i)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(i/(1024*1024))} MB`}));if(n.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:d.name}));let l;try{l=await fetch(f(d.name),{method:"PUT",signal:Ge(),headers:{"content-type":d.type||"application/octet-stream"},body:d})}catch{throw new Error(e("decoServe.upload.serverGone",{name:d.name}))}const u=await l.json().catch(()=>null);if(!l.ok||typeof u?.path!="string"){const c=u?.error?.message;throw new Error(e("decoServe.upload.failed",{name:d.name,detail:typeof c=="string"?c:`HTTP ${l.status}`}))}return u.path}}function Et(t,e){const s=U.c(6),n=Fe(t?.virtualMcpId,t?.branch);let a;s[0]!==n||s[1]!==t?.previewUrl?(a=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:it(n),s[0]=n,s[1]=t?.previewUrl,s[2]=a):a=s[2];const o=a;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function It(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Re,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function Tt(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const _t=["low","medium","high","original"];function qe(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Le(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=Ut(t);for(const n of s){const a=n.indexOf("=");if((a>=0?n.slice(0,a):n)===e)return a>=0?n.slice(a+1):""}return null}}function ze(t,e,s){const n=t.indexOf("#"),a=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,d=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(l=>{const u=l.indexOf("=");return(u>=0?l.slice(0,u):l)!==e});return s!==void 0&&d.push(`${e}=${s}`),`${f}${d.length?`?${d.join("&")}`:""}${a}`}function Ut(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Pt(t){if(!t)return;const e=Le(t,"quality");return qe(e)?e:void 0}function $t(t,e){return ze(t,"quality",e)}function Rt(t){return t?Le(t,"muted")!=="false":!0}function Ot(t,e){return ze(t,"muted",e?void 0:"false")}function Mt(t){const e=U.c(36),{value:s,onChange:n,showMuted:a}=t,o=a===void 0?!1:a,i=ee(),f=I.useId();let d;e[0]!==s?(d=Pt(s),e[0]=s,e[1]=d):d=e[1];const l=d;let u;e[2]!==s?(u=Rt(s),e[2]=s,e[3]=u):u=e[3];const c=u;let m;e[4]!==i?(m=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(at,{size:14}),e[6]=x):x=e[6];let p;e[7]!==m?(p=r.jsx(lt,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":m,children:x})}),e[7]=m,e[8]=p):p=e[8];let h;e[9]!==i?(h=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=h):h=e[10];let g;e[11]!==h?(g=r.jsx(Ce,{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=g):g=e[12];const w=l??"";let N;e[13]!==n||e[14]!==s?(N=b=>n($t(s,qe(b)?b:void 0)),e[13]=n,e[14]=s,e[15]=N):N=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=_t.map(Dt),e[16]=y):y=e[16];let F;e[17]!==N||e[18]!==w?(F=r.jsx(ut,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:N,children:y}),e[17]=N,e[18]=w,e[19]=F):F=e[19];let v;e[20]!==F||e[21]!==g?(v=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,F]}),e[20]=F,e[21]=g,e[22]=v):v=e[22];let C;e[23]!==c||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(C=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ce,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(ft,{id:f,checked:c,onCheckedChange:b=>n(Ot(s,b))})]}),e[23]=c,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=C):C=e[29];let S;e[30]!==v||e[31]!==C?(S=r.jsx(ct,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[v,C]})}),e[30]=v,e[31]=C,e[32]=S):S=e[32];let j;return e[33]!==S||e[34]!==p?(j=r.jsxs(dt,{children:[p,S]}),e[33]=S,e[34]=p,e[35]=j):j=e[35],j}function Dt(t){return r.jsx(mt,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function qt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Ae=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Lt(t){const e=U.c(26),{siteSlug:s,virtualMcpId:n,onUploaded:a,onNeedsPicker:o,serveUpload:i}=t,f=ee(),l=Ie(n)?.metadata?.assetStorageConfigId,u=!i;let c;e[0]!==u?(c={enabled:u},e[0]=u,e[1]=c):c=e[1];const m=gt(c),x=xt(),[p,h]=I.useState(!1);let g;e[2]!==m.data?.configs?(g=m.data?.configs??[],e[2]=m.data?.configs,e[3]=g):g=e[3];let w;e[4]!==l||e[5]!==s||e[6]!==g?(w=pt(g,s,l),e[4]=l,e[5]=s,e[6]=g,e[7]=w):w=e[7];const y=l??w?.id??null;let F;e[8]!==m.data?.configs||e[9]!==y||e[10]!==o||e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==x?(F=async function(M){if(!M)return;const $=Array.from(M).filter(zt);if($.length===0){se.error(f("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(i){try{a(await i($[0]))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}return}const k=Je(m.data?.configs??[],y,typeof window<"u"?window.localStorage.getItem(Xe):null);if(!k){o();return}try{const T=await x.mutateAsync({configId:k,file:$[0]}),_=qt(T.publicUrl);if(!_){se.error(f("sectionsEditor.imageField.uploadFailed"));return}a(_),$.length>1&&se.info(f("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:$[0].name}))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}},e[8]=m.data?.configs,e[9]=y,e[10]=o,e[11]=a,e[12]=i,e[13]=f,e[14]=x,e[15]=F):F=e[15];const v=F;let C,S;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&h(!0)},S=E=>{E.currentTarget===E.target&&h(!1)},e[16]=C,e[17]=S):(C=e[16],S=e[17]);let j;e[18]!==v?(j={onDragOver:C,onDragLeave:S,onDrop:E=>{E.preventDefault(),E.stopPropagation(),h(!1),v(E.dataTransfer.files)}},e[18]=v,e[19]=j):j=e[19];let b;return e[20]!==v||e[21]!==p||e[22]!==y||e[23]!==j||e[24]!==x.isPending?(b={isDragging:p,isPending:x.isPending,lockedConfigId:y,handleFiles:v,dropProps:j},e[20]=v,e[21]=p,e[22]=y,e[23]=j,e[24]=x.isPending,e[25]=b):b=e[25],b}function zt(t){return Ae.has(t.type||"")}const At=3;function us(t){const e=U.c(98),{schema:s,value:n,onChange:a,path:o,label:i,sandbox:f,compact:d}=t,l=ee();let u;e[0]!==n?(u=bt(n),e[0]=n,e[1]=u):u=e[1];const c=u,[m,x]=I.useState(!1),[p,h]=I.useState(!1),[g,w]=I.useState(!1),N=Et(f,c),[y,F]=I.useState(0);let v;e[2]!==y||e[3]!==N?(v=y>0?`${N}${N.includes("?")?"&":"?"}retry=${y}`:N,e[2]=y,e[3]=N,e[4]=v):v=e[4];let C;e[5]!==v?(C=Ze(v),e[5]=v,e[6]=C):C=e[6];const S=C,j=!!c&&!S;let b,E;e[7]!==c?(b=c?Ft(c):"",E=b?Tt(b):"",e[7]=c,e[8]=b,e[9]=E):(b=e[8],E=e[9]);const M=E;let $;e[10]!==a?($=function(fe){h(!1),w(!1),F(0),a(fe)},e[10]=a,e[11]=$):$=e[11];const k=$,[T,_]=I.useState(c),[Be,Te]=I.useState(c);Be!==c&&(Te(c),_(c));let ie;e[12]!==k||e[13]!==c?(ie=function(fe){_(fe);const te=fe.trim();te&&!$e(te)||te!==c&&(Te(te),k(te))},e[12]=k,e[13]=c,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==c||e[16]!==T?(re=function(){T.trim()&&!$e(T)&&_(c)},e[15]=c,e[16]=T,e[17]=re):re=e[17];const me=re,R=kt(f),_e=I.useRef(null);let ne;e[18]!==R?(ne=()=>R?_e.current?.click():x(!0),e[18]=R,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug,ge=f?.virtualMcpId;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==R||e[22]!==k||e[23]!==ge||e[24]!==pe?(ae={siteSlug:pe,virtualMcpId:ge,onUploaded:k,onNeedsPicker:oe,serveUpload:R},e[21]=R,e[22]=k,e[23]=ge,e[24]=pe,e[25]=ae):ae=e[25];const{isDragging:le,isPending:ce,lockedConfigId:xe,dropProps:he,handleFiles:ve}=Lt(ae),ye=!i&&"hidden";let q;e[26]!==ye?(q=O("min-w-0",ye),e[26]=ye,e[27]=q):q=e[27];const be=f?.virtualMcpId;let L;e[28]!==i||e[29]!==o||e[30]!==s.description||e[31]!==be?(L=r.jsx(St,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:be}),e[28]=i,e[29]=o,e[30]=s.description,e[31]=be,e[32]=L):L=e[32];let z;e[33]!==q||e[34]!==L?(z=r.jsx("div",{className:q,children:L}),e[33]=q,e[34]=L,e[35]=z):z=e[35];const je=le&&"border-primary ring-2 ring-primary/30",we=ce&&"pointer-events-none opacity-60";let A;e[36]!==je||e[37]!==we?(A=O("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",je,we),e[36]=je,e[37]=we,e[38]=A):A=e[38];let B;e[39]!==D||e[40]!==d||e[41]!==M||e[42]!==b||e[43]!==g||e[44]!==p||e[45]!==ce||e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==S||e[50]!==c||e[51]!==l||e[52]!==j?(B=c?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":l("sectionsEditor.imageField.replaceImage"),className:O("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",d?"h-28":"h-40"),children:[!g&&!j&&r.jsx("img",{src:S,alt:i,className:O("h-full w-full object-contain transition-opacity",!p&&"opacity-0"),onLoad:()=>h(!0),onError:()=>{N!==c&&y<At?setTimeout(()=>F(Bt),600):w(!0)}},c),(g||j)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(Pe,{size:20}),r.jsx("p",{className:"text-xs",children:l("sectionsEditor.imageField.previewUnavailable")})]}),!p&&!g&&!j&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(It,{})]}),!d&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:b}),M&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:M})]})]}):r.jsxs("button",{type:"button",onClick:D,className:O("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",d?"h-28":"h-40"),children:[r.jsx(Pe,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:l(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!d&&r.jsx("span",{className:"text-xs text-muted-foreground",children:l("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[39]=D,e[40]=d,e[41]=M,e[42]=b,e[43]=g,e[44]=p,e[45]=ce,e[46]=i,e[47]=y,e[48]=N,e[49]=S,e[50]=c,e[51]=l,e[52]=j,e[53]=B):B=e[53];let V;e[54]!==le||e[55]!==l?(V=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:l("sectionsEditor.imageField.dropToUpload")})}),e[54]=le,e[55]=l,e[56]=V):V=e[56];let Q;e[57]!==he||e[58]!==A||e[59]!==B||e[60]!==V?(Q=r.jsxs("div",{...he,className:A,children:[B,V]}),e[57]=he,e[58]=A,e[59]=B,e[60]=V,e[61]=Q):Q=e[61];let G;e[62]!==ue?(G=P=>ue(P.target.value),e[62]=ue,e[63]=G):G=e[63];let W;e[64]!==c?(W=P=>{P.key==="Escape"&&_(c)},e[64]=c,e[65]=W):W=e[65];let Y;e[66]!==l?(Y=l("sectionsEditor.imageField.urlPlaceholder"),e[66]=l,e[67]=Y):Y=e[67];let K;e[68]!==o||e[69]!==me||e[70]!==G||e[71]!==W||e[72]!==Y||e[73]!==T?(K=r.jsx(We,{id:o,type:"url",value:T,onChange:G,onBlur:me,onKeyDown:W,placeholder:Y,className:"h-9 min-w-0 flex-1"}),e[68]=o,e[69]=me,e[70]=G,e[71]=W,e[72]=Y,e[73]=T,e[74]=K):K=e[74];let H;e[75]!==D||e[76]!==c||e[77]!==l?(H=!c&&r.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Re,{size:14}),l("sectionsEditor.imageField.browse")]}),e[75]=D,e[76]=c,e[77]=l,e[78]=H):H=e[78];let J;e[79]!==k||e[80]!==c||e[81]!==l?(J=c&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{value:c,onChange:k}),r.jsx(Ne,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(""),className:"h-9 shrink-0","aria-label":l("sectionsEditor.imageField.removeImage"),children:r.jsx(He,{size:14})})]}),e[79]=k,e[80]=c,e[81]=l,e[82]=J):J=e[82];let X;e[83]!==K||e[84]!==H||e[85]!==J?(X=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[K,H,J]}),e[83]=K,e[84]=H,e[85]=J,e[86]=X):X=e[86];let Z;e[87]!==ve||e[88]!==xe||e[89]!==m||e[90]!==R||e[91]!==k?(Z=R?r.jsx("input",{ref:_e,type:"file",accept:[...Ae].join(","),className:"hidden",onChange:P=>{ve(P.target.files),P.target.value=""}}):r.jsx(et,{open:m,onOpenChange:x,mode:"image",onSelect:P=>k(P),lockedConfigId:xe}),e[87]=ve,e[88]=xe,e[89]=m,e[90]=R,e[91]=k,e[92]=Z):Z=e[92];let de;return e[93]!==z||e[94]!==Q||e[95]!==X||e[96]!==Z?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[z,Q,X,Z]}),e[93]=z,e[94]=Q,e[95]=X,e[96]=Z,e[97]=de):de=e[97],de}function Bt(t){return t+1}function ms(t){const e=U.c(15),{isPending:s,isError:n}=t,a=ee();if(n){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ht,{size:13}),e[0]=d):d=e[0];let l;e[1]!==a?(l=a("sandbox.saveStatus.failed"),e[1]=a,e[2]=l):l=e[2];let u;return e[3]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[d,l]}),e[3]=l,e[4]=u):u=e[4],u}if(s){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ye,{className:"size-[13px]"}),e[5]=d):d=e[5];let l;e[6]!==a?(l=a("sandbox.saveStatus.saving"),e[6]=a,e[7]=l):l=e[7];let u;return e[8]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d,l]}),e[8]=l,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Ke,{size:13}),e[10]=o):o=e[10];let i;e[11]!==a?(i=a("sandbox.saveStatus.saved"),e[11]=a,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{It as C,St as F,us as I,jt as M,cs as N,_t as Q,ds as R,ms as S,yt as a,De as b,wt as c,Ct as d,bt as e,Ft as f,Tt as g,kt as h,fs as i,Et as j,Mt as k,Pt as l,Lt as m,$t as s,vt as u};
1
+ import{c as U,r as I,a4 as Ve,eJ as Ue,b as ee,m as O,j as r,a5 as Qe,et as Ge,B as Ne,t as se,I as We,h as Ye,aW as Ke}from"./index-FR7-LkFs.js";import{a as Pe}from"./Image01-Y2lD5lzL.js";import{s as He}from"./Trash01-thCRPjRX.js";import{i as Re}from"./Upload01-phZoBZ05.js";import{r as Je,L as Xe,s as Ze,F as et,i as $e}from"./use-never-published-Ct3dv44f.js";import{L as Ce}from"./label-BrDhuinX.js";import{T as Se,a as ke,c as Ee}from"./tooltip-zEsMTxPP.js";import{b as Ie}from"./repository-binding-DdJXPhL-.js";import{u as tt}from"./chat-context-CN0ge7G_.js";import{u as Fe,a6 as st,h as it,b as rt,a7 as nt}from"./site-editor-toast-CksZ_DBd.js";import{c as ot}from"./use-organization-settings-D9Z_MLl2.js";import{a as at}from"./SwitchHorizontal01-Cfysn-sK.js";import{a as lt,b as ct,P as dt}from"./popover-7x26sV4l.js";import{S as ft}from"./switch-BHmi6NG_.js";import{T as ut,a as mt}from"./toggle-group-DsHNAW_o.js";import{m as pt}from"./match-site-slug-config-B47_xZCi.js";import{u as gt}from"./use-file-configs-CwMKmvEP.js";import{u as xt}from"./asset-utils-D9WZTXXH.js";import{i as ht}from"./AlertCircle-CPiOwWun.js";const Oe=I.createContext(null);function cs(t){const e=U.c(3),{children:s}=t,n=tt(),a=Fe(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==a.kind||e[1]!==s?(o=I.createElement(Oe.Provider,{value:a.kind},s),e[0]=a.kind,e[1]=s,e[2]=o):o=e[2],o}function vt(){const t=U.c(4),e=I.useContext(Oe),{org:s}=Ve(),n=ot("new_blocks_editor"),a=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==a?(o=st({backend:e,hasOrg:a,orgFlag:n}),t[0]=e,t[1]=n,t[2]=a,t[3]=o):o=t[3],o}function yt(){return vt()??!1}function bt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),a=Ue(n);if(typeof a=="string")return a;const o=s.map(i=>Ue(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function jt(t){const e=U.c(29),{className:s}=t,n=ee();if(yt()){let c;e[0]!==n?(c=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==s?(m=O("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=m):m=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Qe,{className:"size-3.5"}),e[4]=x):x=e[4];let p;e[5]!==c||e[6]!==m?(p=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":c,className:m,children:x})}),e[5]=c,e[6]=m,e[7]=p):p=e[7];let h;e[8]!==n?(h=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=h):h=e[9];let g;e[10]!==h?(g=r.jsx(ke,{className:"max-w-56",children:h}),e[10]=h,e[11]=g):g=e[11];let w;return e[12]!==p||e[13]!==g?(w=r.jsxs(Ee,{children:[p,g]}),e[12]=p,e[13]=g,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=O("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let d;e[22]!==n?(d=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=d):d=e[23];let l;e[24]!==d?(l=r.jsx(ke,{className:"max-w-56",children:d}),e[24]=d,e[25]=l):l=e[25];let u;return e[26]!==f||e[27]!==l?(u=r.jsxs(Ee,{children:[f,l]}),e[26]=f,e[27]=l,e[28]=u):u=e[28],u}const Me=I.createContext({required:!1,invalid:!1});function wt(){return I.useContext(Me)}function ds(t){const e=U.c(6),{required:s,invalid:n,children:a}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==a||e[4]!==o?(i=r.jsx(Me.Provider,{value:o,children:a}),e[3]=a,e[4]=o,e[5]=i):i=e[5],i}function fs(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const Nt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function De(t){return Ie(t)?.metadata?.fieldDescriptionTooltips??!1}function Ct(t){const e=U.c(9),{description:s,virtualMcpId:n,children:a}=t,o=De(n);if(!s||!o)return a;let i;e[0]!==a?(i=I.cloneElement(a,{className:O(a.props.className,Nt)}),e[0]=a,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(Se,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let d;e[4]!==s?(d=r.jsx(ke,{className:"max-w-64",children:s}),e[4]=s,e[5]=d):d=e[5];let l;return e[6]!==f||e[7]!==d?(l=r.jsxs(Ee,{delayDuration:300,children:[f,d]}),e[6]=f,e[7]=d,e[8]=l):l=e[8],l}function St(t){const e=U.c(17),{htmlFor:s,label:n,description:a,labelClassName:o,virtualMcpId:i}=t,f=De(i),{required:d,invalid:l}=wt();let u;e[0]!==l||e[1]!==d?(u=d&&l&&r.jsx(jt,{className:"mt-0.5 self-start"}),e[0]=l,e[1]=d,e[2]=u):u=e[2];let c;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(c=r.jsxs(Ce,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=c):c=e[7];const m=c;if(!f){let p;e[8]!==a?(p=a&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:a}),e[8]=a,e[9]=p):p=e[9];let h;return e[10]!==m||e[11]!==p?(h=r.jsxs("div",{className:"space-y-0.5",children:[m,p]}),e[10]=m,e[11]=p,e[12]=h):h=e[12],h}let x;return e[13]!==a||e[14]!==m||e[15]!==i?(x=r.jsx(Ct,{description:a,virtualMcpId:i,children:m}),e[13]=a,e[14]=m,e[15]=i,e[16]=x):x=e[16],x}function kt(t){const e=ee(),s=Ie(t?.virtualMcpId),n=Fe(t?.virtualMcpId,t?.branch),{connection:a}=rt(t?.virtualMcpId),o=nt(n,a);if(s?.metadata?.assetStorageConfigId||!o||!t||n.kind!=="protocol"||!n.describe.assets)return null;const{maxBytes:i}=n.describe.assets,f=d=>`${o}/assets/${encodeURIComponent(d)}`;return async d=>{if(d.size>i)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(i/(1024*1024))} MB`}));if(n.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:d.name}));let l;try{l=await fetch(f(d.name),{method:"PUT",signal:Ge(),headers:{"content-type":d.type||"application/octet-stream"},body:d})}catch{throw new Error(e("decoServe.upload.serverGone",{name:d.name}))}const u=await l.json().catch(()=>null);if(!l.ok||typeof u?.path!="string"){const c=u?.error?.message;throw new Error(e("decoServe.upload.failed",{name:d.name,detail:typeof c=="string"?c:`HTTP ${l.status}`}))}return u.path}}function Et(t,e){const s=U.c(6),n=Fe(t?.virtualMcpId,t?.branch);let a;s[0]!==n||s[1]!==t?.previewUrl?(a=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:it(n),s[0]=n,s[1]=t?.previewUrl,s[2]=a):a=s[2];const o=a;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function It(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Re,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function Tt(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const _t=["low","medium","high","original"];function qe(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Le(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=Ut(t);for(const n of s){const a=n.indexOf("=");if((a>=0?n.slice(0,a):n)===e)return a>=0?n.slice(a+1):""}return null}}function ze(t,e,s){const n=t.indexOf("#"),a=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,d=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(l=>{const u=l.indexOf("=");return(u>=0?l.slice(0,u):l)!==e});return s!==void 0&&d.push(`${e}=${s}`),`${f}${d.length?`?${d.join("&")}`:""}${a}`}function Ut(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Pt(t){if(!t)return;const e=Le(t,"quality");return qe(e)?e:void 0}function $t(t,e){return ze(t,"quality",e)}function Rt(t){return t?Le(t,"muted")!=="false":!0}function Ot(t,e){return ze(t,"muted",e?void 0:"false")}function Mt(t){const e=U.c(36),{value:s,onChange:n,showMuted:a}=t,o=a===void 0?!1:a,i=ee(),f=I.useId();let d;e[0]!==s?(d=Pt(s),e[0]=s,e[1]=d):d=e[1];const l=d;let u;e[2]!==s?(u=Rt(s),e[2]=s,e[3]=u):u=e[3];const c=u;let m;e[4]!==i?(m=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(at,{size:14}),e[6]=x):x=e[6];let p;e[7]!==m?(p=r.jsx(lt,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":m,children:x})}),e[7]=m,e[8]=p):p=e[8];let h;e[9]!==i?(h=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=h):h=e[10];let g;e[11]!==h?(g=r.jsx(Ce,{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=g):g=e[12];const w=l??"";let N;e[13]!==n||e[14]!==s?(N=b=>n($t(s,qe(b)?b:void 0)),e[13]=n,e[14]=s,e[15]=N):N=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=_t.map(Dt),e[16]=y):y=e[16];let F;e[17]!==N||e[18]!==w?(F=r.jsx(ut,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:N,children:y}),e[17]=N,e[18]=w,e[19]=F):F=e[19];let v;e[20]!==F||e[21]!==g?(v=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,F]}),e[20]=F,e[21]=g,e[22]=v):v=e[22];let C;e[23]!==c||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(C=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ce,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(ft,{id:f,checked:c,onCheckedChange:b=>n(Ot(s,b))})]}),e[23]=c,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=C):C=e[29];let S;e[30]!==v||e[31]!==C?(S=r.jsx(ct,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[v,C]})}),e[30]=v,e[31]=C,e[32]=S):S=e[32];let j;return e[33]!==S||e[34]!==p?(j=r.jsxs(dt,{children:[p,S]}),e[33]=S,e[34]=p,e[35]=j):j=e[35],j}function Dt(t){return r.jsx(mt,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function qt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Ae=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Lt(t){const e=U.c(26),{siteSlug:s,virtualMcpId:n,onUploaded:a,onNeedsPicker:o,serveUpload:i}=t,f=ee(),l=Ie(n)?.metadata?.assetStorageConfigId,u=!i;let c;e[0]!==u?(c={enabled:u},e[0]=u,e[1]=c):c=e[1];const m=gt(c),x=xt(),[p,h]=I.useState(!1);let g;e[2]!==m.data?.configs?(g=m.data?.configs??[],e[2]=m.data?.configs,e[3]=g):g=e[3];let w;e[4]!==l||e[5]!==s||e[6]!==g?(w=pt(g,s,l),e[4]=l,e[5]=s,e[6]=g,e[7]=w):w=e[7];const y=l??w?.id??null;let F;e[8]!==m.data?.configs||e[9]!==y||e[10]!==o||e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==x?(F=async function(M){if(!M)return;const $=Array.from(M).filter(zt);if($.length===0){se.error(f("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(i){try{a(await i($[0]))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}return}const k=Je(m.data?.configs??[],y,typeof window<"u"?window.localStorage.getItem(Xe):null);if(!k){o();return}try{const T=await x.mutateAsync({configId:k,file:$[0]}),_=qt(T.publicUrl);if(!_){se.error(f("sectionsEditor.imageField.uploadFailed"));return}a(_),$.length>1&&se.info(f("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:$[0].name}))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}},e[8]=m.data?.configs,e[9]=y,e[10]=o,e[11]=a,e[12]=i,e[13]=f,e[14]=x,e[15]=F):F=e[15];const v=F;let C,S;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&h(!0)},S=E=>{E.currentTarget===E.target&&h(!1)},e[16]=C,e[17]=S):(C=e[16],S=e[17]);let j;e[18]!==v?(j={onDragOver:C,onDragLeave:S,onDrop:E=>{E.preventDefault(),E.stopPropagation(),h(!1),v(E.dataTransfer.files)}},e[18]=v,e[19]=j):j=e[19];let b;return e[20]!==v||e[21]!==p||e[22]!==y||e[23]!==j||e[24]!==x.isPending?(b={isDragging:p,isPending:x.isPending,lockedConfigId:y,handleFiles:v,dropProps:j},e[20]=v,e[21]=p,e[22]=y,e[23]=j,e[24]=x.isPending,e[25]=b):b=e[25],b}function zt(t){return Ae.has(t.type||"")}const At=3;function us(t){const e=U.c(98),{schema:s,value:n,onChange:a,path:o,label:i,sandbox:f,compact:d}=t,l=ee();let u;e[0]!==n?(u=bt(n),e[0]=n,e[1]=u):u=e[1];const c=u,[m,x]=I.useState(!1),[p,h]=I.useState(!1),[g,w]=I.useState(!1),N=Et(f,c),[y,F]=I.useState(0);let v;e[2]!==y||e[3]!==N?(v=y>0?`${N}${N.includes("?")?"&":"?"}retry=${y}`:N,e[2]=y,e[3]=N,e[4]=v):v=e[4];let C;e[5]!==v?(C=Ze(v),e[5]=v,e[6]=C):C=e[6];const S=C,j=!!c&&!S;let b,E;e[7]!==c?(b=c?Ft(c):"",E=b?Tt(b):"",e[7]=c,e[8]=b,e[9]=E):(b=e[8],E=e[9]);const M=E;let $;e[10]!==a?($=function(fe){h(!1),w(!1),F(0),a(fe)},e[10]=a,e[11]=$):$=e[11];const k=$,[T,_]=I.useState(c),[Be,Te]=I.useState(c);Be!==c&&(Te(c),_(c));let ie;e[12]!==k||e[13]!==c?(ie=function(fe){_(fe);const te=fe.trim();te&&!$e(te)||te!==c&&(Te(te),k(te))},e[12]=k,e[13]=c,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==c||e[16]!==T?(re=function(){T.trim()&&!$e(T)&&_(c)},e[15]=c,e[16]=T,e[17]=re):re=e[17];const me=re,R=kt(f),_e=I.useRef(null);let ne;e[18]!==R?(ne=()=>R?_e.current?.click():x(!0),e[18]=R,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug,ge=f?.virtualMcpId;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==R||e[22]!==k||e[23]!==ge||e[24]!==pe?(ae={siteSlug:pe,virtualMcpId:ge,onUploaded:k,onNeedsPicker:oe,serveUpload:R},e[21]=R,e[22]=k,e[23]=ge,e[24]=pe,e[25]=ae):ae=e[25];const{isDragging:le,isPending:ce,lockedConfigId:xe,dropProps:he,handleFiles:ve}=Lt(ae),ye=!i&&"hidden";let q;e[26]!==ye?(q=O("min-w-0",ye),e[26]=ye,e[27]=q):q=e[27];const be=f?.virtualMcpId;let L;e[28]!==i||e[29]!==o||e[30]!==s.description||e[31]!==be?(L=r.jsx(St,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:be}),e[28]=i,e[29]=o,e[30]=s.description,e[31]=be,e[32]=L):L=e[32];let z;e[33]!==q||e[34]!==L?(z=r.jsx("div",{className:q,children:L}),e[33]=q,e[34]=L,e[35]=z):z=e[35];const je=le&&"border-primary ring-2 ring-primary/30",we=ce&&"pointer-events-none opacity-60";let A;e[36]!==je||e[37]!==we?(A=O("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",je,we),e[36]=je,e[37]=we,e[38]=A):A=e[38];let B;e[39]!==D||e[40]!==d||e[41]!==M||e[42]!==b||e[43]!==g||e[44]!==p||e[45]!==ce||e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==S||e[50]!==c||e[51]!==l||e[52]!==j?(B=c?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":l("sectionsEditor.imageField.replaceImage"),className:O("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",d?"h-28":"h-40"),children:[!g&&!j&&r.jsx("img",{src:S,alt:i,className:O("h-full w-full object-contain transition-opacity",!p&&"opacity-0"),onLoad:()=>h(!0),onError:()=>{N!==c&&y<At?setTimeout(()=>F(Bt),600):w(!0)}},c),(g||j)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(Pe,{size:20}),r.jsx("p",{className:"text-xs",children:l("sectionsEditor.imageField.previewUnavailable")})]}),!p&&!g&&!j&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(It,{})]}),!d&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:b}),M&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:M})]})]}):r.jsxs("button",{type:"button",onClick:D,className:O("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",d?"h-28":"h-40"),children:[r.jsx(Pe,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:l(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!d&&r.jsx("span",{className:"text-xs text-muted-foreground",children:l("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[39]=D,e[40]=d,e[41]=M,e[42]=b,e[43]=g,e[44]=p,e[45]=ce,e[46]=i,e[47]=y,e[48]=N,e[49]=S,e[50]=c,e[51]=l,e[52]=j,e[53]=B):B=e[53];let V;e[54]!==le||e[55]!==l?(V=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:l("sectionsEditor.imageField.dropToUpload")})}),e[54]=le,e[55]=l,e[56]=V):V=e[56];let Q;e[57]!==he||e[58]!==A||e[59]!==B||e[60]!==V?(Q=r.jsxs("div",{...he,className:A,children:[B,V]}),e[57]=he,e[58]=A,e[59]=B,e[60]=V,e[61]=Q):Q=e[61];let G;e[62]!==ue?(G=P=>ue(P.target.value),e[62]=ue,e[63]=G):G=e[63];let W;e[64]!==c?(W=P=>{P.key==="Escape"&&_(c)},e[64]=c,e[65]=W):W=e[65];let Y;e[66]!==l?(Y=l("sectionsEditor.imageField.urlPlaceholder"),e[66]=l,e[67]=Y):Y=e[67];let K;e[68]!==o||e[69]!==me||e[70]!==G||e[71]!==W||e[72]!==Y||e[73]!==T?(K=r.jsx(We,{id:o,type:"url",value:T,onChange:G,onBlur:me,onKeyDown:W,placeholder:Y,className:"h-9 min-w-0 flex-1"}),e[68]=o,e[69]=me,e[70]=G,e[71]=W,e[72]=Y,e[73]=T,e[74]=K):K=e[74];let H;e[75]!==D||e[76]!==c||e[77]!==l?(H=!c&&r.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Re,{size:14}),l("sectionsEditor.imageField.browse")]}),e[75]=D,e[76]=c,e[77]=l,e[78]=H):H=e[78];let J;e[79]!==k||e[80]!==c||e[81]!==l?(J=c&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{value:c,onChange:k}),r.jsx(Ne,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(""),className:"h-9 shrink-0","aria-label":l("sectionsEditor.imageField.removeImage"),children:r.jsx(He,{size:14})})]}),e[79]=k,e[80]=c,e[81]=l,e[82]=J):J=e[82];let X;e[83]!==K||e[84]!==H||e[85]!==J?(X=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[K,H,J]}),e[83]=K,e[84]=H,e[85]=J,e[86]=X):X=e[86];let Z;e[87]!==ve||e[88]!==xe||e[89]!==m||e[90]!==R||e[91]!==k?(Z=R?r.jsx("input",{ref:_e,type:"file",accept:[...Ae].join(","),className:"hidden",onChange:P=>{ve(P.target.files),P.target.value=""}}):r.jsx(et,{open:m,onOpenChange:x,mode:"image",onSelect:P=>k(P),lockedConfigId:xe}),e[87]=ve,e[88]=xe,e[89]=m,e[90]=R,e[91]=k,e[92]=Z):Z=e[92];let de;return e[93]!==z||e[94]!==Q||e[95]!==X||e[96]!==Z?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[z,Q,X,Z]}),e[93]=z,e[94]=Q,e[95]=X,e[96]=Z,e[97]=de):de=e[97],de}function Bt(t){return t+1}function ms(t){const e=U.c(15),{isPending:s,isError:n}=t,a=ee();if(n){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ht,{size:13}),e[0]=d):d=e[0];let l;e[1]!==a?(l=a("sandbox.saveStatus.failed"),e[1]=a,e[2]=l):l=e[2];let u;return e[3]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[d,l]}),e[3]=l,e[4]=u):u=e[4],u}if(s){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ye,{className:"size-[13px]"}),e[5]=d):d=e[5];let l;e[6]!==a?(l=a("sandbox.saveStatus.saving"),e[6]=a,e[7]=l):l=e[7];let u;return e[8]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d,l]}),e[8]=l,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Ke,{size:13}),e[10]=o):o=e[10];let i;e[11]!==a?(i=a("sandbox.saveStatus.saved"),e[11]=a,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{It as C,St as F,us as I,jt as M,cs as N,_t as Q,ds as R,ms as S,yt as a,De as b,wt as c,Ct as d,bt as e,Ft as f,Tt as g,kt as h,fs as i,Et as j,Mt as k,Pt as l,Lt as m,$t as s,vt as u};
@@ -1 +1 @@
1
- import{aF as r,dy as p,dw as _,aG as n,bv as i,co as m}from"./index-BfWp2Wnw.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:i(f).optional(),configuration_scopes:i(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=o=>{if(o==="*")return!0;const c=o.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
1
+ import{aF as r,dy as p,dw as _,aG as n,bv as i,co as m}from"./index-FR7-LkFs.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:i(f).optional(),configuration_scopes:i(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=o=>{if(o==="*")return!0;const c=o.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
@@ -1 +1 @@
1
- import{aF as s,cn as e,aG as a,co as d,bv as l}from"./index-BfWp2Wnw.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, registers it (the manifest on Deno, APP_REGISTRY on TanStack), adds the npm dependency, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default — it writes code and restarts the dev server on install, and the restart only works on a daemon new enough to honour a forced step, so an org opts in once its pods are running one. With it off the catalogue stays browsable and nothing is installable, which is also the lever for an org that does not want the CMS writing code."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),cms_auto_commit:e().optional().describe("Fast Preview: commit each CMS save to the editing branch. On by default (see DEFAULT_ON_FLAGS). Off, saves are kept in Studio and shown in the editor and the preview, and reach the branch in one commit when someone publishes or submits for review."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` app's own blocks (`blog/*`) everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible, plus, in the inserter, the sections under the blog app's `customSectionPaths`. Off by default. Blocks already present in a post keep rendering; this only governs what can be added."),blog_view_enabled:e().optional().describe("Blog as a project view of its own (a sidebar row, an app tile and `/blog`), edited on Blog drafts with each post beside the site's render of it. Off by default: the blog stays in the Site Editor's Content tab, and `blog-draft-` branches are ordinary drafts.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only","cms_auto_commit"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
1
+ import{aF as s,cn as e,aG as a,co as d,bv as l}from"./index-FR7-LkFs.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, registers it (the manifest on Deno, APP_REGISTRY on TanStack), adds the npm dependency, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default — it writes code and restarts the dev server on install, and the restart only works on a daemon new enough to honour a forced step, so an org opts in once its pods are running one. With it off the catalogue stays browsable and nothing is installable, which is also the lever for an org that does not want the CMS writing code."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),cms_auto_commit:e().optional().describe("Fast Preview: commit each CMS save to the editing branch. On by default (see DEFAULT_ON_FLAGS). Off, saves are kept in Studio and shown in the editor and the preview, and reach the branch in one commit when someone publishes or submits for review."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` app's own blocks (`blog/*`) everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible, plus, in the inserter, the sections under the blog app's `customSectionPaths`. Off by default. Blocks already present in a post keep rendering; this only governs what can be added."),blog_view_enabled:e().optional().describe("Blog as a project view of its own (a sidebar row, an app tile and `/blog`), edited on Blog drafts with each post beside the site's render of it. Off by default: the blog stays in the Site Editor's Content tab, and `blog-draft-` branches are ordinary drafts.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only","cms_auto_commit"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
@@ -1 +1 @@
1
- import{r as d,c2 as T,b_ as ce,j as b,c4 as _,ci as ae,d$ as O,c5 as C,cc as P,c6 as ie,c as F,m as $}from"./index-BfWp2Wnw.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),m=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=v(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=v(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[ve,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=v(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] transition-[color,box-shadow] focus-ring",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
1
+ import{r as d,c2 as T,b_ as ce,j as b,c4 as _,ci as ae,d$ as O,c5 as C,cc as P,c6 as ie,c as F,m as $}from"./index-FR7-LkFs.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),m=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=v(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=v(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(me,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[ve,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=v(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=v(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] transition-[color,box-shadow] focus-ring",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
@@ -1 +1 @@
1
- import{c as f,j as a,bU as j,h as I,bV as S,bW as b}from"./index-BfWp2Wnw.js";import{i as g}from"./SearchMd-CTSUPag9.js";function N(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:i,className:p,isSearching:c,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==c?(s=a.jsx(j,{className:"pr-0",children:c?a.jsx(I,{className:"size-4"}):a.jsx(g,{})}),e[0]=c,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==i||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:i,placeholder:m,disabled:u}),e[4]=u,e[5]=i,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==p||e[11]!==s||e[12]!==n?(o=a.jsxs(b,{size:"sm",className:p,children:[s,n]}),e[10]=p,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{N as S};
1
+ import{c as f,j as a,bU as j,h as I,bV as S,bW as b}from"./index-FR7-LkFs.js";import{i as g}from"./SearchMd-zyGFO7cc.js";function N(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:i,className:p,isSearching:c,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==c?(s=a.jsx(j,{className:"pr-0",children:c?a.jsx(I,{className:"size-4"}):a.jsx(g,{})}),e[0]=c,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==i||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:i,placeholder:m,disabled:u}),e[4]=u,e[5]=i,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==p||e[11]!==s||e[12]!==n?(o=a.jsxs(b,{size:"sm",className:p,children:[s,n]}),e[10]=p,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{N as S};