decocms 4.253.2 → 4.253.4
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-BYvQDEJ0.js → AlertCircle-DYgdGYTv.js} +1 -1
- package/dist/client/assets/{AreaChart-DMcwZhe6.js → AreaChart-CMnx2jTR.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B-9nUwLX.js → ArrowLeft-BATiZdpN.js} +1 -1
- package/dist/client/assets/{ArrowUp-B1UtGT45.js → ArrowUp-DPC6-aSI.js} +1 -1
- package/dist/client/assets/{Check-Cu-Awg_S.js → Check-BrKE9OB2.js} +1 -1
- package/dist/client/assets/{CheckCircle-C4O_1HW1.js → CheckCircle-BBP9kMUK.js} +1 -1
- package/dist/client/assets/{ChevronDown-D1GCQiij.js → ChevronDown-DFEG7MPA.js} +1 -1
- package/dist/client/assets/{ChevronRight-NcrFTq4Q.js → ChevronRight-BQSOrRZI.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DhZiWWo6.js → ChevronSelectorVertical-CYl2vYgB.js} +1 -1
- package/dist/client/assets/{ChevronUp-CrheBWdX.js → ChevronUp-Bw8Sz0nt.js} +1 -1
- package/dist/client/assets/{Copy01-DwPzyMCP.js → Copy01-BP5ZeQhZ.js} +1 -1
- package/dist/client/assets/{CreditCard01-CqBwox93.js → CreditCard01-BBCeVJFk.js} +1 -1
- package/dist/client/assets/{DotsVertical-Dnc_qefX.js → DotsVertical-BZlCy-sD.js} +1 -1
- package/dist/client/assets/{Download01-yzTeB8lR.js → Download01-CQmv2LAE.js} +1 -1
- package/dist/client/assets/{Eye-rZWcM_sl.js → Eye-BmtNB9GI.js} +1 -1
- package/dist/client/assets/{FilterLines-BMCdm4O2.js → FilterLines-DItgB1py.js} +1 -1
- package/dist/client/assets/{Globe01-CojEB28p.js → Globe01-BP1ofKkh.js} +1 -1
- package/dist/client/assets/{Globe04-DohkS1yI.js → Globe04-B1LnAHXc.js} +1 -1
- package/dist/client/assets/{HardDrive-WahlW5wX.js → HardDrive-BuB-WbPW.js} +1 -1
- package/dist/client/assets/{Key01-Bx4K_S3Q.js → Key01-lS9FRzOH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CtNOOeZL.js → LinkExternal01-BpWEYJKm.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-D_Q5BYhU.js → LockUnlocked01-DA9lO-kT.js} +1 -1
- package/dist/client/assets/{LogOut01-BZABwyef.js → LogOut01-BoMH6mum.js} +1 -1
- package/dist/client/assets/{Monitor01-7UTn7zVa.js → Monitor01-C4Wwm_hh.js} +1 -1
- package/dist/client/assets/{Palette-BoChqeld.js → Palette-Duvy-7Op.js} +1 -1
- package/dist/client/assets/{Play-DNBU5rzE.js → Play-Dh0ic-Gg.js} +1 -1
- package/dist/client/assets/{Plus-8T2afHEs.js → Plus-CD2C3H1x.js} +1 -1
- package/dist/client/assets/{SearchLg-6rfLixx5.js → SearchLg-BSXC7LTk.js} +1 -1
- package/dist/client/assets/{SearchMd-0vzqE1Pd.js → SearchMd-CJj5MHgM.js} +1 -1
- package/dist/client/assets/{Settings02-KfyhGAo3.js → Settings02-DKjr2o3l.js} +1 -1
- package/dist/client/assets/{Share07-BTlsc7Ng.js → Share07-Dr1p2Ged.js} +1 -1
- package/dist/client/assets/{Shield01-CPg5EmjN.js → Shield01--03ik0Sp.js} +1 -1
- package/dist/client/assets/{Stars01-CV6o6WbI.js → Stars01-DRTG_5t2.js} +1 -1
- package/dist/client/assets/{Stars02-Do7POkWd.js → Stars02-BUQX9K5W.js} +1 -1
- package/dist/client/assets/{Sun-knqgcKen.js → Sun-dBDvqCx1.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-dwH3CFZl.js → SwitchHorizontal01-BitapUZ-.js} +1 -1
- package/dist/client/assets/{Tool01-CawhE5Vv.js → Tool01-D5-n2yHs.js} +1 -1
- package/dist/client/assets/{Tool02-DUb3PZH0.js → Tool02-DnSW-Zkc.js} +1 -1
- package/dist/client/assets/{Trash01-CZV6hVoi.js → Trash01-CC-Kmq2_.js} +1 -1
- package/dist/client/assets/{TrendUp01-Cp69MjT_.js → TrendUp01-Bx_vv04M.js} +1 -1
- package/dist/client/assets/{Upload01-AWrvzckN.js → Upload01-BCtdfGgP.js} +1 -1
- package/dist/client/assets/{User01-DLfObf45.js → User01-CnSrMlu1.js} +1 -1
- package/dist/client/assets/{UserSquare-BjlZKgC9.js → UserSquare-BaATFFz9.js} +1 -1
- package/dist/client/assets/{Users01-CQ3eFXvg.js → Users01-ZxOiHteR.js} +1 -1
- package/dist/client/assets/{Users03-DgZSfmdp.js → Users03-D1tfQh9e.js} +1 -1
- package/dist/client/assets/{XCircle-BpPG80mN.js → XCircle-CX5QYkxV.js} +1 -1
- package/dist/client/assets/{XClose-DW7idjn0.js → XClose-Bp2NfyqG.js} +1 -1
- package/dist/client/assets/{YAxis-Da2rtvB9.js → YAxis-ClWTHqEh.js} +1 -1
- package/dist/client/assets/{Zap-Dzj3-lys.js → Zap-BYID1TcD.js} +1 -1
- package/dist/client/assets/{ZapSquare-Bs2nDJX-.js → ZapSquare-BHoqLDj7.js} +1 -1
- package/dist/client/assets/{access-gate-DZ_-IWJN.js → access-gate-nlEqwcs0.js} +1 -1
- package/dist/client/assets/{agent-icon-xLXU6rvd.js → agent-icon-Wzne0cy2.js} +1 -1
- package/dist/client/assets/{agents-list-CE_lUbRY.js → agents-list-CzYqn1ZY.js} +1 -1
- package/dist/client/assets/{ai-providers-B5hVpeDw.js → ai-providers-D2xKre1K.js} +1 -1
- package/dist/client/assets/{alert-CnmxLYRw.js → alert-BBFxea8i.js} +1 -1
- package/dist/client/assets/{alert-dialog-CvsZ6guw.js → alert-dialog-DNxs3rMg.js} +1 -1
- package/dist/client/assets/{api-keys-D72J-m-j.js → api-keys-iIMkzT3K.js} +1 -1
- package/dist/client/assets/{app-editor-CClK5ocS.js → app-editor-DAzUyQB3.js} +1 -1
- package/dist/client/assets/{auth-1R6gk2tO.js → auth-DVeqzlrO.js} +1 -1
- package/dist/client/assets/{auth-catchall-DHLFLTCH.js → auth-catchall-DnecXyba.js} +1 -1
- package/dist/client/assets/{auth-entry-CUwr4ac9.js → auth-entry-CTew-kpr.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Cx8b5rv5.js → auth-split-layout-B7QZDDHT.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CZZKLfUR.js → authenticate-and-persist-oauth-CQj3V1Hb.js} +1 -1
- package/dist/client/assets/{automation-list-row-DuyceG26.js → automation-list-row-Bo394FgV.js} +1 -1
- package/dist/client/assets/{automation-runs-DP3JWssQ.js → automation-runs-4aPIpCPi.js} +1 -1
- package/dist/client/assets/{automations-DbKB4JrO.js → automations-CkZa8Tjw.js} +1 -1
- package/dist/client/assets/{avatar-DPXyNBP8.js → avatar-CGf3Yvcx.js} +1 -1
- package/dist/client/assets/{badge-CGCuo_-5.js → badge-MzlTYwLU.js} +1 -1
- package/dist/client/assets/{block-document-CMd9Eo96.js → block-document-CHiXgrUR.js} +1 -1
- package/dist/client/assets/{buckets-DljZRfHK.js → buckets-ywpgIqh0.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BLk77HCA.js → bulk-category-panel-BBZN-nLI.js} +1 -1
- package/dist/client/assets/{capability-load-error-DnpJPSNM.js → capability-load-error-Bk3XaMP4.js} +1 -1
- package/dist/client/assets/{cards-C60HDM5G.js → cards-qELta8zq.js} +1 -1
- package/dist/client/assets/{category-editor-DCes96yT.js → category-editor-CzX68Lm2.js} +1 -1
- package/dist/client/assets/{chart-BDZIA7_t.js → chart-B1o9ofL4.js} +1 -1
- package/dist/client/assets/{chat-context-C9nTU_s6.js → chat-context-Dr9HqeFx.js} +1 -1
- package/dist/client/assets/{checkbox-CYVQb6u5.js → checkbox-B9DpWoC4.js} +1 -1
- package/dist/client/assets/{choose-editor-CHdyY5E4.js → choose-editor-DKuXqfGk.js} +1 -1
- package/dist/client/assets/{cli-auth-success-a3s0cdGF.js → cli-auth-success-JnzDKGNB.js} +1 -1
- package/dist/client/assets/{collection-detail-COMW8222.js → collection-detail-BpEYrs9L.js} +1 -1
- package/dist/client/assets/{collection-display-button-DjAF7BCj.js → collection-display-button-Cd65Yn6T.js} +1 -1
- package/dist/client/assets/{collection-search-CSSjKy7f.js → collection-search-BX3HN7Ay.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DOG_oIXa.js → collection-table-wrapper-D1ehBq3T.js} +1 -1
- package/dist/client/assets/{collection-tabs-DGI2IEmV.js → collection-tabs-C71tFSNn.js} +1 -1
- package/dist/client/assets/{command-DUeMCHIE.js → command-Tvrug8j0.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DB8uJRe2.js → commerce-onboarding-BRAmG6zZ.js} +1 -1
- package/dist/client/assets/{connect-xjult6u-.js → connect-MGbkyF8o.js} +1 -1
- package/dist/client/assets/{connection-O58eU8Dr.js → connection-Dk9Qc7eL.js} +1 -1
- package/dist/client/assets/{connection-card-Drtf7vdR.js → connection-card-r8Rl_ibx.js} +1 -1
- package/dist/client/assets/{connection-detail-O-fmNmpE.js → connection-detail-Hwp3a3xA.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-rO7EwngE.js → connection-form-helpers-Cy3xfYOI.js} +1 -1
- package/dist/client/assets/{connections-kiyFdETe.js → connections-DSIcrtaF.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BNBoVXdw.js → decopilot-sse-pool-W-Zi3Pb6.js} +1 -1
- package/dist/client/assets/{dialog-06THKDmm.js → dialog-hjPI7Hcn.js} +1 -1
- package/dist/client/assets/{domain-settings-DxS7w6w-.js → domain-settings-CWawq4F5.js} +1 -1
- package/dist/client/assets/{drawer-DfM0a7aK.js → drawer-C4e-HyGn.js} +1 -1
- package/dist/client/assets/{dropdown-menu-w7n_JiUQ.js → dropdown-menu-B8bUza_A.js} +1 -1
- package/dist/client/assets/{empty-state-DytlgCAm.js → empty-state-BE2pEzuV.js} +1 -1
- package/dist/client/assets/{extract-connection-data-42ShpRyJ.js → extract-connection-data-58OR1XXQ.js} +1 -1
- package/dist/client/assets/file-explorer-BizT3eIU.js +2 -0
- package/dist/client/assets/{file-type-icon-DIpohPJ6.js → file-type-icon-y8rEOn5f.js} +1 -1
- package/dist/client/assets/{form-D7T5_Dgj.js → form-CBHsYuqB.js} +1 -1
- package/dist/client/assets/{general-DmFqcLLE.js → general-DMf8imCO.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BebzrN3W.js → github-repo-picker-DEHCU2yM.js} +1 -1
- package/dist/client/assets/{hooks-BxLy1Zzz.js → hooks-B_xMcGgB.js} +1 -1
- package/dist/client/assets/{index-CvNeVHfy.js → index-21L5FOcf.js} +1 -1
- package/dist/client/assets/{index-B1P_V3qG.js → index-3HRqgxJc.js} +1 -1
- package/dist/client/assets/{index-CMALBC-v.js → index-BQePaVWj.js} +3 -3
- package/dist/client/assets/{index-DDTrmVhz.js → index-BgEp-gwX.js} +1 -1
- package/dist/client/assets/{index-BYzmGpA0.js → index-C9HKucPa.js} +1 -1
- package/dist/client/assets/{index-BdUjMMS5.js → index-CAEQLv_6.js} +1 -1
- package/dist/client/assets/{index-C2wbMIfs.js → index-CscCr4ye.js} +49 -49
- package/dist/client/assets/{index-9OoxX1NR.js → index-Dl9zlmBS.js} +1 -1
- package/dist/client/assets/{index-BB4_ygWi.js → index-IQ0qNDkU.js} +1 -1
- package/dist/client/assets/{index-DF3uNrPp.js → index-OxBg_kim.js} +1 -1
- package/dist/client/assets/{index-redirect-Cpg_Q5et.js → index-redirect-RaX9EI6a.js} +1 -1
- package/dist/client/assets/{infra-billing-DyTByfZt.js → infra-billing-CSleBRHn.js} +1 -1
- package/dist/client/assets/{input-CjP4wQRD.js → input-pNvYW_mm.js} +1 -1
- package/dist/client/assets/{integration-icon-_VDJvzJ-.js → integration-icon-Bz9Yby97.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-8QQ-DA_M.js → invite-member-dialog-Bs3Bs7ka.js} +1 -1
- package/dist/client/assets/{label-BNnDeYWX.js → label-Bf57Edle.js} +1 -1
- package/dist/client/assets/{layout-DGxeKl7-.js → layout-DN1mqaH1.js} +1 -1
- package/dist/client/assets/{login-BmUk90CP.js → login-eRvqco5I.js} +1 -1
- package/dist/client/assets/{mcp-oauth-R6LWeGel.js → mcp-oauth-CYzKrq5m.js} +1 -1
- package/dist/client/assets/{members-Rje746QY.js → members-BldmbQZB.js} +1 -1
- package/dist/client/assets/monaco-editor-6xoFDVUf.js +19 -0
- package/dist/client/assets/{monitoring-stats-row-nWQLcD7N.js → monitoring-stats-row-D5GHszYd.js} +1 -1
- package/dist/client/assets/{multi-select-DvVxCCA2.js → multi-select-D4ygrG_7.js} +1 -1
- package/dist/client/assets/{oauth-callback-BrZMJ9Z_.js → oauth-callback-BttLZVmz.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-6lB5ioTQ.js → oauth-callback-ai-provider-uwtU9PTq.js} +1 -1
- package/dist/client/assets/{onboarding-CFZ_YqBk.js → onboarding-CyeYcjAz.js} +1 -1
- package/dist/client/assets/{org-layout-CFJ3s3aO.js → org-layout-DSuEV0J1.js} +1 -1
- package/dist/client/assets/{organization-choice-4gTGCdVZ.js → organization-choice-DEez_6AO.js} +1 -1
- package/dist/client/assets/{orgs-BlhaM_QR.js → orgs-DBT8d_-l.js} +1 -1
- package/dist/client/assets/{page-seo-form-8CrhZnSd.js → page-seo-form-BYOWJnrh.js} +1 -1
- package/dist/client/assets/{popover-BZEJPBaN.js → popover-CPH5iRij.js} +1 -1
- package/dist/client/assets/{post-editor-DXF_bdFs.js → post-editor-dcu9SgnQ.js} +1 -1
- package/dist/client/assets/{primitives-DefLuCWp.js → primitives-Cy7JJ1cC.js} +1 -1
- package/dist/client/assets/{profile-ixoNCK51.js → profile-Txg0Tcs9.js} +1 -1
- package/dist/client/assets/{project-app-view-BmDjcK09.js → project-app-view-9io3TDC5.js} +1 -1
- package/dist/client/assets/record-editor-BXemZD4P.js +1 -0
- package/dist/client/assets/{redirect-editor-DOZ_6ItM.js → redirect-editor-DaK8nRMO.js} +1 -1
- package/dist/client/assets/registry-am9RbaFH.js +2 -0
- package/dist/client/assets/{registry-layout-CZnAV2GE.js → registry-layout-DI1X28lK.js} +1 -1
- package/dist/client/assets/{reports-BskvcwLH.js → reports-NKcAxv-2.js} +1 -1
- package/dist/client/assets/{require-capability-Byjk0WDJ.js → require-capability-BuWK8Yk_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BuUCLduS.js → required-auth-layout-Qcop3sgf.js} +1 -1
- package/dist/client/assets/{reset-password-Hn69qiVu.js → reset-password-C41GEXWv.js} +1 -1
- package/dist/client/assets/{roles-DPU4GH76.js → roles-Bd1eZDGe.js} +1 -1
- package/dist/client/assets/{search-input-F06b4Ka7.js → search-input-Cm6_zxCC.js} +1 -1
- package/dist/client/assets/{secrets-DtooYsRz.js → secrets-CHfyL3DW.js} +1 -1
- package/dist/client/assets/{sections-editor-DHi-y1Qr.js → sections-editor-HMUkQ4pY.js} +1 -1
- package/dist/client/assets/{select-model-CSZcccgl.js → select-model-BkyVeqIo.js} +1 -1
- package/dist/client/assets/{select-fEJ2CWnh.js → select-xTg7f2aJ.js} +1 -1
- package/dist/client/assets/{self-tool-result-BoRiwr9O.js → self-tool-result-BbI4rL2G.js} +1 -1
- package/dist/client/assets/{seo-editor-C0yrgVaA.js → seo-editor-C0DJovnP.js} +1 -1
- package/dist/client/assets/{settings-layout-CkCx5djT.js → settings-layout-CoHWZB4G.js} +1 -1
- package/dist/client/assets/{shell-controls-CvuXlA7S.js → shell-controls-T11Jxeb1.js} +1 -1
- package/dist/client/assets/{shell-layout-D2WGSk9d.js → shell-layout-BuFXYOiZ.js} +1 -1
- package/dist/client/assets/{spinner-DRW7bcot.js → spinner-BuWL6egV.js} +1 -1
- package/dist/client/assets/{sso-C9S6ArZ5.js → sso-DOUDzFF-.js} +1 -1
- package/dist/client/assets/{store-DUIqjsmW.js → store-BrkP0JeJ.js} +1 -1
- package/dist/client/assets/store-registry-BqMir88l.js +2 -0
- package/dist/client/assets/{switch-9lR-M49q.js → switch-CN-N-gzz.js} +1 -1
- package/dist/client/assets/{synced-repos-DCY70HWU.js → synced-repos-C7xpPb_Y.js} +1 -1
- package/dist/client/assets/{tab-id-DOlOt_oN.js → tab-id-DNXgJZQ7.js} +1 -1
- package/dist/client/assets/{table-55wy8ES_.js → table-B3o9Dmes.js} +1 -1
- package/dist/client/assets/{tabs-B_f6B2ih.js → tabs-DaG2c1bL.js} +1 -1
- package/dist/client/assets/{task-key-DC0DmXL_.js → task-key-D6eTK-Cw.js} +1 -1
- package/dist/client/assets/{tasks-C1jd4mF0.js → tasks-DtNPWfDD.js} +1 -1
- package/dist/client/assets/{textarea-CioreWQ5.js → textarea-CEFSCQC7.js} +1 -1
- package/dist/client/assets/{toggle-group-CKR4opVv.js → toggle-group-CioF0NhR.js} +1 -1
- package/dist/client/assets/{toolbar-DxhudO7Y.js → toolbar-CMIpbnNG.js} +1 -1
- package/dist/client/assets/{track-5IMkFYjp.js → track-D27toi7s.js} +1 -1
- package/dist/client/assets/{types-LSAqkaao.js → types-BlHu5AYw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C1myPe1T.js → use-ai-providers-CKlmRQrw.js} +1 -1
- package/dist/client/assets/{use-api-keys-BLhCxSau.js → use-api-keys-D4FMhkyC.js} +1 -1
- package/dist/client/assets/{use-automations-CB10hjhp.js → use-automations-DidQetuy.js} +1 -1
- package/dist/client/assets/{use-autosave-BxOegg1k.js → use-autosave-CiWisXgS.js} +1 -1
- package/dist/client/assets/{use-clock-tick-jMDHnmqb.js → use-clock-tick-BGurjdt6.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-CzYB3N6a.js → use-commerce-diagnostic-DAUYQWSv.js} +1 -1
- package/dist/client/assets/{use-connection-DT2B_DYi.js → use-connection-BYWAYSsl.js} +1 -1
- package/dist/client/assets/{use-copy-D3XerJdc.js → use-copy-CmfoAIcI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DKZ39HDE.js → use-create-virtual-mcp-BIZZY_sa.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DTkDy42k.js → use-debounced-autosave-0RZhjF12.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DbRRK9TT.js → use-debounced-value-CnJPaG7r.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-G33cy0ys.js → use-decopilot-events-C7yOI2m5.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B7i8EHY-.js → use-delete-connection-BDKEmYRP.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-EilNlemK.js → use-deployment-admin-CWPE3_oO.js} +1 -1
- package/dist/client/assets/{use-file-configs-BPtRUpqF.js → use-file-configs-CJ2y6kPn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-QWIMbpAi.js → use-infinite-scroll-DSOVruvI.js} +1 -1
- package/dist/client/assets/{use-join-requests-d9x5nN9k.js → use-join-requests-r5woC7Lu.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CluZ1kcE.js → use-mcp-client-D4aHy3t4.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bn-w9dls.js → use-mcp-tools-CP0mpOwy.js} +1 -1
- package/dist/client/assets/{use-members-Bsc6dQLG.js → use-members-BCDxBgzl.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-NiTIdPbN.js → use-navigate-to-agent-ByVyc96q.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cu0_xvCB.js → use-org-auth-client-1D0ZnSiX.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DNte33T4.js → use-org-repo-syncs-DLmiGzNf.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bf2lWMgv.js → use-org-sso-DlHmoS_J.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BtYEcikp.js → use-organization-roles-BvcRheeo.js} +1 -1
- package/dist/client/assets/{use-organization-settings-h-vNu5dF.js → use-organization-settings-JKD7u33z.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CpTGVE3o.js → use-registry-connections-CVAGJ2M_.js} +1 -1
- package/dist/client/assets/{use-secrets-Djj5tnEX.js → use-secrets-BEmXZPR_.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DwW1Ebe1.js → use-section-preview-base-DkkNTSj6.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Bfvpj4xw.js → use-status-sounds-COh4e84J.js} +1 -1
- package/dist/client/assets/{use-tags-Bcb85fVL.js → use-tags-uutLL1jg.js} +1 -1
- package/dist/client/assets/{use-view-mode-CHryhyWZ.js → use-view-mode-o5t3FFXc.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DMt0VXr_.js → use-virtual-mcp-CC4XsHmF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-slsiqbSM.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-akMn1wqL.js +1 -0
- package/dist/client/assets/{users-BK6ODa0L.js → users-3Nb1Fnoa.js} +1 -1
- package/dist/client/assets/{variant-calendar-D8gSD-Zc.js → variant-calendar-DbBpvwbQ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-k-CL6fP4.js → view-mode-toggle-6HdRnhoR.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/monaco/0.52.0/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/dist/client/monaco/0.52.0/vs/base/worker/workerMain.js +31 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/abap/abap.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/apex/apex.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/azcli/azcli.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/bat/bat.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/bicep/bicep.js +11 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/cameligo/cameligo.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/clojure/clojure.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/coffee/coffee.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/cpp/cpp.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/csharp/csharp.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/csp/csp.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/css/css.js +12 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/cypher/cypher.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/dart/dart.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/dockerfile/dockerfile.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/ecl/ecl.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/elixir/elixir.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/flow9/flow9.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/freemarker2/freemarker2.js +12 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/fsharp/fsharp.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/go/go.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/graphql/graphql.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/handlebars/handlebars.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/hcl/hcl.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/html/html.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/ini/ini.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/java/java.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/javascript/javascript.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/julia/julia.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/kotlin/kotlin.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/less/less.js +11 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/lexon/lexon.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/liquid/liquid.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/lua/lua.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/m3/m3.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/markdown/markdown.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/mdx/mdx.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/mips/mips.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/msdax/msdax.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/mysql/mysql.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/objective-c/objective-c.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/pascal/pascal.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/pascaligo/pascaligo.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/perl/perl.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/pgsql/pgsql.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/php/php.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/pla/pla.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/postiats/postiats.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/powerquery/powerquery.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/powershell/powershell.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/protobuf/protobuf.js +11 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/pug/pug.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/python/python.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/qsharp/qsharp.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/r/r.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/razor/razor.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/redis/redis.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/redshift/redshift.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/ruby/ruby.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/rust/rust.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/sb/sb.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/scala/scala.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/scheme/scheme.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/scss/scss.js +12 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/shell/shell.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/solidity/solidity.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/sophia/sophia.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/sparql/sparql.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/sql/sql.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/st/st.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/swift/swift.js +13 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/systemverilog/systemverilog.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/tcl/tcl.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/twig/twig.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/typescript/typescript.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/typespec/typespec.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/vb/vb.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/wgsl/wgsl.js +307 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/xml/xml.js +10 -0
- package/dist/client/monaco/0.52.0/vs/basic-languages/yaml/yaml.js +10 -0
- package/dist/client/monaco/0.52.0/vs/editor/editor.main.css +8 -0
- package/dist/client/monaco/0.52.0/vs/editor/editor.main.js +798 -0
- package/dist/client/monaco/0.52.0/vs/language/css/cssMode.js +13 -0
- package/dist/client/monaco/0.52.0/vs/language/css/cssWorker.js +77 -0
- package/dist/client/monaco/0.52.0/vs/language/html/htmlMode.js +13 -0
- package/dist/client/monaco/0.52.0/vs/language/html/htmlWorker.js +454 -0
- package/dist/client/monaco/0.52.0/vs/language/json/jsonMode.js +19 -0
- package/dist/client/monaco/0.52.0/vs/language/json/jsonWorker.js +42 -0
- package/dist/client/monaco/0.52.0/vs/language/typescript/tsMode.js +20 -0
- package/dist/client/monaco/0.52.0/vs/language/typescript/tsWorker.js +51328 -0
- package/dist/client/monaco/0.52.0/vs/loader.js +11 -0
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/file-explorer-D_PGAi5e.js +0 -2
- package/dist/client/assets/monaco-editor-CHdpsAKe.js +0 -19
- package/dist/client/assets/record-editor-SauBdytI.js +0 -1
- package/dist/client/assets/registry-DNELIUVJ.js +0 -2
- package/dist/client/assets/store-registry-CCLV9EGA.js +0 -2
- package/dist/client/assets/useInfiniteQuery-gLOjDPyq.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-EB_E_bJc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,b as ae,H as de,p as re,av as ce,r as me,K as ie,o as ge,e as X,q as ue,t as N,j as s,d8 as fe,B as te,d7 as xe,d6 as Se}from"./index-
|
|
1
|
+
import{c as oe,b as ae,H as de,p as re,av as ce,r as me,K as ie,o as ge,e as X,q as ue,t as N,j as s,d8 as fe,B as te,d7 as xe,d6 as Se}from"./index-BQePaVWj.js";import{B as ne}from"./badge-MzlTYwLU.js";import{I as je}from"./input-pNvYW_mm.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-xTg7f2aJ.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function ye(){const e=oe.c(101),t=ae(),{org:o}=de(),p=re(),i=ce(),[d,v]=me.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=ge(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ue("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const r=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let O;e[27]!==t?(O=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=O):O=e[28];let U;e[29]!==O||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:O},e[29]=O,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let b;e[33]!==i?(b=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==b||e[41]!==y||e[42]!==E?(Y={mutationFn:b,onSuccess:y,onError:E},e[40]=b,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let k;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],k=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=k}else k=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let z;e[73]!==t?(z=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=z):z=e[74];let F;e[75]!==d||e[76]!==z?(F=s.jsx(je,{value:d,onChange:J,placeholder:z,className:"max-w-xs"}),e[75]=d,e[76]=z,e[77]=F):F=e[77];let w;e[78]!==r||e[79]!==d?(w=()=>r.mutate(d.trim()),e[78]=r,e[79]=d,e[80]=w):w=e[80];let G;e[81]!==r.isPending||e[82]!==d?(G=!d.trim()||r.isPending,e[81]=r.isPending,e[82]=d,e[83]=G):G=e[83];let H;e[84]!==r.isPending||e[85]!==t?(H=r.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=r.isPending,e[85]=t,e[86]=H):H=e[86];let Z;e[87]!==w||e[88]!==G||e[89]!==H?(Z=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:H}),e[87]=w,e[88]=G,e[89]=H,e[90]=Z):Z=e[90];let B;e[91]!==F||e[92]!==Z?(B=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[F,Z]}),e[91]=F,e[92]=Z,e[93]=B):B=e[93];let K;e[94]!==k||e[95]!==B?(K=s.jsxs(xe,{children:[k,B]}),e[94]=k,e[95]=B,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let d;t[0]!==i?(d=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=d):d=t[1];const v=d;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let r;return t[31]!==j||t[32]!==m?(r=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=r):r=t[33],r}export{ye as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as s,dd as i,n as c}from"./index-
|
|
1
|
+
import{c as d,j as s,dd as i,n as c}from"./index-BQePaVWj.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,v as d,b as e,j as f,N as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as l,et as f,eu as m,n as u,ev as g,ew as x,ex as v,ey as b,ez as h,eA as w,eB as j,eC as N,eD as z,eE as y,eF as _,eG as p}from"./index-
|
|
1
|
+
import{c,j as l,et as f,eu as m,n as u,ev as g,ew as x,ex as v,ey as b,ez as h,eA as w,eB as j,eC as N,eD as z,eE as y,eF as _,eG as p}from"./index-BQePaVWj.js";import{i as D}from"./Check-BrKE9OB2.js";import{i as $}from"./ChevronRight-BQSOrRZI.js";import{i as M}from"./DotsVertical-BZlCy-sD.js";function R(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(x,{children:l.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,translate:"no",className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function G(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==o||e[9]!==i||e[10]!==r?(d=l.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...o}),e[7]=s,e[8]=o,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function L(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(D,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function O(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(y,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function A(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(p,{children:l.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==o||e[9]!==n?(i=l.jsxs(_,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function B(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=l.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function F(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function P(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function q(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx($,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(d=l.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,i]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function H(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=l.jsx(z,{"data-slot":"dropdown-menu-sub-content",translate:"no",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,G as a,E as b,R as c,P as d,q as e,H as f,O as g,A as h,F as i,B as j,L as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,n as N,j as t}from"./index-
|
|
1
|
+
import{c as v,n as N,j as t}from"./index-BQePaVWj.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as I}from"./metadata-dUsYcpuu.js";import"./index-
|
|
1
|
+
import{g as I}from"./metadata-dUsYcpuu.js";import"./index-BQePaVWj.js";import{c as E}from"./use-mcp-client-D4aHy3t4.js";import{W as T}from"./constants-_08zpzmT.js";function U(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function H(t){const e=U(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function L(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function J(t,e){return L(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function Q(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(t){return t?D[t]??t.toUpperCase():null}function X(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Z(t,e,n,a,r){const o=await E({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}let Y="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Y[n[t]&63];return e};function j(t){return`${t}_${$()}`}function V(t){return I(t._meta)?.appName||t.server?.name||null}function K(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function tt(t,e,n,a){const r=t.server,o=I(t._meta),s=new Date().toISOString(),R=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,w=r?.icons?.[0]?.src||H(r?.repository)||null,i=o?.oauth_config,A=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,C=o?.configuration_state,v=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,N=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[N];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,O=p.length>1;let d="";c&&O?d=` (${W(c)})`:l&&M&&(d=` (${K(l)})`);const x=R+d;return{id:j("conn"),title:x,description:k,icon:w,app_name:V(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:A,configuration_state:C??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{V as a,H as b,Z as c,X as d,tt as e,Q as f,j as g,J as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as se,b as Me,r as u,j as r,k as fe,B as De,eV as Jt,bd as Zt,bj as xe,eW as en,eX as tn,eY as nn,eZ as rn,cu as on,e_ as sn,e$ as lt,bf as an,f0 as ln,f1 as cn,f2 as dn,f3 as un,f4 as fn,f5 as pn,f6 as mn,f7 as xn,f8 as hn,n as le,p as gn,t as ne,ab as Ze,a8 as et,a9 as tt,K as nt}from"./index-BQePaVWj.js";import{d as bn,b2 as yn,b3 as Cn}from"./agent-icon-Wzne0cy2.js";import{s as vn}from"./XClose-Bp2NfyqG.js";import{B as wn}from"./automation-runs-4aPIpCPi.js";import{a as Nn}from"./chat-context-Dr9HqeFx.js";import{F as jn}from"./monaco-editor-6xoFDVUf.js";import{u as En}from"./shell-layout-BuFXYOiZ.js";import{i as Sn,E as Dn,a as Ae,b as Mn,f as Rn,g as Tn,c as Pn,t as re,d as we,e as Le,h as Ne,j as Oe,k as Ie,l as kn,s as Fn,v as An,m as $e,n as je,o as rt,p as Ln,q as Ee,r as Ke,w as On,x as In,y as $n,z as Kn}from"./index-CscCr4ye.js";import{b as zn,h as _n,a as Gn,c as Bn,d as Vn,e as Un}from"./dialog-hjPI7Hcn.js";import{I as ot}from"./input-pNvYW_mm.js";import{c as Hn,d as Wn,b as qn,f as Qn,g as Xn,e as Yn,a as Jn,A as Zn}from"./alert-dialog-DNxs3rMg.js";import{t as er}from"./ChevronDown-DFEG7MPA.js";import{i as tr}from"./ChevronRight-BQSOrRZI.js";import{i as nr}from"./Share07-Dr1p2Ged.js";import"./AlertCircle-DYgdGYTv.js";import"./Tool01-D5-n2yHs.js";import"./ArrowUp-DPC6-aSI.js";import"./ArrowLeft-BATiZdpN.js";import"./Tool02-DnSW-Zkc.js";import"./XCircle-CX5QYkxV.js";import"./TrendUp01-Bx_vv04M.js";import"./ZapSquare-BHoqLDj7.js";import"./Users03-D1tfQh9e.js";import"./CheckCircle-BBP9kMUK.js";import"./Check-BrKE9OB2.js";import"./ChevronSelectorVertical-CYl2vYgB.js";import"./ChevronUp-Bw8Sz0nt.js";import"./DotsVertical-BZlCy-sD.js";import"./Stars02-BUQX9K5W.js";import"./UserSquare-BaATFFz9.js";import"./Copy01-BP5ZeQhZ.js";import"./CreditCard01-BBCeVJFk.js";import"./Download01-CQmv2LAE.js";import"./Settings02-DKjr2o3l.js";import"./Eye-BmtNB9GI.js";import"./FilterLines-DItgB1py.js";import"./Globe01-BP1ofKkh.js";import"./Globe04-B1LnAHXc.js";import"./SwitchHorizontal01-BitapUZ-.js";import"./HardDrive-BuB-WbPW.js";import"./Key01-lS9FRzOH.js";import"./LinkExternal01-BpWEYJKm.js";import"./LockUnlocked01-DA9lO-kT.js";import"./LogOut01-BoMH6mum.js";import"./Monitor01-C4Wwm_hh.js";import"./Sun-dBDvqCx1.js";import"./Palette-Duvy-7Op.js";import"./Play-Dh0ic-Gg.js";import"./Plus-CD2C3H1x.js";import"./SearchLg-BSXC7LTk.js";import"./SearchMd-CJj5MHgM.js";import"./Shield01--03ik0Sp.js";import"./Stars01-DRTG_5t2.js";import"./Trash01-CC-Kmq2_.js";import"./Upload01-BCtdfGgP.js";import"./User01-CnSrMlu1.js";import"./Users01-ZxOiHteR.js";import"./Zap-BYID1TcD.js";import"./select-xTg7f2aJ.js";import"./useInfiniteQuery-slsiqbSM.js";import"./use-infinite-scroll-DSOVruvI.js";import"./use-connection-BYWAYSsl.js";import"./use-mcp-client-D4aHy3t4.js";import"./constants-_08zpzmT.js";import"./auth-DVeqzlrO.js";import"./use-virtual-mcp-CC4XsHmF.js";import"./table-B3o9Dmes.js";import"./empty-state-BE2pEzuV.js";import"./use-members-BCDxBgzl.js";import"./use-org-auth-client-1D0ZnSiX.js";import"./use-clock-tick-BGurjdt6.js";import"./use-automations-DidQetuy.js";import"./useSuspenseInfiniteQuery-akMn1wqL.js";import"./avatar-CGf3Yvcx.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CmfoAIcI.js";import"./tab-id-DNXgJZQ7.js";import"./hooks-B_xMcGgB.js";import"./decopilot-sse-pool-W-Zi3Pb6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./types-BlHu5AYw.js";import"./integration-icon-Bz9Yby97.js";import"./use-navigate-to-agent-ByVyc96q.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-B1o9ofL4.js";import"./index-BgEp-gwX.js";import"./form-CBHsYuqB.js";import"./label-Bf57Edle.js";import"./spinner-BuWL6egV.js";import"./file-type-icon-y8rEOn5f.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-CKlmRQrw.js";import"./use-decopilot-events-C7yOI2m5.js";import"./use-organization-settings-JKD7u33z.js";import"./required-auth-layout-Qcop3sgf.js";import"./use-org-sso-DlHmoS_J.js";import"./drawer-C4e-HyGn.js";import"./collection-search-BX3HN7Ay.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-DaG2c1bL.js";import"./toggle-group-CioF0NhR.js";import"./use-commerce-diagnostic-DAUYQWSv.js";import"./popover-CPH5iRij.js";import"./self-tool-result-BbI4rL2G.js";import"./extract-connection-data-58OR1XXQ.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-CnJPaG7r.js";import"./authenticate-and-persist-oauth-CQj3V1Hb.js";import"./mcp-oauth-CYzKrq5m.js";import"./track-D27toi7s.js";import"./toolbar-CMIpbnNG.js";import"./github-repo-picker-DEHCU2yM.js";import"./use-mcp-tools-CP0mpOwy.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-r8Rl_ibx.js";import"./use-registry-connections-CVAGJ2M_.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CEFSCQC7.js";import"./connection-form-helpers-Cy3xfYOI.js";import"./collection-tabs-C71tFSNn.js";import"./badge-MzlTYwLU.js";import"./command-Tvrug8j0.js";import"./index-3HRqgxJc.js";import"./select-model-BkyVeqIo.js";import"./checkbox-B9DpWoC4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./cards-qELta8zq.js";import"./dropdown-menu-B8bUza_A.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-COh4e84J.js";import"./use-file-configs-CJ2y6kPn.js";import"./pt-BR-CLy76QW2.js";import"./switch-CN-N-gzz.js";import"./use-debounced-autosave-0RZhjF12.js";import"./search-input-Cm6_zxCC.js";import"./index-C9HKucPa.js";import"./use-secrets-BEmXZPR_.js";import"./AreaChart-CMnx2jTR.js";import"./task-key-D6eTK-Cw.js";import"./use-tags-uutLL1jg.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-Bo394FgV.js";import"./use-org-repo-syncs-DLmiGzNf.js";const rr={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function or(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:C}=i,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,k]=u.useState(j),[Z,W]=u.useState(s),y=rr[a];s!==Z&&(W(s),s&&k(j));let b;e[0]!==d||e[1]!==C?(b=_=>{!_&&!d&&C(!1)},e[0]=d,e[1]=C,e[2]=b):b=e[2];const F=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(zn,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(_n,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Gn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>k(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let $;e[38]!==R||e[39]!==G?($=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=$):$=e[40];let q;e[41]!==C?(q=()=>C(!1),e[41]=C,e[42]=q):q=e[42];let K;e[43]!==x?(K=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=K):K=e[44];let z;e[45]!==d||e[46]!==q||e[47]!==K?(z=r.jsx(De,{type:"button",variant:"outline",onClick:q,disabled:d,children:K}),e[45]=d,e[46]=q,e[47]=K,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let L;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(L=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=L):L=e[55];let V;e[56]!==B||e[57]!==L?(V=r.jsx(De,{type:"submit",disabled:B,children:L}),e[56]=B,e[57]=L,e[58]=V):V=e[58];let O;e[59]!==z||e[60]!==V?(O=r.jsxs(Bn,{children:[z,V]}),e[59]=z,e[60]=V,e[61]=O):O=e[61];let U;e[62]!==I||e[63]!==$||e[64]!==O||e[65]!==N?(U=r.jsx(Vn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,$,O]})}),e[62]=I,e[63]=$,e[64]=O,e[65]=N,e[66]=U):U=e[66];let ee;return e[67]!==F||e[68]!==s||e[69]!==U?(ee=r.jsx(Un,{open:s,onOpenChange:F,children:U}),e[67]=F,e[68]=s,e[69]=U,e[70]=ee):ee=e[70],ee}function sr(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:h}=i,f=Me(),C=s?.kind==="directory",j=s!==null,d=C?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(Hn,{children:x}),e[3]=x,e[4]=g):g=e[4];let k;e[5]!==f?(k=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=k):k=e[6];const Z=s?.name;let W;e[7]!==Z?(W=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=W):W=e[8];let y;e[9]!==C||e[10]!==f?(y=C?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=C,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==a.length||e[13]!==f?(b=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=f,e[14]=b):b=e[14];let F;e[15]!==k||e[16]!==W||e[17]!==y||e[18]!==b?(F=r.jsxs(Wn,{children:[k," ",W,y,b]}),e[15]=k,e[16]=W,e[17]=y,e[18]=b,e[19]=F):F=e[19];let A;e[20]!==F||e[21]!==g?(A=r.jsxs(qn,{children:[g,F]}),e[20]=F,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(Qn,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx(Xn,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Yn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(Jn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(Zn,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ar]=an(ze,[lt]),J=lt(),[ir,ct]=ar(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[h,f]=u.useState(!1),C=J(e),j=on(a),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(ir,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...C,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),C=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:C}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var lr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(nn,{...a,...s})};pt.displayName=lr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{i.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{i.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var cr="ContextMenuGroup",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuLabel",fr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});fr.displayName=ur;var pr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});ht.displayName=pr;var mr="ContextMenuCheckboxItem",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuRadioGroup",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});gr.displayName=hr;var br="ContextMenuRadioItem",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});yr.displayName=br;var Cr="ContextMenuItemIndicator",vr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});vr.displayName=Cr;var wr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(tn,{...l,...a,ref:e})});gt.displayName=wr;var Nr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSubTrigger",Sr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e})});Sr.displayName=Er;var Dr="ContextMenuSubContent",Mr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(hn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Mr.displayName=Dr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=dt,Tr=ft,Pr=pt,kr=xt,Fr=ht,Ar=gt;function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Pr,{children:r.jsx(kr,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function ue(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let C;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(C=r.jsx(Fr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:f,...l}),e[7]=a,e[8]=l,e[9]=f,e[10]=h,e[11]=C):C=e[11],C}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Ar,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const $r="#d9a441";function Kr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:C,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:k,onRename:Z,onDelete:W}=i,y=h===void 0?!1:h,b=Me(),F=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${a*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==C||e[5]!==j?(N=()=>{j(),C()},e[4]=C,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==F||e[10]!==l||e[11]!==y?(R=F?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(er,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(tr,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(nr,{size:16,className:"shrink-0",style:{color:$r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=F,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Or,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(st,{}),e[31]=$):$=e[31];let q;e[32]!==b?(q=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=q):q=e[33];let K;e[34]!==g||e[35]!==q?(K=r.jsx(ue,{onSelect:g,children:q}),e[34]=g,e[35]=q,e[36]=K):K=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==k||e[40]!==z?(B=r.jsx(ue,{onSelect:k,children:z}),e[39]=k,e[40]=z,e[41]=B):B=e[41];let L;e[42]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(st,{}),e[42]=L):L=e[42];let V;e[43]!==b?(V=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=V):V=e[44];let O;e[45]!==Z||e[46]!==V?(O=r.jsx(ue,{onSelect:Z,children:V}),e[45]=Z,e[46]=V,e[47]=O):O=e[47];let U;e[48]!==b?(U=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=U):U=e[49];let ee;e[50]!==W||e[51]!==U?(ee=r.jsx(ue,{variant:"destructive",onSelect:W,children:U}),e[50]=W,e[51]=U,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==K||e[56]!==B||e[57]!==O||e[58]!==ee?(_=r.jsxs(Ir,{className:"w-52",children:[X,G,$,K,B,L,O,ee]}),e[53]=X,e[54]=G,e[55]=K,e[56]=B,e[57]=O,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Lr,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}const at=200,zr=2,_r=250,it=200;function Gr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Br(i){const e=se.c(9),{text:s,query:a}=i;let l,m,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:C,segments:j}=kn(s,a);l="truncate font-mono text-muted-foreground",m=C&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Pa({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[C,j]=u.useState(new Set),[d,x]=u.useState(null),[g,k]=u.useState(null),[Z,W]=u.useState([]),[y,b]=u.useState(""),[F,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),$=u.useRef(0),q=u.useRef(null),K=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),L=u.useRef(0),V=u.useRef(null),O=u.useRef(null),U=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=Nn(),{openSidePanel:yt}=En(),ge=gn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Gr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function Ce(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function Ct(t){const n=$n(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(nt.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ge.invalidateQueries({queryKey:nt.liveMeta(i,e,s)})}function vt(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>we(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ct(o)}function wt(t){const n=we(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){W(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),k(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=we(t);k(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await Ce(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await Ce(),oe(null),j(p=>{const v=new Set(p);for(const ce of Ie(o))v.add(ce);return v.add(o),v}),k({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=Ne(o),p=Ee(c,n);if(p===o){oe(null);return}if(Ke(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ge(v=>v===o?p:v.startsWith(`${o}/`)?Ee(p,v.slice(o.length+1)):v),await pe(),await Ce(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),vt(n),Nt(n.path),await pe(),await Ce(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=An(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,q.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Sn(t)&&me(t)})}async function ke(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==$.current)return!1;let c=!1;return m(p=>{const v=n?Kn(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=$.current,c=(async()=>{const p=await ke({pattern:"**/*",path:re(t),limit:Ae}),v=Ve(p,!0,o);return!v&&o===$.current&&ee(ce=>{const ve=new Set(ce);return ve.add(t),ve}),v})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ue(t){if(!$e(t,K.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(K.current);for(const c of Ie(n)){if(!$e(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++$.current;V.current=null,O.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await ke({pattern:"**/*",limit:Ae,maxDepth:Dn});Ve(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Fn(o.content??"");te(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ft(){L.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=$.current,n=V.current;if(n&&n.generation===t)return n.files;const o=O.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await ke({pattern:"**/*",limit:Ae});return $.current===t&&(V.current={generation:t,files:p.files}),p.files})();O.current={generation:t,promise:c};try{return await c}finally{O.current?.generation===t&&(O.current=null)}}async function Lt(t,n){try{const o=await At();if(n!==L.current)return;A(On(o,t,it))}catch{if(n!==L.current)return;A([])}}async function Ot(t,n){D(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==L.current)return;S(In(o.results??"")),N((o.matchCount??0)>=at)}catch{if(n!==L.current)return;S([]),N(!1)}finally{n===L.current&&D(!1)}}function It(t){const n=t.trim(),o=++L.current;Lt(n,o),n.length<zr?(S(null),D(!1),N(!1)):Ot(n,o)}function $t(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){Ft();return}B.current=setTimeout(()=>{It(t)},_r)}function We(t){const n=U.current;if(!n||n.path!==d)return;U.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Kt(t){U.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&We(Re.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Ln(i,e,s);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){je("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),k({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||W(n=>[...n,t]),He(t)}function Gt(t){W(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if($e(t,K.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function Ut(t){await q.current,await kt(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Ut(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?Ne(g.path):d?Ne(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Wt=Mn(h,f),Xe=Rn(Wt,C),Fe=F?.length??0,Ye=Tn(I??[]),Je=I?.length??0,de=d?_.get(d):null,qt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Te?wt(Te.path):[],Xt=(t,n)=>{Re.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Oe(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
2
|
+
`)}]}),he(null)}return R&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(bn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(Ze,{children:[r.jsx(et,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(yn,{size:14})})}),r.jsx(tt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(Ze,{children:[r.jsx(et,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(Cn,{size:14})})}),r.jsx(tt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(wn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=C.has(n.path),v=g?.path===n.path,ce=Pn(n.path,n.kind),ve=c&&Y.has(n.path);return r.jsx(Kr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:ve,fileVisual:Le(n.name),onSelect:()=>k(n),onOpen:()=>{c?Vt(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",we(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Pe(n)},n.path)}),!y&&T&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Fe>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Fe,Fe>=it?"+":""]})]}),F!==null&&F.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),F?.map(t=>{const n=t.split("/").pop()??t,o=Ne(t),{Icon:c,color:p}=Le(n),v=d===t;return r.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),P&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!P&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Le(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>Kt(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Br,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Gt(t)},children:r.jsx(vn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Yt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(jn,{language:Oe(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Xt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[w(qt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Oe(d)]})]})]}),r.jsx(or,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(sr,{deleteTarget:Te,deleteDirtyPaths:Qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Pe(null)},onConfirm:t=>{Dt(w,t)}})]})}export{Pa as FileExplorer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-BQePaVWj.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eK as C,c as f,j as c,as as j,r as d,n as p,bR as b,eL as v,eM as h}from"./index-
|
|
1
|
+
import{eK as C,c as f,j as c,as as j,r as d,n as p,bR as b,eL as v,eM as h}from"./index-BQePaVWj.js";import{L as N}from"./label-Bf57Edle.js";const D=C,g=d.createContext({}),E=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function L(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function w(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function R(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function y(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{D as F,L as a,P as b,y as c,E as d,w as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,H as Z,r as Y,j as i,B as ie,L as ge,ak as ue,am as ne,b as E,p as fe,ao as pe,ap as xe,e as le,q as se,t as O,K as oe,d6 as J,d7 as X,d8 as Q,as as he,Y as je,a3 as Se,av as ve,I as ae,cy as ze,cz as be,y as Ae,P as W,d9 as _e}from"./index-CMALBC-v.js";import{A as ye,b as Ce}from"./alert-CnmxLYRw.js";import{i as Oe}from"./XCircle-BpPG80mN.js";import{n as Ne}from"./LinkExternal01-CtNOOeZL.js";import{s as De}from"./XClose-DW7idjn0.js";import{u as we}from"./use-org-auth-client-Cu0_xvCB.js";import{u as Te}from"./use-debounced-autosave-DTkDy42k.js";import{A as Fe}from"./avatar-DPXyNBP8.js";import{I as re}from"./input-CjP4wQRD.js";import{d as ce,S as Pe,a as ke,b as Ee,c as Ie}from"./select-fEJ2CWnh.js";import{A as me}from"./agent-icon-xLXU6rvd.js";import{a as Le,i as Ve,e as Me}from"./constants-_08zpzmT.js";import{u as Re}from"./use-virtual-mcp-DMt0VXr_.js";import{b as $e}from"./agent-capabilities-C4tLW0Za.js";import{f as qe,i as Be,b as Ke,j as Ue}from"./use-organization-settings-h-vNu5dF.js";import{S as Ge}from"./switch-9lR-M49q.js";import{D as Qe}from"./domain-settings-DxS7w6w-.js";import{c as Ye,d as He,b as We,f as Ze,g as Je,e as Xe,a as et,A as tt}from"./alert-dialog-CvsZ6guw.js";import{R as it}from"./require-capability-Byjk0WDJ.js";import"./User01-DLfObf45.js";import"./Check-Cu-Awg_S.js";import"./ChevronDown-D1GCQiij.js";import"./ChevronUp-CrheBWdX.js";import"./AlertCircle-BYvQDEJ0.js";import"./Tool01-CawhE5Vv.js";import"./ArrowUp-B1UtGT45.js";import"./ArrowLeft-B-9nUwLX.js";import"./Tool02-DUb3PZH0.js";import"./TrendUp01-Cp69MjT_.js";import"./ZapSquare-Bs2nDJX-.js";import"./Users03-DgZSfmdp.js";import"./CheckCircle-C4O_1HW1.js";import"./ChevronRight-NcrFTq4Q.js";import"./ChevronSelectorVertical-DhZiWWo6.js";import"./DotsVertical-Dnc_qefX.js";import"./Stars02-Do7POkWd.js";import"./UserSquare-BjlZKgC9.js";import"./Copy01-DwPzyMCP.js";import"./CreditCard01-CqBwox93.js";import"./Download01-yzTeB8lR.js";import"./Settings02-KfyhGAo3.js";import"./Eye-rZWcM_sl.js";import"./FilterLines-BMCdm4O2.js";import"./Share07-BTlsc7Ng.js";import"./Globe01-CojEB28p.js";import"./Globe04-DohkS1yI.js";import"./SwitchHorizontal01-dwH3CFZl.js";import"./HardDrive-WahlW5wX.js";import"./Key01-Bx4K_S3Q.js";import"./LockUnlocked01-D_Q5BYhU.js";import"./LogOut01-BZABwyef.js";import"./Monitor01-7UTn7zVa.js";import"./Sun-knqgcKen.js";import"./Palette-BoChqeld.js";import"./Play-DNBU5rzE.js";import"./Plus-8T2afHEs.js";import"./SearchLg-6rfLixx5.js";import"./SearchMd-0vzqE1Pd.js";import"./Shield01-CPg5EmjN.js";import"./Stars01-CV6o6WbI.js";import"./Trash01-CZV6hVoi.js";import"./Upload01-AWrvzckN.js";import"./Users01-CQ3eFXvg.js";import"./Zap-Dzj3-lys.js";import"./use-mcp-client-CluZ1kcE.js";import"./auth-1R6gk2tO.js";import"./badge-CGCuo_-5.js";import"./access-gate-DZ_-IWJN.js";import"./capability-load-error-DnpJPSNM.js";function de(e){return`connect-banner-dismissed:${e}`}function st(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function nt(){const e=P.c(17),{org:t}=Z();let n;e[0]!==t.id?(n=()=>st(t.id),e[0]=t.id,e[1]=n):n=e[1];const[r,c]=Y.useState(n);if(r)return null;let a;e[2]!==t.id?(a=()=>{c(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=a):a=e[3];const g=a;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ne,{}),e[4]=m):m=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=o):o=e[5];let f;e[6]!==t.slug?(f={org:t.slug},e[6]=t.slug,e[7]=f):f=e[7];let s;e[8]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Oe,{size:12}),e[8]=s):s=e[8];let d;e[9]!==f?(d=i.jsx(ie,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:f,children:["Connect to clients ",s]})}),e[9]=f,e[10]=d):d=e[10];let l;e[11]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(De,{size:14}),e[11]=l):l=e[11];let u;e[12]!==g?(u=i.jsx(ie,{variant:"ghost",size:"icon",className:"size-7",onClick:g,"aria-label":"Dismiss",children:l}),e[12]=g,e[13]=u):u=e[13];let p;return e[14]!==d||e[15]!==u?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(Ce,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[o,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[d,u]})]})]}),e[14]=d,e[15]=u,e[16]=p):p=e[16],p}const ot=ue({name:ne().min(1,"Name is required").max(255,"Name is too long"),logo:ne().optional()});function at(e){const t=P.c(17),{value:n,onChange:r,name:c,disabled:a}=e,g=E(),m=Y.useRef(null);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>m.current?.click(),t[0]=o):o=t[0];const f=o;let s;t[1]!==r||t[2]!==g?(s=N=>{const x=N.target.files?.[0];if(!x)return;if(x.size>2097152){O.error(g("settings.organizationForm.imageTooLarge"));return}const h=new FileReader;h.onerror=()=>O.error(g("settings.organizationForm.failedToReadImage")),h.onloadend=()=>{h.result&&r(h.result),m.current&&(m.current.value="")},h.readAsDataURL(x)},t[1]=r,t[2]=g,t[3]=s):s=t[3];const d=s;let l;t[4]!==g?(l=g("settings.organizationForm.uploadLogoLabel"),t[4]=g,t[5]=l):l=t[5];let u;t[6]!==a||t[7]!==d?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:d,className:"hidden",disabled:a}),t[6]=a,t[7]=d,t[8]=u):u=t[8];const p=n||void 0,j=c??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Fe,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let z;return t[12]!==a||t[13]!==l||t[14]!==u||t[15]!==S?(z=i.jsxs("button",{type:"button",onClick:f,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":l,children:[u,S]}),t[12]=a,t[13]=l,t[14]=u,t[15]=S,t[16]=z):z=t[16],z}function lt(){const e=E(),{org:t}=Z(),n=we(),r=fe(),c=pe({resolver:xe(ot),values:{name:t.name??"",logo:t.logo??""}}),a=le({mutationFn:async s=>{const d={name:s.name};s.logo&&(d.logo=s.logo);const l=await n.organization.update({data:d});if(l?.error)throw new Error(l.error.message||e("settings.organizationForm.failedToUpdateOrg"));return l},onSuccess:(s,d)=>{se("organization_settings_updated",{organization_id:t.id,fields:Object.keys(d)}),r.invalidateQueries({queryKey:oe.organizations()}),r.invalidateQueries({queryKey:oe.activeOrganization(t.slug)}),O.success(e("settings.organizationForm.updateSuccess"))},onError:(s,d)=>{se("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(d),error:s instanceof Error?s.message:String(s)}),O.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:g,flush:m}=Te({save:async()=>{const s=c.control._formState.dirtyFields;if(Object.keys(s).length===0||!await c.trigger())return;const l=c.getValues(),u=c.control._defaultValues;c.reset(l,{keepValues:!0});try{await a.mutateAsync(l)}catch{c.reset(u,{keepValues:!0})}}}),o=c.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(J,{children:i.jsxs(X,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(at,{value:c.watch("logo"),onChange:s=>{c.setValue("logo",s??"",{shouldDirty:!0}),m()},name:c.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(he,{control:c.control,name:"name",render:({field:s})=>i.jsx(re,{id:"org-name",...s,onChange:d=>{s.onChange(d),g()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(o.name||o.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[o.name&&i.jsx("p",{className:"text-xs text-destructive",children:o.name.message}),o.logo&&i.jsx("p",{className:"text-xs text-destructive",children:o.logo.message})]})]})})}const te="__super_agent__";function rt(){const e=P.c(42),t=E(),{org:n}=Z(),r=Re(),{mainAgentId:c}=qe(),a=Be();let g,m,o,f,s,d,l,u;if(e[0]!==r||e[1]!==c||e[2]!==n.id||e[3]!==a||e[4]!==t){const S=$e(r),z=(r??[]).filter(dt).filter(v=>!S.has(v.id)).filter(mt);let N;e[13]!==n.id?(N=Le(n.id),e[13]=n.id,e[14]=N):N=e[14];const x=N,h=c!=null?(r??[]).find(v=>v.id===c):void 0,D=h?h.id:te,w=h&&!z.some(v=>v.id===h.id)?[h,...z]:z;let C;e[15]!==r||e[16]!==a||e[17]!==x.title||e[18]!==t?(C=v=>{const y=v===te?null:v,I=y===null?x.title:(r??[]).find(F=>F.id===y)?.title??"";a.mutate(y,{onSuccess:()=>O.success(y===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:I})),onError:()=>O.error(t("settings.mainAgent.errorToast"))})},e[15]=r,e[16]=a,e[17]=x.title,e[18]=t,e[19]=C):C=e[19];const T=C;m=Pe,s=D,d=T,l=a.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ke,{className:"w-full sm:w-[280px]",children:i.jsx(Ee,{})}),e[20]=u):u=e[20],g=Ie;let b;e[21]!==x.icon||e[22]!==x.title?(b=i.jsx(me,{icon:x.icon,name:x.title,size:"xs",className:"shrink-0"}),e[21]=x.icon,e[22]=x.title,e[23]=b):b=e[23];let A;e[24]!==t?(A=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=A):A=e[25];let _;e[26]!==A?(_=i.jsx("span",{className:"truncate",children:A}),e[26]=A,e[27]=_):_=e[27],e[28]!==_||e[29]!==b?(o=i.jsx(ce,{value:te,children:i.jsxs("span",{className:"flex items-center gap-2",children:[b,_]})}),e[28]=_,e[29]=b,e[30]=o):o=e[30],f=w.map(ct),e[0]=r,e[1]=c,e[2]=n.id,e[3]=a,e[4]=t,e[5]=g,e[6]=m,e[7]=o,e[8]=f,e[9]=s,e[10]=d,e[11]=l,e[12]=u}else g=e[5],m=e[6],o=e[7],f=e[8],s=e[9],d=e[10],l=e[11],u=e[12];let p;e[31]!==g||e[32]!==o||e[33]!==f?(p=i.jsxs(g,{children:[o,f]}),e[31]=g,e[32]=o,e[33]=f,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==s||e[37]!==d||e[38]!==l||e[39]!==u||e[40]!==p?(j=i.jsxs(m,{value:s,onValueChange:d,disabled:l,children:[u,p]}),e[35]=m,e[36]=s,e[37]=d,e[38]=l,e[39]=u,e[40]=p,e[41]=j):j=e[41],j}function ct(e){return i.jsx(ce,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(me,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function mt(e){return!Me(e.id)}function dt(e){return!Ve(e.id)}function gt(){const e=P.c(16),t=E();let n;e[0]!==t?(n=t("settings.mainAgent.title"),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==t?(r=t("settings.mainAgent.description"),e[2]=t,e[3]=r):r=e[3];let c;e[4]!==t?(c=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=c):c=e[5];let a;e[6]!==t?(a=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=a):a=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Y.Suspense,{fallback:i.jsx(je,{className:"h-9 w-[280px]"}),children:i.jsx(rt,{})}),e[8]=g):g=e[8];let m;e[9]!==c||e[10]!==a?(m=i.jsx(X,{children:i.jsx(Q,{title:c,description:a,action:g})}),e[9]=c,e[10]=a,e[11]=m):m=e[11];let o;return e[12]!==n||e[13]!==r||e[14]!==m?(o=i.jsx(J,{title:n,description:r,children:m}),e[12]=n,e[13]=r,e[14]=m,e[15]=o):o=e[15],o}function ut(){const e=P.c(27),t=E(),n=Ke(),r=Ue();let c;e[0]!==t?(c=t("settings.navigation.title"),e[0]=t,e[1]=c):c=e[1];let a;e[2]!==t?(a=t("settings.navigation.description"),e[2]=t,e[3]=a):a=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Se,{size:16}),e[4]=g):g=e[4];let m;e[5]!==t?(m=t("settings.navigation.navV2Title"),e[5]=t,e[6]=m):m=e[6];let o;e[7]!==t?(o=t("settings.navigation.navV2Description"),e[7]=t,e[8]=o):o=e[8];const f=r.isPending;let s;e[9]!==t?(s=t("settings.navigation.navV2Title"),e[9]=t,e[10]=s):s=e[10];let d;e[11]!==r||e[12]!==t?(d=j=>r.mutate("nav_v2",j,{onError:()=>O.error(t("settings.navigation.updateError"))}),e[11]=r,e[12]=t,e[13]=d):d=e[13];let l;e[14]!==n||e[15]!==r.isPending||e[16]!==s||e[17]!==d?(l=i.jsx(Ge,{checked:n,disabled:f,"aria-label":s,onCheckedChange:d}),e[14]=n,e[15]=r.isPending,e[16]=s,e[17]=d,e[18]=l):l=e[18];let u;e[19]!==m||e[20]!==o||e[21]!==l?(u=i.jsx(X,{children:i.jsx(Q,{icon:g,title:m,description:o,action:l})}),e[19]=m,e[20]=o,e[21]=l,e[22]=u):u=e[22];let p;return e[23]!==c||e[24]!==a||e[25]!==u?(p=i.jsx(J,{title:c,description:a,children:u}),e[23]=c,e[24]=a,e[25]=u,e[26]=p):p=e[26],p}function ft(){const e=P.c(86),t=E(),{org:n}=Z(),[r,c]=Y.useState(!1),[a,g]=Y.useState(""),m=ve();let o;e[0]!==n.id||e[1]!==m?(o=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=o):o=e[2];let f;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(f=()=>{se("organization_deleted",{organization_id:n.id}),localStorage.getItem(ae.lastOrgSlug())===n.slug&&localStorage.removeItem(ae.lastOrgSlug()),ze()?.org===n.slug&&be(),Ae(),O.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=f):f=e[6];let s;e[7]!==t?(s=k=>{O.error(k instanceof Error?k.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let d;e[9]!==o||e[10]!==f||e[11]!==s?(d={mutationFn:o,onSuccess:f,onError:s},e[9]=o,e[10]=f,e[11]=s,e[12]=d):d=e[12];const l=le(d);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>c(!0),e[21]=z):z=e[21];const N=l.isPending;let x;e[22]!==t?(x=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=x):x=e[23];let h;e[24]!==l.isPending||e[25]!==x?(h=i.jsx(ie,{variant:"destructive",size:"sm",onClick:z,disabled:N,children:x}),e[24]=l.isPending,e[25]=x,e[26]=h):h=e[26];let D;e[27]!==h||e[28]!==j||e[29]!==S?(D=i.jsx(X,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:h})}),e[27]=h,e[28]=j,e[29]=S,e[30]=D):D=e[30];let w;e[31]!==D||e[32]!==u||e[33]!==p?(w=i.jsx(J,{title:u,description:p,children:D}),e[31]=D,e[32]=u,e[33]=p,e[34]=w):w=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{c(k),k||g("")},e[35]=C):C=e[35];let T;e[36]!==t?(T=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=T):T=e[37];let b;e[38]!==T?(b=i.jsx(Ye,{children:T}),e[38]=T,e[39]=b):b=e[39];let A;e[40]!==n.name||e[41]!==t?(A=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=A):A=e[42];let _;e[43]!==A?(_=i.jsx("p",{children:A}),e[43]=A,e[44]=_):_=e[44];let v;e[45]!==n.name||e[46]!==t?(v=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=v):v=e[47];let y;e[48]!==v?(y=i.jsx("p",{className:"mt-3 mb-1.5",children:v}),e[48]=v,e[49]=y):y=e[49];let I;e[50]===Symbol.for("react.memo_cache_sentinel")?(I=k=>g(k.target.value),e[50]=I):I=e[50];let F;e[51]!==a||e[52]!==n.name?(F=i.jsx(re,{value:a,onChange:I,placeholder:n.name,autoFocus:!0}),e[51]=a,e[52]=n.name,e[53]=F):F=e[53];let L;e[54]!==_||e[55]!==y||e[56]!==F?(L=i.jsx(He,{asChild:!0,children:i.jsxs("div",{children:[_,y,F]})}),e[54]=_,e[55]=y,e[56]=F,e[57]=L):L=e[57];let V;e[58]!==b||e[59]!==L?(V=i.jsxs(We,{children:[b,L]}),e[58]=b,e[59]=L,e[60]=V):V=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let R;e[63]!==M?(R=i.jsx(Ze,{children:M}),e[63]=M,e[64]=R):R=e[64];let $;e[65]!==l?($=()=>l.mutate(),e[65]=l,e[66]=$):$=e[66];const ee=a!==n.name||l.isPending;let q;e[67]!==l.isPending||e[68]!==t?(q=l.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=l.isPending,e[68]=t,e[69]=q):q=e[69];let B;e[70]!==$||e[71]!==ee||e[72]!==q?(B=i.jsx(Je,{onClick:$,disabled:ee,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:q}),e[70]=$,e[71]=ee,e[72]=q,e[73]=B):B=e[73];let K;e[74]!==R||e[75]!==B?(K=i.jsxs(Xe,{children:[R,B]}),e[74]=R,e[75]=B,e[76]=K):K=e[76];let U;e[77]!==V||e[78]!==K?(U=i.jsxs(et,{children:[V,K]}),e[77]=V,e[78]=K,e[79]=U):U=e[79];let G;e[80]!==r||e[81]!==U?(G=i.jsx(tt,{open:r,onOpenChange:C,children:U}),e[80]=r,e[81]=U,e[82]=G):G=e[82];let H;return e[83]!==w||e[84]!==G?(H=i.jsxs(i.Fragment,{children:[w,G]}),e[83]=w,e[84]=G,e[85]=H):H=e[85],H}function pt(){const e=P.c(12),t=E();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==n?(r=i.jsx(W.Title,{children:n}),e[2]=n,e[3]=r):r=e[3];let c,a,g,m,o,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(nt,{}),a=i.jsx(lt,{}),g=i.jsx(gt,{}),m=i.jsx(ut,{}),o=i.jsx(Qe,{}),f=i.jsx(ft,{}),e[4]=c,e[5]=a,e[6]=g,e[7]=m,e[8]=o,e[9]=f):(c=e[4],a=e[5],g=e[6],m=e[7],o=e[8],f=e[9]);let s;return e[10]!==r?(s=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(_e,{children:[r,c,a,g,m,o,f]})})})}),e[10]=r,e[11]=s):s=e[11],s}function Ti(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(it,{capability:"org:manage",area:"general settings",children:i.jsx(pt,{})}),e[0]=t):t=e[0],t}export{Ti as default};
|
|
1
|
+
import{c as P,H as Z,r as Y,j as i,B as ie,L as ge,ak as ue,am as ne,b as E,p as fe,ao as pe,ap as xe,e as le,q as se,t as O,K as oe,d6 as J,d7 as X,d8 as Q,as as he,Y as je,a3 as Se,av as ve,I as ae,cy as ze,cz as be,y as Ae,P as W,d9 as _e}from"./index-BQePaVWj.js";import{A as ye,b as Ce}from"./alert-BBFxea8i.js";import{i as Oe}from"./XCircle-CX5QYkxV.js";import{n as Ne}from"./LinkExternal01-BpWEYJKm.js";import{s as De}from"./XClose-Bp2NfyqG.js";import{u as we}from"./use-org-auth-client-1D0ZnSiX.js";import{u as Te}from"./use-debounced-autosave-0RZhjF12.js";import{A as Fe}from"./avatar-CGf3Yvcx.js";import{I as re}from"./input-pNvYW_mm.js";import{d as ce,S as Pe,a as ke,b as Ee,c as Ie}from"./select-xTg7f2aJ.js";import{A as me}from"./agent-icon-Wzne0cy2.js";import{a as Le,i as Ve,e as Me}from"./constants-_08zpzmT.js";import{u as Re}from"./use-virtual-mcp-CC4XsHmF.js";import{b as $e}from"./agent-capabilities-C4tLW0Za.js";import{f as qe,i as Be,b as Ke,j as Ue}from"./use-organization-settings-JKD7u33z.js";import{S as Ge}from"./switch-CN-N-gzz.js";import{D as Qe}from"./domain-settings-CWawq4F5.js";import{c as Ye,d as He,b as We,f as Ze,g as Je,e as Xe,a as et,A as tt}from"./alert-dialog-DNxs3rMg.js";import{R as it}from"./require-capability-BuWK8Yk_.js";import"./User01-CnSrMlu1.js";import"./Check-BrKE9OB2.js";import"./ChevronDown-DFEG7MPA.js";import"./ChevronUp-Bw8Sz0nt.js";import"./AlertCircle-DYgdGYTv.js";import"./Tool01-D5-n2yHs.js";import"./ArrowUp-DPC6-aSI.js";import"./ArrowLeft-BATiZdpN.js";import"./Tool02-DnSW-Zkc.js";import"./TrendUp01-Bx_vv04M.js";import"./ZapSquare-BHoqLDj7.js";import"./Users03-D1tfQh9e.js";import"./CheckCircle-BBP9kMUK.js";import"./ChevronRight-BQSOrRZI.js";import"./ChevronSelectorVertical-CYl2vYgB.js";import"./DotsVertical-BZlCy-sD.js";import"./Stars02-BUQX9K5W.js";import"./UserSquare-BaATFFz9.js";import"./Copy01-BP5ZeQhZ.js";import"./CreditCard01-BBCeVJFk.js";import"./Download01-CQmv2LAE.js";import"./Settings02-DKjr2o3l.js";import"./Eye-BmtNB9GI.js";import"./FilterLines-DItgB1py.js";import"./Share07-Dr1p2Ged.js";import"./Globe01-BP1ofKkh.js";import"./Globe04-B1LnAHXc.js";import"./SwitchHorizontal01-BitapUZ-.js";import"./HardDrive-BuB-WbPW.js";import"./Key01-lS9FRzOH.js";import"./LockUnlocked01-DA9lO-kT.js";import"./LogOut01-BoMH6mum.js";import"./Monitor01-C4Wwm_hh.js";import"./Sun-dBDvqCx1.js";import"./Palette-Duvy-7Op.js";import"./Play-Dh0ic-Gg.js";import"./Plus-CD2C3H1x.js";import"./SearchLg-BSXC7LTk.js";import"./SearchMd-CJj5MHgM.js";import"./Shield01--03ik0Sp.js";import"./Stars01-DRTG_5t2.js";import"./Trash01-CC-Kmq2_.js";import"./Upload01-BCtdfGgP.js";import"./Users01-ZxOiHteR.js";import"./Zap-BYID1TcD.js";import"./use-mcp-client-D4aHy3t4.js";import"./auth-DVeqzlrO.js";import"./badge-MzlTYwLU.js";import"./access-gate-nlEqwcs0.js";import"./capability-load-error-Bk3XaMP4.js";function de(e){return`connect-banner-dismissed:${e}`}function st(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function nt(){const e=P.c(17),{org:t}=Z();let n;e[0]!==t.id?(n=()=>st(t.id),e[0]=t.id,e[1]=n):n=e[1];const[r,c]=Y.useState(n);if(r)return null;let a;e[2]!==t.id?(a=()=>{c(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=a):a=e[3];const g=a;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ne,{}),e[4]=m):m=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=o):o=e[5];let f;e[6]!==t.slug?(f={org:t.slug},e[6]=t.slug,e[7]=f):f=e[7];let s;e[8]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Oe,{size:12}),e[8]=s):s=e[8];let d;e[9]!==f?(d=i.jsx(ie,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ge,{to:"/$org/settings/connect",params:f,children:["Connect to clients ",s]})}),e[9]=f,e[10]=d):d=e[10];let l;e[11]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(De,{size:14}),e[11]=l):l=e[11];let u;e[12]!==g?(u=i.jsx(ie,{variant:"ghost",size:"icon",className:"size-7",onClick:g,"aria-label":"Dismiss",children:l}),e[12]=g,e[13]=u):u=e[13];let p;return e[14]!==d||e[15]!==u?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(Ce,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[o,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[d,u]})]})]}),e[14]=d,e[15]=u,e[16]=p):p=e[16],p}const ot=ue({name:ne().min(1,"Name is required").max(255,"Name is too long"),logo:ne().optional()});function at(e){const t=P.c(17),{value:n,onChange:r,name:c,disabled:a}=e,g=E(),m=Y.useRef(null);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>m.current?.click(),t[0]=o):o=t[0];const f=o;let s;t[1]!==r||t[2]!==g?(s=N=>{const x=N.target.files?.[0];if(!x)return;if(x.size>2097152){O.error(g("settings.organizationForm.imageTooLarge"));return}const h=new FileReader;h.onerror=()=>O.error(g("settings.organizationForm.failedToReadImage")),h.onloadend=()=>{h.result&&r(h.result),m.current&&(m.current.value="")},h.readAsDataURL(x)},t[1]=r,t[2]=g,t[3]=s):s=t[3];const d=s;let l;t[4]!==g?(l=g("settings.organizationForm.uploadLogoLabel"),t[4]=g,t[5]=l):l=t[5];let u;t[6]!==a||t[7]!==d?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:d,className:"hidden",disabled:a}),t[6]=a,t[7]=d,t[8]=u):u=t[8];const p=n||void 0,j=c??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Fe,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let z;return t[12]!==a||t[13]!==l||t[14]!==u||t[15]!==S?(z=i.jsxs("button",{type:"button",onClick:f,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":l,children:[u,S]}),t[12]=a,t[13]=l,t[14]=u,t[15]=S,t[16]=z):z=t[16],z}function lt(){const e=E(),{org:t}=Z(),n=we(),r=fe(),c=pe({resolver:xe(ot),values:{name:t.name??"",logo:t.logo??""}}),a=le({mutationFn:async s=>{const d={name:s.name};s.logo&&(d.logo=s.logo);const l=await n.organization.update({data:d});if(l?.error)throw new Error(l.error.message||e("settings.organizationForm.failedToUpdateOrg"));return l},onSuccess:(s,d)=>{se("organization_settings_updated",{organization_id:t.id,fields:Object.keys(d)}),r.invalidateQueries({queryKey:oe.organizations()}),r.invalidateQueries({queryKey:oe.activeOrganization(t.slug)}),O.success(e("settings.organizationForm.updateSuccess"))},onError:(s,d)=>{se("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(d),error:s instanceof Error?s.message:String(s)}),O.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:g,flush:m}=Te({save:async()=>{const s=c.control._formState.dirtyFields;if(Object.keys(s).length===0||!await c.trigger())return;const l=c.getValues(),u=c.control._defaultValues;c.reset(l,{keepValues:!0});try{await a.mutateAsync(l)}catch{c.reset(u,{keepValues:!0})}}}),o=c.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(J,{children:i.jsxs(X,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(at,{value:c.watch("logo"),onChange:s=>{c.setValue("logo",s??"",{shouldDirty:!0}),m()},name:c.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(he,{control:c.control,name:"name",render:({field:s})=>i.jsx(re,{id:"org-name",...s,onChange:d=>{s.onChange(d),g()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(o.name||o.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[o.name&&i.jsx("p",{className:"text-xs text-destructive",children:o.name.message}),o.logo&&i.jsx("p",{className:"text-xs text-destructive",children:o.logo.message})]})]})})}const te="__super_agent__";function rt(){const e=P.c(42),t=E(),{org:n}=Z(),r=Re(),{mainAgentId:c}=qe(),a=Be();let g,m,o,f,s,d,l,u;if(e[0]!==r||e[1]!==c||e[2]!==n.id||e[3]!==a||e[4]!==t){const S=$e(r),z=(r??[]).filter(dt).filter(v=>!S.has(v.id)).filter(mt);let N;e[13]!==n.id?(N=Le(n.id),e[13]=n.id,e[14]=N):N=e[14];const x=N,h=c!=null?(r??[]).find(v=>v.id===c):void 0,D=h?h.id:te,w=h&&!z.some(v=>v.id===h.id)?[h,...z]:z;let C;e[15]!==r||e[16]!==a||e[17]!==x.title||e[18]!==t?(C=v=>{const y=v===te?null:v,I=y===null?x.title:(r??[]).find(F=>F.id===y)?.title??"";a.mutate(y,{onSuccess:()=>O.success(y===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:I})),onError:()=>O.error(t("settings.mainAgent.errorToast"))})},e[15]=r,e[16]=a,e[17]=x.title,e[18]=t,e[19]=C):C=e[19];const T=C;m=Pe,s=D,d=T,l=a.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ke,{className:"w-full sm:w-[280px]",children:i.jsx(Ee,{})}),e[20]=u):u=e[20],g=Ie;let b;e[21]!==x.icon||e[22]!==x.title?(b=i.jsx(me,{icon:x.icon,name:x.title,size:"xs",className:"shrink-0"}),e[21]=x.icon,e[22]=x.title,e[23]=b):b=e[23];let A;e[24]!==t?(A=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=A):A=e[25];let _;e[26]!==A?(_=i.jsx("span",{className:"truncate",children:A}),e[26]=A,e[27]=_):_=e[27],e[28]!==_||e[29]!==b?(o=i.jsx(ce,{value:te,children:i.jsxs("span",{className:"flex items-center gap-2",children:[b,_]})}),e[28]=_,e[29]=b,e[30]=o):o=e[30],f=w.map(ct),e[0]=r,e[1]=c,e[2]=n.id,e[3]=a,e[4]=t,e[5]=g,e[6]=m,e[7]=o,e[8]=f,e[9]=s,e[10]=d,e[11]=l,e[12]=u}else g=e[5],m=e[6],o=e[7],f=e[8],s=e[9],d=e[10],l=e[11],u=e[12];let p;e[31]!==g||e[32]!==o||e[33]!==f?(p=i.jsxs(g,{children:[o,f]}),e[31]=g,e[32]=o,e[33]=f,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==s||e[37]!==d||e[38]!==l||e[39]!==u||e[40]!==p?(j=i.jsxs(m,{value:s,onValueChange:d,disabled:l,children:[u,p]}),e[35]=m,e[36]=s,e[37]=d,e[38]=l,e[39]=u,e[40]=p,e[41]=j):j=e[41],j}function ct(e){return i.jsx(ce,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(me,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function mt(e){return!Me(e.id)}function dt(e){return!Ve(e.id)}function gt(){const e=P.c(16),t=E();let n;e[0]!==t?(n=t("settings.mainAgent.title"),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==t?(r=t("settings.mainAgent.description"),e[2]=t,e[3]=r):r=e[3];let c;e[4]!==t?(c=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=c):c=e[5];let a;e[6]!==t?(a=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=a):a=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Y.Suspense,{fallback:i.jsx(je,{className:"h-9 w-[280px]"}),children:i.jsx(rt,{})}),e[8]=g):g=e[8];let m;e[9]!==c||e[10]!==a?(m=i.jsx(X,{children:i.jsx(Q,{title:c,description:a,action:g})}),e[9]=c,e[10]=a,e[11]=m):m=e[11];let o;return e[12]!==n||e[13]!==r||e[14]!==m?(o=i.jsx(J,{title:n,description:r,children:m}),e[12]=n,e[13]=r,e[14]=m,e[15]=o):o=e[15],o}function ut(){const e=P.c(27),t=E(),n=Ke(),r=Ue();let c;e[0]!==t?(c=t("settings.navigation.title"),e[0]=t,e[1]=c):c=e[1];let a;e[2]!==t?(a=t("settings.navigation.description"),e[2]=t,e[3]=a):a=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Se,{size:16}),e[4]=g):g=e[4];let m;e[5]!==t?(m=t("settings.navigation.navV2Title"),e[5]=t,e[6]=m):m=e[6];let o;e[7]!==t?(o=t("settings.navigation.navV2Description"),e[7]=t,e[8]=o):o=e[8];const f=r.isPending;let s;e[9]!==t?(s=t("settings.navigation.navV2Title"),e[9]=t,e[10]=s):s=e[10];let d;e[11]!==r||e[12]!==t?(d=j=>r.mutate("nav_v2",j,{onError:()=>O.error(t("settings.navigation.updateError"))}),e[11]=r,e[12]=t,e[13]=d):d=e[13];let l;e[14]!==n||e[15]!==r.isPending||e[16]!==s||e[17]!==d?(l=i.jsx(Ge,{checked:n,disabled:f,"aria-label":s,onCheckedChange:d}),e[14]=n,e[15]=r.isPending,e[16]=s,e[17]=d,e[18]=l):l=e[18];let u;e[19]!==m||e[20]!==o||e[21]!==l?(u=i.jsx(X,{children:i.jsx(Q,{icon:g,title:m,description:o,action:l})}),e[19]=m,e[20]=o,e[21]=l,e[22]=u):u=e[22];let p;return e[23]!==c||e[24]!==a||e[25]!==u?(p=i.jsx(J,{title:c,description:a,children:u}),e[23]=c,e[24]=a,e[25]=u,e[26]=p):p=e[26],p}function ft(){const e=P.c(86),t=E(),{org:n}=Z(),[r,c]=Y.useState(!1),[a,g]=Y.useState(""),m=ve();let o;e[0]!==n.id||e[1]!==m?(o=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=o):o=e[2];let f;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(f=()=>{se("organization_deleted",{organization_id:n.id}),localStorage.getItem(ae.lastOrgSlug())===n.slug&&localStorage.removeItem(ae.lastOrgSlug()),ze()?.org===n.slug&&be(),Ae(),O.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=f):f=e[6];let s;e[7]!==t?(s=k=>{O.error(k instanceof Error?k.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let d;e[9]!==o||e[10]!==f||e[11]!==s?(d={mutationFn:o,onSuccess:f,onError:s},e[9]=o,e[10]=f,e[11]=s,e[12]=d):d=e[12];const l=le(d);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=()=>c(!0),e[21]=z):z=e[21];const N=l.isPending;let x;e[22]!==t?(x=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=x):x=e[23];let h;e[24]!==l.isPending||e[25]!==x?(h=i.jsx(ie,{variant:"destructive",size:"sm",onClick:z,disabled:N,children:x}),e[24]=l.isPending,e[25]=x,e[26]=h):h=e[26];let D;e[27]!==h||e[28]!==j||e[29]!==S?(D=i.jsx(X,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:h})}),e[27]=h,e[28]=j,e[29]=S,e[30]=D):D=e[30];let w;e[31]!==D||e[32]!==u||e[33]!==p?(w=i.jsx(J,{title:u,description:p,children:D}),e[31]=D,e[32]=u,e[33]=p,e[34]=w):w=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{c(k),k||g("")},e[35]=C):C=e[35];let T;e[36]!==t?(T=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=T):T=e[37];let b;e[38]!==T?(b=i.jsx(Ye,{children:T}),e[38]=T,e[39]=b):b=e[39];let A;e[40]!==n.name||e[41]!==t?(A=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=A):A=e[42];let _;e[43]!==A?(_=i.jsx("p",{children:A}),e[43]=A,e[44]=_):_=e[44];let v;e[45]!==n.name||e[46]!==t?(v=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=v):v=e[47];let y;e[48]!==v?(y=i.jsx("p",{className:"mt-3 mb-1.5",children:v}),e[48]=v,e[49]=y):y=e[49];let I;e[50]===Symbol.for("react.memo_cache_sentinel")?(I=k=>g(k.target.value),e[50]=I):I=e[50];let F;e[51]!==a||e[52]!==n.name?(F=i.jsx(re,{value:a,onChange:I,placeholder:n.name,autoFocus:!0}),e[51]=a,e[52]=n.name,e[53]=F):F=e[53];let L;e[54]!==_||e[55]!==y||e[56]!==F?(L=i.jsx(He,{asChild:!0,children:i.jsxs("div",{children:[_,y,F]})}),e[54]=_,e[55]=y,e[56]=F,e[57]=L):L=e[57];let V;e[58]!==b||e[59]!==L?(V=i.jsxs(We,{children:[b,L]}),e[58]=b,e[59]=L,e[60]=V):V=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let R;e[63]!==M?(R=i.jsx(Ze,{children:M}),e[63]=M,e[64]=R):R=e[64];let $;e[65]!==l?($=()=>l.mutate(),e[65]=l,e[66]=$):$=e[66];const ee=a!==n.name||l.isPending;let q;e[67]!==l.isPending||e[68]!==t?(q=l.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=l.isPending,e[68]=t,e[69]=q):q=e[69];let B;e[70]!==$||e[71]!==ee||e[72]!==q?(B=i.jsx(Je,{onClick:$,disabled:ee,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:q}),e[70]=$,e[71]=ee,e[72]=q,e[73]=B):B=e[73];let K;e[74]!==R||e[75]!==B?(K=i.jsxs(Xe,{children:[R,B]}),e[74]=R,e[75]=B,e[76]=K):K=e[76];let U;e[77]!==V||e[78]!==K?(U=i.jsxs(et,{children:[V,K]}),e[77]=V,e[78]=K,e[79]=U):U=e[79];let G;e[80]!==r||e[81]!==U?(G=i.jsx(tt,{open:r,onOpenChange:C,children:U}),e[80]=r,e[81]=U,e[82]=G):G=e[82];let H;return e[83]!==w||e[84]!==G?(H=i.jsxs(i.Fragment,{children:[w,G]}),e[83]=w,e[84]=G,e[85]=H):H=e[85],H}function pt(){const e=P.c(12),t=E();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let r;e[2]!==n?(r=i.jsx(W.Title,{children:n}),e[2]=n,e[3]=r):r=e[3];let c,a,g,m,o,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(nt,{}),a=i.jsx(lt,{}),g=i.jsx(gt,{}),m=i.jsx(ut,{}),o=i.jsx(Qe,{}),f=i.jsx(ft,{}),e[4]=c,e[5]=a,e[6]=g,e[7]=m,e[8]=o,e[9]=f):(c=e[4],a=e[5],g=e[6],m=e[7],o=e[8],f=e[9]);let s;return e[10]!==r?(s=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(_e,{children:[r,c,a,g,m,o,f]})})})}),e[10]=r,e[11]=s):s=e[11],s}function Ti(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(it,{capability:"org:manage",area:"general settings",children:i.jsx(pt,{})}),e[0]=t):t=e[0],t}export{Ti as default};
|
package/dist/client/assets/{github-repo-picker-BebzrN3W.js → github-repo-picker-DEHCU2yM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,j as t,H as de,a as ye,p as me,r as H,aP as le,b as ee,k as Z,e as ge,t as te,eO as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-CMALBC-v.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-06THKDmm.js";import{C as Te}from"./collection-search-CSSjKy7f.js";import{u as _e}from"./use-debounced-value-DbRRK9TT.js";import{b as he,u as Ee}from"./use-connection-DT2B_DYi.js";import{u as ne}from"./use-mcp-client-CluZ1kcE.js";import{W as Ae,S as pe}from"./constants-_08zpzmT.js";import{a as be}from"./authenticate-and-persist-oauth-CZZKLfUR.js";import{i as ue}from"./ArrowLeft-B-9nUwLX.js";import{n as ze}from"./LinkExternal01-CtNOOeZL.js";import{n as Le}from"./LockUnlocked01-D_Q5BYhU.js";import{u as Ge}from"./use-mcp-tools-Bn-w9dls.js";import{e as Oe}from"./extract-connection-data-42ShpRyJ.js";import{c as Fe}from"./use-navigate-to-agent-NiTIdPbN.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
|
|
1
|
+
import{c as M,j as t,H as de,a as ye,p as me,r as H,aP as le,b as ee,k as Z,e as ge,t as te,eO as Ne,K as se,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-BQePaVWj.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-hjPI7Hcn.js";import{C as Te}from"./collection-search-BX3HN7Ay.js";import{u as _e}from"./use-debounced-value-CnJPaG7r.js";import{b as he,u as Ee}from"./use-connection-BYWAYSsl.js";import{u as ne}from"./use-mcp-client-D4aHy3t4.js";import{W as Ae,S as pe}from"./constants-_08zpzmT.js";import{a as be}from"./authenticate-and-persist-oauth-CQj3V1Hb.js";import{i as ue}from"./ArrowLeft-BATiZdpN.js";import{n as ze}from"./LinkExternal01-BpWEYJKm.js";import{n as Le}from"./LockUnlocked01-DA9lO-kT.js";import{u as Ge}from"./use-mcp-tools-CP0mpOwy.js";import{e as Oe}from"./extract-connection-data-58OR1XXQ.js";import{c as Fe}from"./use-navigate-to-agent-ByVyc96q.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=x):x=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:x}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function $e(C,e){const n=M.c(12),{org:l}=de();let x;n[0]!==l.id?(x=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=x):x=n[1];const o=x;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let k;return n[8]!==r||n[9]!==s||n[10]!==u?(k={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=k):k=n[11],Ge(k)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),x=me(),[o,a]=H.useState("idle"),[r,s]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=$e(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(v,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:h}=await l.create.mutateAsync(c);a("authenticating");const y=await be({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:g=>l.update.mutateAsync({id:h,data:{connection_token:g}}).then(()=>{})});if(y.ran&&!y.ok){try{await l.delete.mutateAsync(h)}catch{}throw new Error(y.error&&y.error!=="no token received"?y.error:"No token received from GitHub")}le(x,e.id),k(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function mt(C){const e=M.c(27),{open:n,onOpenChange:l,title:x,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==x?(u=x??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=x,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==v||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:n,onComplete:c,selectedInstallation:v,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=v,e[17]=c,e[18]=b):b=e[18];let h;e[19]!==f||e[20]!==d||e[21]!==b?(h=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=h):h=e[22];let y;return e[23]!==l||e[24]!==n||e[25]!==h?(y=t.jsx(Ie,{open:n,onOpenChange:l,children:h}),e[23]=l,e[24]=n,e[25]=h,e[26]=y):y=e[26],y}function qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:x,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),h=async(i,j)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:j}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},y=(i,j)=>{Promise.all([h(j,"AGENTS.md"),h(j,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},g=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const j=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:j,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:j,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:N,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:j,connectionId:N,item:I})=>{if(o==="connection"||!i||!I){if(le(s,r.id),Ne(s,r.id),x){x({virtualMcpId:null,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.addedRepo",{name:j.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),y(i,j),x){x({virtualMcpId:i,repo:j,connectionId:N});return}te.success(a("common.githubRepoPicker.importedRepo",{name:j.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,j)=>{console.error("GitHub import failed:",i);const N=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(j.fork&&N.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:j.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>v(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>g.mutate(i),isSaving:g.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:x,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==x?(u={connectionId:pe,orgId:l,orgSlug:x},e[0]=l,e[1]=x,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==k?(d=()=>He(p=>k.callTool(p),n),e[6]=n,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==v?(b=async()=>{const p=await be({connectionId:n,orgId:l,orgSlug:x,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(p.ran&&!p.ok)throw new Error(p.error??"no token received");const S=new URL(`/api/${x}/mcp/${n}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=x,e[17]=v,e[18]=b):b=e[18];let h;e[19]!==s?(h=p=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:p instanceof Error?p.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=h):h=e[20];let y;e[21]!==b||e[22]!==h?(y={mutationFn:b,onError:h},e[21]=b,e[22]=h,e[23]=y):y=e[23];const g=ge(y);if(c.isLoading){let p;return e[24]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=p):p=e[24],p}if(c.isError){let p;e[25]!==s?(p=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=p):p=e[26];let S;e[27]!==p?(S=t.jsx("p",{className:"text-sm text-destructive",children:p}),e[27]=p,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==g?(z=()=>g.mutate(),e[33]=g,e[34]=z):z=e[34];const $=g.isPending;let L;e[35]!==g.isPending?(L=g.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=g.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==g.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:$,children:[L,G]}),e[39]=g.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let p;e[48]!==r||e[49]!==a||e[50]!==s?(p=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=p):p=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let $;e[58]!==s?($=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=$):$=e[59];let L;e[60]!==$?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:$}),e[60]=$,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==p?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p,X]}),e[95]=X,e[96]=p,e[97]=oe):oe=e[97],oe}let j;e[98]!==r||e[99]!==a||e[100]!==s?(j=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=j):j=e[101];let N;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let p;e[106]!==o||e[107]!==s?(p=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=p):p=e[108],N=i.installations.map(p),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==j?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[j,I,_]}),e[120]=I,e[121]=_,e[122]=j,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:x,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=h):h=e[8];let y;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==x?(y=t.jsx(H.Suspense,{fallback:h,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:x,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=x,e[16]=y):y=e[16];let g;e[17]!==b||e[18]!==y?(g=t.jsx("div",{className:b,children:y}),e[17]=b,e[18]=y,e[19]=g):g=e[19];let i;return e[20]!==m||e[21]!==g?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,g]}),e[20]=m,e[21]=g,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:x,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let k;e[0]!==n||e[1]!==l||e[2]!==x?(k={connectionId:n,orgId:l,orgSlug:x},e[0]=n,e[1]=l,e[2]=x,e[3]=k):k=e[3];const v=ne(k),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async g=>{const{signal:i}=g,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let g;e[15]!==u?(g=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=g):g=e[16];let i;e[17]!==g?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[17]=g,e[18]=i):i=e[18];let j;e[19]!==a||e[20]!==u?(j=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=j):j=e[21];let N;return e[22]!==i||e[23]!==j?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,j]}),e[22]=i,e[23]=j,e[24]=N):N=e[24],N}let h;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let g;e[30]!==s||e[31]!==r||e[32]!==u?(g=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=g):g=e[33],h=b.map(g),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=h}else h=e[29];let y;return e[34]!==h?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:h}),e[34]=h,e[35]=y):y=e[35],y}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:x}=C,o=ee();if(n==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let p;e[15]!==x||e[16]!==F?(p=t.jsx("button",{type:"button",onClick:x,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=x,e[16]=F,e[17]=p):p=e[17];let S;return e[18]!==_||e[19]!==p?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,p]}),e[18]=_,e[19]=p,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==a||e[29]!==o?(v=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let h;e[40]!==b?(h=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=h):h=e[41];let y;e[42]!==h?(y=t.jsx("span",{className:h}),e[42]=h,e[43]=y):y=e[43];let g;e[44]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=g):g=e[44];let i;e[45]!==c||e[46]!==y?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,g]}),e[45]=c,e[46]=y,e[47]=i):i=e[47];let j;return e[48]!==i||e[49]!==f?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=j):j=e[50],j}export{D as G,mt as a,Be as b,$e as u};
|