decocms 4.569.0 → 4.570.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.
- package/dist/client/assets/{AlertCircle-C8lUSNa8.js → AlertCircle-1CFQF9HU.js} +1 -1
- package/dist/client/assets/{AreaChart-Co4_GDFk.js → AreaChart-CUZD7bCb.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BW0QTKlw.js → ArrowLeft-yZosAbEQ.js} +1 -1
- package/dist/client/assets/{ArrowUp-DjenQeZQ.js → ArrowUp-B_QEh9AM.js} +1 -1
- package/dist/client/assets/{CartesianChart-KHpxFlDw.js → CartesianChart-DOo-DPo8.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DCWzRRkG.js → CategoricalChart-KK8jWPWD.js} +1 -1
- package/dist/client/assets/{CheckCircle-CBLXbFFB.js → CheckCircle-DjUjDOFk.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-ofVA6B_w.js → ChevronSelectorVertical-C2ySHatm.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dg02PCVC.js → ChevronUp-aVrgoYI4.js} +1 -1
- package/dist/client/assets/{CreditCard01-F1q7cqMP.js → CreditCard01-CMrZYrMd.js} +1 -1
- package/dist/client/assets/{Globe04-B7JSn39b.js → Globe04-Czvq6voU.js} +1 -1
- package/dist/client/assets/{Key01-DPrG8yA6.js → Key01-CJVeUDDi.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DfOqWtEB.js → LinkBroken01-Dhn_nIp2.js} +1 -1
- package/dist/client/assets/{Minus-CtT-IgpU.js → Minus-qjFidgiH.js} +1 -1
- package/dist/client/assets/{Monitor01-CY6I-T_v.js → Monitor01-BwW28bRE.js} +1 -1
- package/dist/client/assets/{Play-Cb465MQD.js → Play-DWKJ4lP6.js} +1 -1
- package/dist/client/assets/{Plus-EDJqelyG.js → Plus-u00IxELx.js} +1 -1
- package/dist/client/assets/{ReferenceLine-M7tH9_wm.js → ReferenceLine-DhlQLhxT.js} +1 -1
- package/dist/client/assets/{SearchMd-BM1-RWQF.js → SearchMd-DrxAIngK.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BsFRFwoQ.js → ShoppingBag01-BOpj8wnX.js} +1 -1
- package/dist/client/assets/{Sun-BPyrKfqp.js → Sun-CUTKbSf6.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CMdcXPwO.js → SwitchHorizontal01-DedOEqGg.js} +1 -1
- package/dist/client/assets/{Tool01-CuDHSO34.js → Tool01-BXFm5jK2.js} +1 -1
- package/dist/client/assets/{Tooltip-BY8JGJJH.js → Tooltip-DhVaIgPv.js} +1 -1
- package/dist/client/assets/{Trash01-Bif7g_Tq.js → Trash01-t2BYg0st.js} +1 -1
- package/dist/client/assets/{Upload01-Drv81LKH.js → Upload01-BBUgsLLD.js} +1 -1
- package/dist/client/assets/{UserSquare-DqOeWgs_.js → UserSquare-BloCTB27.js} +1 -1
- package/dist/client/assets/{Users01-DSPCiWrI.js → Users01-D0A6lP8t.js} +1 -1
- package/dist/client/assets/{XClose-CFLo0iwC.js → XClose-CUME_VK2.js} +1 -1
- package/dist/client/assets/{Zap-TzUnnTO5.js → Zap-CmNmFUbX.js} +1 -1
- package/dist/client/assets/{access-gate-BZysXSEP.js → access-gate-CbFfEOdM.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Bj8rQn7t.js → add-connection-dialog-Bk4KRwLm.js} +1 -1
- package/dist/client/assets/agent-app-D1s_xxXR.js +1 -0
- package/dist/client/assets/{agent-assets-de3dSSE0.js → agent-assets-CvRDUZu-.js} +1 -1
- package/dist/client/assets/{agent-automation-Eoz9llO0.js → agent-automation-CHtwx6sg.js} +1 -1
- package/dist/client/assets/{agent-automations-YrodALnn.js → agent-automations-BgmzkAtz.js} +1 -1
- package/dist/client/assets/{agent-calendar-BaQX5CRD.js → agent-calendar-BQ5xnVXW.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Z6OO2Jnk.js → agent-capabilities-DmNIevq-.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-C9AyKvNN.js → agent-connect-sources-DgRvrlpj.js} +1 -1
- package/dist/client/assets/agent-deck-1mK6Ythm.js +1 -0
- package/dist/client/assets/{agent-e2e-7RobNFIi.js → agent-e2e-CowJJC6D.js} +1 -1
- package/dist/client/assets/agent-experiments-3ZqH1pHZ.js +1 -0
- package/dist/client/assets/{agent-file-Dbl-JFZv.js → agent-file-w7JCVN0l.js} +1 -1
- package/dist/client/assets/{agent-hosting-CqO-A-Yx.js → agent-hosting-p1C0G82t.js} +1 -1
- package/dist/client/assets/{agent-icon-CRaK_2eb.js → agent-icon-AbOSM7KF.js} +1 -1
- package/dist/client/assets/agent-library-Bivz2SRZ.js +1 -0
- package/dist/client/assets/agent-library-file-CpGwdPNs.js +1 -0
- package/dist/client/assets/agent-overview-CwCkuDX2.js +1 -0
- package/dist/client/assets/{agent-releases-DELNaOnx.js → agent-releases-BWDO07Iy.js} +2 -2
- package/dist/client/assets/agent-settings-DEn_87Gp.js +1 -0
- package/dist/client/assets/{agent-site-editor-CZ_aX5w6.js → agent-site-editor-BubERiUy.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DqKm62jM.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DmZnej6I.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-DuaKrxk_.js +1 -0
- package/dist/client/assets/agent-view-Cey5y0PV.js +1 -0
- package/dist/client/assets/{agent-view-guard-DQbhiGaj.js → agent-view-guard-w1_Juyu5.js} +1 -1
- package/dist/client/assets/{ai-providers-ByQv34ay.js → ai-providers-DAY0nNTK.js} +1 -1
- package/dist/client/assets/{alert-D9FiKroy.js → alert-hJJytfOJ.js} +1 -1
- package/dist/client/assets/{analytics-sections-BmDNYduw.js → analytics-sections-BNJmu5jh.js} +1 -1
- package/dist/client/assets/{api-keys-BfsLg2vA.js → api-keys-DOETgk_S.js} +1 -1
- package/dist/client/assets/api-keys-IHsKCg1y.js +1 -0
- package/dist/client/assets/{app-editor-B45vF8Mg.js → app-editor-CN-Ok2RW.js} +1 -1
- package/dist/client/assets/{asset-utils-BxC41cma.js → asset-utils-DhDLN_-h.js} +1 -1
- package/dist/client/assets/{auth-Ds2S-lbe.js → auth-D1oBKWc9.js} +1 -1
- package/dist/client/assets/{auth-catchall-C-6FZGi0.js → auth-catchall-CU9OueC2.js} +1 -1
- package/dist/client/assets/{auth-entry-CyO_cwvd.js → auth-entry-BrGmprWz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-m3Tiw0uy.js → auth-split-layout-DdjSjW7w.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D8AvdBCW.js → authenticate-and-persist-oauth-DfXhL6KV.js} +1 -1
- package/dist/client/assets/{automation-list-row-C9ktMtT0.js → automation-list-row-D2RgfFAV.js} +1 -1
- package/dist/client/assets/{automation-runs-BOw5cx8_.js → automation-runs-_P-ch70z.js} +1 -1
- package/dist/client/assets/{automations-B7fWZ0Vh.js → automations-DVc_UfEJ.js} +1 -1
- package/dist/client/assets/{autosend-DDd9ei6A.js → autosend-xPyRMwmc.js} +1 -1
- package/dist/client/assets/{badge-BpuDiibz.js → badge-BLopTdJo.js} +1 -1
- package/dist/client/assets/{block-document-0xSm2fiy.js → block-document-DRcrQBeX.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BKKCrT_T.js → blocks-preview-workspace-context-D9X9QQD5.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-D0oTw6gu.js → blocks-tab-states-DOYuC7hO.js} +1 -1
- package/dist/client/assets/{blog-schema-BppY95gR.js → blog-schema-njjjFtQI.js} +1 -1
- package/dist/client/assets/{buckets-CqGWJLKP.js → buckets-DHR--iFw.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BGIBlPP6.js → build-improve-prompt-doc-DrCjUiSm.js} +1 -1
- package/dist/client/assets/{calendar-DuGzMi3S.js → calendar-8e1bW3QX.js} +1 -1
- package/dist/client/assets/{capability-load-error-DIv2eZlz.js → capability-load-error-C9mmbd-g.js} +1 -1
- package/dist/client/assets/{category-editor-DHDmibyv.js → category-editor-ngsbNhPd.js} +1 -1
- package/dist/client/assets/{chart-BcizaXxw.js → chart-PfmlhR6m.js} +1 -1
- package/dist/client/assets/{chat-context-O7Uim5zw.js → chat-context-BFpdF0Ea.js} +6 -6
- package/dist/client/assets/{chat-draft-CP7W66gO.js → chat-draft-B0ZUpMX_.js} +1 -1
- package/dist/client/assets/{checkbox-Dj1_p-oY.js → checkbox-DDDKCgb5.js} +1 -1
- package/dist/client/assets/{choose-editor-FgTuu-ql.js → choose-editor-XtwrmhD8.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CNmrqva7.js → cli-auth-success-BnJsDVo5.js} +1 -1
- package/dist/client/assets/{client-icons-BF-arSHb.js → client-icons-Cw3Ivutw.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-BOyoDLZX.js → cms-settings-editor-DY67ejEv.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-DiBAZwre.js → cms-store-drafts-CYIZoD9d.js} +1 -1
- package/dist/client/assets/{collapsible-Bp1-V-Fv.js → collapsible-C4GX1H_R.js} +1 -1
- package/dist/client/assets/{collection-detail-DBSAOtJN.js → collection-detail-8Mxw24IU.js} +1 -1
- package/dist/client/assets/{collection-display-button-C5ml6MSP.js → collection-display-button-WZ9U6Dnn.js} +1 -1
- package/dist/client/assets/{collection-search-AauU22W8.js → collection-search-Dz7QHmOz.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-qRDLH-yA.js → collection-table-wrapper-06TDQKrw.js} +1 -1
- package/dist/client/assets/{collection-tabs-DO7nBfoY.js → collection-tabs-C-fKyh8w.js} +1 -1
- package/dist/client/assets/{combobox-dI6mnh2K.js → combobox-DqPSOi3v.js} +1 -1
- package/dist/client/assets/{command-BO5QH15f.js → command-CYK5M8XI.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CbUF3EiL.js → companion-mcps-section-CAKFIeG-.js} +1 -1
- package/dist/client/assets/{config-w5HL15RE.js → config-DBXuSQO1.js} +1 -1
- package/dist/client/assets/{connect-Dv7_pdgv.js → connect-NGxtU5_0.js} +1 -1
- package/dist/client/assets/{connect-layout-DIUYH7zZ.js → connect-layout-DBzvmer6.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-5pyz_gqC.js → connect-source-dialog-BnXxvvcJ.js} +1 -1
- package/dist/client/assets/{connection-BmfrUVUF.js → connection-_PcrLws7.js} +1 -1
- package/dist/client/assets/{connection-card-Dyl9jamP.js → connection-card-4gZcunZq.js} +1 -1
- package/dist/client/assets/{connection-detail-trf1a8ud.js → connection-detail-C0eX0pfz.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DkXWTd-5.js → connection-form-helpers-C7Gv9-lg.js} +1 -1
- package/dist/client/assets/{connection-slug-D9QF6JTj.js → connection-slug-BsU2LQiu.js} +1 -1
- package/dist/client/assets/{connections-DBn4X-FO.js → connections-BA8V7XrH.js} +1 -1
- package/dist/client/assets/{content-tab-eUiPWbq7.js → content-tab-C_nIeaie.js} +3 -3
- package/dist/client/assets/{context-Dm1vgWac.js → context-8d_KiSNS.js} +1 -1
- package/dist/client/assets/{context-menu-BG18ePnL.js → context-menu-o6rJLNXJ.js} +1 -1
- package/dist/client/assets/{context-shell-CJdcogAj.js → context-shell-C1Ha8IE2.js} +3 -3
- package/dist/client/assets/{core.esm-CiyyLnsG.js → core.esm-BGRTXfSt.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DeokYGJM.js → create-organization-dialog-h3rzGSt9.js} +1 -1
- package/dist/client/assets/{device-hint-Z9_uJm09.js → device-hint-BOo4jdep.js} +1 -1
- package/dist/client/assets/{discover-BJzOKOeT.js → discover-BeGAehHo.js} +1 -1
- package/dist/client/assets/{domain-settings-k6_UVS3e.js → domain-settings-Nhk3Nbp-.js} +1 -1
- package/dist/client/assets/{drawer-DMRnFsxc.js → drawer-C1zPem_-.js} +1 -1
- package/dist/client/assets/{editor-BTYObZ3D.js → editor-BcXADR5b.js} +1 -1
- package/dist/client/assets/{editor-classes-DIdZ5SUW.js → editor-classes-BftbquCD.js} +1 -1
- package/dist/client/assets/{empty-state-BTVsC7xK.js → empty-state-BrKCVCOA.js} +1 -1
- package/dist/client/assets/{empty-state-B44K4GDI.js → empty-state-tlDzCEBe.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CzcNWwIa.js → experiments-tab-choice-Dnv5W_mO.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BAO6488m.js → extract-connection-data-B4CAQLEm.js} +1 -1
- package/dist/client/assets/{feature-gate-D17dqUhL.js → feature-gate-DWILcK73.js} +1 -1
- package/dist/client/assets/{feature-paywall-BAqosyy1.js → feature-paywall-BOdJ7pc_.js} +1 -1
- package/dist/client/assets/{feedback-BCnQQwEu.js → feedback--BP5XsMC.js} +1 -1
- package/dist/client/assets/{file-explorer-DpZFO-Yb.js → file-explorer-BHgkTafl.js} +1 -1
- package/dist/client/assets/{file-preview-C7xeW7Ns.js → file-preview-B3c1V4-B.js} +1 -1
- package/dist/client/assets/{file-share-button-Cj2TiEru.js → file-share-button-BmfBQCy7.js} +1 -1
- package/dist/client/assets/{file-type-icon-BgvZ7mJ5.js → file-type-icon-C-QM854F.js} +1 -1
- package/dist/client/assets/{folder-icon-CC-uKBN4.js → folder-icon-evgkGdeR.js} +1 -1
- package/dist/client/assets/{form-CQzCiA7m.js → form-D2GmFQW3.js} +1 -1
- package/dist/client/assets/{general-WB7AI2JV.js → general-B3MQGRB4.js} +1 -1
- package/dist/client/assets/{github-icon-Dq39pEMT.js → github-icon-i7iUozqR.js} +1 -1
- package/dist/client/assets/{home-DNtWj6y4.js → home-ZCo0svlJ.js} +1 -1
- package/dist/client/assets/{home-overview-KMaj_IXE.js → home-overview-qYf3hL7N.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-C-OJGDnV.js → hosted-reconcile-CvdR91uj.js} +1 -1
- package/dist/client/assets/{icon-button-BxjZlrnJ.js → icon-button-BUwzNv83.js} +1 -1
- package/dist/client/assets/{index-D8rwwuoa.js → index-BfxdS8h-.js} +1 -1
- package/dist/client/assets/{index-Cm-moWa5.js → index-BpRy7AHp.js} +32 -32
- package/dist/client/assets/{index-pMcMdeCf.js → index-CCTNTj2P.js} +1 -1
- package/dist/client/assets/index-CKEKSTrk.css +1 -0
- package/dist/client/assets/{index-DBE1cmuY.js → index-CKnb1ufF.js} +1 -1
- package/dist/client/assets/{index-CJj8VLTq.js → index-C_UqErbC.js} +1 -1
- package/dist/client/assets/{index-BK7nI4x8.js → index-ChAPkvx3.js} +1 -1
- package/dist/client/assets/{index-DDHS6uH4.js → index-DPD9OENi.js} +1 -1
- package/dist/client/assets/{index-BZnluLX8.js → index-DQBul4yU.js} +1 -1
- package/dist/client/assets/{index-DfAh0E81.js → index-D_UeTS1-.js} +1 -1
- package/dist/client/assets/{index-CMI5yx1h.js → index-Dn1UQvhJ.js} +1 -1
- package/dist/client/assets/{index-B541Z8pm.js → index-OBb8rfAw.js} +1 -1
- package/dist/client/assets/{index-DhSgpwmt.js → index-cKSjr8CK.js} +1 -1
- package/dist/client/assets/index-clkmgwR3.js +1 -0
- package/dist/client/assets/{index-CZmp59DI.js → index-lbygo01z.js} +1 -1
- package/dist/client/assets/{index-redirect-DzUS6M4j.js → index-redirect-D-YiN8Xo.js} +1 -1
- package/dist/client/assets/{index-CGYr3Izo.js → index-ukVGoFpO.js} +1 -1
- package/dist/client/assets/{index-0imbfLx3.js → index-xj3IgJTF.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D6uRpwx5.js → infiniteQueryObserver-D03R0ede.js} +1 -1
- package/dist/client/assets/{infra-billing-DuXLPrYd.js → infra-billing-s8EIFgUr.js} +1 -1
- package/dist/client/assets/{input-Blfx4aW7.js → input-Cnq9i2l1.js} +1 -1
- package/dist/client/assets/{input-DhrW1toc.js → input-DfTSMalp.js} +3 -3
- package/dist/client/assets/{integration-icon-CDajRnkl.js → integration-icon-FxF8FEU6.js} +1 -1
- package/dist/client/assets/{jira-icon-BjvaFHGW.js → jira-icon-BLg3npMf.js} +1 -1
- package/dist/client/assets/{label-BwDzqaMo.js → label-Bh2Pit2O.js} +1 -1
- package/dist/client/assets/{layout-BFtQxqvc.js → layout-C60ZlULv.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-ClovinDV.js → legacy-agents-deep-DwelfdPA.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CXwADpls.js → legacy-main-redirect-C_4oCw1E.js} +1 -1
- package/dist/client/assets/library-B-jS61L0.js +1 -0
- package/dist/client/assets/{library-tab-D9aFdK2S.js → library-tab-BaUP3ZVF.js} +1 -1
- package/dist/client/assets/{login-BKJiNyyp.js → login-bcoCcqBW.js} +1 -1
- package/dist/client/assets/{markdown-BukU_dP8.js → markdown-j0gDnxTp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C-v6StvL.js → mcp-app-renderer-C3zml1pp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CY66kpRN.js → mcp-oauth-D4Pxc73w.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CxEXOBcT.js → mcp-oauth-I0kjN__K.js} +1 -1
- package/dist/client/assets/{members-CF-gnn8J.js → members-Dxz1ewpb.js} +1 -1
- package/dist/client/assets/{memory-CdLLa3Kl.js → memory-C_AcXDod.js} +1 -1
- package/dist/client/assets/{mock-board-DElhppkh.js → mock-board-COgbDYxA.js} +3 -3
- package/dist/client/assets/{monaco-editor-BNkAcsUY.js → monaco-editor-DtIoXdMD.js} +1 -1
- package/dist/client/assets/{monitoring-C-ycc-h_.js → monitoring-DWb86ZoC.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B0tic5F9.js → monitoring-stats-row-BSstVGMX.js} +1 -1
- package/dist/client/assets/{multi-select-FgNDnuDo.js → multi-select-DailkN9Q.js} +1 -1
- package/dist/client/assets/{mustache-CIeVDhQo.js → mustache-BSD6v2ig.js} +1 -1
- package/dist/client/assets/{named-rule-view-9PjPoj8p.js → named-rule-view-B_8gTqcI.js} +1 -1
- package/dist/client/assets/{new-project-dialog-DHaEULY3.js → new-project-dialog-wz5dJWkC.js} +1 -1
- package/dist/client/assets/{oauth-callback-B3eu4Ach.js → oauth-callback-B7Nohzxd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CqUI9sqZ.js → oauth-callback-ai-provider-BmsntsZe.js} +1 -1
- package/dist/client/assets/{oauth-consent-r8Ehs0lB.js → oauth-consent-cf55Bmz-.js} +1 -1
- package/dist/client/assets/{onboarding-BTBq2ggs.js → onboarding-Cdi9idPQ.js} +1 -1
- package/dist/client/assets/{openai-conversation-p1k1gWxX.js → openai-conversation-BMpQOydo.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DWWGhnPv.js → optimistic-project-sidebar-views-AOXvjkSa.js} +1 -1
- package/dist/client/assets/{order-monitor-day-CChR5TYK.js → order-monitor-day-Bk2YpEn9.js} +1 -1
- package/dist/client/assets/{organization-choice-Cw7nqarH.js → organization-choice-CcyZ2sED.js} +1 -1
- package/dist/client/assets/{orgs-Do-VFG6Q.js → orgs-C6-Q2iMm.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CfrXQu2D.js → own-accounts-section-BEuNQYr7.js} +1 -1
- package/dist/client/assets/{pair-CQCTPbi0.js → pair-D0R2UDgp.js} +1 -1
- package/dist/client/assets/{parse-sections-DfTZ3uiV.js → parse-sections-DTDSECqx.js} +3 -3
- package/dist/client/assets/{plan-DD5HWH6n.js → plan-D5_Bt3KJ.js} +1 -1
- package/dist/client/assets/{plan-ladder-DPpGlKZx.js → plan-ladder-BWKx4tc-.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DWpMRf7u.js → plan-usage-card-Z5a-2qYK.js} +1 -1
- package/dist/client/assets/{popover-DLErjFx_.js → popover-BrVMYzI-.js} +1 -1
- package/dist/client/assets/{post-calendar-CK1SMoTM.js → post-calendar-BpEmJgqQ.js} +1 -1
- package/dist/client/assets/{post-editor-DisluBT5.js → post-editor-yNAWU29F.js} +1 -1
- package/dist/client/assets/{preview-content-DnVFo2zs.js → preview-content-CWagFWI_.js} +1 -1
- package/dist/client/assets/{preview-dialog-DUS21naY.js → preview-dialog-Bc1z8QHZ.js} +1 -1
- package/dist/client/assets/{preview-panel-D7uUNbcL.js → preview-panel-bcbhyFq_.js} +1 -1
- package/dist/client/assets/{preview-tab-Ahs-yhYv.js → preview-tab-nbSkAxxa.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-C2vgULGa.js → product-picker-dialog-CNr_kHqK.js} +1 -1
- package/dist/client/assets/{profile-DDNj47eG.js → profile-DtHrUsir.js} +1 -1
- package/dist/client/assets/{project-app-view-CuA06XiE.js → project-app-view-BfN3k7ju.js} +1 -1
- package/dist/client/assets/{project-apps-DWbss0KI.js → project-apps-C_vCRb8O.js} +1 -1
- package/dist/client/assets/{project-icon-BUFanmLS.js → project-icon-n7LBJrfx.js} +1 -1
- package/dist/client/assets/{project-index-7p2eseSo.js → project-index-2cTAo4fH.js} +1 -1
- package/dist/client/assets/project-reports-C1Hkwfya.js +1 -0
- package/dist/client/assets/{project-sidebar-views-pH1XKMU9.js → project-sidebar-views-DhZy-bnC.js} +1 -1
- package/dist/client/assets/project-tasks-B8hDD-I8.js +1 -0
- package/dist/client/assets/{projects-DLcZ2EUB.js → projects-OSECm-FW.js} +1 -1
- package/dist/client/assets/{projects-empty-state-5N5mL8dT.js → projects-empty-state-B7zdGKEZ.js} +1 -1
- package/dist/client/assets/{prompts-D_luUyMG.js → prompts-J4HaC_ei.js} +1 -1
- package/dist/client/assets/record-editor-B3zURv0C.js +1 -0
- package/dist/client/assets/{redirect-editor-CFnitpju.js → redirect-editor-DeoRyu0l.js} +1 -1
- package/dist/client/assets/reports-CofWqBLU.js +1 -0
- package/dist/client/assets/{reports-BORTq3kl.js → reports-CpGpr_ZH.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BWbcZ2GX.js → reports-onboarding-CJMXOfw7.js} +1 -1
- package/dist/client/assets/{reports-tab-B-Hn1LIV.js → reports-tab-LNIEzMQ4.js} +2 -2
- package/dist/client/assets/{repositories-BVZQH-sB.js → repositories-CCBdk88v.js} +1 -1
- package/dist/client/assets/repositories-yBP4WuG_.js +1 -0
- package/dist/client/assets/{repository-binding-B7kVJGqt.js → repository-binding-DdmRVWpz.js} +1 -1
- package/dist/client/assets/{repository-picker-CjOhm0Ey.js → repository-picker-ClelLyeu.js} +1 -1
- package/dist/client/assets/{require-capability-CJKpnzPC.js → require-capability-BCUql2uo.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cv1Or1o2.js → required-auth-layout-Lh-Wt6uK.js} +1 -1
- package/dist/client/assets/{reset-password-DW52Np0r.js → reset-password-Cq-nDwrY.js} +1 -1
- package/dist/client/assets/{resizable-DyfDlaKB.js → resizable-D8U4YOro.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BA6C6Jfy.js → resolve-tab-icon-CukmKoWA.js} +1 -1
- package/dist/client/assets/{review-settings-DV90EMNs.js → review-settings-BzmxgDqt.js} +1 -1
- package/dist/client/assets/{role-color-BCYUEsYA.js → role-color-C-Q62gr6.js} +1 -1
- package/dist/client/assets/{roles-BuwDNuGG.js → roles-b8ba7BB1.js} +1 -1
- package/dist/client/assets/route-BK2wi4kD.js +1 -0
- package/dist/client/assets/{route-CVmwmVAO.js → route-CXbtT4mj.js} +1 -1
- package/dist/client/assets/{route-kdlreTx0.js → route-Dq87eMEg.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CNzI4oJx.js → sandbox-lifecycle-context-o_ip6_5z.js} +1 -1
- package/dist/client/assets/{schema-BJHp07rJ.js → schema-ByYst2Pb.js} +1 -1
- package/dist/client/assets/{schema-iQl5fqzx.js → schema-CDmusrrq.js} +1 -1
- package/dist/client/assets/{scroll-area-ASqVshf_.js → scroll-area-Ch8iXNIM.js} +1 -1
- package/dist/client/assets/{search-input-CpR7MF4a.js → search-input-CqM9MiZ3.js} +1 -1
- package/dist/client/assets/{search-toggle-Y8EXpMEc.js → search-toggle-VKaSo9uW.js} +1 -1
- package/dist/client/assets/{secret-picker-Br5fCyJR.js → secret-picker-DPC7oeFy.js} +1 -1
- package/dist/client/assets/{secrets-B5CgD_04.js → secrets-2ntDkWXH.js} +1 -1
- package/dist/client/assets/{section-array-field-DVc_SUaS.js → section-array-field-ziyJ9KKG.js} +1 -1
- package/dist/client/assets/{sections-zGZh6wSh.js → sections-B2FraWlK.js} +1 -1
- package/dist/client/assets/{sections-editor-lkKcQFno.js → sections-editor-D6NJi3oc.js} +1 -1
- package/dist/client/assets/{select-Bc6SUkDB.js → select-BqAgCf_e.js} +1 -1
- package/dist/client/assets/{select-model-DoenYnGG.js → select-model-CgHPgPvz.js} +1 -1
- package/dist/client/assets/{seo-editor-_aB2qgvo.js → seo-editor-Bc6Ncl3H.js} +1 -1
- package/dist/client/assets/{separator-sTUHAoAe.js → separator-B2LjZA6j.js} +1 -1
- package/dist/client/assets/settings-tab-DzS7_7oR.js +1 -0
- package/dist/client/assets/{sheet-DplVXaxG.js → sheet-y4usetIj.js} +1 -1
- package/dist/client/assets/shell-layout-BHLD5jhn.js +1 -0
- package/dist/client/assets/{site-draft-actions-D6MDFwbu.js → site-draft-actions-gfTBLW-u.js} +1 -1
- package/dist/client/assets/{site-draft-view-KDIF-X3e.js → site-draft-view-B7polEM8.js} +1 -1
- package/dist/client/assets/site-editor-Cp5Zuvwt.js +1 -0
- package/dist/client/assets/{site-editor-toast-C6zgUX0e.js → site-editor-toast-DaSHvCWu.js} +1 -1
- package/dist/client/assets/{skills-C0c78VRl.js → skills-BemYRmGR.js} +1 -1
- package/dist/client/assets/{slider-GSuedGm_.js → slider-CUVU1H_x.js} +1 -1
- package/dist/client/assets/{sortable.esm-BIp1gAsr.js → sortable.esm-Sw9w3P90.js} +1 -1
- package/dist/client/assets/{sso-CYU8G0dx.js → sso-C3qLFTZi.js} +1 -1
- package/dist/client/assets/{suggestion-CyNVbkov.js → suggestion-BiaV3mvJ.js} +1 -1
- package/dist/client/assets/{switch-Ddk_-Adw.js → switch-DKx4qpl7.js} +1 -1
- package/dist/client/assets/{synced-repos-BoVbsdN8.js → synced-repos-edmrMUSZ.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Bib8sDT3.js → tab-icon-glyph-C8csunxY.js} +1 -1
- package/dist/client/assets/{table-CDpozwVb.js → table-Dq5I6aY7.js} +1 -1
- package/dist/client/assets/{tabs-BBBKV7Oj.js → tabs-0SGJ_qve.js} +1 -1
- package/dist/client/assets/{task-board-CIxtWADL.js → task-board-CWLsdAvC.js} +1 -1
- package/dist/client/assets/{task-route-nL6YBqpT.js → task-route-Cay3KQ6a.js} +1 -1
- package/dist/client/assets/{task-status-BdHIH5wb.js → task-status-D-bn6Q3b.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-WYvo8iIi.js → taskboard-analytics-L-F5O9dg.js} +1 -1
- package/dist/client/assets/{tasks-gq6y7TQx.js → tasks-DIxE8tYD.js} +1 -1
- package/dist/client/assets/tasks-Drp2qtBI.js +1 -0
- package/dist/client/assets/{textarea-kPu_uJPE.js → textarea-C8pP4RDC.js} +1 -1
- package/dist/client/assets/thread-analytics-01LkdxOy.js +1 -0
- package/dist/client/assets/{thread-intent-H43pIrGm.js → thread-intent-D7FGI3D0.js} +1 -1
- package/dist/client/assets/{thread-route-DAi-GZ9V.js → thread-route-CKRKYHUZ.js} +1 -1
- package/dist/client/assets/{thread-route-D5BZJ8B8.js → thread-route-E0bMcc27.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-G_9F28Tw.js → thread-sheet-body-DkwRzpXX.js} +1 -1
- package/dist/client/assets/{time-range-picker-DE66qw6Q.js → time-range-picker-DNs3LiZc.js} +1 -1
- package/dist/client/assets/{toggle-group-C6-doG0i.js → toggle-group-DkZuJxmr.js} +1 -1
- package/dist/client/assets/{tool-namespace-B7QKcZjk.js → tool-namespace-CCkkm2qA.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BQ0Oxag8.js → tool-set-selector-5zt8G69C.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CcKPaKCW.js → toolbar-icon-button-Cx0kc5lZ.js} +1 -1
- package/dist/client/assets/{tooltip-DkKVKER8.js → tooltip-jhiffORJ.js} +1 -1
- package/dist/client/assets/{tooltipContext-B3txDLR-.js → tooltipContext-BYQJi6EG.js} +1 -1
- package/dist/client/assets/{track-BIP36_Uh.js → track-8QL-WYe-.js} +1 -1
- package/dist/client/assets/{types-DADZ5j7m.js → types-CR7kvQl1.js} +1 -1
- package/dist/client/assets/{url-slug-ChYq0W60.js → url-slug-BxiYZtUy.js} +1 -1
- package/dist/client/assets/{usage-stats-32tsZUXd.js → usage-stats-DB51uKij.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CoMFtqYl.js → use-ai-providers-sfkouqgF.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BQlrOJWU.js → use-apply-named-rule-DA98Iihd.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-tQsBmTsy.js +1 -0
- package/dist/client/assets/{use-automations-D6Y5V5w7.js → use-automations-DD-H-0gg.js} +1 -1
- package/dist/client/assets/{use-autosave-Bhnkuzh5.js → use-autosave-Bw7KaLnG.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DzHuTeMz.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-D7aW6a0C.js → use-chat-layout-state-BbG5C9on.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DXLjbxwu.js → use-cms-publish-actions-1o6NX1uP.js} +5 -5
- package/dist/client/assets/{use-connect-companion-C7vylwX0.js → use-connect-companion-LWK1AWBF.js} +1 -1
- package/dist/client/assets/use-connection-CgY1E7FR.js +1 -0
- package/dist/client/assets/{use-content-sync-CoMrJcv7.js → use-content-sync-9QsuTp3C.js} +1 -1
- package/dist/client/assets/{use-copy-DNHp83li.js → use-copy-DRW_V1kW.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CjJNXfvB.js → use-date-fns-locale-Cw3Zaqb5.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CocwDpD-.js → use-debounced-autosave-CgAvArNN.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DklROaCE.js → use-debounced-value-B0a3uxKQ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-ev_UnwK6.js → use-deco-credits-BVH6IrV5.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DsbeE0fY.js → use-decopilot-events-BYlxYXUQ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-D9EOjdNd.js → use-delete-connection-CvuMwKsA.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BD_xFjSG.js → use-deployment-admin-Bw3ciRk9.js} +1 -1
- package/dist/client/assets/{use-entitlements-CEKmKdX0.js → use-entitlements-CMCBZq5_.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BfmpOxim.js → use-fast-preview-draft-url-BUD5f_Gm.js} +1 -1
- package/dist/client/assets/{use-file-configs-CGC2NdjT.js → use-file-configs-2Z7OwHbg.js} +1 -1
- package/dist/client/assets/{use-id-selection-DL9yj-Hm.js → use-id-selection--cuaALt7.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BIp7PHrk.js → use-inbox-feed-DxzsD1YQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cd1N4jMv.js → use-infinite-scroll-BKVwA-Ob.js} +1 -1
- package/dist/client/assets/{use-join-requests-dwGw3ubc.js → use-join-requests-BZlGoiU5.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DBPTQANw.js → use-main-panel-tabs-4JSMbOrH.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D0tSzrht.js → use-mcp-auth-status-CYCjckUQ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BkZUf1G1.js → use-mcp-client-CjLtJgTU.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-ogj31Wyv.js → use-mcp-prompts-JVEMCdnt.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CRGCgSi0.js → use-mcp-tools-C5jhMv1O.js} +1 -1
- package/dist/client/assets/{use-mobile-Brbs-D5v.js → use-mobile-CKr6zvd6.js} +1 -1
- package/dist/client/assets/{use-move-blocks-X2wSIdhe.js → use-move-blocks-B-6qZYKa.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-De0vzDZt.js → use-navigate-to-agent-BJsKVGd6.js} +1 -1
- package/dist/client/assets/{use-org-fs-DSsFMzTw.js → use-org-fs-DDhNsbr6.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DEF2HBAf.js → use-org-repo-syncs-DBx3nqV9.js} +1 -1
- package/dist/client/assets/{use-org-sso-DatsrvZR.js → use-org-sso-DyxTDJHi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CyexoMCC.js → use-organization-settings-Cs5X07HH.js} +1 -1
- package/dist/client/assets/{use-project-scope-BIVViTXo.js → use-project-scope-DK5Zq3Vj.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CYuwpxqr.js → use-recent-apps-BrqeKXhi.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CAzZagV3.js → use-reports-diagnostic-D0MF0Enh.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DxPsGHpR.js → use-sandbox-events-DKvN2vib.js} +1 -1
- package/dist/client/assets/{use-secrets-CpdnK-89.js → use-secrets-q3tQjsVS.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-9hC7oJo0.js → use-section-preview-base-DI0VnMUg.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BbD-3i3N.js → use-sidebar-collapsed-NHFQSjyB.js} +1 -1
- package/dist/client/assets/{use-tags-Bt88S1Fh.js → use-tags-7ZRefyR6.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BTkEPZTH.js → use-task-board-analytics-CFKUFKZO.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C_Du1Z0W.js → use-task-board-events-D1ietf1D.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-vSYpxSpr.js → use-task-board-item-prs-hyB7mT0I.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D8dDcoyT.js → use-task-board-items-C5M-iJHh.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-BSaKlopF.js → use-task-board-prompts-Bj8qQJuo.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BF4el6FI.js → use-task-metadata-D_W5nMRB.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CzwE74V7.js → use-thread-outputs-CIMyOC9i.js} +1 -1
- package/dist/client/assets/{use-voice-input-Ct26_ckB.js → use-voice-input-D0UxQK8p.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-4mlqNbEX.js +1 -0
- package/dist/client/assets/{useQueries-D0Ic2OLL.js → useQueries-D-paqk_N.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-6pYaPTkl.js +1 -0
- package/dist/client/assets/{users-CcZNVW1C.js → users-CgyVEAVi.js} +1 -1
- package/dist/client/assets/{utils-CVwSOtNq.js → utils-CML3oMCb.js} +1 -1
- package/dist/client/assets/{variant-calendar-bvYuncUl.js → variant-calendar-CiRidZhE.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-JfQvd5m1.js → variant-matcher-override-DptryLC2.js} +1 -1
- package/dist/client/assets/{view-header-3XIW6_JX.js → view-header-C5UPfmG7.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Ba39VAch.js → virtual-mcp-BVgnJh3F.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CcLpshxd.js → watch-sse-pool-DiT4THMV.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-B0ADSPIl.js +0 -1
- package/dist/client/assets/agent-deck-FWdv6Cpu.js +0 -1
- package/dist/client/assets/agent-experiments-zhmtYFsP.js +0 -1
- package/dist/client/assets/agent-library-C9bPwpZT.js +0 -1
- package/dist/client/assets/agent-library-file-CJqPNg_v.js +0 -1
- package/dist/client/assets/agent-overview-DIZADCxs.js +0 -1
- package/dist/client/assets/agent-settings-BXotmRnL.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bd4DxsVE.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BOAu460T.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DIPhJI1V.js +0 -1
- package/dist/client/assets/agent-view-CQ1k8Ncp.js +0 -1
- package/dist/client/assets/api-keys-4E58id83.js +0 -1
- package/dist/client/assets/index-O8I8IW_m.js +0 -1
- package/dist/client/assets/index-SmuiYnIl.css +0 -1
- package/dist/client/assets/library-BWyOfhBW.js +0 -1
- package/dist/client/assets/project-reports-DvoGEV_S.js +0 -1
- package/dist/client/assets/project-tasks-3w3MRdO3.js +0 -1
- package/dist/client/assets/record-editor-CuEUlJ7c.js +0 -1
- package/dist/client/assets/reports-BllquOlr.js +0 -1
- package/dist/client/assets/repositories-B1CtO4Nn.js +0 -1
- package/dist/client/assets/route-6u2HC7D0.js +0 -1
- package/dist/client/assets/settings-tab-DhF3HWFp.js +0 -1
- package/dist/client/assets/shell-layout-n8ud5acT.js +0 -1
- package/dist/client/assets/site-editor-By4hUbCH.js +0 -1
- package/dist/client/assets/tasks-Cdzrrdaz.js +0 -1
- package/dist/client/assets/thread-analytics-D6Pq3tuN.js +0 -1
- package/dist/client/assets/use-ask-in-chat-hvqpSKkf.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DhlWbUca.js +0 -1
- package/dist/client/assets/use-connection-lpdRo-uP.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BNB4wMo9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DUZAeMjh.js +0 -1
package/dist/client/assets/{own-accounts-section-CfrXQu2D.js → own-accounts-section-BEuNQYr7.js}
RENAMED
|
@@ -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-Cm-moWa5.js";import{s as it}from"./Plus-EDJqelyG.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-CoMFtqYl.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-BpuDiibz.js";import{i as rt}from"./AlertCircle-C8lUSNa8.js";import{T as pe,a as ge,c as he}from"./tooltip-DkKVKER8.js";import{S as at}from"./switch-Ddk_-Adw.js";import{G as ct}from"./github-icon-Dq39pEMT.js";import{i as dt,s as ut,c as mt}from"./Tool01-CuDHSO34.js";import{s as ft}from"./Trash01-Bif7g_Tq.js";import{u as pt,f as gt}from"./use-date-fns-locale-CjJNXfvB.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-BpRy7AHp.js";import{s as it}from"./Plus-u00IxELx.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-sfkouqgF.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-BLopTdJo.js";import{i as rt}from"./AlertCircle-1CFQF9HU.js";import{T as pe,a as ge,c as he}from"./tooltip-jhiffORJ.js";import{S as at}from"./switch-DKx4qpl7.js";import{G as ct}from"./github-icon-i7iUozqR.js";import{i as dt,s as ut,c as mt}from"./Tool01-BXFm5jK2.js";import{s as ft}from"./Trash01-t2BYg0st.js";import{u as pt,f as gt}from"./use-date-fns-locale-Cw3Zaqb5.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,fU as be,b as H,as as Ze,m as G,bx as ct,fV as He,fW 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,fX as os,fY as ft,a8 as rs,F as is,C as qe,d as We,fZ as tt,eN as cs,f_ as us}from"./index-Cm-moWa5.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-CRaK_2eb.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-CuDHSO34.js";import{i as xt}from"./LinkBroken01-DfOqWtEB.js";import{b as $s,C as Ms,a as As}from"./collapsible-Bp1-V-Fv.js";import{u as Ps}from"./use-copy-DNHp83li.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-32tsZUXd.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-H43pIrGm.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-O7Uim5zw.js";import{b as Ge,a as Zs,d as en}from"./shell-layout-n8ud5acT.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-C-v6StvL.js";import{g as yt}from"./types-DADZ5j7m.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-DkKVKER8.js";import{c as an,u as ln,a as on}from"./use-mcp-client-BkZUf1G1.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-B7QKcZjk.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-C8lUSNa8.js";import{s as cn}from"./XClose-CFLo0iwC.js";import{n as De}from"./ShoppingBag01-BsFRFwoQ.js";import{i as un}from"./SearchMd-BM1-RWQF.js";import{a as Ke}from"./autosend-DDd9ei6A.js";import{b as Tt}from"./use-entitlements-CEKmKdX0.js";import{I as dn,M as Ct}from"./markdown-BukU_dP8.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-DplVXaxG.js";import{I as Se}from"./integration-icon-CDajRnkl.js";import{a as It}from"./use-connection-lpdRo-uP.js";import{u as $t}from"./use-navigate-to-agent-De0vzDZt.js";import{s as xn}from"./UserSquare-DqOeWgs_.js";import{g as hn}from"./use-mcp-prompts-ogj31Wyv.js";import{t as bn}from"./ChevronUp-Dg02PCVC.js";import{i as yn}from"./Monitor01-CY6I-T_v.js";import{a as jn}from"./use-thread-outputs-CzwE74V7.js";import{F as vn}from"./file-type-icon-BgvZ7mJ5.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-BpRy7AHp.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-AbOSM7KF.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-BXFm5jK2.js";import{i as xt}from"./LinkBroken01-Dhn_nIp2.js";import{b as $s,C as Ms,a as As}from"./collapsible-C4GX1H_R.js";import{u as Ps}from"./use-copy-DRW_V1kW.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-DB51uKij.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-D7FGI3D0.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-BFpdF0Ea.js";import{j as Ge,g as Zs,n as en}from"./shell-layout-BHLD5jhn.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-C3zml1pp.js";import{g as yt}from"./types-CR7kvQl1.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-jhiffORJ.js";import{c as an,u as ln,a as on}from"./use-mcp-client-CjLtJgTU.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-CCkkm2qA.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-1CFQF9HU.js";import{s as cn}from"./XClose-CUME_VK2.js";import{n as De}from"./ShoppingBag01-BOpj8wnX.js";import{i as un}from"./SearchMd-DrxAIngK.js";import{a as Ke}from"./autosend-xPyRMwmc.js";import{b as Tt}from"./use-entitlements-CMCBZq5_.js";import{I as dn,M as Ct}from"./markdown-j0gDnxTp.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-y4usetIj.js";import{I as Se}from"./integration-icon-FxF8FEU6.js";import{a as It}from"./use-connection-CgY1E7FR.js";import{u as $t}from"./use-navigate-to-agent-BJsKVGd6.js";import{s as xn}from"./UserSquare-BloCTB27.js";import{g as hn}from"./use-mcp-prompts-JVEMCdnt.js";import{t as bn}from"./ChevronUp-aVrgoYI4.js";import{i as yn}from"./Monitor01-BwW28bRE.js";import{a as jn}from"./use-thread-outputs-CIMyOC9i.js";import{F as vn}from"./file-type-icon-C-QM854F.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
|
|