decocms 4.380.0 → 4.380.2

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 (368) hide show
  1. package/dist/client/assets/{AlertCircle-DiFFwnXn.js → AlertCircle-CGFLJpTs.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BDoo3URx.js → AreaChart-a82Hhsmi.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DBsIg0tM.js → ArrowLeft-DC5XoBuA.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DAyoDk3L.js → ArrowRight-BOJ1d9xj.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BlMnl5Fe.js → ArrowUp-C1pJvrX2.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-DBj_6lI8.js → CartesianChart-yTuaWbdE.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CeKBIghf.js → CheckCircle-Bw2G2vwj.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-CgAKIOEA.js → ChevronUp-DSgAhhLJ.js} +1 -1
  9. package/dist/client/assets/{Copy01-DH-b-DEp.js → Copy01-BaJ5hTZ2.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-DOq4VYVm.js → CreditCard01-DLxXT7_f.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-lJDK2pti.js → DotsVertical-Cz_1rDcG.js} +1 -1
  12. package/dist/client/assets/{Download01-Do3BZNKR.js → Download01-CGyaU6cf.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-kaDG2aTw.js → ErrorBarContext-H3WwZUjL.js} +1 -1
  14. package/dist/client/assets/{Eye-A3tl5Wzy.js → Eye-DXecVoiS.js} +1 -1
  15. package/dist/client/assets/{Globe01-DtK2maUY.js → Globe01-BWcV-98b.js} +1 -1
  16. package/dist/client/assets/{Globe04-BmvhB0Gt.js → Globe04-Cx7GY3vn.js} +1 -1
  17. package/dist/client/assets/{Image01-mLa5V9Ru.js → Image01-B5ab_A88.js} +1 -1
  18. package/dist/client/assets/{Key01-xkO9bwBT.js → Key01-D0TscG0E.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-C8RwYoPV.js → LayoutLeft-d27AQAwl.js} +1 -1
  20. package/dist/client/assets/{Line-CxPM7nuh.js → Line-iessdnWy.js} +1 -1
  21. package/dist/client/assets/{Link01-DJpHg526.js → Link01-Dx7hRSe5.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-D92xZRHr.js → LinkExternal01-BfutJB7X.js} +1 -1
  23. package/dist/client/assets/{Monitor01-h5IvVPhq.js → Monitor01-Dentn30o.js} +1 -1
  24. package/dist/client/assets/{Package-tkZ6dx50.js → Package-CPNFyhMT.js} +1 -1
  25. package/dist/client/assets/{Palette-CTqPeiU2.js → Palette-DbXyfbJI.js} +1 -1
  26. package/dist/client/assets/{Play-DHVeBlQM.js → Play-CU4Q1GTp.js} +1 -1
  27. package/dist/client/assets/{Plus-CVN0z8nz.js → Plus-D3XzoCF3.js} +1 -1
  28. package/dist/client/assets/{SearchLg-DGWpAE2t.js → SearchLg-BYoLM1MK.js} +1 -1
  29. package/dist/client/assets/{SearchMd-yDG5dnrV.js → SearchMd-DWKZ-mHQ.js} +1 -1
  30. package/dist/client/assets/{Sector-BRiWGOyA.js → Sector-DH8uTs0D.js} +1 -1
  31. package/dist/client/assets/{Settings02-DZlGO72q.js → Settings02-BqG3HPm0.js} +1 -1
  32. package/dist/client/assets/{Share07-AYmj_4-u.js → Share07-o5jM3q0c.js} +1 -1
  33. package/dist/client/assets/{Stars01-42gximKe.js → Stars01-BZHqW_f9.js} +1 -1
  34. package/dist/client/assets/{Sun-ESwNzqLw.js → Sun-DGhoQy96.js} +1 -1
  35. package/dist/client/assets/{Tool01-BPkGCn0Q.js → Tool01-CE_c59RR.js} +1 -1
  36. package/dist/client/assets/{Tool02-BLTB0Mu5.js → Tool02-Bo-RIY8d.js} +1 -1
  37. package/dist/client/assets/{Trash01-ByQC7g6l.js → Trash01-CRCUnlT2.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-C79-zHMj.js → TrendUp01-B5hqDidz.js} +1 -1
  39. package/dist/client/assets/{Upload01-Bor4hbpq.js → Upload01-Bl2MpUhj.js} +1 -1
  40. package/dist/client/assets/{User01-D7HcCt9Q.js → User01-3GLc_M8a.js} +1 -1
  41. package/dist/client/assets/{UserSquare-KXseyaU2.js → UserSquare-CEWYtKNG.js} +1 -1
  42. package/dist/client/assets/{Users01-DtJ1EO6i.js → Users01-DZ2aEDSy.js} +1 -1
  43. package/dist/client/assets/{X-FTMZhNl_.js → X-BGniQsFS.js} +1 -1
  44. package/dist/client/assets/{XCircle-BrT4uSvp.js → XCircle-CLEbTtoV.js} +1 -1
  45. package/dist/client/assets/{XClose-B-rnNFcm.js → XClose-wzn6XIaq.js} +1 -1
  46. package/dist/client/assets/{Zap-DigiqRTQ.js → Zap-BHpOc94D.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-BRgBObyK.js → ZoomOut-CDTxnLh4.js} +1 -1
  48. package/dist/client/assets/{access-gate-wTSTsqMc.js → access-gate-C6A3nRFO.js} +1 -1
  49. package/dist/client/assets/{add-connection-dialog-BdllWDSk.js → add-connection-dialog-Bb9g1-aL.js} +1 -1
  50. package/dist/client/assets/{agent-analytics-DGsCfvbl.js → agent-analytics-Bsz-bSr0.js} +1 -1
  51. package/dist/client/assets/agent-app-DesHz54X.js +1 -0
  52. package/dist/client/assets/{agent-assets-8owHfP5F.js → agent-assets-Biq0mlJm.js} +1 -1
  53. package/dist/client/assets/{agent-automation-Bz0S-16F.js → agent-automation-xDic7y2P.js} +1 -1
  54. package/dist/client/assets/{agent-automations-wd9h-Tht.js → agent-automations-DcuDx55z.js} +1 -1
  55. package/dist/client/assets/{agent-connect-sources-Dy8ZjfQr.js → agent-connect-sources-Cydd6pKs.js} +1 -1
  56. package/dist/client/assets/agent-deck-BfHJuX43.js +1 -0
  57. package/dist/client/assets/{agent-e2e-CuvK9cXo.js → agent-e2e-BpJp1n9i.js} +1 -1
  58. package/dist/client/assets/{agent-experiments-ClpSebT8.js → agent-experiments-DijfK_gJ.js} +1 -1
  59. package/dist/client/assets/agent-file-CMCRpotH.js +1 -0
  60. package/dist/client/assets/{agent-git-AqNtUeWd.js → agent-git-CZf70UrF.js} +1 -1
  61. package/dist/client/assets/{agent-hosting-Dt2l50QO.js → agent-hosting-wzysZLdu.js} +1 -1
  62. package/dist/client/assets/{agent-icon-D7_DgLeg.js → agent-icon-D496OkeL.js} +1 -1
  63. package/dist/client/assets/agent-library-file-D-nUmAuh.js +1 -0
  64. package/dist/client/assets/{agent-monitor-BBFSF-ja.js → agent-monitor-6AAWwBbq.js} +1 -1
  65. package/dist/client/assets/{agent-overview-Bv0_xqlK.js → agent-overview-QbpPeBnc.js} +1 -1
  66. package/dist/client/assets/agent-settings-xOqY0ZbM.js +1 -0
  67. package/dist/client/assets/{agent-site-editor-nd_s2WPG.js → agent-site-editor-DXxcNAAU.js} +13 -13
  68. package/dist/client/assets/agent-site-editor-code-CQaQYkYG.js +2 -0
  69. package/dist/client/assets/{agent-site-editor-content-DUUKv9bZ.js → agent-site-editor-content-BlnYGJNq.js} +2 -2
  70. package/dist/client/assets/{agent-site-editor-preview-DzXJz0uy.js → agent-site-editor-preview-CWjsD5rW.js} +3 -3
  71. package/dist/client/assets/agent-view-CYAR8G1z.js +1 -0
  72. package/dist/client/assets/{agent-view-guard-BRybrHV3.js → agent-view-guard-B6fFe17X.js} +1 -1
  73. package/dist/client/assets/{agents-list-D8J1wfGM.js → agents-list-CqIyRDj0.js} +1 -1
  74. package/dist/client/assets/ai-providers-2e7ta5Tg.js +6 -0
  75. package/dist/client/assets/{alert-DH9D3aPG.js → alert-CIymKwzl.js} +1 -1
  76. package/dist/client/assets/{alert-dialog-6ugQOVnp.js → alert-dialog-Bq7N6ZWF.js} +1 -1
  77. package/dist/client/assets/api-keys-BVhi6eib.js +1 -0
  78. package/dist/client/assets/{api-keys-rUO23RwI.js → api-keys-equ4Tv0D.js} +1 -1
  79. package/dist/client/assets/app-editor-S-OQQx45.js +1 -0
  80. package/dist/client/assets/{asset-utils-BoKJ5PK8.js → asset-utils-ClvN_bIt.js} +1 -1
  81. package/dist/client/assets/{auth-DmDOm64q.js → auth-3KEna5Qg.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-C5ga_-pN.js → auth-catchall-1KfVcSXT.js} +1 -1
  83. package/dist/client/assets/{auth-entry-C2_omLzg.js → auth-entry-BKOXx840.js} +1 -1
  84. package/dist/client/assets/{auth-split-layout-BUUa6qGa.js → auth-split-layout-D5Awhhre.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-6-SdIk-G.js → authenticate-and-persist-oauth-5OH4tqLf.js} +1 -1
  86. package/dist/client/assets/{automation-list-row-xkRsARJ4.js → automation-list-row-CNmGZG7h.js} +1 -1
  87. package/dist/client/assets/{automation-runs-BPNUctbe.js → automation-runs-DoA8WvHT.js} +1 -1
  88. package/dist/client/assets/{automations-C86GtJ-1.js → automations-DtZ-CBg6.js} +1 -1
  89. package/dist/client/assets/{autosend-BF2ntRTS.js → autosend-CgAy_8nv.js} +1 -1
  90. package/dist/client/assets/{avatar-DIbfdIaJ.js → avatar-PPm_nVJO.js} +1 -1
  91. package/dist/client/assets/{badge-BuhJVk0d.js → badge-CzCkyB-y.js} +1 -1
  92. package/dist/client/assets/{block-document-CNdBZYlH.js → block-document-D8uEaf-S.js} +1 -1
  93. package/dist/client/assets/{blocks-preview-workspace-context-Do59qFA-.js → blocks-preview-workspace-context-JV86bUee.js} +1 -1
  94. package/dist/client/assets/{breadcrumb-Bn6Qxv6I.js → breadcrumb-1SsyuAmn.js} +1 -1
  95. package/dist/client/assets/{buckets-MyVzU5Wd.js → buckets-BKOCj--b.js} +1 -1
  96. package/dist/client/assets/{build-improve-prompt-doc-3AB_pLqo.js → build-improve-prompt-doc-Y74P3hyZ.js} +1 -1
  97. package/dist/client/assets/{bulk-category-panel-BmJPTlrj.js → bulk-category-panel-DDeRHIvS.js} +1 -1
  98. package/dist/client/assets/{calendar-Bz-pgKJK.js → calendar-Bs8TzhBE.js} +1 -1
  99. package/dist/client/assets/{capability-load-error-BkDt31rX.js → capability-load-error-qgxNzLRH.js} +1 -1
  100. package/dist/client/assets/category-editor-AbJlO6XH.js +1 -0
  101. package/dist/client/assets/{chart-BPdzcfAa.js → chart-CSB0FjAw.js} +1 -1
  102. package/dist/client/assets/{chat-context-CDAlulfA.js → chat-context-C7f3MLVZ.js} +1 -1
  103. package/dist/client/assets/{chat-draft-ox07yWju.js → chat-draft-BW5UOw44.js} +1 -1
  104. package/dist/client/assets/{checkbox-CCyUpxZx.js → checkbox-Djw8YkXF.js} +1 -1
  105. package/dist/client/assets/{choose-editor-CNRYJEr8.js → choose-editor-CCbrtvab.js} +1 -1
  106. package/dist/client/assets/{cli-auth-success-Cg7F0V5P.js → cli-auth-success-2avwTjVf.js} +1 -1
  107. package/dist/client/assets/{client-icons-DkY0axzR.js → client-icons-CgVdwszb.js} +1 -1
  108. package/dist/client/assets/{collapsible-CS4VRXD_.js → collapsible-CL_tV3Eh.js} +1 -1
  109. package/dist/client/assets/{collection-detail-eW0NUZdX.js → collection-detail-BeOsyZBJ.js} +1 -1
  110. package/dist/client/assets/{collection-display-button-Bc-ifoPd.js → collection-display-button-BPeer94Q.js} +1 -1
  111. package/dist/client/assets/{collection-search-Cf3xxp2D.js → collection-search-CW48jNAm.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-DmsWQn0S.js → collection-table-wrapper-DedUSq_q.js} +1 -1
  113. package/dist/client/assets/{collection-tabs-CKge2GXF.js → collection-tabs-BxNdQr3v.js} +1 -1
  114. package/dist/client/assets/{combobox-BWRBQog_.js → combobox-Dwfed5hM.js} +1 -1
  115. package/dist/client/assets/{command-D92Vc8wZ.js → command-Dp_xVMno.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-BiC5HEIS.js → companion-mcps-section-DwDjUgsF.js} +1 -1
  117. package/dist/client/assets/{connect-BHkghewJ.js → connect-CTaD0CTL.js} +1 -1
  118. package/dist/client/assets/{connect-layout-B6zbLjpp.js → connect-layout-DBtCSLVk.js} +1 -1
  119. package/dist/client/assets/{connection-DINB-U7F.js → connection-B8n_iRDm.js} +1 -1
  120. package/dist/client/assets/{connection-card-B1l82vpD.js → connection-card-d6di2niE.js} +1 -1
  121. package/dist/client/assets/{connection-detail-W9a_OVyK.js → connection-detail-Bd0H2Cr3.js} +1 -1
  122. package/dist/client/assets/{connection-form-helpers-iyzO-C-U.js → connection-form-helpers-D99GQOo-.js} +1 -1
  123. package/dist/client/assets/{connections-DqSoTmKR.js → connections-BbEnv8dv.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-BEfUGIPB.js → create-organization-dialog-C7J_r78k.js} +1 -1
  125. package/dist/client/assets/{decofile-api-CjA5VsH3.js → decofile-api-BirlTWkL.js} +1 -1
  126. package/dist/client/assets/{decopilot-CcmhDMq8.js → decopilot-DOWkbqe-.js} +1 -1
  127. package/dist/client/assets/{dialog-BGeIGaOQ.js → dialog-DTxKdk6B.js} +1 -1
  128. package/dist/client/assets/{discover-Qpp5-Lwt.js → discover-DBWZ7ohk.js} +1 -1
  129. package/dist/client/assets/{domain-settings-BYjmJ-_9.js → domain-settings-Bdyi19GR.js} +1 -1
  130. package/dist/client/assets/{download-app-dialog-tB-sFfox.js → download-app-dialog-B_OO5bFO.js} +1 -1
  131. package/dist/client/assets/{drawer-CW_I7YDU.js → drawer-CwqENKPq.js} +1 -1
  132. package/dist/client/assets/{editor-DG3GAwjz.js → editor-DpRJQ9mq.js} +1 -1
  133. package/dist/client/assets/{empty-state-BxuGfxi2.js → empty-state-Cva040iu.js} +1 -1
  134. package/dist/client/assets/{empty-state-CC1gKASp.js → empty-state-DekE7Ie6.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-BrGvh19v.js → extract-connection-data-B_g-VP9A.js} +1 -1
  136. package/dist/client/assets/{feature-gate-C98Y_ieW.js → feature-gate-CUslF5vY.js} +1 -1
  137. package/dist/client/assets/{feature-paywall-CMPQ2H8B.js → feature-paywall-BD-lgh2_.js} +1 -1
  138. package/dist/client/assets/{file-explorer-BkeCo0w5.js → file-explorer-CWc8jnpt.js} +1 -1
  139. package/dist/client/assets/{file-preview-E6rw-EuT.js → file-preview-DAmEXgR_.js} +1 -1
  140. package/dist/client/assets/{file-share-button-B1vZE_M4.js → file-share-button-xSfhcPPB.js} +1 -1
  141. package/dist/client/assets/{file-type-icon-B1y9alSP.js → file-type-icon-CdJziZKk.js} +1 -1
  142. package/dist/client/assets/{folder-icon-BtshgjPb.js → folder-icon-B-DOdGRA.js} +1 -1
  143. package/dist/client/assets/{form-BRcoMCQk.js → form-Bw33z1SA.js} +1 -1
  144. package/dist/client/assets/{gateway-client-D1O6ejnK.js → gateway-client-CrkEu4dZ.js} +1 -1
  145. package/dist/client/assets/{general-BOoOjY19.js → general-CQVoP6Bh.js} +1 -1
  146. package/dist/client/assets/{github-icon-C3pcNerU.js → github-icon-CfXQNl0v.js} +1 -1
  147. package/dist/client/assets/{home-bhScUN9z.js → home-BLWvCsHm.js} +1 -1
  148. package/dist/client/assets/hooks-BEXBCk9z.js +2 -0
  149. package/dist/client/assets/{hooks-CGvBDr23.js → hooks-DgdsVzEA.js} +1 -1
  150. package/dist/client/assets/{icon-button-B293RRtv.js → icon-button-DYZouDqo.js} +1 -1
  151. package/dist/client/assets/{index-26qOHGKB.js → index-9o3jDog2.js} +1 -1
  152. package/dist/client/assets/{index-CzNCoaYS.js → index-BQHnqw3U.js} +1 -1
  153. package/dist/client/assets/{index-Bnz61WBS.js → index-CNDyHqLd.js} +1 -1
  154. package/dist/client/assets/{index-CqivxnmP.js → index-COA9taIA.js} +1 -1
  155. package/dist/client/assets/{index-DZmLHQw7.js → index-CUrCXCxK.js} +1 -1
  156. package/dist/client/assets/{index-DM-wOMU-.js → index-CeBCCoZB.js} +1 -1
  157. package/dist/client/assets/{index-DUYXZx_q.js → index-DB2dtavd.js} +1 -1
  158. package/dist/client/assets/{index-CWaAUsIH.js → index-DKa2AY2P.js} +1 -1
  159. package/dist/client/assets/{index-KNPlu-mw.js → index-J-HhaIRe.js} +2 -2
  160. package/dist/client/assets/index-L3ADEseX.js +5 -0
  161. package/dist/client/assets/{index-Bpy9PU2z.js → index-RQ433UOD.js} +1 -1
  162. package/dist/client/assets/{index-BlwlTJtx.js → index-b-HPQtaV.js} +1 -1
  163. package/dist/client/assets/{index-4eUstHLE.js → index-mhmcAxUW.js} +1 -1
  164. package/dist/client/assets/{index-oypwdcf2.js → index-oMcUL3Yj.js} +1 -1
  165. package/dist/client/assets/{index-redirect-CkLeqvOA.js → index-redirect-BcnCuUFG.js} +1 -1
  166. package/dist/client/assets/{infiniteQueryObserver-BZK90Cxs.js → infiniteQueryObserver-Bp62E0f5.js} +1 -1
  167. package/dist/client/assets/{infra-billing-CEhwSjdZ.js → infra-billing-BCRjskqP.js} +1 -1
  168. package/dist/client/assets/{input-DjkopZxD.js → input-BwB4jnj_.js} +1 -1
  169. package/dist/client/assets/{input-G3Dl_oju.js → input-D5ksR5GW.js} +1 -1
  170. package/dist/client/assets/{input-DOrXBQ2N.js → input-Dr3S5ak1.js} +1 -1
  171. package/dist/client/assets/{integration-icon-BJ-L2RLP.js → integration-icon-9SSN9Dl9.js} +1 -1
  172. package/dist/client/assets/{label-BNPzApUK.js → label-CjHJo36P.js} +1 -1
  173. package/dist/client/assets/last-preview-page-kpd1zNQa.js +1 -0
  174. package/dist/client/assets/{layout-DkVA_1ZE.js → layout-BeJYnmuf.js} +1 -1
  175. package/dist/client/assets/{legacy-agents-deep-BC6rxEUp.js → legacy-agents-deep-DrKJ1wEq.js} +1 -1
  176. package/dist/client/assets/{legacy-main-redirect-BNDQG9mN.js → legacy-main-redirect-WAZbVTnq.js} +1 -1
  177. package/dist/client/assets/{library-BLff67UU.js → library-4bJ2rmQt.js} +1 -1
  178. package/dist/client/assets/{login-CSMeXlfe.js → login-BWMwZVUY.js} +1 -1
  179. package/dist/client/assets/{markdown-C8T5ITiF.js → markdown-DN_WHoBa.js} +1 -1
  180. package/dist/client/assets/{mcp-app-renderer-CMzraocc.js → mcp-app-renderer-BDiTxwS7.js} +1 -1
  181. package/dist/client/assets/{mcp-oauth-Dwgx5guo.js → mcp-oauth-Cfvqr8fE.js} +1 -1
  182. package/dist/client/assets/{members-DzWhX5uD.js → members-BOQXIgtZ.js} +1 -1
  183. package/dist/client/assets/{message-templates-BVo4ZI-W.js → message-templates-F1a4WGkX.js} +1 -1
  184. package/dist/client/assets/{mini-report-page-Erf27AS0.js → mini-report-page-ol1xCTtf.js} +1 -1
  185. package/dist/client/assets/{mock-board-CExGmBZQ.js → mock-board-CcJYFRSI.js} +3 -3
  186. package/dist/client/assets/{monaco-editor-Ccpjx5-K.js → monaco-editor-BSp0HKdn.js} +1 -1
  187. package/dist/client/assets/{monitoring-stats-row-ol2vQzvk.js → monitoring-stats-row-B07R3XRH.js} +1 -1
  188. package/dist/client/assets/{multi-select-ck6tvIBS.js → multi-select-TwgloS8r.js} +1 -1
  189. package/dist/client/assets/{mustache-BuJC9i7P.js → mustache-CVWbGRah.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-Br33YNZk.js → oauth-callback-CvPKF6HM.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-ai-provider-Bc7GNP8T.js → oauth-callback-ai-provider-COFdHrZu.js} +1 -1
  192. package/dist/client/assets/{onboarding-Dn4ZbQh-.js → onboarding-DrAKPbzp.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-B5nMpWQk.js → optimistic-project-sidebar-views-0t3BJG6O.js} +1 -1
  194. package/dist/client/assets/{org-file-open-context-utbnY1tD.js → org-file-open-context-DLYT0cgI.js} +1 -1
  195. package/dist/client/assets/{organization-choice-B00-ogHL.js → organization-choice-DRI0Xf93.js} +1 -1
  196. package/dist/client/assets/{orgs-BmIFwz6f.js → orgs-DajJVdOr.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-CTsl5oez.js → page-seo-form-D9MSqhdC.js} +1 -1
  198. package/dist/client/assets/pair-CU2rNVlM.js +47 -0
  199. package/dist/client/assets/{plan-ladder-SJELPXMo.js → plan-ladder-CLfe96p7.js} +1 -1
  200. package/dist/client/assets/{popover-dCy-7dpE.js → popover-CqiAzy6q.js} +1 -1
  201. package/dist/client/assets/{post-calendar-7Z8CrNzs.js → post-calendar-BbL2q81W.js} +1 -1
  202. package/dist/client/assets/{post-editor-SR_NBmM2.js → post-editor-BjAlLIBX.js} +1 -1
  203. package/dist/client/assets/{preview-content-N6itSIXn.js → preview-content-BEgqvROI.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-B5LMzCtj.js → preview-dialog-C1_XqXvf.js} +1 -1
  205. package/dist/client/assets/{primitives-BTIInGe8.js → primitives-CenJalqY.js} +1 -1
  206. package/dist/client/assets/{profile-HfhNtjYj.js → profile-Dbwp1FZf.js} +1 -1
  207. package/dist/client/assets/{project-app-view-Bzzo3THn.js → project-app-view-BVaAiMcz.js} +1 -1
  208. package/dist/client/assets/{project-feed-DqYxfGlw.js → project-feed-Dvl8n7rc.js} +1 -1
  209. package/dist/client/assets/{project-icon-ble1qRVZ.js → project-icon-CrCdaVr_.js} +1 -1
  210. package/dist/client/assets/project-reports-Drc1KzOQ.js +1 -0
  211. package/dist/client/assets/project-tasks-DwGCPJ6m.js +1 -0
  212. package/dist/client/assets/{prompts-1PHuUnvr.js → prompts-EXj1sy5I.js} +1 -1
  213. package/dist/client/assets/record-editor-BOZo1ZUq.js +1 -0
  214. package/dist/client/assets/{redirect-editor-5DSn8iED.js → redirect-editor-pNWBdqg6.js} +1 -1
  215. package/dist/client/assets/registry-DsNzo3hF.js +2 -0
  216. package/dist/client/assets/{registry-layout-CfHzR3q0.js → registry-layout-B4sWausW.js} +1 -1
  217. package/dist/client/assets/reports-CzR_Cwbv.js +1 -0
  218. package/dist/client/assets/{reports-gonIp6j-.js → reports-D-pqorfM.js} +1 -1
  219. package/dist/client/assets/{reports-onboarding-DJytBMSN.js → reports-onboarding-Gfw31-tC.js} +1 -1
  220. package/dist/client/assets/{reports-tab-RQ6xFPYf.js → reports-tab-CWRt3rcI.js} +2 -2
  221. package/dist/client/assets/{repositories-Doc5GKmt.js → repositories-Cq6sMn55.js} +1 -1
  222. package/dist/client/assets/{repository-import-picker-oikqMepd.js → repository-import-picker-C-n4lBHF.js} +1 -1
  223. package/dist/client/assets/{repository-picker-BbQ9GWzI.js → repository-picker-CaYH5503.js} +1 -1
  224. package/dist/client/assets/{require-capability-CWlzsbP1.js → require-capability-D2eRS8Ds.js} +1 -1
  225. package/dist/client/assets/{required-auth-layout-tnG7yvfo.js → required-auth-layout-BKb9-6vC.js} +1 -1
  226. package/dist/client/assets/{reset-password-Dv9Sm-TM.js → reset-password-BvVXhylp.js} +1 -1
  227. package/dist/client/assets/{resizable-CLWvSa8l.js → resizable-Bt98DGlm.js} +1 -1
  228. package/dist/client/assets/{review-settings-CqPPZdUH.js → review-settings-CuVB3EmJ.js} +1 -1
  229. package/dist/client/assets/{rich-text-link-control-DktDEZvw.js → rich-text-link-control-N5yQ4FMB.js} +1 -1
  230. package/dist/client/assets/{roles-BX-6nyqV.js → roles-BO1lFKQs.js} +1 -1
  231. package/dist/client/assets/{route-Cc6xSIHm.js → route-BP1JkGvW.js} +1 -1
  232. package/dist/client/assets/{route-CrW6LD3i.js → route-CR7kiBqv.js} +1 -1
  233. package/dist/client/assets/{route-page-header-q5ywKM-B.js → route-page-header-fPq-qE7U.js} +1 -1
  234. package/dist/client/assets/{route-B17vf220.js → route-woaISgz4.js} +1 -1
  235. package/dist/client/assets/{runnable-block-editor-Bx0_mYjr.js → runnable-block-editor-xiAEogpy.js} +1 -1
  236. package/dist/client/assets/{sandbox-lifecycle-context-CTwoR9w6.js → sandbox-lifecycle-context-CmeEs8uW.js} +2 -2
  237. package/dist/client/assets/{schema-BYcOOzAH.js → schema-BmTPXP0h.js} +1 -1
  238. package/dist/client/assets/{scroll-area-CdvrDMMb.js → scroll-area-D72_bYX-.js} +1 -1
  239. package/dist/client/assets/{search-input-C9yfeCwz.js → search-input-DVbLXCEj.js} +1 -1
  240. package/dist/client/assets/{search-toggle-Bk4rVG35.js → search-toggle-B8-QCzR2.js} +1 -1
  241. package/dist/client/assets/{secrets-DPNbUb00.js → secrets-D9w8WJUH.js} +1 -1
  242. package/dist/client/assets/{sections-editor-sY9S19M_.js → sections-editor-bQYiNQsv.js} +1 -1
  243. package/dist/client/assets/{select-model-CWkmZhPO.js → select-model-BUKfjbeY.js} +1 -1
  244. package/dist/client/assets/{select-DyXGk9B4.js → select-zKx4kd1b.js} +1 -1
  245. package/dist/client/assets/{seo-editor-vD4a5QRa.js → seo-editor-C1rg2ivT.js} +1 -1
  246. package/dist/client/assets/{separator-DULnL_Lr.js → separator-DIK9oMBk.js} +1 -1
  247. package/dist/client/assets/{settings-tab-D8ZRyTJD.js → settings-tab-DnH50j1e.js} +1 -1
  248. package/dist/client/assets/{sheet-CY7dL-f7.js → sheet-CCy35_-v.js} +1 -1
  249. package/dist/client/assets/shell-layout-Dj-jZ6jC.js +1 -0
  250. package/dist/client/assets/{sidebar-oesDPvHN.js → sidebar-Y-jcWrzw.js} +1 -1
  251. package/dist/client/assets/{skill-preview-Cqk_qZk7.js → skill-preview-DAUvP3iZ.js} +1 -1
  252. package/dist/client/assets/{skills-D4iqqvg0.js → skills-DQx9g0Gz.js} +1 -1
  253. package/dist/client/assets/{sso--sqekILC.js → sso-DkSKjhD5.js} +1 -1
  254. package/dist/client/assets/{store-B4n1tIh8.js → store-D-H_X08C.js} +1 -1
  255. package/dist/client/assets/store-registry-osFeoz0Q.js +2 -0
  256. package/dist/client/assets/{switch-Cj3JbezF.js → switch-BTJnoG_j.js} +1 -1
  257. package/dist/client/assets/{synced-repos-BppMvTdd.js → synced-repos-05MD6I3R.js} +1 -1
  258. package/dist/client/assets/{table-DuYwpMSZ.js → table-J6_odvOq.js} +1 -1
  259. package/dist/client/assets/{tabs-AYKphigN.js → tabs-DNRDoJPn.js} +1 -1
  260. package/dist/client/assets/{task-board-BJKHiKMb.js → task-board-BRDQJ0Y_.js} +1 -1
  261. package/dist/client/assets/{task-route-BUhSFrl8.js → task-route-D9j1p6oU.js} +1 -1
  262. package/dist/client/assets/{task-status-CDRALfAE.js → task-status-3HWFI1qu.js} +1 -1
  263. package/dist/client/assets/taskboard-analytics-DL1GEMDG.js +1 -0
  264. package/dist/client/assets/{tasks-DlTKKD4m.js → tasks-Bi0sW-D0.js} +1 -1
  265. package/dist/client/assets/tasks-dBux8yBe.js +1 -0
  266. package/dist/client/assets/{textarea-BSGNz7Jp.js → textarea-IiEjpID3.js} +1 -1
  267. package/dist/client/assets/{thread-button-Cd01lRtU.js → thread-button-uDLbMetB.js} +1 -1
  268. package/dist/client/assets/{thread-intent-C0i7ITMJ.js → thread-intent-DeoW4DlO.js} +1 -1
  269. package/dist/client/assets/{thread-route-DVEbK22y.js → thread-route-BJtUmhwW.js} +1 -1
  270. package/dist/client/assets/{thread-route-6CnywxO1.js → thread-route-Cb0bjsjK.js} +1 -1
  271. package/dist/client/assets/{thread-sheet-body-q2p0tLoV.js → thread-sheet-body-BZaEC0cb.js} +1 -1
  272. package/dist/client/assets/{toggle-group-D03c7W4C.js → toggle-group-2-AJ4PX8.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-BB-RYDbU.js → toolbar-icon-button-BNr0uvrm.js} +1 -1
  274. package/dist/client/assets/{tooltip-6YWTYe8Z.js → tooltip-CvsJoQ2r.js} +1 -1
  275. package/dist/client/assets/{track-B5_ADi8n.js → track-B9OWK61W.js} +1 -1
  276. package/dist/client/assets/{types-OwCEy2wn.js → types-DBvOp03a.js} +1 -1
  277. package/dist/client/assets/{usage-stats-BQjc_u1o.js → usage-stats-zzlmS7nl.js} +1 -1
  278. package/dist/client/assets/{use-ai-providers-CkZuKbv6.js → use-ai-providers-C5aBXU5x.js} +1 -1
  279. package/dist/client/assets/{use-automations-Q_CO2GvT.js → use-automations-CHCA-LyE.js} +1 -1
  280. package/dist/client/assets/{use-autosave-DnT7v4ff.js → use-autosave-BjqzqGH1.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-DFWku9NL.js → use-connect-companion-D7rIWDjo.js} +1 -1
  282. package/dist/client/assets/{use-connection-Z5_xgR0n.js → use-connection-BVWLSIgG.js} +1 -1
  283. package/dist/client/assets/{use-copy-Du2OqzJD.js → use-copy-B-yVF-T4.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-DFwp9L_l.js → use-create-virtual-mcp-B8c170Z7.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-Ce9kSBH6.js → use-date-fns-locale-tVWkgiye.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-CAzJuChS.js → use-debounced-autosave-BedmTE3a.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-Jwy4Op50.js → use-debounced-value-RCOUyhbk.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-bCsf8wb-.js → use-deco-credits-CNT8sgKc.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-B2WyR_4j.js → use-decopilot-events-Yer_uM_S.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-Dbm-NAPN.js → use-delete-connection-DeItobW_.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-tYT6ayL8.js → use-deployment-admin-CHH8IV6l.js} +1 -1
  292. package/dist/client/assets/{use-entitlements-16736vo7.js → use-entitlements-z0zlslXa.js} +1 -1
  293. package/dist/client/assets/{use-fast-preview-draft-url-Cf2HoPdQ.js → use-fast-preview-draft-url-DGs-WRxv.js} +1 -1
  294. package/dist/client/assets/{use-file-configs-jr-AKsZr.js → use-file-configs-DpTBLkPU.js} +1 -1
  295. package/dist/client/assets/{use-in-settings-BXgFOjEv.js → use-in-settings-CDLV44q3.js} +1 -1
  296. package/dist/client/assets/{use-infinite-scroll-BBN20wyF.js → use-infinite-scroll-Ch9lEd3E.js} +1 -1
  297. package/dist/client/assets/{use-join-requests-CADNjxk_.js → use-join-requests-BDFPEBoJ.js} +1 -1
  298. package/dist/client/assets/{use-main-panel-tabs-D3DK53Jg.js → use-main-panel-tabs-OW5hqyvj.js} +1 -1
  299. package/dist/client/assets/{use-mcp-auth-status-CkFg4uDS.js → use-mcp-auth-status-BSJCGmmd.js} +1 -1
  300. package/dist/client/assets/{use-mcp-client-D8sgAyd7.js → use-mcp-client-mvmVY_Sq.js} +1 -1
  301. package/dist/client/assets/{use-mcp-prompts-qJI6NP5I.js → use-mcp-prompts-D4-Z04dj.js} +1 -1
  302. package/dist/client/assets/{use-mcp-tools-LnuBfZxX.js → use-mcp-tools-C7FpW5Rr.js} +1 -1
  303. package/dist/client/assets/{use-members-DMybc-jf.js → use-members-CZXSXw_1.js} +1 -1
  304. package/dist/client/assets/use-mobile-BtQeDX-z.js +1 -0
  305. package/dist/client/assets/{use-navigate-to-agent-Btd4glDa.js → use-navigate-to-agent-BiSNiCre.js} +1 -1
  306. package/dist/client/assets/{use-open-billing-url-oyN5rwDH.js → use-open-billing-url-BLr1QHHh.js} +1 -1
  307. package/dist/client/assets/{use-org-auth-client-BgCrq60T.js → use-org-auth-client-BznOfNJb.js} +1 -1
  308. package/dist/client/assets/{use-org-fs-DNivrKYm.js → use-org-fs-Cl4AAfEE.js} +1 -1
  309. package/dist/client/assets/{use-org-repo-syncs-BqG-Ct4U.js → use-org-repo-syncs-CPZxqDW-.js} +1 -1
  310. package/dist/client/assets/{use-org-sso-aX2n03MK.js → use-org-sso-Cb8Yn6yP.js} +1 -1
  311. package/dist/client/assets/{use-organization-roles-SL4NCyLF.js → use-organization-roles-jofIoo_T.js} +1 -1
  312. package/dist/client/assets/{use-organization-settings-d11qialw.js → use-organization-settings-C1FltOgT.js} +1 -1
  313. package/dist/client/assets/{use-panel-navigate-BhNw8w3-.js → use-panel-navigate-CXz4fRn5.js} +1 -1
  314. package/dist/client/assets/{use-project-native-view-presence-BIllRCZd.js → use-project-native-view-presence-3yl9GAt2.js} +1 -1
  315. package/dist/client/assets/{use-project-scope-Bqrah9gL.js → use-project-scope-Dd3XRNTj.js} +1 -1
  316. package/dist/client/assets/{use-registry-connections-DJjqdm_N.js → use-registry-connections-DtQgEcVS.js} +1 -1
  317. package/dist/client/assets/{use-releases-cI15edZo.js → use-releases-CvqcA-kL.js} +1 -1
  318. package/dist/client/assets/{use-reports-diagnostic-Dls9CIPR.js → use-reports-diagnostic-CWgd-3_g.js} +1 -1
  319. package/dist/client/assets/{use-route-default-main-61CcsYHa.js → use-route-default-main-CPQ4AmO4.js} +1 -1
  320. package/dist/client/assets/{use-secrets-_aQ4eduQ.js → use-secrets-q0A46oGN.js} +1 -1
  321. package/dist/client/assets/{use-section-preview-base-TCHkeVlX.js → use-section-preview-base-B_9x3Nht.js} +1 -1
  322. package/dist/client/assets/{use-session-runtime-CF7nbb0R.js → use-session-runtime-DQ_xnOm6.js} +1 -1
  323. package/dist/client/assets/{use-tags-Da6Vtqtg.js → use-tags-CYAPfYQP.js} +1 -1
  324. package/dist/client/assets/{use-task-board-analytics-DIW8PS7P.js → use-task-board-analytics-DLlgZnFs.js} +1 -1
  325. package/dist/client/assets/{use-task-metadata-DgSd05Xp.js → use-task-metadata-D7elYoD_.js} +1 -1
  326. package/dist/client/assets/{use-thread-outputs-Bud7gKP9.js → use-thread-outputs-CVc4ZTLK.js} +1 -1
  327. package/dist/client/assets/{use-view-mode-34R7b13C.js → use-view-mode-oN14Hv6M.js} +1 -1
  328. package/dist/client/assets/{use-virtual-mcp-DbDHdgfs.js → use-virtual-mcp-TYMfCW-P.js} +1 -1
  329. package/dist/client/assets/useInfiniteQuery-DUvEi5Ym.js +1 -0
  330. package/dist/client/assets/{useQueries-CqKcrUhq.js → useQueries-CX0az6_Q.js} +1 -1
  331. package/dist/client/assets/useSuspenseInfiniteQuery-CC7Cv3nZ.js +1 -0
  332. package/dist/client/assets/{users-BllbljO6.js → users--BORUDmN.js} +1 -1
  333. package/dist/client/assets/{utils-Bs6K3de2.js → utils-eMZKRHuP.js} +1 -1
  334. package/dist/client/assets/{variant-calendar-DazMtkTu.js → variant-calendar-7T7b5EH_.js} +1 -1
  335. package/dist/client/assets/{variant-matcher-override-BhkorglB.js → variant-matcher-override-Dko4GZ86.js} +1 -1
  336. package/dist/client/assets/{view-mode-toggle-BTaPLgCL.js → view-mode-toggle-D3ebQ5N9.js} +1 -1
  337. package/dist/client/assets/{virtual-mcp-xuV5EK37.js → virtual-mcp-oulMbZvO.js} +1 -1
  338. package/dist/client/index.html +1 -1
  339. package/dist/server/cli.js +34 -34
  340. package/dist/server/server.js +35 -35
  341. package/package.json +1 -1
  342. package/dist/client/assets/agent-app-SrybpRP1.js +0 -1
  343. package/dist/client/assets/agent-deck-DC1HfpFF.js +0 -1
  344. package/dist/client/assets/agent-file-CZxInd8z.js +0 -1
  345. package/dist/client/assets/agent-library-file-BRFNvj1-.js +0 -1
  346. package/dist/client/assets/agent-settings-DJ9iDT7J.js +0 -1
  347. package/dist/client/assets/agent-site-editor-code-6rjr4RZ0.js +0 -2
  348. package/dist/client/assets/agent-view-B2auQi0S.js +0 -1
  349. package/dist/client/assets/ai-providers-pKZ30Kec.js +0 -6
  350. package/dist/client/assets/api-keys-BYpAQK8B.js +0 -1
  351. package/dist/client/assets/app-editor-DRHO2WYZ.js +0 -1
  352. package/dist/client/assets/category-editor-DWsxrZD0.js +0 -1
  353. package/dist/client/assets/hooks-4Ot6kWFv.js +0 -2
  354. package/dist/client/assets/index-Dx7v6J2e.js +0 -5
  355. package/dist/client/assets/last-preview-page-C_BiYWEQ.js +0 -1
  356. package/dist/client/assets/pair-BtIrWjTl.js +0 -47
  357. package/dist/client/assets/project-reports-BnF1p0_p.js +0 -1
  358. package/dist/client/assets/project-tasks-CtH35uDO.js +0 -1
  359. package/dist/client/assets/record-editor-C1uQSW5J.js +0 -1
  360. package/dist/client/assets/registry-Byv2lHYM.js +0 -2
  361. package/dist/client/assets/reports-CaEHck5d.js +0 -1
  362. package/dist/client/assets/shell-layout-b9tZGlO9.js +0 -1
  363. package/dist/client/assets/store-registry-DVhCfkop.js +0 -2
  364. package/dist/client/assets/taskboard-analytics-OI4dYuZ5.js +0 -1
  365. package/dist/client/assets/tasks-DzgNEDWV.js +0 -1
  366. package/dist/client/assets/use-mobile-CJNxNPMt.js +0 -1
  367. package/dist/client/assets/useInfiniteQuery-CvudKG90.js +0 -1
  368. package/dist/client/assets/useSuspenseInfiniteQuery-gwkPIfeQ.js +0 -1
@@ -1 +1 @@
1
- import{c as w,o as D,K,b as L,j as i}from"./index-KNPlu-mw.js";import{h as P,aI as $,aJ as I,a2 as N,aK as O,aL as Q,aM as M}from"./runnable-block-editor-Bx0_mYjr.js";import{L as A}from"./label-BNPzApUK.js";import{S as k}from"./switch-Cj3JbezF.js";import{c as Y,b as q,a as z,d as J,S as U}from"./select-DyXGk9B4.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function W(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:$(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function le(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function oe(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,r=D(),a=`${t}/${d}/${h}`;let m;e[0]!==h||e[1]!==t||e[2]!==d?(m={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=m):m=e[3];let l;e[4]!==f?(l={onSaved:f},e[4]=f,e[5]=l):l=e[5];const{save:n,flush:u,isPending:p}=P(m,l);let y;e[6]!==a||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const x=r.getQueryData(K.decofile(a))?.[s.blockKey];return W(o,s,x,v)})},e[6]=a,e[7]=r,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let S;e[12]!==a||e[13]!==r||e[14]!==s||e[15]!==n||e[16]!==o?(S=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const x=r.getQueryData(K.decofile(a))?.[s.blockKey];return _(x)?{...x,seo:v}:null})},e[12]=a,e[13]=r,e[14]=s,e[15]=n,e[16]=o,e[17]=S):S=e[17];const b=S;let j;return e[18]!==u||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:u,isPending:p},e[18]=u,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const G="https://deco.cx/docs/en/performance/edge-async-render";function H(c){const e=w.c(23),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=L();let f;e[0]!==t?(f=N(t),e[0]=t,e[1]=f):f=e[1];const r=f;let a;e[2]!==t?(a=I(t),e[2]=t,e[3]=a):a=e[3];const m=a;let l;e[4]!==s?(l=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=l):l=e[5];let n;e[6]!==l?(n=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:l}),e[6]=l,e[7]=n):n=e[7];let u;e[8]!==r||e[9]!==d?(u=i.jsx(k,{id:"seo-enable",checked:r,onCheckedChange:d}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==n||e[12]!==u?(p=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n,u]}),e[11]=n,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==m||e[15]!==o||e[16]!==r||e[17]!==h||e[18]!==s?(y=r&&i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(k,{id:"seo-async-render",checked:m,onCheckedChange:h,className:"shrink-0"})]})]}),e[14]=m,e[15]=o,e[16]=r,e[17]=h,e[18]=s,e[19]=y):y=e[19];let g;return e[20]!==p||e[21]!==y?(g=i.jsxs("div",{className:"space-y-4",children:[p,y]}),e[20]=p,e[21]=y,e[22]=g):g=e[22],g}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=L();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(A,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let r;e[4]!==o?(r=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=r):r=e[5];let a;e[6]!==r?(a=i.jsx(q,{className:"w-full",children:i.jsx(z,{placeholder:r})}),e[6]=r,e[7]=a):a=e[7];let m;e[8]!==t?(m=t.filter(Z).map(X),e[8]=t,e[9]=m):m=e[9];let l;e[10]!==m?(l=i.jsx(J,{children:m}),e[10]=m,e[11]=l):l=e[11];let n;e[12]!==h||e[13]!==a||e[14]!==l||e[15]!==d?(n=i.jsxs(U,{value:d,onValueChange:h,children:[a,l]}),e[12]=h,e[13]=a,e[14]=l,e[15]=d,e[16]=n):n=e[16];let u;return e[17]!==f||e[18]!==n?(u=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=u):u=e[19],u}function X(c){return i.jsx(Y,{value:c.resolveType,children:c.title},c.resolveType)}function Z(c){return c.resolveType.length>0}function re(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:r,siteDefaultSeo:a,onBreadcrumbChange:m,onPersistRaw:l,onInnerChange:n,onClearForm:u,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==u||e[3]!==l?(g=C=>{if(C){const F=M(h);l(F),u(),p();return}l(null),u(),p()},e[0]=h,e[1]=p,e[2]=u,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==l||e[6]!==t?(b=C=>{const F=O(C,t);l(F)},e[5]=l,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let x;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(x=N(t)&&o&&s&&f&&f.length>0&&i.jsx(V,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=x):x=e[16];let R;e[17]!==s||e[18]!==r||e[19]!==d||e[20]!==m||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==a?(R=N(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:r,onChange:C=>n(C),onBreadcrumbChange:m,siteDefaultSeo:a}),e[17]=s,e[18]=r,e[19]=d,e[20]=m,e[21]=n,e[22]=t,e[23]=o,e[24]=a,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==S||e[29]!==t||e[30]!==x||e[31]!==R?(E=i.jsxs(H,{rawSeo:t,onEnableChange:S,onAsyncRenderChange:j,children:[y,x,R]}),e[26]=y,e[27]=j,e[28]=S,e[29]=t,e[30]=x,e[31]=R,e[32]=E):E=e[32],E}export{re as P,le as a,W as b,oe as u};
1
+ import{c as w,o as D,K,b as L,j as i}from"./index-J-HhaIRe.js";import{h as P,aI as $,aJ as I,a2 as N,aK as O,aL as Q,aM as M}from"./runnable-block-editor-xiAEogpy.js";import{L as A}from"./label-CjHJo36P.js";import{S as k}from"./switch-BTJnoG_j.js";import{c as Y,b as q,a as z,d as J,S as U}from"./select-zKx4kd1b.js";function _(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function W(c,e,t,d){if(c.kind==="page"){if(!_(t))return null;const h=t.seo!==void 0?t.seo:e.rawSeoData;return{...t,seo:d===null?null:$(d,h)}}return _(t)?e.siteKind==="block"?d:{...t,seo:d}:null}function le(c,e){const t=c.__resolveType;return typeof t=="string"&&t.length>0?t:e.seoResolveType}function oe(c){const e=w.c(23),{orgSlug:t,virtualMcpId:d,branch:h,target:o,resolved:s,onSaved:f}=c,r=D(),a=`${t}/${d}/${h}`;let m;e[0]!==h||e[1]!==t||e[2]!==d?(m={orgSlug:t,virtualMcpId:d,branch:h},e[0]=h,e[1]=t,e[2]=d,e[3]=m):m=e[3];let l;e[4]!==f?(l={onSaved:f},e[4]=f,e[5]=l):l=e[5];const{save:n,flush:u,isPending:p}=P(m,l);let y;e[6]!==a||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==o?(y=v=>{s&&n(s.blockKey,()=>{const x=r.getQueryData(K.decofile(a))?.[s.blockKey];return W(o,s,x,v)})},e[6]=a,e[7]=r,e[8]=s,e[9]=n,e[10]=o,e[11]=y):y=e[11];const g=y;let S;e[12]!==a||e[13]!==r||e[14]!==s||e[15]!==n||e[16]!==o?(S=v=>{!s||o.kind!=="page"||n(s.blockKey,()=>{const x=r.getQueryData(K.decofile(a))?.[s.blockKey];return _(x)?{...x,seo:v}:null})},e[12]=a,e[13]=r,e[14]=s,e[15]=n,e[16]=o,e[17]=S):S=e[17];const b=S;let j;return e[18]!==u||e[19]!==p||e[20]!==b||e[21]!==g?(j={persistSeo:g,persistRawSeo:b,flush:u,isPending:p},e[18]=u,e[19]=p,e[20]=b,e[21]=g,e[22]=j):j=e[22],j}const G="https://deco.cx/docs/en/performance/edge-async-render";function H(c){const e=w.c(23),{rawSeo:t,onEnableChange:d,onAsyncRenderChange:h,children:o}=c,s=L();let f;e[0]!==t?(f=N(t),e[0]=t,e[1]=f):f=e[1];const r=f;let a;e[2]!==t?(a=I(t),e[2]=t,e[3]=a):a=e[3];const m=a;let l;e[4]!==s?(l=s("sectionsEditor.seoFormChrome.enableLabel"),e[4]=s,e[5]=l):l=e[5];let n;e[6]!==l?(n=i.jsx(A,{htmlFor:"seo-enable",className:"text-sm font-medium",children:l}),e[6]=l,e[7]=n):n=e[7];let u;e[8]!==r||e[9]!==d?(u=i.jsx(k,{id:"seo-enable",checked:r,onCheckedChange:d}),e[8]=r,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==n||e[12]!==u?(p=i.jsxs("div",{className:"flex items-center justify-between gap-3",children:[n,u]}),e[11]=n,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==m||e[15]!==o||e[16]!==r||e[17]!==h||e[18]!==s?(y=r&&i.jsxs(i.Fragment,{children:[o,i.jsxs("div",{className:"flex items-start justify-between gap-3 border-t pt-4",children:[i.jsxs("div",{className:"min-w-0 space-y-1",children:[i.jsx("p",{className:"text-sm font-medium",children:s("sectionsEditor.seoFormChrome.asyncRenderLabel")}),i.jsxs("p",{className:"text-xs leading-normal text-muted-foreground",children:["Render SEO asynchronously with edge caching. Learn more in our"," ",i.jsx("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline-offset-4 hover:underline",children:s("sectionsEditor.seoFormChrome.documentationLinkText")}),"."]})]}),i.jsx(k,{id:"seo-async-render",checked:m,onCheckedChange:h,className:"shrink-0"})]})]}),e[14]=m,e[15]=o,e[16]=r,e[17]=h,e[18]=s,e[19]=y):y=e[19];let g;return e[20]!==p||e[21]!==y?(g=i.jsxs("div",{className:"space-y-4",children:[p,y]}),e[20]=p,e[21]=y,e[22]=g):g=e[22],g}function V(c){const e=w.c(20),{options:t,value:d,onChange:h}=c,o=L();if(t.length<=1)return null;let s;e[0]!==o?(s=o("sectionsEditor.seoTypeSelect.label"),e[0]=o,e[1]=s):s=e[1];let f;e[2]!==s?(f=i.jsx(A,{className:"text-xs text-muted-foreground",children:s}),e[2]=s,e[3]=f):f=e[3];let r;e[4]!==o?(r=o("sectionsEditor.seoTypeSelect.placeholder"),e[4]=o,e[5]=r):r=e[5];let a;e[6]!==r?(a=i.jsx(q,{className:"w-full",children:i.jsx(z,{placeholder:r})}),e[6]=r,e[7]=a):a=e[7];let m;e[8]!==t?(m=t.filter(Z).map(X),e[8]=t,e[9]=m):m=e[9];let l;e[10]!==m?(l=i.jsx(J,{children:m}),e[10]=m,e[11]=l):l=e[11];let n;e[12]!==h||e[13]!==a||e[14]!==l||e[15]!==d?(n=i.jsxs(U,{value:d,onValueChange:h,children:[a,l]}),e[12]=h,e[13]=a,e[14]=l,e[15]=d,e[16]=n):n=e[16];let u;return e[17]!==f||e[18]!==n?(u=i.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[f,n]}),e[17]=f,e[18]=n,e[19]=u):u=e[19],u}function X(c){return i.jsx(Y,{value:c.resolveType,children:c.title},c.resolveType)}function Z(c){return c.resolveType.length>0}function re(c){const e=w.c(33),{rawSeo:t,innerSeo:d,defaultResolveType:h,seoSchema:o,activeResolveType:s,seoTypeOptions:f,formResetKey:r,siteDefaultSeo:a,onBreadcrumbChange:m,onPersistRaw:l,onInnerChange:n,onClearForm:u,onBumpFormKey:p,beforeFields:y}=c;let g;e[0]!==h||e[1]!==p||e[2]!==u||e[3]!==l?(g=C=>{if(C){const F=M(h);l(F),u(),p();return}l(null),u(),p()},e[0]=h,e[1]=p,e[2]=u,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==l||e[6]!==t?(b=C=>{const F=O(C,t);l(F)},e[5]=l,e[6]=t,e[7]=b):b=e[7];const j=b;let v;e[8]!==p||e[9]!==n?(v=C=>{n({__resolveType:C}),p()},e[8]=p,e[9]=n,e[10]=v):v=e[10];const T=v;let x;e[11]!==s||e[12]!==T||e[13]!==t||e[14]!==o||e[15]!==f?(x=N(t)&&o&&s&&f&&f.length>0&&i.jsx(V,{options:f,value:s,onChange:T}),e[11]=s,e[12]=T,e[13]=t,e[14]=o,e[15]=f,e[16]=x):x=e[16];let R;e[17]!==s||e[18]!==r||e[19]!==d||e[20]!==m||e[21]!==n||e[22]!==t||e[23]!==o||e[24]!==a?(R=N(t)&&o&&s&&i.jsx(Q,{schema:o,resolveType:s,value:d,formResetKey:r,onChange:C=>n(C),onBreadcrumbChange:m,siteDefaultSeo:a}),e[17]=s,e[18]=r,e[19]=d,e[20]=m,e[21]=n,e[22]=t,e[23]=o,e[24]=a,e[25]=R):R=e[25];let E;return e[26]!==y||e[27]!==j||e[28]!==S||e[29]!==t||e[30]!==x||e[31]!==R?(E=i.jsxs(H,{rawSeo:t,onEnableChange:S,onAsyncRenderChange:j,children:[y,x,R]}),e[26]=y,e[27]=j,e[28]=S,e[29]=t,e[30]=x,e[31]=R,e[32]=E):E=e[32],E}export{re as P,le as a,W as b,oe as u};
@@ -0,0 +1,47 @@
1
+ import{r as R,c as E,b as U,j as a,an as tt,l as G,a9 as dt,a0 as ge,o as es,a6 as ts,e as ss,K as he,t as ze,m as ft,ad as ns,E as ls,h as as,B as He,aH as mt,ac as os,dV as pt,s as rs,p as qe,d as We,d1 as is,dK as cs,dW as us}from"./index-J-HhaIRe.js";import{ax as ds,ay as fs,az as ms,L as De,F as ps,i as st,aa as gs,a9 as xs,aA as hs,aB as gt,aC as bs,j as Fe,aD as xt,A as ht,aE as fe,ae as ys,u as js,d as vs}from"./agent-icon-D496OkeL.js";import{t as Ie}from"./Stars01-BZHqW_f9.js";import{t as Ns,d as bt}from"./Tool02-Bo-RIY8d.js";import{i as yt}from"./ArrowRight-BOJ1d9xj.js";import{a as Ss}from"./Copy01-BaJ5hTZ2.js";import{b as je,t as Ke,c as nt}from"./format-time-BtXRrtv4.js";import{b as ks,C as _s,a as ws}from"./collapsible-CL_tV3Eh.js";import{u as Cs}from"./use-copy-B-yVF-T4.js";import{a as jt,M as $e,b as Ts}from"./usage-stats-zzlmS7nl.js";import{f as Is,u as $s,r as As,h as Ms}from"./hooks-DgdsVzEA.js";import{f as ve,r as Es,u as Ne,v as Ls,a as Ps,w as Rs,x as zs}from"./chat-context-C7f3MLVZ.js";import{b as Ge,a as Ds,e as Fs}from"./shell-layout-Dj-jZ6jC.js";import{c as Bs}from"./content-blocks-o63cs2vh.js";import{M as Os}from"./mcp-app-renderer-BDiTxwS7.js";import{g as vt}from"./types-DBvOp03a.js";import{o as Us}from"./omit-sandbox-map-jj4lCB2U.js";import{T as Nt,a as St,c as kt}from"./tooltip-CvsJoQ2r.js";import{c as Hs,u as _t}from"./use-mcp-client-mvmVY_Sq.js";import{g as wt,s as Ct}from"./gateway-client-CrkEu4dZ.js";import{s as Tt}from"./tool-namespace-DmnQIdtF.js";import{t as qs,g as pe,u as be}from"./utils-CVEq3hMx.js";import{i as It}from"./AlertCircle-CGFLJpTs.js";import{s as Ws}from"./Eye-DXecVoiS.js";import{s as Ks}from"./XClose-wzn6XIaq.js";import{d as Gs,a as Vs}from"./Tool01-CE_c59RR.js";import{i as Js}from"./Share07-o5jM3q0c.js";import{i as Xs}from"./SearchMd-DWKZ-mHQ.js";import{a as Ve}from"./use-panel-navigate-CXz4fRn5.js";import{a as _e}from"./Image01-B5ab_A88.js";import{b as $t}from"./use-entitlements-z0zlslXa.js";import{I as Qs,M as At}from"./markdown-DN_WHoBa.js";import{n as Mt}from"./LinkExternal01-BfutJB7X.js";import{c as Ys,S as Zs,a as en,b as tn}from"./sheet-CCy35_-v.js";import{I as Se}from"./integration-icon-9SSN9Dl9.js";import{a as Et}from"./use-connection-BVWLSIgG.js";import{a as me}from"./Palette-DbXyfbJI.js";import{u as Lt}from"./use-navigate-to-agent-BiSNiCre.js";import{i as we}from"./Link01-Dx7hRSe5.js";import{g as sn}from"./use-mcp-prompts-D4-Z04dj.js";import{c as nn,P as ln,u as an,e as on,F as rn,s as cn,b as un}from"./index-oMcUL3Yj.js";import{i as dn}from"./Globe01-BWcV-98b.js";import{i as fn}from"./Monitor01-Dentn30o.js";import{a as mn}from"./use-thread-outputs-CVc4ZTLK.js";import{n as pn}from"./Download01-CGyaU6cf.js";import{F as gn}from"./file-type-icon-CdJziZKk.js";import{t as xn}from"./ChevronUp-DSgAhhLJ.js";const hn={damping:.7,stiffness:.05,mass:1.25},bn=70,yn=1e3/60,jn=350;let Ae=!1;globalThis.document?.addEventListener("mousedown",()=>{Ae=!0});globalThis.document?.addEventListener("mouseup",()=>{Ae=!1});globalThis.document?.addEventListener("click",()=>{Ae=!1});const vn=(s={})=>{const[e,t]=R.useState(!1),[n,l]=R.useState(s.initial!==!1),[i,u]=R.useState(!1),c=R.useRef(null);c.current=s;const o=R.useCallback(()=>{if(!Ae)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(x.current)||x.current?.contains(k.commonAncestorContainer)},[]),r=R.useCallback(b=>{d.isAtBottom=b,l(b)},[]),m=R.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=R.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return x.current?.scrollTop??0},set scrollTop(k){if(x.current){const{scrollBehavior:j}=getComputedStyle(x.current);j!=="auto"&&(x.current.style.scrollBehavior="auto"),x.current.scrollTop=k,d.ignoreScrollToTop=x.current.scrollTop,j!=="auto"&&(x.current.style.scrollBehavior=j)}},get targetScrollTop(){return!x.current||!v.current?0:x.current.scrollHeight-1-x.current.clientHeight},get calculatedTargetScrollTop(){if(!x.current||!v.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:x.current,contentElement:v.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=bn}}},[]),f=R.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(c.current,b.animation),{ignoreEscapes:_=!1}=b;let y,S=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{y=Date.now()}):y=k+(b.duration??0);const N=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:C}=d,M=performance.now(),A=(M-(d.lastTick??M))/yn;if(d.animation||(d.animation={behavior:j,promise:w,ignoreEscapes:_}),d.animation.behavior===j&&(d.lastTick=M),o()||k>Date.now())return N();if(C<Math.min(S,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,N();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*A,d.scrollTop+=d.accumulated,d.scrollTop!==C&&(d.accumulated=0)}return N()}return y>Date.now()?(S=d.calculatedTargetScrollTop,N()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:Le(c.current,c.current.resize),ignoreEscapes:_,duration:Math.max(0,y-Date.now())||void 0}):d.isAtBottom)});return w.then(C=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),C))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:N()},[r,o,d]),p=R.useCallback(()=>{m(!0),r(!1)},[m,r]),g=R.useCallback(({target:b})=>{if(b!==x.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:_=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(_=j),u(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(o()){m(!0),r(!1);return}const y=k>_,S=k<_;if(d.animation?.ignoreEscapes){d.scrollTop=_;return}S&&(m(!0),r(!1)),y&&m(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[m,r,o,d]),h=R.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===x.current&&k<0&&x.current.scrollHeight>x.current.clientHeight&&!d.animation?.ignoreEscapes&&(m(!0),r(!1))},[m,r,d]),x=lt(b=>{x.current?.removeEventListener("scroll",g),x.current?.removeEventListener("wheel",h),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",h,{passive:!0})},[]),v=lt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:_}=j.contentRect,y=_-(k??_);if(d.resizeDifference=y,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),u(d.isNearBottom),y>=0){const S=Le(c.current,k?c.current.resize:c.current.initial);f({animation:S,wait:!0,preserveScrollPosition:!0,duration:S==="instant"?void 0:jn})}else d.isNearBottom&&(m(!1),r(!0));k=_,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===y&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:v,scrollRef:x,scrollToBottom:f,stopScroll:p,isAtBottom:n||i,isNearBottom:i,escapedFromLock:e,state:d}};function lt(s,e){const t=R.useCallback(n=>(t.current=n,s(n)),e);return t}const Ee=new Map;function Le(...s){const e={...hn};let t=!1;for(const l of s){if(l==="instant"){t=!0;continue}typeof l=="object"&&(t=!1,e.damping=l.damping??e.damping,e.stiffness=l.stiffness??e.stiffness,e.mass=l.mass??e.mass)}const n=JSON.stringify(e);return Ee.has(n)||Ee.set(n,Object.freeze(e)),t?"instant":Ee.get(n)}function H({icon:s,title:e,usage:t,summary:n,state:l,detail:i,detailVariant:u="code",forceOpen:c,variant:o="default",trailing:r,iconDestructive:m,alwaysChevron:d,defaultOpen:f,children:p}){const g=U(),[h,x]=R.useState(f??!1),{handleCopy:v,copied:b}=Cs(),k=l==="loading",j=l==="error",y=!!(i&&i.trim())||!!p,S=o==="subtask",N=(c??!1)||h,w=vn({initial:k?"instant":!1}),C=a.jsxs(ks,{open:N,onOpenChange:c?void 0:x,className:"min-w-0",children:[a.jsxs(_s,{disabled:!y,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",y&&"[@media(hover:hover)]:hover:bg-accent/30",!y&&"cursor-default",k&&"shimmer"),"aria-disabled":!y,children:[a.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",m?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",y&&(N?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),y&&a.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",N?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:a.jsx(tt,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",N&&"rotate-90")})})]})}),a.jsx("span",{className:G("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):a.jsx("div",{className:"flex-1"}),r&&a.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),a.jsx(jt,{usage:t})]}),y&&a.jsx(ws,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(u==="prose"?a.jsx("div",{className:"mt-1 mb-1",children:a.jsx("div",{ref:w.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a.jsx("p",{ref:w.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:i})})}):a.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:a.jsx("div",{ref:w.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:a.jsxs("div",{ref:w.contentRef,className:"flex items-start justify-between gap-2",children:[a.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:a.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:i})}),a.jsx("button",{type:"button",onClick:()=>v(i),className:"shrink-0 p-1.5 classic:rounded-md compact:rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?a.jsx(dt,{className:"size-3.5"}):a.jsx(Ss,{className:"size-3.5"})})]})})}))})]});return S?a.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:C}):C}function ne(s){const e=E.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=je(t),e[0]=t,e[1]=n):n=e[1];let l;return e[2]!==n?(l=a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=l):l=e[3],l}const Pt=4;function Rt(s){const e=E.c(8),{count:t,noun:n,onClick:l}=s,i=U();let u;e[0]!==t||e[1]!==n||e[2]!==i?(u=i("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=i,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(yt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=c):c=e[4];let o;return e[5]!==l||e[6]!==u?(o=a.jsxs("button",{type:"button",onClick:l,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[u,c]}),e[5]=l,e[6]=u,e[7]=o):o=e[7],o}function zt(s){const e=E.c(12),{message:t,className:n}=s,l=t.created_at??t.metadata?.created_at??null;let i,u,c,o;if(e[0]!==n||e[1]!==l){o=Symbol.for("react.early_return_sentinel");e:{const m=Ke(l);if(m===null){o=null;break e}const d=new Date(m);i=d.toLocaleString(),e[6]!==n?(u=G("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=u):u=e[7],c=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=l,e[2]=i,e[3]=u,e[4]=c,e[5]=o}else i=e[2],u=e[3],c=e[4],o=e[5];if(o!==Symbol.for("react.early_return_sentinel"))return o;let r;return e[8]!==i||e[9]!==u||e[10]!==c?(r=a.jsx("span",{title:i,className:u,children:c}),e[8]=i,e[9]=u,e[10]=c,e[11]=r):r=e[11],r}function Be(s){const e=E.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>nt(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[l,i]=R.useState(n);let u,c;e[2]!==t?(u=()=>{const d=setInterval(()=>i(nt(t,Date.now())),100);return()=>clearInterval(d)},c=[t],e[2]=t,e[3]=u,e[4]=c):(u=e[3],c=e[4]),R.useEffect(u,c);const o=l/1e3;let r;e[5]!==o?(r=je(o),e[5]=o,e[6]=r):r=e[6];let m;return e[7]!==r?(m=a.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=m):m=e[8],m}const Dt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Nn(){const s=E.c(5),[e]=R.useState(Sn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Dt.map((i,u)=>{const{delay:c}=i;return a.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[u],animation:"grid-ripple 1s ease infinite",animationDelay:`${c}ms`}},u)}),s[1]=e,s[2]=n):n=s[2];let l;return s[3]!==n?(l=a.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=l):l=s[4],l}function Sn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Dt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}function kn(s){return{planning:{icon:a.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const _n=1200;function Oe(s){const e=E.c(8),{icon:t,title:n,summary:l,detail:i,state:u,detailVariant:c,trailing:o}=s,r=c===void 0?"prose":c;let m;return e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==u||e[4]!==l||e[5]!==n||e[6]!==o?(m=a.jsx(H,{icon:t,title:n,summary:l,detail:i,state:u,detailVariant:r,trailing:o}),e[0]=i,e[1]=r,e[2]=t,e[3]=u,e[4]=l,e[5]=n,e[6]=o,e[7]=m):m=e[7],m}function wn(s){const e=E.c(22),{startedAt:t}=s,n=U(),l=ve()?.runStatusStage??null,[i,u]=R.useState("planning");let c,o;if(e[0]!==l?(c=()=>{if(l!==null)return;const h=setTimeout(()=>{u("thinking")},_n);return()=>{clearTimeout(h)}},o=[l],e[0]=l,e[1]=c,e[2]=o):(c=e[1],o=e[2]),R.useEffect(c,o),l!==null){let h;e[3]!==l||e[4]!==n?(h=Is(n,l),e[3]=l,e[4]=n,e[5]=h):h=e[5];const x=h;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=a.jsx(Ie,{className:"size-4"}),e[6]=v):v=e[6];const b=`${x.label}...`;let k;e[7]!==t?(k=t!==null&&a.jsx(Be,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==x.detail||e[10]!==b||e[11]!==k?(j=a.jsx(Oe,{icon:v,title:b,summary:x.detail,state:"loading",trailing:k}),e[9]=x.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=kn(n),e[13]=n,e[14]=r):r=e[14];const d=r[i],f=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&a.jsx(Be,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==f||e[20]!==p?(g=a.jsx(Oe,{icon:d.icon,title:f,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=f,e[20]=p,e[21]=g):g=e[21],g}function Cn(s){const e=E.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(Nn,{}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=a.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,a.jsx(Be,{since:t})]}),e[1]=t,e[2]=l):l=e[2],l}const Tn=2e4;function In(s){const e=E.c(9),{startedAt:t}=s,n=U(),l=Ge(1e3),i=ve(),c=(t!==null?l-t:0)>=Tn;let o;e[0]!==t?(o=a.jsx(wn,{startedAt:t}),e[0]=t,e[1]=o):o=e[1];let r;e[2]!==c||e[3]!==i||e[4]!==n?(r=c&&i?.stop&&a.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[a.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),a.jsx("button",{type:"button",onClick:()=>i.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=c,e[3]=i,e[4]=n,e[5]=r):r=e[5];let m;return e[6]!==o||e[7]!==r?(m=a.jsxs("div",{className:"flex flex-col gap-0.5",children:[o,r]}),e[6]=o,e[7]=r,e[8]=m):m=e[8],m}function $n(s){const e=E.c(24),{duration:t,parts:n,isStreaming:l}=s,i=U();let u;e[0]!==n?(u=n.every(En),e[0]=n,e[1]=u):u=e[1];const c=u;let o;e[2]!==t||e[3]!==i?(o=t&&t/1e3>1?i("chat.thinkingIndicator.thoughtFor",{duration:je(t/1e3)}):i("chat.thinkingIndicator.thought"),e[2]=t,e[3]=i,e[4]=o):o=e[4];const r=o;let m;if(e[5]!==c||e[6]!==l||e[7]!==n){const k=n.map(Mn).join(`
2
+ `).trim().split(`
3
+ `).filter(Boolean),j=l?k[k.length-1]??"":k[0]??"";m=!c&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=c,e[6]=l,e[7]=n,e[8]=m}else m=e[8];const d=m;let f;if(e[9]!==c||e[10]!==n){const b=n.map(An).join(`
4
+
5
+ `);f=!c&&b.trim()?b:null,e[9]=c,e[10]=n,e[11]=f}else f=e[11];const p=f;let g;e[12]!==l?(g=l?a.jsx(Ie,{className:"size-4"}):a.jsx(ds,{className:"size-4"}),e[12]=l,e[13]=g):g=e[13];let h;e[14]!==l||e[15]!==i||e[16]!==r?(h=l?i("chat.thinkingIndicator.thinking"):r,e[14]=l,e[15]=i,e[16]=r,e[17]=h):h=e[17];const x=l?"loading":"idle";let v;return e[18]!==p||e[19]!==d||e[20]!==g||e[21]!==h||e[22]!==x?(v=a.jsx(Oe,{icon:g,title:h,summary:d,detail:p,state:x,detailVariant:"prose"}),e[18]=p,e[19]=d,e[20]=g,e[21]=h,e[22]=x,e[23]=v):v=e[23],v}function An(s){return s.text??""}function Mn(s){return s.text??""}function En(s){return s.text?.includes("REDACTED")}function Ln(s){const e=E.c(24),{org:t}=ge(),n=es(),l=$s(),i=ts();let u;e[0]!==i||e[1]!==s?(u=async h=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const v=(await i.call("COLLECTION_THREADS_GET",{id:s})).item?.metadata??{},k=(v.expanded_tools??[]).filter(_=>_.toolName!==h.toolName);k.push({...h,expandedAt:new Date().toISOString()});const j={...Us(v),expanded_tools:k};return await i.call("COLLECTION_THREADS_UPDATE",{id:s,data:{metadata:j}}),k},e[0]=i,e[1]=s,e[2]=u):u=e[2];let c,o,r;e[3]!==t||e[4]!==n||e[5]!==s?(c=async h=>{const x=he.ensureTask(t.id,s??"");await n.cancelQueries({queryKey:x});const v=n.getQueryData(x),k=(v?.metadata?.expanded_tools??[]).filter(j=>j.toolName!==h.toolName);return k.push({...h,expandedAt:new Date().toISOString()}),n.setQueryData(x,j=>j&&{...j,metadata:{...j.metadata??{},expanded_tools:k}}),{previous:v}},o=()=>{n.invalidateQueries({queryKey:he.ensureTask(t.id,s??"")})},r=(h,x,v)=>{const b=he.ensureTask(t.id,s??"");v?.previous===void 0?n.removeQueries({queryKey:b,exact:!0}):n.setQueryData(b,v.previous),ze.error(h instanceof Error?h.message:"Failed to expand tool")},e[3]=t,e[4]=n,e[5]=s,e[6]=c,e[7]=o,e[8]=r):(c=e[6],o=e[7],r=e[8]);let m;e[9]!==u||e[10]!==c||e[11]!==o||e[12]!==r?(m={mutationFn:u,onMutate:c,onSuccess:o,onError:r},e[9]=u,e[10]=c,e[11]=o,e[12]=r,e[13]=m):m=e[13];const d=ss(m);let f;e[14]!==l||e[15]!==d||e[16]!==t||e[17]!==n||e[18]!==s?(f=h=>{if(!s||!l)return;const x=he.ensureTask(t.id,s),v=n.getQueryData(x),k=(v?.metadata?.expanded_tools??[]).filter(_=>_.toolName!==h.toolName);k.push({...h,expandedAt:new Date().toISOString()});const j={...v?.metadata??{},expanded_tools:k};n.setQueryData(x,_=>_&&{..._,metadata:j}),l.patchThread({id:s,metadata:j}),d.mutate(h)},e[14]=l,e[15]=d,e[16]=t,e[17]=n,e[18]=s,e[19]=f):f=e[19];const p=f;let g;return e[20]!==p||e[21]!==d.isPending||e[22]!==d.mutate?(g={addOrReplace:d.mutate,addOrReplaceEager:p,isPending:d.isPending},e[20]=p,e[21]=d.isPending,e[22]=d.mutate,e[23]=g):g=e[23],g}function Pn(s){if(s<1024)return`${s} B`;if(s<1024*1024){const t=s/1024;return t<10?`${t.toFixed(1)} KB`:`${Math.round(t)} KB`}const e=s/(1024*1024);return e<10?`${e.toFixed(1)} MB`:`${Math.round(e)} MB`}function Rn(s,e,t,n){const{data:l,isLoading:i}=ft({queryKey:he.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const u=await Hs({connectionId:e,orgId:t,orgSlug:n});try{const{tools:c}=await u.listTools(),o=Tt(s);return c.find(r=>r.name===o)??null}finally{await u.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:l??void 0,isLoading:i}}const zn={read:{icon:st,labelKey:"chat.generic.tool.read"},write:{icon:Vs,labelKey:"chat.generic.tool.write"},edit:{icon:xs,labelKey:"chat.generic.tool.edit"},grep:{icon:Xs,labelKey:"chat.generic.tool.grep"},glob:{icon:Js,labelKey:"chat.generic.tool.glob"},bash:{icon:gs,labelKey:"chat.generic.tool.bash"},read_tool_output:{icon:st,labelKey:"chat.generic.tool.readToolOutput"},read_resource:{icon:ps,labelKey:"chat.generic.tool.readResource"},read_prompt:{icon:De,labelKey:"chat.generic.tool.readPrompt"},skill:{icon:De,labelKey:"chat.generic.tool.skill"},enable_tool:{icon:Gs,labelKey:"chat.generic.tool.enableTool"},open_in_agent:{icon:ns,labelKey:"chat.generic.tool.openInAgent"},sandbox:{icon:ms,labelKey:"chat.generic.tool.sandbox"}},Ft="studio:bash-sleep-start:v1",Dn=200;function Fn(s,e,t,n=Dn){const l=s.filter(([i])=>i!==e);for(l.push([e,t]);l.length>n;)l.shift();return l}function Bn(){try{const s=sessionStorage.getItem(Ft);if(!s)return[];const e=JSON.parse(s);return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&Number.isFinite(t[1])):[]}catch{return[]}}function On(s){try{const e=Bn(),t=e.find(([l])=>l===s);if(t)return t[1];const n=Date.now();return sessionStorage.setItem(Ft,JSON.stringify(Fn(e,s,n))),n}catch{return Date.now()}}function Bt(s,e){const t=E.c(2);let n;t[0]!==s?(n=()=>On(s),t[0]=s,t[1]=n):n=t[1];const l=R.useState(n)[0];return e??l}function Ot(s){const e=Math.ceil(s/1e3);if(e<60)return`${e}s`;const t=Math.floor(e/60),n=e%60;return n?`${t}m ${n}s`:`${t}m`}function Un(s){const e=E.c(5),{toolCallId:t,durationMs:n,anchorMs:l}=s,i=U(),u=Ge(1e3),o=Bt(t,l)+n-u;let r;e[0]!==o||e[1]!==i?(r=o>0?i("chat.generic.waitingFor",{duration:Ot(o)}):i("chat.generic.wrappingUp"),e[0]=o,e[1]=i,e[2]=r):r=e[2];let m;return e[3]!==r?(m=a.jsx("span",{className:"tabular-nums",children:r}),e[3]=r,e[4]=m):m=e[4],m}const Hn=1e4;function qn(s){const e=E.c(7),{toolCallId:t,anchorMs:n}=s,l=U(),i=Ge(1e3),u=Bt(t,n),c=i-u;if(c<Hn){let m;return e[0]!==l?(m=l("chat.generic.preparing"),e[0]=l,e[1]=m):m=e[1],m}let o;e[2]!==c||e[3]!==l?(o=l("chat.generic.runningFor",{elapsed:Ot(c)}),e[2]=c,e[3]=l,e[4]=o):o=e[4];let r;return e[5]!==o?(r=a.jsx("span",{className:"tabular-nums",children:o}),e[5]=o,e[6]=r):r=e[6],r}const Wn={s:1e3,m:6e4,h:36e5,d:864e5};function Kn(s){const e=/(?:^|[\s;&|(])sleep((?:\s+[\d.]+[smhd]?)+)/g;let t=0,n=!1;for(const l of s.matchAll(e))for(const i of l[1].trim().split(/\s+/)){const u=/^([\d.]+)([smhd]?)$/.exec(i);if(!u)continue;const c=Number.parseFloat(u[1]);Number.isFinite(c)&&(t+=c*(Wn[u[2]||"s"]??1e3),n=!0)}return n?t:null}function Me(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function xe(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}function Te(s){const e=xe(s);if(e===""||e==="[Non-serializable value]")return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const Gn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function Vn(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const n of e.parts)if(n.type==="text"&&typeof n.text=="string")t.push(n.text);else if(n.type==="reasoning")t.push(`## Reasoning
6
+ ${n.text}`);else if(n.type==="source-url")t.push(`## Source URL
7
+ ${n.url}`);else if(n.type==="source-document")t.push(`## Source Document
8
+ ${n.title}`);else if(n.type==="file")t.push(`## File
9
+ ${n.filename??n.url}`);else if(n.type!=="step-start"){if(Gn(n)){const l=n.type.startsWith("tool-")?n.type.slice(5):n.toolName;if(n.state==="input-streaming")t.push(`## ${l}
10
+ Input streaming...`);else if(n.state==="input-available"){const i=xe(n.input).slice(0,20);t.push(`## ${l}
11
+ ### Input
12
+ ${i||"[No input]"}...`)}else if(n.state==="approval-requested")t.push(`## ${l}
13
+ Approval requested...`);else if(n.state==="approval-responded")t.push(`## ${l}
14
+ Approval responded...`);else if(n.state==="output-available"){const i=xe(n.input).slice(0,40),u=xe(n.output).slice(0,40);t.push(n.output!=null?`## ${l}
15
+ Input: ${i||"[No input]"}...
16
+ Output: ${u||"[No output]"}...`:`## ${l}
17
+ Input: ${i||"[No input]"}...
18
+ Output: Tool responded with no output`)}else if(n.state==="output-error"){const i=xe(n.input).slice(0,40);t.push(n.errorText?`## ${l}
19
+ Input: ${i||"[No input]"}...
20
+ Error: ${n.errorText}`:`## ${l}
21
+ Input: ${i||"[No input]"}...
22
+ Error: Tool responded with an error`)}else if(n.state==="output-denied"){const i=xe(n.input).slice(0,40);t.push(`## ${l}
23
+ Input: ${i||"[No input]"}...
24
+ Output: Tool execution was denied`)}}}return t.length>0?t.join(`
25
+
26
+ `):null}function at(s){const e=s&&typeof s=="object"&&"created_at"in s?s.created_at:void 0;return typeof e=="string"||e instanceof Date?Ke(e):null}function Jn(s){const e=s&&typeof s=="object"&&"timeout"in s?s.timeout:void 0;return Math.min(typeof e=="number"?e:3e4,12e4)}function Ce(s){const e=E.c(7),{icon:t,label:n}=s;let l;e[0]!==t?(l=a.jsx(Nt,{asChild:!0,children:a.jsx("span",{className:"flex items-center",children:t})}),e[0]=t,e[1]=l):l=e[1];let i;e[2]!==n?(i=a.jsx(St,{side:"top",children:n}),e[2]=n,e[3]=i):i=e[3];let u;return e[4]!==l||e[5]!==i?(u=a.jsxs(kt,{children:[l,i]}),e[4]=l,e[5]=i,e[6]=u):u=e[6],u}function Xn(s){const e=E.c(19),{annotations:t,toolMeta:n}=s,l=U();let i;e[0]!==n?(i=vt(n),e[0]=n,e[1]=i):i=e[1];const u=!!i;if(!t&&!u)return null;let c;e[2]!==u||e[3]!==l?(c=u&&a.jsx(Ce,{icon:a.jsx(gt,{}),label:l("chat.generic.annotation.interactive")}),e[2]=u,e[3]=l,e[4]=c):c=e[4];let o;e[5]!==t?.readOnlyHint||e[6]!==l?(o=t?.readOnlyHint&&a.jsx(Ce,{icon:a.jsx(Ws,{}),label:l("chat.generic.annotation.readOnly")}),e[5]=t?.readOnlyHint,e[6]=l,e[7]=o):o=e[7];let r;e[8]!==t?.destructiveHint||e[9]!==l?(r=t?.destructiveHint&&a.jsx(Ce,{icon:a.jsx(It,{}),label:l("chat.generic.annotation.destructive")}),e[8]=t?.destructiveHint,e[9]=l,e[10]=r):r=e[10];let m;e[11]!==t?.openWorldHint||e[12]!==l?(m=t?.openWorldHint&&a.jsx(Ce,{icon:a.jsx(Fe,{}),label:l("chat.generic.annotation.openWorld")}),e[11]=t?.openWorldHint,e[12]=l,e[13]=m):m=e[13];let d;return e[14]!==c||e[15]!==o||e[16]!==r||e[17]!==m?(d=a.jsxs(a.Fragment,{children:[c,o,r,m]}),e[14]=c,e[15]=o,e[16]=r,e[17]=m,e[18]=d):d=e[18],d}function Qn(s){return s<1?`${Math.round(s*1e3)}ms`:s<10?`${s.toFixed(1)}s`:`${Math.round(s)}s`}function Yn(s){const e=E.c(13),{latency:t,outputBytes:n}=s,l=typeof t=="number"&&t>0,i=typeof n=="number"&&n>=0;if(!l&&!i)return null;let u;e[0]!==l||e[1]!==t?(u=l&&a.jsx("span",{children:Qn(t)}),e[0]=l,e[1]=t,e[2]=u):u=e[2];let c;e[3]!==i||e[4]!==l?(c=l&&i&&a.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[3]=i,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==i||e[7]!==n?(o=i&&a.jsx("span",{children:Pn(n)}),e[6]=i,e[7]=n,e[8]=o):o=e[8];let r;return e[9]!==u||e[10]!==c||e[11]!==o?(r=a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-mono tabular-nums text-muted-foreground/60 px-1 leading-none",children:[u,c,o]}),e[9]=u,e[10]=c,e[11]=o,e[12]=r):r=e[12],r}function Zn(s,e,t,n){switch(s){case"input-streaming":case"input-available":return n?n("chat.generic.preparing"):"Preparing...";case"approval-requested":return n?n("chat.generic.waitingForApproval"):"Waiting for your approval";case"output-denied":return n?n("chat.generic.cancelled"):"Cancelled";case"output-error":return t??(n?n("chat.generic.failed"):"Failed");case"output-available":{if(e==null)return n?n("chat.generic.done"):"Done";if(typeof e=="string"){const l=e.trim();return l.length>100?l.slice(0,100)+"…":l}if(typeof e=="object"){for(const l of Object.keys(e)){const i=e[l];if(typeof i=="string"&&i.trim()){const u=i.trim();return u.length>100?u.slice(0,100)+"…":u}}return""}return String(e).slice(0,100)}default:return""}}function ot(s){const e=E.c(76),{part:t,annotations:n,latency:l,outputBytes:i,isLastMessage:u,toolMeta:c}=s,o=U(),r="toolName"in t&&typeof t.toolName=="string"?t.toolName:t.type==="dynamic-tool"?o("chat.generic.dynamicTool"):t.type.replace("tool-","")||"Tool",m=Tt(r),d=ve(),f=Es(),{org:p}=ge(),{openSidePanel:g}=Ds(),h=Ne()?.taskId??null,{addOrReplaceEager:x}=Ln(h),{openPanel:v}=Ve(),b=c&&typeof c=="object"&&c!==null&&"connectionId"in c&&c.connectionId!=null&&c.connectionId!==""?String(c.connectionId):f?.selectedVirtualMcp?.id??null,{toolDef:k}=Rn(b?r:null,b,p.id,p.slug),j=k?._meta??c,_=wt(j),y=Ct(m,_),S=zn[y],N=k?.title??(S?.labelKey?o(S.labelKey):void 0)??qs(y);let w;e[0]!==j?(w=vt(j),e[0]=j,e[1]=w):w=e[1];const C=w,M=!!C&&t.state==="output-available",A=b?`${b}:${r}`:null,L=!!n?.destructiveHint,I=M&&!!b&&!L&&!!h;let T;e[2]!==x||e[3]!==b||e[4]!==v||e[5]!==t||e[6]!==r?(T=()=>{if(!b)return;const V="input"in t&&t.input&&typeof t.input=="object"?t.input:{};x({toolName:r,appId:b,args:V}),v(os(b,r))},e[2]=x,e[3]=b,e[4]=v,e[5]=t,e[6]=r,e[7]=T):T=e[7];const $=T;let P;e[8]!==I||e[9]!==$?(P=V=>V==="fullscreen"&&I?($(),"fullscreen"):"inline",e[8]=I,e[9]=$,e[10]=P):P=e[10];const q=P;let B;e[11]!==d||e[12]!==g?(B=V=>{const Z=Bs(V.content);Z.content.length>0&&(g(),d?.sendMessage(Z))},e[11]=d,e[12]=g,e[13]=B):B=e[13];const D=B,F=t.state==="approval-requested"&&u===!1,W=t.state==="output-denied"||F,J=t.state==="output-available"&&typeof t.output=="object"&&t.output!=null&&"isError"in t.output&&t.output.isError===!0;let X;e[14]!==t.state?(X=pe(t.state),e[14]=t.state,e[15]=X):X=e[15];const te=X,Q=F||te==="approval"?"idle":J?"error":te;let se,re;if(e[16]!==Q||e[17]!==J||e[18]!==F||e[19]!==t||e[20]!==o||e[21]!==y){se=t.state==="output-error"?Me(t):void 0;const V=y==="bash"&&Q==="loading"&&t.input&&typeof t.input=="object"&&typeof t.input.command=="string"?t.input.command:null;let Z;e[24]!==V?(Z=V!==null?Kn(V):null,e[24]=V,e[25]=Z):Z=e[25];const ee=Z;let ke;e[26]!==t.input||e[27]!==ee?(ke=ee!==null?Math.min(ee,Jn(t.input)):null,e[26]=t.input,e[27]=ee,e[28]=ke):ke=e[28];const Ze=ke,et="toolCallId"in t?t.toolCallId:"";re=Ze!==null?a.jsx(Un,{toolCallId:et,durationMs:Ze,anchorMs:at(t)}):Q==="loading"?a.jsx(qn,{toolCallId:et,anchorMs:at(t)}):F?o("chat.generic.cancelled"):J?o("chat.generic.failed"):Zn(t.state,t.output,se,o),e[16]=Q,e[17]=J,e[18]=F,e[19]=t,e[20]=o,e[21]=y,e[22]=se,e[23]=re}else se=e[22],re=e[23];const ue=re;let Y="";t.input!==void 0&&(Y=`# Input
27
+ `+Te(t.input)),t.state==="output-error"?(Y&&(Y=Y+`
28
+
29
+ `),Y=Y+(`# Error
30
+ `+(se??""))):t.output!==void 0&&!M&&(Y&&(Y=Y+`
31
+
32
+ `),Y=Y+(`# Output
33
+ `+Te(t.output)));let oe;e:{if(W){let ee;e[29]===Symbol.for("react.memo_cache_sentinel")?(ee=a.jsx(Ks,{}),e[29]=ee):ee=e[29],oe=ee;break e}if(M){let ee;e[30]===Symbol.for("react.memo_cache_sentinel")?(ee=a.jsx(gt,{className:"size-4 text-muted-foreground"}),e[30]=ee):ee=e[30],oe=ee;break e}const V=S?.icon;if(V){let ee;e[31]!==V?(ee=a.jsx(V,{className:"size-4 text-muted-foreground"}),e[31]=V,e[32]=ee):ee=e[32],oe=ee;break e}let Z;e[33]===Symbol.for("react.memo_cache_sentinel")?(Z=a.jsx(bs,{className:"size-4 text-muted-foreground"}),e[33]=Z):Z=e[33],oe=Z}let z;e[34]!==n||e[35]!==c?(z=a.jsx(Xn,{annotations:n,toolMeta:c}),e[34]=n,e[35]=c,e[36]=z):z=e[36];let O;e[37]!==l||e[38]!==i?(O=a.jsx(Yn,{latency:l,outputBytes:i}),e[37]=l,e[38]=i,e[39]=O):O=e[39];let K;e[40]!==z||e[41]!==O?(K=a.jsxs(a.Fragment,{children:[z,O]}),e[40]=z,e[41]=O,e[42]=K):K=e[42];const le=Y||null;let ae;e[43]!==Q||e[44]!==N||e[45]!==W||e[46]!==ue||e[47]!==K||e[48]!==le||e[49]!==oe?(ae=a.jsx(H,{icon:oe,iconDestructive:W,trailing:K,title:N,summary:ue,state:Q,detail:le}),e[43]=Q,e[44]=N,e[45]=W,e[46]=ue,e[47]=K,e[48]=le,e[49]=oe,e[50]=ae):ae=e[50];let de;e[51]!==I||e[52]!==$||e[53]!==o?(de=I&&a.jsx("div",{className:"flex justify-end mt-1.5 mb-1",children:a.jsxs("button",{type:"button",onClick:$,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground classic:rounded-md compact:rounded-lg [@media(hover:hover)]:hover:bg-accent/50 [@media(hover:hover)]:hover:text-foreground transition-colors",children:[a.jsx(hs,{className:"size-3.5"}),o("chat.generic.openInPanel")]})}),e[51]=I,e[52]=$,e[53]=o,e[54]=de):de=e[54];let ie;e[55]!==I||e[56]!==f||e[57]!==b||e[58]!==N||e[59]!==D||e[60]!==q||e[61]!==M||e[62]!==j||e[63]!==p.id||e[64]!==p.slug||e[65]!==t.input||e[66]!==t.output||e[67]!==A||e[68]!==o||e[69]!==y||e[70]!==C?(ie=M&&C&&b&&p?.id&&a.jsx(a.Fragment,{children:a.jsx(ls,{fallback:V=>{const{resetError:Z}=V;return a.jsxs("div",{className:"mt-2 flex items-center gap-2 px-3 py-2.5 border border-dashed border-destructive/30 bg-destructive/5 rounded-lg",children:[a.jsx(It,{size:16,className:"shrink-0 text-destructive"}),a.jsx("span",{className:"flex-1 text-xs text-destructive font-medium",children:o("chat.generic.failedToLoad",{toolName:N})}),a.jsxs(He,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 shrink-0",onClick:Z,children:[a.jsx(mt,{className:"size-3.5"}),o("chat.generic.retry")]})]})},children:a.jsx(R.Suspense,{fallback:a.jsx("div",{className:"mt-2 flex items-center justify-center h-12 border border-border/75 rounded-lg overflow-hidden p-3",children:a.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[a.jsx(as,{className:"size-4"}),a.jsx("span",{className:"text-sm",children:o("chat.generic.loadingApp")})]})}),children:a.jsx(sl,{uiResourceUri:C,connectionId:b,orgId:p.id,orgSlug:p.slug,toolName:y,toolInput:t.input,toolResult:t.output,toolMeta:j,onMessage:D,onUpdateModelContext:A&&f?V=>f.setAppContext(A,V):void 0,onTeardown:A&&f?()=>f.clearAppContext(A):void 0,onRequestDisplayMode:I?q:void 0})})})}),e[55]=I,e[56]=f,e[57]=b,e[58]=N,e[59]=D,e[60]=q,e[61]=M,e[62]=j,e[63]=p.id,e[64]=p.slug,e[65]=t.input,e[66]=t.output,e[67]=A,e[68]=o,e[69]=y,e[70]=C,e[71]=ie):ie=e[71];let ce;return e[72]!==ae||e[73]!==de||e[74]!==ie?(ce=a.jsxs("div",{children:[ae,de,ie]}),e[72]=ae,e[73]=de,e[74]=ie,e[75]=ce):ce=e[75],ce}function Ut(s){return typeof s=="object"&&s!=null&&"type"in s&&s.type==="mcpToolCall"}function el(s){if(s!=null)return Ut(s)?s.arguments??void 0:s}function tl(s){if(s==null)return;if(Ut(s)&&s.result!=null)return s.result;if(typeof s=="object"&&"content"in s&&Array.isArray(s.content)){const t=s.content;if(t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"type"in t[0])return s}const e=typeof s=="string"?s:JSON.stringify(s);return{structuredContent:typeof s=="object"&&!Array.isArray(s)?s:void 0,content:[{type:"text",text:e}]}}function sl(s){const e=E.c(27),{uiResourceUri:t,connectionId:n,orgId:l,orgSlug:i,toolName:u,toolInput:c,toolResult:o,toolMeta:r,onMessage:m,onUpdateModelContext:d,onTeardown:f,onRequestDisplayMode:p}=s;let g;e[0]!==n||e[1]!==l||e[2]!==i?(g={connectionId:n,orgId:l,orgSlug:i},e[0]=n,e[1]=l,e[2]=i,e[3]=g):g=e[3];const h=_t(g);let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x={type:"object"},e[4]=x):x=e[4];let v;e[5]!==r?(v=r!=null&&{_meta:r},e[5]=r,e[6]=v):v=e[6];let b;e[7]!==v||e[8]!==u?(b={name:u,inputSchema:x,...v},e[7]=v,e[8]=u,e[9]=b):b=e[9];const k=b;let j;e[10]!==k?(j={tool:k},e[10]=k,e[11]=j):j=e[11];let _;e[12]!==c?(_=el(c),e[12]=c,e[13]=_):_=e[13];let y;e[14]!==o?(y=tl(o),e[14]=o,e[15]=y):y=e[15];let S;return e[16]!==h||e[17]!==m||e[18]!==p||e[19]!==f||e[20]!==d||e[21]!==l||e[22]!==j||e[23]!==_||e[24]!==y||e[25]!==t?(S=a.jsx("div",{className:"mt-2 border border-border/75 rounded-lg overflow-hidden p-3",children:a.jsx(Os,{resourceURI:t,orgId:l,toolInfo:j,toolInput:_,toolResult:y,client:h,onMessage:m,onUpdateModelContext:d,onTeardown:f,onRequestDisplayMode:p})}),e[16]=h,e[17]=m,e[18]=p,e[19]=f,e[20]=d,e[21]=l,e[22]=j,e[23]=_,e[24]=y,e[25]=t,e[26]=S):S=e[26],S}const rt="studio-storage://",it="mesh-storage://";function Je(s){return s.startsWith(rt)?s.slice(rt.length):s.startsWith(it)?s.slice(it.length):null}function Ht(s,e){const t=Je(s);return t!==null?`/api/${e}/files/${t}`:s}function nl(s){return Array.isArray(s?.images)?s.images:void 0}function ll(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;return n?{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:0,cacheReadTokens:0,cacheWriteTokens:0}:null}function al(s){const e=E.c(14),{uri:t,orgSlug:n}=s,l=U();let i;e[0]!==n||e[1]!==t?(i=Ht(t,n),e[0]=n,e[1]=t,e[2]=i):i=e[2];const u=i;let c;e[3]!==l||e[4]!==t?(c=Je(t)!==null?t.slice(t.lastIndexOf("/")+1):l("chat.generateImage.reference"),e[3]=l,e[4]=t,e[5]=c):c=e[5];const o=c;let r;e[6]!==o?(r=a.jsx(Nt,{asChild:!0,children:a.jsx("span",{className:"inline-flex items-center gap-1 px-1 py-0.5 rounded bg-muted text-muted-foreground text-xs cursor-default select-none",children:o})}),e[6]=o,e[7]=r):r=e[7];let m;e[8]!==o||e[9]!==u?(m=a.jsx(St,{side:"top",className:"max-w-sm p-1.5",children:a.jsx("img",{src:u,alt:o,className:"max-w-full max-h-64 object-contain rounded"})}),e[8]=o,e[9]=u,e[10]=m):m=e[10];let d;return e[11]!==r||e[12]!==m?(d=a.jsxs(kt,{children:[r,m]}),e[11]=r,e[12]=m,e[13]=d):d=e[13],d}function ol(s){const e=E.c(61),{part:t,latency:n}=s,l=U(),i=pt();let u;e[0]!==t.state?(u=pe(t.state),e[0]=t.state,e[1]=u):u=e[1];const c=u,o=t.input,r=t.output,m=nl(r);let d;e[2]!==r?(d=ll(r),e[2]=r,e[3]=d):d=e[3];const f=d,g=$t()?r?.model:void 0,h=Array.isArray(o?.referenceImages)?o.referenceImages.filter(rl):void 0;let x;e[4]!==n?(x=n!=null&&n>0?a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:je(n)}):null,e[4]=n,e[5]=x):x=e[5];const v=x;if(c==="loading"){let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx(_e,{size:14}),e[6]=I):I=e[6];let T;e[7]!==l?(T=l("chat.generateImage.generatingImage"),e[7]=l,e[8]=T):T=e[8];let $;e[9]!==o?($=o?.prompt?`"${o.prompt.slice(0,80)}…"`:void 0,e[9]=o,e[10]=$):$=e[10];let P;return e[11]!==T||e[12]!==$?(P=a.jsx(H,{icon:I,title:T,summary:$,state:"loading"}),e[11]=T,e[12]=$,e[13]=P):P=e[13],P}if(r?.background){let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx(_e,{size:14}),e[14]=I):I=e[14];let T;e[15]!==l?(T=l("chat.generateImage.imageQueuedGeneratingInBackground"),e[15]=l,e[16]=T):T=e[16];let $;e[17]!==o?($=o?.prompt?`"${o.prompt.slice(0,80)}…"`:void 0,e[17]=o,e[18]=$):$=e[18];let P;return e[19]!==T||e[20]!==$?(P=a.jsx(H,{icon:I,title:T,summary:$,state:"idle"}),e[19]=T,e[20]=$,e[21]=P):P=e[21],P}if(c==="error"||!m||m.length===0){let I;e[22]!==t||e[23]!==c?(I=c==="error"?Me(t):void 0,e[22]=t,e[23]=c,e[24]=I):I=e[24];const T=I;let $="";o!==void 0&&($=`# Input
34
+ `+Te(o)),T?($&&($=$+`
35
+
36
+ `),$=$+(`# Error
37
+ `+T)):r!==void 0&&($&&($=$+`
38
+
39
+ `),$=$+(`# Output
40
+ `+Te(r)));let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(_e,{size:14}),e[25]=P):P=e[25];let q;e[26]!==l?(q=l("chat.generateImage.imageGeneration"),e[26]=l,e[27]=q):q=e[27];let B;e[28]!==c||e[29]!==l?(B=l(c==="error"?"chat.generateImage.failed":"chat.generateImage.noImagesGenerated"),e[28]=c,e[29]=l,e[30]=B):B=e[30];const D=c==="error"?"error":"idle",F=$||null;let W;return e[31]!==v||e[32]!==q||e[33]!==B||e[34]!==D||e[35]!==F||e[36]!==f?(W=a.jsx(H,{icon:P,title:q,summary:B,state:D,usage:f,trailing:v,detail:F}),e[31]=v,e[32]=q,e[33]=B,e[34]=D,e[35]=F,e[36]=f,e[37]=W):W=e[37],W}const b="flex flex-col gap-2";let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(_e,{size:14,className:"text-special"}),e[38]=k):k=e[38];let j;e[39]!==l?(j=l("chat.generateImage.generatedImage"),e[39]=l,e[40]=j):j=e[40];let _;e[41]!==o?(_=o?.prompt&&a.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o.prompt}),e[41]=o,e[42]=_):_=e[42];const y=h&&h.length>0&&a.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[a.jsx("span",{className:"text-[11px] text-muted-foreground/50",children:l("chat.generateImage.references")}),h.map((I,T)=>{const $=I.uri??I.url;return a.jsx(al,{uri:$,orgSlug:i.slug},T)})]});let S;e[43]!==_||e[44]!==y?(S=a.jsxs("div",{className:"flex flex-col gap-1 pb-2 pl-6",children:[_,y]}),e[43]=_,e[44]=y,e[45]=S):S=e[45];let N;e[46]!==v||e[47]!==g||e[48]!==j||e[49]!==S||e[50]!==f?(N=a.jsx(H,{icon:k,title:j,summary:g,state:"idle",usage:f,trailing:v,children:S}),e[46]=v,e[47]=g,e[48]=j,e[49]=S,e[50]=f,e[51]=N):N=e[51];const w="flex flex-wrap gap-2";let C;e[52]!==o?.prompt||e[53]!==i||e[54]!==l?(C=(I,T)=>{const $=I.uri??I.url;if(!$)return null;const P=Ht($,i.slug);return a.jsx(Qs,{src:P,alt:o?.prompt??l("chat.generateImage.generatedImageAlt"),children:a.jsx("img",{src:P,alt:o?.prompt??l("chat.generateImage.generatedImageAlt"),className:"max-w-sm max-h-80 object-contain rounded-lg border border-border hover:border-foreground/20 transition-colors"})},T)},e[52]=o?.prompt,e[53]=i,e[54]=l,e[55]=C):C=e[55];const M=m.map(C);let A;e[56]!==M?(A=a.jsx("div",{className:w,children:M}),e[56]=M,e[57]=A):A=e[57];let L;return e[58]!==N||e[59]!==A?(L=a.jsxs("div",{className:b,children:[N,A]}),e[58]=N,e[59]=A,e[60]=L):L=e[60],L}function rl(s){return s.uri??s.url}function il(s,e){const t=Je(s);return t!==null?`/api/${e}/files/${t}`:s}function cl(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;if(!n)return null;const l={providerMetadata:s.usage.providerMetadata};return{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:Ls(l),cacheReadTokens:0,cacheWriteTokens:0}}function ul(s){try{return new URL(s).hostname.replace(/^www\./,"")}catch{return s}}function dl(s){try{return`${new URL(s).origin}/favicon.ico`}catch{return""}}function fl(s){const e=E.c(16),{citation:t,index:n}=s;let l;e[0]!==t.url?(l=ul(t.url),e[0]=t.url,e[1]=l):l=e[1];const i=l;let u;e[2]!==t.url?(u=dl(t.url),e[2]=t.url,e[3]=u):u=e[3];const c=u,o=t.title||i;let r;e[4]!==c?(r=a.jsx("img",{src:c,alt:"",className:"size-3.5 rounded-sm shrink-0",onError:ml}),e[4]=c,e[5]=r):r=e[5];let m;e[6]!==o?(m=a.jsx("span",{className:"truncate max-w-[180px]",children:o}),e[6]=o,e[7]=m):m=e[7];const d=n+1;let f;e[8]!==d?(f=a.jsxs("span",{className:"text-[10px] text-muted-foreground/50 tabular-nums shrink-0",children:["[",d,"]"]}),e[8]=d,e[9]=f):f=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(Mt,{size:10,className:"shrink-0 opacity-0 group-hover/src:opacity-100 transition-opacity"}),e[10]=p):p=e[10];let g;return e[11]!==t.url||e[12]!==r||e[13]!==m||e[14]!==f?(g=a.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"group/src inline-flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:[r,m,f,p]}),e[11]=t.url,e[12]=r,e[13]=m,e[14]=f,e[15]=g):g=e[15],g}function ml(s){s.target.style.display="none"}function pl(s,e){return s.replace(/\[(\d+)\]/g,(t,n)=>{const l=parseInt(n,10)-1,i=e[l];return i?`[\\[${n}\\]](${i.url})`:t})}const Pe=5;function gl(s){const e=E.c(13),{citations:t}=s,n=U(),[l,i]=R.useState(!1),u=t.length>Pe;let c;e[0]!==t||e[1]!==l?(c=l?t:t.slice(0,Pe),e[0]=t,e[1]=l,e[2]=c):c=e[2];const o=c;let r;e[3]!==o?(r=o.map(hl),e[3]=o,e[4]=r):r=e[4];let m;e[5]!==t.length||e[6]!==l||e[7]!==u||e[8]!==n?(m=u&&a.jsx("button",{type:"button",onClick:()=>i(xl),className:"inline-flex items-center classic:rounded-md compact:rounded-lg border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:l?n("chat.webSearch.showLess"):n("chat.webSearch.showMore",{count:t.length-Pe})}),e[5]=t.length,e[6]=l,e[7]=u,e[8]=n,e[9]=m):m=e[9];let d;return e[10]!==r||e[11]!==m?(d=a.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,m]}),e[10]=r,e[11]=m,e[12]=d):d=e[12],d}function xl(s){return!s}function hl(s,e){return a.jsx(fl,{citation:s,index:e},s.url)}function bl(s){const e=E.c(61),{part:t,latency:n,streamingText:l}=s,i=U(),u=pt();let c;e[0]!==t.state?(c=pe(t.state),e[0]=t.state,e[1]=c):c=e[1];const o=c,r=t.input,m=t.output;let d,f,p;e[2]!==u||e[3]!==m?(d=m?.uri?il(m.uri,u.slug):void 0,p=ft,f=he.webSearchBlob(d??""),e[2]=u,e[3]=m,e[4]=d,e[5]=f,e[6]=p):(d=e[4],f=e[5],p=e[6]);let g;e[7]!==d?(g=async()=>{const X=await fetch(d);if(!X.ok)throw new Error(`Failed to fetch: ${X.status}`);return X.text()},e[7]=d,e[8]=g):g=e[8];const h=!!d;let x;e[9]!==f||e[10]!==g||e[11]!==h?(x={queryKey:f,queryFn:g,enabled:h,staleTime:1/0},e[9]=f,e[10]=g,e[11]=h,e[12]=x):x=e[12];const{data:v}=p(x),b=o==="loading",k=o!=="loading"&&o!=="error",j=$t(),_=m?.citations;let y;e[13]!==m?(y=cl(m),e[13]=m,e[14]=y):y=e[14];const S=y,N=m?.content??v??l;let w;e[15]!==_||e[16]!==N?(w=N&&_?.length?pl(N,_):N,e[15]=_,e[16]=N,e[17]=w):w=e[17];const C=w;let M;e[18]!==n?(M=n!=null&&n>0?a.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:je(n)}):null,e[18]=n,e[19]=M):M=e[19];const A=M;if(o==="error"){let X;e[20]===Symbol.for("react.memo_cache_sentinel")?(X=a.jsx(Fe,{size:14}),e[20]=X):X=e[20];let te;e[21]!==i?(te=i("chat.webSearch.title"),e[21]=i,e[22]=te):te=e[22];let Q;e[23]!==i?(Q=i("chat.webSearch.failed"),e[23]=i,e[24]=Q):Q=e[24];let se;return e[25]!==A||e[26]!==te||e[27]!==Q||e[28]!==S?(se=a.jsx(H,{icon:X,title:te,summary:Q,state:"error",usage:S,trailing:A}),e[25]=A,e[26]=te,e[27]=Q,e[28]=S,e[29]=se):se=e[29],se}const L=b?"animate-pulse":"text-blue-500";let I;e[30]!==L?(I=G(L),e[30]=L,e[31]=I):I=e[31];let T;e[32]!==I?(T=a.jsx(Fe,{size:14,className:I}),e[32]=I,e[33]=T):T=e[33];let $;e[34]!==b||e[35]!==i?($=i(b?"chat.webSearch.researching":"chat.webSearch.title"),e[34]=b,e[35]=i,e[36]=$):$=e[36];let P;e[37]!==r||e[38]!==k||e[39]!==m?.model||e[40]!==j?(P=k?(j?m?.model:void 0)??r?.query?.slice(0,60):r?.query?`"${r.query.slice(0,80)}"`:void 0,e[37]=r,e[38]=k,e[39]=m?.model,e[40]=j,e[41]=P):P=e[41];const q=b?"loading":"idle";let B;e[42]!==r?(B=r?.query&&a.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:r.query}),e[42]=r,e[43]=B):B=e[43];let D;e[44]!==C||e[45]!==t.toolCallId?(D=C?a.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-hidden rounded-lg border border-border/40 bg-muted/20 px-4 py-3 min-w-0",children:a.jsx("div",{className:"prose prose-sm prose-neutral dark:prose-invert max-w-none text-[13px] leading-relaxed break-words",children:a.jsx(At,{id:t.toolCallId,text:C})})}):a.jsx("div",{className:"rounded-lg border border-border/40 bg-muted/20 px-4 py-3",children:a.jsxs("div",{className:"space-y-2 animate-pulse",children:[a.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-3/4"}),a.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-1/2"})]})}),e[44]=C,e[45]=t.toolCallId,e[46]=D):D=e[46];let F;e[47]!==_?(F=_&&_.length>0&&a.jsx(gl,{citations:_}),e[47]=_,e[48]=F):F=e[48];let W;e[49]!==B||e[50]!==D||e[51]!==F?(W=a.jsxs("div",{className:"pl-6 pb-3 flex flex-col gap-1 min-w-0",children:[B,D,F]}),e[49]=B,e[50]=D,e[51]=F,e[52]=W):W=e[52];let J;return e[53]!==A||e[54]!==T||e[55]!==$||e[56]!==P||e[57]!==q||e[58]!==W||e[59]!==S?(J=a.jsx(H,{icon:T,title:$,summary:P,state:q,usage:S,trailing:A,defaultOpen:!0,children:W}),e[53]=A,e[54]=T,e[55]=$,e[56]=P,e[57]=q,e[58]=W,e[59]=S,e[60]=J):J=e[60],J}function yl(s){const e=E.c(16),{part:t}=s,n=U();if(!t.state.startsWith("output-"))return null;let l;e[0]!==t.input?.prompt||e[1]!==n?(l=t.input?.prompt?.trim()||n("chat.userAskQuestion.question"),e[0]=t.input?.prompt,e[1]=n,e[2]=l):l=e[2];const i=l,u=t.state==="output-error"||t.state==="output-denied",c=t.state==="output-denied";let o;e[3]!==c||e[4]!==t||e[5]!==n?(o=c?n("chat.userAskQuestion.skippedAnswer"):t.state==="output-error"?Me(t)??n("chat.subtask.errorLabel"):t.output?.response??"",e[3]=c,e[4]=t,e[5]=n,e[6]=o):o=e[6];const r=o;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Ns,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),e[7]=m):m=e[7];let d;e[8]!==i?(d=a.jsxs("div",{className:"flex items-start gap-2",children:[m,a.jsx("span",{className:"text-[14px] text-muted-foreground leading-snug",children:i})]}),e[8]=i,e[9]=d):d=e[9];let f;e[10]!==r||e[11]!==u?(f=r&&a.jsx("div",{className:"ml-6 pl-2 border-l border-border/50",children:a.jsx("span",{className:G("text-[14px] leading-snug",u?"text-muted-foreground/50 italic":"text-foreground/70"),children:r})}),e[10]=r,e[11]=u,e[12]=f):f=e[12];let p;return e[13]!==d||e[14]!==f?(p=a.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[d,f]}),e[13]=d,e[14]=f,e[15]=p):p=e[15],p}const qt=R.createContext(new Map);function wo(s){const e=E.c(5),{messages:t,children:n}=s;let l;if(e[0]!==t){l=new Map;for(const u of t){const c=u.metadata?.subtaskJobId;if(!c)continue;const o=l.get(c);o?o.push(u):l.set(c,[u])}e[0]=t,e[1]=l}else l=e[1];let i;return e[2]!==l||e[3]!==n?(i=a.jsx(qt.Provider,{value:l,children:n}),e[2]=l,e[3]=n,e[4]=i):i=e[4],i}function jl(s){const e=E.c(3),t=R.useContext(qt);let n;return e[0]!==s||e[1]!==t?(n=s?t.get(s)??[]:[],e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function vl(s){return new ReadableStream({async start(e){const t=s.getReader(),n=new TextDecoder;let l="";try{for(;;){const{done:i,value:u}=await t.read();if(i)break;l+=n.decode(u,{stream:!0});let c;for(;(c=l.indexOf(`
41
+
42
+ `))!==-1;){const o=l.slice(0,c);l=l.slice(c+2);const r=o.split(`
43
+ `).filter(m=>m.startsWith("data:")).map(m=>m.slice(5).trim()).join(`
44
+ `);if(r)try{e.enqueue(JSON.parse(r))}catch{}}}}finally{t.releaseLock(),e.close()}}})}function Nl(s){const{orgSlug:e,threadId:t,jobId:n,enabled:l}=s,[i,u]=R.useState([]),[c,o]=R.useState(!1);return R.useEffect(()=>{if(!l||!n||!t)return;const r=new AbortController;return u([]),o(!0),(async()=>{try{const m=await fetch(`/api/${encodeURIComponent(e)}/decopilot/threads/${encodeURIComponent(t)}/jobs/${encodeURIComponent(n)}/stream`,{headers:{accept:"text/event-stream"},credentials:"include",signal:r.signal});if(!m.ok||!m.body)return;for await(const d of As({stream:Ms(vl(m.body),void 0)})){if(r.signal.aborted)return;u([d])}}catch{}finally{r.signal.aborted||o(!1)}})(),()=>r.abort()},[l,n,t,e]),{messages:i,streaming:c}}function Sl(s,e){if(s&&typeof s=="object"&&!Array.isArray(s)){const t=s;if(typeof t.text=="string"||typeof t.error=="string"||typeof t.finishReason=="string"){if(typeof t.error=="string"&&t.error.length>0)return e("chat.subtask.failedWithError",{error:t.error});const l=typeof t.text=="string"?t.text.trim():"",i=t.finishReason==="length";return l?(i?`${e("chat.subtask.stepLimitPartial")}
45
+
46
+ `:"")+l:e(i?"chat.subtask.stepLimitNoOutput":"chat.subtask.completedNoOutput")}}return Vn(s)}function Wt(s){return!!s&&typeof s=="object"&&s.background===!0}function Kt({part:s,subtaskMeta:e},t){const n=s.state==="input-streaming"||s.state==="input-available",l=s.state==="output-available"&&s.preliminary===!0,i=s.state==="output-available"&&!s.preliminary,u=s.state==="output-error",c=pe(s.state,"preliminary"in s?s.preliminary:!1),o=c==="approval"?"idle":c,r=t(n?"chat.subtask.startingEllipsis":l?"chat.subtask.runningEllipsis":i?"chat.subtask.completedTitle":u?"chat.subtask.failedTitle":"chat.subtask.subtaskNoun"),m=s.input?.prompt??"",d=s.state==="approval-requested"?t("chat.subtask.awaitingApproval"):m.length>120?m.slice(0,120)+"…":m;return{fallbackTitle:r,summary:d,usage:e?.usage,state:o}}function Gt(s){return s.state==="input-available"?!0:s.state==="output-available"?"preliminary"in s&&s.preliminary===!0:!1}function Vt(s){const e=E.c(4),t=Ne()?.taskId??null,{org:n}=ge();if(!t)return null;let l;return e[0]!==n||e[1]!==t||e[2]!==s?(l=async()=>{if(t===null)return;const i=await fetch(`/api/${encodeURIComponent(n.slug)}/decopilot/flip/${encodeURIComponent(t)}`,{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({toolCallId:s})});if(!i.ok)throw new Error(`flip failed: ${i.status}`)},e[0]=n,e[1]=t,e[2]=s,e[3]=l):l=e[3],l}function kl(s){const e=E.c(10),{onFlip:t}=s,n=U(),[l,i]=R.useState(!1);let u;e[0]!==t?(u=async m=>{m.stopPropagation(),i(!0);try{await t()}catch{i(!1)}},e[0]=t,e[1]=u):u=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=G("shrink-0 text-[12px] text-muted-foreground/70 px-2 py-1 classic:rounded-md compact:rounded-lg transition-colors","[@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/40","disabled:opacity-50"),e[2]=c):c=e[2];let o;e[3]!==l||e[4]!==n?(o=n(l?"chat.subtask.flipping":"chat.subtask.flipToBackground"),e[3]=l,e[4]=n,e[5]=o):o=e[5];let r;return e[6]!==l||e[7]!==u||e[8]!==o?(r=a.jsx("button",{type:"button",disabled:l,onClick:u,className:c,children:o}),e[6]=l,e[7]=u,e[8]=o,e[9]=r):r=e[9],r}function Xe(s){const e=E.c(54),{icon:t,title:n,summary:l,state:i,usage:u,latency:c,onOpenChange:o,onFlip:r,children:m}=s,[d,f]=R.useState(!1);let p;e[0]!==o?(p=J=>{f(J),o?.(J)},e[0]=o,e[1]=p):p=e[1];const g=p,h=i==="loading",x=i==="error";let v;e[2]!==g?(v=()=>g(!0),e[2]=g,e[3]=v):v=e[3];const b=h&&"shimmer";let k;e[4]!==b?(k=G("group/tool flex items-center gap-2 flex-1 min-w-0 py-2.5 text-left classic:rounded-md compact:rounded-lg transition-colors","[@media(hover:hover)]:hover:bg-accent/30",b),e[4]=b,e[5]=k):k=e[5];const j=x?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75";let _;e[6]!==j?(_=G("relative shrink-0 size-4 flex items-center justify-center [&>svg]:size-4",j),e[6]=j,e[7]=_):_=e[7];let y;e[8]!==t||e[9]!==_?(y=a.jsx("div",{className:_,children:t}),e[8]=t,e[9]=_,e[10]=y):y=e[10];const S=x?"text-warning/80":"text-foreground";let N;e[11]!==S?(N=G("shrink-0 text-[14px] font-normal",S),e[11]=S,e[12]=N):N=e[12];let w;e[13]!==N||e[14]!==n?(w=a.jsx("span",{className:N,children:n}),e[13]=N,e[14]=n,e[15]=w):w=e[15];let C;e[16]!==l?(C=l?a.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l})}):a.jsx("div",{className:"flex-1"}),e[16]=l,e[17]=C):C=e[17];let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=a.jsx(rs,{className:"size-3.5 shrink-0 text-muted-foreground/40 opacity-0 transition-opacity [@media(hover:hover)]:group-hover/tool:opacity-100"}),e[18]=M):M=e[18];let A;e[19]!==c?(A=a.jsx(ne,{latency:c}),e[19]=c,e[20]=A):A=e[20];let L;e[21]!==u?(L=a.jsx(jt,{usage:u}),e[21]=u,e[22]=L):L=e[22];let I;e[23]!==w||e[24]!==C||e[25]!==A||e[26]!==L||e[27]!==v||e[28]!==k||e[29]!==y?(I=a.jsxs("button",{type:"button",onClick:v,className:k,children:[y,w,C,M,A,L]}),e[23]=w,e[24]=C,e[25]=A,e[26]=L,e[27]=v,e[28]=k,e[29]=y,e[30]=I):I=e[30];let T;e[31]!==h||e[32]!==r?(T=r&&h?a.jsx(kl,{onFlip:r}):null,e[31]=h,e[32]=r,e[33]=T):T=e[33];let $;e[34]!==I||e[35]!==T?($=a.jsxs("div",{className:"flex items-center gap-1 w-full",children:[I,T]}),e[34]=I,e[35]=T,e[36]=$):$=e[36];let P;e[37]!==t?(P=a.jsx("span",{className:"flex items-center [&>svg]:size-4 [&>svg]:text-muted-foreground/75",children:t}),e[37]=t,e[38]=P):P=e[38];let q;e[39]!==P||e[40]!==n?(q=a.jsx(Ys,{className:"px-4 py-3 border-b border-border shrink-0",children:a.jsxs(Zs,{className:"flex items-center gap-2 text-sm font-medium",children:[P,n]})}),e[39]=P,e[40]=n,e[41]=q):q=e[41];let B;e[42]!==m?(B=a.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-4 py-4",children:m}),e[42]=m,e[43]=B):B=e[43];let D;e[44]!==q||e[45]!==B?(D=a.jsxs(en,{side:"right",className:"w-full sm:max-w-2xl flex flex-col p-0 gap-0",children:[q,B]}),e[44]=q,e[45]=B,e[46]=D):D=e[46];let F;e[47]!==d||e[48]!==g||e[49]!==D?(F=a.jsx(tn,{open:d,onOpenChange:g,children:D}),e[47]=d,e[48]=g,e[49]=D,e[50]=F):F=e[50];let W;return e[51]!==$||e[52]!==F?(W=a.jsxs(a.Fragment,{children:[$,F]}),e[51]=$,e[52]=F,e[53]=W):W=e[53],W}function Jt(s){const e=E.c(22),{part:t}=s,n=U(),l=t.state==="output-error";let i;e[0]!==t.input?.prompt||e[1]!==n?(i=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[0]=t.input?.prompt,e[1]=n,e[2]=i):i=e[2];const u=i;let c;if(e[3]!==l||e[4]!==t||e[5]!==u||e[6]!==n){const o=l?Me(t):Sl(t.output,n)??"";let r;e[8]!==n?(r=n("chat.subtask.taskLabel"),e[8]=n,e[9]=r):r=e[9];let m;e[10]!==r?(m=a.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:r}),e[10]=r,e[11]=m):m=e[11];let d;e[12]!==u?(d=a.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:u}),e[12]=u,e[13]=d):d=e[13];let f;e[14]!==m||e[15]!==d?(f=a.jsxs("section",{children:[m,d]}),e[14]=m,e[15]=d,e[16]=f):f=e[16];let p;e[17]!==l||e[18]!==n?(p=n(l?"chat.subtask.errorLabel":"chat.subtask.resultLabel"),e[17]=l,e[18]=n,e[19]=p):p=e[19];let g;e[20]!==p?(g=a.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:p}),e[20]=p,e[21]=g):g=e[21],c=a.jsxs("div",{className:"flex flex-col gap-4",children:[f,a.jsxs("section",{children:[g,o.trim()?a.jsx(At,{id:`${t.toolCallId}-result`,text:o}):a.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic",children:n("chat.subtask.running")})]})]}),e[3]=l,e[4]=t,e[5]=u,e[6]=n,e[7]=c}else c=e[7];return c}const Re=600;function _l(s){const e=E.c(12),{part:t}=s,n=t.type??"";let l;e[0]!==t.toolName||e[1]!==n?(l=n==="dynamic-tool"?t.toolName??"tool":n.slice(5),e[0]=t.toolName,e[1]=n,e[2]=l):l=e[2];const i=l;let u;if(e[3]!==t.input){const f=t.input!=null?JSON.stringify(t.input):"";u=f.length>80?`${f.slice(0,80)}…`:f||void 0,e[3]=t.input,e[4]=u}else u=e[4];const c=u;let o;if(e[5]!==t.input){const f=t.input!=null?JSON.stringify(t.input,null,2):null;o=f&&f.length>Re?`${f.slice(0,Re)}
47
+ … (${f.length-Re} more characters)`:f,e[5]=t.input,e[6]=o}else o=e[6];const r=o;let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(bt,{}),e[7]=m):m=e[7];let d;return e[8]!==r||e[9]!==i||e[10]!==c?(d=a.jsx(H,{icon:m,title:i,summary:c,state:"idle",detail:r,detailVariant:"code"}),e[8]=r,e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function wl(s){const e=E.c(19),{jobId:t,prompt:n,items:l,streaming:i}=s,u=U();let c;e[0]!==u?(c=u("chat.subtask.taskLabel"),e[0]=u,e[1]=c):c=e[1];let o;e[2]!==c?(o=a.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:c}),e[2]=c,e[3]=o):o=e[3];let r;e[4]!==n?(r=a.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:n}),e[4]=n,e[5]=r):r=e[5];let m;e[6]!==o||e[7]!==r?(m=a.jsxs("section",{children:[o,r]}),e[6]=o,e[7]=r,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==t||e[11]!==i||e[12]!==u?(d=l.length===0?a.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic py-1",children:u("chat.subtask.runningInBackground")}):l.map((g,h)=>{const x=g,v=x.type??"";return v==="text"?x.text?.trim()?a.jsx($e,{id:`${t}-sub-${h}`,part:g,animate:i},`${t}-sub-${h}`):null:v==="dynamic-tool"||v.startsWith("tool-")&&v!=="tool-todo_write"&&v!=="tool-update_interests"?a.jsx(_l,{part:x},`${t}-sub-${h}`):null}),e[9]=l,e[10]=t,e[11]=i,e[12]=u,e[13]=d):d=e[13];let f;e[14]!==d?(f=a.jsx("section",{className:"flex flex-col gap-3 sm:gap-2",children:d}),e[14]=d,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==f?(p=a.jsxs("div",{className:"flex flex-col gap-4",children:[m,f]}),e[16]=m,e[17]=f,e[18]=p):p=e[18],p}function Xt(s){const e=E.c(32),{part:t}=s,n=U(),l=t.output?.jobId,i=Ne()?.taskId??null,{org:u}=ge(),[c,o]=R.useState(!1),r=jl(l),m=i??"",d=c&&!!i;let f;e[0]!==l||e[1]!==u.slug||e[2]!==m||e[3]!==d?(f={orgSlug:u.slug,threadId:m,jobId:l,enabled:d},e[0]=l,e[1]=u.slug,e[2]=m,e[3]=d,e[4]=f):f=e[4];const p=Nl(f);let g;e[5]!==p.messages?(g=p.messages.flatMap(Tl),e[5]=p.messages,e[6]=g):g=e[6];const h=g;let x;e[7]!==r?(x=r.flatMap(Cl),e[7]=r,e[8]=x):x=e[8];const v=x,b=h.length>0?h:v;let k;e[9]!==t.input?.prompt||e[10]!==n?(k=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[9]=t.input?.prompt,e[10]=n,e[11]=k):k=e[11];const j=k;let _;e[12]!==j?(_=j.length>120?`${j.slice(0,120)}…`:j,e[12]=j,e[13]=_):_=e[13];const y=_,S=r.length===0;let N;e[14]!==n?(N=n("chat.subtask.subtaskNoun"),e[14]=n,e[15]=N):N=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(qe,{}),e[16]=w):w=e[16];let C;e[17]!==N?(C=a.jsx(Se,{icon:void 0,name:N,size:"2xs",className:"rounded-xs",fallbackIcon:w}),e[17]=N,e[18]=C):C=e[18];let M;e[19]!==n?(M=n("chat.subtask.subtaskNoun"),e[19]=n,e[20]=M):M=e[20];const A=S?"loading":"idle",L=p.streaming||S;let I;e[21]!==b||e[22]!==l||e[23]!==j||e[24]!==L?(I=a.jsx(wl,{jobId:l,prompt:j,items:b,streaming:L}),e[21]=b,e[22]=l,e[23]=j,e[24]=L,e[25]=I):I=e[25];let T;return e[26]!==y||e[27]!==C||e[28]!==M||e[29]!==A||e[30]!==I?(T=a.jsx(Xe,{icon:C,title:M,summary:y,state:A,onOpenChange:o,children:I}),e[26]=y,e[27]=C,e[28]=M,e[29]=A,e[30]=I,e[31]=T):T=e[31],T}function Cl(s){return s.parts??[]}function Tl(s){return s.parts??[]}function Il(s){const e=E.c(24),t=U(),n=Vt(s.part.toolCallId);if(Wt(s.part.output)){let h;return e[0]!==s?(h=a.jsx(Xt,{...s}),e[0]=s,e[1]=h):h=e[1],h}let l;e[2]!==s||e[3]!==t?(l=Kt(s,t),e[2]=s,e[3]=t,e[4]=l):l=e[4];const{fallbackTitle:i,summary:u,usage:c,state:o}=l;let r;e[5]!==t?(r=t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(qe,{}),e[7]=m):m=e[7];let d;e[8]!==r?(d=a.jsx(Se,{icon:void 0,name:r,size:"2xs",className:"rounded-xs",fallbackIcon:m}),e[8]=r,e[9]=d):d=e[9];let f;e[10]!==n||e[11]!==s.part?(f=n&&Gt(s.part)?n:void 0,e[10]=n,e[11]=s.part,e[12]=f):f=e[12];let p;e[13]!==s.part?(p=a.jsx(Jt,{part:s.part}),e[13]=s.part,e[14]=p):p=e[14];let g;return e[15]!==i||e[16]!==s.latency||e[17]!==o||e[18]!==u||e[19]!==d||e[20]!==f||e[21]!==p||e[22]!==c?(g=a.jsx(Xe,{icon:d,title:i,summary:u,state:o,usage:c,latency:s.latency,onFlip:f,children:p}),e[15]=i,e[16]=s.latency,e[17]=o,e[18]=u,e[19]=d,e[20]=f,e[21]=p,e[22]=c,e[23]=g):g=e[23],g}function $l(s){const e=E.c(26),t=U(),n=Et(s.part.input?.agent_id),l=Vt(s.part.toolCallId);if(Wt(s.part.output)){let b;return e[0]!==s?(b=a.jsx(Xt,{...s}),e[0]=s,e[1]=b):b=e[1],b}let i;e[2]!==s||e[3]!==t?(i=Kt(s,t),e[2]=s,e[3]=t,e[4]=i):i=e[4];const{fallbackTitle:u,summary:c,usage:o,state:r}=i,m=n?.icon;let d;e[5]!==t||e[6]!==n?.title?(d=n?.title??t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=n?.title,e[7]=d):d=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(qe,{}),e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==d?(p=a.jsx(Se,{icon:m,name:d,size:"2xs",className:"rounded-xs",fallbackIcon:f}),e[9]=m,e[10]=d,e[11]=p):p=e[11];const g=n?.title??u;let h;e[12]!==l||e[13]!==s.part?(h=l&&Gt(s.part)?l:void 0,e[12]=l,e[13]=s.part,e[14]=h):h=e[14];let x;e[15]!==s.part?(x=a.jsx(Jt,{part:s.part}),e[15]=s.part,e[16]=x):x=e[16];let v;return e[17]!==s.latency||e[18]!==r||e[19]!==c||e[20]!==p||e[21]!==g||e[22]!==h||e[23]!==x||e[24]!==o?(v=a.jsx(Xe,{icon:p,title:g,summary:c,state:r,usage:o,latency:s.latency,onFlip:h,children:x}),e[17]=s.latency,e[18]=r,e[19]=c,e[20]=p,e[21]=g,e[22]=h,e[23]=x,e[24]=o,e[25]=v):v=e[25],v}function Al(s){const e=E.c(28),{part:t}=s,n=U();if(!t.state.startsWith("output-"))return null;const l=t.input?.plan??"",u=t.output?.approved===!0;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(De,{className:"size-4 text-special shrink-0"}),e[0]=c):c=e[0];let o;e[1]!==n?(o=n("chat.proposePlan.implementationPlan"),e[1]=n,e[2]=o):o=e[2];let r;e[3]!==o?(r=a.jsx("span",{className:"text-[14px] font-medium text-foreground/80",children:o}),e[3]=o,e[4]=r):r=e[4];let m;e[5]!==u||e[6]!==n?(m=u&&a.jsxs("span",{className:"flex items-center gap-1 text-xs text-success bg-success/10 px-1.5 py-0.5 rounded-md",children:[a.jsx(dt,{size:12}),n("chat.proposePlan.approved")]}),e[5]=u,e[6]=n,e[7]=m):m=e[7];let d;e[8]!==u||e[9]!==t.state||e[10]!==n?(d=!u&&t.state==="output-available"&&a.jsx("span",{className:"text-xs text-muted-foreground/70 italic",children:n("chat.proposePlan.rejected")}),e[8]=u,e[9]=t.state,e[10]=n,e[11]=d):d=e[11];let f;e[12]!==r||e[13]!==m||e[14]!==d?(f=a.jsxs("div",{className:"flex items-center gap-2",children:[c,r,m,d]}),e[12]=r,e[13]=m,e[14]=d,e[15]=f):f=e[15];let p;e[16]!==n?(p=n("chat.proposePlan.viewPlan"),e[16]=n,e[17]=p):p=e[17];let g;e[18]!==p?(g=a.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:p}),e[18]=p,e[19]=g):g=e[19];let h;e[20]!==l?(h=a.jsx("div",{className:"mt-1 pl-2 border-l-2 border-special/30 prose prose-sm max-w-none text-sm",children:a.jsx($e,{id:"plan-content",part:{type:"text",text:l}})}),e[20]=l,e[21]=h):h=e[21];let x;e[22]!==g||e[23]!==h?(x=a.jsxs("details",{className:"ml-6",children:[g,h]}),e[22]=g,e[23]=h,e[24]=x):x=e[24];let v;return e[25]!==x||e[26]!==f?(v=a.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[f,x]}),e[25]=x,e[26]=f,e[27]=v):v=e[27],v}function Qe(s){return{primary:s("chat.brandContext.colorPrimary"),secondary:s("chat.brandContext.colorSecondary"),accent:s("chat.brandContext.colorAccent"),background:s("chat.brandContext.colorBackground"),foreground:s("chat.brandContext.colorForeground")}}function Ml(s){try{const e=new URL(s.startsWith("http")?s:`https://${s}`);return e.protocol!=="http:"&&e.protocol!=="https:"?"about:blank":e.href}catch{return"about:blank"}}function Ye(s){return s?Object.entries(s).filter(([,e])=>typeof e=="string"&&e.trim().length>0):[]}function El(s){return s?Object.entries(s).filter(([,e])=>typeof e=="string"&&e.trim().length>0):[]}function ct(s){const e=E.c(2),{children:t}=s;let n;return e[0]!==t?(n=a.jsx("span",{className:"text-sm font-medium text-foreground",children:t}),e[0]=t,e[1]=n):n=e[1],n}function Ll(s){const e=E.c(12),{name:t,value:n}=s;let l;e[0]!==n?(l=a.jsx("span",{className:"size-7 shrink-0 rounded-md border border-border",style:{backgroundColor:n},"aria-hidden":!0}),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==t?(i=a.jsx("span",{className:"text-sm text-foreground",children:t}),e[2]=t,e[3]=i):i=e[3];let u;e[4]!==n?(u=a.jsx("span",{className:"text-xs font-mono tabular-nums text-muted-foreground",children:n}),e[4]=n,e[5]=u):u=e[5];let c;e[6]!==i||e[7]!==u?(c=a.jsxs("div",{className:"flex flex-col leading-tight min-w-0",children:[i,u]}),e[6]=i,e[7]=u,e[8]=c):c=e[8];let o;return e[9]!==l||e[10]!==c?(o=a.jsxs("div",{className:"flex items-center gap-2.5",children:[l,c]}),e[9]=l,e[10]=c,e[11]=o):o=e[11],o}function Pl(s){const e=E.c(15),{role:t,family:n}=s;let l;e[0]!==n?(l=a.jsx("span",{className:"text-2xl font-medium leading-none text-foreground shrink-0",style:{fontFamily:n},"aria-hidden":!0,children:"Aa"}),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==t?(i=a.jsx("span",{className:"text-xs text-muted-foreground",children:t}),e[2]=t,e[3]=i):i=e[3];let u;e[4]!==n?(u={fontFamily:n},e[4]=n,e[5]=u):u=e[5];let c;e[6]!==n||e[7]!==u?(c=a.jsx("span",{className:"text-sm text-foreground",style:u,children:n}),e[6]=n,e[7]=u,e[8]=c):c=e[8];let o;e[9]!==i||e[10]!==c?(o=a.jsxs("div",{className:"flex flex-col leading-tight",children:[i,c]}),e[9]=i,e[10]=c,e[11]=o):o=e[11];let r;return e[12]!==l||e[13]!==o?(r=a.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border bg-muted px-4 py-3",children:[l,o]}),e[12]=l,e[13]=o,e[14]=r):r=e[14],r}function Rl(s){const e=E.c(3),{logo:t,favicon:n,name:l}=s,i=t??n;if(!i)return null;const u=l?`${l} logo`:"";let c;return e[0]!==i||e[1]!==u?(c=a.jsx("img",{src:i,alt:u,className:"size-16 shrink-0 rounded-lg border border-border bg-background object-contain p-2",onError:zl}),e[0]=i,e[1]=u,e[2]=c):c=e[2],c}function zl(s){s.target.style.display="none"}function Qt(s){const e=E.c(12),{colors:t}=s,n=U();let l;e[0]!==n?(l=Qe(n),e[0]=n,e[1]=l):l=e[1];const i=l;let u,c,o;if(e[2]!==i||e[3]!==t){o=Symbol.for("react.early_return_sentinel");e:{const m=Ye(t);if(m.length===0){o=null;break e}u="flex h-1.5";let d;e[7]!==i?(d=f=>{const[p,g]=f;return a.jsx("span",{className:"flex-1",style:{backgroundColor:g},title:`${i[p]}: ${g}`,"aria-hidden":!0},p)},e[7]=i,e[8]=d):d=e[8],c=m.map(d)}e[2]=i,e[3]=t,e[4]=u,e[5]=c,e[6]=o}else u=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let r;return e[9]!==u||e[10]!==c?(r=a.jsx("div",{className:u,children:c}),e[9]=u,e[10]=c,e[11]=r):r=e[11],r}function Yt(s){const e=E.c(51),{logo:t,favicon:n,name:l,domain:i,overview:u,colors:c,fonts:o,showDefaultBadge:r,isDefault:m}=s,d=U();let f;e[0]!==d?(f=Qe(d),e[0]=d,e[1]=f):f=e[1];const p=f;let g,h,x,v,b,k,j;if(e[2]!==p||e[3]!==c||e[4]!==i||e[5]!==n||e[6]!==o||e[7]!==m||e[8]!==t||e[9]!==l||e[10]!==u||e[11]!==r||e[12]!==d){const S=Ye(c),N=El(o);k="mt-2 rounded-lg overflow-hidden border border-border",e[20]!==c?(j=c&&a.jsx(Qt,{colors:c}),e[20]=c,e[21]=j):j=e[21],g="p-5 flex flex-col gap-6";let w;e[22]!==n||e[23]!==t||e[24]!==l?(w=a.jsx(Rl,{logo:t,favicon:n,name:l}),e[22]=n,e[23]=t,e[24]=l,e[25]=w):w=e[25];let C;e[26]!==m||e[27]!==l||e[28]!==r||e[29]!==d?(C=l&&a.jsxs("span",{className:"inline-flex items-center gap-2 text-lg font-semibold text-foreground truncate",children:[l,r&&m&&a.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:[a.jsx(xt,{className:"size-3 text-warning"}),d("chat.brandContext.defaultBadge")]})]}),e[26]=m,e[27]=l,e[28]=r,e[29]=d,e[30]=C):C=e[30];let M;e[31]!==i?(M=i&&a.jsxs("a",{href:Ml(i),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[i,a.jsx(Mt,{className:"size-3 shrink-0"})]}),e[31]=i,e[32]=M):M=e[32];let A;e[33]!==C||e[34]!==M?(A=a.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[C,M]}),e[33]=C,e[34]=M,e[35]=A):A=e[35],e[36]!==A||e[37]!==w?(h=a.jsxs("div",{className:"flex items-center gap-4",children:[w,A]}),e[36]=A,e[37]=w,e[38]=h):h=e[38],e[39]!==u?(x=u&&a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:u}),e[39]=u,e[40]=x):x=e[40],v=S.length>0&&a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(ct,{children:d("chat.brandContext.colorsSection")}),a.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-x-4 gap-y-3",children:S.map(L=>{const[I,T]=L;return a.jsx(Ll,{name:p[I],value:T},I)})})]}),b=N.length>0&&a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(ct,{children:d("chat.brandContext.typographySection")}),a.jsx("div",{className:"flex flex-wrap gap-2.5",children:N.map(Dl)})]}),e[2]=p,e[3]=c,e[4]=i,e[5]=n,e[6]=o,e[7]=m,e[8]=t,e[9]=l,e[10]=u,e[11]=r,e[12]=d,e[13]=g,e[14]=h,e[15]=x,e[16]=v,e[17]=b,e[18]=k,e[19]=j}else g=e[13],h=e[14],x=e[15],v=e[16],b=e[17],k=e[18],j=e[19];let _;e[41]!==g||e[42]!==h||e[43]!==x||e[44]!==v||e[45]!==b?(_=a.jsxs("div",{className:g,children:[h,x,v,b]}),e[41]=g,e[42]=h,e[43]=x,e[44]=v,e[45]=b,e[46]=_):_=e[46];let y;return e[47]!==k||e[48]!==j||e[49]!==_?(y=a.jsxs("div",{className:k,children:[j,_]}),e[47]=k,e[48]=j,e[49]=_,e[50]=y):y=e[50],y}function Dl(s){const[e,t]=s;return a.jsx(Pl,{role:e,family:t},e)}function Fl(s){const e=E.c(46),{part:t,latency:n}=s,l=U();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let c,o,r,m,d;if(e[2]!==n||e[3]!==t.input||e[4]!==t.output||e[5]!==u||e[6]!==l){d=Symbol.for("react.early_return_sentinel");e:{o=be(t.output);const N=u==="loading",w=u==="error"||o&&o.success===!1;if(N){const C=t.input;let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=a.jsx(me,{className:"animate-pulse"}),e[12]=M):M=e[12];let A;e[13]!==l?(A=l("chat.brandContext.extractingBrand"),e[13]=l,e[14]=A):A=e[14];let L;e[15]!==C||e[16]!==l?(L=C?.domain?l("chat.brandContext.fromDomain",{domain:C.domain}):void 0,e[15]=C,e[16]=l,e[17]=L):L=e[17];let I;e[18]!==A||e[19]!==L?(I=a.jsx(H,{icon:M,title:A,summary:L,state:"loading",defaultOpen:!0}),e[18]=A,e[19]=L,e[20]=I):I=e[20],d=I;break e}if(w){let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=a.jsx(me,{}),e[21]=C):C=e[21];let M;e[22]!==l?(M=l("chat.brandContext.extractionFailed"),e[22]=l,e[23]=M):M=e[23];let A;e[24]!==n?(A=a.jsx(ne,{latency:n}),e[24]=n,e[25]=A):A=e[25],d=a.jsx(H,{icon:C,title:M,summary:o?.error??l("chat.brandContext.unknownError"),state:"error",trailing:A});break e}c=H,e[26]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(me,{className:"text-special"}),e[26]=r):r=e[26],m=o?.name?l("chat.brandContext.brandSet",{name:o.name}):l("chat.brandContext.brandContextSet")}e[2]=n,e[3]=t.input,e[4]=t.output,e[5]=u,e[6]=l,e[7]=c,e[8]=o,e[9]=r,e[10]=m,e[11]=d}else c=e[7],o=e[8],r=e[9],m=e[10],d=e[11];if(d!==Symbol.for("react.early_return_sentinel"))return d;const f=o?.domain;let p;e[27]!==n?(p=a.jsx(ne,{latency:n}),e[27]=n,e[28]=p):p=e[28];let g;e[29]!==c||e[30]!==r||e[31]!==m||e[32]!==f||e[33]!==p?(g=a.jsx(c,{icon:r,title:m,summary:f,state:"idle",trailing:p}),e[29]=c,e[30]=r,e[31]=m,e[32]=f,e[33]=p,e[34]=g):g=e[34];const h=o?.logo,x=o?.favicon,v=o?.name,b=o?.domain,k=o?.overview,j=o?.colors,_=o?.fonts;let y;e[35]!==v||e[36]!==b||e[37]!==k||e[38]!==j||e[39]!==_||e[40]!==h||e[41]!==x?(y=a.jsx(Yt,{logo:h,favicon:x,name:v,domain:b,overview:k,colors:j,fonts:_}),e[35]=v,e[36]=b,e[37]=k,e[38]=j,e[39]=_,e[40]=h,e[41]=x,e[42]=y):y=e[42];let S;return e[43]!==y||e[44]!==g?(S=a.jsxs(a.Fragment,{children:[g,y]}),e[43]=y,e[44]=g,e[45]=S):S=e[45],S}function Bl(s){const e=E.c(45),{part:t,latency:n}=s,l=U();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let c,o,r,m,d;if(e[2]!==n||e[3]!==t.output||e[4]!==u||e[5]!==l){d=Symbol.for("react.early_return_sentinel");e:{o=be(t.output);const x=u==="loading",v=u==="error"||o&&o.success===!1;if(x){let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(me,{className:"animate-pulse"}),e[11]=b):b=e[11];let k;e[12]!==l?(k=l("chat.brandContext.loadingBrand"),e[12]=l,e[13]=k):k=e[13];let j;e[14]!==k?(j=a.jsx(H,{icon:b,title:k,state:"loading"}),e[14]=k,e[15]=j):j=e[15],d=j;break e}if(v||!o){let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(me,{}),e[16]=b):b=e[16];let k;e[17]!==l?(k=l("chat.brandContext.couldNotLoadBrand"),e[17]=l,e[18]=k):k=e[18];let j;e[19]!==n?(j=a.jsx(ne,{latency:n}),e[19]=n,e[20]=j):j=e[20];let _;e[21]!==k||e[22]!==j?(_=a.jsx(H,{icon:b,title:k,state:"error",trailing:j}),e[21]=k,e[22]=j,e[23]=_):_=e[23],d=_;break e}c=H,e[24]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(me,{className:"text-special"}),e[24]=r):r=e[24],m=o.name?l("chat.brandContext.brandWithName",{name:o.name}):l("chat.brandContext.brand")}e[2]=n,e[3]=t.output,e[4]=u,e[5]=l,e[6]=c,e[7]=o,e[8]=r,e[9]=m,e[10]=d}else c=e[6],o=e[7],r=e[8],m=e[9],d=e[10];if(d!==Symbol.for("react.early_return_sentinel"))return d;let f;e[25]!==n?(f=a.jsx(ne,{latency:n}),e[25]=n,e[26]=f):f=e[26];let p;e[27]!==c||e[28]!==o.domain||e[29]!==r||e[30]!==m||e[31]!==f?(p=a.jsx(c,{icon:r,title:m,summary:o.domain,state:"idle",trailing:f}),e[27]=c,e[28]=o.domain,e[29]=r,e[30]=m,e[31]=f,e[32]=p):p=e[32];let g;e[33]!==o.colors||e[34]!==o.domain||e[35]!==o.favicon||e[36]!==o.fonts||e[37]!==o.isDefault||e[38]!==o.logo||e[39]!==o.name||e[40]!==o.overview?(g=a.jsx(Yt,{logo:o.logo,favicon:o.favicon,name:o.name,domain:o.domain,overview:o.overview,colors:o.colors,fonts:o.fonts,showDefaultBadge:!0,isDefault:o.isDefault}),e[33]=o.colors,e[34]=o.domain,e[35]=o.favicon,e[36]=o.fonts,e[37]=o.isDefault,e[38]=o.logo,e[39]=o.name,e[40]=o.overview,e[41]=g):g=e[41];let h;return e[42]!==p||e[43]!==g?(h=a.jsxs(a.Fragment,{children:[p,g]}),e[42]=p,e[43]=g,e[44]=h):h=e[44],h}function Ol(s){const e=E.c(49),{part:t,latency:n}=s,l=U();let i;e[0]!==l?(i=Qe(l),e[0]=l,e[1]=i):i=e[1];const u=i;let c;e[2]!==t.state?(c=pe(t.state),e[2]=t.state,e[3]=c):c=e[3];const o=c;let r,m,d,f;if(e[4]!==u||e[5]!==n||e[6]!==t.output||e[7]!==o||e[8]!==l){f=Symbol.for("react.early_return_sentinel");e:{const h=be(t.output),x=Array.isArray(h?.items)?h.items:[],v=o==="loading",b=o==="error";if(v){let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(me,{className:"animate-pulse"}),e[13]=y):y=e[13];let S;e[14]!==l?(S=l("chat.brandContext.loadingBrands"),e[14]=l,e[15]=S):S=e[15];let N;e[16]!==S?(N=a.jsx(H,{icon:y,title:S,state:"loading"}),e[16]=S,e[17]=N):N=e[17],f=N;break e}if(b){let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(me,{}),e[18]=y):y=e[18];let S;e[19]!==l?(S=l("chat.brandContext.couldNotLoadBrands"),e[19]=l,e[20]=S):S=e[20];let N;e[21]!==n?(N=a.jsx(ne,{latency:n}),e[21]=n,e[22]=N):N=e[22];let w;e[23]!==S||e[24]!==N?(w=a.jsx(H,{icon:y,title:S,state:"error",trailing:N}),e[23]=S,e[24]=N,e[25]=w):w=e[25],f=w;break e}if(x.length===0){let y;e[26]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(me,{}),e[26]=y):y=e[26];let S;e[27]!==l?(S=l("chat.brandContext.noBrandsYet"),e[27]=l,e[28]=S):S=e[28];let N;e[29]!==l?(N=l("chat.brandContext.noBrandsContext"),e[29]=l,e[30]=N):N=e[30];let w;e[31]!==n?(w=a.jsx(ne,{latency:n}),e[31]=n,e[32]=w):w=e[32];let C;e[33]!==w||e[34]!==S||e[35]!==N?(C=a.jsx(H,{icon:y,title:S,summary:N,state:"idle",trailing:w}),e[33]=w,e[34]=S,e[35]=N,e[36]=C):C=e[36],f=C;break e}let k;e[37]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(me,{className:"text-special"}),e[37]=k):k=e[37];let j;e[38]!==n?(j=a.jsx(ne,{latency:n}),e[38]=n,e[39]=j):j=e[39],d=a.jsx(H,{icon:k,title:x.length===1?l("chat.brandContext.oneBrand"):l("chat.brandContext.multipleBrands",{count:x.length}),state:"idle",trailing:j}),r="mt-2 flex flex-col gap-1.5";let _;e[40]!==u||e[41]!==l?(_=(y,S)=>{const N=Ye(y.colors);return a.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[y.colors&&a.jsx(Qt,{colors:y.colors}),a.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5",children:[(y.logo||y.favicon)&&a.jsx("img",{src:y.logo??y.favicon??void 0,alt:"",className:"size-8 shrink-0 rounded-md border border-border bg-background object-contain p-0.5",onError:Ul}),a.jsxs("div",{className:"flex flex-col leading-tight min-w-0 flex-1",children:[a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs font-medium text-foreground truncate",children:[y.name??l("chat.brandContext.untitled"),y.isDefault&&a.jsx(xt,{className:"size-3 text-warning shrink-0"})]}),y.domain&&a.jsx("span",{className:"text-[11px] text-muted-foreground truncate",children:y.domain})]}),N.length>0&&a.jsx("div",{className:"flex items-center gap-0.5 shrink-0",children:N.slice(0,5).map(w=>{const[C,M]=w;return a.jsx("span",{className:"size-3 rounded-full border border-border",style:{backgroundColor:M},title:`${u[C]}: ${M}`,"aria-hidden":!0},C)})})]})]},y.id??`${y.name}-${y.domain}-${S}`)},e[40]=u,e[41]=l,e[42]=_):_=e[42],m=x.map(_)}e[4]=u,e[5]=n,e[6]=t.output,e[7]=o,e[8]=l,e[9]=r,e[10]=m,e[11]=d,e[12]=f}else r=e[9],m=e[10],d=e[11],f=e[12];if(f!==Symbol.for("react.early_return_sentinel"))return f;let p;e[43]!==r||e[44]!==m?(p=a.jsx("div",{className:r,children:m}),e[43]=r,e[44]=m,e[45]=p):p=e[45];let g;return e[46]!==d||e[47]!==p?(g=a.jsxs(a.Fragment,{children:[d,p]}),e[46]=d,e[47]=p,e[48]=g):g=e[48],g}function Ul(s){s.target.style.display="none"}function Ue(s){const e=E.c(4),{connection_id:t,iconSize:n}=s,l=n===void 0?"xs":n,i=Et(t);if(!i)return null;let u;return e[0]!==i.icon||e[1]!==i.title||e[2]!==l?(u=a.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:a.jsx(Se,{icon:i.icon,name:i.title,size:l})}),e[0]=i.icon,e[1]=i.title,e[2]=l,e[3]=u):u=e[3],u}Ue.Fallback=function({iconSize:e="xs"}){const t=e==="sm"?"size-6":"size-5";return a.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:a.jsx("div",{className:G(t,"rounded bg-muted animate-pulse")})})};function ye(s){const e=E.c(18),{connectionIds:t,maxVisibleIcons:n,iconSize:l,className:i}=s,u=n===void 0?2:n,c=l===void 0?"xs":l;if(t.length===0)return null;let o,r,m;if(e[0]!==i||e[1]!==t||e[2]!==c||e[3]!==u){const p=t.slice(0,u);o=t.length-u,e[7]!==i?(r=G("flex items-center justify-end -space-x-2",i),e[7]=i,e[8]=r):r=e[8];let g;e[9]!==c?(g=h=>a.jsx(R.Suspense,{fallback:a.jsx(Ue.Fallback,{iconSize:c}),children:a.jsx(Ue,{connection_id:h,iconSize:c})},h),e[9]=c,e[10]=g):g=e[10],m=p.map(g),e[0]=i,e[1]=t,e[2]=c,e[3]=u,e[4]=o,e[5]=r,e[6]=m}else o=e[4],r=e[5],m=e[6];let d;e[11]!==c||e[12]!==o?(d=o>0&&a.jsx("div",{className:G("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",c==="sm"?"size-8":"size-6"),children:a.jsxs("span",{className:G(c==="sm"?"text-sm":"text-xs","font-medium text-muted-foreground"),"aria-label":`and ${o} more`,children:["+",o]})}),e[11]=c,e[12]=o,e[13]=d):d=e[13];let f;return e[14]!==r||e[15]!==m||e[16]!==d?(f=a.jsxs("div",{className:r,children:[m,d]}),e[14]=r,e[15]=m,e[16]=d,e[17]=f):f=e[17],f}ye.Fallback=function({maxVisibleIcons:e=2,totalCount:t,iconSize:n="xs"}){const l=n==="sm"?"size-6":"size-5",i=n==="sm"?"size-8":"size-6",u=t!==void 0&&t>e;return a.jsxs("div",{className:"flex items-center -space-x-2",children:[Array.from({length:e}).map((c,o)=>a.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:a.jsx("div",{className:G(l,"rounded bg-muted animate-pulse")})},o)),u&&a.jsx("div",{className:G("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",i),children:a.jsx("div",{className:G(n==="sm"?"h-3.5 w-5":"h-3 w-4","rounded bg-muted animate-pulse")})})]})};const Hl="This document certifies that the bearer agent has been granted authorized access to the tools and capabilities described herein. The agent is permitted to operate within the scope defined by its instructions and shall act in accordance with the constraints set forth by the issuing organization. This credential remains valid for the duration of the agent's active status. Unauthorized modification of this agent's permissions or scope is prohibited. The issuing authority reserves the right to revoke access at any time. All actions performed by this agent are subject to audit and review by the organization administrator. ",ut=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function ql(s){const e=E.c(105),{part:t,latency:n}=s,l=U(),i=Lt(),u=pe(t.state),c=R.useRef(null),o=R.useRef(null),r=R.useRef(null),m=R.useRef(null),d=R.useRef(null);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{ut?.matches||(d.current=c.current?.getBoundingClientRect()??null,c.current&&(c.current.style.willChange="transform"))},e[0]=f):f=e[0];const p=f;let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=z=>{if(ut?.matches)return;const O=d.current,K=c.current;if(!O||!K)return;const le=(z.clientX-O.left)/O.width*100,ae=(z.clientY-O.top)/O.height*100;K.style.transform=`perspective(800px) rotateY(${(le-50)*.05}deg) rotateX(${(ae-50)*-.05}deg)`,o.current&&(o.current.style.opacity="1",o.current.style.transform=`translate(${(le-50)*.15}px, ${(ae-50)*.15}px)`),r.current&&(r.current.style.opacity="0.45"),m.current&&(m.current.style.opacity="0.45")},e[1]=g):g=e[1];const h=g;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{const z=c.current;z&&(z.style.transform="none",z.style.willChange="auto"),o.current&&(o.current.style.opacity="0.4",o.current.style.transform="translate(0, 0)"),r.current&&(r.current.style.opacity="0.3"),m.current&&(m.current.style.opacity="0.3"),d.current=null},e[2]=x):x=e[2];const v=x;if(u==="loading"){let z;e[3]===Symbol.for("react.memo_cache_sentinel")?(z=a.jsx(fe,{className:"animate-pulse"}),e[3]=z):z=e[3];let O;e[4]!==l?(O=l("chat.agentCreate.creating"),e[4]=l,e[5]=O):O=e[5];let K;return e[6]!==O?(K=a.jsx(H,{icon:z,title:O,state:"loading",defaultOpen:!0}),e[6]=O,e[7]=K):K=e[7],K}if(u==="approval"){let z;e[8]===Symbol.for("react.memo_cache_sentinel")?(z=a.jsx(fe,{}),e[8]=z):z=e[8];let O;e[9]!==l?(O=l("chat.agentCreate.createAgent"),e[9]=l,e[10]=O):O=e[10];let K;return e[11]!==O?(K=a.jsx(H,{icon:z,title:O,state:"idle"}),e[11]=O,e[12]=K):K=e[12],K}if(u==="error"){let z;e[13]===Symbol.for("react.memo_cache_sentinel")?(z=a.jsx(fe,{}),e[13]=z):z=e[13];let O;e[14]!==t.state||e[15]!==l?(O=t.state==="output-denied"?l("chat.agentCreate.cancelled"):l("chat.agentCreate.couldntCreate"),e[14]=t.state,e[15]=l,e[16]=O):O=e[16];let K;e[17]!==n?(K=a.jsx(ne,{latency:n}),e[17]=n,e[18]=K):K=e[18];let le;return e[19]!==O||e[20]!==K?(le=a.jsx(H,{icon:z,title:O,state:"error",trailing:K}),e[19]=O,e[20]=K,e[21]=le):le=e[21],le}let b,k,j,_,y,S,N,w,C,M,A,L,I,T,$,P,q,B,D,F,W,J,X;if(e[22]!==n||e[23]!==i||e[24]!==t.output||e[25]!==l){q=Symbol.for("react.early_return_sentinel");e:{const z=be(t.output)?.item;if(!z?.id||!z?.title){let ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(ie=a.jsx(fe,{}),e[49]=ie):ie=e[49];let ce;e[50]!==l?(ce=l("chat.agentCreate.created"),e[50]=l,e[51]=ce):ce=e[51];let V;e[52]!==n?(V=a.jsx(ne,{latency:n}),e[52]=n,e[53]=V):V=e[53];let Z;e[54]!==ce||e[55]!==V?(Z=a.jsx(H,{icon:ie,title:ce,state:"idle",trailing:V}),e[54]=ce,e[55]=V,e[56]=Z):Z=e[56],q=Z;break e}const O=(z.connections??[]).map(Wl);let K;e[57]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(fe,{className:"text-success"}),e[57]=K):K=e[57];let le;e[58]!==n?(le=a.jsx(ne,{latency:n}),e[58]=n,e[59]=le):le=e[59],P=a.jsx(H,{icon:K,title:l("chat.agentCreate.agentCreated",{name:z.title}),state:"idle",trailing:le}),$="mt-2 overflow-hidden rounded-xl border-[0.5px] border-border bg-card p-2.5",j=c,_="relative overflow-hidden rounded-lg bg-accent/25 p-2",e[60]===Symbol.for("react.memo_cache_sentinel")?(y={transition:"transform 0.3s ease-out"},e[60]=y):y=e[60],S=p,N=h,w=v,e[61]===Symbol.for("react.memo_cache_sentinel")?(C=a.jsx("div",{ref:o,className:"pointer-events-none absolute inset-[-20%] z-[1] select-none rounded-lg",style:{background:"linear-gradient(135deg, hsla(280, 60%, 80%, 0.35) 0%, transparent 35%), linear-gradient(315deg, hsla(190, 70%, 80%, 0.35) 0%, transparent 35%), linear-gradient(225deg, hsla(140, 55%, 80%, 0.3) 0%, transparent 30%), linear-gradient(45deg, hsla(320, 55%, 82%, 0.3) 0%, transparent 30%)",opacity:.4,transition:"opacity 0.3s ease, transform 0.3s ease-out"},"aria-hidden":"true"}),e[61]=C):C=e[61];let ae;e[62]===Symbol.for("react.memo_cache_sentinel")?(ae={textAlign:"justify",wordBreak:"break-all"},e[62]=ae):ae=e[62],e[63]===Symbol.for("react.memo_cache_sentinel")?(M=a.jsx("p",{className:"pointer-events-none absolute inset-0 z-[1] select-none overflow-hidden text-[6px] font-light leading-[1.5] tracking-[0.06px] text-background opacity-50 mix-blend-overlay",style:ae,"aria-hidden":"true",children:Hl.repeat(6)}),A=a.jsx("img",{src:"/stamp.svg",alt:"",className:"pointer-events-none absolute -right-10 -top-10 size-[140px] opacity-50 select-none","aria-hidden":"true"}),e[63]=M,e[64]=A):(M=e[63],A=e[64]),e[65]===Symbol.for("react.memo_cache_sentinel")?(L=a.jsx("img",{ref:r,src:"/left-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 left-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[65]=L):L=e[65],e[66]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx("img",{ref:m,src:"/right-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[66]=I):I=e[66],T=a.jsxs("div",{className:"relative",children:[a.jsxs("div",{className:"flex items-center gap-2.5 p-2",children:[a.jsx(ht,{icon:z.icon,name:z.title,size:"md"}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:z.title})})]}),z.description&&a.jsx("div",{className:"px-2 pt-1 pr-16",children:a.jsx("p",{className:"text-sm leading-snug text-muted-foreground line-clamp-2",children:z.description})})]}),X="relative z-[3] flex items-center gap-2.5 px-2 pt-6 pb-1";const de=O.length>0&&a.jsx(R.Suspense,{fallback:a.jsx(ye.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:O.length}),children:a.jsx(ye,{connectionIds:O,iconSize:"xs",maxVisibleIcons:3,className:"flex items-center justify-start -space-x-1"})});e[67]!==de?(k=a.jsx("div",{className:"flex-1 min-w-0",children:de}),e[67]=de,e[68]=k):k=e[68],J="flex items-center gap-2 shrink-0",b=He,B="sm",D="h-7",F=()=>i(z.id),W=l("chat.agentCreate.seeAgentLabel",{name:z.title})}e[22]=n,e[23]=i,e[24]=t.output,e[25]=l,e[26]=b,e[27]=k,e[28]=j,e[29]=_,e[30]=y,e[31]=S,e[32]=N,e[33]=w,e[34]=C,e[35]=M,e[36]=A,e[37]=L,e[38]=I,e[39]=T,e[40]=$,e[41]=P,e[42]=q,e[43]=B,e[44]=D,e[45]=F,e[46]=W,e[47]=J,e[48]=X}else b=e[26],k=e[27],j=e[28],_=e[29],y=e[30],S=e[31],N=e[32],w=e[33],C=e[34],M=e[35],A=e[36],L=e[37],I=e[38],T=e[39],$=e[40],P=e[41],q=e[42],B=e[43],D=e[44],F=e[45],W=e[46],J=e[47],X=e[48];if(q!==Symbol.for("react.early_return_sentinel"))return q;let te;e[69]!==l?(te=l("chat.agentCreate.seeAgent"),e[69]=l,e[70]=te):te=e[70];let Q;e[71]!==b||e[72]!==te||e[73]!==B||e[74]!==D||e[75]!==F||e[76]!==W?(Q=a.jsx(b,{size:B,className:D,onClick:F,"aria-label":W,children:te}),e[71]=b,e[72]=te,e[73]=B,e[74]=D,e[75]=F,e[76]=W,e[77]=Q):Q=e[77];let se;e[78]!==Q||e[79]!==J?(se=a.jsx("div",{className:J,children:Q}),e[78]=Q,e[79]=J,e[80]=se):se=e[80];let re;e[81]!==k||e[82]!==se||e[83]!==X?(re=a.jsxs("div",{className:X,children:[k,se]}),e[81]=k,e[82]=se,e[83]=X,e[84]=re):re=e[84];let ue;e[85]!==j||e[86]!==_||e[87]!==y||e[88]!==S||e[89]!==N||e[90]!==w||e[91]!==C||e[92]!==M||e[93]!==A||e[94]!==L||e[95]!==I||e[96]!==T||e[97]!==re?(ue=a.jsxs("div",{ref:j,className:_,style:y,onMouseEnter:S,onMouseMove:N,onMouseLeave:w,children:[C,M,A,L,I,T,re]}),e[85]=j,e[86]=_,e[87]=y,e[88]=S,e[89]=N,e[90]=w,e[91]=C,e[92]=M,e[93]=A,e[94]=L,e[95]=I,e[96]=T,e[97]=re,e[98]=ue):ue=e[98];let Y;e[99]!==$||e[100]!==ue?(Y=a.jsx("div",{className:$,children:ue}),e[99]=$,e[100]=ue,e[101]=Y):Y=e[101];let oe;return e[102]!==P||e[103]!==Y?(oe=a.jsxs(a.Fragment,{children:[P,Y]}),e[102]=P,e[103]=Y,e[104]=oe):oe=e[104],oe}function Wl(s){return s.connection_id}function Kl(s){const e=E.c(24),{agent:t}=s,n=Lt();if(!t.id)return null;let l;e[0]!==t.connections?(l=t.connections??[],e[0]=t.connections,e[1]=l):l=e[1];let i;e[2]!==l?(i=l.map(Gl),e[2]=l,e[3]=i):i=e[3];const u=i;let c;e[4]!==t.id||e[5]!==n?(c=()=>n(t.id),e[4]=t.id,e[5]=n,e[6]=c):c=e[6];let o;e[7]!==t.icon||e[8]!==t.title?(o=a.jsx(ht,{icon:t.icon,name:t.title,size:"sm"}),e[7]=t.icon,e[8]=t.title,e[9]=o):o=e[9];let r;e[10]!==t.title?(r=a.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[10]=t.title,e[11]=r):r=e[11];let m;e[12]!==t.description?(m=t.description&&a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[12]=t.description,e[13]=m):m=e[13];let d;e[14]!==r||e[15]!==m?(d=a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r,m]}),e[14]=r,e[15]=m,e[16]=d):d=e[16];let f;e[17]!==u?(f=u.length>0&&a.jsx(R.Suspense,{fallback:a.jsx(ye.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:u.length}),children:a.jsx(ye,{connectionIds:u,iconSize:"xs",maxVisibleIcons:3})}),e[17]=u,e[18]=f):f=e[18];let p;return e[19]!==c||e[20]!==o||e[21]!==d||e[22]!==f?(p=a.jsxs("button",{type:"button",onClick:c,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[o,d,f]}),e[19]=c,e[20]=o,e[21]=d,e[22]=f,e[23]=p):p=e[23],p}function Gl(s){return s.connection_id}function Vl(s){const e=E.c(59),{part:t,latency:n}=s,l=U(),i=We(),{org:u}=ge();let c;e[0]!==t.state?(c=pe(t.state),e[0]=t.state,e[1]=c):c=e[1];const o=c;let r,m,d,f,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==o||e[6]!==l){g=Symbol.for("react.early_return_sentinel");e:{const b=be(t.output);if(m=Array.isArray(b?.items)?b.items:[],o==="loading"){let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(fe,{className:"animate-pulse"}),e[13]=y):y=e[13];let S;e[14]!==l?(S=l("chat.agentList.loading"),e[14]=l,e[15]=S):S=e[15];let N;e[16]!==S?(N=a.jsx(H,{icon:y,title:S,state:"loading"}),e[16]=S,e[17]=N):N=e[17],g=N;break e}if(o==="approval"){let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(fe,{}),e[18]=y):y=e[18];let S;e[19]!==l?(S=l("chat.agentList.listAgents"),e[19]=l,e[20]=S):S=e[20];let N;e[21]!==S?(N=a.jsx(H,{icon:y,title:S,state:"idle"}),e[21]=S,e[22]=N):N=e[22],g=N;break e}if(o==="error"){let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(fe,{}),e[23]=y):y=e[23];let S;e[24]!==t.state||e[25]!==l?(S=t.state==="output-denied"?l("chat.agentList.unavailable"):l("chat.agentList.couldntLoad"),e[24]=t.state,e[25]=l,e[26]=S):S=e[26];let N;e[27]!==n?(N=a.jsx(ne,{latency:n}),e[27]=n,e[28]=N):N=e[28];let w;e[29]!==S||e[30]!==N?(w=a.jsx(H,{icon:y,title:S,state:"error",trailing:N}),e[29]=S,e[30]=N,e[31]=w):w=e[31],g=w;break e}if(m.length===0){let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(fe,{}),e[32]=y):y=e[32];let S;e[33]!==l?(S=l("chat.agentList.noAgents"),e[33]=l,e[34]=S):S=e[34];let N;e[35]!==l?(N=l("chat.agentList.noAgentsDesc"),e[35]=l,e[36]=N):N=e[36];let w;e[37]!==n?(w=a.jsx(ne,{latency:n}),e[37]=n,e[38]=w):w=e[38];let C;e[39]!==S||e[40]!==N||e[41]!==w?(C=a.jsx(H,{icon:y,title:S,summary:N,state:"idle",trailing:w}),e[39]=S,e[40]=N,e[41]=w,e[42]=C):C=e[42],g=C;break e}const k=m.slice(0,Pt);r=m.length-k.length;let j;e[43]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(fe,{className:"text-success"}),e[43]=j):j=e[43];let _;e[44]!==n?(_=a.jsx(ne,{latency:n}),e[44]=n,e[45]=_):_=e[45],p=a.jsx(H,{icon:j,title:m.length===1?l("chat.agentList.oneAgent"):l("chat.agentList.multiAgents",{count:m.length}),state:"idle",trailing:_}),d="mt-2 flex flex-col gap-1.5",f=k.map(Jl)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=o,e[6]=l,e[7]=r,e[8]=m,e[9]=d,e[10]=f,e[11]=p,e[12]=g}else r=e[7],m=e[8],d=e[9],f=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let h;e[46]!==r||e[47]!==m||e[48]!==i||e[49]!==u||e[50]!==l?(h=r>0&&a.jsx(Rt,{count:m.length,noun:l("chat.agentList.agentsNoun"),onClick:()=>i({to:"/$org/settings/agents",params:{org:u.slug}})}),e[46]=r,e[47]=m,e[48]=i,e[49]=u,e[50]=l,e[51]=h):h=e[51];let x;e[52]!==d||e[53]!==f||e[54]!==h?(x=a.jsxs("div",{className:d,children:[f,h]}),e[52]=d,e[53]=f,e[54]=h,e[55]=x):x=e[55];let v;return e[56]!==p||e[57]!==x?(v=a.jsxs(a.Fragment,{children:[p,x]}),e[56]=p,e[57]=x,e[58]=v):v=e[58],v}function Jl(s){return a.jsx(Kl,{agent:s},s.id)}const Xl={active:"bg-success",inactive:"bg-muted-foreground",error:"bg-destructive"};function Ql(s){const e=E.c(27),{connection:t}=s,n=We(),{org:l}=ge(),i=t.slug,u=t.description||t.app_name,c=!i||void 0;let o;e[0]!==n||e[1]!==l||e[2]!==i?(o=()=>i&&n({to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:i}}),e[0]=n,e[1]=l,e[2]=i,e[3]=o):o=e[3];let r;e[4]!==t.icon||e[5]!==t.title?(r=a.jsx(Se,{icon:t.icon,name:t.title,size:"sm"}),e[4]=t.icon,e[5]=t.title,e[6]=r):r=e[6];let m;e[7]!==t.title?(m=a.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[7]=t.title,e[8]=m):m=e[8];let d;e[9]!==u?(d=u&&a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:u}),e[9]=u,e[10]=d):d=e[10];let f;e[11]!==m||e[12]!==d?(f=a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[m,d]}),e[11]=m,e[12]=d,e[13]=f):f=e[13];const p=Xl[t.status]??"bg-muted-foreground";let g;e[14]!==p?(g=G("size-2 shrink-0 rounded-full",p),e[14]=p,e[15]=g):g=e[15];let h;e[16]!==g?(h=a.jsx("span",{className:g,"aria-hidden":"true"}),e[16]=g,e[17]=h):h=e[17];let x;e[18]!==t.status?(x=a.jsx("span",{className:"sr-only",children:t.status}),e[18]=t.status,e[19]=x):x=e[19];let v;return e[20]!==c||e[21]!==x||e[22]!==o||e[23]!==r||e[24]!==f||e[25]!==h?(v=a.jsxs("button",{type:"button","aria-disabled":c,onClick:o,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer aria-disabled:cursor-default aria-disabled:hover:bg-card",children:[r,f,h,x]}),e[20]=c,e[21]=x,e[22]=o,e[23]=r,e[24]=f,e[25]=h,e[26]=v):v=e[26],v}function Yl(s){const e=E.c(54),{part:t,latency:n}=s,l=U(),i=We(),{org:u}=ge();let c;e[0]!==t.state?(c=pe(t.state),e[0]=t.state,e[1]=c):c=e[1];const o=c;let r,m,d,f,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==o||e[6]!==l){g=Symbol.for("react.early_return_sentinel");e:{const b=be(t.output);if(m=(Array.isArray(b?.items)?b.items:[]).filter(ea),o==="loading"||o==="approval"){let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(we,{className:"animate-pulse"}),e[13]=y):y=e[13];let S;e[14]!==l?(S=l("chat.connectionList.loadingTitle"),e[14]=l,e[15]=S):S=e[15];let N;e[16]!==S?(N=a.jsx(H,{icon:y,title:S,state:"loading"}),e[16]=S,e[17]=N):N=e[17],g=N;break e}if(o==="error"){let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(we,{}),e[18]=y):y=e[18];let S;e[19]!==t.state||e[20]!==l?(S=t.state==="output-denied"?l("chat.connectionList.unavailableTitle"):l("chat.connectionList.errorTitle"),e[19]=t.state,e[20]=l,e[21]=S):S=e[21];let N;e[22]!==n?(N=a.jsx(ne,{latency:n}),e[22]=n,e[23]=N):N=e[23];let w;e[24]!==S||e[25]!==N?(w=a.jsx(H,{icon:y,title:S,state:"error",trailing:N}),e[24]=S,e[25]=N,e[26]=w):w=e[26],g=w;break e}if(m.length===0){let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(we,{}),e[27]=y):y=e[27];let S;e[28]!==l?(S=l("chat.connectionList.emptyTitle"),e[28]=l,e[29]=S):S=e[29];let N;e[30]!==l?(N=l("chat.connectionList.emptySummary"),e[30]=l,e[31]=N):N=e[31];let w;e[32]!==n?(w=a.jsx(ne,{latency:n}),e[32]=n,e[33]=w):w=e[33];let C;e[34]!==S||e[35]!==N||e[36]!==w?(C=a.jsx(H,{icon:y,title:S,summary:N,state:"idle",trailing:w}),e[34]=S,e[35]=N,e[36]=w,e[37]=C):C=e[37],g=C;break e}const k=m.slice(0,Pt);r=m.length-k.length;let j;e[38]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(we,{className:"text-success"}),e[38]=j):j=e[38];let _;e[39]!==n?(_=a.jsx(ne,{latency:n}),e[39]=n,e[40]=_):_=e[40],p=a.jsx(H,{icon:j,title:m.length===1?l("chat.connectionList.singleConnection"):l("chat.connectionList.multipleConnections",{count:m.length}),state:"idle",trailing:_}),d="mt-2 flex flex-col gap-1.5",f=k.map(Zl)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=o,e[6]=l,e[7]=r,e[8]=m,e[9]=d,e[10]=f,e[11]=p,e[12]=g}else r=e[7],m=e[8],d=e[9],f=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let h;e[41]!==r||e[42]!==m||e[43]!==i||e[44]!==u||e[45]!==l?(h=r>0&&a.jsx(Rt,{count:m.length,noun:l("chat.connectionList.connectionNoun"),onClick:()=>i({to:"/$org/settings/connections",params:{org:u.slug}})}),e[41]=r,e[42]=m,e[43]=i,e[44]=u,e[45]=l,e[46]=h):h=e[46];let x;e[47]!==d||e[48]!==f||e[49]!==h?(x=a.jsxs("div",{className:d,children:[f,h]}),e[47]=d,e[48]=f,e[49]=h,e[50]=x):x=e[50];let v;return e[51]!==p||e[52]!==x?(v=a.jsxs(a.Fragment,{children:[p,x]}),e[51]=p,e[52]=x,e[53]=v):v=e[53],v}function Zl(s){return a.jsx(Ql,{connection:s},s.id)}function ea(s){return s.connection_type!=="VIRTUAL"}function ta(){const s=E.c(42),e=U(),t=Ne(),{sendMessage:n,isStreaming:l,messages:i}=Ps(),{org:u}=ge(),c=t?.virtualMcpId,{prompts:o}=Fs(u.slug),r=c??null;let m;s[0]!==u.id||s[1]!==u.slug||s[2]!==r?(m={connectionId:r,orgId:u.id,orgSlug:u.slug},s[0]=u.id,s[1]=u.slug,s[2]=r,s[3]=m):m=s[3];const d=_t(m),[f,p]=R.useState(null);if(!c||l||!is(c)||!i.some(sa))return null;let h;if(s[4]!==o||s[5]!==c){let T;s[7]!==c?(T=$=>$.agentId===c&&$.promptName,s[7]=c,s[8]=T):T=s[8],h=o.find(T),s[4]=o,s[5]=c,s[6]=h}else h=s[6];const x=h;if(!x)return null;let v;s[9]!==d||s[10]!==n||s[11]!==e?(v=async(T,$)=>{if(!d){ze.error(e("chat.nextActionChip.mcpClientNotAvailable"));return}try{const P=await sn(d,T.name,$);await n({type:"doc",content:[{type:"paragraph",content:[nn({id:T.name,name:Ct(T.name,wt(T._meta)),metadata:P.messages,char:"/",kind:"prompt",args:$}),{type:"text",text:" "}]}]})}catch(P){console.error("[next-action-chip] failed",P),ze.error(e("chat.nextActionChip.failedLoadPrompt"))}},s[9]=d,s[10]=n,s[11]=e,s[12]=v):v=s[12];const b=v;let k;s[13]!==x._meta||s[14]!==x.arguments||s[15]!==x.description||s[16]!==x.promptName||s[17]!==x.title||s[18]!==b?(k=()=>{const T={name:x.promptName,title:x.title,description:x.description,arguments:x.arguments,_meta:x._meta};if(T.arguments&&T.arguments.length>0){p(T);return}b(T)},s[13]=x._meta,s[14]=x.arguments,s[15]=x.description,s[16]=x.promptName,s[17]=x.title,s[18]=b,s[19]=k):k=s[19];const j=k;let _;s[20]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx(ys,{size:12,className:"shrink-0 text-special"}),s[20]=_):_=s[20];let y;s[21]!==e?(y=e("chat.nextActionChip.next"),s[21]=e,s[22]=y):y=s[22];let S;s[23]!==y?(S=a.jsx("span",{className:"font-medium text-foreground/80",children:y}),s[23]=y,s[24]=S):S=s[24];let N;s[25]!==x.title?(N=a.jsx("span",{className:"truncate",children:x.title}),s[25]=x.title,s[26]=N):N=s[26];let w;s[27]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(yt,{size:12,className:"shrink-0 transition-transform duration-150 group-hover:translate-x-0.5"}),s[27]=w):w=s[27];let C;s[28]!==j||s[29]!==S||s[30]!==N?(C=a.jsxs("button",{type:"button",onClick:j,className:"group mt-3 flex items-center gap-2 self-start classic:rounded-full compact:rounded-lg border border-border bg-background px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent/40 hover:text-foreground",children:[_,S,N,w]}),s[28]=j,s[29]=S,s[30]=N,s[31]=C):C=s[31];let M;s[32]===Symbol.for("react.memo_cache_sentinel")?(M=T=>p(T),s[32]=M):M=s[32];let A;s[33]!==f||s[34]!==b?(A=async T=>{const $=f;p(null),$&&await b($,T)},s[33]=f,s[34]=b,s[35]=A):A=s[35];let L;s[36]!==f||s[37]!==A?(L=a.jsx(ln,{prompt:f,setPrompt:M,onSubmit:A}),s[36]=f,s[37]=A,s[38]=L):L=s[38];let I;return s[39]!==C||s[40]!==L?(I=a.jsxs(a.Fragment,{children:[C,L]}),s[39]=C,s[40]=L,s[41]=I):I=s[41],I}function sa(s){return s.role==="user"||s.parts.some(na)}function na(s){return s.type==="tool-user_ask"&&s.state==="output-available"}function la(s){const e=new Map;for(let t=s.length-1;t>=0;t--){const n=s[t]?.parts;if(n)for(const l of n){const i=l;if(i.type!=="data-deck-updated")continue;const u=i.data;if(!u?.path)continue;const c=`deck:${u.path}`;e.has(c)||e.set(c,{tabId:cs(u.path),label:u.name||u.path,kind:u.kind==="page"?"page":"deck"})}}return Array.from(e.values())}function aa(){const s=E.c(9),{openPanel:e}=Ve(),t=ve()?.messages??[],n=la(t);if(n.length===0)return null;const l=n.some(ra),i=n.some(oa),u=l?i?"Slides & pages in this chat":"Slides in this chat":"Pages in this chat",c="flex flex-col gap-1.5 py-2";let o;s[0]!==u?(o=a.jsx("div",{className:"text-[12px] text-muted-foreground/70 uppercase tracking-wide",children:u}),s[0]=u,s[1]=o):o=s[1];const r="flex flex-wrap gap-2";let m;s[2]!==e?(m=g=>a.jsxs("button",{type:"button",onClick:()=>e(g.tabId),className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-muted/30 hover:bg-muted/60 text-[13px] transition-colors",children:[g.kind==="deck"?a.jsx(fn,{className:"size-3.5 shrink-0 text-muted-foreground"}):a.jsx(dn,{className:"size-3.5 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"font-medium text-foreground",children:g.label})]},g.tabId),s[2]=e,s[3]=m):m=s[3];const d=n.map(m);let f;s[4]!==d?(f=a.jsx("div",{className:r,children:d}),s[4]=d,s[5]=f):f=s[5];let p;return s[6]!==o||s[7]!==f?(p=a.jsxs("div",{className:c,children:[o,f]}),s[6]=o,s[7]=f,s[8]=p):p=s[8],p}function oa(s){return s.kind==="page"}function ra(s){return s.kind==="deck"}function ia(s){const e=E.c(29),{file:t}=s,n=U(),{openPanel:l}=Ve();let i;e[0]!==t.key||e[1]!==l?(i=()=>l(us(t.key)),e[0]=t.key,e[1]=l,e[2]=i):i=e[2];const u=i;let c;e[3]!==t.filename?(c=a.jsx(gn,{filename:t.filename,className:"h-5 w-4 shrink-0"}),e[3]=t.filename,e[4]=c):c=e[4];let o;e[5]!==t.filename||e[6]!==u?(o=a.jsx("button",{type:"button",onClick:u,className:"min-w-0 flex-1 truncate text-left text-[13px] font-medium text-foreground hover:underline",title:t.filename,children:t.filename}),e[5]=t.filename,e[6]=u,e[7]=o):o=e[7];const r=t.downloadUrl,m=t.filename;let d;e[8]!==n?(d=n("chat.outputFileRow.download"),e[8]=n,e[9]=d):d=e[9];let f;e[10]!==t.filename||e[11]!==n?(f=n("chat.outputFileRow.downloadFile",{filename:t.filename}),e[10]=t.filename,e[11]=n,e[12]=f):f=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(pn,{className:"size-3.5"}),e[13]=p):p=e[13];let g;e[14]!==t.downloadUrl||e[15]!==t.filename||e[16]!==d||e[17]!==f?(g=a.jsx("a",{href:r,download:m,className:"hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:block group-focus-within:block",title:d,"aria-label":f,children:p}),e[14]=t.downloadUrl,e[15]=t.filename,e[16]=d,e[17]=f,e[18]=g):g=e[18];let h;e[19]!==n?(h=n("chat.outputFileRow.open"),e[19]=n,e[20]=h):h=e[20];let x;e[21]!==u||e[22]!==h?(x=a.jsx(He,{variant:"outline",size:"sm",className:"h-7 shrink-0 px-2.5 text-xs",onClick:u,children:h}),e[21]=u,e[22]=h,e[23]=x):x=e[23];let v;return e[24]!==x||e[25]!==c||e[26]!==o||e[27]!==g?(v=a.jsxs("div",{className:"group flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2",children:[c,o,g,x]}),e[24]=x,e[25]=c,e[26]=o,e[27]=g,e[28]=v):v=e[28],v}function ca(s){return s.split("/").pop()??s}const ua=/(^|\/)output\//;function da(s){const e=new Set;for(const t of s.parts??[]){const n=t;if(n.state==="output-available"&&n.type==="tool-write"){const l=n.input?.path;l&&ua.test(l)&&e.add(ca(l))}}return e}function fa(s){const e=E.c(4),{threadId:t,message:n}=s,l=da(n),i=l.size>0;let u;e[0]!==i?(u={enabled:i},e[0]=i,e[1]=u):u=e[1];const{data:c}=mn(t,u);if(l.size===0)return null;const o=(c??[]).filter(f=>l.has(f.filename));if(o.length===0)return null;const r="flex flex-col gap-1.5 py-2",m=o.map(ma);let d;return e[2]!==m?(d=a.jsx("div",{className:r,children:m}),e[2]=m,e[3]=d):d=e[3],d}function ma(s){return a.jsx(ia,{file:s},s.key)}function pa(s){return s.type==="reasoning"}function ga(s){const e=[],t=new Set,n=new Map,l=new Map,i=new Map;if(s){let c=null;for(let o=0;o<s.parts.length;o++){const r=s.parts[o];if(pa(r)){c||(c={parts:[],startIndex:o},e.push(c)),c.parts.push(r),t.add(o);continue}if(c=null,r.type==="data-tool-metadata"&&"id"in r&&"data"in r){const m=r.data,d={};m.annotations&&(d.annotations=m.annotations),typeof m.latencyMs=="number"&&Number.isFinite(m.latencyMs)&&(d.latencySeconds=m.latencyMs/1e3),typeof m.outputBytes=="number"&&Number.isFinite(m.outputBytes)&&m.outputBytes>=0&&(d.outputBytes=m.outputBytes),m._meta&&typeof m._meta=="object"&&(d._meta=m._meta),n.set(r.id,d);continue}if(r.type==="data-tool-subtask-metadata"&&"id"in r){l.set(r.id,r.data);continue}if(r.type==="data-web-search"&&"id"in r&&"data"in r){const m=r.id,d=r.data;i.set(m,d.text??"");continue}}}const u=[];if(s)for(let c=0;c<s.parts.length;c++){const o=s.parts[c];if(o.type!=="step-start"){if(t.has(c)){const r=e.find(m=>m.startIndex===c);r&&u.push({kind:"reasoning-group",group:r});continue}o.type.startsWith("data-")||u.push({kind:"part",index:c})}}return{reasoningGroups:e,renderOrder:u,dataParts:{toolMetadata:n,toolSubtaskMetadata:l,webSearchStreaming:i}}}const xa=3;function ha(s,e){let t=-1;for(let n=s.length-1;n>=0;n--){const l=s[n];if(l.kind==="part"&&e[l.index]?.type==="text"){t=n;break}}return t===-1?{collapsed:[],tail:s}:{collapsed:s.slice(0,t),tail:s.slice(t)}}function ba(s,e){let t=0,n=0;for(const l of s)if(l.kind==="reasoning-group")n++;else{const i=e[l.index]?.type;i==="text"?n++:(i==="dynamic-tool"||i?.startsWith("tool-"))&&i!=="tool-todo_write"&&i!=="tool-update_interests"&&t++}return{toolCalls:t,messages:n}}function ya(s){const e=E.c(10),{toolCalls:t,messages:n}=s,l=U();let i;e[0]!==n||e[1]!==l||e[2]!==t?(i=t>0&&a.jsxs(a.Fragment,{children:[a.jsx(bt,{className:"size-3.5 shrink-0"}),a.jsxs("span",{children:[l("chat.assistant.toolCallPlural",{count:t}),n>0?",":""]})]}),e[0]=n,e[1]=l,e[2]=t,e[3]=i):i=e[3];let u;e[4]!==n||e[5]!==l?(u=n>0&&a.jsxs(a.Fragment,{children:[a.jsx(js,{className:"size-3.5 shrink-0"}),a.jsx("span",{children:l("chat.assistant.messagePlural",{count:n})})]}),e[4]=n,e[5]=l,e[6]=u):u=e[6];let c;return e[7]!==i||e[8]!==u?(c=a.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[i,u]}),e[7]=i,e[8]=u,e[9]=c):c=e[9],c}function ja(s){const e=E.c(28),{items:t,message:n,reasoningGroups:l,isReasoningActive:i,totalDuration:u,dataParts:c,isLoading:o,isLast:r}=s;let m;e[0]!==t||e[1]!==n.parts?(m=ba(t,n.parts),e[0]=t,e[1]=n.parts,e[2]=m):m=e[2];const{toolCalls:d,messages:f}=m;if(d===0&&f===0)return null;let p;e[3]!==f||e[4]!==d?(p=a.jsx(ya,{toolCalls:d,messages:f}),e[3]=f,e[4]=d,e[5]=p):p=e[5];let g;if(e[6]!==c||e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==t||e[11]!==n||e[12]!==l||e[13]!==u){let v;e[15]!==c||e[16]!==r||e[17]!==o||e[18]!==i||e[19]!==n||e[20]!==l||e[21]!==u?(v=(b,k)=>Zt({item:b,renderIndex:k,message:n,reasoningGroups:l,isReasoningActive:i,totalDuration:u,dataParts:c,isLoading:o,isLast:r,isLastVisiblePart:!1}),e[15]=c,e[16]=r,e[17]=o,e[18]=i,e[19]=n,e[20]=l,e[21]=u,e[22]=v):v=e[22],g=t.map(v),e[6]=c,e[7]=r,e[8]=o,e[9]=i,e[10]=t,e[11]=n,e[12]=l,e[13]=u,e[14]=g}else g=e[14];let h;e[23]!==g?(h=a.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:g}),e[23]=g,e[24]=h):h=e[24];let x;return e[25]!==p||e[26]!==h?(x=a.jsx(H,{icon:null,alwaysChevron:!0,title:p,state:"idle",children:h}),e[25]=p,e[26]=h,e[27]=x):x=e[27],x}function Zt({item:s,renderIndex:e,message:t,reasoningGroups:n,isReasoningActive:l,totalDuration:i,dataParts:u,isLoading:c,isLast:o,isLastVisiblePart:r,renderOrder:m}){if(s.kind==="reasoning-group"){const{group:g}=s,h=g===n[n.length-1],x=l&&h;if(!g.parts.some(k=>k.text?.trim())&&!x)return null;const b=n.length===1?i:null;return a.jsx($n,{duration:b,parts:g.parts,isStreaming:x},`${t.id}-reasoning-${g.startIndex}`)}const d=t.parts[s.index],f=r||(m?m.findLastIndex(g=>g.kind==="part")===e:!1),p=f?Rs(zs(),t.metadata?.usage):null;return a.jsx(va,{part:d,id:t.id,usageStats:f&&a.jsx(Ts,{usage:p,duration:i}),dataParts:u,isLoading:c,isLastMessage:o},`${t.id}-${s.index}`)}function va(s){const e=E.c(115),{part:t,id:n,usageStats:l,dataParts:i,isLoading:u,isLastMessage:c}=s;let o;e[0]!==i.toolMetadata?(o=f=>i.toolMetadata.get(f),e[0]=i.toolMetadata,e[1]=o):o=e[1];const r=o;let m;e[2]!==i.toolSubtaskMetadata?(m=f=>i.toolSubtaskMetadata.get(f),e[2]=i.toolSubtaskMetadata,e[3]=m):m=e[3];const d=m;switch(t.type){case"dynamic-tool":{let f;e[4]!==r||e[5]!==t.toolCallId?(f=r(t.toolCallId)?.annotations,e[4]=r,e[5]=t.toolCallId,e[6]=f):f=e[6];let p;e[7]!==r||e[8]!==t.toolCallId?(p=r(t.toolCallId)?.latencySeconds,e[7]=r,e[8]=t.toolCallId,e[9]=p):p=e[9];let g;e[10]!==r||e[11]!==t.toolCallId?(g=r(t.toolCallId)?.outputBytes,e[10]=r,e[11]=t.toolCallId,e[12]=g):g=e[12];let h;e[13]!==r||e[14]!==t.toolCallId?(h=r(t.toolCallId)?._meta,e[13]=r,e[14]=t.toolCallId,e[15]=h):h=e[15];let x;return e[16]!==c||e[17]!==t||e[18]!==f||e[19]!==p||e[20]!==g||e[21]!==h?(x=a.jsx(ot,{part:t,annotations:f,latency:p,outputBytes:g,isLastMessage:c,toolMeta:h}),e[16]=c,e[17]=t,e[18]=f,e[19]=p,e[20]=g,e[21]=h,e[22]=x):x=e[22],x}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let f;e[23]!==r||e[24]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[23]=r,e[24]=t.toolCallId,e[25]=f):f=e[25];let p;return e[26]!==t||e[27]!==f?(p=a.jsx(yl,{part:t,latency:f}),e[26]=t,e[27]=f,e[28]=p):p=e[28],p}case"tool-propose_plan":{let f;return e[29]!==t?(f=a.jsx(Al,{part:t}),e[29]=t,e[30]=f):f=e[30],f}case"tool-generate_image":{let f;e[31]!==r||e[32]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[31]=r,e[32]=t.toolCallId,e[33]=f):f=e[33];let p;return e[34]!==t||e[35]!==f?(p=a.jsx(ol,{part:t,latency:f}),e[34]=t,e[35]=f,e[36]=p):p=e[36],p}case"tool-web_search":case"tool-deep_research":{let f;e[37]!==r||e[38]!==t.toolCallId?(f=r(t.toolCallId)?.latencySeconds,e[37]=r,e[38]=t.toolCallId,e[39]=f):f=e[39];let p;e[40]!==i.webSearchStreaming||e[41]!==t.toolCallId?(p=i.webSearchStreaming.get(t.toolCallId),e[40]=i.webSearchStreaming,e[41]=t.toolCallId,e[42]=p):p=e[42];let g;return e[43]!==t||e[44]!==f||e[45]!==p?(g=a.jsx(bl,{part:t,latency:f,streamingText:p}),e[43]=t,e[44]=f,e[45]=p,e[46]=g):g=e[46],g}case"tool-subtask":{let f;e[47]!==d||e[48]!==t.toolCallId?(f=d(t.toolCallId),e[47]=d,e[48]=t.toolCallId,e[49]=f):f=e[49];let p;e[50]!==r||e[51]!==t.toolCallId?(p=r(t.toolCallId)?.annotations,e[50]=r,e[51]=t.toolCallId,e[52]=p):p=e[52];let g;e[53]!==r||e[54]!==t.toolCallId?(g=r(t.toolCallId)?.latencySeconds,e[53]=r,e[54]=t.toolCallId,e[55]=g):g=e[55];let h;e[56]!==t||e[57]!==f||e[58]!==p||e[59]!==g?(h={part:t,subtaskMeta:f,annotations:p,latency:g},e[56]=t,e[57]=f,e[58]=p,e[59]=g,e[60]=h):h=e[60];const x=h;let v;return e[61]!==x?(v=a.jsx(R.Suspense,{fallback:a.jsx(Il,{...x}),children:a.jsx($l,{...x})}),e[61]=x,e[62]=v):v=e[62],v}case"text":{const f=!!l&&!u,p=u&&c;let g;return e[63]!==n||e[64]!==t||e[65]!==f||e[66]!==p||e[67]!==l?(g=a.jsx($e,{id:n,part:t,extraActions:l,copyable:!0,alwaysShowActions:f,animate:p}),e[63]=n,e[64]=t,e[65]=f,e[66]=p,e[67]=l,e[68]=g):g=e[68],g}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const f=t;if(f.type==="tool-brand_context_setup"||f.type==="tool-BRAND_CONTEXT_EXTRACT"){let p;e[69]!==f.toolCallId||e[70]!==r?(p=r(f.toolCallId)?.latencySeconds,e[69]=f.toolCallId,e[70]=r,e[71]=p):p=e[71];let g;return e[72]!==f||e[73]!==p?(g=a.jsx(Fl,{part:f,latency:p}),e[72]=f,e[73]=p,e[74]=g):g=e[74],g}if(f.type==="tool-BRAND_CONTEXT_GET"){let p;e[75]!==f.toolCallId||e[76]!==r?(p=r(f.toolCallId)?.latencySeconds,e[75]=f.toolCallId,e[76]=r,e[77]=p):p=e[77];let g;return e[78]!==f||e[79]!==p?(g=a.jsx(Bl,{part:f,latency:p}),e[78]=f,e[79]=p,e[80]=g):g=e[80],g}if(f.type==="tool-BRAND_CONTEXT_LIST"){let p;e[81]!==f.toolCallId||e[82]!==r?(p=r(f.toolCallId)?.latencySeconds,e[81]=f.toolCallId,e[82]=r,e[83]=p):p=e[83];let g;return e[84]!==f||e[85]!==p?(g=a.jsx(Ol,{part:f,latency:p}),e[84]=f,e[85]=p,e[86]=g):g=e[86],g}if(f.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let p;e[87]!==f.toolCallId||e[88]!==r?(p=r(f.toolCallId)?.latencySeconds,e[87]=f.toolCallId,e[88]=r,e[89]=p):p=e[89];let g;return e[90]!==f||e[91]!==p?(g=a.jsx(ql,{part:f,latency:p}),e[90]=f,e[91]=p,e[92]=g):g=e[92],g}if(f.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let p;e[93]!==f.toolCallId||e[94]!==r?(p=r(f.toolCallId)?.latencySeconds,e[93]=f.toolCallId,e[94]=r,e[95]=p):p=e[95];let g;return e[96]!==f||e[97]!==p?(g=a.jsx(Vl,{part:f,latency:p}),e[96]=f,e[97]=p,e[98]=g):g=e[98],g}if(f.type==="tool-COLLECTION_CONNECTIONS_LIST"){let p;e[99]!==f.toolCallId||e[100]!==r?(p=r(f.toolCallId)?.latencySeconds,e[99]=f.toolCallId,e[100]=r,e[101]=p):p=e[101];let g;return e[102]!==f||e[103]!==p?(g=a.jsx(Yl,{part:f,latency:p}),e[102]=f,e[103]=p,e[104]=g):g=e[104],g}if(f.type.startsWith("tool-")){const p=f.toolCallId;let g;e[105]!==i.toolMetadata||e[106]!==p?(g=i.toolMetadata.get(p),e[105]=i.toolMetadata,e[106]=p,e[107]=g):g=e[107];const h=g,x=h?.annotations,v=h?.latencySeconds,b=h?.outputBytes,k=h?._meta;let j;return e[108]!==f||e[109]!==c||e[110]!==x||e[111]!==v||e[112]!==b||e[113]!==k?(j=a.jsx(ot,{part:f,annotations:x,latency:v,outputBytes:b,isLastMessage:c,toolMeta:k}),e[108]=f,e[109]=c,e[110]=x,e[111]=v,e[112]=b,e[113]=k,e[114]=j):j=e[114],j}if(f.type.startsWith("data-"))return null;throw new Error(`Unknown part type: ${f.type}`)}}}function Na(s){const e=E.c(9),{isRunInProgress:t}=s,n=U();if(t){let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(Ie,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),e[0]=u):u=e[0];let c;e[1]!==n?(c=n("chat.assistant.resumingTask"),e[1]=n,e[2]=c):c=e[2];let o;return e[3]!==c?(o=a.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:a.jsxs("span",{className:"flex items-center gap-1.5",children:[u,a.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:c})]})}),e[3]=c,e[4]=o):o=e[4],o}let l;e[5]!==n?(l=n("chat.assistant.noResponseGenerated"),e[5]=n,e[6]=l):l=e[6];let i;return e[7]!==l?(i=a.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:l}),e[7]=l,e[8]=i):i=e[8],i}function Sa(s){const e=E.c(7),{className:t,children:n}=s;let l;e[0]!==t?(l=G("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",t),e[0]=t,e[1]=l):l=e[1];let i;e[2]!==n?(i=a.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:a.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:n})}),e[2]=n,e[3]=i):i=e[3];let u;return e[4]!==l||e[5]!==i?(u=a.jsx("div",{className:l,children:i}),e[4]=l,e[5]=i,e[6]=u):u=e[6],u}function ka(s){const e=E.c(32),{message:t,turnStartedAt:n,status:l,className:i,isLast:u}=s,c=u===void 0?!1:u,o=U(),{isRunInProgress:r}=ve()??{},m=r===void 0?!1:r,d=Ne()?.taskId??null,f=l==="streaming",g=f||l==="submitted";let h;e[0]!==n?(h=Ke(n),e[0]=n,e[1]=h):h=e[1];const x=h;let v;e[2]!==g?(v=()=>g?Date.now():null,e[2]=g,e[3]=v):v=e[3];const[b,k]=R.useState(v),[j,_]=R.useState(g);j!==g&&(_(g),k(()=>g?Date.now():null));const y=x??b,{reasoningGroups:S,renderOrder:N,dataParts:w}=ga(t),C=t!==null&&N.length>0,M=t&&t.parts.length>0?t.parts[t.parts.length-1]:null,A=f&&M?.type==="reasoning";let L;if(e[4]!==t){const D=t?.metadata?.reasoning_start_at?new Date(t.metadata.reasoning_start_at):null,F=t?.metadata?.reasoning_end_at?new Date(t.metadata.reasoning_end_at):new Date;L=D!==null?F.getTime()-D.getTime():null,e[4]=t,e[5]=L}else L=e[5];const I=L;let T;e[6]!==c||e[7]!==t?(T=!c||!t||!t.parts.some(wa),e[6]=c,e[7]=t,e[8]=T):T=e[8];const $=T;let P;e[9]!==C||e[10]!==g||e[11]!==$||e[12]!==t||e[13]!==N?(P=!g&&C&&$&&(()=>{let D=0;for(const F of N)if(F.kind==="part"){const W=t.parts[F.index]?.type;(W==="dynamic-tool"||W?.startsWith("tool-"))&&D++}return D>=xa})(),e[9]=C,e[10]=g,e[11]=$,e[12]=t,e[13]=N,e[14]=P):P=e[14];const q=P;let B;if(e[15]!==i||e[16]!==w||e[17]!==C||e[18]!==c||e[19]!==g||e[20]!==A||e[21]!==m||e[22]!==$||e[23]!==t||e[24]!==S||e[25]!==N||e[26]!==q||e[27]!==y||e[28]!==o||e[29]!==d||e[30]!==I){const{collapsed:D,tail:F}=q?ha(N,t.parts):{collapsed:[],tail:N};B=a.jsx(Sa,{className:i,children:C?a.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[t.metadata?.resumedFromBackground&&a.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground/60 select-none",children:[a.jsx(mt,{className:"size-3 shrink-0"}),a.jsx("span",{children:o("chat.assistant.resumedBackgroundTask")})]}),D.length>0&&a.jsx(ja,{items:D,message:t,reasoningGroups:S,isReasoningActive:A,totalDuration:I,dataParts:w,isLoading:g,isLast:c}),F.map((W,J)=>{const X=D.length+J,te=F.findLastIndex(_a)===J;return Zt({item:W,renderIndex:X,message:t,reasoningGroups:S,isReasoningActive:A,totalDuration:I,dataParts:w,isLoading:g,isLast:c,isLastVisiblePart:te,renderOrder:N})}),d&&a.jsx(fa,{threadId:d,message:t}),c&&g&&y!==null&&a.jsx(Cn,{startedAt:y}),c&&!g&&d&&a.jsxs(a.Fragment,{children:[a.jsx(aa,{}),$&&a.jsx(ta,{})]}),!g&&a.jsx(zt,{message:t})]}):g?a.jsx(In,{startedAt:y}):a.jsx(Na,{isRunInProgress:c&&m})}),e[15]=i,e[16]=w,e[17]=C,e[18]=c,e[19]=g,e[20]=A,e[21]=m,e[22]=$,e[23]=t,e[24]=S,e[25]=N,e[26]=q,e[27]=y,e[28]=o,e[29]=d,e[30]=I,e[31]=B}else B=e[31];return B}function _a(s){return s.kind==="part"}function wa(s){const e=s.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const t=s.state;return t==="input-streaming"||t==="input-available"||t==="approval-requested"}function Ca(s){const e=E.c(25),{event:t}=s,n=U(),[l,i]=R.useState(!1);let u;e[0]!==t.data?(u=JSON.stringify(t.data,null,2),e[0]=t.data,e[1]=u):u=e[1];const c=u;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>i(Ta),e[2]=o):o=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(vs,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=r):r=e[3];let m;e[4]!==n?(m=n("chat.triggerEventPart.triggeredByEvent"),e[4]=n,e[5]=m):m=e[5];let d;e[6]!==m?(d=a.jsx("span",{className:"font-medium",children:m}),e[6]=m,e[7]=d):d=e[7];let f;e[8]!==t.type?(f=a.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:t.type}),e[8]=t.type,e[9]=f):f=e[9];const p=l&&"rotate-180";let g;e[10]!==p?(g=G("ml-auto size-4 shrink-0 text-muted-foreground transition-transform",p),e[10]=p,e[11]=g):g=e[11];let h;e[12]!==g?(h=a.jsx(xn,{className:g}),e[12]=g,e[13]=h):h=e[13];let x;e[14]!==d||e[15]!==f||e[16]!==h?(x=a.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer",children:[r,d,f,h]}),e[14]=d,e[15]=f,e[16]=h,e[17]=x):x=e[17];let v;e[18]!==t.source||e[19]!==l||e[20]!==c?(v=l&&a.jsxs("div",{className:"border-t border-border/60 px-3 py-2",children:[a.jsx("div",{className:"mb-2 text-xs text-muted-foreground",children:t.source}),a.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words text-xs text-foreground",children:c})]}),e[18]=t.source,e[19]=l,e[20]=c,e[21]=v):v=e[21];let b;return e[22]!==x||e[23]!==v?(b=a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background overflow-hidden text-left",children:[x,v]}),e[22]=x,e[23]=v,e[24]=b):b=e[24],b}function Ta(s){return!s}const Ia=[cn.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),on,rn];function $a(s){const e=E.c(5),{tiptapDoc:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=n):n=e[0];let l;e[1]!==t?(l={extensions:Ia,content:t,editable:!1,editorProps:n},e[1]=t,e[2]=l):l=e[2];const i=an(l);if(!i)return null;let u;return e[3]!==i?(u=a.jsx(un,{editor:i,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=i,e[4]=u):u=e[4],u}function Aa(s){const e=E.c(38),{message:t,className:n,onScrollToPair:l}=s,{id:i,parts:u,metadata:c}=t,[o,r]=R.useState(!1),[m,d]=R.useState(!1),f=R.useRef(!1);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=T=>{T&&!f.current&&(f.current=!0,d(T.scrollHeight>T.clientHeight))},e[0]=p):p=e[0];const g=p;if(!u||u.length===0)return null;let h;e[1]!==l?(h=()=>{r(!0),l?.()},e[1]=l,e[2]=h):h=e[2];const x=h,v=c?.tiptapDoc;let b;e[3]!==n?(b=G("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",n),e[3]=n,e[4]=b):b=e[4];let k,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>r(!0),j=()=>r(!1),e[5]=k,e[6]=j):(k=e[5],j=e[6]);let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=_):_=e[7];let y;e[8]!==o||e[9]!==m?(y=G("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",o?"max-h-[50vh] overflow-auto opacity-100":G("max-h-[84px] overflow-hidden opacity-99",m&&"mask-b-from-1%")),e[8]=o,e[9]=m,e[10]=y):y=e[10];let S;if(e[11]!==i||e[12]!==u){let T;e[14]!==i?(T=($,P)=>$.type==="data-trigger-event"?a.jsx(Ca,{event:$.data},`${i}-${P}`):null,e[14]=i,e[15]=T):T=e[15],S=u.map(T),e[11]=i,e[12]=u,e[13]=S}else S=e[13];let N;e[16]!==v||e[17]!==i||e[18]!==c||e[19]!==u?(N=v?a.jsx($a,{tiptapDoc:c.tiptapDoc}):u.map((T,$)=>T.type==="text"?u[$-1]?.type==="data-trigger-event"?null:a.jsx($e,{id:i,part:T},`${i}-${$}`):null),e[16]=v,e[17]=i,e[18]=c,e[19]=u,e[20]=N):N=e[20];let w;e[21]!==S||e[22]!==N?(w=a.jsxs("div",{className:"flex flex-col gap-2",children:[S,N]}),e[21]=S,e[22]=N,e[23]=w):w=e[23];let C;e[24]!==w||e[25]!==y?(C=a.jsx("div",{ref:g,className:y,children:w}),e[24]=w,e[25]=y,e[26]=C):C=e[26];let M;e[27]!==x||e[28]!==C?(M=a.jsxs("div",{tabIndex:0,onClick:x,onFocus:k,onBlur:j,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[_,C]}),e[27]=x,e[28]=C,e[29]=M):M=e[29];let A;e[30]!==t?(A=a.jsx(zt,{message:t,className:"mt-1 mr-1 self-end"}),e[30]=t,e[31]=A):A=e[31];let L;e[32]!==M||e[33]!==A?(L=a.jsxs("div",{className:"w-full min-w-0 flex flex-col",children:[M,A]}),e[32]=M,e[33]=A,e[34]=L):L=e[34];let I;return e[35]!==L||e[36]!==b?(I=a.jsx(a.Fragment,{children:a.jsx("div",{className:b,children:L})}),e[35]=L,e[36]=b,e[37]=I):I=e[37],I}function Co(s){const e=[],t=s.filter(n=>n.role!=="system"&&!n.metadata?.internal&&!n.metadata?.subtaskJobId);for(let n=0;n<t.length;n++){const l=t[n];if(l)if(l.role==="user"){const i=t[n+1];i&&i.role==="assistant"?(e.push({user:l,assistant:i}),n++):e.push({user:l,assistant:null})}else l.role==="assistant"&&e.push({user:null,assistant:l})}return e}function To(s){const e=E.c(19),{pair:t,isLastPair:n,status:l}=s,i=R.useRef(null),u=R.useRef(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{i.current&&i.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=c):c=e[0];const o=c;let r;e[1]!==n||e[2]!==t.assistant?.metadata?.resumedFromBackground||e[3]!==l?(r=v=>{if(i.current=v,!n||!v||u.current||(u.current=!0,t.assistant?.metadata?.resumedFromBackground))return;if(l==="submitted"||l==="streaming"){v.scrollIntoView({behavior:"smooth",block:"start"});return}const b=v.closest("[data-chat-scroller]");b?b.scrollTop=b.scrollHeight:v.scrollIntoView({behavior:"instant",block:"start"})},e[1]=n,e[2]=t.assistant?.metadata?.resumedFromBackground,e[3]=l,e[4]=r):r=e[4];const m=r,d=!t.user&&"pt-8 sm:pt-6";let f;e[5]!==d?(f=G("flex flex-col pb-2 sm:pb-2",d),e[5]=d,e[6]=f):f=e[6];let p;e[7]!==t.user?(p=t.user&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),a.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:a.jsx(Aa,{message:t.user,onScrollToPair:o})})]}),e[7]=t.user,e[8]=p):p=e[8];const g=t.user?.created_at??null;let h;e[9]!==n||e[10]!==t.assistant||e[11]!==l||e[12]!==g?(h=a.jsx(ka,{message:t.assistant,turnStartedAt:g,status:l,isLast:n}),e[9]=n,e[10]=t.assistant,e[11]=l,e[12]=g,e[13]=h):h=e[13];let x;return e[14]!==m||e[15]!==f||e[16]!==p||e[17]!==h?(x=a.jsxs("div",{ref:m,className:f,children:[p,h]}),e[14]=m,e[15]=f,e[16]=p,e[17]=h,e[18]=x):x=e[18],x}export{Nn as G,To as M,ia as O,wo as S,vn as a,Pn as f,Co as u};
@@ -1 +1 @@
1
- import{c as f,a0 as _,a6 as y,K as P,m as b,l as A,j as d}from"./index-KNPlu-mw.js";import{u as x}from"./use-entitlements-16736vo7.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:a}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(a.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:c}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return c},e[2]=r,e[3]=s):s=e[3];let a;return e[4]!==o||e[5]!==n||e[6]!==s?(a={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=a):a=e[7],b(a)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,a,c;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",a="true",c=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=a,t[5]=c}else n=t[2],s=t[3],a=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":a,className:c,children:l}),t[8]=s,t[9]=a,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
1
+ import{c as f,a0 as _,a6 as y,K as P,m as b,l as A,j as d}from"./index-J-HhaIRe.js";import{u as x}from"./use-entitlements-z0zlslXa.js";function C(){const e=f.c(6),t=y(),r=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:a}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(a.map(v))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==r||e[4]!==n?(s={queryKey:o,enabled:r,staleTime:6e5,queryFn:n},e[3]=r,e[4]=n,e[5]=s):s=e[5],b(s)}function v(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function I(e,t){if(t!=="free")return e?.[t];const r=e&&Object.values(e)[0];return r?{amountCents:0,currency:r.currency,interval:r.interval}:void 0}function S(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const T=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function j(e,t){if(!e)return null;const r=e.findIndex(n=>n.features[t]===!0),o=r>=0?e[r]:void 0;return o?{plan:o,index:r}:null}function R(){const e=f.c(8),{org:t}=_(),r=y(),o=x();let n;e[0]!==t.id?(n=P.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==r?(s=async()=>{const{plans:c}=await r.call("AI_PLAN_LIST",{providerId:"deco"});return c},e[2]=r,e[3]=s):s=e[3];let a;return e[4]!==o||e[5]!==n||e[6]!==s?(a={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=a):a=e[7],b(a)}const u=[{symbol:"free",color:"text-chart-2"},{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],E=u[u.length-1];function F(e){return h(e).color}function h(e){return u[Math.min(e,u.length-1)]??E}function O(e){const t=f.c(13),{index:r,className:o}=e;let n,s,a,c;if(t[0]!==o||t[1]!==r){const{symbol:g,color:p}=h(r);n=g,s="0 0 16 16",a="true",c=A("size-8 shrink-0",p,o),t[0]=o,t[1]=r,t[2]=n,t[3]=s,t[4]=a,t[5]=c}else n=t[2],s=t[3],a=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":a,className:c,children:l}),t[8]=s,t[9]=a,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{T as F,O as P,C as a,F as b,I as c,S as f,j as p,R as u};
@@ -1 +1 @@
1
- import{r as i,bo as A,j as a,bq as O,br as P,bs as _,bw as z,bx as H,bp as L,bz as j,dk as w,bu as G,bH as K,bB as q,bD as B,bI as J,bC as U,bE as V,bF as W,bJ as Z,bK as Q,c as C,l as X}from"./index-KNPlu-mw.js";var m="Popover",[E]=K(m,[j]),g=j(),[Y,d]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=z({prop:r,defaultProp:n??!1,onChange:s,caller:m});return a.jsx(H,{...p,children:a.jsx(Y,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(R=>!R),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=g(o),c=A(e,n.triggerRef),p=a.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(b,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(w,{present:o||s.open,children:a.jsx(G,{asChild:!0,container:n,children:r})})})};M.displayName=b;var v="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(w,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});k.displayName=v;var te=J("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return q(c)},[]),a.jsx(B,{as:te,allowPinchZoom:!0,children:a.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),R=g(o);return U(),a.jsx(V,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(W,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(Z,{"data-state":$(f.open),role:"dialog",id:f.contentId,...R,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(T,o);return a.jsx(O.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=k;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
1
+ import{r as i,bo as A,j as a,bq as O,br as P,bs as _,bw as z,bx as H,bp as L,bz as j,dk as w,bu as G,bH as K,bB as q,bD as B,bI as J,bC as U,bE as V,bF as W,bJ as Z,bK as Q,c as C,l as X}from"./index-J-HhaIRe.js";var m="Popover",[E]=K(m,[j]),g=j(),[Y,d]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=z({prop:r,defaultProp:n??!1,onChange:s,caller:m});return a.jsx(H,{...p,children:a.jsx(Y,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(R=>!R),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:c,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:c,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(c(),()=>p()),[c,p]),a.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=g(o),c=A(e,n.triggerRef),p=a.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:c,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:a.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(b,e);return a.jsx(ee,{scope:e,forceMount:o,children:a.jsx(w,{present:o||s.open,children:a.jsx(G,{asChild:!0,container:n,children:r})})})};M.displayName=b;var v="PopoverContent",k=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return a.jsx(w,{present:r||s.open,children:s.modal?a.jsx(re,{...n,ref:e}):a.jsx(ne,{...n,ref:e})})});k.displayName=v;var te=J("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const c=r.current;if(c)return q(c)},[]),a.jsx(B,{as:te,allowPinchZoom:!0,children:a.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,c=>{c.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,c=>{const p=c.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return a.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),R=g(o);return U(),a.jsx(V,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsx(W,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(Z,{"data-state":$(f.open),role:"dialog",id:f.contentId,...R,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(T,o);return a.jsx(O.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return a.jsx(Q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=k;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const c=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==c||e[8]!==r||e[9]!==p||e[10]!==l?(u=a.jsx(ue,{children:a.jsx(de,{"data-slot":"popover-content",align:c,sideOffset:p,translate:"no",className:l,...r})}),e[7]=c,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=a.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
@@ -1 +1 @@
1
- import{c as mt,b as ct,r as ft,x as wt,l as Z,j as e,B as at,an as Tt}from"./index-KNPlu-mw.js";import{i as zt}from"./AlertCircle-DiFFwnXn.js";import{N as At,o as Et}from"./agent-icon-D7_DgLeg.js";import{s as Pt}from"./Plus-CVN0z8nz.js";import{b as _t,A as Mt,a as It}from"./alert-DH9D3aPG.js";import{S as Lt}from"./scroll-area-CdvrDMMb.js";import{c as Ut,y as Ot,k as $t,t as Ht,v as Rt,z as Bt,q as ht,x as bt,A as Ft,B as qt}from"./agent-site-editor-content-DUUKv9bZ.js";import"./Tool01-BPkGCn0Q.js";import"./ArrowUp-BlMnl5Fe.js";import"./ArrowLeft-DBsIg0tM.js";import"./Tool02-BLTB0Mu5.js";import"./ArrowRight-DAyoDk3L.js";import"./TrendUp01-C79-zHMj.js";import"./ZoomOut-BRgBObyK.js";import"./Globe04-BmvhB0Gt.js";import"./CheckCircle-CeKBIghf.js";import"./ChevronUp-CgAKIOEA.js";import"./UserSquare-KXseyaU2.js";import"./Copy01-DH-b-DEp.js";import"./CreditCard01-DOq4VYVm.js";import"./DotsVertical-lJDK2pti.js";import"./Download01-Do3BZNKR.js";import"./Settings02-DZlGO72q.js";import"./Eye-A3tl5Wzy.js";import"./Share07-AYmj_4-u.js";import"./Globe01-DtK2maUY.js";import"./XClose-B-rnNFcm.js";import"./Image01-mLa5V9Ru.js";import"./Key01-xkO9bwBT.js";import"./LayoutLeft-C8RwYoPV.js";import"./Link01-DJpHg526.js";import"./LinkExternal01-D92xZRHr.js";import"./Monitor01-h5IvVPhq.js";import"./Sun-ESwNzqLw.js";import"./Package-tkZ6dx50.js";import"./Palette-CTqPeiU2.js";import"./Play-DHVeBlQM.js";import"./SearchLg-DGWpAE2t.js";import"./SearchMd-yDG5dnrV.js";import"./Stars01-42gximKe.js";import"./Trash01-ByQC7g6l.js";import"./Upload01-Bor4hbpq.js";import"./User01-D7HcCt9Q.js";import"./Users01-DtJ1EO6i.js";import"./XCircle-BrT4uSvp.js";import"./X-FTMZhNl_.js";import"./Zap-DigiqRTQ.js";import"./select-DyXGk9B4.js";import"./index-DUYXZx_q.js";import"./agent-view-guard-BRybrHV3.js";import"./use-main-panel-tabs-D3DK53Jg.js";import"./use-route-default-main-61CcsYHa.js";import"./use-connection-Z5_xgR0n.js";import"./use-mcp-client-D8sgAyd7.js";import"./auth-DmDOm64q.js";import"./use-mcp-tools-LnuBfZxX.js";import"./use-virtual-mcp-DbDHdgfs.js";import"./types-OwCEy2wn.js";import"./utils-CVEq3hMx.js";import"./use-project-scope-Bqrah9gL.js";import"./github-repo-BknN0SVI.js";import"./index-CWaAUsIH.js";import"./chat-context-CDAlulfA.js";import"./use-panel-navigate-BhNw8w3-.js";import"./thread-route-DVEbK22y.js";import"./autosend-BF2ntRTS.js";import"./thread-intent-C0i7ITMJ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-CGvBDr23.js";import"./backoff-8mStPHYB.js";import"./task-board-BJKHiKMb.js";import"./schema-BYcOOzAH.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-16736vo7.js";import"./use-ai-providers-CkZuKbv6.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-B2WyR_4j.js";import"./use-organization-settings-d11qialw.js";import"./gateway-client-D1O6ejnK.js";import"./tooltip-6YWTYe8Z.js";import"./dialog-BGeIGaOQ.js";import"./drawer-CW_I7YDU.js";import"./collection-search-Cf3xxp2D.js";import"./use-mobile-CJNxNPMt.js";import"./use-mcp-prompts-qJI6NP5I.js";import"./index-oypwdcf2.js";import"./form-BRcoMCQk.js";import"./label-BNPzApUK.js";import"./input-G3Dl_oju.js";import"./org-file-open-context-utbnY1tD.js";import"./input-DOrXBQ2N.js";import"./shell-layout-b9tZGlO9.js";import"./avatar-DIbfdIaJ.js";import"./download-app-dialog-tB-sFfox.js";import"./command-D92Vc8wZ.js";import"./index-26qOHGKB.js";import"./integration-icon-BJ-L2RLP.js";import"./project-icon-ble1qRVZ.js";import"./required-auth-layout-tnG7yvfo.js";import"./use-org-sso-aX2n03MK.js";import"./chat-draft-ox07yWju.js";import"./use-session-runtime-CF7nbb0R.js";import"./usage-stats-BQjc_u1o.js";import"./use-copy-Du2OqzJD.js";import"./markdown-C8T5ITiF.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-AYKphigN.js";import"./use-deco-credits-bCsf8wb-.js";import"./toggle-group-D03c7W4C.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-oyN5rwDH.js";import"./decopilot-CcmhDMq8.js";import"./checkbox-CCyUpxZx.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-dCy-7dpE.js";import"./index-BlwlTJtx.js";import"./input-DjkopZxD.js";import"./hooks-4Ot6kWFv.js";import"./use-org-fs-DNivrKYm.js";import"./question-004-sINsf4GQ.js";import"./use-members-DMybc-jf.js";import"./use-org-auth-client-BgCrq60T.js";import"./feature-paywall-CMPQ2H8B.js";import"./plan-ladder-SJELPXMo.js";import"./add-connection-dialog-BdllWDSk.js";import"./extract-connection-data-BrGvh19v.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DINB-U7F.js";import"./connection-card-B1l82vpD.js";import"./use-registry-connections-DJjqdm_N.js";import"./useInfiniteQuery-CvudKG90.js";import"./infiniteQueryObserver-BZK90Cxs.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BSGNz7Jp.js";import"./connection-form-helpers-iyzO-C-U.js";import"./authenticate-and-persist-oauth-6-SdIk-G.js";import"./mcp-oauth-Dwgx5guo.js";import"./collection-tabs-CKge2GXF.js";import"./badge-BuhJVk0d.js";import"./use-infinite-scroll-BBN20wyF.js";import"./useSuspenseInfiniteQuery-gwkPIfeQ.js";import"./pair-BtIrWjTl.js";import"./collapsible-CS4VRXD_.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CMzraocc.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CY7dL-f7.js";import"./use-navigate-to-agent-Btd4glDa.js";import"./use-thread-outputs-Bud7gKP9.js";import"./file-type-icon-B1y9alSP.js";import"./sandbox-lifecycle-context-CTwoR9w6.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-metadata-DgSd05Xp.js";import"./use-project-native-view-presence-BIllRCZd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-jr-AKsZr.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-xuV5EK37.js";import"./feature-gate-C98Y_ieW.js";import"./alert-dialog-6ugQOVnp.js";import"./runnable-block-editor-Bx0_mYjr.js";import"./decofile-api-CjA5VsH3.js";import"./utils-Bs6K3de2.js";import"./claim-phase-copy-0btUuJoC.js";import"./safe-image-url-D5z803Ot.js";import"./monaco-editor-Ccpjx5-K.js";import"./editor-DG3GAwjz.js";import"./calendar-Bz-pgKJK.js";import"./rich-text-link-control-DktDEZvw.js";import"./switch-Cj3JbezF.js";import"./search-input-C9yfeCwz.js";import"./use-debounced-value-Jwy4Op50.js";import"./asset-utils-BoKJ5PK8.js";import"./sandbox-git-api-CMdpE2TE.js";import"./mustache-BuJC9i7P.js";import"./empty-state-CC1gKASp.js";import"./github-icon-C3pcNerU.js";import"./repository-import-picker-oikqMepd.js";import"./repository-picker-BbQ9GWzI.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Kt(f){const t=mt.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(zt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==a?(c=s(a),t[1]=s,t[2]=a,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let m;t[11]!==o?(m=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:qt}),t[11]=o,t[12]=m):m=t[12];let n;return t[13]!==i||t[14]!==r||t[15]!==m?(n=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[i,r,m]})]})}),t[13]=i,t[14]=r,t[15]=m,t[16]=n):n=t[16],n}function hi(f){const t=mt.c(94),{decofile:x,support:s,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let m;t[0]!==s?(m=Ut(s),t[0]=s,t[1]=m):m=t[1];const n=m,[g,y]=ft.useState(null),[C]=wt(),[h,w]=ft.useState(Vt),b=C.language;let D;t[2]!==h||t[3]!==b?(D=new Intl.DateTimeFormat(b,{month:"long",year:"numeric"}).format(h),t[2]=h,t[3]=b,t[4]=D):D=t[4];const u=D;let j,N,T,z,k,A,E,P,_,M,S;if(t[5]!==n||t[6]!==h||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==b||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(b,{weekday:"short"}),Nt=new Intl.DateTimeFormat(b,{dateStyle:"long"}),{byDay:Ct,undated:nt}=Ot($t(x)),dt=Ht(h),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(ht(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(Wt),t[39]=it):it=t[39];let q;t[40]!==r?(q=r("sandbox.postCalendar.next"),t[40]=r,t[41]=q):q=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Tt,{size:16}),t[42]=st):st=t[42];let K;t[43]!==q?(K=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":q,children:st}),t[43]=q,t[44]=K):K=t[44];let W;t[45]!==u?(W=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=W):W=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==K||t[61]!==W||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,K,W,X]}),t[58]=R,t[59]=F,t[60]=K,t[61]=W,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!n&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],N=!n,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===h.getMonth(),St=Ct.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),n&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Nt.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:n&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),A="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",E=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:nt.length})}),P=nt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(At,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):nt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=n,t[6]=h,t[7]=x,t[8]=g,t[9]=d,t[10]=b,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=N,t[19]=T,t[20]=z,t[21]=k,t[22]=A,t[23]=E,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],N=t[18],T=t[19],z=t[20],k=t[21],A=t[22],E=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==A||t[71]!==E||t[72]!==P?(I=e.jsxs("div",{className:A,children:[E,P]}),t[70]=A,t[71]=E,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==N||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:N,children:L}),t[78]=j,t[79]=N,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==n||t[84]!==s?(O=!n&&e.jsx(Kt,{support:s}),t[83]=n,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function Wt(f){return bt(f,1)}function Gt(f){return bt(f,-1)}function Vt(){return ht(new Date)}function xt(f){const t=mt.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==s||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,s]}),t[4]=s,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=mt.c(23),{entry:x,active:s,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let m;t[0]!==c||t[1]!==r?(m=c(r),t[0]=c,t[1]=r,t[2]=m):m=t[2];const n=m;let g;t[3]!==a||t[4]!==i.key?(g=N=>{N.dataTransfer.setData("text/plain",i.key),N.dataTransfer.effectAllowed="move",a(i.key)},t[3]=a,t[4]=i.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let C;t[8]!==l||t[9]!==i.key?(C=()=>l(i.key),t[8]=l,t[9]=i.key,t[10]=C):C=t[10];const h=`${i.title} · ${n}`,w=d?jt:yt,b=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==b||t[13]!==D?(u=Z("w-full truncate classic:rounded-md compact:rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",w,b,D),t[11]=w,t[12]=b,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==C||t[21]!==h?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:C,title:h,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=y,t[20]=C,t[21]=h,t[22]=j):j=t[22],j}export{hi as PostCalendar};
1
+ import{c as mt,b as ct,r as ft,x as wt,l as Z,j as e,B as at,an as Tt}from"./index-J-HhaIRe.js";import{i as zt}from"./AlertCircle-CGFLJpTs.js";import{N as At,o as Et}from"./agent-icon-D496OkeL.js";import{s as Pt}from"./Plus-D3XzoCF3.js";import{b as _t,A as Mt,a as It}from"./alert-CIymKwzl.js";import{S as Lt}from"./scroll-area-D72_bYX-.js";import{c as Ut,y as Ot,k as $t,t as Ht,v as Rt,z as Bt,q as ht,x as bt,A as Ft,B as qt}from"./agent-site-editor-content-BlnYGJNq.js";import"./Tool01-CE_c59RR.js";import"./ArrowUp-C1pJvrX2.js";import"./ArrowLeft-DC5XoBuA.js";import"./Tool02-Bo-RIY8d.js";import"./ArrowRight-BOJ1d9xj.js";import"./TrendUp01-B5hqDidz.js";import"./ZoomOut-CDTxnLh4.js";import"./Globe04-Cx7GY3vn.js";import"./CheckCircle-Bw2G2vwj.js";import"./ChevronUp-DSgAhhLJ.js";import"./UserSquare-CEWYtKNG.js";import"./Copy01-BaJ5hTZ2.js";import"./CreditCard01-DLxXT7_f.js";import"./DotsVertical-Cz_1rDcG.js";import"./Download01-CGyaU6cf.js";import"./Settings02-BqG3HPm0.js";import"./Eye-DXecVoiS.js";import"./Share07-o5jM3q0c.js";import"./Globe01-BWcV-98b.js";import"./XClose-wzn6XIaq.js";import"./Image01-B5ab_A88.js";import"./Key01-D0TscG0E.js";import"./LayoutLeft-d27AQAwl.js";import"./Link01-Dx7hRSe5.js";import"./LinkExternal01-BfutJB7X.js";import"./Monitor01-Dentn30o.js";import"./Sun-DGhoQy96.js";import"./Package-CPNFyhMT.js";import"./Palette-DbXyfbJI.js";import"./Play-CU4Q1GTp.js";import"./SearchLg-BYoLM1MK.js";import"./SearchMd-DWKZ-mHQ.js";import"./Stars01-BZHqW_f9.js";import"./Trash01-CRCUnlT2.js";import"./Upload01-Bl2MpUhj.js";import"./User01-3GLc_M8a.js";import"./Users01-DZ2aEDSy.js";import"./XCircle-CLEbTtoV.js";import"./X-BGniQsFS.js";import"./Zap-BHpOc94D.js";import"./select-zKx4kd1b.js";import"./index-DB2dtavd.js";import"./agent-view-guard-B6fFe17X.js";import"./use-main-panel-tabs-OW5hqyvj.js";import"./use-route-default-main-CPQ4AmO4.js";import"./use-connection-BVWLSIgG.js";import"./use-mcp-client-mvmVY_Sq.js";import"./auth-3KEna5Qg.js";import"./use-mcp-tools-C7FpW5Rr.js";import"./use-virtual-mcp-TYMfCW-P.js";import"./types-DBvOp03a.js";import"./utils-CVEq3hMx.js";import"./use-project-scope-Dd3XRNTj.js";import"./github-repo-BknN0SVI.js";import"./index-DKa2AY2P.js";import"./chat-context-C7f3MLVZ.js";import"./use-panel-navigate-CXz4fRn5.js";import"./thread-route-BJtUmhwW.js";import"./autosend-CgAy_8nv.js";import"./thread-intent-DeoW4DlO.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DgdsVzEA.js";import"./backoff-8mStPHYB.js";import"./task-board-BRDQJ0Y_.js";import"./schema-BmTPXP0h.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-z0zlslXa.js";import"./use-ai-providers-C5aBXU5x.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Yer_uM_S.js";import"./use-organization-settings-C1FltOgT.js";import"./gateway-client-CrkEu4dZ.js";import"./tooltip-CvsJoQ2r.js";import"./dialog-DTxKdk6B.js";import"./drawer-CwqENKPq.js";import"./collection-search-CW48jNAm.js";import"./use-mobile-BtQeDX-z.js";import"./use-mcp-prompts-D4-Z04dj.js";import"./index-oMcUL3Yj.js";import"./form-Bw33z1SA.js";import"./label-CjHJo36P.js";import"./input-D5ksR5GW.js";import"./org-file-open-context-DLYT0cgI.js";import"./input-Dr3S5ak1.js";import"./shell-layout-Dj-jZ6jC.js";import"./avatar-PPm_nVJO.js";import"./download-app-dialog-B_OO5bFO.js";import"./command-Dp_xVMno.js";import"./index-9o3jDog2.js";import"./integration-icon-9SSN9Dl9.js";import"./project-icon-CrCdaVr_.js";import"./required-auth-layout-BKb9-6vC.js";import"./use-org-sso-Cb8Yn6yP.js";import"./chat-draft-BW5UOw44.js";import"./use-session-runtime-DQ_xnOm6.js";import"./usage-stats-zzlmS7nl.js";import"./use-copy-B-yVF-T4.js";import"./markdown-DN_WHoBa.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-DNRDoJPn.js";import"./use-deco-credits-CNT8sgKc.js";import"./toggle-group-2-AJ4PX8.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-BLr1QHHh.js";import"./decopilot-DOWkbqe-.js";import"./checkbox-Djw8YkXF.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CqiAzy6q.js";import"./index-b-HPQtaV.js";import"./input-BwB4jnj_.js";import"./hooks-BEXBCk9z.js";import"./use-org-fs-Cl4AAfEE.js";import"./question-004-sINsf4GQ.js";import"./use-members-CZXSXw_1.js";import"./use-org-auth-client-BznOfNJb.js";import"./feature-paywall-BD-lgh2_.js";import"./plan-ladder-CLfe96p7.js";import"./add-connection-dialog-Bb9g1-aL.js";import"./extract-connection-data-B_g-VP9A.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-B8n_iRDm.js";import"./connection-card-d6di2niE.js";import"./use-registry-connections-DtQgEcVS.js";import"./useInfiniteQuery-DUvEi5Ym.js";import"./infiniteQueryObserver-Bp62E0f5.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-IiEjpID3.js";import"./connection-form-helpers-D99GQOo-.js";import"./authenticate-and-persist-oauth-5OH4tqLf.js";import"./mcp-oauth-Cfvqr8fE.js";import"./collection-tabs-BxNdQr3v.js";import"./badge-CzCkyB-y.js";import"./use-infinite-scroll-Ch9lEd3E.js";import"./useSuspenseInfiniteQuery-CC7Cv3nZ.js";import"./pair-CU2rNVlM.js";import"./collapsible-CL_tV3Eh.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BDiTxwS7.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CCy35_-v.js";import"./use-navigate-to-agent-BiSNiCre.js";import"./use-thread-outputs-CVc4ZTLK.js";import"./file-type-icon-CdJziZKk.js";import"./sandbox-lifecycle-context-CmeEs8uW.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-metadata-D7elYoD_.js";import"./use-project-native-view-presence-3yl9GAt2.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-DpTBLkPU.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-oulMbZvO.js";import"./feature-gate-CUslF5vY.js";import"./alert-dialog-Bq7N6ZWF.js";import"./runnable-block-editor-xiAEogpy.js";import"./decofile-api-BirlTWkL.js";import"./utils-eMZKRHuP.js";import"./claim-phase-copy-0btUuJoC.js";import"./safe-image-url-D5z803Ot.js";import"./monaco-editor-BSp0HKdn.js";import"./editor-DpRJQ9mq.js";import"./calendar-Bs8TzhBE.js";import"./rich-text-link-control-N5yQ4FMB.js";import"./switch-BTJnoG_j.js";import"./search-input-DVbLXCEj.js";import"./use-debounced-value-RCOUyhbk.js";import"./asset-utils-ClvN_bIt.js";import"./sandbox-git-api-CMdpE2TE.js";import"./mustache-CVWbGRah.js";import"./empty-state-DekE7Ie6.js";import"./github-icon-CfXQNl0v.js";import"./repository-import-picker-C-n4lBHF.js";import"./repository-picker-CaYH5503.js";const jt="border-success/30 bg-success/10 text-success hover:bg-success/20",yt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Kt(f){const t=mt.c(17),{support:x}=f,s=ct(),o=x.kind==="unsupported-runtime";let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(zt,{}),t[0]=l):l=t[0];const a=o?"sandbox.postCalendar.unsupportedRuntimeTitle":"sandbox.postCalendar.outdatedAppsTitle";let c;t[1]!==s||t[2]!==a?(c=s(a),t[1]=s,t[2]=a,t[3]=c):c=t[3];let i;t[4]!==c?(i=e.jsx(_t,{children:c}),t[4]=c,t[5]=i):i=t[5];let d;t[6]!==o||t[7]!==s?(d=o?s("sandbox.postCalendar.unsupportedRuntimeDescription"):s("sandbox.postCalendar.outdatedAppsDescription",{required:Ft}),t[6]=o,t[7]=s,t[8]=d):d=t[8];let r;t[9]!==d?(r=e.jsx(Mt,{children:d}),t[9]=d,t[10]=r):r=t[10];let m;t[11]!==o?(m=!o&&e.jsx("code",{className:"mt-2 block rounded-md bg-muted px-2 py-1 font-mono text-xs text-foreground",children:qt}),t[11]=o,t[12]=m):m=t[12];let n;return t[13]!==i||t[14]!==r||t[15]!==m?(n=e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/30 p-6",children:e.jsxs(It,{variant:"warning",className:"max-w-md bg-background/95 shadow-lg backdrop-blur",children:[l,e.jsxs("div",{children:[i,r,m]})]})}),t[13]=i,t[14]=r,t[15]=m,t[16]=n):n=t[16],n}function hi(f){const t=mt.c(94),{decofile:x,support:s,selectedKey:o,onSelect:l,onCreate:a,onReschedule:c,isCreating:i}=f,d=i===void 0?!1:i,r=ct();let m;t[0]!==s?(m=Ut(s),t[0]=s,t[1]=m):m=t[1];const n=m,[g,y]=ft.useState(null),[C]=wt(),[h,w]=ft.useState(Vt),b=C.language;let D;t[2]!==h||t[3]!==b?(D=new Intl.DateTimeFormat(b,{month:"long",year:"numeric"}).format(h),t[2]=h,t[3]=b,t[4]=D):D=t[4];const u=D;let j,N,T,z,k,A,E,P,_,M,S;if(t[5]!==n||t[6]!==h||t[7]!==x||t[8]!==g||t[9]!==d||t[10]!==b||t[11]!==u||t[12]!==a||t[13]!==c||t[14]!==l||t[15]!==o||t[16]!==r){const vt=new Intl.DateTimeFormat(b,{weekday:"short"}),Nt=new Intl.DateTimeFormat(b,{dateStyle:"long"}),{byDay:Ct,undated:nt}=Ot($t(x)),dt=Ht(h),Dt=Rt(new Date);z="flex h-full w-full flex-col";let et;t[28]===Symbol.for("react.memo_cache_sentinel")?(et=()=>w(ht(new Date)),t[28]=et):et=t[28];let H;t[29]!==r?(H=r("sandbox.postCalendar.today"),t[29]=r,t[30]=H):H=t[30];let R;t[31]!==H?(R=e.jsx(at,{variant:"outline",size:"sm",onClick:et,children:H}),t[31]=H,t[32]=R):R=t[32];let rt;t[33]===Symbol.for("react.memo_cache_sentinel")?(rt=()=>w(Gt),t[33]=rt):rt=t[33];let B;t[34]!==r?(B=r("sandbox.postCalendar.previous"),t[34]=r,t[35]=B):B=t[35];let ot;t[36]===Symbol.for("react.memo_cache_sentinel")?(ot=e.jsx(Et,{size:16}),t[36]=ot):ot=t[36];let F;t[37]!==B?(F=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:rt,"aria-label":B,children:ot}),t[37]=B,t[38]=F):F=t[38];let it;t[39]===Symbol.for("react.memo_cache_sentinel")?(it=()=>w(Wt),t[39]=it):it=t[39];let q;t[40]!==r?(q=r("sandbox.postCalendar.next"),t[40]=r,t[41]=q):q=t[41];let st;t[42]===Symbol.for("react.memo_cache_sentinel")?(st=e.jsx(Tt,{size:16}),t[42]=st):st=t[42];let K;t[43]!==q?(K=e.jsx(at,{variant:"ghost",size:"icon",className:"size-8",onClick:it,"aria-label":q,children:st}),t[43]=q,t[44]=K):K=t[44];let W;t[45]!==u?(W=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:u}),t[45]=u,t[46]=W):W=t[46];let G;t[47]!==r?(G=r("sandbox.postCalendar.legendScheduled"),t[47]=r,t[48]=G):G=t[48];let V;t[49]!==G?(V=e.jsx(xt,{className:jt,label:G}),t[49]=G,t[50]=V):V=t[50];let J;t[51]!==r?(J=r("sandbox.postCalendar.legendUnscheduled"),t[51]=r,t[52]=J):J=t[52];let Q;t[53]!==J?(Q=e.jsx(xt,{className:yt,label:J}),t[53]=J,t[54]=Q):Q=t[54];let X;t[55]!==V||t[56]!==Q?(X=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[V,Q]}),t[55]=V,t[56]=Q,t[57]=X):X=t[57],t[58]!==R||t[59]!==F||t[60]!==K||t[61]!==W||t[62]!==X?(k=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[R,F,K,W,X]}),t[58]=R,t[59]=F,t[60]=K,t[61]=W,t[62]=X,t[63]=k):k=t[63],T="relative flex-1 min-h-0",j=Lt;const pt=!n&&"blur-[2px] select-none";t[64]!==pt?(S=Z("h-full",pt),t[64]=pt,t[65]=S):S=t[65],N=!n,_="flex min-w-[880px] gap-4 p-4";let Y;t[66]!==r?(Y=r("sandbox.postCalendar.unscheduledHint"),t[66]=r,t[67]=Y):Y=t[67];let lt;t[68]!==Y?(lt=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Y}),t[68]=Y,t[69]=lt):lt=t[69],M=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:dt[0]?.map(p=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:vt.format(p)},p.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:dt.flat().map(p=>{const kt=p.getMonth()===h.getMonth(),St=Ct.get(Bt(p))??[];return e.jsxs("div",{onDragOver:v=>{g&&(v.preventDefault(),v.dataTransfer.dropEffect="move")},onDrop:v=>{v.preventDefault();const ut=v.dataTransfer.getData("text/plain");y(null),ut&&c(ut,p)},className:Z("group/day min-h-28 space-y-1 p-2 transition-colors",kt?"bg-background":"bg-muted/40",g&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:Z("grid size-6 place-items-center rounded-full text-xs",p.getTime()===Dt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:p.getDate()}),n&&e.jsx(at,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:d,onClick:()=>a(p),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:Nt.format(p)}),children:e.jsx(Pt,{size:14})})]}),St.map(v=>e.jsx(gt,{entry:v,active:v.post.key===o,draggable:n&&v.scheduled,onSelect:l,onDragStateChange:y},v.post.key))]},p.getTime())})}),lt]}),A="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",E=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:nt.length})}),P=nt.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(At,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):nt.map(p=>e.jsx(gt,{entry:p,active:p.post.key===o,draggable:!1,onSelect:l,onDragStateChange:y},p.post.key)),t[5]=n,t[6]=h,t[7]=x,t[8]=g,t[9]=d,t[10]=b,t[11]=u,t[12]=a,t[13]=c,t[14]=l,t[15]=o,t[16]=r,t[17]=j,t[18]=N,t[19]=T,t[20]=z,t[21]=k,t[22]=A,t[23]=E,t[24]=P,t[25]=_,t[26]=M,t[27]=S}else j=t[17],N=t[18],T=t[19],z=t[20],k=t[21],A=t[22],E=t[23],P=t[24],_=t[25],M=t[26],S=t[27];let I;t[70]!==A||t[71]!==E||t[72]!==P?(I=e.jsxs("div",{className:A,children:[E,P]}),t[70]=A,t[71]=E,t[72]=P,t[73]=I):I=t[73];let L;t[74]!==I||t[75]!==_||t[76]!==M?(L=e.jsxs("div",{className:_,children:[M,I]}),t[74]=I,t[75]=_,t[76]=M,t[77]=L):L=t[77];let U;t[78]!==j||t[79]!==N||t[80]!==L||t[81]!==S?(U=e.jsx(j,{className:S,inert:N,children:L}),t[78]=j,t[79]=N,t[80]=L,t[81]=S,t[82]=U):U=t[82];let O;t[83]!==n||t[84]!==s?(O=!n&&e.jsx(Kt,{support:s}),t[83]=n,t[84]=s,t[85]=O):O=t[85];let $;t[86]!==T||t[87]!==U||t[88]!==O?($=e.jsxs("div",{className:T,children:[U,O]}),t[86]=T,t[87]=U,t[88]=O,t[89]=$):$=t[89];let tt;return t[90]!==z||t[91]!==k||t[92]!==$?(tt=e.jsxs("div",{className:z,children:[k,$]}),t[90]=z,t[91]=k,t[92]=$,t[93]=tt):tt=t[93],tt}function Wt(f){return bt(f,1)}function Gt(f){return bt(f,-1)}function Vt(){return ht(new Date)}function xt(f){const t=mt.c(7),{className:x,label:s}=f;let o;t[0]!==x?(o=Z("size-3 rounded-sm border",x),t[0]=x,t[1]=o):o=t[1];let l;t[2]!==o?(l=e.jsx("span",{className:o}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==s||t[5]!==l?(a=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,s]}),t[4]=s,t[5]=l,t[6]=a):a=t[6],a}function gt(f){const t=mt.c(23),{entry:x,active:s,draggable:o,onSelect:l,onDragStateChange:a}=f,c=ct(),{post:i,scheduled:d}=x,r=d?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let m;t[0]!==c||t[1]!==r?(m=c(r),t[0]=c,t[1]=r,t[2]=m):m=t[2];const n=m;let g;t[3]!==a||t[4]!==i.key?(g=N=>{N.dataTransfer.setData("text/plain",i.key),N.dataTransfer.effectAllowed="move",a(i.key)},t[3]=a,t[4]=i.key,t[5]=g):g=t[5];let y;t[6]!==a?(y=()=>a(null),t[6]=a,t[7]=y):y=t[7];let C;t[8]!==l||t[9]!==i.key?(C=()=>l(i.key),t[8]=l,t[9]=i.key,t[10]=C):C=t[10];const h=`${i.title} · ${n}`,w=d?jt:yt,b=o&&"cursor-grab active:cursor-grabbing",D=s&&"ring-2 ring-primary";let u;t[11]!==w||t[12]!==b||t[13]!==D?(u=Z("w-full truncate classic:rounded-md compact:rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",w,b,D),t[11]=w,t[12]=b,t[13]=D,t[14]=u):u=t[14];let j;return t[15]!==o||t[16]!==i.title||t[17]!==u||t[18]!==g||t[19]!==y||t[20]!==C||t[21]!==h?(j=e.jsx("button",{type:"button",draggable:o,onDragStart:g,onDragEnd:y,onClick:C,title:h,className:u,children:i.title}),t[15]=o,t[16]=i.title,t[17]=u,t[18]=g,t[19]=y,t[20]=C,t[21]=h,t[22]=j):j=t[22],j}export{hi as PostCalendar};