decocms 4.463.0 → 4.463.1

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 (360) hide show
  1. package/dist/client/assets/{AlertCircle-DWiDp-f1.js → AlertCircle-B5TmAHNM.js} +1 -1
  2. package/dist/client/assets/{AreaChart-wG4ny1PS.js → AreaChart-CVuOnHQX.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BMW9utAL.js → ArrowLeft-9GJFW4LS.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BuOxK3Pf.js → ArrowUp-Cib8ewx4.js} +1 -1
  5. package/dist/client/assets/{Building02-Dyi9ronc.js → Building02-CEVEDOME.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-vlTqQf6R.js → CartesianChart-BTuTtPIG.js} +1 -1
  7. package/dist/client/assets/{Check-CXicUAOa.js → Check-BvCNBJe8.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-YnBoZGaI.js → CheckCircle-DpemfJ5S.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DBFnJWSs.js → ChevronUp-BwSgHBqC.js} +1 -1
  10. package/dist/client/assets/{Copy01-Dr3v4gYp.js → Copy01-B3CEXdpv.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-C2A37qQR.js → CreditCard01-DFj0HUwR.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-OvfvRPcf.js → DotsVertical-CvByrwlw.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-CzSXgWcn.js → ErrorBarContext-nupiMjtH.js} +1 -1
  14. package/dist/client/assets/{Image01-nUj6_DO-.js → Image01-CPJAhPOP.js} +1 -1
  15. package/dist/client/assets/{Key01-HuTENYPy.js → Key01-D3KdqQRK.js} +1 -1
  16. package/dist/client/assets/{Line-C_bImwm0.js → Line-BPqpw5U0.js} +1 -1
  17. package/dist/client/assets/{Link01-cjx77r4E.js → Link01-VVuQkQsn.js} +1 -1
  18. package/dist/client/assets/{LinkBroken01-CaB2I9G0.js → LinkBroken01-CjBq0lbN.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-CSoQ_DGP.js → LinkExternal01-CLi_LJ2y.js} +1 -1
  20. package/dist/client/assets/{Monitor01-D19plyaf.js → Monitor01-DO03hBU2.js} +1 -1
  21. package/dist/client/assets/{Palette-DA_Dzon5.js → Palette-uTBuV6eG.js} +1 -1
  22. package/dist/client/assets/{Plus-CuK8nNcu.js → Plus-DLW5olp7.js} +1 -1
  23. package/dist/client/assets/{SearchMd-24zvxDRs.js → SearchMd-BNPYUXLP.js} +1 -1
  24. package/dist/client/assets/{Sector-C0T4f5Eo.js → Sector-Dx6NP_My.js} +1 -1
  25. package/dist/client/assets/{ShoppingBag01-DUKvQNmb.js → ShoppingBag01-b9-BhwDR.js} +1 -1
  26. package/dist/client/assets/{Sun-Dl2R87Eo.js → Sun-BF4Eks2R.js} +1 -1
  27. package/dist/client/assets/{Tool01-BrjR3c4R.js → Tool01-3oVxsToy.js} +1 -1
  28. package/dist/client/assets/{Trash01-CuaXxM5C.js → Trash01-D7ylqCya.js} +1 -1
  29. package/dist/client/assets/{Upload01-DrihoScl.js → Upload01-DNxaQbwq.js} +1 -1
  30. package/dist/client/assets/{User01-BDAGl75t.js → User01-Bsraudto.js} +1 -1
  31. package/dist/client/assets/{UserSquare-DdE8MrwD.js → UserSquare-DeLx8WzD.js} +1 -1
  32. package/dist/client/assets/{Users01-BjhYFiAu.js → Users01-iXRnCXY-.js} +1 -1
  33. package/dist/client/assets/{X-Dv9AnRlg.js → X-BQNprmBf.js} +1 -1
  34. package/dist/client/assets/{XAxis-DXXRhBFV.js → XAxis-h1--j8He.js} +1 -1
  35. package/dist/client/assets/{XClose-BCVhz-Kf.js → XClose-BpmmlEY3.js} +1 -1
  36. package/dist/client/assets/{ZoomOut-DGJt2ZOH.js → ZoomOut-C7AJpRh5.js} +1 -1
  37. package/dist/client/assets/{access-gate-E54qpcq4.js → access-gate-DtOf3EFS.js} +1 -1
  38. package/dist/client/assets/{add-connection-dialog-D8GNVhEw.js → add-connection-dialog-Cs7zmh4q.js} +1 -1
  39. package/dist/client/assets/{agent-analytics-CVJIJ1Qw.js → agent-analytics-_8EkEzff.js} +1 -1
  40. package/dist/client/assets/agent-app-yXeZxYeB.js +1 -0
  41. package/dist/client/assets/{agent-assets-Cfox23r3.js → agent-assets-KsfZNiX2.js} +1 -1
  42. package/dist/client/assets/{agent-automation-D9cSpEhM.js → agent-automation-BbzR1k2i.js} +1 -1
  43. package/dist/client/assets/{agent-automations-COtVvppU.js → agent-automations-BCo8Ch44.js} +1 -1
  44. package/dist/client/assets/{agent-connect-sources-BEMCbzGF.js → agent-connect-sources-C9x8XmMh.js} +1 -1
  45. package/dist/client/assets/agent-deck-B2pNzx_r.js +1 -0
  46. package/dist/client/assets/{agent-e2e-Wqxn9jg8.js → agent-e2e-XMCI0UQl.js} +1 -1
  47. package/dist/client/assets/{agent-experiments-BASXy9kl.js → agent-experiments-B6l4hX1w.js} +1 -1
  48. package/dist/client/assets/{agent-file-BOh5OW0h.js → agent-file-DH_lUKXM.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-BIJRB3GM.js → agent-hosting-B9W8d0kn.js} +1 -1
  50. package/dist/client/assets/{agent-icon-B_AZohhm.js → agent-icon-CbXn8VZK.js} +1 -1
  51. package/dist/client/assets/agent-library-ZfS11Ca2.js +1 -0
  52. package/dist/client/assets/agent-library-file-Dt5WQhqR.js +1 -0
  53. package/dist/client/assets/{agent-monitor-CJmv9IPY.js → agent-monitor-AbeIW_Ai.js} +1 -1
  54. package/dist/client/assets/{agent-overview-BEv7N4NA.js → agent-overview-CP7eXdGD.js} +1 -1
  55. package/dist/client/assets/agent-settings-Cksb01KL.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-BtM-oYes.js → agent-site-editor-CXjzupfF.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-yaxPYyX2.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-DIb9jcK9.js → agent-site-editor-content-DVxq2O4-.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-DjU9ncCA.js → agent-site-editor-preview-5OyybmdQ.js} +3 -3
  60. package/dist/client/assets/agent-view-DIIzNnG2.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-BwQRC7Wk.js → agent-view-guard-BELRPlW2.js} +1 -1
  62. package/dist/client/assets/{agents-list-UliOXq_N.js → agents-list-BFuTgO9u.js} +1 -1
  63. package/dist/client/assets/{ai-providers-D2IUVIa0.js → ai-providers-sAl5iN13.js} +1 -1
  64. package/dist/client/assets/{alert-DbQbBKPW.js → alert-Ckg4hU0z.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-DNPqbgpS.js → alert-dialog-BR8K4NXo.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-SJnL8lbj.js → analytics-sections-DF3Z3b79.js} +1 -1
  67. package/dist/client/assets/{api-keys-BoG6C1mH.js → api-keys-DNNJK348.js} +1 -1
  68. package/dist/client/assets/api-keys-Dfu07QXr.js +1 -0
  69. package/dist/client/assets/app-editor-DPt5aHSL.js +1 -0
  70. package/dist/client/assets/{asset-utils-BY1ew-Kc.js → asset-utils-B3OWlMwT.js} +1 -1
  71. package/dist/client/assets/{auth-DDpWnpgU.js → auth-cALcTtmh.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-BZKEkBRf.js → auth-catchall-RnxJnMWm.js} +1 -1
  73. package/dist/client/assets/{auth-entry-iEMBYP-8.js → auth-entry-RJjANTAz.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-BlHy1ceM.js → auth-split-layout-BzqlAJfR.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-BnkSFHoe.js → authenticate-and-persist-oauth-D4ybQZrl.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-BqrGkFet.js → automation-list-row-C8pHu8df.js} +1 -1
  77. package/dist/client/assets/{automation-runs-2GByVaGU.js → automation-runs-DbMMtDPh.js} +1 -1
  78. package/dist/client/assets/{automations-B6vr6PHF.js → automations-Bs5g1ha0.js} +1 -1
  79. package/dist/client/assets/{autosend-xivc0lOT.js → autosend-05UC4VjF.js} +1 -1
  80. package/dist/client/assets/{avatar-Ctu5Wczb.js → avatar-D8csOeeF.js} +1 -1
  81. package/dist/client/assets/{badge-BHUGKNWs.js → badge-Hx3u6P7O.js} +1 -1
  82. package/dist/client/assets/{block-document-CQvkKfRq.js → block-document-Ku1oysrM.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-CjmwOatj.js → blocks-preview-workspace-context-Ddh7SseB.js} +1 -1
  84. package/dist/client/assets/{blog-schema-Cjm5UW7b.js → blog-schema-DHwYJOyB.js} +1 -1
  85. package/dist/client/assets/{buckets-CckyUpV8.js → buckets-pKKwZjvN.js} +1 -1
  86. package/dist/client/assets/{build-improve-prompt-doc-mQFDIfqK.js → build-improve-prompt-doc-CnVRLk9u.js} +1 -1
  87. package/dist/client/assets/{calendar-C5AAXd6o.js → calendar-TwuiVpjf.js} +1 -1
  88. package/dist/client/assets/{capability-load-error-Dd-CbUlr.js → capability-load-error-BmxCCm5y.js} +1 -1
  89. package/dist/client/assets/{category-editor-Cn3peeDB.js → category-editor-BZw-XttL.js} +1 -1
  90. package/dist/client/assets/{chart-Cckr6Rhu.js → chart-YvkP6Rx2.js} +1 -1
  91. package/dist/client/assets/{chat-context-BOhnLSkM.js → chat-context-CikhzUxM.js} +1 -1
  92. package/dist/client/assets/{chat-draft-DGXb0HEl.js → chat-draft-DMMAinxT.js} +1 -1
  93. package/dist/client/assets/{checkbox-B6iJHz55.js → checkbox-Bo7NjQSg.js} +1 -1
  94. package/dist/client/assets/{choose-editor-CUuoO_B4.js → choose-editor-CrJY1sxE.js} +1 -1
  95. package/dist/client/assets/{claim-phase-copy-BPQnqmjZ.js → claim-phase-copy-DnP-cI_8.js} +1 -1
  96. package/dist/client/assets/{cli-auth-success-DMprEBtN.js → cli-auth-success-978JfJBE.js} +1 -1
  97. package/dist/client/assets/{client-icons-CitpbYhD.js → client-icons-ma8_2UIe.js} +1 -1
  98. package/dist/client/assets/{collapsible-BKVhHdmh.js → collapsible-DVB6AYNV.js} +1 -1
  99. package/dist/client/assets/{collection-detail-CkhetvNl.js → collection-detail-CSot03uC.js} +1 -1
  100. package/dist/client/assets/{collection-display-button-CkYwx2c-.js → collection-display-button-Bd647egA.js} +1 -1
  101. package/dist/client/assets/{collection-search-Ca5RdqHn.js → collection-search-D5sWxiI_.js} +1 -1
  102. package/dist/client/assets/{collection-table-wrapper-DVKvHA40.js → collection-table-wrapper-BTjhjNWL.js} +1 -1
  103. package/dist/client/assets/{collection-tabs-DvLdBj3Z.js → collection-tabs-C89tqghq.js} +1 -1
  104. package/dist/client/assets/{column-rules-BJsI1Zvq.js → column-rules-BMCfx_gP.js} +1 -1
  105. package/dist/client/assets/{combobox-PZk6KTm8.js → combobox-sNdZN9XI.js} +1 -1
  106. package/dist/client/assets/{command-__KQqh6Y.js → command-H0OtsxUs.js} +1 -1
  107. package/dist/client/assets/{companion-mcps-section-BmUUkMTw.js → companion-mcps-section-vQA3DOhf.js} +1 -1
  108. package/dist/client/assets/{config-BUhboKJz.js → config-maKPj7tB.js} +1 -1
  109. package/dist/client/assets/{connect-CLgSvuZK.js → connect-BRZ2U-RU.js} +1 -1
  110. package/dist/client/assets/{connect-layout-Bef3Vcoz.js → connect-layout-BCUOkWSA.js} +1 -1
  111. package/dist/client/assets/{connection-B_CnJB72.js → connection-D_rVWA-L.js} +1 -1
  112. package/dist/client/assets/{connection-card-COXkS8Eb.js → connection-card-lEfV14ps.js} +1 -1
  113. package/dist/client/assets/{connection-detail-CqAB54TD.js → connection-detail-Bkpj1hPa.js} +1 -1
  114. package/dist/client/assets/{connection-form-helpers-CmM6esb0.js → connection-form-helpers-DzSY7y5N.js} +1 -1
  115. package/dist/client/assets/{connections-ctwClS3Y.js → connections-D2ChZKJ9.js} +1 -1
  116. package/dist/client/assets/{context-BrMbDozZ.js → context-BYAhF2ih.js} +1 -1
  117. package/dist/client/assets/{context-menu-D5LE-zYl.js → context-menu-54o-CErg.js} +1 -1
  118. package/dist/client/assets/{core.esm-Bm8Mdq22.js → core.esm-DbtknlhF.js} +1 -1
  119. package/dist/client/assets/{create-organization-dialog-j0D-TCSt.js → create-organization-dialog-Cr3N9hYb.js} +1 -1
  120. package/dist/client/assets/{daily-pulse-Cd5PQB45.js → daily-pulse-CcX5tKuX.js} +1 -1
  121. package/dist/client/assets/{decopilot-XH4QWeAH.js → decopilot-CBk7MsQQ.js} +1 -1
  122. package/dist/client/assets/{device-hint-sfxTtdjc.js → device-hint-BPZC2UIh.js} +1 -1
  123. package/dist/client/assets/{dialog-BaUTSxMN.js → dialog-Cx4yDOtp.js} +1 -1
  124. package/dist/client/assets/{discover-CDpA1vFz.js → discover-BJ8uKTXr.js} +1 -1
  125. package/dist/client/assets/{domain-settings-B-7NWnKQ.js → domain-settings-5_gXdfZO.js} +1 -1
  126. package/dist/client/assets/{download-app-dialog-Do4LLhVR.js → download-app-dialog-CddOOzn5.js} +1 -1
  127. package/dist/client/assets/{drawer-B9dwTNY5.js → drawer-lUKd8lKU.js} +1 -1
  128. package/dist/client/assets/{editor-ByUsSScY.js → editor-CDzOZBXR.js} +1 -1
  129. package/dist/client/assets/{empty-state-C3ObDFbb.js → empty-state-B5RpF5dw.js} +1 -1
  130. package/dist/client/assets/{empty-state-BLBbHDRF.js → empty-state-CRgX-H4d.js} +1 -1
  131. package/dist/client/assets/{extract-connection-data-BKPLoQfG.js → extract-connection-data-DKbP-JSI.js} +1 -1
  132. package/dist/client/assets/{feature-gate-DIRzfv1T.js → feature-gate-DYDN-f8K.js} +1 -1
  133. package/dist/client/assets/{feature-paywall-Bj36swPZ.js → feature-paywall-CwJeuIRd.js} +1 -1
  134. package/dist/client/assets/{file-explorer-CTmYwWxQ.js → file-explorer-Dy6k9N2q.js} +1 -1
  135. package/dist/client/assets/{file-preview-DKsb5sxq.js → file-preview--_ce6-u1.js} +1 -1
  136. package/dist/client/assets/{file-share-button-CAJ6q_i3.js → file-share-button-DkX33WID.js} +1 -1
  137. package/dist/client/assets/{file-type-icon-BslTQPeb.js → file-type-icon-z_VVXBs0.js} +1 -1
  138. package/dist/client/assets/flat-project-D11si8ND.js +1 -0
  139. package/dist/client/assets/{folder-icon-DI8RbZE8.js → folder-icon-Dl76i-NI.js} +1 -1
  140. package/dist/client/assets/{form-CX1qK1yv.js → form-PsTlToCZ.js} +1 -1
  141. package/dist/client/assets/{gateway-client-BvHlKdmu.js → gateway-client-O3BwGZz4.js} +1 -1
  142. package/dist/client/assets/{general-B3HHRd07.js → general-DWo8L8D2.js} +1 -1
  143. package/dist/client/assets/{home-BJBtZM7W.js → home-DCoYzUty.js} +1 -1
  144. package/dist/client/assets/{icon-button-BBOHlA6G.js → icon-button-CtkCoho4.js} +1 -1
  145. package/dist/client/assets/{index-Df0sPq1p.js → index-B92tQhk2.js} +1 -1
  146. package/dist/client/assets/{index-DDpEXUJ_.js → index-BZOFys5V.js} +1 -1
  147. package/dist/client/assets/{index-CO_AXaPm.js → index-BuPiMHa9.js} +1 -1
  148. package/dist/client/assets/{index-BuCSZoG-.js → index-CNKB9BLC.js} +1 -1
  149. package/dist/client/assets/{index-_Sxk3cnc.js → index-CNlcFUXI.js} +1 -1
  150. package/dist/client/assets/{index-BqIvBG3L.js → index-CX9nJVrp.js} +1 -1
  151. package/dist/client/assets/{index-CEnW1hdR.js → index-Cehs1FbF.js} +1 -1
  152. package/dist/client/assets/{index-BMDxYXCC.js → index-CqROczuR.js} +1 -1
  153. package/dist/client/assets/{index-DAsfUatQ.js → index-CqoWQKAL.js} +1 -1
  154. package/dist/client/assets/{index-BER7cxzg.js → index-DbInOaDT.js} +3 -3
  155. package/dist/client/assets/{index-CU39nsZn.js → index-DkbR1nSx.js} +1 -1
  156. package/dist/client/assets/{index-LBqA-ZwS.js → index-Dp_K-tWq.js} +4 -4
  157. package/dist/client/assets/{index-C3kLhdFk.js → index-atJuiikW.js} +1 -1
  158. package/dist/client/assets/{index-GtGSryeO.js → index-oQ2UbXRU.js} +1 -1
  159. package/dist/client/assets/{index-redirect-O6bjnqnz.js → index-redirect-CuIBqkGB.js} +1 -1
  160. package/dist/client/assets/{index-royPJMuT.js → index-s00oD-Jd.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-BOfNlSlD.js → infiniteQueryObserver-cPdLUo2i.js} +1 -1
  162. package/dist/client/assets/{infra-billing-C01AiIAF.js → infra-billing-CMOusNuI.js} +1 -1
  163. package/dist/client/assets/{input-BaULnlTy.js → input-CuvBF_Ph.js} +1 -1
  164. package/dist/client/assets/{input-B5aqwsZt.js → input-DMPfmuCm.js} +1 -1
  165. package/dist/client/assets/{input-NGWnA1zm.js → input-Dz9vjpZr.js} +3 -3
  166. package/dist/client/assets/{integration-icon-DBB4e_3T.js → integration-icon-C4a6DmNa.js} +1 -1
  167. package/dist/client/assets/{label-B_gun1QM.js → label-IzmYRV1z.js} +1 -1
  168. package/dist/client/assets/{layout-CroKjGpx.js → layout-B3a4jG3v.js} +1 -1
  169. package/dist/client/assets/{legacy-agents-deep-CoX6cUW4.js → legacy-agents-deep-2AHQu7JX.js} +1 -1
  170. package/dist/client/assets/{legacy-main-redirect-BICndawD.js → legacy-main-redirect-QbN2kRww.js} +1 -1
  171. package/dist/client/assets/library-CkyuDdBe.js +1 -0
  172. package/dist/client/assets/{library-tab-BR0DXbhB.js → library-tab-CTbP1WqV.js} +1 -1
  173. package/dist/client/assets/{login-DOWqx3ut.js → login-DFPUDsmw.js} +1 -1
  174. package/dist/client/assets/{markdown-U5k2vy3J.js → markdown-CbWncYsp.js} +1 -1
  175. package/dist/client/assets/{mcp-app-renderer-CKBkqc3B.js → mcp-app-renderer-dVJ57955.js} +1 -1
  176. package/dist/client/assets/{mcp-oauth-HStEMAmd.js → mcp-oauth-CaFmRQFB.js} +1 -1
  177. package/dist/client/assets/{members-DNyZa-XF.js → members-C66PZkTp.js} +1 -1
  178. package/dist/client/assets/{memory-OOka5CRZ.js → memory-COrpidSd.js} +1 -1
  179. package/dist/client/assets/{mini-report-page-COzp9QDI.js → mini-report-page-BIpwSm2B.js} +1 -1
  180. package/dist/client/assets/{mock-board-CfkC340s.js → mock-board-I7CG5ZZk.js} +1 -1
  181. package/dist/client/assets/{monaco-editor-39OIr0EW.js → monaco-editor-BfDinEqB.js} +1 -1
  182. package/dist/client/assets/{monitoring-stats-row-hFVlSsvr.js → monitoring-stats-row-DpliLE6w.js} +1 -1
  183. package/dist/client/assets/{multi-select-Dq20jLV8.js → multi-select-CdUvVLnd.js} +1 -1
  184. package/dist/client/assets/{mustache-Cp6gU8R-.js → mustache-BCjs42fS.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-GBb33kNc.js → new-project-dialog-BrBcYgwV.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-Bm96J_76.js → oauth-callback-VghnKX5V.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-Bw_B2ld4.js → oauth-callback-ai-provider-CHo0gJqB.js} +1 -1
  188. package/dist/client/assets/{onboarding-DidfktKN.js → onboarding-CCfkb-5i.js} +1 -1
  189. package/dist/client/assets/{openai-conversation-BKeUiEz7.js → openai-conversation-CBNQtuep.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-D6hnV0TB.js → optimistic-project-sidebar-views-DO48tEtU.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-BtoXgtv0.js → org-file-open-context-CTB-BA9v.js} +1 -1
  192. package/dist/client/assets/{organization-choice-BoiiDDpR.js → organization-choice-B_JYNF9C.js} +1 -1
  193. package/dist/client/assets/{orgs-BMfaOlil.js → orgs-CEe5T0Jp.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-l195NMEg.js → page-seo-form-ZXtL1SS1.js} +1 -1
  195. package/dist/client/assets/{pair-DrA4hmPx.js → pair-DK0B0mc4.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-raSzhtyN.js → plan-ladder-DV7XXfLd.js} +1 -1
  197. package/dist/client/assets/{popover-CeeSO9_9.js → popover-CTR7iqtU.js} +1 -1
  198. package/dist/client/assets/{post-calendar-BaiUUJmh.js → post-calendar-Cj6mtuXm.js} +1 -1
  199. package/dist/client/assets/{post-editor-BQ1ukEYL.js → post-editor-CkUCYO4l.js} +1 -1
  200. package/dist/client/assets/{preview-content-CIoLsvsV.js → preview-content-BYxJoP40.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-9biwdpbK.js → preview-dialog-CYLdM3p6.js} +1 -1
  202. package/dist/client/assets/{preview-panel-DAYrsAZ_.js → preview-panel-CuZzv1pv.js} +1 -1
  203. package/dist/client/assets/{profile-BrT6Fi4g.js → profile-BCXXDsmg.js} +1 -1
  204. package/dist/client/assets/{project-app-view-eDaYLCna.js → project-app-view-CDuxE_ml.js} +1 -1
  205. package/dist/client/assets/{project-feed-BuPVvKIN.js → project-feed-DIsrBxNw.js} +1 -1
  206. package/dist/client/assets/{project-icon-RPHlWMLn.js → project-icon-TzEHFIiY.js} +1 -1
  207. package/dist/client/assets/project-reports-CtWvQy-H.js +1 -0
  208. package/dist/client/assets/project-tasks-CpBAPqu4.js +1 -0
  209. package/dist/client/assets/{projects-Cgs0BGd1.js → projects-D87yg2cy.js} +1 -1
  210. package/dist/client/assets/{projects-empty-state-D6K9KKqm.js → projects-empty-state-EB5DtkKb.js} +1 -1
  211. package/dist/client/assets/{prompts-Bj9DEWHy.js → prompts-BskO422j.js} +1 -1
  212. package/dist/client/assets/record-editor-RPRDtY57.js +1 -0
  213. package/dist/client/assets/{redirect-editor-CFDCaCx_.js → redirect-editor-BKJweHyd.js} +1 -1
  214. package/dist/client/assets/{reports-BgW9aNAq.js → reports-BLAtFH6q.js} +1 -1
  215. package/dist/client/assets/reports-BtbcBBMJ.js +1 -0
  216. package/dist/client/assets/{reports-onboarding-KuQ-B5Nd.js → reports-onboarding-wPSrs32l.js} +1 -1
  217. package/dist/client/assets/{reports-tab-Bof1mzjv.js → reports-tab-B72VUoH-.js} +2 -2
  218. package/dist/client/assets/{repositories-DmphBx57.js → repositories-Bl2pBl-f.js} +1 -1
  219. package/dist/client/assets/{repository-binding-D1nnAWYo.js → repository-binding-CzSKWD7H.js} +1 -1
  220. package/dist/client/assets/{repository-import-picker-DRqtS9NW.js → repository-import-picker-D0LwcFNO.js} +1 -1
  221. package/dist/client/assets/{repository-picker-Dg10f9--.js → repository-picker-DQFzR9xt.js} +1 -1
  222. package/dist/client/assets/{require-capability-Dfqs0tLP.js → require-capability-CMxqoohm.js} +1 -1
  223. package/dist/client/assets/{required-auth-layout-CfNBeMt4.js → required-auth-layout-Cketary5.js} +1 -1
  224. package/dist/client/assets/{reset-password-ZSZOruiu.js → reset-password-DxGEn2uN.js} +1 -1
  225. package/dist/client/assets/{resizable-BrB6X38q.js → resizable-DCMgjOKZ.js} +1 -1
  226. package/dist/client/assets/{resolve-tab-icon-CXpd70Ay.js → resolve-tab-icon-Bn2NKJjD.js} +1 -1
  227. package/dist/client/assets/{review-settings-BMWXlktJ.js → review-settings-BDC004dc.js} +1 -1
  228. package/dist/client/assets/{rich-text-link-control-BiLYq_Ss.js → rich-text-link-control-oDq426wL.js} +1 -1
  229. package/dist/client/assets/{roles-DYnLkqNH.js → roles-D2mAbmyg.js} +1 -1
  230. package/dist/client/assets/{route-Dom1EKxW.js → route-CItSJgD4.js} +1 -1
  231. package/dist/client/assets/route-_gNd_u_g.js +1 -0
  232. package/dist/client/assets/{route-Dza1mPMZ.js → route-n1Sub2zH.js} +1 -1
  233. package/dist/client/assets/{runnable-block-editor-CX0ovMOm.js → runnable-block-editor-CWjhiXNQ.js} +1 -1
  234. package/dist/client/assets/{sandbox-lifecycle-context-B1Nt4uWC.js → sandbox-lifecycle-context-DfJeOjj9.js} +1 -1
  235. package/dist/client/assets/{schema-BuM44BeJ.js → schema-Ca8VbB6Z.js} +1 -1
  236. package/dist/client/assets/{scroll-area-CwucKMgJ.js → scroll-area-B7qC_9nb.js} +1 -1
  237. package/dist/client/assets/{search-input-DNCPqRQn.js → search-input-B1vfwvsf.js} +1 -1
  238. package/dist/client/assets/{search-toggle-QfO4rJO-.js → search-toggle-bwYqrVmX.js} +1 -1
  239. package/dist/client/assets/{secret-picker-CPcltp8E.js → secret-picker-BpYrwXvM.js} +1 -1
  240. package/dist/client/assets/{secrets-Dj3-an7_.js → secrets-DQZRb7E3.js} +1 -1
  241. package/dist/client/assets/{sections-editor-CDa_uUSk.js → sections-editor-Db9a1-Bt.js} +1 -1
  242. package/dist/client/assets/{select-imMlkJoM.js → select-CoyCwgyB.js} +1 -1
  243. package/dist/client/assets/{select-model-cT4UKPXZ.js → select-model-CNFYkJTw.js} +1 -1
  244. package/dist/client/assets/{seo-editor-D_2QNoVA.js → seo-editor-FBgQQ6Ao.js} +1 -1
  245. package/dist/client/assets/{separator-BZ4lzGmd.js → separator-B3bsYN0c.js} +1 -1
  246. package/dist/client/assets/settings-tab-DkTXor6H.js +4 -0
  247. package/dist/client/assets/{sheet-AzJgkdm-.js → sheet-CcwsfSuf.js} +1 -1
  248. package/dist/client/assets/{shell-layout-CSJSyeoD.js → shell-layout-D0qEeQ00.js} +1 -1
  249. package/dist/client/assets/{skills-BOZArdy5.js → skills-D_NPHApF.js} +1 -1
  250. package/dist/client/assets/{sso-B5yqnj7z.js → sso--qAyKDeI.js} +1 -1
  251. package/dist/client/assets/{suggestion-CcJQPlSS.js → suggestion-BZACoewj.js} +1 -1
  252. package/dist/client/assets/{switch-xoTVq7WM.js → switch-BsrLPJk-.js} +1 -1
  253. package/dist/client/assets/{synced-repos-BMmzq47r.js → synced-repos-BBnTf72q.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-vQF0_Xqb.js → tab-icon-glyph-BpobhcK9.js} +1 -1
  255. package/dist/client/assets/{table-MT321DSd.js → table-CDAJcCRP.js} +1 -1
  256. package/dist/client/assets/{tabs-CicgJ10_.js → tabs-_ZXrvPf9.js} +1 -1
  257. package/dist/client/assets/{task-board-Cs1-7PpN.js → task-board-Be84bQr5.js} +1 -1
  258. package/dist/client/assets/{task-route-m4lCwB0h.js → task-route-BVDlBu3j.js} +1 -1
  259. package/dist/client/assets/{task-status-XbY5QJOl.js → task-status-w_ipGIcW.js} +1 -1
  260. package/dist/client/assets/{taskboard-analytics-DVoQg8Rb.js → taskboard-analytics-DZIIOtRa.js} +1 -1
  261. package/dist/client/assets/{tasks-D5XhFaqg.js → tasks-DfnBdP8M.js} +1 -1
  262. package/dist/client/assets/tasks-JiH0eBli.js +1 -0
  263. package/dist/client/assets/{textarea-CJdXmj_-.js → textarea-D_qYz289.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-R7Zql4Jr.js → thread-analytics-DUtz7u4O.js} +1 -1
  265. package/dist/client/assets/{thread-button-CbH7XjU-.js → thread-button-e1WPL34D.js} +1 -1
  266. package/dist/client/assets/{thread-intent-B1ICFt86.js → thread-intent-CQTmnksY.js} +1 -1
  267. package/dist/client/assets/{thread-route-Bb8c02GG.js → thread-route-BqkWVw2J.js} +1 -1
  268. package/dist/client/assets/{thread-route-BcHLmvou.js → thread-route-DDpItDrx.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-DUB9B_nE.js → thread-sheet-body-jgcoBFMz.js} +1 -1
  270. package/dist/client/assets/{toggle-group-C9ZX2RgM.js → toggle-group-C6cnvdcW.js} +1 -1
  271. package/dist/client/assets/{toolbar-icon-button-Daq-5ocJ.js → toolbar-icon-button-C3ZwIJAh.js} +1 -1
  272. package/dist/client/assets/{tooltip-BwTRkM37.js → tooltip-volhiTDm.js} +1 -1
  273. package/dist/client/assets/{track-pLWJ-wXy.js → track-CHLcK5Xr.js} +1 -1
  274. package/dist/client/assets/{types-6q3fiU58.js → types-BfHWRRMs.js} +1 -1
  275. package/dist/client/assets/{usage-stats-DqkDEQoU.js → usage-stats-u1xk4pvh.js} +1 -1
  276. package/dist/client/assets/{use-ai-providers-B1J7ouSE.js → use-ai-providers-DSD7VYyN.js} +1 -1
  277. package/dist/client/assets/{use-automations-m8Hu0y6o.js → use-automations-DxuURK9w.js} +1 -1
  278. package/dist/client/assets/{use-autosave-BXMlnNye.js → use-autosave-BXGIoabR.js} +1 -1
  279. package/dist/client/assets/{use-chat-layout-state-D_r1YjBG.js → use-chat-layout-state-CD_0Irhr.js} +1 -1
  280. package/dist/client/assets/{use-chat-navigation-NXmBPBJ5.js → use-chat-navigation-jtlOMVJv.js} +1 -1
  281. package/dist/client/assets/{use-clock-tick-Ce_NiOa_.js → use-clock-tick-B9pwHzMq.js} +1 -1
  282. package/dist/client/assets/{use-connect-companion-CMe2Cke9.js → use-connect-companion-1m-Flriq.js} +1 -1
  283. package/dist/client/assets/{use-connection-D9TU1G8g.js → use-connection-BxvBZ4tG.js} +1 -1
  284. package/dist/client/assets/{use-copy-CwGCL7_G.js → use-copy-FUDPi7ru.js} +1 -1
  285. package/dist/client/assets/{use-create-virtual-mcp-BEb1SxP-.js → use-create-virtual-mcp-BMOl2YsQ.js} +1 -1
  286. package/dist/client/assets/{use-date-fns-locale-CncfJZ-Y.js → use-date-fns-locale-CZfaxMtC.js} +1 -1
  287. package/dist/client/assets/{use-debounced-autosave-V9REzK1K.js → use-debounced-autosave-DyqWcQ6u.js} +1 -1
  288. package/dist/client/assets/{use-debounced-value-TVa8ke9i.js → use-debounced-value-2SotiCO2.js} +1 -1
  289. package/dist/client/assets/{use-deco-credits-BxH5tRJq.js → use-deco-credits-B3LiNfwz.js} +1 -1
  290. package/dist/client/assets/{use-decopilot-events-ByD6TF3m.js → use-decopilot-events-D3zb74bk.js} +1 -1
  291. package/dist/client/assets/{use-delete-connection-DwzWoBly.js → use-delete-connection-DiRBraYP.js} +1 -1
  292. package/dist/client/assets/{use-deployment-admin-C2pzXDr2.js → use-deployment-admin-hh-oYei0.js} +1 -1
  293. package/dist/client/assets/{use-ensure-project-folder-AK-c3A_w.js → use-ensure-project-folder-C8p35UA1.js} +1 -1
  294. package/dist/client/assets/{use-fast-preview-draft-url-CyfuYiZy.js → use-fast-preview-draft-url-BKk6i5QK.js} +1 -1
  295. package/dist/client/assets/{use-file-configs-HSDXp3dR.js → use-file-configs-BHY4DaxL.js} +1 -1
  296. package/dist/client/assets/{use-infinite-scroll-Di73ngUh.js → use-infinite-scroll-CbWvVc4J.js} +1 -1
  297. package/dist/client/assets/{use-join-requests-SyFADpZF.js → use-join-requests-DbAhSRzF.js} +1 -1
  298. package/dist/client/assets/{use-main-panel-tabs-C9rsMyw4.js → use-main-panel-tabs-CYEpq4x2.js} +1 -1
  299. package/dist/client/assets/{use-mcp-auth-status-DKj9l4Q_.js → use-mcp-auth-status-B94ukkEm.js} +1 -1
  300. package/dist/client/assets/{use-mcp-client-DEGTm1W0.js → use-mcp-client-BUFdpLoI.js} +1 -1
  301. package/dist/client/assets/{use-mcp-prompts-CZuYjuRv.js → use-mcp-prompts-PtK6U83h.js} +1 -1
  302. package/dist/client/assets/{use-mcp-tools-DGilpnId.js → use-mcp-tools-fP36UUt2.js} +1 -1
  303. package/dist/client/assets/{use-members-nuYKaBVx.js → use-members-CfUgcELO.js} +1 -1
  304. package/dist/client/assets/{use-mobile-D86gQiqH.js → use-mobile-D_zVYgcY.js} +1 -1
  305. package/dist/client/assets/{use-navigate-to-agent-C1uAfvXQ.js → use-navigate-to-agent-D3FqrHHq.js} +1 -1
  306. package/dist/client/assets/use-new-blocks-editor-B2vcRo3Z.js +1 -0
  307. package/dist/client/assets/{use-open-billing-url-DrFUthpb.js → use-open-billing-url-D9fhhg-C.js} +1 -1
  308. package/dist/client/assets/{use-org-auth-client-Ctvz1VPK.js → use-org-auth-client-uVDfk1J4.js} +1 -1
  309. package/dist/client/assets/{use-org-fs-BK-5u4MR.js → use-org-fs-BIChLUk1.js} +1 -1
  310. package/dist/client/assets/{use-org-repo-syncs-DCT7Auvn.js → use-org-repo-syncs-USNvar5i.js} +1 -1
  311. package/dist/client/assets/{use-org-sso-Dvki5yin.js → use-org-sso-BeqR2AAG.js} +1 -1
  312. package/dist/client/assets/{use-organization-roles-CdiXw9NI.js → use-organization-roles-Bx8bGE-Q.js} +1 -1
  313. package/dist/client/assets/{use-organization-settings-BB1edQnb.js → use-organization-settings-BScH3qwG.js} +1 -1
  314. package/dist/client/assets/{use-panel-navigate-FaJ2R6On.js → use-panel-navigate-f5p30JNB.js} +1 -1
  315. package/dist/client/assets/{use-project-scope-CJdExTjB.js → use-project-scope-Bc3Mf8u8.js} +1 -1
  316. package/dist/client/assets/{use-releases-CkCV1BPi.js → use-releases-C_be6yuh.js} +1 -1
  317. package/dist/client/assets/{use-reports-diagnostic-BjS1JWZX.js → use-reports-diagnostic-C3lq-p41.js} +1 -1
  318. package/dist/client/assets/{use-secrets-BLWrq5Zi.js → use-secrets-Bg6EZdq0.js} +1 -1
  319. package/dist/client/assets/{use-section-preview-base-DtBKzuHi.js → use-section-preview-base-DIGhBQOo.js} +1 -1
  320. package/dist/client/assets/{use-session-runtime-Ciro8eXk.js → use-session-runtime-D-oBtWdP.js} +1 -1
  321. package/dist/client/assets/{use-tags-CZ_bS51l.js → use-tags-CW71Fix3.js} +1 -1
  322. package/dist/client/assets/{use-task-board-analytics-Caaew7r_.js → use-task-board-analytics-D5zyKXHr.js} +1 -1
  323. package/dist/client/assets/{use-task-board-events-nMb8vMzh.js → use-task-board-events-CGpFuIoH.js} +1 -1
  324. package/dist/client/assets/{use-task-metadata-DdniinOi.js → use-task-metadata-BB48G_ju.js} +1 -1
  325. package/dist/client/assets/{use-thread-analytics-D7pEB2b_.js → use-thread-analytics-DglDjnAj.js} +1 -1
  326. package/dist/client/assets/{use-thread-outputs-BvePWXQr.js → use-thread-outputs-DOxiz9iU.js} +1 -1
  327. package/dist/client/assets/useInfiniteQuery-LSeshq9l.js +1 -0
  328. package/dist/client/assets/{useQueries-CqRixoL5.js → useQueries-Bf6inKuU.js} +1 -1
  329. package/dist/client/assets/useSuspenseInfiniteQuery-DDa2NwUG.js +1 -0
  330. package/dist/client/assets/{users-DqUzzC71.js → users-Bhyogzga.js} +1 -1
  331. package/dist/client/assets/{utils-CVtWzP8U.js → utils-CbyoMcko.js} +1 -1
  332. package/dist/client/assets/{variant-calendar-B-8vmp-z.js → variant-calendar-DccOv2cj.js} +1 -1
  333. package/dist/client/assets/{variant-matcher-override-BHQrQ-er.js → variant-matcher-override-0eTJWiNi.js} +1 -1
  334. package/dist/client/assets/{view-mode-toggle-C6y0Ak_X.js → view-mode-toggle-BBW6uQ5m.js} +1 -1
  335. package/dist/client/assets/{virtual-mcp-BnTPAygc.js → virtual-mcp-DyQGypdD.js} +1 -1
  336. package/dist/client/index.html +1 -1
  337. package/dist/server/cli.js +1 -1
  338. package/dist/server/server.js +1 -1
  339. package/package.json +1 -1
  340. package/dist/client/assets/agent-app-Cv42eUOK.js +0 -1
  341. package/dist/client/assets/agent-deck-CkaxqPyQ.js +0 -1
  342. package/dist/client/assets/agent-library-e9R2mrHA.js +0 -1
  343. package/dist/client/assets/agent-library-file-CWWZkSXi.js +0 -1
  344. package/dist/client/assets/agent-settings-xa5u31eL.js +0 -1
  345. package/dist/client/assets/agent-site-editor-code-BGhosgRZ.js +0 -2
  346. package/dist/client/assets/agent-view-B5JwJu5a.js +0 -1
  347. package/dist/client/assets/api-keys-B8m8i5RY.js +0 -1
  348. package/dist/client/assets/app-editor-C9lJAIxk.js +0 -1
  349. package/dist/client/assets/flat-project-Dm5v-WoJ.js +0 -1
  350. package/dist/client/assets/library-CJbNbaaz.js +0 -1
  351. package/dist/client/assets/project-reports-BX_a8I4H.js +0 -1
  352. package/dist/client/assets/project-tasks-D4VJ7ObB.js +0 -1
  353. package/dist/client/assets/record-editor-BXHnPoZS.js +0 -1
  354. package/dist/client/assets/reports-CsbUc9gb.js +0 -1
  355. package/dist/client/assets/route-yo_gVgXO.js +0 -1
  356. package/dist/client/assets/settings-tab-B-9vMsZ9.js +0 -5
  357. package/dist/client/assets/tasks-BhdUS3SM.js +0 -1
  358. package/dist/client/assets/use-new-blocks-editor-NIzs9JOH.js +0 -1
  359. package/dist/client/assets/useInfiniteQuery-fv1BKri9.js +0 -1
  360. package/dist/client/assets/useSuspenseInfiniteQuery-BRIV-VAB.js +0 -1
@@ -1,12 +1,12 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-BKeUiEz7.js","assets/index-LBqA-ZwS.js","assets/index-BeFSZLR9.css","assets/index-BuCSZoG-.js","assets/gateway-client-BvHlKdmu.js","assets/dialog-BaUTSxMN.js","assets/X-Dv9AnRlg.js","assets/form-CX1qK1yv.js","assets/label-B_gun1QM.js","assets/input-B5aqwsZt.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-BtoXgtv0.js","assets/use-mobile-D86gQiqH.js","assets/use-panel-navigate-FaJ2R6On.js","assets/thread-route-BcHLmvou.js","assets/use-project-scope-CJdExTjB.js","assets/repository-binding-D1nnAWYo.js","assets/use-mcp-client-DEGTm1W0.js","assets/auth-DDpWnpgU.js","assets/tooltip-BwTRkM37.js","assets/index-C3kLhdFk.js","assets/XClose-BCVhz-Kf.js","assets/icon-button-BBOHlA6G.js","assets/file-type-icon-BslTQPeb.js","assets/use-chat-navigation-NXmBPBJ5.js","assets/autosend-xivc0lOT.js","assets/location-zK0I9Ia6.js","assets/shell-layout-CSJSyeoD.js","assets/avatar-Ctu5Wczb.js","assets/User01-BDAGl75t.js","assets/Building02-Dyi9ronc.js","assets/UserSquare-DdE8MrwD.js","assets/agent-icon-B_AZohhm.js","assets/AlertCircle-DWiDp-f1.js","assets/Tool01-BrjR3c4R.js","assets/ArrowUp-BuOxK3Pf.js","assets/ArrowLeft-BMW9utAL.js","assets/LinkBroken01-CaB2I9G0.js","assets/ShoppingBag01-DUKvQNmb.js","assets/ZoomOut-DGJt2ZOH.js","assets/CheckCircle-YnBoZGaI.js","assets/Check-CXicUAOa.js","assets/ChevronUp-DBFnJWSs.js","assets/Copy01-Dr3v4gYp.js","assets/CreditCard01-C2A37qQR.js","assets/DotsVertical-OvfvRPcf.js","assets/Image01-nUj6_DO-.js","assets/Palette-DA_Dzon5.js","assets/Key01-HuTENYPy.js","assets/Link01-cjx77r4E.js","assets/LinkExternal01-CSoQ_DGP.js","assets/Monitor01-D19plyaf.js","assets/Sun-Dl2R87Eo.js","assets/Plus-CuK8nNcu.js","assets/SearchMd-24zvxDRs.js","assets/Trash01-CuaXxM5C.js","assets/Upload01-DrihoScl.js","assets/Users01-BjhYFiAu.js","assets/download-app-dialog-Do4LLhVR.js","assets/use-clock-tick-Ce_NiOa_.js","assets/command-__KQqh6Y.js","assets/index-BMDxYXCC.js","assets/integration-icon-DBB4e_3T.js","assets/project-icon-RPHlWMLn.js","assets/new-project-dialog-GBb33kNc.js","assets/repository-import-picker-DRqtS9NW.js","assets/use-navigate-to-agent-C1uAfvXQ.js","assets/thread-intent-B1ICFt86.js","assets/backoff-8mStPHYB.js","assets/task-board-Cs1-7PpN.js","assets/schema-BuM44BeJ.js","assets/slugify-CEUa2lfQ.js","assets/repository-picker-Dg10f9--.js","assets/useInfiniteQuery-fv1BKri9.js","assets/infiniteQueryObserver-BOfNlSlD.js","assets/collection-search-Ca5RdqHn.js","assets/use-debounced-value-TVa8ke9i.js","assets/use-organization-settings-BB1edQnb.js","assets/use-is-desktop-app-BNujXJc_.js","assets/required-auth-layout-CfNBeMt4.js","assets/use-org-sso-Dvki5yin.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-DGXb0HEl.js","assets/use-session-runtime-Ciro8eXk.js","assets/chat-context-BOhnLSkM.js","assets/use-decopilot-events-ByD6TF3m.js","assets/use-ai-providers-B1J7ouSE.js","assets/select-imMlkJoM.js","assets/usage-stats-DqkDEQoU.js","assets/use-copy-CwGCL7_G.js","assets/markdown-U5k2vy3J.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-CicgJ10_.js","assets/use-deco-credits-BxH5tRJq.js","assets/toggle-group-C9ZX2RgM.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-DrFUthpb.js","assets/decopilot-XH4QWeAH.js","assets/checkbox-B6iJHz55.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-CeeSO9_9.js","assets/drawer-B9dwTNY5.js","assets/index-CO_AXaPm.js","assets/input-BaULnlTy.js","assets/suggestion-CcJQPlSS.js","assets/use-mcp-prompts-CZuYjuRv.js","assets/use-org-fs-BK-5u4MR.js","assets/question-004-sINsf4GQ.js","assets/use-members-nuYKaBVx.js","assets/use-org-auth-client-Ctvz1VPK.js","assets/feature-paywall-Bj36swPZ.js","assets/plan-ladder-raSzhtyN.js","assets/add-connection-dialog-D8GNVhEw.js","assets/extract-connection-data-BKPLoQfG.js","assets/metadata-D72DunRR.js","assets/connection-B_CnJB72.js","assets/connection-card-COXkS8Eb.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-CJdXmj_-.js","assets/use-connection-D9TU1G8g.js","assets/connection-form-helpers-CmM6esb0.js","assets/authenticate-and-persist-oauth-BnkSFHoe.js","assets/mcp-oauth-HStEMAmd.js","assets/collection-tabs-DvLdBj3Z.js","assets/badge-BHUGKNWs.js","assets/use-infinite-scroll-Di73ngUh.js","assets/useSuspenseInfiniteQuery-BRIV-VAB.js","assets/use-task-board-events-nMb8vMzh.js","assets/use-chat-layout-state-D_r1YjBG.js","assets/use-file-configs-HSDXp3dR.js","assets/site-slug-DebpOoQq.js"])))=>i.map(i=>d[i]);
2
- import{aO as Le,c as R,b as B,r as P,l as z,j as n,au as re,bM as Ut,av as se,bL as Ue,B as Y,at as Ss,as as Cs,bN as Ns,bK as Is,x as Se,aU as Ts,e4 as we,e5 as gt,a2 as _s,e as Ms,t as Ee,q as ee,X as Ce,d as rt,e1 as Ds,Z as Rs,K as Es,m as Ps,I as Ls,F as Us,H as Fs,G as Ae,aj as xt,ah as vt,ai as bt,h as Os,aG as zs,aF as $s,ak as Bs,cQ as Ks,cU as ye,aK as qs,cW as Qs,aL as At,aP as Ws,a as Ys,U as Gs,V as Hs,ay as tt,a7 as Ft,bT as Js,aE as Zs}from"./index-LBqA-ZwS.js";import{c as Xs,d as Ot,P as en,i as tn}from"./index-BuCSZoG-.js";import{s as zt}from"./XClose-BCVhz-Kf.js";import{I as sn}from"./icon-button-BBOHlA6G.js";import{F as nn}from"./file-type-icon-BslTQPeb.js";import{a as on}from"./use-chat-navigation-NXmBPBJ5.js";import{b as rn}from"./location-zK0I9Ia6.js";import{d as an,K as ln,b as Vn}from"./shell-layout-CSJSyeoD.js";import{a as cn}from"./repository-binding-D1nnAWYo.js";import{w as dn,A as un}from"./autosend-xivc0lOT.js";import{s as pn,r as yt,i as fn,c as hn,w as mn,H as gn}from"./chat-draft-DGXb0HEl.js";import{u as xn}from"./use-session-runtime-Ciro8eXk.js";import{i as $t}from"./LinkBroken01-CaB2I9G0.js";import{i as Bt}from"./ArrowUp-BuOxK3Pf.js";import{n as Kt}from"./ShoppingBag01-DUKvQNmb.js";import{i as it}from"./Check-CXicUAOa.js";import{t as We,aK as qt,a2 as Qt,aL as st,f as at,as as vn,_ as bn,aM as An,q as Wt,aN as Yt,I as yn,aO as jn}from"./agent-icon-B_AZohhm.js";import{a as Gt}from"./Image01-nUj6_DO-.js";import{h as kn}from"./UserSquare-DdE8MrwD.js";import{i as wn}from"./Upload01-DrihoScl.js";import{i as lt}from"./X-Dv9AnRlg.js";import{a as Fe,b as Ye,c as Ge,h as Sn,j as Cn,k as Nn,l as In,m as Tn,n as _n,o as Mn,u as Vt,p as Dn,e as Rn,s as En,d as Pn}from"./chat-context-BOhnLSkM.js";import{o as Ln,z as Un,q as Fn,c as On}from"./thread-intent-B1ICFt86.js";import{i as zn}from"./AlertCircle-DWiDp-f1.js";import{a as $n}from"./Copy01-Dr3v4gYp.js";import{a as nt,b as ct,d as dt,f as ut,F as Ht}from"./form-CX1qK1yv.js";import{c as Bn,S as Kn,b as qn,a as Qn,d as Wn}from"./select-imMlkJoM.js";import{t as Jt}from"./ChevronUp-DBFnJWSs.js";import{T as He,a as Je,b as Ze}from"./tooltip-BwTRkM37.js";import{i as Yn}from"./ArrowLeft-BMW9utAL.js";import{i as Zt,M as Gn,S as Hn}from"./usage-stats-DqkDEQoU.js";import{c as Jn,b as Zn}from"./tabs-CicgJ10_.js";import{d as Xn,h as eo,c as to,b as so,D as no}from"./dialog-BaUTSxMN.js";import{e as Oe,f as oo,c as ro,g as io}from"./use-decopilot-events-ByD6TF3m.js";import{u as ao}from"./use-deco-credits-BxH5tRJq.js";import{I as lo}from"./input-B5aqwsZt.js";import{T as jt,a as Vo}from"./toggle-group-C9ZX2RgM.js";import{s as co}from"./tool-namespace-DmnQIdtF.js";import{t as uo}from"./utils-CVEq3hMx.js";import{u as po}from"./use-open-billing-url-DrFUthpb.js";import{M as fo,m as pt,g as ho,a as mo}from"./decopilot-XH4QWeAH.js";import{a as Xt,b as es,P as ts}from"./popover-CeeSO9_9.js";import{c as go,b as xo,a as vo,D as bo}from"./drawer-B9dwTNY5.js";import{u as ss}from"./use-mobile-D86gQiqH.js";import{t as Ao}from"./Tool01-BrjR3c4R.js";import{d as yo,a as jo}from"./use-organization-settings-BB1edQnb.js";import{u as ns,c as ko,d as wo}from"./use-ai-providers-B1J7ouSE.js";import{M as So}from"./index-CO_AXaPm.js";import{p as os,u as Co,T as No,a as Io,U as To}from"./input-BaULnlTy.js";import{d as _o,g as kt,s as Mo}from"./gateway-client-BvHlKdmu.js";import{u as Do}from"./use-mcp-client-DEGTm1W0.js";import{l as Ro,g as Eo}from"./use-mcp-prompts-CZuYjuRv.js";import{i as Po}from"./Link01-cjx77r4E.js";import{s as wt}from"./Plus-CuK8nNcu.js";import"./suggestion-CcJQPlSS.js";import{p as Lo,q as Uo}from"./question-004-sINsf4GQ.js";import{A as Fo}from"./avatar-Ctu5Wczb.js";import{u as Oo}from"./use-members-nuYKaBVx.js";import{F as St}from"./feature-paywall-Bj36swPZ.js";import{A as zo}from"./add-connection-dialog-D8GNVhEw.js";import{u as $o}from"./use-task-board-events-nMb8vMzh.js";import{d as Bo}from"./use-chat-layout-state-D_r1YjBG.js";import{u as Ko}from"./use-is-desktop-app-BNujXJc_.js";const qo=Le("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const Qo=Le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const Wo=Le("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Yo=Le("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Go=Le("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),et="cubic-bezier(0.645, 0.045, 0.355, 1)",dl=44,Ho={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Jo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Zo={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function pe(t){const e=R.c(69),{icon:s,label:o,count:r,title:i,footerLeft:a,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,f=B(),[m,h]=P.useState(d),[g,x]=P.useState(!1);let v;e[0]!==c?(v=()=>{x(!0),c?.()},e[0]=c,e[1]=v):v=e[1];const b=v;if(g)return null;const j=Jo[p],A=Ho[p];let k;e[2]!==j||e[3]!==A?(k=z("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",j,A),e[2]=j,e[3]=A,e[4]=k):k=e[4];let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=()=>h(Xo),e[5]=w):w=e[5];const y=m&&"rounded-b-none",C=!m&&"rounded-b-xl";let S;e[6]!==y||e[7]!==C?(S=z("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",y,C),e[6]=y,e[7]=C,e[8]=S):S=e[8];const I=Zo[p];let N;e[9]!==I?(N=z("shrink-0",I),e[9]=I,e[10]=N):N=e[10];let M;e[11]!==s||e[12]!==N?(M=n.jsx("span",{className:N,children:s}),e[11]=s,e[12]=N,e[13]=M):M=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let D;e[16]!==r?(D=r?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:r}):null,e[16]=r,e[17]=D):D=e[17];const L=m?"rotate(180deg)":"rotate(0deg)";let _;e[18]!==L?(_=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Jt,{size:16,style:{transform:L,transition:`transform 180ms ${et}`}})}),e[18]=L,e[19]=_):_=e[19];let U;e[20]!==f?(U=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=U):U=e[21];let F;e[22]!==f?(F=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=F):F=e[23];let q,$;e[24]!==b?(q=le=>{le.stopPropagation(),b()},$=le=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),le.stopPropagation(),b())},e[24]=b,e[25]=q,e[26]=$):(q=e[25],$=e[26]);let O;e[27]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(lt,{size:16}),e[27]=O):O=e[27];let W;e[28]!==U||e[29]!==F||e[30]!==q||e[31]!==$?(W=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":U,title:F,onClick:q,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:O}),e[28]=U,e[29]=F,e[30]=q,e[31]=$,e[32]=W):W=e[32];let X;e[33]!==m||e[34]!==M||e[35]!==E||e[36]!==D||e[37]!==_||e[38]!==W||e[39]!==S?(X=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":m,onClick:w,className:S,children:[M,E,D,_,W]}),e[33]=m,e[34]=M,e[35]=E,e[36]=D,e[37]=_,e[38]=W,e[39]=S,e[40]=X):X=e[40];const te=m?"1fr":"0fr";let J;e[41]!==te?(J={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${et}`},e[41]=te,e[42]=J):J=e[42];let ae;e[43]===Symbol.for("react.memo_cache_sentinel")?(ae={overflow:"hidden",minHeight:0},e[43]=ae):ae=e[43];const T=m?1:0;let Q;e[44]!==T?(Q={opacity:T,transition:`opacity 120ms ${et}`,maxHeight:"60vh"},e[44]=T,e[45]=Q):Q=e[45];let Z;e[46]!==i?(Z=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=Z):Z=e[47];let H;e[48]!==V||e[49]!==i?(H=V?n.jsx("div",{className:z("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=H):H=e[50];let ne;e[51]!==Z||e[52]!==H?(ne=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,H]}),e[51]=Z,e[52]=H,e[53]=ne):ne=e[53];let G;e[54]!==a||e[55]!==l?(G=a||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:a}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=a,e[55]=l,e[56]=G):G=e[56];let ce;e[57]!==Q||e[58]!==ne||e[59]!==G?(ce=n.jsx("div",{style:ae,children:n.jsxs("div",{className:"flex flex-col",style:Q,children:[ne,G]})}),e[57]=Q,e[58]=ne,e[59]=G,e[60]=ce):ce=e[60];let ie;e[61]!==J||e[62]!==ce?(ie=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:ce}),e[61]=J,e[62]=ce,e[63]=ie):ie=e[63];let fe;return e[64]!==X||e[65]!==ie||e[66]!==k||e[67]!==p?(fe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:k,children:[X,ie]}),e[64]=X,e[65]=ie,e[66]=k,e[67]=p,e[68]=fe):fe=e[68],fe}function Xo(t){return!t}const er=re({content:se().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Ue(["pending","in_progress","completed"]),activeForm:se().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),rs=re({todos:Ut(er)}),tr="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";Ln({description:tr,inputSchema:Un(rs),execute:async({todos:t})=>({ok:!0,count:t.length})});const sr="tool-todo_write",nr=new Set(["input-available","output-available"]);function or(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let r=o.length-1;r>=0;r--){const i=o[r];if(i.type!==sr||typeof i.state!="string"||!nr.has(i.state))continue;const a=rs.safeParse(i.input);if(a.success)return a.data.todos}}return[]}function is(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:uo(co(o)),input:s.input})}return e}function as(t){return t.at(-1)}function ls(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function rr(t){return t?t.message.startsWith("[CREDITS]"):!1}const ir={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function ar(t){const{messages:e,error:s,finishReason:o,isStreaming:r,isWaitingForApprovals:i}=t;if(!r&&s&&rr(s))return{...ir,isCreditExhausted:!0};const a=e.at(-1),l=a?.role==="assistant"?a.parts:[],V=l,u=!!V.filter(k=>k.type==="tool-user_ask").filter(k=>k.state!=="output-available").length,c=V.some(Zt),p=ls(l),f=is(V),m=or(e),h=r?null:pn(s),g=r?null:Fn(s),x=!r&&!!s&&!h&&!g,v=f.length>0||r&&i,b=p.length>0,A=!r&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||b||c))&&!x;return{isCreditExhausted:!1,planRefusal:g,subscriptionErrorKind:h,hasTodos:m.length>0,showError:x,showWarning:A,hasApprovals:v,hasPlans:b,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:m}}function Vs(){const t=R.c(6),{messages:e,error:s,finishReason:o,isStreaming:r,isWaitingForApprovals:i}=Fe(),a=s??null,l=o??null;let V;return t[0]!==r||t[1]!==i||t[2]!==e||t[3]!==a||t[4]!==l?(V=ar({messages:e,error:a,finishReason:l,isStreaming:r,isWaitingForApprovals:i}),t[0]=r,t[1]=i,t[2]=e,t[3]=a,t[4]=l,t[5]=V):V=t[5],V}function ul(){const t=Vs(),e=Oe("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const Ct="start-task",lr=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-CBNQtuep.js","assets/index-Dp_K-tWq.js","assets/index-BeFSZLR9.css","assets/index-CNKB9BLC.js","assets/gateway-client-O3BwGZz4.js","assets/dialog-Cx4yDOtp.js","assets/X-BQNprmBf.js","assets/form-PsTlToCZ.js","assets/label-IzmYRV1z.js","assets/input-DMPfmuCm.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-CTB-BA9v.js","assets/use-mobile-D_zVYgcY.js","assets/use-panel-navigate-f5p30JNB.js","assets/thread-route-DDpItDrx.js","assets/use-project-scope-Bc3Mf8u8.js","assets/repository-binding-CzSKWD7H.js","assets/use-mcp-client-BUFdpLoI.js","assets/auth-cALcTtmh.js","assets/tooltip-volhiTDm.js","assets/index-atJuiikW.js","assets/XClose-BpmmlEY3.js","assets/icon-button-CtkCoho4.js","assets/file-type-icon-z_VVXBs0.js","assets/use-chat-navigation-jtlOMVJv.js","assets/autosend-05UC4VjF.js","assets/location-zK0I9Ia6.js","assets/shell-layout-D0qEeQ00.js","assets/avatar-D8csOeeF.js","assets/User01-Bsraudto.js","assets/Building02-CEVEDOME.js","assets/UserSquare-DeLx8WzD.js","assets/agent-icon-CbXn8VZK.js","assets/AlertCircle-B5TmAHNM.js","assets/Tool01-3oVxsToy.js","assets/ArrowUp-Cib8ewx4.js","assets/ArrowLeft-9GJFW4LS.js","assets/LinkBroken01-CjBq0lbN.js","assets/ShoppingBag01-b9-BhwDR.js","assets/ZoomOut-C7AJpRh5.js","assets/CheckCircle-DpemfJ5S.js","assets/Check-BvCNBJe8.js","assets/ChevronUp-BwSgHBqC.js","assets/Copy01-B3CEXdpv.js","assets/CreditCard01-DFj0HUwR.js","assets/DotsVertical-CvByrwlw.js","assets/Image01-CPJAhPOP.js","assets/Palette-uTBuV6eG.js","assets/Key01-D3KdqQRK.js","assets/Link01-VVuQkQsn.js","assets/LinkExternal01-CLi_LJ2y.js","assets/Monitor01-DO03hBU2.js","assets/Sun-BF4Eks2R.js","assets/Plus-DLW5olp7.js","assets/SearchMd-BNPYUXLP.js","assets/Trash01-D7ylqCya.js","assets/Upload01-DNxaQbwq.js","assets/Users01-iXRnCXY-.js","assets/download-app-dialog-CddOOzn5.js","assets/use-clock-tick-B9pwHzMq.js","assets/command-H0OtsxUs.js","assets/index-CqROczuR.js","assets/integration-icon-C4a6DmNa.js","assets/project-icon-TzEHFIiY.js","assets/new-project-dialog-BrBcYgwV.js","assets/repository-import-picker-D0LwcFNO.js","assets/use-navigate-to-agent-D3FqrHHq.js","assets/thread-intent-CQTmnksY.js","assets/backoff-8mStPHYB.js","assets/task-board-Be84bQr5.js","assets/schema-Ca8VbB6Z.js","assets/slugify-CEUa2lfQ.js","assets/repository-picker-DQFzR9xt.js","assets/useInfiniteQuery-LSeshq9l.js","assets/infiniteQueryObserver-cPdLUo2i.js","assets/collection-search-D5sWxiI_.js","assets/use-debounced-value-2SotiCO2.js","assets/use-organization-settings-BScH3qwG.js","assets/use-is-desktop-app-BNujXJc_.js","assets/required-auth-layout-Cketary5.js","assets/use-org-sso-BeqR2AAG.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-DMMAinxT.js","assets/use-session-runtime-D-oBtWdP.js","assets/chat-context-CikhzUxM.js","assets/use-decopilot-events-D3zb74bk.js","assets/use-ai-providers-DSD7VYyN.js","assets/select-CoyCwgyB.js","assets/usage-stats-u1xk4pvh.js","assets/use-copy-FUDPi7ru.js","assets/markdown-CbWncYsp.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/tabs-_ZXrvPf9.js","assets/use-deco-credits-B3LiNfwz.js","assets/toggle-group-C6cnvdcW.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-D9fhhg-C.js","assets/decopilot-CBk7MsQQ.js","assets/checkbox-Bo7NjQSg.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-CTR7iqtU.js","assets/drawer-lUKd8lKU.js","assets/index-BuPiMHa9.js","assets/input-CuvBF_Ph.js","assets/suggestion-BZACoewj.js","assets/use-mcp-prompts-PtK6U83h.js","assets/use-org-fs-BIChLUk1.js","assets/question-004-sINsf4GQ.js","assets/use-members-CfUgcELO.js","assets/use-org-auth-client-uVDfk1J4.js","assets/feature-paywall-CwJeuIRd.js","assets/plan-ladder-DV7XXfLd.js","assets/add-connection-dialog-Cs7zmh4q.js","assets/extract-connection-data-DKbP-JSI.js","assets/metadata-D72DunRR.js","assets/connection-D_rVWA-L.js","assets/connection-card-lEfV14ps.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-D_qYz289.js","assets/use-connection-BxvBZ4tG.js","assets/connection-form-helpers-DzSY7y5N.js","assets/authenticate-and-persist-oauth-D4ybQZrl.js","assets/mcp-oauth-CaFmRQFB.js","assets/collection-tabs-C89tqghq.js","assets/badge-Hx3u6P7O.js","assets/use-infinite-scroll-CbWvVc4J.js","assets/useSuspenseInfiniteQuery-DDa2NwUG.js","assets/use-task-board-events-CGpFuIoH.js","assets/use-chat-layout-state-CD_0Irhr.js","assets/use-file-configs-BHY4DaxL.js","assets/site-slug-DebpOoQq.js"])))=>i.map(i=>d[i]);
2
+ import{aO as Le,c as R,b as B,r as P,l as z,j as n,au as re,bM as Ut,av as se,bL as Ue,B as Y,at as Ss,as as Cs,bN as Ns,bK as Is,x as Se,aU as Ts,e4 as we,e5 as gt,a2 as _s,e as Ms,t as Ee,q as ee,X as Ce,d as rt,e1 as Ds,Z as Rs,K as Es,m as Ps,I as Ls,F as Us,H as Fs,G as Ae,aj as xt,ah as vt,ai as bt,h as Os,aG as zs,aF as $s,ak as Bs,cQ as Ks,cU as ye,aK as qs,cW as Qs,aL as At,aP as Ws,a as Ys,U as Gs,V as Hs,ay as tt,a7 as Ft,bT as Js,aE as Zs}from"./index-Dp_K-tWq.js";import{c as Xs,d as Ot,P as en,i as tn}from"./index-CNKB9BLC.js";import{s as zt}from"./XClose-BpmmlEY3.js";import{I as sn}from"./icon-button-CtkCoho4.js";import{F as nn}from"./file-type-icon-z_VVXBs0.js";import{a as on}from"./use-chat-navigation-jtlOMVJv.js";import{b as rn}from"./location-zK0I9Ia6.js";import{d as an,K as ln,b as Vn}from"./shell-layout-D0qEeQ00.js";import{a as cn}from"./repository-binding-CzSKWD7H.js";import{w as dn,A as un}from"./autosend-05UC4VjF.js";import{s as pn,r as yt,i as fn,c as hn,w as mn,H as gn}from"./chat-draft-DMMAinxT.js";import{u as xn}from"./use-session-runtime-D-oBtWdP.js";import{i as $t}from"./LinkBroken01-CjBq0lbN.js";import{i as Bt}from"./ArrowUp-Cib8ewx4.js";import{n as Kt}from"./ShoppingBag01-b9-BhwDR.js";import{i as it}from"./Check-BvCNBJe8.js";import{t as We,aK as qt,a2 as Qt,aL as st,f as at,as as vn,_ as bn,aM as An,q as Wt,aN as Yt,I as yn,aO as jn}from"./agent-icon-CbXn8VZK.js";import{a as Gt}from"./Image01-CPJAhPOP.js";import{h as kn}from"./UserSquare-DeLx8WzD.js";import{i as wn}from"./Upload01-DNxaQbwq.js";import{i as lt}from"./X-BQNprmBf.js";import{a as Fe,b as Ye,c as Ge,h as Sn,j as Cn,k as Nn,l as In,m as Tn,n as _n,o as Mn,u as Vt,p as Dn,e as Rn,s as En,d as Pn}from"./chat-context-CikhzUxM.js";import{o as Ln,z as Un,q as Fn,c as On}from"./thread-intent-CQTmnksY.js";import{i as zn}from"./AlertCircle-B5TmAHNM.js";import{a as $n}from"./Copy01-B3CEXdpv.js";import{a as nt,b as ct,d as dt,f as ut,F as Ht}from"./form-PsTlToCZ.js";import{c as Bn,S as Kn,b as qn,a as Qn,d as Wn}from"./select-CoyCwgyB.js";import{t as Jt}from"./ChevronUp-BwSgHBqC.js";import{T as He,a as Je,b as Ze}from"./tooltip-volhiTDm.js";import{i as Yn}from"./ArrowLeft-9GJFW4LS.js";import{i as Zt,M as Gn,S as Hn}from"./usage-stats-u1xk4pvh.js";import{c as Jn,b as Zn}from"./tabs-_ZXrvPf9.js";import{d as Xn,h as eo,c as to,b as so,D as no}from"./dialog-Cx4yDOtp.js";import{e as Oe,f as oo,c as ro,g as io}from"./use-decopilot-events-D3zb74bk.js";import{u as ao}from"./use-deco-credits-B3LiNfwz.js";import{I as lo}from"./input-DMPfmuCm.js";import{T as jt,a as Vo}from"./toggle-group-C6cnvdcW.js";import{s as co}from"./tool-namespace-DmnQIdtF.js";import{t as uo}from"./utils-CVEq3hMx.js";import{u as po}from"./use-open-billing-url-D9fhhg-C.js";import{M as fo,m as pt,g as ho,a as mo}from"./decopilot-CBk7MsQQ.js";import{a as Xt,b as es,P as ts}from"./popover-CTR7iqtU.js";import{c as go,b as xo,a as vo,D as bo}from"./drawer-lUKd8lKU.js";import{u as ss}from"./use-mobile-D_zVYgcY.js";import{t as Ao}from"./Tool01-3oVxsToy.js";import{d as yo,a as jo}from"./use-organization-settings-BScH3qwG.js";import{u as ns,c as ko,d as wo}from"./use-ai-providers-DSD7VYyN.js";import{M as So}from"./index-BuPiMHa9.js";import{p as os,u as Co,T as No,a as Io,U as To}from"./input-CuvBF_Ph.js";import{d as _o,g as kt,s as Mo}from"./gateway-client-O3BwGZz4.js";import{u as Do}from"./use-mcp-client-BUFdpLoI.js";import{l as Ro,g as Eo}from"./use-mcp-prompts-PtK6U83h.js";import{i as Po}from"./Link01-VVuQkQsn.js";import{s as wt}from"./Plus-DLW5olp7.js";import"./suggestion-BZACoewj.js";import{p as Lo,q as Uo}from"./question-004-sINsf4GQ.js";import{A as Fo}from"./avatar-D8csOeeF.js";import{u as Oo}from"./use-members-CfUgcELO.js";import{F as St}from"./feature-paywall-CwJeuIRd.js";import{A as zo}from"./add-connection-dialog-Cs7zmh4q.js";import{u as $o}from"./use-task-board-events-CGpFuIoH.js";import{d as Bo}from"./use-chat-layout-state-CD_0Irhr.js";import{u as Ko}from"./use-is-desktop-app-BNujXJc_.js";const qo=Le("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const Qo=Le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const Wo=Le("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Yo=Le("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Go=Le("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),et="cubic-bezier(0.645, 0.045, 0.355, 1)",dl=44,Ho={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},Jo={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Zo={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function pe(t){const e=R.c(69),{icon:s,label:o,count:r,title:i,footerLeft:a,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,f=B(),[m,h]=P.useState(d),[g,x]=P.useState(!1);let v;e[0]!==c?(v=()=>{x(!0),c?.()},e[0]=c,e[1]=v):v=e[1];const b=v;if(g)return null;const j=Jo[p],A=Ho[p];let k;e[2]!==j||e[3]!==A?(k=z("relative flex flex-col rounded-xl bg-background border shadow-md","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",j,A),e[2]=j,e[3]=A,e[4]=k):k=e[4];let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=()=>h(Xo),e[5]=w):w=e[5];const y=m&&"rounded-b-none",C=!m&&"rounded-b-xl";let S;e[6]!==y||e[7]!==C?(S=z("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent/50 transition-colors rounded-t-xl",y,C),e[6]=y,e[7]=C,e[8]=S):S=e[8];const I=Zo[p];let N;e[9]!==I?(N=z("shrink-0",I),e[9]=I,e[10]=N):N=e[10];let M;e[11]!==s||e[12]!==N?(M=n.jsx("span",{className:N,children:s}),e[11]=s,e[12]=N,e[13]=M):M=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let D;e[16]!==r?(D=r?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:r}):null,e[16]=r,e[17]=D):D=e[17];const L=m?"rotate(180deg)":"rotate(0deg)";let _;e[18]!==L?(_=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Jt,{size:16,style:{transform:L,transition:`transform 180ms ${et}`}})}),e[18]=L,e[19]=_):_=e[19];let U;e[20]!==f?(U=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=U):U=e[21];let F;e[22]!==f?(F=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=F):F=e[23];let q,$;e[24]!==b?(q=le=>{le.stopPropagation(),b()},$=le=>{(le.key==="Enter"||le.key===" ")&&(le.preventDefault(),le.stopPropagation(),b())},e[24]=b,e[25]=q,e[26]=$):(q=e[25],$=e[26]);let O;e[27]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(lt,{size:16}),e[27]=O):O=e[27];let W;e[28]!==U||e[29]!==F||e[30]!==q||e[31]!==$?(W=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":U,title:F,onClick:q,onKeyDown:$,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:O}),e[28]=U,e[29]=F,e[30]=q,e[31]=$,e[32]=W):W=e[32];let X;e[33]!==m||e[34]!==M||e[35]!==E||e[36]!==D||e[37]!==_||e[38]!==W||e[39]!==S?(X=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":m,onClick:w,className:S,children:[M,E,D,_,W]}),e[33]=m,e[34]=M,e[35]=E,e[36]=D,e[37]=_,e[38]=W,e[39]=S,e[40]=X):X=e[40];const te=m?"1fr":"0fr";let J;e[41]!==te?(J={display:"grid",gridTemplateRows:te,transition:`grid-template-rows 180ms ${et}`},e[41]=te,e[42]=J):J=e[42];let ae;e[43]===Symbol.for("react.memo_cache_sentinel")?(ae={overflow:"hidden",minHeight:0},e[43]=ae):ae=e[43];const T=m?1:0;let Q;e[44]!==T?(Q={opacity:T,transition:`opacity 120ms ${et}`,maxHeight:"60vh"},e[44]=T,e[45]=Q):Q=e[45];let Z;e[46]!==i?(Z=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=Z):Z=e[47];let H;e[48]!==V||e[49]!==i?(H=V?n.jsx("div",{className:z("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=H):H=e[50];let ne;e[51]!==Z||e[52]!==H?(ne=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[Z,H]}),e[51]=Z,e[52]=H,e[53]=ne):ne=e[53];let G;e[54]!==a||e[55]!==l?(G=a||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:a}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=a,e[55]=l,e[56]=G):G=e[56];let ce;e[57]!==Q||e[58]!==ne||e[59]!==G?(ce=n.jsx("div",{style:ae,children:n.jsxs("div",{className:"flex flex-col",style:Q,children:[ne,G]})}),e[57]=Q,e[58]=ne,e[59]=G,e[60]=ce):ce=e[60];let ie;e[61]!==J||e[62]!==ce?(ie=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:J,children:ce}),e[61]=J,e[62]=ce,e[63]=ie):ie=e[63];let fe;return e[64]!==X||e[65]!==ie||e[66]!==k||e[67]!==p?(fe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:k,children:[X,ie]}),e[64]=X,e[65]=ie,e[66]=k,e[67]=p,e[68]=fe):fe=e[68],fe}function Xo(t){return!t}const er=re({content:se().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Ue(["pending","in_progress","completed"]),activeForm:se().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),rs=re({todos:Ut(er)}),tr="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";Ln({description:tr,inputSchema:Un(rs),execute:async({todos:t})=>({ok:!0,count:t.length})});const sr="tool-todo_write",nr=new Set(["input-available","output-available"]);function or(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let r=o.length-1;r>=0;r--){const i=o[r];if(i.type!==sr||typeof i.state!="string"||!nr.has(i.state))continue;const a=rs.safeParse(i.input);if(a.success)return a.data.todos}}return[]}function is(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:uo(co(o)),input:s.input})}return e}function as(t){return t.at(-1)}function ls(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function rr(t){return t?t.message.startsWith("[CREDITS]"):!1}const ir={isCreditExhausted:!1,planRefusal:null,subscriptionErrorKind:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function ar(t){const{messages:e,error:s,finishReason:o,isStreaming:r,isWaitingForApprovals:i}=t;if(!r&&s&&rr(s))return{...ir,isCreditExhausted:!0};const a=e.at(-1),l=a?.role==="assistant"?a.parts:[],V=l,u=!!V.filter(k=>k.type==="tool-user_ask").filter(k=>k.state!=="output-available").length,c=V.some(Zt),p=ls(l),f=is(V),m=or(e),h=r?null:pn(s),g=r?null:Fn(s),x=!r&&!!s&&!h&&!g,v=f.length>0||r&&i,b=p.length>0,A=!r&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||b||c))&&!x;return{isCreditExhausted:!1,planRefusal:g,subscriptionErrorKind:h,hasTodos:m.length>0,showError:x,showWarning:A,hasApprovals:v,hasPlans:b,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:m}}function Vs(){const t=R.c(6),{messages:e,error:s,finishReason:o,isStreaming:r,isWaitingForApprovals:i}=Fe(),a=s??null,l=o??null;let V;return t[0]!==r||t[1]!==i||t[2]!==e||t[3]!==a||t[4]!==l?(V=ar({messages:e,error:a,finishReason:l,isStreaming:r,isWaitingForApprovals:i}),t[0]=r,t[1]=i,t[2]=e,t[3]=a,t[4]=l,t[5]=V):V=t[5],V}function ul(){const t=Vs(),e=Oe("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.subscriptionErrorKind+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const Ct="start-task",lr=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
3
3
 
4
4
  1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
5
5
  2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name.
6
6
  3. Call TASK_BOARD_ITEM_CREATE with a concise title, the full description, the chosen repo as owner/name, assigneeId "super-agent", and onDuplicate "return_existing". That assignment is what queues the work; the duplicate option makes the tool hand back an existing task when one already covers this report instead of opening a second one.
7
7
  4. Reply with the task key the tool returned (e.g. DECO-144) and one line on what you filed. If the output says \`deduplicated: true\`, say the report was already tracked by that task and quote its \`duplicateReason\`. Never invent a URL. Do NOT implement the fix here; the task's own run does that, and the reporter gets an email when its PR is ready for review.
8
8
 
9
- The report follows.`;function Vr(t){return{...t,content:[{type:"paragraph",content:[Xs({id:Ct,name:Ct,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:lr}}]})]},...t.content??[]]}}function cr(){const t=R.c(24),e=B(),s=on();if(!s)return null;let o,r,i,a;t[0]!==s.path||t[1]!==e?(o=rn(s.path),a="flex px-3 pt-3",r="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:o}),t[0]=s.path,t[1]=e,t[2]=o,t[3]=r,t[4]=i,t[5]=a):(o=t[2],r=t[3],i=t[4],a=t[5]);let l,V;t[6]!==o?(l=n.jsx(nn,{filename:o,className:"h-4 w-3 shrink-0"}),V=n.jsx("span",{className:"truncate",children:o}),t[6]=o,t[7]=l,t[8]=V):(l=t[7],V=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(zt,{size:12}),t[11]=u):u=t[11];let c;t[12]!==s.dismiss||t[13]!==d?(c=n.jsx(sn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=c):c=t[14];let p;t[15]!==r||t[16]!==i||t[17]!==l||t[18]!==V||t[19]!==c?(p=n.jsxs("span",{className:r,title:i,children:[l,V,c]}),t[15]=r,t[16]=i,t[17]=l,t[18]=V,t[19]=c,t[20]=p):p=t[20];let f;return t[21]!==a||t[22]!==p?(f=n.jsx("div",{className:a,children:p}),t[21]=a,t[22]=p,t[23]=f):f=t[23],f}function dr(t){const e=R.c(30),{current:s,total:o,onPrev:r,onNext:i}=t,a=B();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=z("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==a?(u=a("chat.pagination.previousLabel"),e[2]=a,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Yn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==r||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:r,disabled:l,className:d,"aria-label":u,children:c}),e[5]=r,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let m;e[10]!==a||e[11]!==f||e[12]!==o?(m=a("chat.pagination.counter",{current:f,total:o}),e[10]=a,e[11]=f,e[12]=o,e[13]=m):m=e[13];let h;e[14]!==m?(h=n.jsx("span",{className:"tabular-nums text-xs",children:m}),e[14]=m,e[15]=h):h=e[15];const g=s===o-1,x=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let v;e[16]!==x?(v=z("p-0.5 transition-colors rounded-lg",x),e[16]=x,e[17]=v):v=e[17];let b;e[18]!==a?(b=a("chat.pagination.nextLabel"),e[18]=a,e[19]=b):b=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx($t,{size:14}),e[20]=j):j=e[20];let A;e[21]!==i||e[22]!==g||e[23]!==v||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:g,className:v,"aria-label":b,children:j}),e[21]=i,e[22]=g,e[23]=v,e[24]=b,e[25]=A):A=e[25];let k;return e[26]!==A||e[27]!==p||e[28]!==h?(k=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,h,A]}),e[26]=A,e[27]=p,e[28]=h,e[29]=k):k=e[29],k}function cs(t){const e=R.c(8),{currentIndex:s,total:o,onPrev:r,onNext:i,extraLeft:a}=t;let l;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==o?(l=n.jsx(dr,{current:s,total:o,onPrev:r,onNext:i}),e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==a||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,a]}),e[5]=a,e[6]=l,e[7]=V):V=e[7],V}function ur(t){const e=R.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:r,onAdvanceOrSubmit:i,submitLabel:a,nextLabel:l}=t,u=o?a===void 0?"Submit":a:l===void 0?"Next":l,c=o?s:!r,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==c||e[1]!==i?(f=()=>{c||i()},e[0]=c,e[1]=i,e[2]=f):f=e[2];const m=c&&"opacity-50 cursor-not-allowed";let h;e[3]!==m?(h=z("h-7 px-2.5 text-xs",m),e[3]=m,e[4]=h):h=e[4];let g;e[5]!==c||e[6]!==u||e[7]!==f||e[8]!==h?(g=n.jsx(Y,{type:"button",size:"sm","aria-disabled":c,onClick:f,className:h,children:u}),e[5]=c,e[6]=u,e[7]=f,e[8]=h,e[9]=g):g=e[9];const x=g;if(!p)return x;let v;e[10]!==x?(v=n.jsx(He,{asChild:!0,children:x}),e[10]=x,e[11]=v):v=e[11];let b;e[12]!==p?(b=n.jsx(Je,{children:p}),e[12]=p,e[13]=b):b=e[13];let j;return e[14]!==v||e[15]!==b?(j=n.jsxs(Ze,{children:[v,b]}),e[14]=v,e[15]=b,e[16]=j):j=e[16],j}function ds(t,e,s){return t.findIndex(o=>e(o)===s)}function Nt(t,e,s,o){return t.length===0?!1:t.every(r=>o(s[e(r)]))}function It(t,e,s,o,r){if(t.length===0)return null;const i=ds(t,e,r);for(let a=1;a<=t.length;a++){const l=t[(i+a)%t.length];if(!l)continue;const V=e(l);if(V!==r&&!o(s[V]))return V}return null}function pr(t){return!t.isStreaming&&t.allAnswered}function us(t){const{parts:e,partKey:s,schema:o,defaultValues:r,isStreaming:i,hasAnswer:a,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=P.useState(V),[c,p]=P.useState(!1),f=Ss({resolver:Cs(o),defaultValues:r}),m=f.watch(),h=ds(e,s,d),g=h>=0?e[h]:void 0,x=a(m[d]),v=Nt(e,s,m,a),b=pr({isStreaming:i,allAnswered:v}),j=()=>{if(h>0){const I=e[h-1];I&&u(s(I))}},A=()=>{if(h>=0&&h<e.length-1){const I=e[h+1];I&&u(s(I))}},k=()=>{const I=f.getValues(),N=It(e,s,I,a,d);N&&u(N)},w=()=>{f.handleSubmit(I=>{const N=I;for(const M of e)l(M,N[s(M)])})()},y=P.useRef(w);y.current=w;const C=()=>{b&&(p(!1),y.current())},S=()=>{const I=f.getValues();if(Nt(e,s,I,a)){if(i){p(!0);return}p(!1),y.current()}else{const N=It(e,s,I,a,d);N&&u(N)}};return P.useEffect(()=>{if(c&&!i){if(!v){p(!1);return}p(!1),y.current()}},[c,i,v]),{form:f,activeKey:d,setActiveKey:u,currentIndex:h,currentPart:g,isCurrentAnswered:x,isAllAnswered:v,canSubmit:b,goPrev:j,goNext:A,advanceToNextUnanswered:k,submit:C,submitOrAdvance:S}}const ps="chat.approval.defaultDenyReason";function fs(t){const e=R.c(36),{onYolo:s}=t,o=B(),[r,i]=Se();let a,l,V,d,u,c,p,f,m;if(e[0]!==s||e[1]!==r||e[2]!==i||e[3]!==o){const j=we.find(w=>w.value===r.toolApprovalLevel)??we[0];let A;e[13]!==s||e[14]!==r||e[15]!==i?(A=w=>{const y=w,C=r.toolApprovalLevel??"readonly";i({...r,toolApprovalLevel:y}),y==="auto"&&s(C)},e[13]=s,e[14]=r,e[15]=i,e[16]=A):A=e[16];const k=A;V=Kn,f=r.toolApprovalLevel,m=k,l=qn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent/60 h-7 gap-1",p=fr,a=Qn,d=o(j.shortKey),e[0]=s,e[1]=r,e[2]=i,e[3]=o,e[4]=a,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=f,e[12]=m}else a=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],f=e[11],m=e[12];let h;e[17]!==a||e[18]!==d?(h=n.jsx(a,{children:d}),e[17]=a,e[18]=d,e[19]=h):h=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==h?(g=n.jsx(l,{size:u,className:c,onClick:p,children:h}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=h,e[25]=g):g=e[25];let x;e[26]!==o?(x=we.map(j=>n.jsx(Bn,{value:j.value,children:o(j.labelKey)},j.value)),e[26]=o,e[27]=x):x=e[27];let v;e[28]!==x?(v=n.jsx(Wn,{children:x}),e[28]=x,e[29]=v):v=e[29];let b;return e[30]!==V||e[31]!==v||e[32]!==f||e[33]!==m||e[34]!==g?(b=n.jsxs(V,{value:f,onValueChange:m,children:[g,v]}),e[30]=V,e[31]=v,e[32]=f,e[33]=m,e[34]=g,e[35]=b):b=e[35],b}function fr(t){return t.stopPropagation()}function hs(t){const e=R.c(8),{input:s}=t,o=B();if(s==null){let a;e[0]!==o?(a=o("chat.approval.noInput"),e[0]=o,e[1]=a):a=e[1];let l;return e[2]!==a?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=l):l=e[3],l}let r;try{let a;e[4]!==s?(a=JSON.stringify(s,null,2),e[4]=s,e[5]=a):a=e[5],r=a}catch{r=String(s)}let i;return e[6]!==r?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:r})}),e[6]=r,e[7]=i):i=e[7],i}function hr(t){const e=R.c(38),{approval:s,onRespond:o}=t,r=B(),[i]=Se(),a=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==a||e[2]!==o||e[3]!==r?(l=()=>o(s.approvalId,!1,r(ps),a),e[0]=s.approvalId,e[1]=a,e[2]=o,e[3]=r,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==a||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,a),e[5]=s.approvalId,e[6]=a,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let f;e[12]!==p?(f=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(fs,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const m=f;let h;e[14]!==r?(h=r("chat.approval.denyButton"),e[14]=r,e[15]=h):h=e[15];let g;e[16]!==V||e[17]!==h?(g=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:h}),e[16]=V,e[17]=h,e[18]=g):g=e[18];let x;e[19]!==r?(x=r("chat.approval.acceptButton"),e[19]=r,e[20]=x):x=e[20];let v;e[21]!==u||e[22]!==x?(v=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:x}),e[21]=u,e[22]=x,e[23]=v):v=e[23];let b;e[24]!==g||e[25]!==v?(b=n.jsxs(n.Fragment,{children:[g,v]}),e[24]=g,e[25]=v,e[26]=b):b=e[26];const j=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(We,{size:14}),e[27]=A):A=e[27];let k;e[28]!==r?(k=r("chat.approval.needsApproval"),e[28]=r,e[29]=k):k=e[29];let w;e[30]!==s.input?(w=n.jsx(hs,{input:s.input}),e[30]=s.input,e[31]=w):w=e[31];let y;return e[32]!==s.friendlyName||e[33]!==m||e[34]!==j||e[35]!==k||e[36]!==w?(y=n.jsx(pe,{icon:A,label:k,title:s.friendlyName,defaultExpanded:!0,footerLeft:m,footerRight:j,children:w}),e[32]=s.friendlyName,e[33]=m,e[34]=j,e[35]=k,e[36]=w,e[37]=y):y=e[37],y}const mr=Ns(se(),re({approved:Is().optional(),levelOverride:Ue(["auto","readonly"]).optional()}));function gr(t){const e=R.c(46),{approvals:s,isStreaming:o,onRespond:r}=t,i=B(),[a]=Se(),l=a.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(br)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==r||e[4]!==i?(u=(N,M)=>{const E=M;typeof E?.approved=="boolean"&&r(N.approvalId,E.approved,E.approved===!1?i(ps):void 0,E.levelOverride??l)},e[2]=l,e[3]=r,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:vr,schema:mr,defaultValues:d,isStreaming:o,hasAnswer:xr,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=us(c);let f;e[11]!==s||e[12]!==p?(f=N=>{p.form.reset(Object.fromEntries(s.map(M=>[M.approvalId,{approved:!0,levelOverride:N}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const m=f,h=p.currentPart,g=p.form;let x;e[14]!==p?(x=N=>{N.preventDefault(),p.submit()},e[14]=p,e[15]=x):x=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(We,{size:14}),e[16]=v):v=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const j=h?.friendlyName??"";let A;e[20]!==m?(A=n.jsx(fs,{onYolo:m}),e[20]=m,e[21]=A):A=e[21];let k;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(k=n.jsx(cs,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=k):k=e[27];let w;e[28]!==h||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(w=h?n.jsx(Ar,{approvalId:h.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=h,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=w):w=e[31];let y;e[32]!==h?(y=h?n.jsx(hs,{input:h.input}):null,e[32]=h,e[33]=y):y=e[33];let C;e[34]!==k||e[35]!==w||e[36]!==y||e[37]!==b||e[38]!==j?(C=n.jsx(pe,{icon:v,label:b,title:j,defaultExpanded:!0,footerLeft:k,footerRight:w,children:y}),e[34]=k,e[35]=w,e[36]=y,e[37]=b,e[38]=j,e[39]=C):C=e[39];let S;e[40]!==C||e[41]!==x?(S=n.jsx("form",{onSubmit:x,children:C}),e[40]=C,e[41]=x,e[42]=S):S=e[42];let I;return e[43]!==p.form||e[44]!==S?(I=n.jsx(nt,{...g,children:S}),e[43]=p.form,e[44]=S,e[45]=I):I=e[45],I}function xr(t){return typeof t?.approved=="boolean"}function vr(t){return t.approvalId}function br(t){return[t.approvalId,{approved:void 0}]}function Ar(t){const e=R.c(7),{approvalId:s,control:o,onChange:r}=t,i=B(),a=`${s}.approved`;let l;e[0]!==r||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(Y,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),r()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(Y,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),r()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=r,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==a||e[5]!==l?(V=n.jsx(Ts,{control:o,name:a,render:l}),e[3]=o,e[4]=a,e[5]=l,e[6]=V):V=e[6],V}function yr(){const t=R.c(5),e=B();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(We,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let r;return t[3]!==o?(r=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=r):r=t[4],r}function jr(t){const e=R.c(8),{approvals:s,isStreaming:o,onRespond:r}=t;if(o&&s.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(yr,{}),e[0]=a):a=e[0],a}if(s.length===0)return null;if(s.length===1){const a=s[0];if(!a)return null;let l;return e[1]!==r||e[2]!==a?(l=n.jsx(hr,{approval:a,onRespond:r}),e[1]=r,e[2]=a,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==r?(i=n.jsx(gr,{approvals:s,isStreaming:o,onRespond:r}),e[4]=s,e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function kr(t){const e=R.c(28),{plan:s,onApprove:o,onDismiss:r}=t,i=B();let a;e[0]!==o||e[1]!==s.plan?(a=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=a):a=e[2];const l=a;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==r||e[6]!==V?(d=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:r,children:V}),e[5]=r,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const f=p;let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(qt,{size:14}),e[16]=m):m=e[16];let h;e[17]!==i?(h=i("chat.proposePlan.planReady"),e[17]=i,e[18]=h):h=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let x;e[21]!==s.plan?(x=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(Gn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=x):x=e[22];let v;return e[23]!==f||e[24]!==x||e[25]!==h||e[26]!==g?(v=n.jsx(pe,{icon:m,label:h,title:g,defaultExpanded:!0,footerRight:f,children:x}),e[23]=f,e[24]=x,e[25]=h,e[26]=g,e[27]=v):v=e[27],v}function wr(t){const e=R.c(6),{plans:s,onApprove:o,onDismiss:r}=t;let i;e[0]!==s?(i=as(s),e[0]=s,e[1]=i):i=e[1];const a=i;if(!a)return null;let l;return e[2]!==a||e[3]!==o||e[4]!==r?(l=n.jsx(kr,{plan:a,onApprove:o,onDismiss:r}),e[2]=a,e[3]=o,e[4]=r,e[5]=l):l=e[5],l}function ms(t){return t?"response"in t?t.response:t.option??t.draft:""}const Tt=re({response:se().min(1,"Response is required")}),Sr=re({option:se().nullable(),draft:se()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Cr=re({response:Ue(["yes","no"])});function Nr(t){switch(t.type){case"text":return Tt;case"choice":return Sr;case"confirm":return Cr;default:return Tt}}function Ir(t){const e={};for(const s of t)e[s.toolCallId]=Nr(s.input);return re(e)}function Tr(t){const e=R.c(7),{control:s,name:o,placeholder:r}=t,i=B();let a;e[0]!==r||e[1]!==i?(a=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(ct,{children:[n.jsx(dt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Qt,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:r||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ut,{})]})},e[0]=r,e[1]=i,e[2]=a):a=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=n.jsx(Ht,{control:s,name:o,render:a}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l}function gs(t,e){const s=R.c(4);let o,r;s[0]!==t||s[1]!==e?(o=()=>{const i=a=>{if(an(a.target)||a.metaKey||a.ctrlKey||a.altKey)return;const l=Number.parseInt(a.key,10);l>=1&&l<=t&&(a.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},r=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=r):(o=s[2],r=s[3]),P.useEffect(o,r)}function _r(t){const e=R.c(51),{control:s,name:o,options:r}=t,i=B(),a=`${o}.option`;let l;e[0]!==s||e[1]!==a?(l={control:s,name:a,defaultValue:null},e[0]=s,e[1]=a,e[2]=l):l=e[2];const{field:V}=gt(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=gt(u),p=V.value,f=c.value??"";let m;if(e[6]!==V||e[7]!==r?(m=L=>{const _=r[L];_!=null&&V.onChange(_)},e[6]=V,e[7]=r,e[8]=m):m=e[8],gs(r.length,m),r.length===0)return null;const h=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let x;if(e[11]!==V||e[12]!==p||e[13]!==r||e[14]!==i){let L;e[16]!==V||e[17]!==p||e[18]!==i?(L=(_,U)=>{const F=p===_;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(_),className:z("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",F&&"bg-accent/50",!F&&"hover:bg-accent/30"),"aria-label":i("chat.userAskQuestion.selectOption",{option:_}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",F?"bg-chart-1 text-white":"bg-muted text-foreground"),children:U+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:_})]},`${U}-${_}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=L):L=e[19],x=r.map(L),e[11]=V,e[12]=p,e[13]=r,e[14]=i,e[15]=x}else x=e[15];const v=h&&"bg-accent/50",b=!h&&"hover:bg-accent/30";let j;e[20]!==v||e[21]!==b?(j=z("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",v,b),e[20]=v,e[21]=b,e[22]=j):j=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Qt,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const k=h?f:"";let w;e[24]!==c||e[25]!==V||e[26]!==p?(w=L=>{c.onChange(L.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=w):w=e[27];let y;e[28]!==V||e[29]!==p?(y=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=y):y=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let S;e[33]!==i?(S=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=S):S=e[34];let I;e[35]!==k||e[36]!==w||e[37]!==y||e[38]!==C||e[39]!==S?(I=n.jsx("input",{type:"text",value:k,onChange:w,onFocus:y,placeholder:C,"aria-label":S,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=k,e[36]=w,e[37]=y,e[38]=C,e[39]=S,e[40]=I):I=e[40];let N;e[41]!==j||e[42]!==I?(N=n.jsxs("label",{className:j,children:[A,I]}),e[41]=j,e[42]=I,e[43]=N):N=e[43];let M;e[44]!==N||e[45]!==g||e[46]!==x?(M=n.jsx(dt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[x,N]})}),e[44]=N,e[45]=g,e[46]=x,e[47]=M):M=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ut,{}),e[48]=E):E=e[48];let D;return e[49]!==M?(D=n.jsxs(ct,{children:[M,E]}),e[49]=M,e[50]=D):D=e[50],D}function Mr(t){const e=R.c(8),{control:s,name:o}=t,r=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const a=i,l=P.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(a[c]??"")},e[1]=V):V=e[1],gs(a.length,V);let d;e[2]!==r?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(ct,{children:[n.jsx(dt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":r("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:a.map(f=>{const m=p.value===f;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:z("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",m&&"bg-accent/50",!m&&"hover:bg-accent/30"),"aria-label":r("chat.userAskQuestion.confirmValue",{value:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0",m?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),n.jsx(ut,{})]})},e[2]=r,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Ht,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function _t(t){const e=R.c(13),{input:s,control:o,toolCallId:r}=t;switch(s.type){case"text":{const i=`${r}.response`;let a;return e[0]!==o||e[1]!==s.default||e[2]!==i?(a=n.jsx(Tr,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=a):a=e[3],a}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const a=i;let l;return e[6]!==o||e[7]!==a||e[8]!==r?(l=n.jsx(_r,{control:o,name:r,options:a}),e[6]=o,e[7]=a,e[8]=r,e[9]=l):l=e[9],l}case"confirm":{const i=`${r}.response`;let a;return e[10]!==o||e[11]!==i?(a=n.jsx(Mr,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=a):a=e[12],a}default:return null}}function Dr(t){const e=R.c(91),{parts:s,isStreaming:o,onSubmit:r}=t;let i;e[0]!==s?(i=Ir(s.map(Lr)),e[0]=s,e[1]=i):i=e[1];const a=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(Pr)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==r?(d=($,O)=>{const W=ms(O);W&&r($,W)},e[4]=r,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==a||e[10]!==d?(u={parts:s,partKey:Er,schema:a,defaultValues:V,isStreaming:o,hasAnswer:Rr,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=a,e[10]=d,e[11]=u):u=e[11];const c=us(u),p=c.currentPart,f=B();let m;e[12]!==p||e[13]!==c||e[14]!==f?(m=()=>{const $=p;if(!$)return;const O=f("chat.userAskQuestion.skipMessage"),W=$.toolCallId;$.input?.type==="choice"?(c.form.setValue(`${W}.option`,null),c.form.setValue(`${W}.draft`,O)):c.form.setValue(`${W}.response`,O),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=f,e[15]=m):m=e[15];const h=m;let g;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(g=n.jsx(cs,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=g):g=e[20];const x=g;let v;e[21]!==f?(v=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=v):v=e[22];let b;e[23]!==h||e[24]!==v?(b=n.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:h,className:"h-7",children:v}),e[23]=h,e[24]=v,e[25]=b):b=e[25];let j;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(j=n.jsx(ur,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=j):j=e[30];let A;e[31]!==b||e[32]!==j?(A=n.jsxs(n.Fragment,{children:[b,j]}),e[31]=b,e[32]=j,e[33]=A):A=e[33];const k=A;if(s.length===1){const $=s[0];if(!$?.input)return null;const O=c.form;let W;e[34]!==c?(W=ne=>{ne.preventDefault(),c.submit()},e[34]=c,e[35]=W):W=e[35];let X;e[36]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(st,{size:14}),e[36]=X):X=e[36];let te;e[37]!==f?(te=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=te):te=e[38];let J;e[39]!==$.input?.prompt||e[40]!==f?(J=$.input?.prompt??f("chat.userAskQuestion.question"),e[39]=$.input?.prompt,e[40]=f,e[41]=J):J=e[41];const ae=$.input;let T;e[42]!==c.form.control||e[43]!==$.toolCallId||e[44]!==ae?(T=n.jsx(_t,{input:ae,control:c.form.control,toolCallId:$.toolCallId}),e[42]=c.form.control,e[43]=$.toolCallId,e[44]=ae,e[45]=T):T=e[45];let Q;e[46]!==k||e[47]!==te||e[48]!==J||e[49]!==T?(Q=n.jsx(pe,{icon:X,label:te,title:J,defaultExpanded:!0,footerRight:k,children:T}),e[46]=k,e[47]=te,e[48]=J,e[49]=T,e[50]=Q):Q=e[50];let Z;e[51]!==W||e[52]!==Q?(Z=n.jsx("form",{onSubmit:W,autoComplete:"off",children:Q}),e[51]=W,e[52]=Q,e[53]=Z):Z=e[53];let H;return e[54]!==c.form||e[55]!==Z?(H=n.jsx(nt,{...O,children:Z}),e[54]=c.form,e[55]=Z,e[56]=H):H=e[56],H}const w=c.form;let y;e[57]!==c?(y=$=>{$.preventDefault(),c.submit()},e[57]=c,e[58]=y):y=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(st,{size:14}),e[59]=C):C=e[59];let S;e[60]!==f?(S=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=S):S=e[61];const I=c.currentIndex+1;let N;e[62]!==s.length||e[63]!==f||e[64]!==I?(N=f("chat.userAskQuestion.questionCount",{current:I,total:s.length}),e[62]=s.length,e[63]=f,e[64]=I,e[65]=N):N=e[65];let M;e[66]!==p?.input?.prompt||e[67]!==f?(M=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=M):M=e[68];const E=c.activeKey,D=c.setActiveKey;let L;if(e[69]!==c.form||e[70]!==s){let $;e[72]!==c.form?($=O=>n.jsx(Jn,{value:O.toolCallId,className:"mt-0",children:n.jsx(_t,{input:O.input,control:c.form.control,toolCallId:O.toolCallId})},O.toolCallId),e[72]=c.form,e[73]=$):$=e[73],L=s.map($),e[69]=c.form,e[70]=s,e[71]=L}else L=e[71];let _;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==L?(_=n.jsx(Zn,{value:E,onValueChange:D,children:L}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=L,e[77]=_):_=e[77];let U;e[78]!==x||e[79]!==k||e[80]!==S||e[81]!==N||e[82]!==M||e[83]!==_?(U=n.jsx(pe,{icon:C,label:S,count:N,title:M,defaultExpanded:!0,footerLeft:x,footerRight:k,children:_}),e[78]=x,e[79]=k,e[80]=S,e[81]=N,e[82]=M,e[83]=_,e[84]=U):U=e[84];let F;e[85]!==y||e[86]!==U?(F=n.jsx("form",{onSubmit:y,autoComplete:"off",children:U}),e[85]=y,e[86]=U,e[87]=F):F=e[87];let q;return e[88]!==c.form||e[89]!==F?(q=n.jsx(nt,{...w,children:F}),e[88]=c.form,e[89]=F,e[90]=q):q=e[90],q}function Rr(t){return!!ms(t)}function Er(t){return t.toolCallId}function Pr(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function Lr(t){return{toolCallId:t.toolCallId,input:t.input}}function Ur(){const t=R.c(5),e=B();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(st,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let r;return t[3]!==o?(r=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=r):r=t[4],r}function xs(t){const e=R.c(7),{userAskParts:s,isStreaming:o,onSubmit:r}=t;let i;e[0]!==s?(i=s.filter(Fr),e[0]=s,e[1]=i):i=e[1];const a=i;if(a.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Ur,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==r||e[5]!==a?(l=n.jsx(Dr,{parts:a,isStreaming:o,onSubmit:r}),e[3]=o,e[4]=r,e[5]=a,e[6]=l):l=e[6],l}function Fr(t){return t.state==="input-available"}function Or(t){const e=R.c(33),{parts:s,isStreaming:o,onRespond:r}=t,i=B();let a;e[0]!==s?(a=s.at(-1),e[0]=s,e[1]=a):a=e[1];const l=a,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==r||e[6]!==l?(p=()=>r(l,!1),e[5]=r,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let m;e[10]!==o||e[11]!==p||e[12]!==f?(m=n.jsx(Y,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:f}),e[10]=o,e[11]=p,e[12]=f,e[13]=m):m=e[13];let h;e[14]!==r||e[15]!==l?(h=()=>r(l,!0),e[14]=r,e[15]=l,e[16]=h):h=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let x;e[19]!==o||e[20]!==h||e[21]!==g?(x=n.jsx(Y,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:h,children:g}),e[19]=o,e[20]=h,e[21]=g,e[22]=x):x=e[22];let v;e[23]!==x||e[24]!==m?(v=n.jsxs(n.Fragment,{children:[m,x]}),e[23]=x,e[24]=m,e[25]=v):v=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let j;return e[28]!==V.title||e[29]!==v||e[30]!==b||e[31]!==u?(j=n.jsx(pe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:v,children:b}),e[28]=V.title,e[29]=v,e[30]=b,e[31]=u,e[32]=j):j=e[32],j}function zr(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[r]=e;return r&&e.length===1?{icon:"in_progress",activity:r.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function $r(t){const e=R.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=zr(s),e[0]=s,e[1]=o):o=e[1];const r=o;let i;e[2]!==r.icon?(i=n.jsx(Qr,{status:r.icon}),e[2]=r.icon,e[3]=i):i=e[3];const a=r.activity,l=r.progress;let V;e[4]!==s?(V=s.map(Br),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==r.activity||e[9]!==r.progress||e[10]!==i||e[11]!==d?(u=n.jsx(pe,{icon:i,label:a,count:l,defaultExpanded:!1,children:d}),e[8]=r.activity,e[9]=r.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function Br(t,e){return n.jsx(Kr,{todo:t},e)}function Kr(t){const e=R.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let a;e[0]!==s.status?(a=n.jsx(qr,{status:s.status}),e[0]=s.status,e[1]=a):a=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=z("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let f;return e[11]!==a||e[12]!==p?(f=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent/50 transition-colors",children:[a,p]}),e[11]=a,e[12]=p,e[13]=f):f=e[13],f}function qr(t){const e=R.c(4),{status:s}=t,o=s==="completed"?"true":void 0,r=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let a;return e[1]!==o||e[2]!==r?(a=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":r,"aria-hidden":"true",children:i}),e[1]=o,e[2]=r,e[3]=a):a=e[3],a}function Qr(t){const e=R.c(13),{status:s}=t,o=B();if(s==="completed"){let a;e[0]!==o?(a=o("chat.todoStatus.completed"),e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==a?(V=n.jsx("span",{"aria-label":a,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=a,e[4]=V):V=e[4],V}if(s==="in_progress"){let a;e[5]!==o?(a=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=a):a=e[6];let l;return e[7]!==a?(l=n.jsx("span",{"aria-label":a,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=a,e[8]=l):l=e[8],l}let r;e[9]!==o?(r=o("chat.todoStatus.pending"),e[9]=o,e[10]=r):r=e[10];let i;return e[11]!==r?(i=n.jsx("span",{"aria-label":r,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=r,e[12]=i):i=e[12],i}const Wr={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Yr={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Gr(t){const e=R.c(46),{source:s,onDone:o}=t,r=B(),i=_s(),[a]=Se(),[l,V]=P.useState(a.language==="pt-BR"?"brl":"usd"),[d,u]=P.useState(""),[c,p]=P.useState(!1),f=l==="brl"?"R$":"$";let m;e[0]!==l||e[1]!==i?(m=async _=>{const{url:U}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:_,currency:l});return U},e[0]=l,e[1]=i,e[2]=m):m=e[2];let h;e[3]!==o?(h=_=>{_&&window.open(_,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=h):h=e[4];let g;e[5]!==r?(g=_=>{Ee.error(r("credits.topUp.failed",{message:_.message}))},e[5]=r,e[6]=g):g=e[6];let x;e[7]!==m||e[8]!==h||e[9]!==g?(x={mutationFn:m,onSuccess:h,onError:g},e[7]=m,e[8]=h,e[9]=g,e[10]=x):x=e[10];const{mutate:v,isPending:b}=Ms(x);let j;e[11]!==l||e[12]!==s||e[13]!==v?(j=(_,U)=>{ee("credits_topup_clicked",{amount_cents:_,currency:l,tier_label:U,source:s}),v(_)},e[11]=l,e[12]=s,e[13]=v,e[14]=j):j=e[14];const A=j,k=parseFloat(d),w=!isNaN(k)&&k>=1;let y,C,S;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=_=>{_&&V(_)},C=n.jsx(jt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),S=n.jsx(jt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=y,e[16]=C,e[17]=S):(y=e[15],C=e[16],S=e[17]);let I;e[18]!==l?(I=n.jsx("div",{className:"mb-4",children:n.jsxs(Vo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:y,children:[C,S]})}),e[18]=l,e[19]=I):I=e[19];const N=Wr[l];let M;if(e[20]!==A||e[21]!==f||e[22]!==b||e[23]!==r||e[24]!==N){let _;e[26]!==A||e[27]!==f||e[28]!==b||e[29]!==r?(_=U=>{const{dollars:F,labelKey:q}=U;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(F*100,Yr[q]??"preset"),className:z("relative flex flex-col items-center gap-1 py-5 rounded-xl border transition-all duration-150 cursor-pointer","disabled:opacity-50 disabled:cursor-wait","border-border hover:border-foreground/20 hover:bg-muted/30"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,F]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:r(q)})]},F)},e[26]=A,e[27]=f,e[28]=b,e[29]=r,e[30]=_):_=e[30],M=N.map(_),e[20]=A,e[21]=f,e[22]=b,e[23]=r,e[24]=N,e[25]=M}else M=e[25];let E;e[31]!==M?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:M}),e[31]=M,e[32]=E):E=e[32];let D;e[33]!==A||e[34]!==f||e[35]!==d||e[36]!==k||e[37]!==w||e[38]!==b||e[39]!==c||e[40]!==r?(D=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),n.jsx(lo,{type:"number",min:"1",step:"1",placeholder:r("credits.topUp.customPlaceholder"),value:d,onChange:_=>u(_.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(Y,{className:"h-10",disabled:!w||b,onClick:()=>A(Math.round(k*100),"custom"),children:r(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:r("credits.topUp.enterCustom")}),e[33]=A,e[34]=f,e[35]=d,e[36]=k,e[37]=w,e[38]=b,e[39]=c,e[40]=r,e[41]=D):D=e[41];let L;return e[42]!==E||e[43]!==D||e[44]!==I?(L=n.jsxs("div",{children:[I,E,D]}),e[42]=E,e[43]=D,e[44]=I,e[45]=L):L=e[45],L}const Hr=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Jr(t){const e=R.c(47),{onDismiss:s}=t,{org:o}=Ce(),r=rt(),{decoKeyId:i}=ao(),a=B(),l=Oe("credits");let V,d;if(e[0]!==o.id?(V=()=>{ee("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),P.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=N=>!N&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let m;e[8]!==a?(m=a("chat.creditsExhaustedBanner.title"),e[8]=a,e[9]=m):m=e[9];let h;e[10]!==m?(h=n.jsx(Xn,{className:"text-xl font-semibold tracking-tight",children:m}),e[10]=m,e[11]=h):h=e[11];let g;e[12]!==a?(g=a("chat.creditsExhaustedBanner.description"),e[12]=a,e[13]=g):g=e[13];let x;e[14]!==g?(x=n.jsx(eo,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x||e[17]!==h?(v=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(to,{className:"relative gap-4",children:[f,n.jsxs("div",{children:[h,x]})]})]}),e[16]=x,e[17]=h,e[18]=v):v=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==a?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"rounded-xl border border-border p-5",children:n.jsx(Gr,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Hr.map(N=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(it,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:a(N)})]},N))})]}),e[19]=i,e[20]=s,e[21]=a,e[22]=b):b=e[22];let j;e[23]!==a?(j=a("chat.creditsExhaustedBanner.dismiss"),e[23]=a,e[24]=j):j=e[24];let A;e[25]!==s||e[26]!==j?(A=n.jsx(Y,{variant:"ghost",size:"sm",onClick:s,children:j}),e[25]=s,e[26]=j,e[27]=A):A=e[27];let k;e[28]!==r||e[29]!==s||e[30]!==o.slug?(k=()=>{r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=r,e[29]=s,e[30]=o.slug,e[31]=k):k=e[31];let w;e[32]!==a?(w=a("chat.creditsExhaustedBanner.manageProviders"),e[32]=a,e[33]=w):w=e[33];let y;e[34]!==k||e[35]!==w?(y=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:k,children:w}),e[34]=k,e[35]=w,e[36]=y):y=e[36];let C;e[37]!==A||e[38]!==y?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,y]}),e[37]=A,e[38]=y,e[39]=C):C=e[39];let S;e[40]!==v||e[41]!==b||e[42]!==C?(S=n.jsxs(so,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Zr,children:[v,b,C]}),e[40]=v,e[41]=b,e[42]=C,e[43]=S):S=e[43];let I;return e[44]!==S||e[45]!==u?(I=n.jsx(no,{open:!0,onOpenChange:u,children:S}),e[44]=S,e[45]=u,e[46]=I):I=e[46],I}function Zr(t){return t.preventDefault()}const Xr={trial_exhausted:{label:"chat.subscriptionLimit.trialLabel",title:"chat.subscriptionLimit.trialTitle"},monthly_exhausted:{label:"chat.subscriptionLimit.monthlyLabel",title:"chat.subscriptionLimit.monthlyTitle"},runs_exhausted:{label:"chat.subscriptionLimit.runsLabel",title:"chat.subscriptionLimit.runsTitle"}};function ei(t){const e=R.c(16),{kind:s,onDismiss:o,onSubscribe:r}=t,i=B(),{label:a,title:l}=Xr[s];let V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(at,{size:14}),e[0]=V):V=e[0];let d;e[1]!==a||e[2]!==i?(d=i(a),e[1]=a,e[2]=i,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==l?(u=i(l),e[4]=i,e[5]=l,e[6]=u):u=e[6];let c;e[7]!==s||e[8]!==r||e[9]!==i?(c=s==="trial_exhausted"?n.jsx(Y,{size:"sm",onClick:r,className:"h-7 text-xs",children:i("chat.subscriptionLimit.subscribeButton")}):void 0,e[7]=s,e[8]=r,e[9]=i,e[10]=c):c=e[10];let p;return e[11]!==o||e[12]!==d||e[13]!==u||e[14]!==c?(p=n.jsx(pe,{icon:V,label:d,title:u,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:c}),e[11]=o,e[12]=d,e[13]=u,e[14]=c,e[15]=p):p=e[15],p}const ti={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function Mt(t){const e=R.c(21),{kind:s,onDismiss:o}=t,r=B(),i=rt(),{org:a}=Ce(),{label:l,title:V}=ti[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(at,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==r?(u=r(l),e[1]=l,e[2]=r,e[3]=u):u=e[3];let c;e[4]!==r||e[5]!==V?(c=r(V),e[4]=r,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==a.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:a.slug}}),o()},e[7]=i,e[8]=o,e[9]=a.slug,e[10]=p):p=e[10];let f;e[11]!==r?(f=r("chat.planRefused.seePlans"),e[11]=r,e[12]=f):f=e[12];let m;e[13]!==p||e[14]!==f?(m=n.jsx(Y,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=m):m=e[15];let h;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==m?(h=n.jsx(pe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:m}),e[16]=o,e[17]=u,e[18]=c,e[19]=m,e[20]=h):h=e[20],h}function vs(t){const e=si(t);if(e!==null){const d=vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),r=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),a=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return r||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:a?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function si(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:r}=s,i=typeof o=="string"?o:r;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const ni={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Qe(t){const e=R.c(29),s=B(),{variant:o,onDismiss:r}=t,i=o==="error";let a;e[0]!==i||e[1]!==s?(a=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=a):a=e[2];const l=a,V=i?zn:Rs;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const v=ni[t.finishReason];return v?s(v):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:f}=c;let m;e[11]!==V?(m=n.jsx(V,{size:14}),e[11]=V,e[12]=m):m=e[12];let h;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(h=i?n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=h):h=e[17];let g;e[18]!==f||e[19]!==s?(g=f?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ee.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ee.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx($n,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let x;return e[21]!==l||e[22]!==r||e[23]!==p||e[24]!==m||e[25]!==h||e[26]!==g||e[27]!==o?(x=n.jsx(pe,{icon:m,label:l,title:p,defaultExpanded:!0,variant:o,onClose:r,footerRight:h,children:g}),e[21]=l,e[22]=r,e[23]=p,e[24]=m,e[25]=h,e[26]=g,e[27]=o,e[28]=x):x=e[28],x}function ze(t){const e=R.c(77);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:r}=s,i=o===void 0?!1:o,a=r===void 0?!1:r,l=B(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:f,submit:m,sendMessage:h}=Fe(),[g,x]=Se(),{virtualMcpId:v,createTaskWithMessage:b}=Ye(),{chatMode:j,simpleModeTier:A}=Ge(),k=Oe("credits"),{mutate:w}=po("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");let y;e[2]!==w?(y=()=>w(),e[2]=w,e[3]=y):y=e[3];const C=y;let S;e[4]!==j||e[5]!==A||e[6]!==v||e[7]!==a?(S=oe=>({...a?{voiceMode:!0}:{},tier:A,mode:j,toolApprovalLevel:oe,agent:v?{id:v}:void 0}),e[4]=j,e[5]=A,e[6]=v,e[7]=a,e[8]=S):S=e[8];const I=S;let N;e[9]!==g.toolApprovalLevel?(N=g.toolApprovalLevel??Ds(),e[9]=g.toolApprovalLevel,e[10]=N):N=e[10];const M=N,E=p.at(-1),D=E?.role==="assistant"?E.parts:[],L=D.filter(ai),_=D.filter(Zt),U=ls(D),F=is(D);let q;e[11]!==V||e[12]!==h||e[13]!==l?(q=()=>{if(V){const ue={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};h(ue)}},e[11]=V,e[12]=h,e[13]=l,e[14]=q):q=e[14];const $=q;let O;e[15]!==h||e[16]!==l?(O=()=>{const oe={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};h(oe)},e[15]=h,e[16]=l,e[17]=O):O=e[17];const W=O;let X;e[18]!==I||e[19]!==M||e[20]!==m?(X=(oe,ue)=>{m({kind:"toolOutput",toolCallId:oe.toolCallId,output:{response:ue}},I(M))},e[18]=I,e[19]=M,e[20]=m,e[21]=X):X=e[21];const te=X;let J;e[22]!==I||e[23]!==M||e[24]!==m?(J=(oe,ue)=>{m({kind:"toolOutput",toolCallId:oe.toolCallId,output:{accepted:ue}},I(M))},e[22]=I,e[23]=M,e[24]=m,e[25]=J):J=e[25];const ae=J;let T;e[26]!==b||e[27]!==g||e[28]!==x||e[29]!==l||e[30]!==v?(T=oe=>{x({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:v,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:oe})}]}})},e[26]=b,e[27]=g,e[28]=x,e[29]=l,e[30]=v,e[31]=T):T=e[31];const Q=T,Z=ii;let H;e[32]!==I||e[33]!==m?(H=(oe,ue,Be,be)=>{m({kind:"approval",approvalId:oe,approved:ue,...Be?{reason:Be}:{}},I(be))},e[32]=I,e[33]=m,e[34]=H):H=e[34];const ne=H,G=Vs();if(G.isCreditExhausted){let oe;return e[35]!==k||e[36]!==d||e[37]!==i?(oe=k?n.jsx(Jr,{onDismiss:d}):n.jsx("div",{className:z(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(Mt,{kind:"ai_budget_exhausted",onDismiss:d})}),e[35]=k,e[36]=d,e[37]=i,e[38]=oe):oe=e[38],oe}const{showError:ce,showWarning:ie,hasApprovals:fe}=G,le=L.map(ri).join("|"),$e=as(U)?.toolCallId??"",ht=F.map(oi).join("|"),Ne=!i&&"absolute bottom-full left-0 right-0";let Ve;e[39]!==Ne?(Ve=z(Ne),e[39]=Ne,e[40]=Ve):Ve=e[40];let he;e[41]!==G.todos?(he=n.jsx($r,{todos:G.todos}),e[41]=G.todos,e[42]=he):he=e[42];let ge;e[43]!==d||e[44]!==G.subscriptionErrorKind||e[45]!==C?(ge=G.subscriptionErrorKind&&n.jsx(ei,{kind:G.subscriptionErrorKind,onDismiss:d,onSubscribe:C}),e[43]=d,e[44]=G.subscriptionErrorKind,e[45]=C,e[46]=ge):ge=e[46];let de;e[47]!==d||e[48]!==G.planRefusal?(de=G.planRefusal&&n.jsx(Mt,{kind:G.planRefusal,onDismiss:d}),e[47]=d,e[48]=G.planRefusal,e[49]=de):de=e[49];let xe;e[50]!==d||e[51]!==V||e[52]!==$||e[53]!==ce?(xe=ce&&n.jsx(Qe,{variant:"error",error:V,onDismiss:d,onFixInChat:$}),e[50]=d,e[51]=V,e[52]=$,e[53]=ce,e[54]=xe):xe=e[54];let je;e[55]!==c||e[56]!==u||e[57]!==W||e[58]!==ie?(je=ie&&n.jsx(Qe,{variant:"warning",finishReason:u,onDismiss:c,onContinue:W}),e[55]=c,e[56]=u,e[57]=W,e[58]=ie,e[59]=je):je=e[59];const Ie=fe&&n.jsx(jr,{approvals:F,isStreaming:f,onRespond:ne},ht),_e=G.hasPlans&&n.jsx(wr,{plans:U,isStreaming:f,onApprove:Q,onDismiss:Z},$e),Me=G.hasTaskSuggestion&&n.jsx(Or,{parts:_,isStreaming:f,onRespond:ae},_.at(-1)?.toolCallId??"");let ve;e[60]!==G.isWaitingForUserInput||e[61]!==te||e[62]!==f||e[63]!==le||e[64]!==L?(ve=G.isWaitingForUserInput&&n.jsx(xs,{userAskParts:L,isStreaming:f,onSubmit:te},le),e[60]=G.isWaitingForUserInput,e[61]=te,e[62]=f,e[63]=le,e[64]=L,e[65]=ve):ve=e[65];let ke;return e[66]!==Ve||e[67]!==he||e[68]!==ge||e[69]!==de||e[70]!==xe||e[71]!==je||e[72]!==Ie||e[73]!==_e||e[74]!==Me||e[75]!==ve?(ke=n.jsxs("div",{className:Ve,children:[he,ge,de,xe,je,Ie,_e,Me,ve]}),e[66]=Ve,e[67]=he,e[68]=ge,e[69]=de,e[70]=xe,e[71]=je,e[72]=Ie,e[73]=_e,e[74]=Me,e[75]=ve,e[76]=ke):ke=e[76],ke}function oi(t){return t.approvalId}function ri(t){return t.toolCallId}function ii(){document.querySelector("[data-chat-input]")?.focus()}function ai(t){return t.type==="tool-user_ask"}ze.Error=function(e){return n.jsx(Qe,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};ze.Warning=function(e){return n.jsx(Qe,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};ze.UserAskQuestion=xs;function bs(t){const e=R.c(20),{taskId:s}=t,o=B(),r=Sn(s),i=Cn(r),a=Nn(),{stop:l,removeLocalMessage:V}=Fe();if(i.length===0)return null;let d;e[0]!==o?(d=o("chat.queueTray.sendNow"),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Bt,{size:14}),e[4]=c):c=e[4];let p;e[5]!==d||e[6]!==u?(p=n.jsx(He,{asChild:!0,children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:c})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==o?(f=o("chat.queueTray.sendNow"),e[8]=o,e[9]=f):f=e[9];let m;e[10]!==f?(m=n.jsx(Je,{side:"top",children:n.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=m):m=e[11];let h;e[12]!==p||e[13]!==m?(h=n.jsxs(Ze,{delayDuration:400,children:[p,m]}),e[12]=p,e[13]=m,e[14]=h):h=e[14];let g;return e[15]!==a||e[16]!==V||e[17]!==o||e[18]!==s?(g=(x,v)=>n.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[n.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground dark:bg-background",children:v+1}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:x.text}),n.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{a.cancel(s,x.messageId).then(b=>{b&&(In(s,x.messageId),V(x.messageId))})},children:n.jsx(zt,{className:"size-3.5"})})})]},x.messageId),e[15]=a,e[16]=V,e[17]=o,e[18]=s,e[19]=g):g=e[19],n.jsxs("div",{className:"mb-1 overflow-hidden rounded-2xl border border-border bg-card dark:bg-muted",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[n.jsx("span",{children:o(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),h]}),i.map(g)]})}const li={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Vi(t,e){return li[t]?.test(e)??!1}function ci(t){return ko(t)&&Vi(t.providerId,t.modelId)}function di(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const ui={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function pi(t){const e=R.c(32),{tier:s,orgSlot:o,userSlot:r,autoSlot:i,filterModels:a,onPick:l,onReset:V,onClose:d}=t,u=B(),c=ns(),p=new Set(c.map(fi)),f=Tn([r,o,i],p),m=f?.keyId??null,[h,g]=P.useState(m??c[0]?.id??null),x=c.some(F=>F.id===h)?h:m??c[0]?.id??null,v=x?c.find(F=>F.id===x):null,b="flex h-[70vh] max-h-[460px] w-full flex-col",j=ui[s];let A;e[0]!==u||e[1]!==j?(A=u(j),e[0]=u,e[1]=j,e[2]=A):A=e[2];let k;e[3]!==A?(k=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A}),e[3]=A,e[4]=k):k=e[4];let w;e[5]!==V||e[6]!==u||e[7]!==r?(w=r&&n.jsx("button",{type:"button",onClick:V,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:u("chat.modelPreferences.reset")}),e[5]=V,e[6]=u,e[7]=r,e[8]=w):w=e[8];let y;e[9]!==k||e[10]!==w?(y=n.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[k,w]}),e[9]=k,e[10]=w,e[11]=y):y=e[11];const C="flex-1 min-h-0",S=P.Suspense;let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(fo,{}),e[12]=I):I=e[12];const N=So,M=!0,E=di(m?f:null,v?.providerId??"deco");let D;e[13]!==x||e[14]!==l||e[15]!==g?(D=F=>{const q=F.keyId??x??"";g(q),l({keyId:q,modelId:F.modelId,title:F.title})},e[13]=x,e[14]=l,e[15]=g,e[16]=D):D=e[16];let L;e[17]!==N||e[18]!==x||e[19]!==a||e[20]!==d||e[21]!==g||e[22]!==E||e[23]!==D?(L=n.jsx(N,{compact:M,filterModels:a,onClose:d,credentialId:x,onCredentialChange:g,selectedModel:E,onModelChange:D}),e[17]=N,e[18]=x,e[19]=a,e[20]=d,e[21]=g,e[22]=E,e[23]=D,e[24]=L):L=e[24];let _;e[25]!==S||e[26]!==L||e[27]!==I?(_=n.jsx("div",{className:C,children:n.jsx(S,{fallback:I,children:L})}),e[25]=S,e[26]=L,e[27]=I,e[28]=_):_=e[28];let U;return e[29]!==_||e[30]!==y?(U=n.jsxs("div",{className:b,children:[y,_]}),e[29]=_,e[30]=y,e[31]=U):U=e[31],U}function fi(t){return t.id}const hi=["fast","smart","thinking"];function As(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const Dt={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function mi(t){const e=R.c(28),{tier:s,pillIcon:o,groups:r}=t,i=B();let a;e[0]!==i?(a=As(i),e[0]=i,e[1]=a):a=e[1];const l=a,[V,d]=P.useState(!1);let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=y=>{y.onSelect(),d(!1)},e[2]=u):u=e[2];const c=u,p=l[s];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=m):m=e[4];const h=l[s];let g;e[5]!==h?(g=n.jsx("span",{className:m,children:h}),e[5]=h,e[6]=g):g=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Jt,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=x):x=e[7];let v;e[8]!==o||e[9]!==p||e[10]!==g?(v=n.jsx(He,{asChild:!0,children:n.jsx("span",{className:"inline-flex min-w-0 shrink",children:n.jsx(Xt,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default","aria-label":p,className:f,children:[o,g,x]})})})}),e[8]=o,e[9]=p,e[10]=g,e[11]=v):v=e[11];let b;e[12]!==p?(b=n.jsx(Je,{children:p}),e[12]=p,e[13]=b):b=e[13];let j;e[14]!==v||e[15]!==b?(j=n.jsxs(Ze,{children:[v,b]}),e[14]=v,e[15]=b,e[16]=j):j=e[16];let A;if(e[17]!==r||e[18]!==i){let y;e[20]!==i?(y=C=>n.jsx("div",{className:"flex flex-col",children:C.rows.map(S=>n.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-muted",children:[n.jsxs("button",{type:"button",role:"menuitem","aria-label":S.title,onClick:()=>c(S),className:z("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",S.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[S.icon&&n.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:S.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-sm",children:S.title}),S.subtitle&&n.jsx("div",{className:"text-xs text-muted-foreground",children:S.subtitle})]}),S.active&&n.jsx("span",{title:i("chat.tierTrigger.selected"),children:n.jsx(it,{size:14,className:"text-foreground mt-0.5"})})]}),S.modelOverride&&n.jsx(xi,{label:S.title,render:S.modelOverride})]},S.key))},C.key),e[20]=i,e[21]=y):y=e[21],A=r.map(y),e[17]=r,e[18]=i,e[19]=A}else A=e[19];let k;e[22]!==A?(k=n.jsx(es,{align:"end",className:"p-1 w-64",onOpenAutoFocus:gi,children:n.jsx("div",{role:"menu",className:"flex flex-col",children:A})}),e[22]=A,e[23]=k):k=e[23];let w;return e[24]!==V||e[25]!==j||e[26]!==k?(w=n.jsxs(ts,{open:V,onOpenChange:d,children:[j,k]}),e[24]=V,e[25]=j,e[26]=k,e[27]=w):w=e[27],w}function gi(t){return t.preventDefault()}function xi(t){const e=R.c(38),{label:s,render:o}=t,r=B(),i=ss(),[a,l]=P.useState(!1);let V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V=()=>l(!1),e[0]=V):V=e[0];const d=V;let u;e[1]!==s||e[2]!==r?(u=r("chat.modelPreferences.customizeModel",{tier:s}),e[1]=s,e[2]=r,e[3]=u):u=e[3];const c=a&&"opacity-100";let p;e[4]!==c?(p=z("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background border border-border/60 shadow-sm","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",c),e[4]=c,e[5]=p):p=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(bn,{size:14}),e[6]=f):f=e[6];let m;e[7]!==u||e[8]!==p?(m=n.jsx("button",{type:"button","aria-label":u,className:p,children:f}),e[7]=u,e[8]=p,e[9]=m):m=e[9];const h=m;if(i){let j;e[10]!==h?(j=n.jsx(go,{asChild:!0,children:h}),e[10]=h,e[11]=j):j=e[11];let A;e[12]!==s||e[13]!==r?(A=r("chat.modelPreferences.customizeModel",{tier:s}),e[12]=s,e[13]=r,e[14]=A):A=e[14];let k;e[15]!==A?(k=n.jsx(xo,{className:"sr-only",children:A}),e[15]=A,e[16]=k):k=e[16];let w;e[17]!==a||e[18]!==o?(w=a&&o(d),e[17]=a,e[18]=o,e[19]=w):w=e[19];let y;e[20]!==w||e[21]!==k?(y=n.jsxs(vo,{className:"p-0 flex flex-col max-h-[95vh]",children:[k,w]}),e[20]=w,e[21]=k,e[22]=y):y=e[22];let C;return e[23]!==a||e[24]!==y||e[25]!==j?(C=n.jsxs(bo,{open:a,onOpenChange:l,children:[j,y]}),e[23]=a,e[24]=y,e[25]=j,e[26]=C):C=e[26],C}let g;e[27]!==h?(g=n.jsx(Xt,{asChild:!0,children:h}),e[27]=h,e[28]=g):g=e[28];let x;e[29]!==a||e[30]!==o?(x=a&&o(d),e[29]=a,e[30]=o,e[31]=x):x=e[31];let v;e[32]!==x?(v=n.jsx(es,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:x}),e[32]=x,e[33]=v):v=e[33];let b;return e[34]!==a||e[35]!==g||e[36]!==v?(b=n.jsxs(ts,{open:a,onOpenChange:l,children:[g,v]}),e[34]=a,e[35]=g,e[36]=v,e[37]=b):b=e[37],b}function Rt(t){return t==="fast"?n.jsx(at,{size:16}):t==="thinking"?n.jsx(vn,{size:16}):n.jsx(Ao,{size:16})}function vi(t){const e=R.c(13),s=Dn();let o;e[0]!==t||e[1]!==s.tiers?(o=d=>{const u=s.tiers[d];return u?u.title??u.modelId:t.chat[d]?.title},e[0]=t,e[1]=s.tiers,e[2]=o):o=e[2];const r=o;let i;e[3]!==r?(i=r("fast"),e[3]=r,e[4]=i):i=e[4];let a;e[5]!==r?(a=r("smart"),e[5]=r,e[6]=a):a=e[6];let l;e[7]!==r?(l=r("thinking"),e[7]=r,e[8]=l):l=e[8];let V;return e[9]!==i||e[10]!==a||e[11]!==l?(V={fast:i,smart:a,thinking:l},e[9]=i,e[10]=a,e[11]=l,e[12]=V):V=e[12],V}function bi(){const t=R.c(24),e=B(),{simpleModeTier:s,setSimpleModeTier:o}=Ge(),r=yo(),i=ns(),a=wo(i),l=vi(a),{data:V,error:d}=_n();let u;t[0]!==V?(u=V===void 0?{tiers:{}}:V,t[0]=V,t[1]=u):u=t[1];const c=u,p=Mn(),f=Vt()?.lockedHarness==="claude-code",m=Oe("model_choice"),h=oo(),g=ro();if(!h||!m)return null;let x,v;if(t[2]!==a||t[3]!==g||t[4]!==f||t[5]!==r||t[6]!==o||t[7]!==e||t[8]!==s||t[9]!==l||t[10]!==p||t[11]!==c||t[12]!==d){const w=As(e);x="decopilot",v=hi.map(y=>{const C=l[y],S=c.tiers[y];return{key:`decopilot-${y}`,icon:Rt(y),title:w[y],subtitle:g?C??e(Dt[y]):e(Dt[y]),active:s===y,onSelect:()=>o(y),modelOverride:g?I=>n.jsxs(n.Fragment,{children:[d&&n.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),n.jsx(pi,{tier:y,orgSlot:r.tiers[y],userSlot:S,autoSlot:a.chat[y],filterModels:f?ci:void 0,onClose:I,onPick:N=>p.mutate({tier:y,slot:N}),onReset:()=>p.mutate({tier:y,slot:null})},`${y}:${S?.keyId??"org"}:${S?.modelId??""}`)]}):void 0}}),t[2]=a,t[3]=g,t[4]=f,t[5]=r,t[6]=o,t[7]=e,t[8]=s,t[9]=l,t[10]=p,t[11]=c,t[12]=d,t[13]=x,t[14]=v}else x=t[13],v=t[14];let b;t[15]!==x||t[16]!==v?(b=[{key:x,rows:v}],t[15]=x,t[16]=v,t[17]=b):b=t[17];const j=b;let A;t[18]!==s?(A=Rt(s),t[18]=s,t[19]=A):A=t[19];let k;return t[20]!==j||t[21]!==A||t[22]!==s?(k=n.jsx(mi,{tier:s,pillIcon:A,groups:j}),t[20]=j,t[21]=A,t[22]=s,t[23]=k):k=t[23],k}function ys(t){const e=R.c(3),[s]=Se();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&Lo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Ai={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},yi=ln.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),ji=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function ki(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:ji.map(wi)}),t[0]=e):e=t[0],e}function wi(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Si({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:r,onUnsupportedFile:i}){const a=B(),[l,V]=P.useState(!1),d=ys(Ai),{org:u}=Ce(),{editor:c}=Ot(),p=P.useRef(null),f=pt(o),m=()=>{!f||r||(V(!1),p.current?.click())},h=async T=>{const Q=T.target.files;if(!Q||Q.length===0||!c)return;const Z=Array.from(Q);try{let H=c.state.selection.from;for(const ne of Z)await os(c,o??null,ne,H,i,a),H=c.state.selection.to}finally{p.current&&(p.current.value="")}},g=Do({connectionId:s,orgId:u.id,orgSlug:u.slug}),x=Es.virtualMcpPrompts(s,u.id),{data:v,isLoading:b}=Ps({queryKey:x,queryFn:()=>Ro(g),staleTime:6e4,enabled:l&&!!g}),j=v?.prompts??[],[A,k]=P.useState(null),{chatMode:w,setChatMode:y}=Ge(),[C,S]=Se(),I=Vt()?.lockedHarness!=="claude-code",N=we.find(T=>T.value===C.toolApprovalLevel)??we[0],M=a(N.shortKey),E=T=>{const Q=we.find(Z=>Z.value===T);if(Q){if(Q.value===C.toolApprovalLevel){V(!1);return}d(),ee("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:Q.value,source:"tools_popover"}),S({...C,toolApprovalLevel:Q.value}),V(!1)}},D=w==="plan",L=()=>{d();const T=D?"default":"plan";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},_=()=>{e(),V(!1)},U=async(T,Q)=>{if(!c||!g)return;const Z=kt(T._meta),H={from:c.state.selection.from,to:c.state.selection.to};try{const ne=await Eo(g,T.name,Q);tn(c,H,{id:T.name,name:Mo(T.name,Z),metadata:ne.messages,char:"/",kind:"prompt",args:Q})}catch{Ee.error(a("chat.toolsPopover.failedLoadPrompt"))}},F=async T=>{V(!1);const Q=!!(T.arguments&&T.arguments.length>0);if(ee("chat_prompt_inserted",{prompt_name:T.name,with_arguments:Q}),Q){k(T);return}await U(T)},q=async T=>{A&&(await U(A,T),k(null))},$=()=>{d();const T=w==="gen-image"?"default":"gen-image";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},O=()=>{d();const T=w==="web-search"?"default":"web-search";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},W=()=>{d();const T=w==="deep-research"?"default":"deep-research";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},X=w==="gen-image",te=w==="web-search",J=w==="deep-research",ae=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:ho(o??null),className:"hidden",onChange:h,disabled:r});return n.jsxs(n.Fragment,{children:[ae,n.jsxs(Ls,{open:l,onOpenChange:T=>{T&&!l&&ee("chat_tools_popover_opened",{chat_mode:w}),V(T)},children:[n.jsx(Us,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default",disabled:t,title:a("chat.toolsPopover.tools"),"aria-label":a("chat.toolsPopover.tools"),className:z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[n.jsx(An,{size:14}),n.jsx("span",{className:z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:a("chat.toolsPopover.tools")})]})}),n.jsxs(Fs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?n.jsxs(Ae,{onClick:m,disabled:r,children:[n.jsx(wt,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]}):n.jsxs(Ze,{children:[n.jsx(He,{asChild:!0,children:n.jsxs(Ae,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:T=>T.preventDefault(),children:[n.jsx(wt,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]})}),n.jsx(Je,{side:"right",children:a("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(Ae,{onClick:L,className:z(D&&"text-special"),children:[n.jsx(Kt,{size:16,className:z(D&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:a("chat.toolsPopover.planMode")}),n.jsx("span",{className:z("text-xs text-muted-foreground",D&&"text-special font-medium"),children:yi})]}),n.jsxs(Ae,{onClick:$,className:z(X&&"text-special"),children:[n.jsx(Gt,{size:16,className:z(X&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.createImage")}),X&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(Ae,{onClick:O,className:z(te&&"text-special"),children:[n.jsx(Wt,{size:16,className:z(te&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.webSearch")}),te&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(Ae,{onClick:W,className:z(J&&"text-special"),children:[n.jsx(Yt,{size:16,className:z(J&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.deepResearch")}),J&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(xt,{children:[n.jsxs(vt,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.prompts")})]}),n.jsx(bt,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Os,{className:"size-3.5"}),a("chat.toolsPopover.loadingPrompts")]}):j.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:a("chat.toolsPopover.noPromptsAvailable")}):j.map(T=>n.jsxs(Ae,{onClick:()=>F(T),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:T.title||_o(T.name,kt(T._meta))}),T.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:T.description})]},T.name))})]}),I&&n.jsxs(xt,{children:[n.jsxs(vt,{className:"gap-2",children:[n.jsx(We,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:M})]}),n.jsx(bt,{className:"w-48 p-1.5",children:n.jsx(zs,{value:C.toolApprovalLevel,onValueChange:E,children:we.map(T=>n.jsx($s,{value:T.value,children:a(T.labelKey)},T.value))})})]}),n.jsxs(Ae,{onClick:_,children:[n.jsx(Po,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.connections")}),n.jsx(P.Suspense,{children:n.jsx(ki,{})})]})]})]}),n.jsx(en,{prompt:A,setPrompt:k,onSubmit:q})]})}const Ci=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ni(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:Ci.map(Ii)}),t[0]=e):e=t[0],e}function Ii(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ti(t){const e=R.c(10),{onClick:s}=t,o=B();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=z("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=r):r=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=a):a=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ni,{}),V=n.jsx(Bs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==a?(d=n.jsxs("button",{type:"button",onClick:s,className:r,children:[a,l,V]}),e[7]=s,e[8]=a,e[9]=d):d=e[9],d}const Re=48;function _i(){const t=R.c(9),[e,s]=P.useState("idle"),[o,r]=P.useState(""),[i,a]=P.useState(""),[l,V]=P.useState(Ri),d=P.useRef(null),u=P.useRef(null),c=P.useRef(null),p=P.useRef(null),f=P.useRef(0),m=P.useRef(!1),h=P.useRef(""),g=P.useRef(""),x=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let v;t[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),u.current?.close().catch(Di),p.current?.getTracks().forEach(Mi),c.current=null,u.current=null,p.current=null},t[0]=v):v=t[0];const b=v;let j;if(t[1]===Symbol.for("react.memo_cache_sentinel")){const I=N=>{p.current=N;const M=new AudioContext;u.current=M;const E=M.createMediaStreamSource(N),D=M.createAnalyser();D.fftSize=128,D.smoothingTimeConstant=.8,E.connect(D),c.current=D;const L=new Uint8Array(D.frequencyBinCount),_=()=>{if(!c.current)return;c.current.getByteFrequencyData(L);const U=[];for(let F=0;F<Re;F++){const q=Math.floor(F/Re*L.length);U.push(Math.max(.04,(L[q]??0)/255))}V(U),f.current=requestAnimationFrame(_)};_()};j=async()=>{const N=window.SpeechRecognition||window.webkitSpeechRecognition;if(!N)return s("unsupported"),"unsupported";let M;try{M=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return s("permission-denied"),"permission-denied"}r(""),a(""),g.current="",h.current="",m.current=!0,s("recording"),I(M);const E=new N;d.current=E,E.interimResults=!0,E.continuous=!0,E.lang=navigator.language||"en-US",E.onresult=D=>{if(d.current!==E)return;let L="",_="";for(let U=D.resultIndex;U<D.results.length;U++){const F=D.results[U],q=F?.[0]?.transcript??"";F?.isFinal?_=_+q:L=L+q}_&&(h.current=h.current+_,r(h.current)),g.current=L,a(L)},E.onerror=D=>{d.current===E&&D.error!=="no-speech"&&(m.current=!1,d.current=null,b(),s(D.error==="not-allowed"?"permission-denied":"idle"))},E.onend=()=>{if(d.current===E&&m.current)try{E.start()}catch{}};try{E.start()}catch{return m.current=!1,d.current=null,b(),s("idle"),"idle"}return"recording"},t[1]=j}else j=t[1];const A=j;let k;t[2]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{m.current=!1,d.current?.stop(),b(),s("idle"),V(Array(Re).fill(.05)),a("");const I=(h.current+(g.current?" "+g.current:"")).trim();return r(""),h.current="",g.current="",I},t[2]=k):k=t[2];const w=k;let y;t[3]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m.current=!1,d.current?.abort(),b(),s("idle"),r(""),a(""),V(Array(Re).fill(.05)),h.current="",g.current=""},t[3]=y):y=t[3];const C=y;let S;return t[4]!==i||t[5]!==e||t[6]!==o||t[7]!==l?(S={status:e,transcript:o,interimTranscript:i,waveformData:l,isSupported:x,startRecording:A,stopRecording:w,cancelRecording:C},t[4]=i,t[5]=e,t[6]=o,t[7]=l,t[8]=S):S=t[8],S}function Mi(t){return t.stop()}function Di(){}function Ri(){return Array(Re).fill(.05)}function Ei(t){const e=R.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Pi),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==o?(r=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=r):r=e[3],r}function Pi(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Et=re({token:se(),expiresAt:qs()});Qs("provider",[re({provider:ye("elevenlabs"),conversationToken:se().min(1)}),re({provider:ye("openai"),transport:ye("webrtc")})]);const Li=Ks([Et.extend({provider:ye("elevenlabs").default("elevenlabs"),conversationToken:se().min(1)}),Et.extend({provider:ye("openai"),transport:ye("webrtc")})]);re({token:se().min(1).max(4096),text:se().trim().min(1).max(Pe)});const js=re({request:se().trim().min(1).max(Pe)}),ot=5e3;Ut(re({role:Ue(["user","agent"]),text:se().min(1).max(ot)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=ot,{message:"Voice transcript is too long"});function pl(t){const e=[];let s=ot;for(const o of t.slice(-60).reverse()){if(s<=0)break;const r=o.text.slice(-s);e.unshift({role:o.role,text:r}),s-=r.length}return e}re({token:se().min(1).max(4096),sdp:se().min(1).max(1e5),language:Ue(["en","pt"]).default("en")}).strict();const Ui=re({sdp:se().min(1).max(1e5)});async function Fi(t,e,s,o,r){if(t.provider==="openai"){const{startOpenAIConversation:l}=await At(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-BKeUiEz7.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131]));return l(r,s,o)}const{Conversation:i}=await At(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const a=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=js.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await a.endSession(),o.throwIfAborted()),{endSession:()=>a.endSession(),setMicMuted:l=>a.setMicMuted(l),getOutputVolume:()=>a.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?a.sendContextualUpdate(V):a.sendUserMessage(`[Studio background event, not a new user request]
9
+ The report follows.`;function Vr(t){return{...t,content:[{type:"paragraph",content:[Xs({id:Ct,name:Ct,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:lr}}]})]},...t.content??[]]}}function cr(){const t=R.c(24),e=B(),s=on();if(!s)return null;let o,r,i,a;t[0]!==s.path||t[1]!==e?(o=rn(s.path),a="flex px-3 pt-3",r="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:o}),t[0]=s.path,t[1]=e,t[2]=o,t[3]=r,t[4]=i,t[5]=a):(o=t[2],r=t[3],i=t[4],a=t[5]);let l,V;t[6]!==o?(l=n.jsx(nn,{filename:o,className:"h-4 w-3 shrink-0"}),V=n.jsx("span",{className:"truncate",children:o}),t[6]=o,t[7]=l,t[8]=V):(l=t[7],V=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(zt,{size:12}),t[11]=u):u=t[11];let c;t[12]!==s.dismiss||t[13]!==d?(c=n.jsx(sn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=c):c=t[14];let p;t[15]!==r||t[16]!==i||t[17]!==l||t[18]!==V||t[19]!==c?(p=n.jsxs("span",{className:r,title:i,children:[l,V,c]}),t[15]=r,t[16]=i,t[17]=l,t[18]=V,t[19]=c,t[20]=p):p=t[20];let f;return t[21]!==a||t[22]!==p?(f=n.jsx("div",{className:a,children:p}),t[21]=a,t[22]=p,t[23]=f):f=t[23],f}function dr(t){const e=R.c(30),{current:s,total:o,onPrev:r,onNext:i}=t,a=B();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=z("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==a?(u=a("chat.pagination.previousLabel"),e[2]=a,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Yn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==r||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:r,disabled:l,className:d,"aria-label":u,children:c}),e[5]=r,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let m;e[10]!==a||e[11]!==f||e[12]!==o?(m=a("chat.pagination.counter",{current:f,total:o}),e[10]=a,e[11]=f,e[12]=o,e[13]=m):m=e[13];let h;e[14]!==m?(h=n.jsx("span",{className:"tabular-nums text-xs",children:m}),e[14]=m,e[15]=h):h=e[15];const g=s===o-1,x=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let v;e[16]!==x?(v=z("p-0.5 transition-colors rounded-lg",x),e[16]=x,e[17]=v):v=e[17];let b;e[18]!==a?(b=a("chat.pagination.nextLabel"),e[18]=a,e[19]=b):b=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx($t,{size:14}),e[20]=j):j=e[20];let A;e[21]!==i||e[22]!==g||e[23]!==v||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:g,className:v,"aria-label":b,children:j}),e[21]=i,e[22]=g,e[23]=v,e[24]=b,e[25]=A):A=e[25];let k;return e[26]!==A||e[27]!==p||e[28]!==h?(k=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,h,A]}),e[26]=A,e[27]=p,e[28]=h,e[29]=k):k=e[29],k}function cs(t){const e=R.c(8),{currentIndex:s,total:o,onPrev:r,onNext:i,extraLeft:a}=t;let l;e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==o?(l=n.jsx(dr,{current:s,total:o,onPrev:r,onNext:i}),e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==a||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,a]}),e[5]=a,e[6]=l,e[7]=V):V=e[7],V}function ur(t){const e=R.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:r,onAdvanceOrSubmit:i,submitLabel:a,nextLabel:l}=t,u=o?a===void 0?"Submit":a:l===void 0?"Next":l,c=o?s:!r,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==c||e[1]!==i?(f=()=>{c||i()},e[0]=c,e[1]=i,e[2]=f):f=e[2];const m=c&&"opacity-50 cursor-not-allowed";let h;e[3]!==m?(h=z("h-7 px-2.5 text-xs",m),e[3]=m,e[4]=h):h=e[4];let g;e[5]!==c||e[6]!==u||e[7]!==f||e[8]!==h?(g=n.jsx(Y,{type:"button",size:"sm","aria-disabled":c,onClick:f,className:h,children:u}),e[5]=c,e[6]=u,e[7]=f,e[8]=h,e[9]=g):g=e[9];const x=g;if(!p)return x;let v;e[10]!==x?(v=n.jsx(He,{asChild:!0,children:x}),e[10]=x,e[11]=v):v=e[11];let b;e[12]!==p?(b=n.jsx(Je,{children:p}),e[12]=p,e[13]=b):b=e[13];let j;return e[14]!==v||e[15]!==b?(j=n.jsxs(Ze,{children:[v,b]}),e[14]=v,e[15]=b,e[16]=j):j=e[16],j}function ds(t,e,s){return t.findIndex(o=>e(o)===s)}function Nt(t,e,s,o){return t.length===0?!1:t.every(r=>o(s[e(r)]))}function It(t,e,s,o,r){if(t.length===0)return null;const i=ds(t,e,r);for(let a=1;a<=t.length;a++){const l=t[(i+a)%t.length];if(!l)continue;const V=e(l);if(V!==r&&!o(s[V]))return V}return null}function pr(t){return!t.isStreaming&&t.allAnswered}function us(t){const{parts:e,partKey:s,schema:o,defaultValues:r,isStreaming:i,hasAnswer:a,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=P.useState(V),[c,p]=P.useState(!1),f=Ss({resolver:Cs(o),defaultValues:r}),m=f.watch(),h=ds(e,s,d),g=h>=0?e[h]:void 0,x=a(m[d]),v=Nt(e,s,m,a),b=pr({isStreaming:i,allAnswered:v}),j=()=>{if(h>0){const I=e[h-1];I&&u(s(I))}},A=()=>{if(h>=0&&h<e.length-1){const I=e[h+1];I&&u(s(I))}},k=()=>{const I=f.getValues(),N=It(e,s,I,a,d);N&&u(N)},w=()=>{f.handleSubmit(I=>{const N=I;for(const M of e)l(M,N[s(M)])})()},y=P.useRef(w);y.current=w;const C=()=>{b&&(p(!1),y.current())},S=()=>{const I=f.getValues();if(Nt(e,s,I,a)){if(i){p(!0);return}p(!1),y.current()}else{const N=It(e,s,I,a,d);N&&u(N)}};return P.useEffect(()=>{if(c&&!i){if(!v){p(!1);return}p(!1),y.current()}},[c,i,v]),{form:f,activeKey:d,setActiveKey:u,currentIndex:h,currentPart:g,isCurrentAnswered:x,isAllAnswered:v,canSubmit:b,goPrev:j,goNext:A,advanceToNextUnanswered:k,submit:C,submitOrAdvance:S}}const ps="chat.approval.defaultDenyReason";function fs(t){const e=R.c(36),{onYolo:s}=t,o=B(),[r,i]=Se();let a,l,V,d,u,c,p,f,m;if(e[0]!==s||e[1]!==r||e[2]!==i||e[3]!==o){const j=we.find(w=>w.value===r.toolApprovalLevel)??we[0];let A;e[13]!==s||e[14]!==r||e[15]!==i?(A=w=>{const y=w,C=r.toolApprovalLevel??"readonly";i({...r,toolApprovalLevel:y}),y==="auto"&&s(C)},e[13]=s,e[14]=r,e[15]=i,e[16]=A):A=e[16];const k=A;V=Kn,f=r.toolApprovalLevel,m=k,l=qn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent/60 h-7 gap-1",p=fr,a=Qn,d=o(j.shortKey),e[0]=s,e[1]=r,e[2]=i,e[3]=o,e[4]=a,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=f,e[12]=m}else a=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],f=e[11],m=e[12];let h;e[17]!==a||e[18]!==d?(h=n.jsx(a,{children:d}),e[17]=a,e[18]=d,e[19]=h):h=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==h?(g=n.jsx(l,{size:u,className:c,onClick:p,children:h}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=h,e[25]=g):g=e[25];let x;e[26]!==o?(x=we.map(j=>n.jsx(Bn,{value:j.value,children:o(j.labelKey)},j.value)),e[26]=o,e[27]=x):x=e[27];let v;e[28]!==x?(v=n.jsx(Wn,{children:x}),e[28]=x,e[29]=v):v=e[29];let b;return e[30]!==V||e[31]!==v||e[32]!==f||e[33]!==m||e[34]!==g?(b=n.jsxs(V,{value:f,onValueChange:m,children:[g,v]}),e[30]=V,e[31]=v,e[32]=f,e[33]=m,e[34]=g,e[35]=b):b=e[35],b}function fr(t){return t.stopPropagation()}function hs(t){const e=R.c(8),{input:s}=t,o=B();if(s==null){let a;e[0]!==o?(a=o("chat.approval.noInput"),e[0]=o,e[1]=a):a=e[1];let l;return e[2]!==a?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=l):l=e[3],l}let r;try{let a;e[4]!==s?(a=JSON.stringify(s,null,2),e[4]=s,e[5]=a):a=e[5],r=a}catch{r=String(s)}let i;return e[6]!==r?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:r})}),e[6]=r,e[7]=i):i=e[7],i}function hr(t){const e=R.c(38),{approval:s,onRespond:o}=t,r=B(),[i]=Se(),a=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==a||e[2]!==o||e[3]!==r?(l=()=>o(s.approvalId,!1,r(ps),a),e[0]=s.approvalId,e[1]=a,e[2]=o,e[3]=r,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==a||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,a),e[5]=s.approvalId,e[6]=a,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let f;e[12]!==p?(f=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(fs,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const m=f;let h;e[14]!==r?(h=r("chat.approval.denyButton"),e[14]=r,e[15]=h):h=e[15];let g;e[16]!==V||e[17]!==h?(g=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:h}),e[16]=V,e[17]=h,e[18]=g):g=e[18];let x;e[19]!==r?(x=r("chat.approval.acceptButton"),e[19]=r,e[20]=x):x=e[20];let v;e[21]!==u||e[22]!==x?(v=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:x}),e[21]=u,e[22]=x,e[23]=v):v=e[23];let b;e[24]!==g||e[25]!==v?(b=n.jsxs(n.Fragment,{children:[g,v]}),e[24]=g,e[25]=v,e[26]=b):b=e[26];const j=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(We,{size:14}),e[27]=A):A=e[27];let k;e[28]!==r?(k=r("chat.approval.needsApproval"),e[28]=r,e[29]=k):k=e[29];let w;e[30]!==s.input?(w=n.jsx(hs,{input:s.input}),e[30]=s.input,e[31]=w):w=e[31];let y;return e[32]!==s.friendlyName||e[33]!==m||e[34]!==j||e[35]!==k||e[36]!==w?(y=n.jsx(pe,{icon:A,label:k,title:s.friendlyName,defaultExpanded:!0,footerLeft:m,footerRight:j,children:w}),e[32]=s.friendlyName,e[33]=m,e[34]=j,e[35]=k,e[36]=w,e[37]=y):y=e[37],y}const mr=Ns(se(),re({approved:Is().optional(),levelOverride:Ue(["auto","readonly"]).optional()}));function gr(t){const e=R.c(46),{approvals:s,isStreaming:o,onRespond:r}=t,i=B(),[a]=Se(),l=a.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(br)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==r||e[4]!==i?(u=(N,M)=>{const E=M;typeof E?.approved=="boolean"&&r(N.approvalId,E.approved,E.approved===!1?i(ps):void 0,E.levelOverride??l)},e[2]=l,e[3]=r,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:vr,schema:mr,defaultValues:d,isStreaming:o,hasAnswer:xr,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=us(c);let f;e[11]!==s||e[12]!==p?(f=N=>{p.form.reset(Object.fromEntries(s.map(M=>[M.approvalId,{approved:!0,levelOverride:N}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const m=f,h=p.currentPart,g=p.form;let x;e[14]!==p?(x=N=>{N.preventDefault(),p.submit()},e[14]=p,e[15]=x):x=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(We,{size:14}),e[16]=v):v=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const j=h?.friendlyName??"";let A;e[20]!==m?(A=n.jsx(fs,{onYolo:m}),e[20]=m,e[21]=A):A=e[21];let k;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(k=n.jsx(cs,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=k):k=e[27];let w;e[28]!==h||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(w=h?n.jsx(Ar,{approvalId:h.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=h,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=w):w=e[31];let y;e[32]!==h?(y=h?n.jsx(hs,{input:h.input}):null,e[32]=h,e[33]=y):y=e[33];let C;e[34]!==k||e[35]!==w||e[36]!==y||e[37]!==b||e[38]!==j?(C=n.jsx(pe,{icon:v,label:b,title:j,defaultExpanded:!0,footerLeft:k,footerRight:w,children:y}),e[34]=k,e[35]=w,e[36]=y,e[37]=b,e[38]=j,e[39]=C):C=e[39];let S;e[40]!==C||e[41]!==x?(S=n.jsx("form",{onSubmit:x,children:C}),e[40]=C,e[41]=x,e[42]=S):S=e[42];let I;return e[43]!==p.form||e[44]!==S?(I=n.jsx(nt,{...g,children:S}),e[43]=p.form,e[44]=S,e[45]=I):I=e[45],I}function xr(t){return typeof t?.approved=="boolean"}function vr(t){return t.approvalId}function br(t){return[t.approvalId,{approved:void 0}]}function Ar(t){const e=R.c(7),{approvalId:s,control:o,onChange:r}=t,i=B(),a=`${s}.approved`;let l;e[0]!==r||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(Y,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),r()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(Y,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),r()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=r,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==a||e[5]!==l?(V=n.jsx(Ts,{control:o,name:a,render:l}),e[3]=o,e[4]=a,e[5]=l,e[6]=V):V=e[6],V}function yr(){const t=R.c(5),e=B();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(We,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let r;return t[3]!==o?(r=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=r):r=t[4],r}function jr(t){const e=R.c(8),{approvals:s,isStreaming:o,onRespond:r}=t;if(o&&s.length===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(yr,{}),e[0]=a):a=e[0],a}if(s.length===0)return null;if(s.length===1){const a=s[0];if(!a)return null;let l;return e[1]!==r||e[2]!==a?(l=n.jsx(hr,{approval:a,onRespond:r}),e[1]=r,e[2]=a,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==r?(i=n.jsx(gr,{approvals:s,isStreaming:o,onRespond:r}),e[4]=s,e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function kr(t){const e=R.c(28),{plan:s,onApprove:o,onDismiss:r}=t,i=B();let a;e[0]!==o||e[1]!==s.plan?(a=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=a):a=e[2];const l=a;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==r||e[6]!==V?(d=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:r,children:V}),e[5]=r,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const f=p;let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(qt,{size:14}),e[16]=m):m=e[16];let h;e[17]!==i?(h=i("chat.proposePlan.planReady"),e[17]=i,e[18]=h):h=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let x;e[21]!==s.plan?(x=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(Gn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=x):x=e[22];let v;return e[23]!==f||e[24]!==x||e[25]!==h||e[26]!==g?(v=n.jsx(pe,{icon:m,label:h,title:g,defaultExpanded:!0,footerRight:f,children:x}),e[23]=f,e[24]=x,e[25]=h,e[26]=g,e[27]=v):v=e[27],v}function wr(t){const e=R.c(6),{plans:s,onApprove:o,onDismiss:r}=t;let i;e[0]!==s?(i=as(s),e[0]=s,e[1]=i):i=e[1];const a=i;if(!a)return null;let l;return e[2]!==a||e[3]!==o||e[4]!==r?(l=n.jsx(kr,{plan:a,onApprove:o,onDismiss:r}),e[2]=a,e[3]=o,e[4]=r,e[5]=l):l=e[5],l}function ms(t){return t?"response"in t?t.response:t.option??t.draft:""}const Tt=re({response:se().min(1,"Response is required")}),Sr=re({option:se().nullable(),draft:se()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),Cr=re({response:Ue(["yes","no"])});function Nr(t){switch(t.type){case"text":return Tt;case"choice":return Sr;case"confirm":return Cr;default:return Tt}}function Ir(t){const e={};for(const s of t)e[s.toolCallId]=Nr(s.input);return re(e)}function Tr(t){const e=R.c(7),{control:s,name:o,placeholder:r}=t,i=B();let a;e[0]!==r||e[1]!==i?(a=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(ct,{children:[n.jsx(dt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Qt,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:r||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ut,{})]})},e[0]=r,e[1]=i,e[2]=a):a=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==a?(l=n.jsx(Ht,{control:s,name:o,render:a}),e[3]=s,e[4]=o,e[5]=a,e[6]=l):l=e[6],l}function gs(t,e){const s=R.c(4);let o,r;s[0]!==t||s[1]!==e?(o=()=>{const i=a=>{if(an(a.target)||a.metaKey||a.ctrlKey||a.altKey)return;const l=Number.parseInt(a.key,10);l>=1&&l<=t&&(a.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},r=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=r):(o=s[2],r=s[3]),P.useEffect(o,r)}function _r(t){const e=R.c(51),{control:s,name:o,options:r}=t,i=B(),a=`${o}.option`;let l;e[0]!==s||e[1]!==a?(l={control:s,name:a,defaultValue:null},e[0]=s,e[1]=a,e[2]=l):l=e[2];const{field:V}=gt(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=gt(u),p=V.value,f=c.value??"";let m;if(e[6]!==V||e[7]!==r?(m=L=>{const _=r[L];_!=null&&V.onChange(_)},e[6]=V,e[7]=r,e[8]=m):m=e[8],gs(r.length,m),r.length===0)return null;const h=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let x;if(e[11]!==V||e[12]!==p||e[13]!==r||e[14]!==i){let L;e[16]!==V||e[17]!==p||e[18]!==i?(L=(_,U)=>{const F=p===_;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(_),className:z("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",F&&"bg-accent/50",!F&&"hover:bg-accent/30"),"aria-label":i("chat.userAskQuestion.selectOption",{option:_}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",F?"bg-chart-1 text-white":"bg-muted text-foreground"),children:U+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:_})]},`${U}-${_}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=L):L=e[19],x=r.map(L),e[11]=V,e[12]=p,e[13]=r,e[14]=i,e[15]=x}else x=e[15];const v=h&&"bg-accent/50",b=!h&&"hover:bg-accent/30";let j;e[20]!==v||e[21]!==b?(j=z("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",v,b),e[20]=v,e[21]=b,e[22]=j):j=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx(Qt,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const k=h?f:"";let w;e[24]!==c||e[25]!==V||e[26]!==p?(w=L=>{c.onChange(L.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=w):w=e[27];let y;e[28]!==V||e[29]!==p?(y=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=y):y=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let S;e[33]!==i?(S=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=S):S=e[34];let I;e[35]!==k||e[36]!==w||e[37]!==y||e[38]!==C||e[39]!==S?(I=n.jsx("input",{type:"text",value:k,onChange:w,onFocus:y,placeholder:C,"aria-label":S,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=k,e[36]=w,e[37]=y,e[38]=C,e[39]=S,e[40]=I):I=e[40];let N;e[41]!==j||e[42]!==I?(N=n.jsxs("label",{className:j,children:[A,I]}),e[41]=j,e[42]=I,e[43]=N):N=e[43];let M;e[44]!==N||e[45]!==g||e[46]!==x?(M=n.jsx(dt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[x,N]})}),e[44]=N,e[45]=g,e[46]=x,e[47]=M):M=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ut,{}),e[48]=E):E=e[48];let D;return e[49]!==M?(D=n.jsxs(ct,{children:[M,E]}),e[49]=M,e[50]=D):D=e[50],D}function Mr(t){const e=R.c(8),{control:s,name:o}=t,r=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const a=i,l=P.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(a[c]??"")},e[1]=V):V=e[1],gs(a.length,V);let d;e[2]!==r?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(ct,{children:[n.jsx(dt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":r("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:a.map(f=>{const m=p.value===f;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:z("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",m&&"bg-accent/50",!m&&"hover:bg-accent/30"),"aria-label":r("chat.userAskQuestion.confirmValue",{value:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:z("flex items-center justify-center size-6 rounded-md text-sm shrink-0",m?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:r(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),n.jsx(ut,{})]})},e[2]=r,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Ht,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function _t(t){const e=R.c(13),{input:s,control:o,toolCallId:r}=t;switch(s.type){case"text":{const i=`${r}.response`;let a;return e[0]!==o||e[1]!==s.default||e[2]!==i?(a=n.jsx(Tr,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=a):a=e[3],a}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const a=i;let l;return e[6]!==o||e[7]!==a||e[8]!==r?(l=n.jsx(_r,{control:o,name:r,options:a}),e[6]=o,e[7]=a,e[8]=r,e[9]=l):l=e[9],l}case"confirm":{const i=`${r}.response`;let a;return e[10]!==o||e[11]!==i?(a=n.jsx(Mr,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=a):a=e[12],a}default:return null}}function Dr(t){const e=R.c(91),{parts:s,isStreaming:o,onSubmit:r}=t;let i;e[0]!==s?(i=Ir(s.map(Lr)),e[0]=s,e[1]=i):i=e[1];const a=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(Pr)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==r?(d=($,O)=>{const W=ms(O);W&&r($,W)},e[4]=r,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==a||e[10]!==d?(u={parts:s,partKey:Er,schema:a,defaultValues:V,isStreaming:o,hasAnswer:Rr,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=a,e[10]=d,e[11]=u):u=e[11];const c=us(u),p=c.currentPart,f=B();let m;e[12]!==p||e[13]!==c||e[14]!==f?(m=()=>{const $=p;if(!$)return;const O=f("chat.userAskQuestion.skipMessage"),W=$.toolCallId;$.input?.type==="choice"?(c.form.setValue(`${W}.option`,null),c.form.setValue(`${W}.draft`,O)):c.form.setValue(`${W}.response`,O),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=f,e[15]=m):m=e[15];const h=m;let g;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(g=n.jsx(cs,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=g):g=e[20];const x=g;let v;e[21]!==f?(v=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=v):v=e[22];let b;e[23]!==h||e[24]!==v?(b=n.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:h,className:"h-7",children:v}),e[23]=h,e[24]=v,e[25]=b):b=e[25];let j;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(j=n.jsx(ur,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=j):j=e[30];let A;e[31]!==b||e[32]!==j?(A=n.jsxs(n.Fragment,{children:[b,j]}),e[31]=b,e[32]=j,e[33]=A):A=e[33];const k=A;if(s.length===1){const $=s[0];if(!$?.input)return null;const O=c.form;let W;e[34]!==c?(W=ne=>{ne.preventDefault(),c.submit()},e[34]=c,e[35]=W):W=e[35];let X;e[36]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx(st,{size:14}),e[36]=X):X=e[36];let te;e[37]!==f?(te=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=te):te=e[38];let J;e[39]!==$.input?.prompt||e[40]!==f?(J=$.input?.prompt??f("chat.userAskQuestion.question"),e[39]=$.input?.prompt,e[40]=f,e[41]=J):J=e[41];const ae=$.input;let T;e[42]!==c.form.control||e[43]!==$.toolCallId||e[44]!==ae?(T=n.jsx(_t,{input:ae,control:c.form.control,toolCallId:$.toolCallId}),e[42]=c.form.control,e[43]=$.toolCallId,e[44]=ae,e[45]=T):T=e[45];let Q;e[46]!==k||e[47]!==te||e[48]!==J||e[49]!==T?(Q=n.jsx(pe,{icon:X,label:te,title:J,defaultExpanded:!0,footerRight:k,children:T}),e[46]=k,e[47]=te,e[48]=J,e[49]=T,e[50]=Q):Q=e[50];let Z;e[51]!==W||e[52]!==Q?(Z=n.jsx("form",{onSubmit:W,autoComplete:"off",children:Q}),e[51]=W,e[52]=Q,e[53]=Z):Z=e[53];let H;return e[54]!==c.form||e[55]!==Z?(H=n.jsx(nt,{...O,children:Z}),e[54]=c.form,e[55]=Z,e[56]=H):H=e[56],H}const w=c.form;let y;e[57]!==c?(y=$=>{$.preventDefault(),c.submit()},e[57]=c,e[58]=y):y=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(st,{size:14}),e[59]=C):C=e[59];let S;e[60]!==f?(S=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=S):S=e[61];const I=c.currentIndex+1;let N;e[62]!==s.length||e[63]!==f||e[64]!==I?(N=f("chat.userAskQuestion.questionCount",{current:I,total:s.length}),e[62]=s.length,e[63]=f,e[64]=I,e[65]=N):N=e[65];let M;e[66]!==p?.input?.prompt||e[67]!==f?(M=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=M):M=e[68];const E=c.activeKey,D=c.setActiveKey;let L;if(e[69]!==c.form||e[70]!==s){let $;e[72]!==c.form?($=O=>n.jsx(Jn,{value:O.toolCallId,className:"mt-0",children:n.jsx(_t,{input:O.input,control:c.form.control,toolCallId:O.toolCallId})},O.toolCallId),e[72]=c.form,e[73]=$):$=e[73],L=s.map($),e[69]=c.form,e[70]=s,e[71]=L}else L=e[71];let _;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==L?(_=n.jsx(Zn,{value:E,onValueChange:D,children:L}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=L,e[77]=_):_=e[77];let U;e[78]!==x||e[79]!==k||e[80]!==S||e[81]!==N||e[82]!==M||e[83]!==_?(U=n.jsx(pe,{icon:C,label:S,count:N,title:M,defaultExpanded:!0,footerLeft:x,footerRight:k,children:_}),e[78]=x,e[79]=k,e[80]=S,e[81]=N,e[82]=M,e[83]=_,e[84]=U):U=e[84];let F;e[85]!==y||e[86]!==U?(F=n.jsx("form",{onSubmit:y,autoComplete:"off",children:U}),e[85]=y,e[86]=U,e[87]=F):F=e[87];let q;return e[88]!==c.form||e[89]!==F?(q=n.jsx(nt,{...w,children:F}),e[88]=c.form,e[89]=F,e[90]=q):q=e[90],q}function Rr(t){return!!ms(t)}function Er(t){return t.toolCallId}function Pr(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function Lr(t){return{toolCallId:t.toolCallId,input:t.input}}function Ur(){const t=R.c(5),e=B();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(st,{className:"size-5 text-muted-foreground shimmer"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let r;return t[3]!==o?(r=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=r):r=t[4],r}function xs(t){const e=R.c(7),{userAskParts:s,isStreaming:o,onSubmit:r}=t;let i;e[0]!==s?(i=s.filter(Fr),e[0]=s,e[1]=i):i=e[1];const a=i;if(a.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Ur,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==r||e[5]!==a?(l=n.jsx(Dr,{parts:a,isStreaming:o,onSubmit:r}),e[3]=o,e[4]=r,e[5]=a,e[6]=l):l=e[6],l}function Fr(t){return t.state==="input-available"}function Or(t){const e=R.c(33),{parts:s,isStreaming:o,onRespond:r}=t,i=B();let a;e[0]!==s?(a=s.at(-1),e[0]=s,e[1]=a):a=e[1];const l=a,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(qt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==r||e[6]!==l?(p=()=>r(l,!1),e[5]=r,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let m;e[10]!==o||e[11]!==p||e[12]!==f?(m=n.jsx(Y,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:f}),e[10]=o,e[11]=p,e[12]=f,e[13]=m):m=e[13];let h;e[14]!==r||e[15]!==l?(h=()=>r(l,!0),e[14]=r,e[15]=l,e[16]=h):h=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let x;e[19]!==o||e[20]!==h||e[21]!==g?(x=n.jsx(Y,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:h,children:g}),e[19]=o,e[20]=h,e[21]=g,e[22]=x):x=e[22];let v;e[23]!==x||e[24]!==m?(v=n.jsxs(n.Fragment,{children:[m,x]}),e[23]=x,e[24]=m,e[25]=v):v=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let j;return e[28]!==V.title||e[29]!==v||e[30]!==b||e[31]!==u?(j=n.jsx(pe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:v,children:b}),e[28]=V.title,e[29]=v,e[30]=b,e[31]=u,e[32]=j):j=e[32],j}function zr(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[r]=e;return r&&e.length===1?{icon:"in_progress",activity:r.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function $r(t){const e=R.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=zr(s),e[0]=s,e[1]=o):o=e[1];const r=o;let i;e[2]!==r.icon?(i=n.jsx(Qr,{status:r.icon}),e[2]=r.icon,e[3]=i):i=e[3];const a=r.activity,l=r.progress;let V;e[4]!==s?(V=s.map(Br),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==r.activity||e[9]!==r.progress||e[10]!==i||e[11]!==d?(u=n.jsx(pe,{icon:i,label:a,count:l,defaultExpanded:!1,children:d}),e[8]=r.activity,e[9]=r.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function Br(t,e){return n.jsx(Kr,{todo:t},e)}function Kr(t){const e=R.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let a;e[0]!==s.status?(a=n.jsx(qr,{status:s.status}),e[0]=s.status,e[1]=a):a=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=z("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let f;return e[11]!==a||e[12]!==p?(f=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent/50 transition-colors",children:[a,p]}),e[11]=a,e[12]=p,e[13]=f):f=e[13],f}function qr(t){const e=R.c(4),{status:s}=t,o=s==="completed"?"true":void 0,r=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let a;return e[1]!==o||e[2]!==r?(a=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":r,"aria-hidden":"true",children:i}),e[1]=o,e[2]=r,e[3]=a):a=e[3],a}function Qr(t){const e=R.c(13),{status:s}=t,o=B();if(s==="completed"){let a;e[0]!==o?(a=o("chat.todoStatus.completed"),e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==a?(V=n.jsx("span",{"aria-label":a,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=a,e[4]=V):V=e[4],V}if(s==="in_progress"){let a;e[5]!==o?(a=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=a):a=e[6];let l;return e[7]!==a?(l=n.jsx("span",{"aria-label":a,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=a,e[8]=l):l=e[8],l}let r;e[9]!==o?(r=o("chat.todoStatus.pending"),e[9]=o,e[10]=r):r=e[10];let i;return e[11]!==r?(i=n.jsx("span",{"aria-label":r,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=r,e[12]=i):i=e[12],i}const Wr={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Yr={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Gr(t){const e=R.c(46),{source:s,onDone:o}=t,r=B(),i=_s(),[a]=Se(),[l,V]=P.useState(a.language==="pt-BR"?"brl":"usd"),[d,u]=P.useState(""),[c,p]=P.useState(!1),f=l==="brl"?"R$":"$";let m;e[0]!==l||e[1]!==i?(m=async _=>{const{url:U}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:_,currency:l});return U},e[0]=l,e[1]=i,e[2]=m):m=e[2];let h;e[3]!==o?(h=_=>{_&&window.open(_,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=h):h=e[4];let g;e[5]!==r?(g=_=>{Ee.error(r("credits.topUp.failed",{message:_.message}))},e[5]=r,e[6]=g):g=e[6];let x;e[7]!==m||e[8]!==h||e[9]!==g?(x={mutationFn:m,onSuccess:h,onError:g},e[7]=m,e[8]=h,e[9]=g,e[10]=x):x=e[10];const{mutate:v,isPending:b}=Ms(x);let j;e[11]!==l||e[12]!==s||e[13]!==v?(j=(_,U)=>{ee("credits_topup_clicked",{amount_cents:_,currency:l,tier_label:U,source:s}),v(_)},e[11]=l,e[12]=s,e[13]=v,e[14]=j):j=e[14];const A=j,k=parseFloat(d),w=!isNaN(k)&&k>=1;let y,C,S;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=_=>{_&&V(_)},C=n.jsx(jt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),S=n.jsx(jt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=y,e[16]=C,e[17]=S):(y=e[15],C=e[16],S=e[17]);let I;e[18]!==l?(I=n.jsx("div",{className:"mb-4",children:n.jsxs(Vo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:y,children:[C,S]})}),e[18]=l,e[19]=I):I=e[19];const N=Wr[l];let M;if(e[20]!==A||e[21]!==f||e[22]!==b||e[23]!==r||e[24]!==N){let _;e[26]!==A||e[27]!==f||e[28]!==b||e[29]!==r?(_=U=>{const{dollars:F,labelKey:q}=U;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(F*100,Yr[q]??"preset"),className:z("relative flex flex-col items-center gap-1 py-5 rounded-xl border transition-all duration-150 cursor-pointer","disabled:opacity-50 disabled:cursor-wait","border-border hover:border-foreground/20 hover:bg-muted/30"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,F]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:r(q)})]},F)},e[26]=A,e[27]=f,e[28]=b,e[29]=r,e[30]=_):_=e[30],M=N.map(_),e[20]=A,e[21]=f,e[22]=b,e[23]=r,e[24]=N,e[25]=M}else M=e[25];let E;e[31]!==M?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:M}),e[31]=M,e[32]=E):E=e[32];let D;e[33]!==A||e[34]!==f||e[35]!==d||e[36]!==k||e[37]!==w||e[38]!==b||e[39]!==c||e[40]!==r?(D=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),n.jsx(lo,{type:"number",min:"1",step:"1",placeholder:r("credits.topUp.customPlaceholder"),value:d,onChange:_=>u(_.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(Y,{className:"h-10",disabled:!w||b,onClick:()=>A(Math.round(k*100),"custom"),children:r(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:r("credits.topUp.enterCustom")}),e[33]=A,e[34]=f,e[35]=d,e[36]=k,e[37]=w,e[38]=b,e[39]=c,e[40]=r,e[41]=D):D=e[41];let L;return e[42]!==E||e[43]!==D||e[44]!==I?(L=n.jsxs("div",{children:[I,E,D]}),e[42]=E,e[43]=D,e[44]=I,e[45]=L):L=e[45],L}const Hr=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Jr(t){const e=R.c(47),{onDismiss:s}=t,{org:o}=Ce(),r=rt(),{decoKeyId:i}=ao(),a=B(),l=Oe("credits");let V,d;if(e[0]!==o.id?(V=()=>{ee("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),P.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=N=>!N&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let m;e[8]!==a?(m=a("chat.creditsExhaustedBanner.title"),e[8]=a,e[9]=m):m=e[9];let h;e[10]!==m?(h=n.jsx(Xn,{className:"text-xl font-semibold tracking-tight",children:m}),e[10]=m,e[11]=h):h=e[11];let g;e[12]!==a?(g=a("chat.creditsExhaustedBanner.description"),e[12]=a,e[13]=g):g=e[13];let x;e[14]!==g?(x=n.jsx(eo,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x||e[17]!==h?(v=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(to,{className:"relative gap-4",children:[f,n.jsxs("div",{children:[h,x]})]})]}),e[16]=x,e[17]=h,e[18]=v):v=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==a?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"rounded-xl border border-border p-5",children:n.jsx(Gr,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Hr.map(N=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(it,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:a(N)})]},N))})]}),e[19]=i,e[20]=s,e[21]=a,e[22]=b):b=e[22];let j;e[23]!==a?(j=a("chat.creditsExhaustedBanner.dismiss"),e[23]=a,e[24]=j):j=e[24];let A;e[25]!==s||e[26]!==j?(A=n.jsx(Y,{variant:"ghost",size:"sm",onClick:s,children:j}),e[25]=s,e[26]=j,e[27]=A):A=e[27];let k;e[28]!==r||e[29]!==s||e[30]!==o.slug?(k=()=>{r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=r,e[29]=s,e[30]=o.slug,e[31]=k):k=e[31];let w;e[32]!==a?(w=a("chat.creditsExhaustedBanner.manageProviders"),e[32]=a,e[33]=w):w=e[33];let y;e[34]!==k||e[35]!==w?(y=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:k,children:w}),e[34]=k,e[35]=w,e[36]=y):y=e[36];let C;e[37]!==A||e[38]!==y?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,y]}),e[37]=A,e[38]=y,e[39]=C):C=e[39];let S;e[40]!==v||e[41]!==b||e[42]!==C?(S=n.jsxs(so,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Zr,children:[v,b,C]}),e[40]=v,e[41]=b,e[42]=C,e[43]=S):S=e[43];let I;return e[44]!==S||e[45]!==u?(I=n.jsx(no,{open:!0,onOpenChange:u,children:S}),e[44]=S,e[45]=u,e[46]=I):I=e[46],I}function Zr(t){return t.preventDefault()}const Xr={trial_exhausted:{label:"chat.subscriptionLimit.trialLabel",title:"chat.subscriptionLimit.trialTitle"},monthly_exhausted:{label:"chat.subscriptionLimit.monthlyLabel",title:"chat.subscriptionLimit.monthlyTitle"},runs_exhausted:{label:"chat.subscriptionLimit.runsLabel",title:"chat.subscriptionLimit.runsTitle"}};function ei(t){const e=R.c(16),{kind:s,onDismiss:o,onSubscribe:r}=t,i=B(),{label:a,title:l}=Xr[s];let V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(at,{size:14}),e[0]=V):V=e[0];let d;e[1]!==a||e[2]!==i?(d=i(a),e[1]=a,e[2]=i,e[3]=d):d=e[3];let u;e[4]!==i||e[5]!==l?(u=i(l),e[4]=i,e[5]=l,e[6]=u):u=e[6];let c;e[7]!==s||e[8]!==r||e[9]!==i?(c=s==="trial_exhausted"?n.jsx(Y,{size:"sm",onClick:r,className:"h-7 text-xs",children:i("chat.subscriptionLimit.subscribeButton")}):void 0,e[7]=s,e[8]=r,e[9]=i,e[10]=c):c=e[10];let p;return e[11]!==o||e[12]!==d||e[13]!==u||e[14]!==c?(p=n.jsx(pe,{icon:V,label:d,title:u,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:c}),e[11]=o,e[12]=d,e[13]=u,e[14]=c,e[15]=p):p=e[15],p}const ti={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function Mt(t){const e=R.c(21),{kind:s,onDismiss:o}=t,r=B(),i=rt(),{org:a}=Ce(),{label:l,title:V}=ti[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(at,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==r?(u=r(l),e[1]=l,e[2]=r,e[3]=u):u=e[3];let c;e[4]!==r||e[5]!==V?(c=r(V),e[4]=r,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==a.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:a.slug}}),o()},e[7]=i,e[8]=o,e[9]=a.slug,e[10]=p):p=e[10];let f;e[11]!==r?(f=r("chat.planRefused.seePlans"),e[11]=r,e[12]=f):f=e[12];let m;e[13]!==p||e[14]!==f?(m=n.jsx(Y,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=m):m=e[15];let h;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==m?(h=n.jsx(pe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:m}),e[16]=o,e[17]=u,e[18]=c,e[19]=m,e[20]=h):h=e[20],h}function vs(t){const e=si(t);if(e!==null){const d=vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),r=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),a=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return r||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:a?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function si(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:r}=s,i=typeof o=="string"?o:r;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const ni={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Qe(t){const e=R.c(29),s=B(),{variant:o,onDismiss:r}=t,i=o==="error";let a;e[0]!==i||e[1]!==s?(a=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=a):a=e[2];const l=a,V=i?zn:Rs;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const v=ni[t.finishReason];return v?s(v):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:f}=c;let m;e[11]!==V?(m=n.jsx(V,{size:14}),e[11]=V,e[12]=m):m=e[12];let h;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(h=i?n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=h):h=e[17];let g;e[18]!==f||e[19]!==s?(g=f?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ee.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ee.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx($n,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let x;return e[21]!==l||e[22]!==r||e[23]!==p||e[24]!==m||e[25]!==h||e[26]!==g||e[27]!==o?(x=n.jsx(pe,{icon:m,label:l,title:p,defaultExpanded:!0,variant:o,onClose:r,footerRight:h,children:g}),e[21]=l,e[22]=r,e[23]=p,e[24]=m,e[25]=h,e[26]=g,e[27]=o,e[28]=x):x=e[28],x}function ze(t){const e=R.c(77);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:r}=s,i=o===void 0?!1:o,a=r===void 0?!1:r,l=B(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:f,submit:m,sendMessage:h}=Fe(),[g,x]=Se(),{virtualMcpId:v,createTaskWithMessage:b}=Ye(),{chatMode:j,simpleModeTier:A}=Ge(),k=Oe("credits"),{mutate:w}=po("ORGANIZATION_BILLING_CHECKOUT_START","taskBoard.subscriptionPaywall.checkoutError");let y;e[2]!==w?(y=()=>w(),e[2]=w,e[3]=y):y=e[3];const C=y;let S;e[4]!==j||e[5]!==A||e[6]!==v||e[7]!==a?(S=oe=>({...a?{voiceMode:!0}:{},tier:A,mode:j,toolApprovalLevel:oe,agent:v?{id:v}:void 0}),e[4]=j,e[5]=A,e[6]=v,e[7]=a,e[8]=S):S=e[8];const I=S;let N;e[9]!==g.toolApprovalLevel?(N=g.toolApprovalLevel??Ds(),e[9]=g.toolApprovalLevel,e[10]=N):N=e[10];const M=N,E=p.at(-1),D=E?.role==="assistant"?E.parts:[],L=D.filter(ai),_=D.filter(Zt),U=ls(D),F=is(D);let q;e[11]!==V||e[12]!==h||e[13]!==l?(q=()=>{if(V){const ue={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};h(ue)}},e[11]=V,e[12]=h,e[13]=l,e[14]=q):q=e[14];const $=q;let O;e[15]!==h||e[16]!==l?(O=()=>{const oe={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};h(oe)},e[15]=h,e[16]=l,e[17]=O):O=e[17];const W=O;let X;e[18]!==I||e[19]!==M||e[20]!==m?(X=(oe,ue)=>{m({kind:"toolOutput",toolCallId:oe.toolCallId,output:{response:ue}},I(M))},e[18]=I,e[19]=M,e[20]=m,e[21]=X):X=e[21];const te=X;let J;e[22]!==I||e[23]!==M||e[24]!==m?(J=(oe,ue)=>{m({kind:"toolOutput",toolCallId:oe.toolCallId,output:{accepted:ue}},I(M))},e[22]=I,e[23]=M,e[24]=m,e[25]=J):J=e[25];const ae=J;let T;e[26]!==b||e[27]!==g||e[28]!==x||e[29]!==l||e[30]!==v?(T=oe=>{x({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:v,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:oe})}]}})},e[26]=b,e[27]=g,e[28]=x,e[29]=l,e[30]=v,e[31]=T):T=e[31];const Q=T,Z=ii;let H;e[32]!==I||e[33]!==m?(H=(oe,ue,Be,be)=>{m({kind:"approval",approvalId:oe,approved:ue,...Be?{reason:Be}:{}},I(be))},e[32]=I,e[33]=m,e[34]=H):H=e[34];const ne=H,G=Vs();if(G.isCreditExhausted){let oe;return e[35]!==k||e[36]!==d||e[37]!==i?(oe=k?n.jsx(Jr,{onDismiss:d}):n.jsx("div",{className:z(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(Mt,{kind:"ai_budget_exhausted",onDismiss:d})}),e[35]=k,e[36]=d,e[37]=i,e[38]=oe):oe=e[38],oe}const{showError:ce,showWarning:ie,hasApprovals:fe}=G,le=L.map(ri).join("|"),$e=as(U)?.toolCallId??"",ht=F.map(oi).join("|"),Ne=!i&&"absolute bottom-full left-0 right-0";let Ve;e[39]!==Ne?(Ve=z(Ne),e[39]=Ne,e[40]=Ve):Ve=e[40];let he;e[41]!==G.todos?(he=n.jsx($r,{todos:G.todos}),e[41]=G.todos,e[42]=he):he=e[42];let ge;e[43]!==d||e[44]!==G.subscriptionErrorKind||e[45]!==C?(ge=G.subscriptionErrorKind&&n.jsx(ei,{kind:G.subscriptionErrorKind,onDismiss:d,onSubscribe:C}),e[43]=d,e[44]=G.subscriptionErrorKind,e[45]=C,e[46]=ge):ge=e[46];let de;e[47]!==d||e[48]!==G.planRefusal?(de=G.planRefusal&&n.jsx(Mt,{kind:G.planRefusal,onDismiss:d}),e[47]=d,e[48]=G.planRefusal,e[49]=de):de=e[49];let xe;e[50]!==d||e[51]!==V||e[52]!==$||e[53]!==ce?(xe=ce&&n.jsx(Qe,{variant:"error",error:V,onDismiss:d,onFixInChat:$}),e[50]=d,e[51]=V,e[52]=$,e[53]=ce,e[54]=xe):xe=e[54];let je;e[55]!==c||e[56]!==u||e[57]!==W||e[58]!==ie?(je=ie&&n.jsx(Qe,{variant:"warning",finishReason:u,onDismiss:c,onContinue:W}),e[55]=c,e[56]=u,e[57]=W,e[58]=ie,e[59]=je):je=e[59];const Ie=fe&&n.jsx(jr,{approvals:F,isStreaming:f,onRespond:ne},ht),_e=G.hasPlans&&n.jsx(wr,{plans:U,isStreaming:f,onApprove:Q,onDismiss:Z},$e),Me=G.hasTaskSuggestion&&n.jsx(Or,{parts:_,isStreaming:f,onRespond:ae},_.at(-1)?.toolCallId??"");let ve;e[60]!==G.isWaitingForUserInput||e[61]!==te||e[62]!==f||e[63]!==le||e[64]!==L?(ve=G.isWaitingForUserInput&&n.jsx(xs,{userAskParts:L,isStreaming:f,onSubmit:te},le),e[60]=G.isWaitingForUserInput,e[61]=te,e[62]=f,e[63]=le,e[64]=L,e[65]=ve):ve=e[65];let ke;return e[66]!==Ve||e[67]!==he||e[68]!==ge||e[69]!==de||e[70]!==xe||e[71]!==je||e[72]!==Ie||e[73]!==_e||e[74]!==Me||e[75]!==ve?(ke=n.jsxs("div",{className:Ve,children:[he,ge,de,xe,je,Ie,_e,Me,ve]}),e[66]=Ve,e[67]=he,e[68]=ge,e[69]=de,e[70]=xe,e[71]=je,e[72]=Ie,e[73]=_e,e[74]=Me,e[75]=ve,e[76]=ke):ke=e[76],ke}function oi(t){return t.approvalId}function ri(t){return t.toolCallId}function ii(){document.querySelector("[data-chat-input]")?.focus()}function ai(t){return t.type==="tool-user_ask"}ze.Error=function(e){return n.jsx(Qe,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};ze.Warning=function(e){return n.jsx(Qe,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};ze.UserAskQuestion=xs;function bs(t){const e=R.c(20),{taskId:s}=t,o=B(),r=Sn(s),i=Cn(r),a=Nn(),{stop:l,removeLocalMessage:V}=Fe();if(i.length===0)return null;let d;e[0]!==o?(d=o("chat.queueTray.sendNow"),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Bt,{size:14}),e[4]=c):c=e[4];let p;e[5]!==d||e[6]!==u?(p=n.jsx(He,{asChild:!0,children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:c})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==o?(f=o("chat.queueTray.sendNow"),e[8]=o,e[9]=f):f=e[9];let m;e[10]!==f?(m=n.jsx(Je,{side:"top",children:n.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=m):m=e[11];let h;e[12]!==p||e[13]!==m?(h=n.jsxs(Ze,{delayDuration:400,children:[p,m]}),e[12]=p,e[13]=m,e[14]=h):h=e[14];let g;return e[15]!==a||e[16]!==V||e[17]!==o||e[18]!==s?(g=(x,v)=>n.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[n.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-semibold text-muted-foreground dark:bg-background",children:v+1}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:x.text}),n.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{a.cancel(s,x.messageId).then(b=>{b&&(In(s,x.messageId),V(x.messageId))})},children:n.jsx(zt,{className:"size-3.5"})})})]},x.messageId),e[15]=a,e[16]=V,e[17]=o,e[18]=s,e[19]=g):g=e[19],n.jsxs("div",{className:"mb-1 overflow-hidden rounded-2xl border border-border bg-card dark:bg-muted",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[n.jsx("span",{children:o(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),h]}),i.map(g)]})}const li={anthropic:/^claude-/,openrouter:/^anthropic\/claude-/,deco:/^anthropic\/claude-/};function Vi(t,e){return li[t]?.test(e)??!1}function ci(t){return ko(t)&&Vi(t.providerId,t.modelId)}function di(t,e){return t?{modelId:t.modelId,title:t.title??t.modelId,keyId:t.keyId,providerId:e,description:null,logo:null,capabilities:[],limits:null,costs:null}:null}const ui={fast:"chat.tierTrigger.tierFast",smart:"chat.tierTrigger.tierSmart",thinking:"chat.tierTrigger.tierThinking"};function pi(t){const e=R.c(32),{tier:s,orgSlot:o,userSlot:r,autoSlot:i,filterModels:a,onPick:l,onReset:V,onClose:d}=t,u=B(),c=ns(),p=new Set(c.map(fi)),f=Tn([r,o,i],p),m=f?.keyId??null,[h,g]=P.useState(m??c[0]?.id??null),x=c.some(F=>F.id===h)?h:m??c[0]?.id??null,v=x?c.find(F=>F.id===x):null,b="flex h-[70vh] max-h-[460px] w-full flex-col",j=ui[s];let A;e[0]!==u||e[1]!==j?(A=u(j),e[0]=u,e[1]=j,e[2]=A):A=e[2];let k;e[3]!==A?(k=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A}),e[3]=A,e[4]=k):k=e[4];let w;e[5]!==V||e[6]!==u||e[7]!==r?(w=r&&n.jsx("button",{type:"button",onClick:V,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded-lg hover:bg-accent cursor-pointer",children:u("chat.modelPreferences.reset")}),e[5]=V,e[6]=u,e[7]=r,e[8]=w):w=e[8];let y;e[9]!==k||e[10]!==w?(y=n.jsxs("div",{className:"flex items-center justify-between px-3 h-8 shrink-0",children:[k,w]}),e[9]=k,e[10]=w,e[11]=y):y=e[11];const C="flex-1 min-h-0",S=P.Suspense;let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx(fo,{}),e[12]=I):I=e[12];const N=So,M=!0,E=di(m?f:null,v?.providerId??"deco");let D;e[13]!==x||e[14]!==l||e[15]!==g?(D=F=>{const q=F.keyId??x??"";g(q),l({keyId:q,modelId:F.modelId,title:F.title})},e[13]=x,e[14]=l,e[15]=g,e[16]=D):D=e[16];let L;e[17]!==N||e[18]!==x||e[19]!==a||e[20]!==d||e[21]!==g||e[22]!==E||e[23]!==D?(L=n.jsx(N,{compact:M,filterModels:a,onClose:d,credentialId:x,onCredentialChange:g,selectedModel:E,onModelChange:D}),e[17]=N,e[18]=x,e[19]=a,e[20]=d,e[21]=g,e[22]=E,e[23]=D,e[24]=L):L=e[24];let _;e[25]!==S||e[26]!==L||e[27]!==I?(_=n.jsx("div",{className:C,children:n.jsx(S,{fallback:I,children:L})}),e[25]=S,e[26]=L,e[27]=I,e[28]=_):_=e[28];let U;return e[29]!==_||e[30]!==y?(U=n.jsxs("div",{className:b,children:[y,_]}),e[29]=_,e[30]=y,e[31]=U):U=e[31],U}function fi(t){return t.id}const hi=["fast","smart","thinking"];function As(t){return{fast:t("chat.tierTrigger.tierFast"),smart:t("chat.tierTrigger.tierSmart"),thinking:t("chat.tierTrigger.tierThinking")}}const Dt={fast:"chat.agentModels.quickerResponses",smart:"chat.agentModels.balancedQuality",thinking:"chat.agentModels.deeperReasoning"};function mi(t){const e=R.c(28),{tier:s,pillIcon:o,groups:r}=t,i=B();let a;e[0]!==i?(a=As(i),e[0]=i,e[1]=a):a=e[1];const l=a,[V,d]=P.useState(!1);let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=y=>{y.onSelect(),d(!1)},e[2]=u):u=e[2];const c=u,p=l[s];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),e[3]=f):f=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),e[4]=m):m=e[4];const h=l[s];let g;e[5]!==h?(g=n.jsx("span",{className:m,children:h}),e[5]=h,e[6]=g):g=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Jt,{size:12,className:"opacity-60 hidden @[320px]/chat-bottom:inline-block"}),e[7]=x):x=e[7];let v;e[8]!==o||e[9]!==p||e[10]!==g?(v=n.jsx(He,{asChild:!0,children:n.jsx("span",{className:"inline-flex min-w-0 shrink",children:n.jsx(Xt,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default","aria-label":p,className:f,children:[o,g,x]})})})}),e[8]=o,e[9]=p,e[10]=g,e[11]=v):v=e[11];let b;e[12]!==p?(b=n.jsx(Je,{children:p}),e[12]=p,e[13]=b):b=e[13];let j;e[14]!==v||e[15]!==b?(j=n.jsxs(Ze,{children:[v,b]}),e[14]=v,e[15]=b,e[16]=j):j=e[16];let A;if(e[17]!==r||e[18]!==i){let y;e[20]!==i?(y=C=>n.jsx("div",{className:"flex flex-col",children:C.rows.map(S=>n.jsxs("div",{className:"group/tier-row relative flex items-stretch rounded-lg hover:bg-muted",children:[n.jsxs("button",{type:"button",role:"menuitem","aria-label":S.title,onClick:()=>c(S),className:z("flex flex-1 min-w-0 items-start gap-2 px-2 py-1.5 text-left",S.modelOverride&&"pr-7 [@media(hover:hover)]:pr-2"),children:[S.icon&&n.jsx("span",{className:"shrink-0 text-muted-foreground mt-0.5",children:S.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-sm",children:S.title}),S.subtitle&&n.jsx("div",{className:"text-xs text-muted-foreground",children:S.subtitle})]}),S.active&&n.jsx("span",{title:i("chat.tierTrigger.selected"),children:n.jsx(it,{size:14,className:"text-foreground mt-0.5"})})]}),S.modelOverride&&n.jsx(xi,{label:S.title,render:S.modelOverride})]},S.key))},C.key),e[20]=i,e[21]=y):y=e[21],A=r.map(y),e[17]=r,e[18]=i,e[19]=A}else A=e[19];let k;e[22]!==A?(k=n.jsx(es,{align:"end",className:"p-1 w-64",onOpenAutoFocus:gi,children:n.jsx("div",{role:"menu",className:"flex flex-col",children:A})}),e[22]=A,e[23]=k):k=e[23];let w;return e[24]!==V||e[25]!==j||e[26]!==k?(w=n.jsxs(ts,{open:V,onOpenChange:d,children:[j,k]}),e[24]=V,e[25]=j,e[26]=k,e[27]=w):w=e[27],w}function gi(t){return t.preventDefault()}function xi(t){const e=R.c(38),{label:s,render:o}=t,r=B(),i=ss(),[a,l]=P.useState(!1);let V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V=()=>l(!1),e[0]=V):V=e[0];const d=V;let u;e[1]!==s||e[2]!==r?(u=r("chat.modelPreferences.customizeModel",{tier:s}),e[1]=s,e[2]=r,e[3]=u):u=e[3];const c=a&&"opacity-100";let p;e[4]!==c?(p=z("absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center","size-6 rounded-lg bg-background border border-border/60 shadow-sm","text-muted-foreground hover:text-foreground","opacity-100 [@media(hover:hover)]:opacity-0","[@media(hover:hover)]:group-hover/tier-row:opacity-100","[@media(hover:hover)]:group-focus-within/tier-row:opacity-100",c),e[4]=c,e[5]=p):p=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(bn,{size:14}),e[6]=f):f=e[6];let m;e[7]!==u||e[8]!==p?(m=n.jsx("button",{type:"button","aria-label":u,className:p,children:f}),e[7]=u,e[8]=p,e[9]=m):m=e[9];const h=m;if(i){let j;e[10]!==h?(j=n.jsx(go,{asChild:!0,children:h}),e[10]=h,e[11]=j):j=e[11];let A;e[12]!==s||e[13]!==r?(A=r("chat.modelPreferences.customizeModel",{tier:s}),e[12]=s,e[13]=r,e[14]=A):A=e[14];let k;e[15]!==A?(k=n.jsx(xo,{className:"sr-only",children:A}),e[15]=A,e[16]=k):k=e[16];let w;e[17]!==a||e[18]!==o?(w=a&&o(d),e[17]=a,e[18]=o,e[19]=w):w=e[19];let y;e[20]!==w||e[21]!==k?(y=n.jsxs(vo,{className:"p-0 flex flex-col max-h-[95vh]",children:[k,w]}),e[20]=w,e[21]=k,e[22]=y):y=e[22];let C;return e[23]!==a||e[24]!==y||e[25]!==j?(C=n.jsxs(bo,{open:a,onOpenChange:l,children:[j,y]}),e[23]=a,e[24]=y,e[25]=j,e[26]=C):C=e[26],C}let g;e[27]!==h?(g=n.jsx(Xt,{asChild:!0,children:h}),e[27]=h,e[28]=g):g=e[28];let x;e[29]!==a||e[30]!==o?(x=a&&o(d),e[29]=a,e[30]=o,e[31]=x):x=e[31];let v;e[32]!==x?(v=n.jsx(es,{side:"right",align:"start",collisionPadding:12,className:"w-[min(22rem,calc(100vw-2rem))] p-0 overflow-hidden",children:x}),e[32]=x,e[33]=v):v=e[33];let b;return e[34]!==a||e[35]!==g||e[36]!==v?(b=n.jsxs(ts,{open:a,onOpenChange:l,children:[g,v]}),e[34]=a,e[35]=g,e[36]=v,e[37]=b):b=e[37],b}function Rt(t){return t==="fast"?n.jsx(at,{size:16}):t==="thinking"?n.jsx(vn,{size:16}):n.jsx(Ao,{size:16})}function vi(t){const e=R.c(13),s=Dn();let o;e[0]!==t||e[1]!==s.tiers?(o=d=>{const u=s.tiers[d];return u?u.title??u.modelId:t.chat[d]?.title},e[0]=t,e[1]=s.tiers,e[2]=o):o=e[2];const r=o;let i;e[3]!==r?(i=r("fast"),e[3]=r,e[4]=i):i=e[4];let a;e[5]!==r?(a=r("smart"),e[5]=r,e[6]=a):a=e[6];let l;e[7]!==r?(l=r("thinking"),e[7]=r,e[8]=l):l=e[8];let V;return e[9]!==i||e[10]!==a||e[11]!==l?(V={fast:i,smart:a,thinking:l},e[9]=i,e[10]=a,e[11]=l,e[12]=V):V=e[12],V}function bi(){const t=R.c(24),e=B(),{simpleModeTier:s,setSimpleModeTier:o}=Ge(),r=yo(),i=ns(),a=wo(i),l=vi(a),{data:V,error:d}=_n();let u;t[0]!==V?(u=V===void 0?{tiers:{}}:V,t[0]=V,t[1]=u):u=t[1];const c=u,p=Mn(),f=Vt()?.lockedHarness==="claude-code",m=Oe("model_choice"),h=oo(),g=ro();if(!h||!m)return null;let x,v;if(t[2]!==a||t[3]!==g||t[4]!==f||t[5]!==r||t[6]!==o||t[7]!==e||t[8]!==s||t[9]!==l||t[10]!==p||t[11]!==c||t[12]!==d){const w=As(e);x="decopilot",v=hi.map(y=>{const C=l[y],S=c.tiers[y];return{key:`decopilot-${y}`,icon:Rt(y),title:w[y],subtitle:g?C??e(Dt[y]):e(Dt[y]),active:s===y,onSelect:()=>o(y),modelOverride:g?I=>n.jsxs(n.Fragment,{children:[d&&n.jsx("div",{className:"text-xs text-destructive p-3 pb-0",children:e("chat.modelPreferences.loadFailed")}),n.jsx(pi,{tier:y,orgSlot:r.tiers[y],userSlot:S,autoSlot:a.chat[y],filterModels:f?ci:void 0,onClose:I,onPick:N=>p.mutate({tier:y,slot:N}),onReset:()=>p.mutate({tier:y,slot:null})},`${y}:${S?.keyId??"org"}:${S?.modelId??""}`)]}):void 0}}),t[2]=a,t[3]=g,t[4]=f,t[5]=r,t[6]=o,t[7]=e,t[8]=s,t[9]=l,t[10]=p,t[11]=c,t[12]=d,t[13]=x,t[14]=v}else x=t[13],v=t[14];let b;t[15]!==x||t[16]!==v?(b=[{key:x,rows:v}],t[15]=x,t[16]=v,t[17]=b):b=t[17];const j=b;let A;t[18]!==s?(A=Rt(s),t[18]=s,t[19]=A):A=t[19];let k;return t[20]!==j||t[21]!==A||t[22]!==s?(k=n.jsx(mi,{tier:s,pillIcon:A,groups:j}),t[20]=j,t[21]=A,t[22]=s,t[23]=k):k=t[23],k}function ys(t){const e=R.c(3),[s]=Se();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&Lo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Ai={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},yi=ln.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),ji=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function ki(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:ji.map(wi)}),t[0]=e):e=t[0],e}function wi(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function Si({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:r,onUnsupportedFile:i}){const a=B(),[l,V]=P.useState(!1),d=ys(Ai),{org:u}=Ce(),{editor:c}=Ot(),p=P.useRef(null),f=pt(o),m=()=>{!f||r||(V(!1),p.current?.click())},h=async T=>{const Q=T.target.files;if(!Q||Q.length===0||!c)return;const Z=Array.from(Q);try{let H=c.state.selection.from;for(const ne of Z)await os(c,o??null,ne,H,i,a),H=c.state.selection.to}finally{p.current&&(p.current.value="")}},g=Do({connectionId:s,orgId:u.id,orgSlug:u.slug}),x=Es.virtualMcpPrompts(s,u.id),{data:v,isLoading:b}=Ps({queryKey:x,queryFn:()=>Ro(g),staleTime:6e4,enabled:l&&!!g}),j=v?.prompts??[],[A,k]=P.useState(null),{chatMode:w,setChatMode:y}=Ge(),[C,S]=Se(),I=Vt()?.lockedHarness!=="claude-code",N=we.find(T=>T.value===C.toolApprovalLevel)??we[0],M=a(N.shortKey),E=T=>{const Q=we.find(Z=>Z.value===T);if(Q){if(Q.value===C.toolApprovalLevel){V(!1);return}d(),ee("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:Q.value,source:"tools_popover"}),S({...C,toolApprovalLevel:Q.value}),V(!1)}},D=w==="plan",L=()=>{d();const T=D?"default":"plan";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},_=()=>{e(),V(!1)},U=async(T,Q)=>{if(!c||!g)return;const Z=kt(T._meta),H={from:c.state.selection.from,to:c.state.selection.to};try{const ne=await Eo(g,T.name,Q);tn(c,H,{id:T.name,name:Mo(T.name,Z),metadata:ne.messages,char:"/",kind:"prompt",args:Q})}catch{Ee.error(a("chat.toolsPopover.failedLoadPrompt"))}},F=async T=>{V(!1);const Q=!!(T.arguments&&T.arguments.length>0);if(ee("chat_prompt_inserted",{prompt_name:T.name,with_arguments:Q}),Q){k(T);return}await U(T)},q=async T=>{A&&(await U(A,T),k(null))},$=()=>{d();const T=w==="gen-image"?"default":"gen-image";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},O=()=>{d();const T=w==="web-search"?"default":"web-search";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},W=()=>{d();const T=w==="deep-research"?"default":"deep-research";ee("chat_mode_changed",{from_mode:w,to_mode:T,source:"tools_popover"}),y(T),V(!1)},X=w==="gen-image",te=w==="web-search",J=w==="deep-research",ae=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:ho(o??null),className:"hidden",onChange:h,disabled:r});return n.jsxs(n.Fragment,{children:[ae,n.jsxs(Ls,{open:l,onOpenChange:T=>{T&&!l&&ee("chat_tools_popover_opened",{chat_mode:w}),V(T)},children:[n.jsx(Us,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default",disabled:t,title:a("chat.toolsPopover.tools"),"aria-label":a("chat.toolsPopover.tools"),className:z("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[n.jsx(An,{size:14}),n.jsx("span",{className:z("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:a("chat.toolsPopover.tools")})]})}),n.jsxs(Fs,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?n.jsxs(Ae,{onClick:m,disabled:r,children:[n.jsx(wt,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]}):n.jsxs(Ze,{children:[n.jsx(He,{asChild:!0,children:n.jsxs(Ae,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:T=>T.preventDefault(),children:[n.jsx(wt,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.addFile")})]})}),n.jsx(Je,{side:"right",children:a("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(Ae,{onClick:L,className:z(D&&"text-special"),children:[n.jsx(Kt,{size:16,className:z(D&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:a("chat.toolsPopover.planMode")}),n.jsx("span",{className:z("text-xs text-muted-foreground",D&&"text-special font-medium"),children:yi})]}),n.jsxs(Ae,{onClick:$,className:z(X&&"text-special"),children:[n.jsx(Gt,{size:16,className:z(X&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.createImage")}),X&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(Ae,{onClick:O,className:z(te&&"text-special"),children:[n.jsx(Wt,{size:16,className:z(te&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.webSearch")}),te&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(Ae,{onClick:W,className:z(J&&"text-special"),children:[n.jsx(Yt,{size:16,className:z(J&&"text-special")}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.deepResearch")}),J&&n.jsx("span",{className:"text-xs text-special font-medium",children:a("chat.toolsPopover.on")})]}),n.jsxs(xt,{children:[n.jsxs(vt,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.prompts")})]}),n.jsx(bt,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Os,{className:"size-3.5"}),a("chat.toolsPopover.loadingPrompts")]}):j.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:a("chat.toolsPopover.noPromptsAvailable")}):j.map(T=>n.jsxs(Ae,{onClick:()=>F(T),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:T.title||_o(T.name,kt(T._meta))}),T.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:T.description})]},T.name))})]}),I&&n.jsxs(xt,{children:[n.jsxs(vt,{className:"gap-2",children:[n.jsx(We,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:M})]}),n.jsx(bt,{className:"w-48 p-1.5",children:n.jsx(zs,{value:C.toolApprovalLevel,onValueChange:E,children:we.map(T=>n.jsx($s,{value:T.value,children:a(T.labelKey)},T.value))})})]}),n.jsxs(Ae,{onClick:_,children:[n.jsx(Po,{size:16}),n.jsx("span",{className:"flex-1",children:a("chat.toolsPopover.connections")}),n.jsx(P.Suspense,{children:n.jsx(ki,{})})]})]})]}),n.jsx(en,{prompt:A,setPrompt:k,onSubmit:q})]})}const Ci=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ni(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:Ci.map(Ii)}),t[0]=e):e=t[0],e}function Ii(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ti(t){const e=R.c(10),{onClick:s}=t,o=B();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=z("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=r):r=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=a):a=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ni,{}),V=n.jsx(Bs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==a?(d=n.jsxs("button",{type:"button",onClick:s,className:r,children:[a,l,V]}),e[7]=s,e[8]=a,e[9]=d):d=e[9],d}const Re=48;function _i(){const t=R.c(9),[e,s]=P.useState("idle"),[o,r]=P.useState(""),[i,a]=P.useState(""),[l,V]=P.useState(Ri),d=P.useRef(null),u=P.useRef(null),c=P.useRef(null),p=P.useRef(null),f=P.useRef(0),m=P.useRef(!1),h=P.useRef(""),g=P.useRef(""),x=typeof window<"u"&&!!(window.SpeechRecognition||window.webkitSpeechRecognition);let v;t[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{f.current&&(cancelAnimationFrame(f.current),f.current=0),u.current?.close().catch(Di),p.current?.getTracks().forEach(Mi),c.current=null,u.current=null,p.current=null},t[0]=v):v=t[0];const b=v;let j;if(t[1]===Symbol.for("react.memo_cache_sentinel")){const I=N=>{p.current=N;const M=new AudioContext;u.current=M;const E=M.createMediaStreamSource(N),D=M.createAnalyser();D.fftSize=128,D.smoothingTimeConstant=.8,E.connect(D),c.current=D;const L=new Uint8Array(D.frequencyBinCount),_=()=>{if(!c.current)return;c.current.getByteFrequencyData(L);const U=[];for(let F=0;F<Re;F++){const q=Math.floor(F/Re*L.length);U.push(Math.max(.04,(L[q]??0)/255))}V(U),f.current=requestAnimationFrame(_)};_()};j=async()=>{const N=window.SpeechRecognition||window.webkitSpeechRecognition;if(!N)return s("unsupported"),"unsupported";let M;try{M=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{return s("permission-denied"),"permission-denied"}r(""),a(""),g.current="",h.current="",m.current=!0,s("recording"),I(M);const E=new N;d.current=E,E.interimResults=!0,E.continuous=!0,E.lang=navigator.language||"en-US",E.onresult=D=>{if(d.current!==E)return;let L="",_="";for(let U=D.resultIndex;U<D.results.length;U++){const F=D.results[U],q=F?.[0]?.transcript??"";F?.isFinal?_=_+q:L=L+q}_&&(h.current=h.current+_,r(h.current)),g.current=L,a(L)},E.onerror=D=>{d.current===E&&D.error!=="no-speech"&&(m.current=!1,d.current=null,b(),s(D.error==="not-allowed"?"permission-denied":"idle"))},E.onend=()=>{if(d.current===E&&m.current)try{E.start()}catch{}};try{E.start()}catch{return m.current=!1,d.current=null,b(),s("idle"),"idle"}return"recording"},t[1]=j}else j=t[1];const A=j;let k;t[2]===Symbol.for("react.memo_cache_sentinel")?(k=()=>{m.current=!1,d.current?.stop(),b(),s("idle"),V(Array(Re).fill(.05)),a("");const I=(h.current+(g.current?" "+g.current:"")).trim();return r(""),h.current="",g.current="",I},t[2]=k):k=t[2];const w=k;let y;t[3]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m.current=!1,d.current?.abort(),b(),s("idle"),r(""),a(""),V(Array(Re).fill(.05)),h.current="",g.current=""},t[3]=y):y=t[3];const C=y;let S;return t[4]!==i||t[5]!==e||t[6]!==o||t[7]!==l?(S={status:e,transcript:o,interimTranscript:i,waveformData:l,isSupported:x,startRecording:A,stopRecording:w,cancelRecording:C},t[4]=i,t[5]=e,t[6]=o,t[7]=l,t[8]=S):S=t[8],S}function Mi(t){return t.stop()}function Di(){}function Ri(){return Array(Re).fill(.05)}function Ei(t){const e=R.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Pi),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==o?(r=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=r):r=e[3],r}function Pi(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Et=re({token:se(),expiresAt:qs()});Qs("provider",[re({provider:ye("elevenlabs"),conversationToken:se().min(1)}),re({provider:ye("openai"),transport:ye("webrtc")})]);const Li=Ks([Et.extend({provider:ye("elevenlabs").default("elevenlabs"),conversationToken:se().min(1)}),Et.extend({provider:ye("openai"),transport:ye("webrtc")})]);re({token:se().min(1).max(4096),text:se().trim().min(1).max(Pe)});const js=re({request:se().trim().min(1).max(Pe)}),ot=5e3;Ut(re({role:Ue(["user","agent"]),text:se().min(1).max(ot)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=ot,{message:"Voice transcript is too long"});function pl(t){const e=[];let s=ot;for(const o of t.slice(-60).reverse()){if(s<=0)break;const r=o.text.slice(-s);e.unshift({role:o.role,text:r}),s-=r.length}return e}re({token:se().min(1).max(4096),sdp:se().min(1).max(1e5),language:Ue(["en","pt"]).default("en")}).strict();const Ui=re({sdp:se().min(1).max(1e5)});async function Fi(t,e,s,o,r){if(t.provider==="openai"){const{startOpenAIConversation:l}=await At(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-CBNQtuep.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131]));return l(r,s,o)}const{Conversation:i}=await At(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const a=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=js.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await a.endSession(),o.throwIfAborted()),{endSession:()=>a.endSession(),setMicMuted:l=>a.setMicMuted(l),getOutputVolume:()=>a.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?a.sendContextualUpdate(V):a.sendUserMessage(`[Studio background event, not a new user request]
10
10
  ${V}
11
11
  Briefly report this update. Do not delegate it as new work.`)}}}const Oi=re({background:ye(!0),status:ye("started"),jobId:se().min(1)}),zi=re({item:re({id:se().min(1),title:se(),status:se()})}),$i=t=>`${t}:react-msg`;function ks(t,e){const s=t.findIndex(r=>r.id===e&&r.role==="user");if(s<0)return null;const o=[];for(const r of t.slice(s+1))if(!r.metadata?.subtaskJobId){if(r.role==="user")break;r.role==="assistant"&&o.push(r)}return o}function Pt(t,e){const s=[],o=[];for(const r of ks(t,e)??[])for(const i of r.parts){if(!("state"in i)||i.state!=="output-available"||!("output"in i))continue;const a=i.type;if(a==="tool-subtask"){const l=Oi.safeParse(i.output);l.success&&s.push(l.data.jobId)}else if(a==="tool-TASK_BOARD_ITEM_CREATE"){const l=zi.safeParse(i.output);l.success&&o.push(l.data.item)}}return{backgroundJobs:s,tasks:o}}function Lt(t,e){const s=ks(t,e);if(!s)return null;const o=s.at(-1);if(!o||o.parts.some(l=>"state"in l&&["approval-requested","input-streaming","input-available"].includes(String(l.state))))return null;const r=o.parts.findLast(l=>l.type==="text"||l.type==="dynamic-tool"||l.type.startsWith("tool-"));if(r?.type!=="text")return"";if(r.state==="streaming")return null;const i=r.text.replace(/```[\s\S]*?```/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(?:#{1,6}\s+|[-*+]\s+|\d+\.\s+)/gm,"").replace(/[*_`]/g,"").trim();if(!i)return"";if(i.length<=Pe)return i;const a=i.slice(0,Pe-1);return`${a.slice(0,a.lastIndexOf(" "))}…`}class Bi{constructor(e,s){this.url=e,this.language=s}url;language;state={phase:"idle",muted:!1,working:!1,error:null};listeners=new Set;generation=0;conversation;startupAbort;userSpeaking=!1;token;timer;expires;bindings;jobs=new Map;announcements=[];lastActivity=0;approvalReported=!1;cleanup=Promise.resolve();dispatchQueue=Promise.resolve();lastContext="";lastWorkStatus="";utterance=0;seenUserEvents=new Set;tasks=new Map;boardUpdates=new Map;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;outputVolume=()=>this.conversation?.getOutputVolume()??0;patch(e){if(!Object.entries(e).every(([s,o])=>this.state[s]===o)){this.state={...this.state,...e};for(const s of this.listeners)s()}}updateBindings(e,s){if(this.bindings=e,!s&&this.state.phase!=="idle"){this.stop();return}this.conversation&&(this.updateContext(),this.collectResults())}requestStatus(e){return e.result!==void 0?"finished":e.accepted?e.background?"running_in_background":this.bindings?.messages.some(s=>s.id===e.messageId)?"running":"queued":"submitting"}status(){const e=this.bindings;return{status:e?.isWaitingForApprovals?"approval_required":e?.error||e?.status==="error"?"failed":e?.isStreaming||e?.isRunInProgress?"working":"idle",requests:[...this.jobs.values()].slice(-6).map(s=>({id:s.messageId,request:s.request.slice(0,200),status:this.requestStatus(s),result:s.result?.slice(0,500)})),tasks:[...this.tasks.values()].slice(-10).map(s=>({title:s.title.slice(0,120),status:s.status}))}}updateContext(){const e=this.bindings?.voiceContext??"";e!==this.lastContext&&(this.lastContext=e,this.conversation?.publishUpdate({text:`Current Studio view, supplied as context only:
12
12
  ${e.slice(0,12e3)}`,delivery:"context",contextId:"studio-view"}))}collectResults(){const e=this.bindings;if(!e||!this.conversation)return;const s=e.isStreaming||e.isRunInProgress;if(this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus(),e.isWaitingForApprovals){this.approvalReported||(this.approvalReported=!0,this.report("The Studio agent needs the user's approval. The approval controls are visible in this chat. Ask the user to review them; do not approve on their behalf."));return}this.approvalReported=!1;for(const o of this.jobs.values()){if(!o.accepted||o.result!==void 0)continue;if(o.background){this.collectBackground(o,s);continue}const r=e.messages.findIndex(l=>l.id===o.messageId);if(r<0)continue;const i=r>=0&&e.messages.slice(r+1).some(l=>l.role==="user");if(s&&!i)continue;let a;if(!s&&!i&&(e.error||e.status==="error"))a="The agent's run failed. Ask the user to return to the chat for the error details; do not claim completion.";else if(!s&&!i&&e.finishReason&&["error","length","content-filter","aborted"].includes(e.finishReason))a=`The run ended with status ${e.finishReason}; successful completion is not established.`;else{const l=Lt(e.messages,o.messageId);if(l===null)continue;a=l;const V=Pt(e.messages,o.messageId);if(this.track(V.tasks),V.backgroundJobs.length){o.background=V.backgroundJobs,this.collectBackground(o,s);continue}}this.finish(o,a||"The agent finished without a final text response. Do not infer that the requested change succeeded.")}this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus()}collectBackground(e,s){const o=this.bindings?.messages??[],r=[];for(const i of e.background??[]){const a=$i(i),l=o.findIndex(u=>u.id===a);if(l<0)return;const V=o.slice(l+1).some(u=>u.role==="user");if(s&&!V)return;const d=Lt(o,a);if(d===null)return;this.track(Pt(o,a).tasks),r.push(d)}this.finish(e,r.filter(Boolean).join(`