decocms 4.570.1 → 4.571.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/dist/client/assets/{AlertCircle-DSTgjQZE.js → AlertCircle-Cbs5Ab1P.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BFiXRx9a.js → AreaChart-CToSouiR.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-ENfdZA7-.js → ArrowLeft-2ggpgqb0.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BNjQS3K-.js → ArrowUp-cgUvwam2.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-D6hSTdD_.js → CartesianChart-CQdu8PPi.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-BvoSRMBa.js → CategoricalChart-B5fszPCD.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-B5oyaJit.js → CheckCircle-D2qom1Qe.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-D9X2NrqX.js → ChevronSelectorVertical-CSCxxcTv.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-CWpA2uR_.js → ChevronUp-DPwvtZ7T.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-DUDVRgSi.js → CreditCard01-BeIdgKm8.js} +1 -1
  11. package/dist/client/assets/{Globe04-cXNn3Iwb.js → Globe04-BNjS8hE_.js} +1 -1
  12. package/dist/client/assets/{Key01-DykOvg3J.js → Key01-Bb2fYsyQ.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-DWhYckSm.js → LinkBroken01-a5oI2X-K.js} +1 -1
  14. package/dist/client/assets/{Minus-DD8EF-Qg.js → Minus-HfQUebB7.js} +1 -1
  15. package/dist/client/assets/{Monitor01-Brx479PM.js → Monitor01-D0NO-K1o.js} +1 -1
  16. package/dist/client/assets/{Play-Cnv-o711.js → Play-UerN5i51.js} +1 -1
  17. package/dist/client/assets/{Plus-Cyljarjx.js → Plus-BqBCvRtk.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-CU3NLmsp.js → ReferenceLine-8Od-_LqW.js} +1 -1
  19. package/dist/client/assets/{SearchMd-B8lLWvFT.js → SearchMd-ip9BTueQ.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-CsD1bZL0.js → ShoppingBag01-Z5jujKnF.js} +1 -1
  21. package/dist/client/assets/{Sun-qBi61vDS.js → Sun-BqxGPQ7c.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-omZLJ9y8.js → SwitchHorizontal01-xah_f_KH.js} +1 -1
  23. package/dist/client/assets/{Tool01-U3lMqDqt.js → Tool01-CAgFzAvv.js} +1 -1
  24. package/dist/client/assets/{Tooltip-DUfhZGnv.js → Tooltip-2CGCyakg.js} +1 -1
  25. package/dist/client/assets/{Trash01-BbqimkDt.js → Trash01-C7v1fWGY.js} +1 -1
  26. package/dist/client/assets/{Upload01-CKgAWfXR.js → Upload01-7apXt8L7.js} +1 -1
  27. package/dist/client/assets/{UserSquare-BItoQb26.js → UserSquare-Dfda7sxk.js} +1 -1
  28. package/dist/client/assets/{Users01-C6CsMI-H.js → Users01-DGaGzIcz.js} +1 -1
  29. package/dist/client/assets/{XClose-B0OqPlIT.js → XClose-DaTfQwji.js} +1 -1
  30. package/dist/client/assets/{Zap-FLVG2fHK.js → Zap-CmFvKOKc.js} +1 -1
  31. package/dist/client/assets/{access-gate-BjOW8RuZ.js → access-gate-DSrHE9mR.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-CUGt2QIL.js → add-connection-dialog-sfNoRM_t.js} +1 -1
  33. package/dist/client/assets/agent-app-B_xuQBe4.js +1 -0
  34. package/dist/client/assets/agent-assets-BOBiAU4U.js +1 -0
  35. package/dist/client/assets/{agent-automation-DlJDTqvr.js → agent-automation-JSDOOiNt.js} +1 -1
  36. package/dist/client/assets/{agent-automations-DNMHOegy.js → agent-automations-dSGzVGTE.js} +1 -1
  37. package/dist/client/assets/agent-calendar-JsZQH9DJ.js +1 -0
  38. package/dist/client/assets/{agent-capabilities-DOVKnykH.js → agent-capabilities-CuOmNgv3.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-DLaujtJt.js → agent-connect-sources-f0poJHtj.js} +1 -1
  40. package/dist/client/assets/agent-deck-DrS8cvv6.js +1 -0
  41. package/dist/client/assets/agent-e2e-DsNy3BsN.js +1 -0
  42. package/dist/client/assets/agent-experiments-BmXzB7sO.js +1 -0
  43. package/dist/client/assets/agent-file-Y-EO6Btn.js +1 -0
  44. package/dist/client/assets/agent-hosting-BS_jB6we.js +1 -0
  45. package/dist/client/assets/{agent-icon-DKTp0XyY.js → agent-icon-BGTckvlP.js} +1 -1
  46. package/dist/client/assets/agent-library-BeOICuv4.js +1 -0
  47. package/dist/client/assets/agent-library-file-BLEe6X-g.js +1 -0
  48. package/dist/client/assets/agent-overview-DK7iRg_t.js +1 -0
  49. package/dist/client/assets/{agent-releases-DXsHCiTg.js → agent-releases-B_K3FIWy.js} +1 -1
  50. package/dist/client/assets/agent-settings-BjOD_o2l.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-CTCs3RDg.js → agent-site-editor-CiaB1f7K.js} +1 -1
  52. package/dist/client/assets/agent-site-editor-code--mSzyNhn.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-CxN1Ldoy.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-RW-nzlvn.js +1 -0
  55. package/dist/client/assets/agent-view-DaSIF8yy.js +1 -0
  56. package/dist/client/assets/{agent-view-guard-CuLYN5bV.js → agent-view-guard-H_xpaENl.js} +1 -1
  57. package/dist/client/assets/{ai-providers-9vWHbCvl.js → ai-providers-OlLaxP2V.js} +1 -1
  58. package/dist/client/assets/{alert-Bvpz2H4v.js → alert-CWtTJO7c.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-TE-35yVi.js → analytics-sections-DH9U0O99.js} +1 -1
  60. package/dist/client/assets/{api-keys-C-jExymv.js → api-keys-B4joTgKi.js} +1 -1
  61. package/dist/client/assets/api-keys-CI8mz52i.js +1 -0
  62. package/dist/client/assets/{app-editor-DnFNwaE0.js → app-editor-BrdqMvUA.js} +1 -1
  63. package/dist/client/assets/{asset-utils-C8aDDKpg.js → asset-utils-BO-AcYFX.js} +1 -1
  64. package/dist/client/assets/{auth-I4p8-ocC.js → auth-BExDXNDY.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-CwgMTdiF.js → auth-catchall-CU4VU9mW.js} +1 -1
  66. package/dist/client/assets/{auth-entry-DandZrkK.js → auth-entry-CuJQjZjM.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-Dg_DSwSr.js → auth-split-layout-BCXGVZBW.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-NcJzMudq.js → authenticate-and-persist-oauth-vexqf63k.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-BaDQ8nN-.js → automation-list-row-Bp87yYiZ.js} +1 -1
  70. package/dist/client/assets/{automation-runs-BsUJbSCS.js → automation-runs-DiRDWuN3.js} +1 -1
  71. package/dist/client/assets/{automations-BnTFSnM5.js → automations-DMWU0I6x.js} +1 -1
  72. package/dist/client/assets/{autosend-BWmOY3ov.js → autosend-DL4CutFR.js} +1 -1
  73. package/dist/client/assets/{badge-DStDMa4b.js → badge-CVFmvf1e.js} +1 -1
  74. package/dist/client/assets/{block-document-DIb-ND30.js → block-document-BENHfkyr.js} +1 -1
  75. package/dist/client/assets/{blocks-preview-workspace-context-C8dnQCV5.js → blocks-preview-workspace-context-EXsoCHPE.js} +1 -1
  76. package/dist/client/assets/{blocks-tab-states-C3vtkrE6.js → blocks-tab-states-Of3CFRB8.js} +1 -1
  77. package/dist/client/assets/{blog-schema-7Bvb7ybL.js → blog-schema-BG9a5NjF.js} +1 -1
  78. package/dist/client/assets/{buckets-CzpSZY9W.js → buckets-CC28Un34.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc-DSMfcdZz.js → build-improve-prompt-doc-BISiPdsN.js} +1 -1
  80. package/dist/client/assets/{calendar-CWxLf6uz.js → calendar-9d4oM3ql.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-C-cOEkiu.js → capability-load-error-ByWk_AoZ.js} +1 -1
  82. package/dist/client/assets/{category-editor-llVhx3m4.js → category-editor-7CKgp_eM.js} +1 -1
  83. package/dist/client/assets/{chart-aXx8MtyI.js → chart-DXLoDuxi.js} +1 -1
  84. package/dist/client/assets/{chat-context-B8Z5vGcJ.js → chat-context-WEEHZlsn.js} +1 -1
  85. package/dist/client/assets/{chat-draft-DkEn0tls.js → chat-draft-CeM2nWLu.js} +1 -1
  86. package/dist/client/assets/{checkbox-BprzbiMO.js → checkbox-KpsWsk0_.js} +1 -1
  87. package/dist/client/assets/{choose-editor-SgZcLGEy.js → choose-editor-PfXE6_H8.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-DK2OLw1X.js → cli-auth-success-C2W_huzL.js} +1 -1
  89. package/dist/client/assets/{client-icons-xxn_7LaS.js → client-icons-CCN4dFtx.js} +1 -1
  90. package/dist/client/assets/{cms-settings-editor-BZi_-T0e.js → cms-settings-editor-CdGJgv0b.js} +1 -1
  91. package/dist/client/assets/{cms-store-drafts-SBEy3_cr.js → cms-store-drafts-dVKFaKA7.js} +1 -1
  92. package/dist/client/assets/{collapsible-DFsZxhwL.js → collapsible-B14xMZuR.js} +1 -1
  93. package/dist/client/assets/{collection-detail-CSrSzasC.js → collection-detail-pdnHCRF6.js} +1 -1
  94. package/dist/client/assets/{collection-display-button-BxcAk_pb.js → collection-display-button-CRiNqITy.js} +1 -1
  95. package/dist/client/assets/{collection-search-Bhx5TJ6L.js → collection-search-Ck-1gfFY.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-BoSXl9vr.js → collection-table-wrapper-BlhppHAs.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-QO8RS8bh.js → collection-tabs-6FzXiv6G.js} +1 -1
  98. package/dist/client/assets/{combobox-BmbiPO09.js → combobox-fgtxpSsO.js} +1 -1
  99. package/dist/client/assets/{command-uMdfud6o.js → command-C37DfioB.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-AvTxX0pL.js → companion-mcps-section-pEyer4h1.js} +1 -1
  101. package/dist/client/assets/{config-C9OaANUg.js → config-C_d2w75d.js} +1 -1
  102. package/dist/client/assets/{connect-C__OLdre.js → connect-CyzT5SDn.js} +1 -1
  103. package/dist/client/assets/{connect-layout-BGiLRWZe.js → connect-layout-DCavpmFh.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-a9uKmocf.js → connect-source-dialog-MOlb_mGB.js} +1 -1
  105. package/dist/client/assets/{connection-DG7KBlix.js → connection-BjCYlDIW.js} +1 -1
  106. package/dist/client/assets/{connection-card-qG0EXE1L.js → connection-card-qC58rx0g.js} +1 -1
  107. package/dist/client/assets/{connection-detail-CpfvCnzG.js → connection-detail-CnaYuh7u.js} +1 -1
  108. package/dist/client/assets/{connection-form-helpers-Ce5Bf_zZ.js → connection-form-helpers-9PE7Ghza.js} +1 -1
  109. package/dist/client/assets/{connection-slug-BoBDHMu2.js → connection-slug-DgmEtT2x.js} +1 -1
  110. package/dist/client/assets/{connections-d7gGzcVn.js → connections-DG7FZ0U7.js} +1 -1
  111. package/dist/client/assets/{content-tab-BCGl_up3.js → content-tab-Ce8Q2_t2.js} +3 -3
  112. package/dist/client/assets/{context-BL8O-tTH.js → context-BB5j-Jdw.js} +1 -1
  113. package/dist/client/assets/{context-menu-D_E7697D.js → context-menu-BrSBg_ox.js} +1 -1
  114. package/dist/client/assets/{context-shell-DunJzbL-.js → context-shell-D7i0aANg.js} +3 -3
  115. package/dist/client/assets/{core.esm-BKNJrrxU.js → core.esm-FUcIa7Fp.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-DJ9X5Xlz.js → create-organization-dialog-D_0hk2gK.js} +1 -1
  117. package/dist/client/assets/{device-hint-Ce3veXZo.js → device-hint-CyMFSeT8.js} +1 -1
  118. package/dist/client/assets/{discover-NcR5tz4J.js → discover-DJRtlG9n.js} +1 -1
  119. package/dist/client/assets/{domain-settings-DimTUYUq.js → domain-settings-Y_vTNHIA.js} +1 -1
  120. package/dist/client/assets/{drawer-C6lamT3y.js → drawer-C8tQ9pS2.js} +1 -1
  121. package/dist/client/assets/{editor-C7RxjaWr.js → editor-QJRHEQ16.js} +1 -1
  122. package/dist/client/assets/{editor-classes-B55y9L5n.js → editor-classes-B6F-sROj.js} +1 -1
  123. package/dist/client/assets/{empty-state-DM7xlu-4.js → empty-state-BCvL-1M3.js} +1 -1
  124. package/dist/client/assets/{empty-state-Ci8hZXbK.js → empty-state-DKsEkDWT.js} +1 -1
  125. package/dist/client/assets/{experiments-tab-choice-ByO3wkbg.js → experiments-tab-choice-CbV3SQAK.js} +1 -1
  126. package/dist/client/assets/{extract-connection-data-C8qmylg2.js → extract-connection-data-Co4igpCy.js} +1 -1
  127. package/dist/client/assets/{feature-gate-C6EPE__O.js → feature-gate-CS539brz.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-7RP1Qwpl.js → feature-paywall-BVeAB8_F.js} +1 -1
  129. package/dist/client/assets/{feedback-idlW6Rt2.js → feedback-DF1F9BRw.js} +1 -1
  130. package/dist/client/assets/{file-explorer-LvtKoAWE.js → file-explorer-Sdd0azAq.js} +1 -1
  131. package/dist/client/assets/{file-preview-Ds-vtVwj.js → file-preview-BQioSlJw.js} +1 -1
  132. package/dist/client/assets/{file-share-button-B6jqluQi.js → file-share-button-Dq-dVjtE.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-C_NX_6K0.js → file-type-icon-CNDz0hBy.js} +1 -1
  134. package/dist/client/assets/{folder-icon-nyqn5Twi.js → folder-icon-U2FEFXsO.js} +1 -1
  135. package/dist/client/assets/{form-dOKUm1o9.js → form-DXyLAoEr.js} +1 -1
  136. package/dist/client/assets/{general-CmjqVXSD.js → general-DxPErvh9.js} +1 -1
  137. package/dist/client/assets/{github-icon-D5i5T8iF.js → github-icon-DTSso41S.js} +1 -1
  138. package/dist/client/assets/{home-Bf_aEScW.js → home-C-LgRFYa.js} +1 -1
  139. package/dist/client/assets/{home-overview-BaddYyk7.js → home-overview-BLmq-j06.js} +1 -1
  140. package/dist/client/assets/{hosted-reconcile-BdQaV1pW.js → hosted-reconcile-BRk5mz3x.js} +1 -1
  141. package/dist/client/assets/{icon-button-CL44LV6o.js → icon-button-B4XnwraP.js} +1 -1
  142. package/dist/client/assets/{index-Cojr6Fpq.js → index-B6AqVyRx.js} +1 -1
  143. package/dist/client/assets/{index-BoutsVvy.js → index-BFve9Wi8.js} +1 -1
  144. package/dist/client/assets/{index-DR80z_C4.js → index-BMlrWTB1.js} +1 -1
  145. package/dist/client/assets/{index-LOAUw-Ks.js → index-BgFyWMUk.js} +1 -1
  146. package/dist/client/assets/{index-CSIpvoWn.js → index-Bgkjt4vy.js} +3 -3
  147. package/dist/client/assets/{index-Y545ko-X.js → index-C7lWWhIU.js} +1 -1
  148. package/dist/client/assets/{index-C0-jFhOF.js → index-CQ63loJV.js} +1 -1
  149. package/dist/client/assets/{index-FggPcfHb.js → index-D08mzr4H.js} +1 -1
  150. package/dist/client/assets/{index-CmbhAzcu.js → index-D3t73ds8.js} +1 -1
  151. package/dist/client/assets/{index-Cu6-9y1I.js → index-DObYgDqg.js} +1 -1
  152. package/dist/client/assets/{index-e0iOUxAj.js → index-DP8sH5of.js} +1 -1
  153. package/dist/client/assets/{index-BZRUARFj.js → index-DovyWo-R.js} +1 -1
  154. package/dist/client/assets/index-DxfUJlA4.js +4 -0
  155. package/dist/client/assets/{index-4w1PAhG_.js → index-RQA3UZ8F.js} +1 -1
  156. package/dist/client/assets/{index-DADVzh-A.js → index-cE8Cg_AR.js} +1 -1
  157. package/dist/client/assets/{index-cBNiMokO.js → index-kwATYZnP.js} +1 -1
  158. package/dist/client/assets/{index-redirect-Bcv6Ftw-.js → index-redirect-CcWBc9jM.js} +1 -1
  159. package/dist/client/assets/{infiniteQueryObserver-CgO-7OwI.js → infiniteQueryObserver-X5CcDr9j.js} +1 -1
  160. package/dist/client/assets/{infra-billing-C63z5K_k.js → infra-billing-DFPWiYwa.js} +1 -1
  161. package/dist/client/assets/{input-DPkRheY2.js → input-B1ylvcHV.js} +3 -3
  162. package/dist/client/assets/{input-BX4MndAE.js → input-BYA2vxZm.js} +1 -1
  163. package/dist/client/assets/{integration-icon-dTPy2b7i.js → integration-icon-C7bRwcH_.js} +1 -1
  164. package/dist/client/assets/{jira-icon-B-iFZO-u.js → jira-icon-DGCOmFp6.js} +1 -1
  165. package/dist/client/assets/{label-ceAH5i3J.js → label-D25-0Wh6.js} +1 -1
  166. package/dist/client/assets/{layout-t2hFRUfQ.js → layout-DnoCv7Y5.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-QW5LKNZ9.js → legacy-agents-deep-C5jspcJW.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-agOJ7qxO.js → legacy-main-redirect-D7NT1WBZ.js} +1 -1
  169. package/dist/client/assets/library-B8KAYORe.js +1 -0
  170. package/dist/client/assets/{library-tab-Cd6LpVzA.js → library-tab-tbFrXHgR.js} +1 -1
  171. package/dist/client/assets/{login-DAO6F2t7.js → login-Cn8-U1Kv.js} +1 -1
  172. package/dist/client/assets/{markdown-R4HS4rag.js → markdown-12a9C6gs.js} +1 -1
  173. package/dist/client/assets/{mcp-app-renderer-BhX-TA45.js → mcp-app-renderer-D5couJ6l.js} +1 -1
  174. package/dist/client/assets/{mcp-oauth-BD1gbmnp.js → mcp-oauth-BaddOlGq.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-B9XClwsH.js → mcp-oauth-a2WNYr35.js} +1 -1
  176. package/dist/client/assets/{members-B5ITOykA.js → members-CZ44ad9P.js} +1 -1
  177. package/dist/client/assets/{memory-2YoF1gtv.js → memory-C6DEVRSO.js} +1 -1
  178. package/dist/client/assets/{mock-board-B8zFRpTH.js → mock-board-DfUD0CJt.js} +3 -3
  179. package/dist/client/assets/{monaco-editor-COXw9tpM.js → monaco-editor-Cn1TEUmq.js} +1 -1
  180. package/dist/client/assets/{monitoring-stats-row-Bqran8Kb.js → monitoring-stats-row-B_RviRp-.js} +1 -1
  181. package/dist/client/assets/{monitoring-D40iJL2y.js → monitoring-z5KlpAiC.js} +1 -1
  182. package/dist/client/assets/{multi-select-CJZaGsBr.js → multi-select-DAJzscc4.js} +1 -1
  183. package/dist/client/assets/{mustache-R0EQOelB.js → mustache-BYgEr74H.js} +1 -1
  184. package/dist/client/assets/{named-rule-view-C5CYsfvZ.js → named-rule-view-a6Af9Y_h.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-CIVKu-7h.js → new-project-dialog-DZScwreb.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-BPcRWINw.js → oauth-callback-CssoBuAl.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-B-M4ZinT.js → oauth-callback-ai-provider-DeW99Mbt.js} +1 -1
  188. package/dist/client/assets/{oauth-consent-D4opNBgY.js → oauth-consent-3FbtrQ-O.js} +1 -1
  189. package/dist/client/assets/{onboarding-B4LUp0An.js → onboarding-idlA3-zh.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-zvFqUh2z.js → openai-conversation-C88BC7Je.js} +1 -1
  191. package/dist/client/assets/optimistic-project-sidebar-views-C-XQYFtN.js +1 -0
  192. package/dist/client/assets/{order-monitor-day-DAdsKEE4.js → order-monitor-day-DRh7v9Pq.js} +1 -1
  193. package/dist/client/assets/{organization-choice-BS5zo77t.js → organization-choice-D8HF6Nft.js} +1 -1
  194. package/dist/client/assets/{orgs-KOkht6C7.js → orgs-HEuftt--.js} +1 -1
  195. package/dist/client/assets/{own-accounts-section-x8GM3van.js → own-accounts-section-BoGn4pOO.js} +1 -1
  196. package/dist/client/assets/{pair-CCa5vpj1.js → pair-Ct1xgxut.js} +1 -1
  197. package/dist/client/assets/{parse-sections-y55_dTHG.js → parse-sections-D-35SZIB.js} +3 -3
  198. package/dist/client/assets/{plan-Bu1ae04L.js → plan-CfTunmR6.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-DexOsahh.js → plan-ladder-iJPGG0mc.js} +1 -1
  200. package/dist/client/assets/{plan-usage-card-Dv-we64H.js → plan-usage-card-CPmF1Mdc.js} +1 -1
  201. package/dist/client/assets/{popover-DvNPDyrT.js → popover-CRX5tFOb.js} +1 -1
  202. package/dist/client/assets/{post-calendar-BbxK7Nck.js → post-calendar-BJXCzebc.js} +1 -1
  203. package/dist/client/assets/{post-editor-D3-DvSTe.js → post-editor-wf3j_7Z5.js} +1 -1
  204. package/dist/client/assets/{preview-content-B_nl5Vt5.js → preview-content-BSZZr-mZ.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-CSKtivij.js → preview-dialog-BcxXfQ6o.js} +1 -1
  206. package/dist/client/assets/{preview-panel-Bgx1GfaD.js → preview-panel-Ce1qZOdd.js} +1 -1
  207. package/dist/client/assets/{preview-tab-BhpH-2Ud.js → preview-tab-ClX_Bl94.js} +3 -3
  208. package/dist/client/assets/{product-picker-dialog-7dCvJecm.js → product-picker-dialog-Q92D1y36.js} +1 -1
  209. package/dist/client/assets/{profile-CE19vOJM.js → profile-CERW1LgW.js} +1 -1
  210. package/dist/client/assets/{project-app-view-1nFCQkd0.js → project-app-view-CEubGD1t.js} +1 -1
  211. package/dist/client/assets/{project-apps-BH_f18IX.js → project-apps-C951mymv.js} +1 -1
  212. package/dist/client/assets/{project-icon-MnmUeo9G.js → project-icon-CzcU3Mqg.js} +1 -1
  213. package/dist/client/assets/{project-index-VbMkJjNv.js → project-index-BJwudS3v.js} +1 -1
  214. package/dist/client/assets/project-reports-BfKeLcLP.js +1 -0
  215. package/dist/client/assets/project-tasks-Dn-Gv_TR.js +1 -0
  216. package/dist/client/assets/{projects-BV3gIN23.js → projects-DYDXJVDD.js} +1 -1
  217. package/dist/client/assets/{projects-empty-state-afMxQRTs.js → projects-empty-state-DQUhcI6R.js} +1 -1
  218. package/dist/client/assets/{prompts-oZ33-QKo.js → prompts-Pr-m_FAx.js} +1 -1
  219. package/dist/client/assets/record-editor-DBJCnSL6.js +1 -0
  220. package/dist/client/assets/{redirect-editor-CYAcoJC8.js → redirect-editor-BGvUBqUv.js} +1 -1
  221. package/dist/client/assets/reports-DR2YJPbu.js +1 -0
  222. package/dist/client/assets/{reports-CDhkA5XZ.js → reports-DzbfP0a1.js} +1 -1
  223. package/dist/client/assets/{reports-onboarding-N-tDslEn.js → reports-onboarding-fdfwoC5Y.js} +1 -1
  224. package/dist/client/assets/{reports-tab-CwMJYWOD.js → reports-tab-DsenaOP3.js} +2 -2
  225. package/dist/client/assets/{repositories-Dd6j8vDN.js → repositories-BKBt9Cjw.js} +1 -1
  226. package/dist/client/assets/repositories-ByhK-3bU.js +1 -0
  227. package/dist/client/assets/{repository-binding-lATwNZrT.js → repository-binding-SOF1batH.js} +1 -1
  228. package/dist/client/assets/{repository-picker-C4hJc23I.js → repository-picker-DL7LhDyE.js} +1 -1
  229. package/dist/client/assets/{require-capability-DC5p7lOC.js → require-capability-CulwBmL_.js} +1 -1
  230. package/dist/client/assets/{required-auth-layout-C3gt0jrF.js → required-auth-layout-Bbj3yijQ.js} +1 -1
  231. package/dist/client/assets/{reset-password-CyyT5tby.js → reset-password-CEDutYaS.js} +1 -1
  232. package/dist/client/assets/{resizable-BOUBAwD3.js → resizable-BF1q0sZm.js} +1 -1
  233. package/dist/client/assets/{resolve-tab-icon-Cy2CMMCX.js → resolve-tab-icon-BZMbKk3n.js} +1 -1
  234. package/dist/client/assets/{review-settings-BckYzYJ3.js → review-settings-ZkiMBoaj.js} +1 -1
  235. package/dist/client/assets/{role-color-DoTrcNjE.js → role-color-C9uhwzF-.js} +1 -1
  236. package/dist/client/assets/{roles-Bcyxf_BJ.js → roles-CEON3RQs.js} +1 -1
  237. package/dist/client/assets/route-D7DW4Q6o.js +1 -0
  238. package/dist/client/assets/route-DEPx9jGW.js +1 -0
  239. package/dist/client/assets/route-iWPPipTt.js +1 -0
  240. package/dist/client/assets/{sandbox-lifecycle-context-ezRldKto.js → sandbox-lifecycle-context-Cuu6DFTF.js} +1 -1
  241. package/dist/client/assets/{schema-oSx50TOf.js → schema-DCIk1LTk.js} +1 -1
  242. package/dist/client/assets/{schema-CYb0A5pZ.js → schema-DJM5djBQ.js} +1 -1
  243. package/dist/client/assets/{scroll-area-C2kqOV3G.js → scroll-area-jAJHvOhj.js} +1 -1
  244. package/dist/client/assets/{search-input-D2_G90x-.js → search-input-DVDThqIB.js} +1 -1
  245. package/dist/client/assets/{search-toggle-DB94_Uzf.js → search-toggle-CI-y0p8p.js} +1 -1
  246. package/dist/client/assets/{secret-picker-BaH4MCDx.js → secret-picker-popVUrUL.js} +1 -1
  247. package/dist/client/assets/{secrets-Ba8vj8rp.js → secrets-DalYwIr1.js} +1 -1
  248. package/dist/client/assets/{section-array-field-C_pqbrT4.js → section-array-field-DC06wjHY.js} +1 -1
  249. package/dist/client/assets/{sections-CiSDVCFc.js → sections-D1hA-xOU.js} +1 -1
  250. package/dist/client/assets/{sections-editor-DbbjUxTa.js → sections-editor-D78O6u_r.js} +1 -1
  251. package/dist/client/assets/{select-5VAmllhJ.js → select-lF0wcoip.js} +1 -1
  252. package/dist/client/assets/{select-model-CGTpgJ_F.js → select-model-D7HU-f3b.js} +1 -1
  253. package/dist/client/assets/{seo-editor-BToxCPgQ.js → seo-editor-CtzJbmZQ.js} +1 -1
  254. package/dist/client/assets/{separator-BPNBTypb.js → separator-C_6waQwt.js} +1 -1
  255. package/dist/client/assets/settings-tab-udmQO91m.js +1 -0
  256. package/dist/client/assets/{sheet-DO79DyVm.js → sheet-B-HfTX7L.js} +1 -1
  257. package/dist/client/assets/{shell-layout-BE-F-e8S.js → shell-layout-DJhfQde-.js} +1 -1
  258. package/dist/client/assets/{site-draft-actions-CSmqWURg.js → site-draft-actions-CMHnwxCd.js} +1 -1
  259. package/dist/client/assets/{site-draft-view-D9Mkp6Cl.js → site-draft-view-CwjjGmMd.js} +1 -1
  260. package/dist/client/assets/site-editor-DG5keOVm.js +1 -0
  261. package/dist/client/assets/{site-editor-toast-hszpYNCy.js → site-editor-toast-CFZ3g20k.js} +1 -1
  262. package/dist/client/assets/{skills-Bv-bIoQE.js → skills-TRY4s8Yy.js} +1 -1
  263. package/dist/client/assets/{slider-ShXfqPv2.js → slider-DGqHqKd3.js} +1 -1
  264. package/dist/client/assets/{sortable.esm-CuHm_9IF.js → sortable.esm-DwDHqu2Z.js} +1 -1
  265. package/dist/client/assets/{sso-CSplF7G4.js → sso-Am4Nf_A1.js} +1 -1
  266. package/dist/client/assets/{suggestion-D3ekTtHr.js → suggestion-9_dojs-y.js} +1 -1
  267. package/dist/client/assets/{switch-DXYVQM5M.js → switch-Bh4leDQ8.js} +1 -1
  268. package/dist/client/assets/{synced-repos-CuP83Elu.js → synced-repos-lK4skxC9.js} +1 -1
  269. package/dist/client/assets/{tab-icon-glyph-vdlPy3Bm.js → tab-icon-glyph-DQowlddo.js} +1 -1
  270. package/dist/client/assets/{table-D0fiB6FK.js → table-BVlqjzf4.js} +1 -1
  271. package/dist/client/assets/{tabs-Cv20SIqi.js → tabs-CE50d848.js} +1 -1
  272. package/dist/client/assets/{task-board-DSsXkzaF.js → task-board-D_hXj2Vy.js} +1 -1
  273. package/dist/client/assets/{task-route-DMVHtIU_.js → task-route-Be5seRTj.js} +1 -1
  274. package/dist/client/assets/{task-status-BNhGvcs9.js → task-status-1axt5dZB.js} +1 -1
  275. package/dist/client/assets/{taskboard-analytics-CMwW3rsH.js → taskboard-analytics-r6HixYm_.js} +1 -1
  276. package/dist/client/assets/tasks-BWjB_1VS.js +1 -0
  277. package/dist/client/assets/{tasks-DhVzWH9H.js → tasks-CdxgNM_V.js} +1 -1
  278. package/dist/client/assets/{textarea-jvxCA8mN.js → textarea-DnFolSR6.js} +1 -1
  279. package/dist/client/assets/{thread-analytics-CM1xCbgM.js → thread-analytics-BoSR9_dC.js} +1 -1
  280. package/dist/client/assets/{thread-intent-BirCtYTn.js → thread-intent-W-PQxNVd.js} +1 -1
  281. package/dist/client/assets/{thread-route-gjL8sFh9.js → thread-route-B-6djUfH.js} +1 -1
  282. package/dist/client/assets/{thread-route-BaKA80Bq.js → thread-route-mCuisQJI.js} +1 -1
  283. package/dist/client/assets/{thread-sheet-body-C68t2imw.js → thread-sheet-body-C1IbmVK3.js} +1 -1
  284. package/dist/client/assets/{time-range-picker-8dvZbzAF.js → time-range-picker-DihnOOBB.js} +1 -1
  285. package/dist/client/assets/{toggle-group-BkFB4B6f.js → toggle-group-DErjWYXo.js} +1 -1
  286. package/dist/client/assets/{tool-namespace-BPtJyOTH.js → tool-namespace-Dwob85yl.js} +1 -1
  287. package/dist/client/assets/{tool-set-selector-D3Q4u2pt.js → tool-set-selector-C4XbxKMC.js} +1 -1
  288. package/dist/client/assets/{toolbar-icon-button-DWxNo-CH.js → toolbar-icon-button-CuzSG6Ep.js} +1 -1
  289. package/dist/client/assets/{tooltip-BS3U7s1j.js → tooltip-BP38juWI.js} +1 -1
  290. package/dist/client/assets/{tooltipContext-BLujWWNh.js → tooltipContext-BmU0TqD4.js} +1 -1
  291. package/dist/client/assets/{track-CpUWIu8h.js → track-auFJ_XdC.js} +1 -1
  292. package/dist/client/assets/{types-BzcfuN64.js → types-8U8D-Y9v.js} +1 -1
  293. package/dist/client/assets/{url-slug-BOoM9-0A.js → url-slug-CvXmCpJZ.js} +1 -1
  294. package/dist/client/assets/{usage-stats-8fBPxKmN.js → usage-stats-C-iZo0BZ.js} +1 -1
  295. package/dist/client/assets/{use-ai-providers-CGSjFpU8.js → use-ai-providers-BIh1KBLl.js} +1 -1
  296. package/dist/client/assets/{use-apply-named-rule-CpJPkStL.js → use-apply-named-rule-Cp8bLYtd.js} +1 -1
  297. package/dist/client/assets/use-ask-in-chat-BvyYDdXE.js +1 -0
  298. package/dist/client/assets/{use-automations-XQDz01iY.js → use-automations-BomrPGWU.js} +1 -1
  299. package/dist/client/assets/{use-autosave-C37w8LAn.js → use-autosave-CwfHnqn6.js} +1 -1
  300. package/dist/client/assets/use-blocks-v8-project-iz2iNvo9.js +1 -0
  301. package/dist/client/assets/{use-chat-layout-state-VEEgw78z.js → use-chat-layout-state-BJFKgYgw.js} +1 -1
  302. package/dist/client/assets/{use-cms-publish-actions-ZwEhZ1LO.js → use-cms-publish-actions-BqHNyOA0.js} +1 -1
  303. package/dist/client/assets/{use-connect-companion-DaWAsSVX.js → use-connect-companion-B9Lrc-HW.js} +1 -1
  304. package/dist/client/assets/{use-connection-Br1r8foQ.js → use-connection-BT_OOtuG.js} +1 -1
  305. package/dist/client/assets/{use-content-sync-W-nuOa0g.js → use-content-sync-B0MN54yQ.js} +1 -1
  306. package/dist/client/assets/{use-copy-B7Ns5hk7.js → use-copy-DrB0tWuk.js} +1 -1
  307. package/dist/client/assets/{use-date-fns-locale-DdNyhrK9.js → use-date-fns-locale-BBt-5tGJ.js} +1 -1
  308. package/dist/client/assets/{use-debounced-autosave-BWd-EoeM.js → use-debounced-autosave-DsHXF_za.js} +1 -1
  309. package/dist/client/assets/{use-debounced-value-_GKTwOmp.js → use-debounced-value-CekhRquV.js} +1 -1
  310. package/dist/client/assets/{use-deco-credits-D7cUDa9s.js → use-deco-credits-qwzMk2Ai.js} +1 -1
  311. package/dist/client/assets/{use-decopilot-events-MFonZFqV.js → use-decopilot-events-Dd92yoAZ.js} +1 -1
  312. package/dist/client/assets/{use-delete-connection-DqWgt_cH.js → use-delete-connection-D-UTTC0v.js} +1 -1
  313. package/dist/client/assets/{use-deployment-admin-Dpt106eE.js → use-deployment-admin-DE1jKIDx.js} +1 -1
  314. package/dist/client/assets/{use-entitlements-BIn3vhw_.js → use-entitlements-BWZ6Su0L.js} +1 -1
  315. package/dist/client/assets/{use-fast-preview-draft-url-Btcix_Th.js → use-fast-preview-draft-url-Cqws--qI.js} +1 -1
  316. package/dist/client/assets/{use-file-configs-B7N8jort.js → use-file-configs-DpxzYxst.js} +1 -1
  317. package/dist/client/assets/{use-id-selection-BYftOYVM.js → use-id-selection-BGnSfWFf.js} +1 -1
  318. package/dist/client/assets/{use-inbox-feed-Ccjtmqv0.js → use-inbox-feed-lQA3V0xG.js} +1 -1
  319. package/dist/client/assets/{use-infinite-scroll-DIKScsa1.js → use-infinite-scroll-wFaFK15q.js} +1 -1
  320. package/dist/client/assets/{use-join-requests-CUdH2HZc.js → use-join-requests-BdaV0Rjj.js} +1 -1
  321. package/dist/client/assets/use-main-panel-tabs-Dk8fH1fE.js +1 -0
  322. package/dist/client/assets/{use-mcp-auth-status-N-GvDO1N.js → use-mcp-auth-status-Ck3Se_Y3.js} +1 -1
  323. package/dist/client/assets/{use-mcp-client-C6kW4vbD.js → use-mcp-client-IMgoLgFY.js} +1 -1
  324. package/dist/client/assets/{use-mcp-prompts-CjpO3wzS.js → use-mcp-prompts-Bk_g-v-0.js} +1 -1
  325. package/dist/client/assets/{use-mcp-tools-Cjb6pYnM.js → use-mcp-tools-CtpSFCmz.js} +1 -1
  326. package/dist/client/assets/{use-mobile-Dl5gc-ru.js → use-mobile-CW7DCn5M.js} +1 -1
  327. package/dist/client/assets/{use-move-blocks-Ce0Kig2N.js → use-move-blocks-DfaBs3sc.js} +1 -1
  328. package/dist/client/assets/{use-navigate-to-agent-B5ZbLCUr.js → use-navigate-to-agent-DUsfLcvr.js} +1 -1
  329. package/dist/client/assets/{use-org-fs-BGMZPpcx.js → use-org-fs-DDvKBG9i.js} +1 -1
  330. package/dist/client/assets/{use-org-repo-syncs-BAfsGUin.js → use-org-repo-syncs-C4JLwrAt.js} +1 -1
  331. package/dist/client/assets/{use-org-sso-CwVEWYSS.js → use-org-sso-BH_ZUFcu.js} +1 -1
  332. package/dist/client/assets/{use-organization-settings-BTar9wUH.js → use-organization-settings-Ca4qUgyM.js} +1 -1
  333. package/dist/client/assets/use-project-native-view-presence-4sY_IqcV.js +1 -0
  334. package/dist/client/assets/{use-project-scope-D-D3vFqs.js → use-project-scope-CxaJ6AcP.js} +1 -1
  335. package/dist/client/assets/{use-recent-apps-CLezfBII.js → use-recent-apps-kdlh-9NG.js} +1 -1
  336. package/dist/client/assets/{use-reports-diagnostic-DOqTM6Sq.js → use-reports-diagnostic-DYAFraaD.js} +1 -1
  337. package/dist/client/assets/{use-sandbox-events-D2qF_K2w.js → use-sandbox-events-Bv6EHRzy.js} +1 -1
  338. package/dist/client/assets/{use-secrets-CdTtOnTm.js → use-secrets-BwcJJCVK.js} +1 -1
  339. package/dist/client/assets/{use-section-preview-base-BQcFctze.js → use-section-preview-base-CWdiCrj1.js} +1 -1
  340. package/dist/client/assets/{use-sidebar-collapsed-CU3_YQ2d.js → use-sidebar-collapsed-CEHXblGy.js} +1 -1
  341. package/dist/client/assets/{use-tags-ChNJSZUC.js → use-tags-CoD8SrC4.js} +1 -1
  342. package/dist/client/assets/{use-task-board-analytics-CEr1IeWK.js → use-task-board-analytics-B7geh4Sd.js} +1 -1
  343. package/dist/client/assets/{use-task-board-events-sZpvmMHd.js → use-task-board-events-CVDrlP1V.js} +1 -1
  344. package/dist/client/assets/{use-task-board-item-prs-Dv_8MGt1.js → use-task-board-item-prs-BrtOevur.js} +1 -1
  345. package/dist/client/assets/{use-task-board-items-CoNq_Cxi.js → use-task-board-items-COv-bhs6.js} +1 -1
  346. package/dist/client/assets/{use-task-board-prompts-CWMdTCPN.js → use-task-board-prompts-Dx8vM0fR.js} +1 -1
  347. package/dist/client/assets/{use-task-metadata-DsDxaplE.js → use-task-metadata-DPZ7Y524.js} +1 -1
  348. package/dist/client/assets/{use-thread-outputs-St6ye3b1.js → use-thread-outputs-Pm3V0nbB.js} +1 -1
  349. package/dist/client/assets/{use-voice-input-B9rrFwaR.js → use-voice-input-DwO5kNPT.js} +1 -1
  350. package/dist/client/assets/useInfiniteQuery-Sda1zjLQ.js +1 -0
  351. package/dist/client/assets/{useQueries-H5rWlyEJ.js → useQueries-CvrSJ4L5.js} +1 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-CscGJh0l.js +1 -0
  353. package/dist/client/assets/{users-wWFrk5XR.js → users-B-jZ9pgk.js} +1 -1
  354. package/dist/client/assets/{utils-1rHoZRD5.js → utils-CnVlph4k.js} +1 -1
  355. package/dist/client/assets/{variant-calendar-BktNebbV.js → variant-calendar-DSMYmXmT.js} +1 -1
  356. package/dist/client/assets/{variant-matcher-override-CtOZ7RsB.js → variant-matcher-override-DCs6FrU7.js} +1 -1
  357. package/dist/client/assets/{view-header-BOKi0SWm.js → view-header-CggAPEpA.js} +1 -1
  358. package/dist/client/assets/virtual-mcp-knTda3gw.js +1 -0
  359. package/dist/client/assets/{watch-sse-pool-D6Aszef8.js → watch-sse-pool-CjiXfMh2.js} +1 -1
  360. package/dist/client/index.html +1 -1
  361. package/dist/server/server.js +2 -2
  362. package/package.json +1 -1
  363. package/dist/client/assets/agent-app-D_QasKCt.js +0 -1
  364. package/dist/client/assets/agent-assets-CJlmAaWQ.js +0 -1
  365. package/dist/client/assets/agent-calendar-Z-NoCJJy.js +0 -1
  366. package/dist/client/assets/agent-deck-BHqHGfqC.js +0 -1
  367. package/dist/client/assets/agent-e2e-DhR3lPfF.js +0 -1
  368. package/dist/client/assets/agent-experiments-CsbbrlzU.js +0 -1
  369. package/dist/client/assets/agent-file-C-Y5K07p.js +0 -1
  370. package/dist/client/assets/agent-hosting-BYTFH-Ly.js +0 -1
  371. package/dist/client/assets/agent-library-BrbVgxGh.js +0 -1
  372. package/dist/client/assets/agent-library-file-38op_SYX.js +0 -1
  373. package/dist/client/assets/agent-overview-rJN7hxM8.js +0 -1
  374. package/dist/client/assets/agent-settings-OJszyqyL.js +0 -1
  375. package/dist/client/assets/agent-site-editor-code-Tm63iotr.js +0 -2
  376. package/dist/client/assets/agent-site-editor-content-DGdOpwTo.js +0 -1
  377. package/dist/client/assets/agent-site-editor-preview-UslQ1OuK.js +0 -1
  378. package/dist/client/assets/agent-view-D7OqtWKn.js +0 -1
  379. package/dist/client/assets/api-keys-BwvxdsTQ.js +0 -1
  380. package/dist/client/assets/index-BWLOSW33.js +0 -4
  381. package/dist/client/assets/library-y46FHCMx.js +0 -1
  382. package/dist/client/assets/optimistic-project-sidebar-views-HH03nXs0.js +0 -1
  383. package/dist/client/assets/project-reports-CnsbnjmF.js +0 -1
  384. package/dist/client/assets/project-sidebar-views-B0YI7MEr.js +0 -1
  385. package/dist/client/assets/project-tasks-DNvniFkq.js +0 -1
  386. package/dist/client/assets/record-editor-Z7XUx2eC.js +0 -1
  387. package/dist/client/assets/reports-D0p-Um_j.js +0 -1
  388. package/dist/client/assets/repositories-420JyOBQ.js +0 -1
  389. package/dist/client/assets/route-Dm6KS1MZ.js +0 -1
  390. package/dist/client/assets/route-WCW0DstB.js +0 -1
  391. package/dist/client/assets/route-Z2AgEOBo.js +0 -1
  392. package/dist/client/assets/settings-tab-CvzmrN3x.js +0 -1
  393. package/dist/client/assets/site-editor-BnuHlrBY.js +0 -1
  394. package/dist/client/assets/tasks-BesFuPIU.js +0 -1
  395. package/dist/client/assets/use-ask-in-chat-CpD8hrjd.js +0 -1
  396. package/dist/client/assets/use-blocks-v8-project-C468EFq8.js +0 -1
  397. package/dist/client/assets/use-main-panel-tabs-CCwGm8EC.js +0 -1
  398. package/dist/client/assets/useInfiniteQuery-Bh3c89Tr.js +0 -1
  399. package/dist/client/assets/useSuspenseInfiniteQuery-bp-UKwHD.js +0 -1
  400. package/dist/client/assets/virtual-mcp-o7wxm5IS.js +0 -1
@@ -1 +1 @@
1
- import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g3 as tt,gO as st}from"./index-CSIpvoWn.js";import{s as it}from"./Plus-Cyljarjx.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-CGSjFpU8.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-DStDMa4b.js";import{i as rt}from"./AlertCircle-DSTgjQZE.js";import{T as pe,a as ge,c as he}from"./tooltip-BS3U7s1j.js";import{S as at}from"./switch-DXYVQM5M.js";import{G as ct}from"./github-icon-D5i5T8iF.js";import{i as dt,s as ut,c as mt}from"./Tool01-U3lMqDqt.js";import{s as ft}from"./Trash01-BbqimkDt.js";import{u as pt,f as gt}from"./use-date-fns-locale-DdNyhrK9.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(be,{src:xe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:m,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=g,t[53]=e,t[54]=m,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=N?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}_(P)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...b("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(u?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?s.jsx(dt,{size:14}):s.jsx(ut,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(Ve,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Ye,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Je,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
1
+ import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g3 as tt,gO as st}from"./index-Bgkjt4vy.js";import{s as it}from"./Plus-BqBCvRtk.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-BIh1KBLl.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-CVFmvf1e.js";import{i as rt}from"./AlertCircle-Cbs5Ab1P.js";import{T as pe,a as ge,c as he}from"./tooltip-BP38juWI.js";import{S as at}from"./switch-Bh4leDQ8.js";import{G as ct}from"./github-icon-DTSso41S.js";import{i as dt,s as ut,c as mt}from"./Tool01-CAgFzAvv.js";import{s as ft}from"./Trash01-C7v1fWGY.js";import{u as pt,f as gt}from"./use-date-fns-locale-BBt-5tGJ.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(be,{src:xe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:m,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=g,t[53]=e,t[54]=m,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=N?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}_(P)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...b("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(u?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?s.jsx(dt,{size:14}):s.jsx(ut,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(Ve,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Ye,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Je,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
@@ -1,4 +1,4 @@
1
- import{c as M,r as z,j as l,fV as be,b as H,as as Ze,m as G,bx as ct,fW as He,fX as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fY as os,fZ as ft,a8 as rs,F as is,C as qe,d as We,f_ as tt,eO as cs,f$ as us}from"./index-CSIpvoWn.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-DKTp0XyY.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-U3lMqDqt.js";import{i as xt}from"./LinkBroken01-DWhYckSm.js";import{b as $s,C as Ms,a as As}from"./collapsible-DFsZxhwL.js";import{u as Ps}from"./use-copy-B7Ns5hk7.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-8fBPxKmN.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-BirCtYTn.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-B8Z5vGcJ.js";import{j as Ge,g as Zs,n as en}from"./shell-layout-BE-F-e8S.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-BhX-TA45.js";import{g as yt}from"./types-BzcfuN64.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-BS3U7s1j.js";import{c as an,u as ln,a as on}from"./use-mcp-client-C6kW4vbD.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-BPtJyOTH.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-DSTgjQZE.js";import{s as cn}from"./XClose-B0OqPlIT.js";import{n as De}from"./ShoppingBag01-CsD1bZL0.js";import{i as un}from"./SearchMd-B8lLWvFT.js";import{a as Ke}from"./autosend-BWmOY3ov.js";import{b as Tt}from"./use-entitlements-BIn3vhw_.js";import{I as dn,M as Ct}from"./markdown-R4HS4rag.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-DO79DyVm.js";import{I as Se}from"./integration-icon-dTPy2b7i.js";import{a as It}from"./use-connection-Br1r8foQ.js";import{u as $t}from"./use-navigate-to-agent-B5ZbLCUr.js";import{s as xn}from"./UserSquare-BItoQb26.js";import{g as hn}from"./use-mcp-prompts-CjpO3wzS.js";import{t as bn}from"./ChevronUp-CWpA2uR_.js";import{i as yn}from"./Monitor01-Brx479PM.js";import{a as jn}from"./use-thread-outputs-St6ye3b1.js";import{F as vn}from"./file-type-icon-C_NX_6K0.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"shimmer"),children:n})})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(et(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Hs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
1
+ import{c as M,r as z,j as l,fV as be,b as H,as as Ze,m as G,bx as ct,fW as He,fX as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fY as os,fZ as ft,a8 as rs,F as is,C as qe,d as We,f_ as tt,eO as cs,f$ as us}from"./index-Bgkjt4vy.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-BGTckvlP.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-CAgFzAvv.js";import{i as xt}from"./LinkBroken01-a5oI2X-K.js";import{b as $s,C as Ms,a as As}from"./collapsible-B14xMZuR.js";import{u as Ps}from"./use-copy-DrB0tWuk.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-C-iZo0BZ.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-W-PQxNVd.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-WEEHZlsn.js";import{j as Ge,g as Zs,n as en}from"./shell-layout-DJhfQde-.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-D5couJ6l.js";import{g as yt}from"./types-8U8D-Y9v.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-BP38juWI.js";import{c as an,u as ln,a as on}from"./use-mcp-client-IMgoLgFY.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-Dwob85yl.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-Cbs5Ab1P.js";import{s as cn}from"./XClose-DaTfQwji.js";import{n as De}from"./ShoppingBag01-Z5jujKnF.js";import{i as un}from"./SearchMd-ip9BTueQ.js";import{a as Ke}from"./autosend-DL4CutFR.js";import{b as Tt}from"./use-entitlements-BWZ6Su0L.js";import{I as dn,M as Ct}from"./markdown-12a9C6gs.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-B-HfTX7L.js";import{I as Se}from"./integration-icon-C7bRwcH_.js";import{a as It}from"./use-connection-BT_OOtuG.js";import{u as $t}from"./use-navigate-to-agent-DUsfLcvr.js";import{s as xn}from"./UserSquare-Dfda7sxk.js";import{g as hn}from"./use-mcp-prompts-Bk_g-v-0.js";import{t as bn}from"./ChevronUp-DPwvtZ7T.js";import{i as yn}from"./Monitor01-D0NO-K1o.js";import{a as jn}from"./use-thread-outputs-Pm3V0nbB.js";import{F as vn}from"./file-type-icon-CNDz0hBy.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"shimmer"),children:n})})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(et(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Hs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
2
2
  `).trim().split(`
3
3
  `).filter(Boolean),j=a?k[k.length-1]??"":k[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map(Rn).join(`
4
4