decocms 4.319.4 → 4.319.6
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-uCFwUT4D.js → AlertCircle-DPUOoh5j.js} +1 -1
- package/dist/client/assets/{AreaChart-CvCIlFBg.js → AreaChart-CR1kK7Z6.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CyFw_ZAc.js → ArrowLeft-BUTpr7Zk.js} +1 -1
- package/dist/client/assets/{ArrowUp-HON1SXj9.js → ArrowUp-CORHojmg.js} +1 -1
- package/dist/client/assets/{Check-dMF9hfDW.js → Check-CZ_g5EHO.js} +1 -1
- package/dist/client/assets/{CheckCircle-CJU10mQs.js → CheckCircle-B_Jj98KC.js} +1 -1
- package/dist/client/assets/{ChevronDown-_zHtp2mi.js → ChevronDown-Bt6RPgee.js} +1 -1
- package/dist/client/assets/{ChevronRight-mg1CozRX.js → ChevronRight-CNbZXCEK.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-qKYq7QdT.js → ChevronSelectorVertical-8rrSZwTz.js} +1 -1
- package/dist/client/assets/{ChevronUp-BY_jPS3y.js → ChevronUp-DkUmlK9q.js} +1 -1
- package/dist/client/assets/{Copy01-D4DKkrNa.js → Copy01-HfyvilSG.js} +1 -1
- package/dist/client/assets/{CreditCard01-BzXZ70FC.js → CreditCard01-BpsRcf0P.js} +1 -1
- package/dist/client/assets/{DotsVertical-DIrSgn8J.js → DotsVertical-Cvjwtvf0.js} +1 -1
- package/dist/client/assets/{Download01-Br2q00Km.js → Download01-BDdx-x6g.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-hj7X_ofB.js → ErrorBarContext-Bqlq569z.js} +1 -1
- package/dist/client/assets/{Eye-BawWrBSR.js → Eye-DsnJ6Hdj.js} +1 -1
- package/dist/client/assets/{FilterLines-CWv0gwTq.js → FilterLines-BUA3zaBV.js} +1 -1
- package/dist/client/assets/{GitBranch01-BHQWjDQ8.js → GitBranch01-B2HQZMnv.js} +1 -1
- package/dist/client/assets/{Globe01-2G4S7hap.js → Globe01-Bi3FrG4r.js} +1 -1
- package/dist/client/assets/{Globe04-dte6e3Tn.js → Globe04-R1k9PcJw.js} +1 -1
- package/dist/client/assets/{HardDrive-D8NpBmYZ.js → HardDrive-Ckf8POt4.js} +1 -1
- package/dist/client/assets/{Image01-BcfWbfgs.js → Image01-CdSDKzEr.js} +1 -1
- package/dist/client/assets/{Key01-zcL3Jetr.js → Key01-vZqkEk7C.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CowmNsE8.js → LinkExternal01-CvJ65RHZ.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-B42moyHj.js → LockUnlocked01-6p9kTpAw.js} +1 -1
- package/dist/client/assets/{LogOut01-pQssVOeo.js → LogOut01-BKqqcMKc.js} +1 -1
- package/dist/client/assets/{Monitor01-BisokFUR.js → Monitor01-CB7YoX25.js} +1 -1
- package/dist/client/assets/{Package-DqE8AAiL.js → Package-Bnouug7j.js} +1 -1
- package/dist/client/assets/{Palette-BIg2FmR0.js → Palette-CCm7KdHj.js} +1 -1
- package/dist/client/assets/{Play-CE83iAVt.js → Play-D7lbeUou.js} +1 -1
- package/dist/client/assets/{Plus-6fDaqupl.js → Plus-N25KFjkP.js} +1 -1
- package/dist/client/assets/{SearchLg-DwCjVmxR.js → SearchLg-CHXkkIcP.js} +1 -1
- package/dist/client/assets/{SearchMd-CrGhreLP.js → SearchMd-BVz5rgMO.js} +1 -1
- package/dist/client/assets/{Sector-CeUe5N4F.js → Sector-D9JRVcKv.js} +1 -1
- package/dist/client/assets/{Settings02-BWYsBVvl.js → Settings02-JGeGuLpa.js} +1 -1
- package/dist/client/assets/{Share07-CAWy1Jc2.js → Share07-BaE_VewM.js} +1 -1
- package/dist/client/assets/{Shield01-DEbNpm3q.js → Shield01-D_0zBkw-.js} +1 -1
- package/dist/client/assets/{Stars01-viLOjXnm.js → Stars01-Bm9KpsQB.js} +1 -1
- package/dist/client/assets/{Stars02-CkhejPZU.js → Stars02-BSN_fShX.js} +1 -1
- package/dist/client/assets/{Sun-BzDP5Wkc.js → Sun-CTLZrmxP.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DaHl0WJE.js → SwitchHorizontal01-CU4u2Mx3.js} +1 -1
- package/dist/client/assets/{Tool01-Bpm7pW3l.js → Tool01-6i_1iF0I.js} +1 -1
- package/dist/client/assets/{Tool02-D8DKruBK.js → Tool02-CdWdC_dA.js} +1 -1
- package/dist/client/assets/{Trash01-Dy3MdYJw.js → Trash01-DeEhE87T.js} +1 -1
- package/dist/client/assets/{TrendUp01-B6tyfzkz.js → TrendUp01-HQV90qh_.js} +1 -1
- package/dist/client/assets/{Upload01-NxuWdNFJ.js → Upload01-a-uHONMh.js} +1 -1
- package/dist/client/assets/{User01-DqbtX0Mm.js → User01-BzW7liSD.js} +1 -1
- package/dist/client/assets/{UserSquare-CrW5dbk9.js → UserSquare-BIJUhRq9.js} +1 -1
- package/dist/client/assets/{Users01-De14zlGQ.js → Users01-DHt_zj2k.js} +1 -1
- package/dist/client/assets/{Users03-Cwu3MDED.js → Users03-B7JMwHdE.js} +1 -1
- package/dist/client/assets/{XCircle-D6rPTffO.js → XCircle-DGpjgsOa.js} +1 -1
- package/dist/client/assets/{XClose-DAdaIat-.js → XClose-CcgBecn5.js} +1 -1
- package/dist/client/assets/{YAxis-CFhChfMS.js → YAxis-DHEFEMNz.js} +1 -1
- package/dist/client/assets/{Zap-xbaG-vsx.js → Zap-phia53Nn.js} +1 -1
- package/dist/client/assets/{ZapSquare-ChUgXei6.js → ZapSquare-C-dg-H1S.js} +1 -1
- package/dist/client/assets/{ZoomOut-Cp6Wgfdk.js → ZoomOut-B0fwcMBQ.js} +1 -1
- package/dist/client/assets/{access-gate-B9jtqZ9Q.js → access-gate-C2CuQeuA.js} +1 -1
- package/dist/client/assets/agent-capabilities-BxGDQyCw.js +1 -0
- package/dist/client/assets/{agent-icon-BNiFw9pa.js → agent-icon-DBchm6Nb.js} +1 -1
- package/dist/client/assets/agents-list-CpKsJdN9.js +1 -0
- package/dist/client/assets/{ai-providers-XTs9MTV4.js → ai-providers-CwzG1Suk.js} +1 -1
- package/dist/client/assets/{alert-dialog-Z5MegBZ1.js → alert-dialog-sgAetjem.js} +1 -1
- package/dist/client/assets/{alert-DHJpYb4r.js → alert-q_9y674t.js} +1 -1
- package/dist/client/assets/{analytics-tab-tt3xQ4pR.js → analytics-tab-B3DNh-qY.js} +1 -1
- package/dist/client/assets/{api-keys-DYJY5_2D.js → api-keys-B89ICCUP.js} +1 -1
- package/dist/client/assets/app-editor-fuCtyplA.js +1 -0
- package/dist/client/assets/{auth-B6GdneuP.js → auth-C0jQaNGd.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dg6sQu1t.js → auth-catchall-BuJcfhXs.js} +1 -1
- package/dist/client/assets/{auth-entry-_WTW6q5j.js → auth-entry-O5b5_3Z2.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CAkbUBYi.js → auth-split-layout-CivnsjUE.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DXXPr2mQ.js → authenticate-and-persist-oauth-B_ddEMoN.js} +1 -1
- package/dist/client/assets/{automation-list-row-Od3Jv2FA.js → automation-list-row-CGDHAky9.js} +1 -1
- package/dist/client/assets/{automation-runs-agJj8KWb.js → automation-runs-D6YBL96p.js} +1 -1
- package/dist/client/assets/automations-CPRNSbP-.js +1 -0
- package/dist/client/assets/{avatar-CHBxqpBG.js → avatar-DLQUtbSd.js} +1 -1
- package/dist/client/assets/{badge-CveqZ_Mf.js → badge-CeB87lwb.js} +1 -1
- package/dist/client/assets/{block-document-8QOLDAuP.js → block-document-Dpihi8bF.js} +1 -1
- package/dist/client/assets/{breadcrumb-DdKiDP1D.js → breadcrumb-KvM6LUMN.js} +1 -1
- package/dist/client/assets/{buckets-CE-LxOux.js → buckets-CtAQxsvY.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D5Bnwo7v.js → bulk-category-panel-Dxxw6gof.js} +1 -1
- package/dist/client/assets/{capability-load-error-G3zGppmC.js → capability-load-error-BEFZl7BI.js} +1 -1
- package/dist/client/assets/{cards-BIJzr_sx.js → cards-DcMbn2wM.js} +1 -1
- package/dist/client/assets/category-editor-BqyKSX-k.js +1 -0
- package/dist/client/assets/{cdn-tab-GH_aiLnZ.js → cdn-tab-CS6BQAKM.js} +1 -1
- package/dist/client/assets/{chart-CaBddSEI.js → chart-DikfTaxQ.js} +1 -1
- package/dist/client/assets/{chat-context-qN2EaF0B.js → chat-context-D7bBWEjV.js} +1 -1
- package/dist/client/assets/{checkbox-CAdLnXgF.js → checkbox-Bnn2cV2o.js} +1 -1
- package/dist/client/assets/{choose-editor-DnKQwoP2.js → choose-editor-CQKvK2nQ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CM8hGznX.js → cli-auth-success-C8fdvbK0.js} +1 -1
- package/dist/client/assets/collection-detail-BdZYqX07.js +1 -0
- package/dist/client/assets/{collection-display-button-CWnZjP1k.js → collection-display-button-BGPacmRH.js} +1 -1
- package/dist/client/assets/{collection-search-D5rwmWFv.js → collection-search-Bx0fHGdP.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Da6F1ejU.js → collection-table-wrapper-Bq9o79bg.js} +1 -1
- package/dist/client/assets/{collection-tabs-BteIkhYu.js → collection-tabs-wE5AjIxo.js} +1 -1
- package/dist/client/assets/{command-CE_y1aUD.js → command-B-8IVgOi.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CfI0S8cB.js → commerce-onboarding-DvfkGGaG.js} +1 -1
- package/dist/client/assets/{config-BiSpfnj7.js → config-BWjWcdbt.js} +1 -1
- package/dist/client/assets/{connect-C8AFLRKd.js → connect-BQldyEIH.js} +1 -1
- package/dist/client/assets/{connection-DiKxFUV9.js → connection-Bu6CKKHo.js} +1 -1
- package/dist/client/assets/{connection-card-DYPOVPKV.js → connection-card-BgP76mdh.js} +1 -1
- package/dist/client/assets/connection-detail-HtDHEVye.js +1 -0
- package/dist/client/assets/{connection-form-helpers-Bli5zmfy.js → connection-form-helpers-D3UyncMx.js} +1 -1
- package/dist/client/assets/{connections-BEAZOEVS.js → connections-BFDSHlg7.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BeHY6QEX.js → decopilot-sse-pool-BDmk3gDD.js} +1 -1
- package/dist/client/assets/{dialog-DJXcn4YI.js → dialog-Dxe79goo.js} +1 -1
- package/dist/client/assets/{domain-settings-B1WLjP-T.js → domain-settings-CVK0PWLe.js} +1 -1
- package/dist/client/assets/{drawer-Ccp7Pld2.js → drawer-DkejdWwz.js} +1 -1
- package/dist/client/assets/{dropdown-menu-L5olgVDL.js → dropdown-menu-PmWQu__b.js} +1 -1
- package/dist/client/assets/e2e-tab-DK2VRmcC.js +1 -0
- package/dist/client/assets/{editor-BAheuVgp.js → editor-CDDmFeb8.js} +1 -1
- package/dist/client/assets/{empty-state-DVClfDrw.js → empty-state-C8ZR6dk7.js} +1 -1
- package/dist/client/assets/{empty-state-CnuWCQSl.js → empty-state-DR2MeWCG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BsWcQfyC.js → extract-connection-data-BRKwNJ15.js} +1 -1
- package/dist/client/assets/file-explorer-BHOrF9oj.js +2 -0
- package/dist/client/assets/{file-type-icon-DgAI6cPK.js → file-type-icon-B8SUHUXO.js} +1 -1
- package/dist/client/assets/{folder-icon-B9F2uwsA.js → folder-icon-C9fCzh0e.js} +1 -1
- package/dist/client/assets/{form-Cz8vlCyU.js → form-BzA23Elj.js} +1 -1
- package/dist/client/assets/general-CBxcqCBJ.js +1 -0
- package/dist/client/assets/github-repo-BpKUwJal.js +1 -0
- package/dist/client/assets/{github-repo-picker-CtCqD-wD.js → github-repo-picker-EtIcW9an.js} +1 -1
- package/dist/client/assets/{hooks-DUUOu-IF.js → hooks-X3Ivo2M-.js} +1 -1
- package/dist/client/assets/{hosting-tab-DPhPj4dN.js → hosting-tab-BHDCkQun.js} +1 -1
- package/dist/client/assets/{index-B86zcZyY.js → index-BrERmW69.js} +63 -63
- package/dist/client/assets/index-CKLDhHOO.js +1 -0
- package/dist/client/assets/{index-CUu2e90Z.js → index-CtC5YrQv.js} +1 -1
- package/dist/client/assets/{index-D-9ni5nq.js → index-D0d43HMh.js} +1 -1
- package/dist/client/assets/{index-Bizz403T.js → index-a8Dvpxdi.js} +1 -1
- package/dist/client/assets/{index-uDYRl3SL.js → index-h1j6ujxS.js} +1 -1
- package/dist/client/assets/{index-C9HIOZPu.js → index-lveCx5PF.js} +1 -1
- package/dist/client/assets/{index-WnnLGrso.js → index-qCYv4MSE.js} +3 -3
- package/dist/client/assets/{index-redirect-DiOtxAf1.js → index-redirect-L0iJfhY6.js} +1 -1
- package/dist/client/assets/{index-D7eob7Uh.js → index-zpp84knt.js} +2 -2
- package/dist/client/assets/{infra-billing-DYMvRtet.js → infra-billing-CPf4fFDu.js} +1 -1
- package/dist/client/assets/{input-CDpdC0tP.js → input-CRGKfmn6.js} +1 -1
- package/dist/client/assets/{integration-icon-BPFnGyo6.js → integration-icon-DBnJJnhq.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DKlBdbJj.js → invite-member-dialog-BkIQ0dOi.js} +1 -1
- package/dist/client/assets/{label-Dr_BfYzg.js → label-CfDXMhl5.js} +1 -1
- package/dist/client/assets/{layout-MJTggsvU.js → layout-D40hZqBj.js} +1 -1
- package/dist/client/assets/{login-CG9BJyWK.js → login-DdLYUzng.js} +1 -1
- package/dist/client/assets/{markdown-5lzWkOML.js → markdown-B7Ud7SgT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BQSdkAbx.js → mcp-oauth-CGEvYC-J.js} +1 -1
- package/dist/client/assets/{members-C291HFWZ.js → members-CDTLn-5g.js} +1 -1
- package/dist/client/assets/{monaco-editor-6AHs34Q8.js → monaco-editor-DjnM7g3H.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D1H2cLux.js → monitoring-stats-row-BtKlGcG4.js} +1 -1
- package/dist/client/assets/{multi-select-M4tMYIeu.js → multi-select-B338vBF_.js} +1 -1
- package/dist/client/assets/{oauth-callback-B7Fr1x08.js → oauth-callback-ByOfijBR.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-v-_Os__t.js → oauth-callback-ai-provider-z49HmhKn.js} +1 -1
- package/dist/client/assets/{onboarding-Cn9iTVP7.js → onboarding-D50GvWIA.js} +1 -1
- package/dist/client/assets/{org-layout-DAPjsfss.js → org-layout-Bx5e_xav.js} +1 -1
- package/dist/client/assets/{organization-choice-Db9e0c0F.js → organization-choice-5Z25dFY6.js} +1 -1
- package/dist/client/assets/{orgs-8QefYLt1.js → orgs-CQPbK1d5.js} +1 -1
- package/dist/client/assets/{page-seo-form-GNAs9Ss4.js → page-seo-form-CFn8hcfO.js} +1 -1
- package/dist/client/assets/{popover-BHOBS4DD.js → popover-BzE481wQ.js} +1 -1
- package/dist/client/assets/post-calendar-CJX3Ko38.js +1 -0
- package/dist/client/assets/post-editor-BdbDvb-c.js +1 -0
- package/dist/client/assets/{primitives-Bz7_eAGj.js → primitives-DEmITI2J.js} +1 -1
- package/dist/client/assets/{profile-DPml_-c7.js → profile-BwXGqXR4.js} +1 -1
- package/dist/client/assets/project-app-view-CeNx1fBu.js +1 -0
- package/dist/client/assets/{prompts-DWcXaJjq.js → prompts-uqhpOUAX.js} +1 -1
- package/dist/client/assets/record-editor-DwspN490.js +1 -0
- package/dist/client/assets/redirect-editor-7e7Upnyf.js +1 -0
- package/dist/client/assets/registry-DZdIIHBt.js +2 -0
- package/dist/client/assets/{registry-layout-ZTXSarYx.js → registry-layout-DbvX20ly.js} +1 -1
- package/dist/client/assets/{reports-CRVPqK0k.js → reports-CrQDejVs.js} +1 -1
- package/dist/client/assets/{require-capability-d7tq3luv.js → require-capability-BoL6jDgL.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Da1w_Ddb.js → required-auth-layout-5tFVnd1H.js} +1 -1
- package/dist/client/assets/{reset-password-BmGLh8dY.js → reset-password-CS2Clij0.js} +1 -1
- package/dist/client/assets/{review-settings-CiCaCzxK.js → review-settings-DBmL8p2f.js} +1 -1
- package/dist/client/assets/{roles-Ci4yDYav.js → roles-D-X3mh9v.js} +1 -1
- package/dist/client/assets/{schema-DJV9p5H0.js → schema-CYc80BIA.js} +1 -1
- package/dist/client/assets/{scroll-area-BQmQE4CQ.js → scroll-area-r1EYMKyQ.js} +1 -1
- package/dist/client/assets/{search-input-DzQfXS8J.js → search-input-DXwr2899.js} +1 -1
- package/dist/client/assets/{secrets-BtsxuVe4.js → secrets-BTH_8gqg.js} +1 -1
- package/dist/client/assets/{sections-editor-CsXN57X-.js → sections-editor-90Gsfmg3.js} +2 -2
- package/dist/client/assets/{select-DUtamJhc.js → select-Bz_3bOJv.js} +1 -1
- package/dist/client/assets/{select-model-DCyF1EQd.js → select-model-DH9jNXmH.js} +1 -1
- package/dist/client/assets/{self-tool-result-DJKNA-Q1.js → self-tool-result-Do1470Ib.js} +1 -1
- package/dist/client/assets/seo-editor-BkneoKKW.js +1 -0
- package/dist/client/assets/{settings-layout-Cjh0y1yu.js → settings-layout-B7WDpOx1.js} +1 -1
- package/dist/client/assets/{shell-controls-BrrExuPa.js → shell-controls-DCdB5eeb.js} +1 -1
- package/dist/client/assets/{shell-layout-Ca02cmCX.js → shell-layout-CYtE1aPw.js} +1 -1
- package/dist/client/assets/{skill-preview-CumaRjCm.js → skill-preview-DzcAaN-A.js} +1 -1
- package/dist/client/assets/{skills-lt-UrdFW.js → skills-DbUTk6nR.js} +1 -1
- package/dist/client/assets/{spinner-YrauiZby.js → spinner-Bgc6NWQ-.js} +1 -1
- package/dist/client/assets/{sso-UHOiFN5l.js → sso-C1XWFvNa.js} +1 -1
- package/dist/client/assets/{store-cqs754NT.js → store-C3zBFUp-.js} +1 -1
- package/dist/client/assets/store-registry-5KlYurHE.js +2 -0
- package/dist/client/assets/super-agent-icon-CRICd5zg.js +1 -0
- package/dist/client/assets/{switch-AVWIy_bp.js → switch-Cz4K9iDZ.js} +1 -1
- package/dist/client/assets/synced-repos-C8bY52Sw.js +1 -0
- package/dist/client/assets/{table-BBjVFebb.js → table-BrzSAp6e.js} +1 -1
- package/dist/client/assets/{tabs-Yky_zgts.js → tabs-CQbWfZhJ.js} +1 -1
- package/dist/client/assets/{task-board-071VXUrT.js → task-board-DCFA9I7S.js} +1 -1
- package/dist/client/assets/{tasks-1If8qBAb.js → tasks-siQjbDLL.js} +1 -1
- package/dist/client/assets/{textarea-CI_ABdOZ.js → textarea-p2bYTUAA.js} +1 -1
- package/dist/client/assets/{thread-route-BWBQm3pm.js → thread-route-oU2v4HPI.js} +1 -1
- package/dist/client/assets/{toggle-group-BPRw-cUe.js → toggle-group-C3G6c63e.js} +1 -1
- package/dist/client/assets/{toolbar-CVo5ou1c.js → toolbar-BcAFop8I.js} +1 -1
- package/dist/client/assets/{track-BfSo4KUJ.js → track-CC514-8k.js} +1 -1
- package/dist/client/assets/{types-jxIG6gO3.js → types-BHR6d6Y2.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DCe2OUth.js → use-ai-providers-DPQuwb-3.js} +1 -1
- package/dist/client/assets/{use-api-keys-BZpUrGa2.js → use-api-keys-Cf-PDuMg.js} +1 -1
- package/dist/client/assets/{use-automations-BXKtqjHx.js → use-automations-CopIAiD9.js} +1 -1
- package/dist/client/assets/{use-autosave-Bfebs1JB.js → use-autosave-Df4gSSDP.js} +1 -1
- package/dist/client/assets/{use-connection-Bftf01wB.js → use-connection-BQeSoolZ.js} +1 -1
- package/dist/client/assets/{use-copy-CT9eqfXk.js → use-copy-DrncLLue.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bywyd388.js → use-create-virtual-mcp-DMgncd5a.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BkXMiMuU.js → use-debounced-autosave-B-XG1FGZ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-VuO_YY1b.js → use-debounced-value-CKaVv7Ac.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BEqXbNTL.js → use-decopilot-events-B6E_Hlcz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B6nmsxIv.js → use-delete-connection-CJhsy60O.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BEaWoADG.js → use-deployment-admin-DK88CLg4.js} +1 -1
- package/dist/client/assets/{use-destination-route-r2NrESmX.js → use-destination-route-DAn4XmeU.js} +1 -1
- package/dist/client/assets/{use-file-configs-Ioa6TFS2.js → use-file-configs-D7AMfTRS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BvDU24Je.js → use-infinite-scroll-wJNeU_LL.js} +1 -1
- package/dist/client/assets/{use-join-requests-hDmEAgEy.js → use-join-requests-Dh08Nva7.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DBCA94xW.js → use-mcp-auth-status-BejOvzkI.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Ck5btS3m.js → use-mcp-client-BJ8Gl7bN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CibuZ0mM.js → use-mcp-tools-aQw0C0zY.js} +1 -1
- package/dist/client/assets/{use-members-88UMMKuC.js → use-members-DZ8N99iL.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-ctVWYeGN.js +1 -0
- package/dist/client/assets/{use-org-auth-client-COrOxhr5.js → use-org-auth-client-BD5pSTKO.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-B4UKqKch.js → use-org-repo-syncs-BQHddGlx.js} +1 -1
- package/dist/client/assets/{use-org-sso-uLzYuu3I.js → use-org-sso-B37D2h-E.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Czo_k9pN.js → use-organization-roles-C4CfyaNV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BEo7NnG8.js → use-organization-settings-DFlCOddU.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BMs-s3Nl.js → use-panel-navigate-DUpzUMxR.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DOQdhzUa.js → use-registry-connections-pPrzjL2h.js} +1 -1
- package/dist/client/assets/{use-secrets-Cy0LL42u.js → use-secrets-ByjQEBQi.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Btcd72Av.js → use-section-preview-base-CgD6NC5X.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BDMm5fz-.js → use-status-sounds-DMS0qCWX.js} +1 -1
- package/dist/client/assets/{use-tags-C2FELPv0.js → use-tags-CkxCFmu3.js} +1 -1
- package/dist/client/assets/{use-view-mode-CRM2Ahdu.js → use-view-mode-DVYPz9HN.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CKxnHsjh.js → use-virtual-mcp-B7PM027K.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DsTrslqR.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-m-DwhjRi.js +1 -0
- package/dist/client/assets/{users-DJo4Ay9Z.js → users-n6tGhrCq.js} +1 -1
- package/dist/client/assets/variant-calendar-BOfhcURI.js +1 -0
- package/dist/client/assets/{view-mode-toggle-GoSdrCuf.js → view-mode-toggle-CVCfOvmN.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-capabilities-B52k7xCe.js +0 -1
- package/dist/client/assets/agents-list-BXQhaBen.js +0 -1
- package/dist/client/assets/app-editor-DVMT8JTc.js +0 -1
- package/dist/client/assets/automations-DBwwYXCU.js +0 -1
- package/dist/client/assets/category-editor-BoABT4L_.js +0 -1
- package/dist/client/assets/collection-detail-CI_m2YN9.js +0 -1
- package/dist/client/assets/connection-detail-cE4LQrKo.js +0 -1
- package/dist/client/assets/e2e-tab-DGVfHxxd.js +0 -1
- package/dist/client/assets/file-explorer-DNZ40vWH.js +0 -2
- package/dist/client/assets/general-xbXJE9O7.js +0 -1
- package/dist/client/assets/index-B8tdDEz0.js +0 -1
- package/dist/client/assets/post-calendar-h0GoZSxV.js +0 -1
- package/dist/client/assets/post-editor-Bz1ernmr.js +0 -1
- package/dist/client/assets/project-app-view-B-L2KtkX.js +0 -1
- package/dist/client/assets/record-editor-IXt3jwIB.js +0 -1
- package/dist/client/assets/redirect-editor-jfcEBk8G.js +0 -1
- package/dist/client/assets/registry-Bb-NzLOq.js +0 -2
- package/dist/client/assets/seo-editor-Z3n02mf7.js +0 -1
- package/dist/client/assets/store-registry-CNrYNLuE.js +0 -2
- package/dist/client/assets/super-agent-icon-B-GjUG_i.js +0 -1
- package/dist/client/assets/synced-repos-BhvX_mzy.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-DQJ0axS8.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BstDKoVk.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CAB5Fhd0.js +0 -1
- package/dist/client/assets/variant-calendar-CLxERLW6.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as t,B as W,k as oe,ak as Ye,an as ie,b as K,E as De,r as D,H as xe,cb as Ge,cc as Ee,ax as Xe,u as Ze,L as ee,aa as et,ab as Se,a8 as ye,a9 as we,t as tt,f as fe,cd as Oe}from"./index-WnnLGrso.js";import{E as Re}from"./empty-state-DVClfDrw.js";import{u as he}from"./use-mcp-client-Ck5btS3m.js";import{d as re,F as st,a as ae,b as ce}from"./form-Cz8vlCyU.js";import{I as ue}from"./input-CDpdC0tP.js";import{T as pe}from"./textarea-CI_ABdOZ.js";import{a as ot,b as nt,V as ge,O as lt,M as it}from"./index-CUu2e90Z.js";import{aK as rt,O as at,aL as ct,ah as dt,aj as mt,aM as ut,o as Ce}from"./agent-icon-BNiFw9pa.js";import{g as pt,M as xt,a as Ie}from"./types-jxIG6gO3.js";import{A as ft,a as ht,b as gt}from"./alert-DHJpYb4r.js";import{S as Te,a as $e,b as Pe,c as ke,d as de}from"./select-DUtamJhc.js";import{i as jt}from"./AlertCircle-uCFwUT4D.js";import{s as bt}from"./Stars02-CkhejPZU.js";import{a as Nt}from"./Copy01-D4DKkrNa.js";import{i as vt}from"./Play-CE83iAVt.js";import{B as Me,a as Fe,b as Y,c as te,d as se,e as Le}from"./breadcrumb-DdKiDP1D.js";import{g as St}from"./connection-slug-CITJ0kGN.js";import{u as yt,T as wt}from"./use-mcp-auth-status-DBCA94xW.js";import{a as ze,u as Be}from"./use-connection-Bftf01wB.js";import{a as Ct}from"./use-mcp-tools-CibuZ0mM.js";import{M as It,c as Tt}from"./monaco-editor-6AHs34Q8.js";import{I as Ae}from"./integration-icon-BPFnGyo6.js";import{k as $t,r as Pt}from"./chat-context-qN2EaF0B.js";import{u as kt}from"./shell-layout-Ca02cmCX.js";import{E as At}from"./empty-state-CnuWCQSl.js";import{n as Dt}from"./Tool02-D8DKruBK.js";import"./constants-dLUUoWH7.js";import"./auth-B6GdneuP.js";import"./label-Dr_BfYzg.js";import"./Key01-zcL3Jetr.js";import"./extract-connection-data-BsWcQfyC.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-DOQdhzUa.js";import"./use-organization-settings-BEo7NnG8.js";import"./schema-DJV9p5H0.js";import"./task-board-071VXUrT.js";import"./Plus-6fDaqupl.js";import"./index-uDYRl3SL.js";import"./index-Bizz403T.js";import"./index-D-9ni5nq.js";import"./popover-BHOBS4DD.js";import"./use-virtual-mcp-CKxnHsjh.js";import"./Check-dMF9hfDW.js";import"./SearchMd-CrGhreLP.js";import"./Users03-Cwu3MDED.js";import"./use-create-virtual-mcp-Bywyd388.js";import"./use-navigate-to-agent-DQJ0axS8.js";import"./use-destination-route-r2NrESmX.js";import"./hooks-DUUOu-IF.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BeHY6QEX.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./UserSquare-CrW5dbk9.js";import"./Tool01-Bpm7pW3l.js";import"./ArrowUp-HON1SXj9.js";import"./ArrowLeft-CyFw_ZAc.js";import"./XCircle-D6rPTffO.js";import"./TrendUp01-B6tyfzkz.js";import"./ZapSquare-ChUgXei6.js";import"./ZoomOut-Cp6Wgfdk.js";import"./CheckCircle-CJU10mQs.js";import"./ChevronDown-_zHtp2mi.js";import"./ChevronRight-mg1CozRX.js";import"./ChevronSelectorVertical-qKYq7QdT.js";import"./ChevronUp-BY_jPS3y.js";import"./DotsVertical-DIrSgn8J.js";import"./CreditCard01-BzXZ70FC.js";import"./Download01-Br2q00Km.js";import"./Settings02-BWYsBVvl.js";import"./Eye-BawWrBSR.js";import"./FilterLines-CWv0gwTq.js";import"./Share07-CAWy1Jc2.js";import"./GitBranch01-BHQWjDQ8.js";import"./Globe01-2G4S7hap.js";import"./Globe04-dte6e3Tn.js";import"./SwitchHorizontal01-DaHl0WJE.js";import"./HardDrive-D8NpBmYZ.js";import"./Image01-BcfWbfgs.js";import"./LinkExternal01-CowmNsE8.js";import"./LockUnlocked01-B42moyHj.js";import"./LogOut01-pQssVOeo.js";import"./Monitor01-BisokFUR.js";import"./Sun-BzDP5Wkc.js";import"./Package-DqE8AAiL.js";import"./Palette-BIg2FmR0.js";import"./SearchLg-DwCjVmxR.js";import"./Shield01-DEbNpm3q.js";import"./Stars01-viLOjXnm.js";import"./Trash01-Dy3MdYJw.js";import"./Upload01-NxuWdNFJ.js";import"./User01-DqbtX0Mm.js";import"./Users01-De14zlGQ.js";import"./XClose-DAdaIat-.js";import"./Zap-xbaG-vsx.js";import"./badge-CveqZ_Mf.js";import"./mcp-oauth-BQSdkAbx.js";import"./spinner-YrauiZby.js";import"./editor-BAheuVgp.js";import"./use-panel-navigate-BMs-s3Nl.js";import"./thread-route-BWBQm3pm.js";import"./dialog-DJXcn4YI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DCe2OUth.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BEqXbNTL.js";import"./avatar-CHBxqpBG.js";import"./required-auth-layout-Da1w_Ddb.js";import"./use-org-sso-uLzYuu3I.js";function Et(s){const e=B.c(15),{onSave:r,onUndo:o,isDirty:n,isSaving:l,saveLabel:a,undoLabel:u}=s,c=a===void 0?"Save":a,i=u===void 0?"Undo":u;if(!n)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let g;e[1]!==l||e[2]!==o||e[3]!==i?(g=t.jsxs(W,{variant:"outline",size:"sm",onClick:o,disabled:l,"aria-label":i,children:[x,i]}),e[1]=l,e[2]=o,e[3]=i,e[4]=g):g=e[4];let m;e[5]!==l?(m=l?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(at,{size:14}),e[5]=l,e[6]=m):m=e[6];let f;e[7]!==l||e[8]!==r||e[9]!==c||e[10]!==m?(f=t.jsxs(W,{variant:"default",size:"sm",onClick:r,disabled:l,"aria-label":c,children:[m,c]}),e[7]=l,e[8]=r,e[9]=c,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==g||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[g,f]}),e[12]=g,e[13]=f,e[14]=p):p=e[14],p}Ye({title:ie().min(1),description:ie().nullable(),body:ie()});function me(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ot(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),r=e>=0?s[e+1]:void 0;return r?decodeURIComponent(r):void 0}function Rt(s){const e=B.c(43),{form:r}=s,o=K();let n;e[0]!==o?(n=o("details.prompt.details"),e[0]=o,e[1]=n):n=e[1];let l;e[2]!==n?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:n}),e[2]=n,e[3]=l):l=e[3];let a;e[4]!==o?(a=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(ce,{children:t.jsx(ue,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let u;e[6]!==r.control||e[7]!==a?(u=t.jsx(re,{control:r.control,name:"title",render:a}),e[6]=r.control,e[7]=a,e[8]=u):u=e[8];let c;e[9]!==o?(c=w=>{const{field:b}=w;return t.jsxs(ae,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(ce,{children:t.jsx(ue,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=c):c=e[10];let i;e[11]!==r.control||e[12]!==c?(i=t.jsx(re,{control:r.control,name:"description",render:c}),e[11]=r.control,e[12]=c,e[13]=i):i=e[13];let x;e[14]!==u||e[15]!==i?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u,i]}),e[14]=u,e[15]=i,e[16]=x):x=e[16];let g;e[17]!==l||e[18]!==x?(g=t.jsxs("div",{className:"flex flex-col gap-4",children:[l,x]}),e[17]=l,e[18]=x,e[19]=g):g=e[19];let m;e[20]!==o?(m=o("details.prompt.message"),e[20]=o,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=w=>{const{field:b}=w;return t.jsx(ae,{children:t.jsx(ce,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let S;e[30]!==r.control||e[31]!==N?(S=t.jsx(re,{control:r.control,name:"body",render:N}),e[30]=r.control,e[31]=N,e[32]=S):S=e[32];let $;e[33]!==f||e[34]!==j||e[35]!==S?($=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,j,S]}),e[33]=f,e[34]=j,e[35]=S,e[36]=$):$=e[36];let y;e[37]!==$||e[38]!==g?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[g,$]}),e[37]=$,e[38]=g,e[39]=y):y=e[39];let P;return e[40]!==r||e[41]!==y?(P=t.jsx(st,{...r,children:y}),e[40]=r,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=B.c(42),{providerId:r,promptId:o}=s,n=K(),{org:l}=xe(),a=r||null;let u;e[0]!==l.id||e[1]!==l.slug||e[2]!==a?(u={connectionId:a,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=a,e[3]=u):u=e[3];const c=he(u),i=Ge(r,"PROMPT",o,c),x=Ee(r,"PROMPT",c),g=x.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:me(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Xe(f);let j;e[8]!==p||e[9]!==i?(j=()=>{i&&p.reset({title:i.title,description:i.description??null,body:me(i)})},e[8]=p,e[9]=i,e[10]=j):j=e[10];const N=j;let S;e[11]!==x.update||e[12]!==p||e[13]!==o?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:o,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:me(I)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=S):S=e[14];const $=S;if(!i){let C;e[15]!==n?(C=n("details.prompt.notFoundTitle"),e[15]=n,e[16]=C):C=e[16];let I;e[17]!==n?(I=n("details.prompt.notFoundDescription"),e[17]=n,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Re,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==i.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[22]=i.title,e[23]=y):y=e[23];let P;e[24]!==i.description?(P=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[24]=i.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let b;e[29]!==$?(b=()=>{$()},e[29]=$,e[30]=b):b=e[30];let k;e[31]!==p.formState.isDirty||e[32]!==g||e[33]!==N||e[34]!==b?(k=t.jsx(ot,{children:t.jsx(Et,{onSave:b,onUndo:N,isDirty:p.formState.isDirty,isSaving:g})}),e[31]=p.formState.isDirty,e[32]=g,e[33]=N,e[34]=b,e[35]=k):k=e[35];let A;e[36]!==p?(A=t.jsx("div",{className:"h-full",children:t.jsx(Rt,{form:p})}),e[36]=p,e[37]=A):A=e[37];let E;return e[38]!==k||e[39]!==A||e[40]!==w?(E=t.jsxs(ge,{children:[w,k,A]}),e[38]=k,e[39]=A,e[40]=w,e[41]=E):E=e[41],E}function Ft(s){const e=B.c(10),{itemId:r}=s,o=K();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Ot(),e[0]=n):n=e[0];const l=n;if(!l){let u;e[1]!==o?(u=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=u):u=e[2];let c;e[3]!==o?(c=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=c):c=e[4];let i;return e[5]!==u||e[6]!==c?(i=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Re,{title:u,description:c})}),e[5]=u,e[6]=c,e[7]=i):i=e[7],i}let a;return e[8]!==r?(a=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:l,promptId:r})})}),e[8]=r,e[9]=a):a=e[9],a}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function zt(s){const e=B.c(12),{toolName:r,connectionId:o,siblings:n,onSelectInstance:l,onBack:a}=s,u=K();let c;e[0]!==o?(c={connectionId:o},e[0]=o,e[1]=c):c=e[1];const i=yt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a||e[4]!==u?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(lt,{onAuthenticate:()=>a(),buttonText:u("details.tool.goBackToAuthenticate")}):t.jsx(it,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u,e[5]=m):m=e[5],m}const x=`${o}:${r}`;let g;return e[6]!==o||e[7]!==l||e[8]!==n||e[9]!==x||e[10]!==r?(g=t.jsx(Bt,{toolName:r,connectionId:o,siblings:n,onSelectInstance:l},x),e[6]=o,e[7]=l,e[8]=n,e[9]=x,e[10]=r,e[11]=g):g=e[11],g}function Bt({toolName:s,connectionId:e,siblings:r,onSelectInstance:o}){const n=K(),{replayId:l}=Ze({strict:!1}),a=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),u=(()=>{if(!a)return null;const d={};for(const[h,T]of Object.entries(a))T!==null&&typeof T=="object"?d[h]=JSON.stringify(T,null,2):d[h]=T;return d})(),[c,i]=D.useState(u??{}),[x,g]=D.useState(a?JSON.stringify(a,null,2):"{}"),[m,f]=D.useState(null),[p,j]=D.useState(null),[N,S]=D.useState(null),[$,y]=D.useState(null),[P,w]=D.useState(!1),[b,k]=D.useState(null),{org:A}=xe(),E=ze(e),C=$t(),I=Pt(),{openSidePanel:O}=kt(),U=`${e}:${s}`,M=he({connectionId:e,orgId:A.id,orgSlug:A.slug}),V=Ct({client:M}),v=V.data?.tools?.find(d=>d.name===s),R=pt(v?._meta),J=d=>{if(!C)return;const h=Tt(d.content);h.content.length>0&&(O(),C.sendMessage({tiptapDoc:h}))},[F,L]=D.useState("json"),[q,Q]=D.useState(!1);R&&!q&&(L("ui"),Q(!0));const _=v?.inputSchema?.properties,je=_?Object.keys(_):[],G=je.length>0,X={};if(G&&v?.inputSchema?.properties)for(const d of je)X[d]=v.inputSchema.required?.includes(d)?"":void 0;const ne=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{w(!0),y(null),f(null),j(null),S(null),k(null);const d=performance.now();try{if(!M)throw new Error("MCP client is not available");const h=G?{...X,...c}:(()=>{const z=x.trim();if(!z)return{};const H=JSON.parse(z);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();G&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([z,H])=>{if((H.type==="object"||H.type==="array")&&typeof h[z]=="string")try{h[z]=JSON.parse(h[z])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof h[z]=="string"&&h[z]!==""){const ve=Number(h[z]);Number.isNaN(ve)||(h[z]=ve)}});const T=await M.callTool({name:s,arguments:h}),Z=T.structuredContent??T,Ke=performance.now(),We=Math.round(Ke-d);f(Z),j(T),S(h);const Qe=JSON.stringify(Z),Ne=new TextEncoder().encode(Qe).length;k({duration:`${We}ms`,bytes:`${Ne} bytes`,tokens:`~${Math.ceil(Ne/4)} tokens`,cost:"$0.0000"})}catch(h){const T=h instanceof Error?h.message:String(h);y(T||"Unknown error occurred");const Z=performance.now();k({duration:`${Math.round(Z-d)}ms`})}finally{w(!1)}},le=(d,h)=>{i(T=>({...T,[d]:h}))},Ve=()=>{f(null),j(null),S(null),y(null),k(null)},_e=v?.name??Lt(s),Je=t.jsx(Me,{children:t.jsxs(Fe,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections",params:{org:A.slug},children:n("details.tool.connections")})})}),t.jsx(se,{}),E&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections/$appSlug",params:{org:A.slug,appSlug:St(E)},search:{tab:"tools"},children:E.title})})}),t.jsx(se,{})]}),t.jsx(Y,{children:t.jsx(Le,{children:_e})})]})}),be=r.length>1&&t.jsxs(Te,{value:e,onValueChange:o,children:[t.jsx($e,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Pe,{})}),t.jsx(ke,{children:r.map(d=>t.jsx(de,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),qe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:n("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",n("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:G&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,v.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(pe,{className:"font-mono text-xs",value:ne(d)?c[d]??"":X[d]??"",onChange:T=>le(d,T.target.value),placeholder:n("details.tool.enterAsJson",{key:d}),rows:3}):h.type==="boolean"?t.jsxs(Te,{value:ne(d)?String(c[d]??""):"",onValueChange:T=>le(d,T==="true"),children:[t.jsx($e,{children:t.jsx(Pe,{placeholder:n("details.tool.selectTrueOrFalse")})}),t.jsxs(ke,{children:[t.jsx(de,{value:"true",children:"true"}),t.jsx(de,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ne(d)?c[d]??"":X[d]??"",onChange:T=>le(d,T.target.value),placeholder:n("details.tool.enter",{key:d})})]},d)):v?.inputSchema&&!G?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:n("details.tool.rawJsonInput")}),t.jsx(pe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>g(d.target.value),placeholder:n("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:n("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(W,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(ct,{className:"h-3.5 w-3.5"}),n("details.tool.cancel")]}):t.jsxs(W,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),n("details.tool.executeTool")]})})]}),He=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:n("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),R&&t.jsx(et,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(W,{size:"icon",variant:F==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(ut,{size:14})})}),t.jsx(we,{children:n("details.tool.interactiveView")})]}),t.jsxs(Se,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(W,{size:"icon",variant:F==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(Ce,{size:14})})}),t.jsx(we,{children:n("details.tool.jsonView")})]})]})})]})]}),$&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ft,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ht,{className:"mb-0",children:n("details.tool.executionFailed")})]}),t.jsx(gt,{className:"text-xs text-destructive",children:$})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:R&&F==="ui"&&M?t.jsx(D.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:n("details.tool.loadingApp")})]})}),children:t.jsx(xt,{resourceURI:R,toolInfo:v?{tool:v}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:Ie.view.minHeight,maxHeight:Ie.view.maxHeight,client:M,onMessage:J,onUpdateModelContext:d=>I?.setAppContext(U,d),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(It,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(W,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),tt.success(n("details.tool.copiedToClipboard"))},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ce,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:n("details.tool.runToolToSeeResults")})]})})]});return t.jsx(ge,{breadcrumb:Je,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:E?.icon||null,name:E?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx(wt,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:be})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),r.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:n("details.tool.instance")}),be]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:qe}),He]})})]})})}function Ut(s){const e=B.c(20),{itemId:r,siblings:o,onBack:n}=s,l=K(),[a,u]=D.useState(o[0]?.id??"");let c;e[0]!==a||e[1]!==o?(c=o.find(f=>f.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=c):c=e[2];const i=c;if(!ze(i||void 0)||!i){let f;e[3]!==l?(f=l("details.tool.connectionNotFound"),e[3]=l,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let j;e[7]!==l?(j=l("details.tool.connectionNotFoundMessage"),e[7]=l,e[8]=j):j=e[8];let N;e[9]!==j?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:j}),e[9]=j,e[10]=N):N=e[10];let S;return e[11]!==p||e[12]!==N?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,N]})}),e[11]=p,e[12]=N,e[13]=S):S=e[13],S}let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=g):g=e[14];let m;return e[15]!==i||e[16]!==n||e[17]!==o||e[18]!==r?(m=t.jsx(D.Suspense,{fallback:g,children:t.jsx(zt,{toolName:r,connectionId:i,siblings:o,onSelectInstance:u,onBack:n})}),e[15]=i,e[16]=n,e[17]=o,e[18]=r,e[19]=m):m=e[19],m}const Vt={prompt:Ft};function _t(){const s=B.c(9),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),n=decodeURIComponent(o.itemId);let l;s[1]!==o.appSlug?(l={slug:o.appSlug},s[1]=o.appSlug,s[2]=l):l=s[2];const a=Be(l);let u;s[3]!==e.history?(u=()=>{e.history.back()},s[3]=e.history,s[4]=u):u=s[4];const c=u,i=Jt;let x;return s[5]!==c||s[6]!==n||s[7]!==a?(x=t.jsx(Ut,{itemId:n,siblings:a,onBack:c,onUpdate:i}),s[5]=c,s[6]=n,s[7]=a,s[8]=x):x=s[8],x}async function Jt(s){return Promise.resolve()}function qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Ht(){const s=B.c(52),e=Oe();let r;s[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=r):r=s[0];const o=fe(r),n=K(),l=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let u;s[1]!==e.history?(u=()=>{e.history.back()},s[1]=e.history,s[2]=u):u=s[2];const c=u,{org:i}=xe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const m=Be(x)[0]??null,f=m?.id??"",p=f||"no-connection",j=f??null;let N;s[5]!==i.id||s[6]!==i.slug||s[7]!==j?(N={connectionId:j,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=j,s[8]=N):N=s[8];const S=he(N),$=Ee(p,l,S);let y;s[9]!==$||s[10]!==a?(y=async _=>{a&&await $.update.mutateAsync({id:a,data:_})},s[9]=$,s[10]=a,s[11]=y):y=s[11];const P=y;let w;s[12]!==l?(w=l?.toLowerCase(),s[12]=l,s[13]=w):w=s[13];const b=w,k=b&&Vt[b];let A;s[14]!==l?(A=qt(l),s[14]=l,s[15]=A):A=s[15];const E=A;let C;s[16]!==i.slug?(C=t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(se,{}),s[18]=I):I=s[18];let O;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==o.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(te,{asChild:!0,children:t.jsx(ee,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:o.appSlug},search:{tab:l},children:m.title})})}),t.jsx(se,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==E?(U=t.jsx(Y,{children:t.jsx(Le,{children:E})}),s[24]=E,s[25]=U):U=s[25];let M;s[26]!==O||s[27]!==U||s[28]!==C?(M=t.jsx(Me,{children:t.jsxs(Fe,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=M):M=s[29];const V=M;if(k){let _;return s[30]!==k||s[31]!==c||s[32]!==P||s[33]!==a?(_=t.jsx(k,{itemId:a,onBack:c,onUpdate:P}),s[30]=k,s[31]=c,s[32]=P,s[33]=a,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Dt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let R;s[36]!==n?(R=n("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=n,s[37]=R):R=s[37];let J;s[38]!==n?(J=n("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=n,s[39]=J):J=s[39];let F;s[40]!==n?(F=n("orgs.collectionDetail.goBackButton"),s[40]=n,s[41]=F):F=s[41];let L;s[42]!==c||s[43]!==F?(L={onClick:c,children:F},s[42]=c,s[43]=F,s[44]=L):L=s[44];let q;s[45]!==R||s[46]!==J||s[47]!==L?(q=t.jsx(At,{icon:v,title:R,description:J,buttonProps:L}),s[45]=R,s[46]=J,s[47]=L,s[48]=q):q=s[48];let Q;return s[49]!==V||s[50]!==q?(Q=t.jsx(ge,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=Q):Q=s[51],Q}function Kt(){const s=B.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const r=fe(e);if(decodeURIComponent(r.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(_t,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ht,{}),s[2]=l):l=s[2],l}function Go(){const s=B.c(7),e=K();let r;s[0]!==e?(r=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=r):r=s[1];let o;s[2]!==r?(o=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":r})}),s[2]=r,s[3]=o):o=s[3];let n;s[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Kt,{}),s[4]=n):n=s[4];let l;return s[5]!==o?(l=t.jsx(De,{children:t.jsx(D.Suspense,{fallback:o,children:n})}),s[5]=o,s[6]=l):l=s[6],l}export{Go as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as be,ap as $e,au as De,an as me,al as Oe,c as R,b as L,j as t,k as ve,B as H,r as Z,n as Ne,H as te,ac as Me,z as ze,K as ae,d as se,b8 as Ee,ba as ue,G as Ue,E as Re,f as Ve,c8 as Fe,p as Le,ax as Be,ay as He,bi as Ge,bh as qe,bg as Ke,be as Qe,bf as Xe,t as Y}from"./index-WnnLGrso.js";import{g as We}from"./extract-connection-data-BsWcQfyC.js";import{E as Se}from"./empty-state-DVClfDrw.js";import{E as Je,c as Ye,r as Ze,b as et,d as tt}from"./connection-form-helpers-Bli5zmfy.js";import{c as st,S as nt,V as it}from"./index-CUu2e90Z.js";import{u as ye,T as ot}from"./use-mcp-auth-status-DBCA94xW.js";import{a as at}from"./use-members-88UMMKuC.js";import{A as lt}from"./avatar-CHBxqpBG.js";import{a as Ce,b as _e,u as rt}from"./use-connection-Bftf01wB.js";import{u as we}from"./use-mcp-client-Ck5btS3m.js";import{a as ct}from"./use-mcp-tools-CibuZ0mM.js";import{b as dt,C as mt,a as ut,c as xt}from"./chart-CaBddSEI.js";import{i as pt,a as ft}from"./mcp-oauth-BQSdkAbx.js";import{I as le}from"./integration-icon-BPFnGyo6.js";import{s as ht}from"./Plus-6fDaqupl.js";import{M as gt,N as jt,l as bt,aJ as vt,s as ne}from"./agent-icon-BNiFw9pa.js";import{a as ke,s as Nt}from"./Settings02-BWYsBVvl.js";import{s as ce}from"./Trash01-Dy3MdYJw.js";import{d as K,a as Q,e as X,b as B,c as W,f as St,F as yt}from"./form-Cz8vlCyU.js";import{I as J}from"./input-CDpdC0tP.js";import{u as Ct,D as _t}from"./use-delete-connection-B6nmsxIv.js";import{c as wt,B as kt,a as It,C as Tt}from"./monitoring-stats-row-D1H2cLux.js";import{u as At}from"./use-virtual-mcp-CKxnHsjh.js";import{i as Ie}from"./ChevronRight-mg1CozRX.js";import{a as Te}from"./Users03-Cwu3MDED.js";import{b as ie,c as Pt,T as oe,a as $t}from"./tabs-Yky_zgts.js";import{g as Ae}from"./connection-slug-CITJ0kGN.js";import{b as Dt}from"./Tool01-Bpm7pW3l.js";import{g as de,M as Ot}from"./types-jxIG6gO3.js";import{C as Mt}from"./collection-search-D5rwmWFv.js";import{B as zt}from"./badge-CveqZ_Mf.js";import{c as Et,D as Ut,b as Rt,a as xe}from"./dropdown-menu-L5olgVDL.js";import{S as pe,a as fe,b as he,c as ge,d as q}from"./select-DUtamJhc.js";import{i as Vt}from"./CheckCircle-CJU10mQs.js";import{t as Ft}from"./ChevronDown-_zHtp2mi.js";import{n as Lt}from"./Tool02-D8DKruBK.js";import{e as Bt}from"./UserSquare-CrW5dbk9.js";import{s as Ht}from"./XClose-DAdaIat-.js";import{p as Gt,i as qt}from"./connection-DiKxFUV9.js";import"./metadata-dUsYcpuu.js";import"./constants-dLUUoWH7.js";import"./Key01-zcL3Jetr.js";import"./auth-B6GdneuP.js";import"./use-registry-connections-DOQdhzUa.js";import"./use-organization-settings-BEo7NnG8.js";import"./schema-DJV9p5H0.js";import"./task-board-071VXUrT.js";import"./index-uDYRl3SL.js";import"./index-Bizz403T.js";import"./index-D-9ni5nq.js";import"./popover-BHOBS4DD.js";import"./Check-dMF9hfDW.js";import"./SearchMd-CrGhreLP.js";import"./use-create-virtual-mcp-Bywyd388.js";import"./use-navigate-to-agent-DQJ0axS8.js";import"./use-destination-route-r2NrESmX.js";import"./hooks-DUUOu-IF.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BeHY6QEX.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./Eye-BawWrBSR.js";import"./use-org-auth-client-COrOxhr5.js";import"./User01-DqbtX0Mm.js";import"./AreaChart-CvCIlFBg.js";import"./AlertCircle-uCFwUT4D.js";import"./ArrowUp-HON1SXj9.js";import"./ArrowLeft-CyFw_ZAc.js";import"./XCircle-D6rPTffO.js";import"./TrendUp01-B6tyfzkz.js";import"./ZapSquare-ChUgXei6.js";import"./ZoomOut-Cp6Wgfdk.js";import"./ChevronSelectorVertical-qKYq7QdT.js";import"./ChevronUp-BY_jPS3y.js";import"./DotsVertical-DIrSgn8J.js";import"./Stars02-CkhejPZU.js";import"./Copy01-D4DKkrNa.js";import"./CreditCard01-BzXZ70FC.js";import"./Download01-Br2q00Km.js";import"./FilterLines-CWv0gwTq.js";import"./Share07-CAWy1Jc2.js";import"./GitBranch01-BHQWjDQ8.js";import"./Globe01-2G4S7hap.js";import"./Globe04-dte6e3Tn.js";import"./SwitchHorizontal01-DaHl0WJE.js";import"./HardDrive-D8NpBmYZ.js";import"./Image01-BcfWbfgs.js";import"./LinkExternal01-CowmNsE8.js";import"./LockUnlocked01-B42moyHj.js";import"./LogOut01-pQssVOeo.js";import"./Monitor01-BisokFUR.js";import"./Sun-BzDP5Wkc.js";import"./Package-DqE8AAiL.js";import"./Palette-BIg2FmR0.js";import"./Play-CE83iAVt.js";import"./SearchLg-DwCjVmxR.js";import"./Shield01-DEbNpm3q.js";import"./Stars01-viLOjXnm.js";import"./Upload01-NxuWdNFJ.js";import"./Users01-De14zlGQ.js";import"./Zap-xbaG-vsx.js";import"./label-Dr_BfYzg.js";import"./alert-dialog-Z5MegBZ1.js";import"./YAxis-CFhChfMS.js";import"./ErrorBarContext-hj7X_ofB.js";import"./Sector-CeUe5N4F.js";const Kt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Kt}];function Xt(s){const e=R.c(61),{instance:n,onConfigure:d,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=L();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const m=ye(r),c=!(n.connection_type==="VIRTUAL")&&m.supportsOAuth&&!m.isAuthenticated,f=n.status!=="active",u=c||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let N;e[7]!==n.title?(N=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=N):N=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==c||e[12]!==a?(S=c?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=c,e[12]=a,e[13]=S):S=e[13];let b;e[14]!==N||e[15]!==S?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[N,S]}),e[14]=N,e[15]=S,e[16]=b):b=e[16];let y;e[17]!==n||e[18]!==c||e[19]!==o||e[20]!==a?(y=c&&t.jsx(H,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=c,e[19]=o,e[20]=a,e[21]=y):y=e[21];let P;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(P=f?t.jsxs(H,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(gt,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(jt,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=P):P=e[26];let $;e[27]!==n||e[28]!==d?($=()=>d(n),e[27]=n,e[28]=d,e[29]=$):$=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let D;e[35]!==$||e[36]!==_||e[37]!==M?(D=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:_,"aria-label":M,children:T}),e[35]=$,e[36]=_,e[37]=M,e[38]=D):D=e[38];let I;e[39]!==n||e[40]!==i?(I=()=>i(n),e[39]=n,e[40]=i,e[41]=I):I=e[41];let v;e[42]!==a?(v=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=v):v=e[43];let j;e[44]!==a?(j=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=j):j=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==I||e[48]!==v||e[49]!==j?(z=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:I,title:v,"aria-label":j,children:E}),e[47]=I,e[48]=v,e[49]=j,e[50]=z):z=e[50];let k;e[51]!==D||e[52]!==z||e[53]!==y||e[54]!==P?(k=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,P,D,z]}),e[51]=D,e[52]=z,e[53]=y,e[54]=P,e[55]=k):k=e[55];let A;return e[56]!==k||e[57]!==h||e[58]!==g||e[59]!==b?(A=t.jsxs("div",{className:h,children:[g,b,k]}),e[56]=k,e[57]=h,e[58]=g,e[59]=b,e[60]=A):A=e[60],A}function Wt(s){const e=R.c(21),{instance:n,onConfigure:d}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let a;e[5]!==n||e[6]!==d?(a=()=>d(n),e[5]=n,e[6]=d,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let m;e[10]!==o?(m=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=m):m=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(ke,{size:13}),e[12]=x):x=e[12];let c;e[13]!==a||e[14]!==r||e[15]!==m?(c=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:r,"aria-label":m,children:x})}),e[13]=a,e[14]=r,e[15]=m,e[16]=c):c=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==c?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,c]}),e[17]=i,e[18]=l,e[19]=c,e[20]=f):f=e[20],f}function Jt(s){const e=R.c(33),{instances:n,onConfigure:d,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,isAdding:r}=s,m=L();if(n.length===0)return null;let x;e[0]!==n.length||e[1]!==m?(x=n.length===1?m("details.connectionInstancesPanel.instance"):m("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=m,e[2]=x):x=e[2];let c;e[3]!==x?(c=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:x}),e[3]=x,e[4]=c):c=e[4];let f;e[5]!==r?(f=r?t.jsx(ve,{size:13,className:"animate-spin"}):t.jsx(ht,{size:13}),e[5]=r,e[6]=f):f=e[6];let u;e[7]!==m?(u=m("details.connectionInstancesPanel.addInstance"),e[7]=m,e[8]=u):u=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(H,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:r,children:[f,u]}),e[9]=r,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==c||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[c,h]}),e[14]=c,e[15]=h,e[16]=g):g=e[16];let N;if(e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==d||e[25]!==i||e[26]!==l?(y=P=>t.jsx(Z.Suspense,{fallback:t.jsx(Wt,{instance:P,onConfigure:d}),children:t.jsx(Xt,{instance:P,onConfigure:d,onAuthenticate:o,onDelete:i,onToggleStatus:l})},P.id),e[23]=o,e[24]=d,e[25]=i,e[26]=l,e[27]=y):y=e[27],N=n.map(y),e[17]=n,e[18]=o,e[19]=d,e[20]=i,e[21]=l,e[22]=N}else N=e[22];let S;e[28]!==N?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:N}),e[28]=N,e[29]=S):S=e[29];let b;return e[30]!==g||e[31]!==S?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=b):b=e[32],b}function Yt(s,e=3){const n=new Map;for(const d of s){if(!d.isError)continue;const o=(d.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([d,o])=>({message:d,count:o})).sort((d,o)=>o.count-d.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=R.c(4),{connectionId:n,orgId:d,timeframe:o}=s,i=L(),l=Me(),a=es(o),{data:r}=ze({queryKey:ae.connectionActivity(n,o,d),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),m=wt(r?.logs??[],a),x=m.data,c=m.totalCalls>0,f=Yt(r?.logs??[]),u=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let h;e[0]!==i?(h=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=h):h=e[1];let g;return e[2]!==h?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:h}),e[2]=h,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),g]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),c?t.jsxs("div",{children:[t.jsx(dt,{config:ts,className:"h-16 w-full",children:t.jsxs(kt,{data:x,barCategoryGap:"4%",children:[t.jsx(mt,{content:t.jsx(ut,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(It,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[x.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),f.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),u>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:u.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:f.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(Tt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ls(s){const e=R.c(19),{connectionId:n}=s,d=L(),[o,i]=Z.useState("14d"),{org:l}=te();let a;e[0]!==d?(a=d("details.connectionActivity.activity"),e[0]=d,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=r):r=e[3];let m;e[4]!==o?(m=Zt.map(g=>t.jsx("button",{type:"button","aria-pressed":o===g.value,onClick:()=>i(g.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===g.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:g.label},g.value)),e[4]=o,e[5]=m):m=e[5];let x;e[6]!==m?(x=t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[6]=m,e[7]=x):x=e[7];let c;e[8]!==r||e[9]!==x?(c=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,x]}),e[8]=r,e[9]=x,e[10]=c):c=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(as,{}),e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==l.id||e[14]!==o?(u=t.jsx(Z.Suspense,{fallback:f,children:t.jsx(ss,{connectionId:n,orgId:l.id,timeframe:o})}),e[12]=n,e[13]=l.id,e[14]=o,e[15]=u):u=e[15];let h;return e[16]!==c||e[17]!==u?(h=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[c,u]}),e[16]=c,e[17]=u,e[18]=h):h=e[18],h}function rs(s){const e=R.c(15),{virtualMcp:n,org:d}=s,o=se();let i;e[0]!==o||e[1]!==d||e[2]!==n.id?(i=()=>{const c=crypto.randomUUID();o({to:"/$org/$taskId",params:{org:d,taskId:c},search:{virtualmcpid:n.id}})},e[0]=o,e[1]=d,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Te,{size:16}),e[4]=l):l=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=m):m=e[10];let x;return e[11]!==i||e[12]!==a||e[13]!==r?(x=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,r,m]}),e[11]=i,e[12]=a,e[13]=r,e[14]=x):x=e[14],x}function cs(s){const e=R.c(7),{virtualMcps:n,org:d}=s;let o;if(e[0]!==d||e[1]!==n){let l;e[3]!==d?(l=a=>t.jsx(rs,{virtualMcp:a,org:d},a.id),e[3]=d,e[4]=l):l=e[4],o=n.map(l),e[0]=d,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=R.c(13),{connection:n}=s,d=L(),{org:o}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=At(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let r;e[3]!==d?(r=d("details.connectionAgentsPanel.usedByAgents"),e[3]=d,e[4]=r):r=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==o.slug||e[8]!==l?(x=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=x):x=e[9];let c;return e[10]!==m||e[11]!==x?(c=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,x]}),e[10]=m,e[11]=x,e[12]=c):c=e[12],c}function ms(s){const e=R.c(35),{tools:n,connectionId:d,org:o}=s,i=L(),l=se(),{org:a}=te();let r;e[0]!==d||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:d,orgId:a.id,orgSlug:a.slug},e[0]=d,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const m=we(r),x=Ce(d);let c;e[4]!==x||e[5]!==d?(c=x?Ae(x):d,e[4]=x,e[5]=d,e[6]=c):c=e[6];const f=c,[u,h]=Z.useState("");let g,N,S,b;if(e[7]!==f||e[8]!==m||e[9]!==l||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const $=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?$.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):$;let T;e[18]!==f||e[19]!==l||e[20]!==o?(T=j=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=T):T=e[21];const D=T;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Escape"&&(h(""),j.target.blur())},e[24]=v):v=e[24],e[25]!==u||e[26]!==I?(b=t.jsx(Mt,{value:u,onChange:h,placeholder:I,onKeyDown:v}),e[25]=u,e[26]=I,e[27]=b):b=e[27],g="flex-1 overflow-auto p-5",N=M.length===0?t.jsx(Se,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(j=>{const E=de(j._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>D(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.annotations?.title??j.name}),t.jsx(ot,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=f,e[8]=m,e[9]=l,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=N,e[16]=S,e[17]=b}else g=e[14],N=e[15],S=e[16],b=e[17];let y;e[28]!==g||e[29]!==N?(y=t.jsx("div",{className:g,children:N}),e[28]=g,e[29]=N,e[30]=y):y=e[30];let P;return e[31]!==S||e[32]!==b||e[33]!==y?(P=t.jsxs("div",{className:S,children:[b,y]}),e[31]=S,e[32]=b,e[33]=y,e[34]=P):P=e[34],P}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),d=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&d.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function re(s){const e=R.c(5),{label:n}=s,d=L();let o;e[0]!==n||e[1]!==d?(o=d("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=d,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=R.c(72),{tools:n,prompts:d,resources:o,connectionId:i,org:l}=s;let a;e[0]!==d?(a=d===void 0?[]:d,e[0]=d,e[1]=a):a=e[1];const r=a;let m;e[2]!==o?(m=o===void 0?[]:o,e[2]=o,e[3]=m):m=e[3];const x=m,c=L(),f=se(),u=Ce(i??"");let h;e[4]!==u||e[5]!==i?(h=u?Ae(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let N;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==l?(N=function(V){!i||!l||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=l,e[11]=N):N=e[11];const S=N;let b;e[12]!==i||e[13]!==l||e[14]!==n?(b=i&&l&&n.some(hs),e[12]=i,e[13]=l,e[14]=n,e[15]=b):b=e[15];const y=b;if(n.length+r.length+x.length===0){let C;e[16]!==c?(C=c("details.connectionCapabilities.capabilities"),e[16]=c,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let G;e[20]!==c?(G=c("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=c,e[21]=G):G=e[21];let F;e[22]!==G?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:G}),e[22]=G,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let $;e[27]!==c||e[28]!==n.length?($=c("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=c,e[28]=n.length,e[29]=$):$=e[29];let _;e[30]!==$?(_=t.jsx(ie,{value:"tools",variant:"underline",children:$}),e[30]=$,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==c?(M=y&&t.jsx(ie,{value:"apps",variant:"underline",children:c("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=c,e[34]=M):M=e[34];let T;e[35]!==c?(T=c("details.connectionCapabilities.promptsTab"),e[35]=c,e[36]=T):T=e[36];let D;e[37]!==T?(D=t.jsx(ie,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=D):D=e[38];let I;e[39]!==c?(I=c("details.connectionCapabilities.resourcesTab"),e[39]=c,e[40]=I):I=e[40];let v;e[41]!==I?(v=t.jsx(ie,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=v):v=e[42];let j;e[43]!==M||e[44]!==D||e[45]!==v||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Pt,{variant:"underline",className:"gap-1",children:[_,M,D,v]})}),e[43]=M,e[44]=D,e[45]=v,e[46]=_,e[47]=j):j=e[47];let E;e[48]!==S||e[49]!==n?(E=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(re,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let k;e[53]!==i||e[54]!==y||e[55]!==l||e[56]!==n?(k=y&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:l})}),e[53]=i,e[54]=y,e[55]=l,e[56]=n,e[57]=k):k=e[57];let A;e[58]!==r?(A=r.length>0?r.map(fs):t.jsx(re,{label:"prompts"}),e[58]=r,e[59]=A):A=e[59];let U;e[60]!==A?(U=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=U):U=e[61];let p;e[62]!==x?(p=x.length>0?x.map(ps):t.jsx(re,{label:"resources"}),e[62]=x,e[63]=p):p=e[63];let w;e[64]!==p?(w=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:p})}),e[64]=p,e[65]=w):w=e[65];let O;return e[66]!==j||e[67]!==z||e[68]!==k||e[69]!==U||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs($t,{defaultValue:"tools",variant:"underline",children:[j,z,k,U,w]})}),e[66]=j,e[67]=z,e[68]=k,e[69]=U,e[70]=w,e[71]=O):O=e[71],O}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(vt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(bt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=R.c(13),{connection:n,displayTitle:d}=s,o=d??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(le,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,e[9]=r):r=e[9];let m;return e[10]!==i||e[11]!==r?(m=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,r]}),e[10]=i,e[11]=r,e[12]=m):m=e[12],m}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:d,onRemoveOAuth:o}){const i=L(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Ue(),m=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),x=r||e.connection_type==="STDIO",c=e.connection_type==="VIRTUAL",f=c?Gt(e.connection_url):null;return c?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),x&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),x&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(W,{})]})}),l==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(W,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(Je,{value:u.value??[],onChange:u.onChange})}),t.jsx(W,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(X,{className:"text-xs text-muted-foreground font-medium",children:i(m?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Ut,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Vt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ft,{size:12})]})})}),t.jsxs(Rt,{align:"start",children:[t.jsxs(xe,{onClick:d,children:[t.jsx(Nt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(J,{type:"password",placeholder:i(m?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(St,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&qt(s.connection_headers)){const d=s.connection_headers,o=Ze(d.envVars);if(bs(d)){const l=vs(d);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(d);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,d=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=tt(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",d=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...d&&{connection_token:d},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:d,tools:o,prompts:i,resources:l,siblings:a}){const r=L(),m=se({from:"/$org/settings/connections/$appSlug"}),x=Le(),c=_e(),{org:f}=te(),u=Ct({onSuccess:()=>{a.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[N,S]=Z.useState(!1),b=ye({connectionId:e}),{data:y}=at(),P=y?.data?.members??[],$=h??s,_=P.find(p=>p.userId===$.created_by),T=s?.connection_type==="VIRTUAL"||b.isAuthenticated,D={...s,tools:o},I=st(D,Qt),v=Be({resolver:He(Ye),values:je(h??s)}),j=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const w=v.getValues(),O=Ss(w),C=h?.id??e;await c.update.mutateAsync({id:C,data:O}),v.reset(w)},z=()=>{v.reset(je(h??s))},k=async p=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:V}=await ft({connectionId:p,orgSlug:f.slug,...w?{scope:w}:{}});if(V||!O){Y.error(r("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await c.update.mutateAsync({id:p,data:{connection_token:O}});else try{await c.update.mutateAsync({id:p,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await c.update.mutateAsync({id:p,data:{connection_token:O}})}else await c.update.mutateAsync({id:p,data:{connection_token:O}});const G=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await x.invalidateQueries({queryKey:ae.isMCPAuthenticated(G.href,null)}),await x.invalidateQueries({queryKey:ae.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>k(s.id),U=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const O=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await x.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...u}),t.jsx(Ge,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(qe,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Ke,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(Qe,{className:"text-base",children:h?.title??s.title}),t.jsx(Xe,{className:"text-xs",children:r("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(lt,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(yt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:v.control,name:"title",render:({field:p})=>t.jsxs(Q,{children:[t.jsx(X,{children:r("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(J,{...p})}),t.jsx(W,{})]})}),t.jsx(K,{control:v.control,name:"description",render:({field:p})=>t.jsxs(Q,{children:[t.jsx(X,{children:r("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(W,{})]})})]}),t.jsx(js,{form:v,connection:h??s,hasOAuthToken:b.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:U}),t.jsx(nt,{connection:h??s,form:v,hasMcpBinding:I,isMCPAuthenticated:T,supportsOAuth:b.supportsOAuth,isServerError:b.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(H,{onClick:E,disabled:!j||d,className:"flex-1",children:r(d?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(H,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(H,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const p=h??s;g(null),u.requestDelete(p)},children:[t.jsx(ce,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(it,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ls,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:p=>g(p),onAuthenticate:p=>k(p.id),onDelete:p=>u.requestDelete(p),onToggleStatus:async(p,w)=>{try{await c.update.mutateAsync({id:p.id,data:{status:w}}),Y.success(r(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:N,onAdd:async()=>{S(!0);try{const p=a[0]??s,w=p.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,V=We("conn");await c.create.mutateAsync({id:V,title:C,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const G=new URL(`/api/${f.slug}/mcp/${V}`,window.location.origin),F=await pt({url:G.href,token:null,orgId:f.id});F.supportsOAuth&&!F.isAuthenticated&&await k(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=R.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const d=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=Ve(o),{org:a}=te(),r=_e();let m;s[2]!==i?(m={slug:i},s[2]=i,s[3]=m):m=s[3];const x=rt(m),c=x[0]??null,f=c?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=we(h);let N;s[8]!==g?(N={client:g},s[8]=g,s[9]=N):N=s[9];const{data:S}=ct(N);let b;if(s[10]!==c?.tools||s[11]!==f||s[12]!==x||s[13]!==S){const k=S?S.tools.map(As):(c?.tools??[]).map(Ts);e:{if(x.length<=1){b=k;break e}const A=new Set,U=[],p=ks;for(const w of x){const O=w.id===f?k:p(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),U.push(C))}b=U.length>0?U:k}s[10]=c?.tools,s[11]=f,s[12]=x,s[13]=S,s[14]=b}else b=s[14];const y=b;let P;s[15]!==g?(P={client:g},s[15]=g,s[16]=P):P=s[16];const{data:$}=xt(P);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Fe(_);let T;s[19]!==$?.prompts?(T=$?.prompts??[],s[19]=$?.prompts,s[20]=T):T=s[20];let D;s[21]!==T?(D=T.map(ws),s[21]=T,s[22]=D):D=s[22];const I=D;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let j;s[25]!==v?(j=v.map(_s),s[25]=v,s[26]=j):j=s[26];const E=j;if(!c){let k;s[27]!==e?(k=e("details.connection.notFoundTitle"),s[27]=e,s[28]=k):k=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let U;s[31]!==d||s[32]!==l?(U=()=>d({to:"/$org/settings/connections",params:{org:l}}),s[31]=d,s[32]=l,s[33]=U):U=s[33];let p;s[34]!==e?(p=e("details.connection.backButton"),s[34]=e,s[35]=p):p=s[35];let w;s[36]!==U||s[37]!==p?(w=t.jsx(H,{variant:"outline",onClick:U,children:p}),s[36]=U,s[37]=p,s[38]=w):w=s[38];let O;return s[39]!==k||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:k,description:A,actions:w})}),s[39]=k,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==r.update.isPending||s[44]!==y||s[45]!==c||s[46]!==f||s[47]!==l||s[48]!==I||s[49]!==E||s[50]!==x?(z=t.jsx(ys,{org:l,connection:c,connectionId:f,isUpdating:r.update.isPending,tools:y,prompts:I,resources:E,siblings:x}),s[43]=r.update.isPending,s[44]=y,s[45]=c,s[46]=f,s[47]=l,s[48]=I,s[49]=E,s[50]=x,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Re,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function $i(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{$i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,b as Ee,o as ze,j as t,Y as $e,n as Ve,K as xe,be as $t,bf as Dt,bg as zt,bh as _t,bi as Et,B as ge,r as pe,D as Rt,H as Lt,p as Qe,e as Ae,t as be}from"./index-WnnLGrso.js";import{e as ke}from"./TrendUp01-B6tyfzkz.js";import{t as it}from"./ChevronDown-_zHtp2mi.js";import{i as ot}from"./ChevronRight-mg1CozRX.js";import{a_ as Ft,a$ as Ut,b0 as Mt,b1 as ct,a5 as At}from"./agent-icon-BNiFw9pa.js";import{s as dt}from"./Trash01-Dy3MdYJw.js";import{B as te}from"./badge-CveqZ_Mf.js";import{I as It}from"./input-CDpdC0tP.js";import{L as Be}from"./label-Dr_BfYzg.js";import{c as mt,d as ut,b as ft,f as xt,g as pt,e as ht,a as bt,A as gt}from"./alert-dialog-Z5MegBZ1.js";import{b as qt,D as Vt,c as Ot,d as Kt,e as Bt}from"./dialog-DJXcn4YI.js";import{S as lt,a as nt,b as at,c as rt,d as jt}from"./select-DUtamJhc.js";import{c as Je,e as Ye,a as we,d as Y,b as We,T as W}from"./table-BBjVFebb.js";import{E as De}from"./empty-state-CnuWCQSl.js";import{a as Ht}from"./use-virtual-mcp-CKxnHsjh.js";import{r as Qt}from"./site-slug-uya6Wp4-.js";import{i as Re}from"./CheckCircle-CJU10mQs.js";import{a as Jt}from"./DotsVertical-DIrSgn8J.js";import{s as Ge}from"./Stars02-CkhejPZU.js";import{n as Tt}from"./LinkExternal01-CowmNsE8.js";import{i as Yt}from"./Monitor01-BisokFUR.js";import{e as Wt}from"./UserSquare-CrW5dbk9.js";import{a as Xe}from"./XCircle-D6rPTffO.js";import{al as Gt,am as Xt,an as Zt}from"./automation-runs-agJj8KWb.js";import{b as es,c as ts,T as ss,a as ls}from"./tabs-Yky_zgts.js";import"./AlertCircle-uCFwUT4D.js";import"./Tool01-Bpm7pW3l.js";import"./ArrowUp-HON1SXj9.js";import"./ArrowLeft-CyFw_ZAc.js";import"./Tool02-D8DKruBK.js";import"./ZapSquare-ChUgXei6.js";import"./ZoomOut-Cp6Wgfdk.js";import"./Users03-Cwu3MDED.js";import"./Check-dMF9hfDW.js";import"./ChevronSelectorVertical-qKYq7QdT.js";import"./ChevronUp-BY_jPS3y.js";import"./Copy01-D4DKkrNa.js";import"./CreditCard01-BzXZ70FC.js";import"./Download01-Br2q00Km.js";import"./Settings02-BWYsBVvl.js";import"./Eye-BawWrBSR.js";import"./FilterLines-CWv0gwTq.js";import"./Share07-CAWy1Jc2.js";import"./GitBranch01-BHQWjDQ8.js";import"./Globe01-2G4S7hap.js";import"./Globe04-dte6e3Tn.js";import"./SwitchHorizontal01-DaHl0WJE.js";import"./HardDrive-D8NpBmYZ.js";import"./Image01-BcfWbfgs.js";import"./Key01-zcL3Jetr.js";import"./LockUnlocked01-B42moyHj.js";import"./LogOut01-pQssVOeo.js";import"./Sun-BzDP5Wkc.js";import"./Package-DqE8AAiL.js";import"./Palette-BIg2FmR0.js";import"./Play-CE83iAVt.js";import"./Plus-6fDaqupl.js";import"./SearchLg-DwCjVmxR.js";import"./SearchMd-CrGhreLP.js";import"./Shield01-DEbNpm3q.js";import"./Stars01-viLOjXnm.js";import"./Upload01-NxuWdNFJ.js";import"./User01-DqbtX0Mm.js";import"./Users01-De14zlGQ.js";import"./XClose-DAdaIat-.js";import"./Zap-xbaG-vsx.js";import"./use-mcp-client-Ck5btS3m.js";import"./constants-dLUUoWH7.js";import"./auth-B6GdneuP.js";import"./useInfiniteQuery-BstDKoVk.js";import"./use-infinite-scroll-BvDU24Je.js";import"./use-connection-Bftf01wB.js";import"./empty-state-DVClfDrw.js";import"./use-members-88UMMKuC.js";import"./use-org-auth-client-COrOxhr5.js";import"./use-automations-BXKtqjHx.js";import"./useSuspenseInfiniteQuery-CAB5Fhd0.js";import"./avatar-CHBxqpBG.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CT9eqfXk.js";import"./markdown-5lzWkOML.js";import"./use-panel-navigate-BMs-s3Nl.js";import"./use-destination-route-r2NrESmX.js";import"./hooks-DUUOu-IF.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BeHY6QEX.js";import"./task-board-071VXUrT.js";import"./schema-DJV9p5H0.js";import"./chat-context-qN2EaF0B.js";import"./thread-route-BWBQm3pm.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DCe2OUth.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BEqXbNTL.js";import"./use-organization-settings-BEo7NnG8.js";import"./monaco-editor-6AHs34Q8.js";import"./spinner-YrauiZby.js";import"./editor-BAheuVgp.js";import"./types-jxIG6gO3.js";import"./shell-layout-Ca02cmCX.js";import"./required-auth-layout-Da1w_Ddb.js";import"./use-org-sso-uLzYuu3I.js";import"./integration-icon-BPFnGyo6.js";import"./use-navigate-to-agent-DQJ0axS8.js";import"./chart-CaBddSEI.js";import"./index-uDYRl3SL.js";import"./AreaChart-CvCIlFBg.js";import"./form-Cz8vlCyU.js";import"./file-type-icon-DgAI6cPK.js";function ns(a){const e=a instanceof Error?a.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}async function as(a){const e=await fetch(a),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new Error(l)}return s}function Le(a){return a==null||!Number.isFinite(a)?"—":a>=1e3?`${(a/1e3).toFixed(a>=1e4?0:1)}s`:`${Math.round(a)}ms`}function Ze(a){const e=(a??"").toLowerCase();return e==="pass"||e==="passed"||e==="ok"||e==="success"}function Se(a){const e=(a??"").toLowerCase();return e==="fail"||e==="failed"||e==="error"}function vt(a){const e=(a??"").toLowerCase();return e==="skip"||e==="skipped"}function He(a,e){return a.viewport&&a.viewport.trim()?a.viewport:`viewport-${e}`}function et(a){const e=U.c(12),{status:s,t:l}=a;if(Se(s)){let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Xe,{className:"size-3"}),e[0]=r):r=e[0];let o;e[1]!==l?(o=l("mainPanelTabs.e2eTab.statusFailed"),e[1]=l,e[2]=o):o=e[2];let c;return e[3]!==o?(c=t.jsxs(te,{variant:"destructive",children:[r,o]}),e[3]=o,e[4]=c):c=e[4],c}if(Ze(s)){let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Re,{className:"size-3"}),e[5]=r):r=e[5];let o;e[6]!==l?(o=l("mainPanelTabs.e2eTab.statusPassed"),e[6]=l,e[7]=o):o=e[7];let c;return e[8]!==o?(c=t.jsxs(te,{variant:"success",children:[r,o]}),e[8]=o,e[9]=c):c=e[9],c}const n=s??"—";let i;return e[10]!==n?(i=t.jsx(te,{variant:"secondary",children:n}),e[10]=n,e[11]=i):i=e[11],i}function rs(a){const e=U.c(4),{status:s}=a;if(Ze(s)){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Re,{className:"size-4 shrink-0 text-success"}),e[0]=n):n=e[0],n}if(Se(s)){let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Xe,{className:"size-4 shrink-0 text-destructive"}),e[1]=n):n=e[1],n}if(vt(s)){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Mt,{className:"size-4 shrink-0 text-muted-foreground"}),e[2]=n):n=e[2],n}let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Jt,{className:"size-4 shrink-0 text-muted-foreground/60"}),e[3]=l):l=e[3],l}function is(a){return Ze(a)?"bg-success":Se(a)?"bg-destructive":vt(a)?"bg-muted-foreground/40":"bg-muted-foreground/25"}function os(a){const e=U.c(4),{steps:s}=a;if(s.length===0)return null;let l;e[0]!==s?(l=s.map(cs),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("div",{className:"flex flex-wrap items-center gap-1",children:l}),e[2]=l,e[3]=n):n=e[3],n}function cs(a,e){return t.jsx("span",{title:a.name??`step ${e+1}`,className:Ve("size-1.5 rounded-full",is(a.status))},e)}const ds=[{key:"lcp",label:"LCP",good:2500,poor:4e3,unit:"ms"},{key:"inp",label:"INP",good:200,poor:500,unit:"ms"},{key:"cls",label:"CLS",good:.1,poor:.25,unit:"cls"},{key:"fcp",label:"FCP",good:1800,poor:3e3,unit:"ms"},{key:"ttfb",label:"TTFB",good:800,poor:1800,unit:"ms"}];function Nt(a){const e=U.c(7),{vitals:s}=a;let l,n,i;if(e[0]!==s){i=Symbol.for("react.early_return_sentinel");e:{const o=ds.filter(c=>{const{key:m}=c,d=s[m];return d!=null&&Number.isFinite(d)});if(o.length===0){i=null;break e}l="grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5",n=o.map(c=>{const{key:m,label:d,good:u,poor:T,unit:p}=c,f=s[m],x=f<=u?"text-success":f<=T?"text-warning":"text-destructive",v=p==="cls"?f.toFixed(3):Le(f);return t.jsxs("div",{className:"flex flex-col gap-1 rounded-lg border border-border bg-muted/30 px-3 py-2",children:[t.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:d}),t.jsx("span",{className:Ve("font-mono text-sm font-semibold tabular-nums",x),children:v})]},m)})}e[0]=s,e[1]=l,e[2]=n,e[3]=i}else l=e[1],n=e[2],i=e[3];if(i!==Symbol.for("react.early_return_sentinel"))return i;let r;return e[4]!==l||e[5]!==n?(r=t.jsx("div",{className:l,children:n}),e[4]=l,e[5]=n,e[6]=r):r=e[6],r}function Ue(a){const e=U.c(17),{icon:s,label:l,badge:n,defaultOpen:i,children:r}=a,o=i===void 0?!1:i,[c,m]=pe.useState(o);let d;e[0]!==c?(d=c?t.jsx(it,{className:"size-4 text-muted-foreground"}):t.jsx(ot,{className:"size-4 text-muted-foreground"}),e[0]=c,e[1]=d):d=e[1];let u;e[2]!==l?(u=t.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=u):u=e[3];let T;e[4]!==n?(T=n!=null&&t.jsx("span",{className:"ml-auto",children:n}),e[4]=n,e[5]=T):T=e[5];let p;e[6]!==s||e[7]!==d||e[8]!==u||e[9]!==T?(p=t.jsxs(Gt,{className:"flex w-full items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-left hover:bg-muted/40",children:[d,s,u,T]}),e[6]=s,e[7]=d,e[8]=u,e[9]=T,e[10]=p):p=e[10];let f;e[11]!==r?(f=t.jsx(Xt,{className:"pt-2",children:r}),e[11]=r,e[12]=f):f=e[12];let x;return e[13]!==c||e[14]!==p||e[15]!==f?(x=t.jsxs(Zt,{open:c,onOpenChange:m,children:[p,f]}),e[13]=c,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function ms(a){const e=U.c(51),{step:s,index:l,t:n}=a;let i;e[0]!==s.status?(i=Se(s.status),e[0]=s.status,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.status?(o=t.jsx(rs,{status:s.status}),e[2]=s.status,e[3]=o):o=e[3];const c=s.step??l+1;let m;e[4]!==c?(m=t.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/60 tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];let d;e[6]!==o||e[7]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-1",children:[o,m]}),e[6]=o,e[7]=m,e[8]=d):d=e[8];let u;e[9]!==l||e[10]!==s.actionDescription||e[11]!==s.name||e[12]!==n?(u=s.name??s.actionDescription??`${n("mainPanelTabs.e2eTab.steps")} ${l+1}`,e[9]=l,e[10]=s.actionDescription,e[11]=s.name,e[12]=n,e[13]=u):u=e[13];let T;e[14]!==s.critical||e[15]!==n?(T=s.critical&&t.jsx(te,{variant:"warning",className:"ml-2 align-middle",children:n("mainPanelTabs.e2eTab.critical")}),e[14]=s.critical,e[15]=n,e[16]=T):T=e[16];let p;e[17]!==u||e[18]!==T?(p=t.jsxs("span",{className:"truncate text-sm font-medium text-foreground",children:[u,T]}),e[17]=u,e[18]=T,e[19]=p):p=e[19];let f;e[20]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Ge,{className:"size-3"}),e[20]=f):f=e[20];let x;e[21]!==s.durationMs?(x=Le(s.durationMs),e[21]=s.durationMs,e[22]=x):x=e[22];let v;e[23]!==x?(v=t.jsxs("span",{className:"flex shrink-0 items-center gap-1 font-mono text-[11px] text-muted-foreground tabular-nums",children:[f,x]}),e[23]=x,e[24]=v):v=e[24];let y;e[25]!==v||e[26]!==p?(y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,v]}),e[25]=v,e[26]=p,e[27]=y):y=e[27];let h;e[28]!==s.actionDescription||e[29]!==s.name?(h=s.actionDescription&&s.actionDescription!==s.name&&t.jsx("p",{className:"text-xs text-muted-foreground",children:s.actionDescription}),e[28]=s.actionDescription,e[29]=s.name,e[30]=h):h=e[30];let P;e[31]!==s.usedSelector?(P=s.usedSelector&&t.jsxs("code",{className:"flex w-fit items-center gap-1 rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground/70",children:[t.jsx(Ut,{className:"size-3 text-muted-foreground"}),s.usedSelector]}),e[31]=s.usedSelector,e[32]=P):P=e[32];let g;e[33]!==r||e[34]!==s.errorDetail||e[35]!==n?(g=r&&s.errorDetail&&t.jsxs("div",{className:"flex items-start gap-1.5 rounded-lg bg-destructive/10 px-2.5 py-2 text-xs text-destructive",children:[t.jsx(Rt,{className:"mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[s.errorDetail.slug&&t.jsx("span",{className:"break-words",children:n("mainPanelTabs.e2eTab.missingSelector",{slug:s.errorDetail.slug})}),s.errorDetail.expected&&t.jsx("span",{className:"break-words text-destructive/80",children:n("mainPanelTabs.e2eTab.expected",{value:s.errorDetail.expected})}),s.errorDetail.suggestion&&t.jsx("span",{className:"break-words text-destructive/80",children:s.errorDetail.suggestion})]})]}),e[33]=r,e[34]=s.errorDetail,e[35]=n,e[36]=g):g=e[36];let b;e[37]!==l||e[38]!==s.name||e[39]!==s.screenshotUrl||e[40]!==n?(b=s.screenshotUrl&&t.jsx("a",{href:s.screenshotUrl,target:"_blank",rel:"noreferrer",className:"mt-1 w-fit","aria-label":n("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:s.screenshotUrl,alt:s.name??`step ${l+1}`,loading:"lazy",className:"max-h-44 rounded-lg border border-border"})}),e[37]=l,e[38]=s.name,e[39]=s.screenshotUrl,e[40]=n,e[41]=b):b=e[41];let N;e[42]!==y||e[43]!==h||e[44]!==P||e[45]!==g||e[46]!==b?(N=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[y,h,P,g,b]}),e[42]=y,e[43]=h,e[44]=P,e[45]=g,e[46]=b,e[47]=N):N=e[47];let j;return e[48]!==N||e[49]!==d?(j=t.jsxs("li",{className:"flex gap-3 py-2.5",children:[d,N]}),e[48]=N,e[49]=d,e[50]=j):j=e[50],j}function us(a){const e=U.c(8),{entries:s,t:l}=a;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noConsole"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let n;e[4]!==s?(n=s.map(fs),e[4]=s,e[5]=n):n=e[5];let i;return e[6]!==n?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:n}),e[6]=n,e[7]=i):i=e[7],i}function fs(a,e){const s=(a.type??"").toLowerCase(),l=s==="error"?"text-destructive":s==="warning"||s==="warn"?"text-warning":"text-foreground/70";return t.jsx("div",{className:"border-b border-border/60 px-2.5 py-1.5 font-mono text-[11px] last:border-b-0",children:t.jsx("span",{className:Ve("break-words",l),children:a.text})},e)}function xs(a){const e=U.c(8),{entries:s,t:l}=a;if(s.length===0){let r;e[0]!==l?(r=l("mainPanelTabs.e2eTab.noNetwork"),e[0]=l,e[1]=r):r=e[1];let o;return e[2]!==r?(o=t.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=o):o=e[3],o}let n;e[4]!==s?(n=s.map(ps),e[4]=s,e[5]=n):n=e[5];let i;return e[6]!==n?(i=t.jsx("div",{className:"flex max-h-72 flex-col overflow-y-auto rounded-lg border border-border",children:n}),e[6]=n,e[7]=i):i=e[7],i}function ps(a,e){const s=(a.status??0)>=400;return t.jsxs("div",{className:"flex items-center gap-2 border-b border-border/60 px-2.5 py-1.5 font-mono text-[11px] last:border-b-0",children:[t.jsx("span",{className:Ve("tabular-nums",s?"text-destructive":"text-muted-foreground"),children:a.status??"—"}),t.jsx("span",{className:"w-10 shrink-0 text-muted-foreground/70",children:a.method}),t.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground/70",children:a.url}),a.resourceType&&t.jsx("span",{className:"shrink-0 text-muted-foreground/50",children:a.resourceType})]},e)}function hs(a){const e=U.c(57),{run:s,page:l,t:n}=a;let i;e[0]!==s.steps?(i=s.steps??[],e[0]=s.steps,e[1]=i):i=e[1];const r=i;let o;e[2]!==r?(o=r.filter(gs),e[2]=r,e[3]=o):o=e[3];const c=o.length;let m;e[4]!==s.console?(m=s.console??[],e[4]=s.console,e[5]=m):m=e[5];const d=m;let u;e[6]!==s.network?(u=s.network??[],e[6]=s.network,e[7]=u):u=e[7];const T=u;let p;e[8]!==d?(p=d.some(bs),e[8]=d,e[9]=p):p=e[9];const f=p;let x;e[10]!==s.verdict||e[11]!==n?(x=t.jsx(et,{status:s.verdict,t:n}),e[10]=s.verdict,e[11]=n,e[12]=x):x=e[12];let v;e[13]!==s.funnelVerdict||e[14]!==s.verdict||e[15]!==n?(v=s.funnelVerdict&&s.funnelVerdict!==s.verdict&&t.jsxs("span",{children:[n("mainPanelTabs.e2eTab.funnel"),":"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.funnelVerdict})]}),e[13]=s.funnelVerdict,e[14]=s.verdict,e[15]=n,e[16]=v):v=e[16];let y;e[17]!==s.durationMs?(y=s.durationMs!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Ge,{className:"size-3"}),Le(s.durationMs)]}),e[17]=s.durationMs,e[18]=y):y=e[18];let h;e[19]!==l?(h=l?.status!=null&&t.jsxs(te,{variant:l.status<400?"secondary":"destructive",children:["HTTP ",l.status]}),e[19]=l,e[20]=h):h=e[20];let P;e[21]!==x||e[22]!==v||e[23]!==y||e[24]!==h?(P=t.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[x,v,y,h]}),e[21]=x,e[22]=v,e[23]=y,e[24]=h,e[25]=P):P=e[25];let g;e[26]!==r?(g=r.length>0&&t.jsx(os,{steps:r}),e[26]=r,e[27]=g):g=e[27];let b;e[28]!==l||e[29]!==n?(b=l?.vitals&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:n("mainPanelTabs.e2eTab.vitals")}),t.jsx(Nt,{vitals:l.vitals})]}),e[28]=l,e[29]=n,e[30]=b):b=e[30];let N;e[31]!==c||e[32]!==r||e[33]!==n?(N=r.length>0&&t.jsx(Ue,{defaultOpen:!0,icon:t.jsx(Re,{className:"size-4 text-muted-foreground"}),label:n("mainPanelTabs.e2eTab.steps"),badge:c>0?t.jsx(te,{variant:"destructive",children:n("mainPanelTabs.e2eTab.failCount",{count:String(c)})}):t.jsx(te,{variant:"secondary",children:n("mainPanelTabs.e2eTab.stepsCount",{count:String(r.length)})}),children:t.jsx("ol",{className:"divide-y divide-border/60 rounded-lg border border-border px-3",children:r.map((D,_)=>t.jsx(ms,{step:D,index:_,t:n},_))})}),e[31]=c,e[32]=r,e[33]=n,e[34]=N):N=e[34];let j;e[35]!==d||e[36]!==f||e[37]!==n?(j=d.length>0&&t.jsx(Ue,{icon:t.jsx(Wt,{className:"size-4 text-muted-foreground"}),label:n("mainPanelTabs.e2eTab.console"),badge:t.jsx(te,{variant:f?"destructive":"secondary",children:d.length}),children:t.jsx(us,{entries:d,t:n})}),e[35]=d,e[36]=f,e[37]=n,e[38]=j):j=e[38];let w;e[39]!==T||e[40]!==n?(w=T.length>0&&t.jsx(Ue,{icon:t.jsx(Yt,{className:"size-4 text-muted-foreground"}),label:n("mainPanelTabs.e2eTab.network"),badge:t.jsx(te,{variant:"secondary",children:T.length}),children:t.jsx(xs,{entries:T,t:n})}),e[39]=T,e[40]=n,e[41]=w):w=e[41];let S;e[42]!==s.videoUrl||e[43]!==n?(S=s.videoUrl&&t.jsx(Ue,{icon:t.jsx(Ft,{className:"size-4 text-muted-foreground"}),label:n("mainPanelTabs.e2eTab.video"),children:t.jsx("video",{controls:!0,src:s.videoUrl,className:"max-h-80 w-full rounded-lg border border-border"})}),e[42]=s.videoUrl,e[43]=n,e[44]=S):S=e[44];let C;e[45]!==s.traceUrl||e[46]!==n?(C=s.traceUrl&&t.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t.jsx(ge,{size:"sm",variant:"secondary",asChild:!0,children:t.jsxs("a",{href:`https://trace.playwright.dev/?trace=${encodeURIComponent(s.traceUrl)}`,target:"_blank",rel:"noreferrer",children:[t.jsx(Tt,{className:"size-4"}),n("mainPanelTabs.e2eTab.openTrace")]})}),t.jsx("a",{href:s.traceUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-muted-foreground hover:text-foreground hover:underline",children:n("mainPanelTabs.e2eTab.downloadTrace")})]}),e[45]=s.traceUrl,e[46]=n,e[47]=C):C=e[47];let k;return e[48]!==P||e[49]!==g||e[50]!==b||e[51]!==N||e[52]!==j||e[53]!==w||e[54]!==S||e[55]!==C?(k=t.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[P,g,b,N,j,w,S,C]}),e[48]=P,e[49]=g,e[50]=b,e[51]=N,e[52]=j,e[53]=w,e[54]=S,e[55]=C,e[56]=k):k=e[56],k}function bs(a){return(a.type??"").toLowerCase()==="error"}function gs(a){return Se(a.status)}function yt(a){const e=U.c(7),{artifacts:s,t:l}=a;let n;if(e[0]!==s||e[1]!==l){const i=s.filter(Ts),r=s.filter(js);let o;e[3]!==l?(o=l("mainPanelTabs.e2eTab.artifacts"),e[3]=l,e[4]=o):o=e[4];let c;e[5]!==o?(c=t.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:o}),e[5]=o,e[6]=c):c=e[6],n=t.jsxs("section",{className:"flex flex-col gap-2",children:[c,s.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:l("mainPanelTabs.e2eTab.noArtifacts")}):t.jsxs("div",{className:"flex flex-col gap-2",children:[i.length>0&&t.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:i.map((m,d)=>t.jsx("a",{href:m.url,target:"_blank",rel:"noreferrer","aria-label":m.name??l("mainPanelTabs.e2eTab.viewScreenshot"),children:t.jsx("img",{src:m.url,alt:m.name??"screenshot",loading:"lazy",className:"w-full rounded-lg border border-border"})},`${m.name??"img"}-${d}`))}),r.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((m,d)=>t.jsxs("a",{href:m.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-border px-2.5 py-1 font-mono text-[11px] text-foreground/80 hover:bg-muted/40",children:[m.name??l("mainPanelTabs.e2eTab.openArtifact"),t.jsx(Tt,{className:"size-3 text-muted-foreground"})]},`${m.name??"artifact"}-${d}`))})]})]}),e[0]=s,e[1]=l,e[2]=n}else n=e[2];return n}function js(a){return!/\.png$/i.test(a.name??"")}function Ts(a){return/\.png$/i.test(a.name??"")}function vs(a){const e=U.c(9),{checks:s,artifacts:l,t:n}=a;let i;e[0]!==s||e[1]!==n?(i=s.length>0?t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:n("mainPanelTabs.e2eTab.checksTitle")}),t.jsx("div",{className:"rounded-lg border border-border",children:t.jsxs(Je,{children:[t.jsx(Ye,{children:t.jsxs(we,{children:[t.jsx(Y,{children:n("mainPanelTabs.e2eTab.colCheck")}),t.jsx(Y,{children:n("mainPanelTabs.e2eTab.colStatus")}),t.jsx(Y,{children:n("mainPanelTabs.e2eTab.colViewport")}),t.jsx(Y,{className:"text-right",children:n("mainPanelTabs.e2eTab.colDuration")})]})}),t.jsx(We,{children:s.map((c,m)=>t.jsxs(we,{children:[t.jsx(W,{className:"text-xs text-foreground",children:c.name??"—"}),t.jsx(W,{children:t.jsx(et,{status:c.status,t:n})}),t.jsx(W,{className:"font-mono text-xs text-muted-foreground",children:c.viewport??"—"}),t.jsx(W,{className:"text-right font-mono text-xs text-muted-foreground tabular-nums",children:Le(c.durationMs)})]},`${c.name??"check"}-${m}`))})]})})]}):t.jsx("p",{className:"text-sm text-muted-foreground",children:n("mainPanelTabs.e2eTab.noReport")}),e[0]=s,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==l||e[4]!==n?(r=t.jsx(yt,{artifacts:l,t:n}),e[3]=l,e[4]=n,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==r?(o=t.jsxs("div",{className:"flex flex-col gap-5",children:[i,r]}),e[6]=i,e[7]=r,e[8]=o):o=e[8],o}function Ns(a){const e=U.c(46),{data:s,t:l}=a,n=s.report??null;let i;e[0]!==n?.runs?(i=n?.runs??[],e[0]=n?.runs,e[1]=i):i=e[1];const r=i;let o;e[2]!==s.checks?(o=s.checks??[],e[2]=s.checks,e[3]=o):o=e[3];const c=o;let m;e[4]!==s.artifacts?(m=s.artifacts??[],e[4]=s.artifacts,e[5]=m):m=e[5];const d=m;let u;if(e[6]!==n?.pages){u=new Map;for(const h of n?.pages??[])h.viewport&&!u.has(h.viewport)&&u.set(h.viewport,h);e[6]=n?.pages,e[7]=u}else u=e[7];const T=r[0];if(n&&T){let h;e[8]!==T?(h=He(T,0),e[8]=T,e[9]=h):h=e[9];let P;if(e[10]!==r||e[11]!==l){let S;e[13]!==l?(S=(C,k)=>{const D=He(C,k);return t.jsxs(es,{value:D,variant:"underline",className:"gap-1.5",children:[Se(C.verdict)?t.jsx(Xe,{className:"size-3.5 text-destructive"}):t.jsx(Re,{className:"size-3.5 text-success"}),C.viewport??`${l("mainPanelTabs.e2eTab.viewport")} ${k+1}`]},D)},e[13]=l,e[14]=S):S=e[14],P=r.map(S),e[10]=r,e[11]=l,e[12]=P}else P=e[12];let g;e[15]!==P?(g=t.jsx(ts,{variant:"underline",className:"flex-wrap",children:P}),e[15]=P,e[16]=g):g=e[16];let b;if(e[17]!==u||e[18]!==r||e[19]!==l){let S;e[21]!==u||e[22]!==l?(S=(C,k)=>{const D=He(C,k);return t.jsx(ss,{value:D,children:t.jsx(hs,{run:C,page:C.viewport?u.get(C.viewport):void 0,t:l})},D)},e[21]=u,e[22]=l,e[23]=S):S=e[23],b=r.map(S),e[17]=u,e[18]=r,e[19]=l,e[20]=b}else b=e[20];let N;e[24]!==h||e[25]!==g||e[26]!==b?(N=t.jsxs(ls,{variant:"underline",defaultValue:h,children:[g,b]}),e[24]=h,e[25]=g,e[26]=b,e[27]=N):N=e[27];let j;e[28]!==d||e[29]!==l?(j=d.length>0&&t.jsx(yt,{artifacts:d,t:l}),e[28]=d,e[29]=l,e[30]=j):j=e[30];let w;return e[31]!==N||e[32]!==j?(w=t.jsxs("div",{className:"flex flex-col gap-5",children:[N,j]}),e[31]=N,e[32]=j,e[33]=w):w=e[33],w}let p;e[34]!==n?.pages?(p=(n?.pages??[]).find(ys)?.vitals,e[34]=n?.pages,e[35]=p):p=e[35];const f=p;let x;e[36]!==f||e[37]!==l?(x=f&&t.jsxs("section",{className:"flex flex-col gap-2",children:[t.jsx("h4",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:l("mainPanelTabs.e2eTab.vitals")}),t.jsx(Nt,{vitals:f})]}),e[36]=f,e[37]=l,e[38]=x):x=e[38];let v;e[39]!==d||e[40]!==c||e[41]!==l?(v=t.jsx(vs,{checks:c,artifacts:d,t:l}),e[39]=d,e[40]=c,e[41]=l,e[42]=v):v=e[42];let y;return e[43]!==x||e[44]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-5",children:[x,v]}),e[43]=x,e[44]=v,e[45]=y):y=e[45],y}function ys(a){return a.vitals}function Ps(a){const e=U.c(50),{base:s,orgSlug:l,site:n,run:i,onOpenChange:r}=a,o=Ee(),c=i?.runId??"",m=i!=null;let d;e[0]!==l||e[1]!==c||e[2]!==n?(d=xe.e2eRun(l,n,c),e[0]=l,e[1]=c,e[2]=n,e[3]=d):d=e[3];let u;e[4]!==s||e[5]!==c?(u=()=>as(`${s}/e2e/runs/${encodeURIComponent(c)}`),e[4]=s,e[5]=c,e[6]=u):u=e[6];const T=m&&!!c;let p;e[7]!==d||e[8]!==u||e[9]!==T?(p={queryKey:d,queryFn:u,enabled:T,retry:!1,staleTime:0,gcTime:0,refetchOnMount:"always"},e[7]=d,e[8]=u,e[9]=T,e[10]=p):p=e[10];const f=ze(p),x=f.data,v=x?.status??i?.status??null,y=i?.summary?.command??null,h=i?.summary?.url??null,P=x?.report?.totalDurationMs??null,g=x?.report?.platform??null;let b;e[11]!==o||e[12]!==v?(b=t.jsx(et,{status:v,t:o}),e[11]=o,e[12]=v,e[13]=b):b=e[13];let N;e[14]!==c?(N=t.jsx($t,{className:"font-mono text-sm text-foreground",children:c}),e[14]=c,e[15]=N):N=e[15];let j;e[16]!==b||e[17]!==N?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[b,N]}),e[16]=b,e[17]=N,e[18]=j):j=e[18];let w;e[19]!==y||e[20]!==o?(w=y&&t.jsxs("span",{children:[o("mainPanelTabs.e2eTab.command")," ",t.jsx("span",{className:"font-medium text-foreground",children:y})]}),e[19]=y,e[20]=o,e[21]=w):w=e[21];let S;e[22]!==g?(S=g&&t.jsx("span",{className:"font-medium text-foreground/70",children:g}),e[22]=g,e[23]=S):S=e[23];let C;e[24]!==P?(C=P!=null&&t.jsxs("span",{className:"flex items-center gap-1 tabular-nums",children:[t.jsx(Ge,{className:"size-3"}),Le(P)]}),e[24]=P,e[25]=C):C=e[25];let k;e[26]!==h?(k=h&&t.jsx("a",{href:h,target:"_blank",rel:"noreferrer",className:"truncate font-mono text-foreground/70 hover:underline",children:h.replace(/^https?:\/\//,"")}),e[26]=h,e[27]=k):k=e[27];let D;e[28]!==C||e[29]!==k||e[30]!==w||e[31]!==S?(D=t.jsx(Dt,{asChild:!0,children:t.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[w,S,C,k]})}),e[28]=C,e[29]=k,e[30]=w,e[31]=S,e[32]=D):D=e[32];let _;e[33]!==D||e[34]!==j?(_=t.jsxs(zt,{className:"border-b border-border",children:[j,D]}),e[33]=D,e[34]=j,e[35]=_):_=e[35];let F;e[36]!==x||e[37]!==f.error||e[38]!==f.isLoading||e[39]!==o?(F=ns(f.error)?t.jsx(De,{icon:t.jsx(Re,{className:"size-5"}),title:o("mainPanelTabs.e2eTab.notConnectedTitle"),description:o("mainPanelTabs.e2eTab.notConnectedDescription")}):f.isLoading?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx($e,{className:"h-9 w-full"}),t.jsx($e,{className:"h-24 w-full"}),t.jsx($e,{className:"h-40 w-full"})]}):f.error?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("mainPanelTabs.e2eTab.detailError")}):x?t.jsx(Ns,{data:x,t:o}):null,e[36]=x,e[37]=f.error,e[38]=f.isLoading,e[39]=o,e[40]=F):F=e[40];let R;e[41]!==F?(R=t.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:F}),e[41]=F,e[42]=R):R=e[42];let L;e[43]!==_||e[44]!==R?(L=t.jsxs(_t,{side:"right",className:"w-full gap-0 p-0 sm:max-w-2xl",children:[_,R]}),e[43]=_,e[44]=R,e[45]=L):L=e[45];let E;return e[46]!==r||e[47]!==m||e[48]!==L?(E=t.jsx(Et,{open:m,onOpenChange:r,children:L}),e[46]=r,e[47]=m,e[48]=L,e[49]=E):E=e[49],E}const Me="once",ws=[{value:Me,labelKey:"mainPanelTabs.e2eTab.scheduleOnce"},{value:"0 * * * *",labelKey:"mainPanelTabs.e2eTab.scheduleHourly"},{value:"0 8 * * *",labelKey:"mainPanelTabs.e2eTab.scheduleDaily"},{value:"0 8 * * 1",labelKey:"mainPanelTabs.e2eTab.scheduleWeekly"}];function Ss(a){const e=U.c(16),{phase:s,t:l}=a,n=(s??"").toLowerCase();if(n==="running"){let o;e[0]!==l?(o=l("mainPanelTabs.e2eTab.statusRunning"),e[0]=l,e[1]=o):o=e[1];let c;return e[2]!==o?(c=t.jsx(te,{variant:"warning",children:o}),e[2]=o,e[3]=c):c=e[3],c}if(n==="succeeded"){let o;e[4]!==l?(o=l("mainPanelTabs.e2eTab.phaseRan"),e[4]=l,e[5]=o):o=e[5];let c;return e[6]!==o?(c=t.jsx(te,{variant:"secondary",children:o}),e[6]=o,e[7]=c):c=e[7],c}if(n==="failed"){let o;e[8]!==l?(o=l("mainPanelTabs.e2eTab.phaseErrored"),e[8]=l,e[9]=o):o=e[9];let c;return e[10]!==o?(c=t.jsx(te,{variant:"destructive",children:o}),e[10]=o,e[11]=c):c=e[11],c}let i;e[12]!==l?(i=l("mainPanelTabs.e2eTab.phasePending"),e[12]=l,e[13]=i):i=e[13];let r;return e[14]!==i?(r=t.jsx(te,{variant:"secondary",children:i}),e[14]=i,e[15]=r):r=e[15],r}function _e(a,e){if(Array.isArray(a))return a;if(a&&typeof a=="object"){const s=a[e];if(Array.isArray(s))return s}return[]}function Pt(a){const e=(a??"").toLowerCase();return e.includes("pass")||e.includes("success")||e.includes("ok")?"success":e.includes("fail")||e.includes("error")?"destructive":e.includes("run")||e.includes("pend")||e.includes("progress")?"warning":"secondary"}function Cs(a,e){const s=Pt(a);return s==="success"?e("mainPanelTabs.e2eTab.statusPassed"):s==="destructive"?e("mainPanelTabs.e2eTab.statusFailed"):s==="warning"?e("mainPanelTabs.e2eTab.statusRunning"):a??"—"}function ks(a,e){const s=[],l=a.summary?.exitCode;typeof l=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryExitCode",{code:String(l)}));const n=a.summary?.fileCount;return typeof n=="number"&&s.push(e("mainPanelTabs.e2eTab.summaryFiles",{count:String(n)})),s.length>0?s.join(" · "):"—"}function wt(a){if(!a)return"—";const e=new Date(a).getTime();if(Number.isNaN(e))return"—";const s=Math.round((Date.now()-e)/1e3),l=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),n=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60]];for(const[i,r]of n)if(Math.abs(s)>=r)return l.format(-Math.round(s/r),i);return l.format(-s,"second")}function $s(a){const e=a instanceof Error?a.message.toLowerCase():"";return e.includes("unauthorized")||e.includes("401")}function Oe(a){return a instanceof Error?a.message:String(a)}async function Ie(a){const e=await fetch(a),s=await e.json().catch(()=>({}));if(!e.ok){const l=s&&typeof s=="object"&&"error"in s?String(s.error):`request failed (${e.status})`;throw new Error(l)}return s}async function qe(a,e,s){const l=await fetch(a,{method:e,headers:s!==void 0?{"Content-Type":"application/json"}:{},body:s!==void 0?JSON.stringify(s):void 0}),n=await l.json().catch(()=>({}));if(!l.ok){const i=n&&typeof n=="object"&&"error"in n?String(n.error):`request failed (${l.status})`;throw new Error(i)}return n}function St(a){const e=U.c(15),{title:s,count:l,action:n,children:i}=a;let r;e[0]!==s?(r=t.jsx("h3",{className:"text-sm font-medium text-foreground",children:s}),e[0]=s,e[1]=r):r=e[1];let o;e[2]!==l?(o=typeof l=="number"&&l>0&&t.jsx(te,{variant:"secondary",className:"tabular-nums",children:l}),e[2]=l,e[3]=o):o=e[3];let c;e[4]!==n?(c=n?t.jsx("div",{className:"ml-auto",children:n}):null,e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r||e[7]!==o||e[8]!==c?(m=t.jsxs("header",{className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[r,o,c]}),e[6]=r,e[7]=o,e[8]=c,e[9]=m):m=e[9];let d;e[10]!==i?(d=t.jsx("div",{className:"p-2",children:i}),e[10]=i,e[11]=d):d=e[11];let u;return e[12]!==m||e[13]!==d?(u=t.jsxs("section",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,d]}),e[12]=m,e[13]=d,e[14]=u):u=e[14],u}function Ct(a){const e=U.c(3),{cols:s}=a;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[0,1,2],e[0]=l):l=e[0];let n;return e[1]!==s?(n=t.jsx("div",{className:"flex flex-col gap-2 p-2",children:l.map(i=>t.jsx("div",{className:"flex gap-3",children:Array.from({length:s}).map(Ds)},i))}),e[1]=s,e[2]=n):n=e[2],n}function Ds(a,e){return t.jsx($e,{className:"h-4 flex-1"},e)}function kt(a){const e=U.c(2),{children:s}=a;let l;return e[0]!==s?(l=t.jsx("div",{className:"px-3 py-6 text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1],l}function zs(a){const e=U.c(117),{base:s,orgSlug:l,site:n}=a,i=Ee(),r=Qe(),[o,c]=pe.useState(!1),[m,d]=pe.useState(""),[u,T]=pe.useState(Me),[p,f]=pe.useState("");let x;e[0]!==l||e[1]!==n?(x=xe.e2eTypes(l,n),e[0]=l,e[1]=n,e[2]=x):x=e[2];let v;e[3]!==s?(v=()=>Ie(`${s}/e2e/types`),e[3]=s,e[4]=v):v=e[4];let y;e[5]!==o||e[6]!==x||e[7]!==v?(y={queryKey:x,queryFn:v,enabled:o,retry:!1,staleTime:6e4},e[5]=o,e[6]=x,e[7]=v,e[8]=y):y=e[8];const h=ze(y),P=_e(h.data,"items");let g;e[9]!==s?(g=me=>{const tt=me.schedule===Me?"":me.schedule,st=me.url.trim();return qe(`${s}/e2e/runs`,"POST",{command:me.command,...tt?{schedule:tt}:{},...st?{url:st}:{}})},e[9]=s,e[10]=g):g=e[10];let b;e[11]!==l||e[12]!==r||e[13]!==n||e[14]!==i?(b=()=>{r.invalidateQueries({queryKey:xe.e2eRuns(l,n)}),r.invalidateQueries({queryKey:xe.e2eChecks(l,n)}),be.success(i("mainPanelTabs.e2eTab.toastRunQueued")),c(!1),d(""),T(Me),f("")},e[11]=l,e[12]=r,e[13]=n,e[14]=i,e[15]=b):b=e[15];let N;e[16]!==g||e[17]!==b?(N={mutationFn:g,onSuccess:b,onError:Es},e[16]=g,e[17]=b,e[18]=N):N=e[18];const j=Ae(N);let w;e[19]!==m?(w=me=>me.id===m,e[19]=m,e[20]=w):w=e[20];const S=P.find(w);let C,k;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=()=>c(!0),k=t.jsx(ct,{className:"size-4"}),e[21]=C,e[22]=k):(C=e[21],k=e[22]);let D;e[23]!==i?(D=i("mainPanelTabs.e2eTab.runTest"),e[23]=i,e[24]=D):D=e[24];let _;e[25]!==D?(_=t.jsxs(ge,{size:"sm",onClick:C,children:[k,D]}),e[25]=D,e[26]=_):_=e[26];const F=Vt,R=qt,L="sm:max-w-md";let E;e[27]!==i?(E=i("mainPanelTabs.e2eTab.runTestTitle"),e[27]=i,e[28]=E):E=e[28];let B;e[29]!==E?(B=t.jsx(Ot,{children:t.jsx(Kt,{children:E})}),e[29]=E,e[30]=B):B=e[30];const G="flex flex-col gap-3";let de;e[31]!==i?(de=i("mainPanelTabs.e2eTab.runTestDescription"),e[31]=i,e[32]=de):de=e[32];let M;e[33]!==de?(M=t.jsx("p",{className:"text-sm text-muted-foreground",children:de}),e[33]=de,e[34]=M):M=e[34];let A;e[35]!==i?(A=i("mainPanelTabs.e2eTab.targetUrl"),e[35]=i,e[36]=A):A=e[36];let I;e[37]!==A?(I=t.jsx(Be,{htmlFor:"e2e-url",children:A}),e[37]=A,e[38]=I):I=e[38];let X;e[39]!==i?(X=i("mainPanelTabs.e2eTab.targetUrlPlaceholder"),e[39]=i,e[40]=X):X=e[40];let Z;e[41]===Symbol.for("react.memo_cache_sentinel")?(Z=me=>f(me.target.value),e[41]=Z):Z=e[41];let q;e[42]!==j.isPending||e[43]!==X||e[44]!==p?(q=t.jsx(It,{id:"e2e-url",type:"url",inputMode:"url",placeholder:X,value:p,onChange:Z,className:"font-mono text-xs",disabled:j.isPending}),e[42]=j.isPending,e[43]=X,e[44]=p,e[45]=q):q=e[45];let V;e[46]!==i?(V=i("mainPanelTabs.e2eTab.targetUrlHint"),e[46]=i,e[47]=V):V=e[47];let O;e[48]!==V?(O=t.jsx("p",{className:"text-xs text-muted-foreground",children:V}),e[48]=V,e[49]=O):O=e[49];let H;e[50]!==I||e[51]!==q||e[52]!==O?(H=t.jsxs("div",{className:"flex flex-col gap-2",children:[I,q,O]}),e[50]=I,e[51]=q,e[52]=O,e[53]=H):H=e[53];const se="flex flex-col gap-2";let z;e[54]!==i?(z=i("mainPanelTabs.e2eTab.selectType"),e[54]=i,e[55]=z):z=e[55];let ee;e[56]!==z?(ee=t.jsx(Be,{children:z}),e[56]=z,e[57]=ee):ee=e[57];const Ce=h.isLoading?t.jsx($e,{className:"h-9 w-full"}):h.error?t.jsx("p",{className:"text-xs text-destructive",children:i("mainPanelTabs.e2eTab.typesError")}):P.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:i("mainPanelTabs.e2eTab.noTypes")}):t.jsxs(lt,{value:m,onValueChange:d,children:[t.jsx(nt,{className:"w-full",children:t.jsx(at,{placeholder:i("mainPanelTabs.e2eTab.selectTypePlaceholder")})}),t.jsx(rt,{children:P.map(_s)})]});let le;e[58]!==S?(le=S?.description&&t.jsx("p",{className:"text-xs text-muted-foreground",children:S.description}),e[58]=S,e[59]=le):le=e[59];let ne;e[60]!==ee||e[61]!==Ce||e[62]!==le?(ne=t.jsxs("div",{className:se,children:[ee,Ce,le]}),e[60]=ee,e[61]=Ce,e[62]=le,e[63]=ne):ne=e[63];let ae;e[64]!==i?(ae=i("mainPanelTabs.e2eTab.scheduleLabel"),e[64]=i,e[65]=ae):ae=e[65];let he;e[66]!==ae?(he=t.jsx(Be,{children:ae}),e[66]=ae,e[67]=he):he=e[67];let ue;e[68]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(nt,{className:"w-full",children:t.jsx(at,{})}),e[68]=ue):ue=e[68];let re;e[69]!==i?(re=ws.map(me=>t.jsx(jt,{value:me.value,children:i(me.labelKey)},me.value||"once")),e[69]=i,e[70]=re):re=e[70];let ie;e[71]!==re?(ie=t.jsx(rt,{children:re}),e[71]=re,e[72]=ie):ie=e[72];let oe;e[73]!==u||e[74]!==ie?(oe=t.jsxs(lt,{value:u,onValueChange:T,children:[ue,ie]}),e[73]=u,e[74]=ie,e[75]=oe):oe=e[75];let ce;e[76]!==he||e[77]!==oe?(ce=t.jsxs("div",{className:"flex flex-col gap-2",children:[he,oe]}),e[76]=he,e[77]=oe,e[78]=ce):ce=e[78];let fe;e[79]!==M||e[80]!==H||e[81]!==ne||e[82]!==ce?(fe=t.jsxs("div",{className:G,children:[M,H,ne,ce]}),e[79]=M,e[80]=H,e[81]=ne,e[82]=ce,e[83]=fe):fe=e[83];let $;e[84]===Symbol.for("react.memo_cache_sentinel")?($=()=>c(!1),e[84]=$):$=e[84];const Q=j.isPending;let K;e[85]!==i?(K=i("mainPanelTabs.e2eTab.cancel"),e[85]=i,e[86]=K):K=e[86];let J;e[87]!==j.isPending||e[88]!==K?(J=t.jsx(ge,{variant:"outline",type:"button",onClick:$,disabled:Q,children:K}),e[87]=j.isPending,e[88]=K,e[89]=J):J=e[89];let je;e[90]!==m||e[91]!==j||e[92]!==u||e[93]!==p?(je=()=>m&&j.mutate({command:m,schedule:u,url:p}),e[90]=m,e[91]=j,e[92]=u,e[93]=p,e[94]=je):je=e[94];const Ke=!m||j.isPending;let Te;e[95]!==j.isPending||e[96]!==i?(Te=j.isPending?i("mainPanelTabs.e2eTab.running"):i("mainPanelTabs.e2eTab.runConfirm"),e[95]=j.isPending,e[96]=i,e[97]=Te):Te=e[97];let ve;e[98]!==je||e[99]!==Ke||e[100]!==Te?(ve=t.jsx(ge,{type:"button",onClick:je,disabled:Ke,children:Te}),e[98]=je,e[99]=Ke,e[100]=Te,e[101]=ve):ve=e[101];let Ne;e[102]!==J||e[103]!==ve?(Ne=t.jsxs(Bt,{children:[J,ve]}),e[102]=J,e[103]=ve,e[104]=Ne):Ne=e[104];let ye;e[105]!==R||e[106]!==B||e[107]!==fe||e[108]!==Ne?(ye=t.jsxs(R,{className:L,children:[B,fe,Ne]}),e[105]=R,e[106]=B,e[107]=fe,e[108]=Ne,e[109]=ye):ye=e[109];let Pe;e[110]!==F||e[111]!==o||e[112]!==ye?(Pe=t.jsx(F,{open:o,onOpenChange:c,children:ye}),e[110]=F,e[111]=o,e[112]=ye,e[113]=Pe):Pe=e[113];let Fe;return e[114]!==_||e[115]!==Pe?(Fe=t.jsxs(t.Fragment,{children:[_,Pe]}),e[114]=_,e[115]=Pe,e[116]=Fe):Fe=e[116],Fe}function _s(a){return t.jsx(jt,{value:a.id,textValue:a.label??a.id,children:t.jsx("span",{className:"text-sm",children:a.label??a.id})},a.id)}function Es(a){return be.error(Oe(a))}function Rs(){const a=U.c(17),e=Ee(),[s,l]=pe.useState(!1);let n;a[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>l(Ls),a[0]=n):n=a[0];let i;a[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(At,{className:"size-4 text-muted-foreground"}),a[1]=i):i=a[1];let r;a[2]!==e?(r=e("mainPanelTabs.e2eTab.helpTitle"),a[2]=e,a[3]=r):r=a[3];let o;a[4]!==r?(o=t.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),a[4]=r,a[5]=o):o=a[5];let c;a[6]!==s?(c=s?t.jsx(it,{className:"ml-auto size-4 text-muted-foreground"}):t.jsx(ot,{className:"ml-auto size-4 text-muted-foreground"}),a[6]=s,a[7]=c):c=a[7];let m;a[8]!==o||a[9]!==c?(m=t.jsxs("button",{type:"button",onClick:n,className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[i,o,c]}),a[8]=o,a[9]=c,a[10]=m):m=a[10];let d;a[11]!==s||a[12]!==e?(d=s&&t.jsxs("div",{className:"flex flex-col gap-2 border-t border-border px-4 py-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpIntro")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpTypes")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpRun")}),t.jsx("p",{children:e("mainPanelTabs.e2eTab.helpResults")})]}),a[11]=s,a[12]=e,a[13]=d):d=a[13];let u;return a[14]!==m||a[15]!==d?(u=t.jsxs("div",{className:"rounded-xl border border-border bg-card",children:[m,d]}),a[14]=m,a[15]=d,a[16]=u):u=a[16],u}function Ls(a){return!a}function Fs(a){const e=U.c(71),{base:s,orgSlug:l,site:n,enabled:i}=a,r=Ee(),o=Qe(),[c,m]=pe.useState(!1);let d;e[0]!==l||e[1]!==n?(d=xe.e2eChecks(l,n),e[0]=l,e[1]=n,e[2]=d):d=e[2];let u;e[3]!==s?(u=()=>Ie(`${s}/e2e/checks`),e[3]=s,e[4]=u):u=e[4];let T;e[5]!==i||e[6]!==d||e[7]!==u?(T={queryKey:d,queryFn:u,enabled:i,retry:!1,staleTime:15e3,refetchInterval:As},e[5]=i,e[6]=d,e[7]=u,e[8]=T):T=e[8];const p=ze(T),f=_e(p.data,"items");let x;e[9]!==l||e[10]!==o||e[11]!==n?(x=()=>{o.invalidateQueries({queryKey:xe.e2eChecks(l,n)}),o.invalidateQueries({queryKey:xe.e2eRuns(l,n)})},e[9]=l,e[10]=o,e[11]=n,e[12]=x):x=e[12];const v=x;let y;e[13]!==s?(y=z=>qe(`${s}/e2e/runs`,"POST",{command:z}),e[13]=s,e[14]=y):y=e[14];let h;e[15]!==v||e[16]!==r?(h=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastRunQueued"))},e[15]=v,e[16]=r,e[17]=h):h=e[17];let P;e[18]!==y||e[19]!==h?(P={mutationFn:y,onSuccess:h,onError:Ms},e[18]=y,e[19]=h,e[20]=P):P=e[20];const g=Ae(P);let b;e[21]!==s?(b=()=>qe(`${s}/e2e/checks`,"DELETE"),e[21]=s,e[22]=b):b=e[22];let N;e[23]!==v||e[24]!==r?(N=()=>{v(),be.success(r("mainPanelTabs.e2eTab.toastCheckDeleted")),m(!1)},e[23]=v,e[24]=r,e[25]=N):N=e[25];let j;e[26]!==b||e[27]!==N?(j={mutationFn:b,onSuccess:N,onError:Us},e[26]=b,e[27]=N,e[28]=j):j=e[28];const w=Ae(j),S=g.isPending||w.isPending,C=St;let k;e[29]!==r?(k=r("mainPanelTabs.e2eTab.checksSection"),e[29]=r,e[30]=k):k=e[30];const D=f.length,_=f.length>0?t.jsxs(ge,{size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive",onClick:()=>m(!0),disabled:S,children:[t.jsx(dt,{className:"size-4"}),r("mainPanelTabs.e2eTab.deleteAllChecks")]}):null,F=p.isLoading?t.jsx(Ct,{cols:6}):p.error?t.jsx(kt,{children:r("mainPanelTabs.e2eTab.checksError")}):f.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:r("mainPanelTabs.e2eTab.noChecks")}):t.jsxs(Je,{children:[t.jsx(Ye,{children:t.jsxs(we,{children:[t.jsx(Y,{children:r("mainPanelTabs.e2eTab.colStatus")}),t.jsx(Y,{children:r("mainPanelTabs.e2eTab.colCommand")}),t.jsx(Y,{children:r("mainPanelTabs.e2eTab.colSchedule")}),t.jsx(Y,{children:r("mainPanelTabs.e2eTab.url")}),t.jsx(Y,{children:r("mainPanelTabs.e2eTab.colUpdated")}),t.jsx(Y,{className:"w-[1%]"})]})}),t.jsx(We,{children:f.map((z,ee)=>t.jsxs(we,{children:[t.jsx(W,{children:t.jsx(Ss,{phase:z.phase,t:r})}),t.jsx(W,{className:"font-mono text-xs text-muted-foreground",children:z.command??"—"}),t.jsx(W,{className:"font-mono text-xs text-muted-foreground",children:z.schedule?z.schedule:"—"}),t.jsx(W,{className:"max-w-[220px] truncate font-mono text-xs text-muted-foreground",children:z.url??"—"}),t.jsx(W,{className:"text-xs text-muted-foreground whitespace-nowrap",children:wt(z.updatedAt)}),t.jsx(W,{className:"text-right align-middle whitespace-nowrap",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":r("mainPanelTabs.e2eTab.rerun"),title:r("mainPanelTabs.e2eTab.rerun"),onClick:()=>z.command&&g.mutate(z.command),disabled:S||!z.command,children:t.jsx(ct,{className:"size-4"})})})]},`${z.subject??n}-${z.command??""}-${ee}`))})]});let R;e[31]!==r?(R=r("mainPanelTabs.e2eTab.confirmDeleteCheckTitle"),e[31]=r,e[32]=R):R=e[32];let L;e[33]!==R?(L=t.jsx(mt,{children:R}),e[33]=R,e[34]=L):L=e[34];let E;e[35]!==r?(E=r("mainPanelTabs.e2eTab.confirmDeleteCheck"),e[35]=r,e[36]=E):E=e[36];let B;e[37]!==E?(B=t.jsx(ut,{children:E}),e[37]=E,e[38]=B):B=e[38];let G;e[39]!==L||e[40]!==B?(G=t.jsxs(ft,{children:[L,B]}),e[39]=L,e[40]=B,e[41]=G):G=e[41];const de=w.isPending;let M;e[42]!==r?(M=r("mainPanelTabs.e2eTab.cancel"),e[42]=r,e[43]=M):M=e[43];let A;e[44]!==w.isPending||e[45]!==M?(A=t.jsx(xt,{disabled:de,children:M}),e[44]=w.isPending,e[45]=M,e[46]=A):A=e[46];let I;e[47]!==w?(I=z=>{z.preventDefault(),w.mutate()},e[47]=w,e[48]=I):I=e[48];const X=w.isPending;let Z;e[49]!==r?(Z=r("mainPanelTabs.e2eTab.delete"),e[49]=r,e[50]=Z):Z=e[50];let q;e[51]!==w.isPending||e[52]!==I||e[53]!==Z?(q=t.jsx(pt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:I,disabled:X,children:Z}),e[51]=w.isPending,e[52]=I,e[53]=Z,e[54]=q):q=e[54];let V;e[55]!==A||e[56]!==q?(V=t.jsxs(ht,{children:[A,q]}),e[55]=A,e[56]=q,e[57]=V):V=e[57];let O;e[58]!==G||e[59]!==V?(O=t.jsxs(bt,{children:[G,V]}),e[58]=G,e[59]=V,e[60]=O):O=e[60];let H;e[61]!==c||e[62]!==O?(H=t.jsx(gt,{open:c,onOpenChange:m,children:O}),e[61]=c,e[62]=O,e[63]=H):H=e[63];let se;return e[64]!==C||e[65]!==f||e[66]!==k||e[67]!==_||e[68]!==F||e[69]!==H?(se=t.jsxs(C,{title:k,count:D,action:_,children:[F,H]}),e[64]=C,e[65]=f,e[66]=k,e[67]=_,e[68]=F,e[69]=H,e[70]=se):se=e[70],se}function Us(a){return be.error(Oe(a))}function Ms(a){return be.error(Oe(a))}function As(a){return _e(a.state.data,"items").some(Is)?5e3:!1}function Is(a){const e=(a.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}function Yn(a){const e=U.c(107),{virtualMcpId:s}=a,l=Ee(),{org:n}=Lt(),i=Ht(s),r=Qt(i),o=!!r,c=r?`/api/${n.slug}/hosting/${encodeURIComponent(r)}`:"",m=Qe(),[d,u]=pe.useState(null),[T,p]=pe.useState(null);let f;e[0]!==c?(f=()=>Ie(`${c}/e2e/checks`),e[0]=c,e[1]=f):f=e[1];const x=ze({queryKey:xe.e2eChecks(n.slug,r??""),queryFn:f,enabled:o,retry:!1,staleTime:15e3}),v=_e(x.data,"items").some(Vs);let y;e[2]!==c?(y=()=>Ie(`${c}/e2e/runs`),e[2]=c,e[3]=y):y=e[3];const h=ze({queryKey:xe.e2eRuns(n.slug,r??""),queryFn:y,enabled:o,retry:!1,staleTime:3e4,refetchInterval:v?5e3:!1});let P;e[4]!==c?(P=$=>qe(`${c}/e2e/runs/${encodeURIComponent($)}`,"DELETE"),e[4]=c,e[5]=P):P=e[5];const g=Ae({mutationFn:P,onSuccess:()=>{m.invalidateQueries({queryKey:xe.e2eRuns(n.slug,r??"")}),be.success(l("mainPanelTabs.e2eTab.toastRunDeleted")),p(null)},onError:qs});if(!r){let $;e[6]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[6]=$):$=e[6];let Q;e[7]!==l?(Q=l("mainPanelTabs.e2eTab.noSiteTitle"),e[7]=l,e[8]=Q):Q=e[8];let K;e[9]!==l?(K=l("mainPanelTabs.e2eTab.noSiteDescription"),e[9]=l,e[10]=K):K=e[10];let J;return e[11]!==Q||e[12]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:Q,description:K})}),e[11]=Q,e[12]=K,e[13]=J):J=e[13],J}if($s(h.error)){let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(ke,{className:"size-5"}),e[14]=$):$=e[14];let Q;e[15]!==l?(Q=l("mainPanelTabs.e2eTab.notConnectedTitle"),e[15]=l,e[16]=Q):Q=e[16];let K;e[17]!==l?(K=l("mainPanelTabs.e2eTab.notConnectedDescription"),e[17]=l,e[18]=K):K=e[18];let J;return e[19]!==Q||e[20]!==K?(J=t.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:t.jsx(De,{icon:$,title:Q,description:K})}),e[19]=Q,e[20]=K,e[21]=J):J=e[21],J}const b=_e(h.data,"items"),N="h-full min-h-0 overflow-y-auto",j="mx-auto flex max-w-4xl flex-col gap-6 p-6";let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(ke,{className:"size-[18px] text-muted-foreground"}),e[22]=w):w=e[22];let S;e[23]!==l?(S=l("mainPanelTabs.e2eTab.title"),e[23]=l,e[24]=S):S=e[24];let C;e[25]!==S?(C=t.jsxs("div",{className:"flex items-center gap-2",children:[w,t.jsx("h2",{className:"text-base font-semibold text-foreground",children:S})]}),e[25]=S,e[26]=C):C=e[26];const k=l("mainPanelTabs.e2eTab.subtitle",{site:r});let D;e[27]!==k?(D=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[27]=k,e[28]=D):D=e[28];let _;e[29]!==D||e[30]!==C?(_=t.jsxs("div",{className:"flex flex-col gap-1",children:[C,D]}),e[29]=D,e[30]=C,e[31]=_):_=e[31];let F;e[32]!==c||e[33]!==n.slug||e[34]!==r?(F=t.jsx(zs,{base:c,orgSlug:n.slug,site:r}),e[32]=c,e[33]=n.slug,e[34]=r,e[35]=F):F=e[35];let R;e[36]!==_||e[37]!==F?(R=t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[_,F]}),e[36]=_,e[37]=F,e[38]=R):R=e[38];let L;e[39]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(Rs,{}),e[39]=L):L=e[39];let E;e[40]!==c||e[41]!==o||e[42]!==n.slug||e[43]!==r?(E=t.jsx(Fs,{base:c,orgSlug:n.slug,site:r,enabled:o}),e[40]=c,e[41]=o,e[42]=n.slug,e[43]=r,e[44]=E):E=e[44];const B=St;let G;e[45]!==l?(G=l("mainPanelTabs.e2eTab.runs"),e[45]=l,e[46]=G):G=e[46];const de=h.isLoading?t.jsx(Ct,{cols:5}):h.error?t.jsx(kt,{children:l("mainPanelTabs.e2eTab.runsError")}):b.length===0?t.jsx(De,{icon:t.jsx(ke,{className:"size-5"}),title:l("mainPanelTabs.e2eTab.noRuns")}):t.jsxs(Je,{children:[t.jsx(Ye,{children:t.jsxs(we,{children:[t.jsx(Y,{children:l("mainPanelTabs.e2eTab.colRun")}),t.jsx(Y,{children:l("mainPanelTabs.e2eTab.colStatus")}),t.jsx(Y,{children:l("mainPanelTabs.e2eTab.colCommand")}),t.jsx(Y,{children:l("mainPanelTabs.e2eTab.colStarted")}),t.jsx(Y,{children:l("mainPanelTabs.e2eTab.colSummary")}),t.jsx(Y,{className:"w-[1%]"})]})}),t.jsx(We,{children:b.map($=>t.jsxs(we,{className:"cursor-pointer",onClick:()=>u($),children:[t.jsx(W,{className:"font-mono text-xs",children:$.runId}),t.jsx(W,{children:t.jsx(te,{variant:Pt($.status),children:Cs($.status,l)})}),t.jsx(W,{className:"font-mono text-xs text-muted-foreground",children:$.summary?.command??"—"}),t.jsx(W,{className:"text-xs text-muted-foreground whitespace-nowrap",children:wt($.startedAt)}),t.jsx(W,{className:"text-xs text-muted-foreground whitespace-nowrap tabular-nums",children:ks($,l)}),t.jsx(W,{className:"text-right align-middle",children:t.jsx(ge,{size:"icon-sm",variant:"ghost","aria-label":l("mainPanelTabs.e2eTab.deleteRun"),onClick:Q=>{Q.stopPropagation(),p($)},disabled:g.isPending,children:t.jsx(dt,{className:"size-4"})})})]},$.runId))})]});let M;e[47]!==B||e[48]!==b||e[49]!==G||e[50]!==de?(M=t.jsx(B,{title:G,count:b.length,children:de}),e[47]=B,e[48]=b,e[49]=G,e[50]=de,e[51]=M):M=e[51];let A;e[52]!==R||e[53]!==L||e[54]!==E||e[55]!==M?(A=t.jsxs("div",{className:j,children:[R,L,E,M]}),e[52]=R,e[53]=L,e[54]=E,e[55]=M,e[56]=A):A=e[56];let I;e[57]!==u?(I=$=>{$||u(null)},e[57]=u,e[58]=I):I=e[58];let X;e[59]!==c||e[60]!==n.slug||e[61]!==d||e[62]!==r||e[63]!==I?(X=t.jsx(Ps,{base:c,orgSlug:n.slug,site:r,run:d,onOpenChange:I}),e[59]=c,e[60]=n.slug,e[61]=d,e[62]=r,e[63]=I,e[64]=X):X=e[64];const Z=T!=null;let q;e[65]!==p?(q=$=>{$||p(null)},e[65]=p,e[66]=q):q=e[66];let V;e[67]!==l?(V=l("mainPanelTabs.e2eTab.confirmDeleteRunTitle"),e[67]=l,e[68]=V):V=e[68];let O;e[69]!==V?(O=t.jsx(mt,{children:V}),e[69]=V,e[70]=O):O=e[70];const H=T?.runId??"";let se;e[71]!==l||e[72]!==H?(se=l("mainPanelTabs.e2eTab.confirmDeleteRun",{runId:H}),e[71]=l,e[72]=H,e[73]=se):se=e[73];let z;e[74]!==se?(z=t.jsx(ut,{children:se}),e[74]=se,e[75]=z):z=e[75];let ee;e[76]!==O||e[77]!==z?(ee=t.jsxs(ft,{children:[O,z]}),e[76]=O,e[77]=z,e[78]=ee):ee=e[78];const Ce=g.isPending;let le;e[79]!==l?(le=l("mainPanelTabs.e2eTab.cancel"),e[79]=l,e[80]=le):le=e[80];let ne;e[81]!==g.isPending||e[82]!==le?(ne=t.jsx(xt,{disabled:Ce,children:le}),e[81]=g.isPending,e[82]=le,e[83]=ne):ne=e[83];let ae;e[84]!==g||e[85]!==T?(ae=$=>{$.preventDefault(),T&&g.mutate(T.runId)},e[84]=g,e[85]=T,e[86]=ae):ae=e[86];const he=g.isPending;let ue;e[87]!==l?(ue=l("mainPanelTabs.e2eTab.delete"),e[87]=l,e[88]=ue):ue=e[88];let re;e[89]!==g.isPending||e[90]!==ae||e[91]!==ue?(re=t.jsx(pt,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:ae,disabled:he,children:ue}),e[89]=g.isPending,e[90]=ae,e[91]=ue,e[92]=re):re=e[92];let ie;e[93]!==ne||e[94]!==re?(ie=t.jsxs(ht,{children:[ne,re]}),e[93]=ne,e[94]=re,e[95]=ie):ie=e[95];let oe;e[96]!==ee||e[97]!==ie?(oe=t.jsxs(bt,{children:[ee,ie]}),e[96]=ee,e[97]=ie,e[98]=oe):oe=e[98];let ce;e[99]!==Z||e[100]!==q||e[101]!==oe?(ce=t.jsx(gt,{open:Z,onOpenChange:q,children:oe}),e[99]=Z,e[100]=q,e[101]=oe,e[102]=ce):ce=e[102];let fe;return e[103]!==A||e[104]!==X||e[105]!==ce?(fe=t.jsxs("div",{className:N,children:[A,X,ce]}),e[103]=A,e[104]=X,e[105]=ce,e[106]=fe):fe=e[106],fe}function qs(a){return be.error(Oe(a))}function Vs(a){const e=(a.phase??"").toLowerCase();return e===""||e==="running"||e==="pending"}export{Yn as E2eTab};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as se,b as Te,r as d,j as r,k as pe,B as Re,fm as en,bs as tn,by as ge,fn as nn,fo as rn,fp as on,fq as sn,cP as an,fr as ln,fs as dt,bu as cn,ft as dn,fu as un,fv as fn,fw as pn,fx as mn,fy as xn,fz as hn,fA as gn,fB as bn,n as le,p as yn,t as te,ab as tt,a8 as nt,a9 as rt,K as ot}from"./index-WnnLGrso.js";import{T as vn,b3 as Cn,b4 as wn}from"./agent-icon-BNiFw9pa.js";import{s as Nn}from"./XClose-DAdaIat-.js";import{S as jn}from"./scroll-area-BQmQE4CQ.js";import{a as En}from"./chat-context-qN2EaF0B.js";import{F as Sn}from"./editor-BAheuVgp.js";import{u as Dn}from"./shell-layout-Ca02cmCX.js";import{s as je,a as st,f as Mn,b as Rn}from"./index-B86zcZyY.js";import{d as Tn,h as Pn,c as kn,e as Fn,b as An,D as Ln}from"./dialog-DJXcn4YI.js";import{I as it}from"./input-CDpdC0tP.js";import{c as On,d as In,b as Kn,f as zn,g as $n,e as _n,a as Gn,A as Bn}from"./alert-dialog-Z5MegBZ1.js";import{t as Vn}from"./ChevronDown-_zHtp2mi.js";import{i as Un}from"./ChevronRight-mg1CozRX.js";import{i as qn}from"./Share07-CAWy1Jc2.js";import{i as Hn,E as Wn,e as Oe,h as Qn,j as Xn,k as Yn,l as Jn,t as re,m as Ee,n as Ie,o as Se,g as Ke,p as ze,q as Zn,s as er,v as tr,r as $e,u as De,w as _e,x as nr,y as rr,z as or,A as sr}from"./skill-preview-CumaRjCm.js";import"./AlertCircle-uCFwUT4D.js";import"./UserSquare-CrW5dbk9.js";import"./Tool01-Bpm7pW3l.js";import"./ArrowUp-HON1SXj9.js";import"./ArrowLeft-CyFw_ZAc.js";import"./Tool02-D8DKruBK.js";import"./XCircle-D6rPTffO.js";import"./TrendUp01-B6tyfzkz.js";import"./ZapSquare-ChUgXei6.js";import"./ZoomOut-Cp6Wgfdk.js";import"./Users03-Cwu3MDED.js";import"./CheckCircle-CJU10mQs.js";import"./Check-dMF9hfDW.js";import"./ChevronSelectorVertical-qKYq7QdT.js";import"./ChevronUp-BY_jPS3y.js";import"./DotsVertical-DIrSgn8J.js";import"./Stars02-CkhejPZU.js";import"./Copy01-D4DKkrNa.js";import"./CreditCard01-BzXZ70FC.js";import"./Download01-Br2q00Km.js";import"./Settings02-BWYsBVvl.js";import"./Eye-BawWrBSR.js";import"./FilterLines-CWv0gwTq.js";import"./GitBranch01-BHQWjDQ8.js";import"./Globe01-2G4S7hap.js";import"./Globe04-dte6e3Tn.js";import"./SwitchHorizontal01-DaHl0WJE.js";import"./HardDrive-D8NpBmYZ.js";import"./Image01-BcfWbfgs.js";import"./Key01-zcL3Jetr.js";import"./LinkExternal01-CowmNsE8.js";import"./LockUnlocked01-B42moyHj.js";import"./LogOut01-pQssVOeo.js";import"./Monitor01-BisokFUR.js";import"./Sun-BzDP5Wkc.js";import"./Package-DqE8AAiL.js";import"./Palette-BIg2FmR0.js";import"./Play-CE83iAVt.js";import"./Plus-6fDaqupl.js";import"./SearchLg-DwCjVmxR.js";import"./SearchMd-CrGhreLP.js";import"./Shield01-DEbNpm3q.js";import"./Stars01-viLOjXnm.js";import"./Trash01-Dy3MdYJw.js";import"./Upload01-NxuWdNFJ.js";import"./User01-DqbtX0Mm.js";import"./Users01-De14zlGQ.js";import"./Zap-xbaG-vsx.js";import"./select-DUtamJhc.js";import"./use-panel-navigate-BMs-s3Nl.js";import"./use-destination-route-r2NrESmX.js";import"./thread-route-BWBQm3pm.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DUUOu-IF.js";import"./use-mcp-client-Ck5btS3m.js";import"./auth-B6GdneuP.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BeHY6QEX.js";import"./task-board-071VXUrT.js";import"./schema-DJV9p5H0.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-CKxnHsjh.js";import"./use-ai-providers-DCe2OUth.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BEqXbNTL.js";import"./use-organization-settings-BEo7NnG8.js";import"./avatar-CHBxqpBG.js";import"./required-auth-layout-Da1w_Ddb.js";import"./use-org-sso-uLzYuu3I.js";import"./automation-runs-agJj8KWb.js";import"./useInfiniteQuery-BstDKoVk.js";import"./use-infinite-scroll-BvDU24Je.js";import"./use-connection-Bftf01wB.js";import"./table-BBjVFebb.js";import"./empty-state-DVClfDrw.js";import"./use-members-88UMMKuC.js";import"./use-org-auth-client-COrOxhr5.js";import"./use-automations-BXKtqjHx.js";import"./useSuspenseInfiniteQuery-CAB5Fhd0.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CT9eqfXk.js";import"./markdown-5lzWkOML.js";import"./monaco-editor-6AHs34Q8.js";import"./spinner-YrauiZby.js";import"./types-jxIG6gO3.js";import"./integration-icon-BPFnGyo6.js";import"./use-navigate-to-agent-DQJ0axS8.js";import"./chart-CaBddSEI.js";import"./index-uDYRl3SL.js";import"./AreaChart-CvCIlFBg.js";import"./form-Cz8vlCyU.js";import"./label-Dr_BfYzg.js";import"./file-type-icon-DgAI6cPK.js";import"./drawer-Ccp7Pld2.js";import"./collection-search-D5rwmWFv.js";import"./agent-capabilities-B52k7xCe.js";import"./use-mcp-tools-CibuZ0mM.js";import"./tabs-Yky_zgts.js";import"./toggle-group-BPRw-cUe.js";import"./super-agent-icon-B-GjUG_i.js";import"./self-tool-result-DJKNA-Q1.js";import"./extract-connection-data-BsWcQfyC.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-VuO_YY1b.js";import"./authenticate-and-persist-oauth-DXXPr2mQ.js";import"./mcp-oauth-BQSdkAbx.js";import"./track-BfSo4KUJ.js";import"./popover-BHOBS4DD.js";import"./toolbar-CVo5ou1c.js";import"./github-repo-picker-CtCqD-wD.js";import"./connection-card-DYPOVPKV.js";import"./use-registry-connections-DOQdhzUa.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CI_ABdOZ.js";import"./connection-form-helpers-Bli5zmfy.js";import"./collection-tabs-BteIkhYu.js";import"./badge-CveqZ_Mf.js";import"./select-model-DCyF1EQd.js";import"./checkbox-CAdLnXgF.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-B9F2uwsA.js";import"./dropdown-menu-L5olgVDL.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BDMm5fz-.js";import"./use-file-configs-Ioa6TFS2.js";import"./site-slug-uya6Wp4-.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-BkXMiMuU.js";import"./search-input-DzQfXS8J.js";import"./use-mcp-auth-status-DBCA94xW.js";import"./switch-AVWIy_bp.js";import"./use-secrets-Cy0LL42u.js";import"./config-BiSpfnj7.js";import"./command-CE_y1aUD.js";import"./index-D-9ni5nq.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-DdKiDP1D.js";import"./use-tags-C2FELPv0.js";import"./automation-list-row-Od3Jv2FA.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-B4UKqKch.js";import"./cards-BIJzr_sx.js";const ir={"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 ar(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:y,onSubmit:u,onOpenChange:b}=i,E=l===void 0?"":l,h=y===void 0?!1:y,x=Te(),[f,O]=d.useState(E),[X,I]=d.useState(s),C=ir[a];s!==X&&(I(s),s&&O(E));let g;e[0]!==h||e[1]!==b?(g=Q=>{!Q&&!h&&b(!1)},e[0]=h,e[1]=b,e[2]=g):g=e[2];const R=g;let z;e[3]!==h||e[4]!==f||e[5]!==u?(z=async Q=>{Q.preventDefault();const ne=f.trim();!ne||h||await u(ne)},e[3]=h,e[4]=f,e[5]=u,e[6]=z):z=e[6];const L=z;let T;e[7]!==C.titleKey||e[8]!==x?(T=x(C.titleKey),e[7]=C.titleKey,e[8]=x,e[9]=T):T=e[9];let P;e[10]!==T?(P=r.jsx(Tn,{children:T}),e[10]=T,e[11]=P):P=e[11];let D;e[12]!==C.descriptionKey||e[13]!==x?(D=x(C.descriptionKey),e[12]=C.descriptionKey,e[13]=x,e[14]=D):D=e[14];let S;e[15]!==D?(S=r.jsx(Pn,{children:D}),e[15]=D,e[16]=S):S=e[16];let N;e[17]!==P||e[18]!==S?(N=r.jsxs(kn,{children:[P,S]}),e[17]=P,e[18]=S,e[19]=N):N=e[19];let M;e[20]!==m||e[21]!==x?(M=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(it,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=M):M=e[22];let j;e[23]!==x?(j=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=j):j=e[24];let F;e[25]!==j?(F=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:j}),e[25]=j,e[26]=F):F=e[26];let q;e[27]===Symbol.for("react.memo_cache_sentinel")?(q=Q=>O(Q.target.value),e[27]=q):q=e[27];let $;e[28]!==C.placeholderKey||e[29]!==x?($=x(C.placeholderKey),e[28]=C.placeholderKey,e[29]=x,e[30]=$):$=e[30];let Y;e[31]!==h||e[32]!==f||e[33]!==$?(Y=r.jsx(it,{id:"file-explorer-name",value:f,onChange:q,placeholder:$,autoFocus:!0,disabled:h}),e[31]=h,e[32]=f,e[33]=$,e[34]=Y):Y=e[34];let J;e[35]!==F||e[36]!==Y?(J=r.jsxs("div",{className:"space-y-1.5",children:[F,Y]}),e[35]=F,e[36]=Y,e[37]=J):J=e[37];let ee;e[38]!==M||e[39]!==J?(ee=r.jsxs("div",{className:"space-y-4 py-4",children:[M,J]}),e[38]=M,e[39]=J,e[40]=ee):ee=e[40];let _;e[41]!==b?(_=()=>b(!1),e[41]=b,e[42]=_):_=e[42];let A;e[43]!==x?(A=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=A):A=e[44];let H;e[45]!==h||e[46]!==_||e[47]!==A?(H=r.jsx(Re,{type:"button",variant:"outline",onClick:_,disabled:h,children:A}),e[45]=h,e[46]=_,e[47]=A,e[48]=H):H=e[48];let K;e[49]!==h||e[50]!==f?(K=!f.trim()||h,e[49]=h,e[50]=f,e[51]=K):K=e[51];let W;e[52]!==C.submitKey||e[53]!==h||e[54]!==x?(W=h?r.jsxs(r.Fragment,{children:[r.jsx(pe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(C.submitKey),e[52]=C.submitKey,e[53]=h,e[54]=x,e[55]=W):W=e[55];let G;e[56]!==K||e[57]!==W?(G=r.jsx(Re,{type:"submit",disabled:K,children:W}),e[56]=K,e[57]=W,e[58]=G):G=e[58];let k;e[59]!==H||e[60]!==G?(k=r.jsxs(Fn,{children:[H,G]}),e[59]=H,e[60]=G,e[61]=k):k=e[61];let B;e[62]!==L||e[63]!==ee||e[64]!==k||e[65]!==N?(B=r.jsx(An,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:L,children:[N,ee,k]})}),e[62]=L,e[63]=ee,e[64]=k,e[65]=N,e[66]=B):B=e[66];let V;return e[67]!==R||e[68]!==s||e[69]!==B?(V=r.jsx(Ln,{open:s,onOpenChange:R,children:B}),e[67]=R,e[68]=s,e[69]=B,e[70]=V):V=e[70],V}function lr(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:y}=i,u=Te(),b=s?.kind==="directory",E=s!==null,h=b?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==u||e[1]!==h?(x=u(h),e[0]=u,e[1]=h,e[2]=x):x=e[2];let f;e[3]!==x?(f=r.jsx(On,{children:x}),e[3]=x,e[4]=f):f=e[4];let O;e[5]!==u?(O=u("sandbox.fileExplorerDeleteDialog.description"),e[5]=u,e[6]=O):O=e[6];const X=s?.name;let I;e[7]!==X?(I=r.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=I):I=e[8];let C;e[9]!==b||e[10]!==u?(C=b?u("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=b,e[10]=u,e[11]=C):C=e[11];let g;e[12]!==a.length||e[13]!==u?(g=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?u("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):u("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=u,e[14]=g):g=e[14];let R;e[15]!==O||e[16]!==I||e[17]!==C||e[18]!==g?(R=r.jsxs(In,{children:[O," ",I,C,g]}),e[15]=O,e[16]=I,e[17]=C,e[18]=g,e[19]=R):R=e[19];let z;e[20]!==R||e[21]!==f?(z=r.jsxs(Kn,{children:[f,R]}),e[20]=R,e[21]=f,e[22]=z):z=e[22];let L;e[23]!==u?(L=u("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=u,e[24]=L):L=e[24];let T;e[25]!==l||e[26]!==L?(T=r.jsx(zn,{disabled:l,children:L}),e[25]=l,e[26]=L,e[27]=T):T=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==y?(D=q=>{q.preventDefault(),s&&y(s)},e[28]=s,e[29]=y,e[30]=D):D=e[30];let S;e[31]!==u?(S=u("sandbox.fileExplorerDeleteDialog.delete"),e[31]=u,e[32]=S):S=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==S?(N=r.jsx($n,{disabled:P,onClick:D,children:S}),e[33]=P,e[34]=D,e[35]=S,e[36]=N):N=e[36];let M;e[37]!==T||e[38]!==N?(M=r.jsxs(_n,{children:[T,N]}),e[37]=T,e[38]=N,e[39]=M):M=e[39];let j;e[40]!==z||e[41]!==M?(j=r.jsxs(Gn,{children:[z,M]}),e[40]=z,e[41]=M,e[42]=j):j=e[42];let F;return e[43]!==m||e[44]!==E||e[45]!==j?(F=r.jsx(Bn,{open:E,onOpenChange:m,children:j}),e[43]=m,e[44]=E,e[45]=j,e[46]=F):F=e[46],F}var Ge="ContextMenu",[cr]=cn(Ge,[dt]),Z=dt(),[dr,ut]=cr(Ge),ft=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[y,u]=d.useState(!1),b=Z(e),E=an(a),h=d.useCallback(x=>{u(x),E(x)},[E]);return r.jsx(dr,{scope:e,open:y,onOpenChange:h,modal:m,children:r.jsx(ln,{...b,dir:l,open:y,onOpenChange:h,modal:m,children:s})})};ft.displayName=Ge;var pt="ContextMenuTrigger",mt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ut(pt,s),y=Z(s),u=d.useRef({x:0,y:0}),b=d.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),E=d.useRef(0),h=d.useCallback(()=>window.clearTimeout(E.current),[]),x=f=>{u.current={x:f.clientX,y:f.clientY},m.onOpenChange(!0)};return d.useEffect(()=>h,[h]),d.useEffect(()=>{a&&h()},[a,h]),r.jsxs(r.Fragment,{children:[r.jsx(en,{...y,virtualRef:b}),r.jsx(tn.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:ge(i.onContextMenu,f=>{h(),x(f),f.preventDefault()}),onPointerDown:a?i.onPointerDown:ge(i.onPointerDown,Me(f=>{h(),E.current=window.setTimeout(()=>x(f),700)})),onPointerMove:a?i.onPointerMove:ge(i.onPointerMove,Me(h)),onPointerCancel:a?i.onPointerCancel:ge(i.onPointerCancel,Me(h)),onPointerUp:a?i.onPointerUp:ge(i.onPointerUp,Me(h))})]})});mt.displayName=pt;var ur="ContextMenuPortal",xt=i=>{const{__scopeContextMenu:e,...s}=i,a=Z(e);return r.jsx(on,{...a,...s})};xt.displayName=ur;var ht="ContextMenuContent",gt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ut(ht,s),m=Z(s),y=d.useRef(!1);return r.jsx(sn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{i.onCloseAutoFocus?.(u),!u.defaultPrevented&&y.current&&u.preventDefault(),y.current=!1},onInteractOutside:u=>{i.onInteractOutside?.(u),!u.defaultPrevented&&!l.modal&&(y.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)"}})});gt.displayName=ht;var fr="ContextMenuGroup",pr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(dn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuLabel",xr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(un,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuItem",bt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(nn,{...l,...a,ref:e})});bt.displayName=hr;var gr="ContextMenuCheckboxItem",br=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(fn,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioGroup",vr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(pn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuRadioItem",wr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(mn,{...l,...a,ref:e})});wr.displayName=Cr;var Nr="ContextMenuItemIndicator",jr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(xn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSeparator",yt=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(rn,{...l,...a,ref:e})});yt.displayName=Er;var Sr="ContextMenuArrow",Dr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(hn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubTrigger",Rr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(gn,{...l,...a,ref:e})});Rr.displayName=Mr;var Tr="ContextMenuSubContent",Pr=d.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=Z(s);return r.jsx(bn,{...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)"}})});Pr.displayName=Tr;function Me(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var kr=ft,Fr=mt,Ar=xt,Lr=gt,Or=bt,Ir=yt;function Kr(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(kr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function zr(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(Fr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function $r(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(Ar,{children:r.jsx(Lr,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function fe(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 y=m===void 0?"default":m;let u;e[5]!==s?(u=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]=u):u=e[6];let b;return e[7]!==a||e[8]!==l||e[9]!==u||e[10]!==y?(b=r.jsx(Or,{"data-slot":"context-menu-item","data-inset":a,"data-variant":y,className:u,...l}),e[7]=a,e[8]=l,e[9]=u,e[10]=y,e[11]=b):b=e[11],b}function at(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(Ir,{"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 Gr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:y,fileVisual:u,onOpen:b,onSelect:E,onNewFile:h,onNewFolder:x,onCopyPath:f,onCopyRelativePath:O,onRename:X,onDelete:I}=i,C=y===void 0?!1:y,g=Te(),R=s.kind==="directory",{Icon:z,color:L}=u,T=m&&"bg-accent";let P;e[0]!==T?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",T),e[0]=T,e[1]=P):P=e[1];const D=`${a*14+8}px`;let S;e[2]!==D?(S={paddingLeft:D},e[2]=D,e[3]=S):S=e[3];let N;e[4]!==b||e[5]!==E?(N=()=>{E(),b()},e[4]=b,e[5]=E,e[6]=N):N=e[6];let M;e[7]!==z||e[8]!==L||e[9]!==R||e[10]!==l||e[11]!==C?(M=R?r.jsxs(r.Fragment,{children:[C?r.jsx(pe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(Vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Un,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(qn,{size:16,className:"shrink-0",style:{color:_r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(z,{size:16,className:"shrink-0",style:{color:L}})]}),e[7]=z,e[8]=L,e[9]=R,e[10]=l,e[11]=C,e[12]=M):M=e[12];let j;e[13]!==s.name?(j=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=j):j=e[14];let F;e[15]!==P||e[16]!==S||e[17]!==N||e[18]!==M||e[19]!==j?(F=r.jsx(zr,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:S,onClick:N,children:[M,j]})}),e[15]=P,e[16]=S,e[17]=N,e[18]=M,e[19]=j,e[20]=F):F=e[20];let q;e[21]!==g?(q=g("sandbox.fileTreeRow.newFile"),e[21]=g,e[22]=q):q=e[22];let $;e[23]!==h||e[24]!==q?($=r.jsx(fe,{onSelect:h,children:q}),e[23]=h,e[24]=q,e[25]=$):$=e[25];let Y;e[26]!==g?(Y=g("sandbox.fileTreeRow.newFolder"),e[26]=g,e[27]=Y):Y=e[27];let J;e[28]!==x||e[29]!==Y?(J=r.jsx(fe,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=J):J=e[30];let ee;e[31]===Symbol.for("react.memo_cache_sentinel")?(ee=r.jsx(at,{}),e[31]=ee):ee=e[31];let _;e[32]!==g?(_=g("sandbox.fileTreeRow.copyPath"),e[32]=g,e[33]=_):_=e[33];let A;e[34]!==f||e[35]!==_?(A=r.jsx(fe,{onSelect:f,children:_}),e[34]=f,e[35]=_,e[36]=A):A=e[36];let H;e[37]!==g?(H=g("sandbox.fileTreeRow.copyRelativePath"),e[37]=g,e[38]=H):H=e[38];let K;e[39]!==O||e[40]!==H?(K=r.jsx(fe,{onSelect:O,children:H}),e[39]=O,e[40]=H,e[41]=K):K=e[41];let W;e[42]===Symbol.for("react.memo_cache_sentinel")?(W=r.jsx(at,{}),e[42]=W):W=e[42];let G;e[43]!==g?(G=g("sandbox.fileTreeRow.rename"),e[43]=g,e[44]=G):G=e[44];let k;e[45]!==X||e[46]!==G?(k=r.jsx(fe,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=k):k=e[47];let B;e[48]!==g?(B=g("sandbox.fileTreeRow.delete"),e[48]=g,e[49]=B):B=e[49];let V;e[50]!==I||e[51]!==B?(V=r.jsx(fe,{variant:"destructive",onSelect:I,children:B}),e[50]=I,e[51]=B,e[52]=V):V=e[52];let Q;e[53]!==$||e[54]!==J||e[55]!==A||e[56]!==K||e[57]!==k||e[58]!==V?(Q=r.jsxs($r,{className:"w-52",children:[$,J,ee,A,K,W,k,V]}),e[53]=$,e[54]=J,e[55]=A,e[56]=K,e[57]=k,e[58]=V,e[59]=Q):Q=e[59];let ne;return e[60]!==Q||e[61]!==F?(ne=r.jsxs(Kr,{children:[F,Q]}),e[60]=Q,e[61]=F,e[62]=ne):ne=e[62],ne}const lt=200,Br=2,Vr=250,ct=200;function Ur(i,e){return Rn(i,e)}function qr(i){const e=se.c(9),{text:s,query:a}=i;let l,m,y;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:b,segments:E}=Zn(s,a);l="truncate font-mono text-muted-foreground",m=b&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),y=E.map(Hr),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=y}else l=e[2],m=e[3],y=e[4];let u;return e[5]!==l||e[6]!==m||e[7]!==y?(u=r.jsxs("span",{className:l,children:[m,y]}),e[5]=l,e[6]=m,e[7]=y,e[8]=u):u=e[8],u}function Hr(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 Xi({orgSlug:i,virtualMcpId:e,branch:s,threadId:a,openPath:l}){const m={orgSlug:i,virtualMcpId:e,branch:s,threadId:a},[y,u]=d.useState({files:[],directories:[],truncated:!1}),{files:b,directories:E}=y,[h,x]=d.useState(new Set),[f,O]=d.useState(null),[X,I]=d.useState(null),[C,g]=d.useState([]),[R,z]=d.useState(""),[L,T]=d.useState(null),[P,D]=d.useState(null),[S,N]=d.useState(!1),[M,j]=d.useState(!1),[F,q]=d.useState(!1),[$,Y]=d.useState(!1),[,J]=d.useState(new Set),[ee,_]=d.useState(new Set),A=d.useRef(0),H=d.useRef(null),K=d.useRef(new Set),W=d.useRef(new Map),G=d.useRef(null),k=d.useRef(0),B=d.useRef(null),V=d.useRef(null),Q=d.useRef(null);function ne(t){J(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[me,de]=d.useState(new Map),Pe=d.useRef(null),[ie,be]=d.useState(null),{sendMessage:vt}=En(),{openSidePanel:Ct}=Dn(),ye=yn(),[U,oe]=d.useState(null),[ke,Fe]=d.useState(null),[ve,Ce]=d.useState(!1);async function ae(t,n){const o=await fetch(Ur(m,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 we(){ye.invalidateQueries({queryKey:st(m)})}function Be(t,n,o){navigator.clipboard.writeText(o).then(()=>te.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>te.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function wt(t){const n=or(t);if(!n)return;const o=`${i}/${e}/${s}`;ye.setQueryData(ot.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ye.invalidateQueries({queryKey:ot.liveMeta(i,e,s)})}function Nt(t){const n=t.kind==="file"?[t.path]:b.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ee(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)wt(o)}function jt(t){const n=Ee(t);return C.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=me.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ve(t){g(n=>n.map(o=>t(o)).filter(o=>o!==null)),O(n=>n&&t(n)),de(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),I(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 Et(t){const n=Ee(t);I(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ve(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function St(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("write",{path:re(o),content:""}),await xe(),await we(),oe(null),he(o)}async function Dt(t,n){if(!U)return;const o=De(U.parentDir,n);if(_e(o,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ae("mkdir",{path:c}),u(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await xe(),await we(),oe(null),x(p=>{const v=new Set(p);for(const ce of ze(o))v.add(ce);return v.add(o),v}),I({name:n,path:o,kind:"directory",children:[]})}async function Mt(t,n){if(!U)return;const o=U.node.path,c=Se(o),p=De(c,n);if(p===o){oe(null);return}if(_e(p,b,E))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ae("rename",{from:re(o),to:re(p)}),Ve(v=>v===o?p:v.startsWith(`${o}/`)?De(p,v.slice(o.length+1)):v),await xe(),await we(),oe(null)}async function Rt(t,n){Ce(!0);try{await ae("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Nt(n),Et(n.path),await xe(),await we(),Fe(null),te.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){te.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{Ce(!1)}}async function Tt(t,n){const o=tr(n);if(o){te.error(o);return}Ce(!0);try{U?.mode==="new-file"?(await St(t,n),te.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):U?.mode==="new-folder"?(await Dt(t,n),te.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):U?.mode==="rename"&&(await Mt(t,n),te.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){te.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{Ce(!1)}}const Ue=d.useRef(!1);Ue.current||(Ue.current=!0,H.current=xe());const[Pt,kt]=d.useState(null),w=Te();if(l&&l!==Pt){kt(l);const t=l;queueMicrotask(()=>{Hn(t)&&he(t)})}async function Ae(t){const n=await ae("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function qe(t,n,o){if(o!==A.current)return!1;let c=!1;return u(p=>{const v=n?sr(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&&te.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Ft(t){const n=W.current.get(t);if(n)return n;const o=A.current,c=(async()=>{const p=await Ae({pattern:"**/*",path:re(t),limit:Oe}),v=qe(p,!0,o);return!v&&o===A.current&&ne(ce=>{const Ne=new Set(ce);return Ne.add(t),Ne}),v})();W.current.set(t,c);try{return await c}finally{W.current.delete(t)}}async function He(t){if(!$e(t,K.current))return!1;_(n=>new Set(n).add(t));try{return await Ft(t)}finally{_(n=>{const o=new Set(n);return o.delete(t),o})}}async function At(t,n){const o=new Set(K.current);for(const c of ze(n)){if(!$e(c,o))continue;if(await He(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function xe(){const t=++A.current;B.current=null,V.current=null,W.current.clear(),q(!0),ne(new Set),x(new Set),_(new Set);try{const n=await Ae({pattern:"**/*",limit:Oe,maxDepth:Wn});qe(n,!1,t),Y(!0)}catch{$&&te.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{q(!1)}}async function We(t){if(!me.get(t)?.loaded){de(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ae("read",{path:re(t),full:!0}),c=er(o.content??"");de(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Lt(){k.current++,T(null),D(null),N(!1),j(!1)}async function Ot(){const t=A.current,n=B.current;if(n&&n.generation===t)return n.files;const o=V.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await Ae({pattern:"**/*",limit:Oe});return A.current===t&&(B.current={generation:t,files:p.files}),p.files})();V.current={generation:t,promise:c};try{return await c}finally{V.current?.generation===t&&(V.current=null)}}async function It(t,n){try{const o=await Ot();if(n!==k.current)return;T(nr(o,t,ct))}catch{if(n!==k.current)return;T([])}}async function Kt(t,n){N(!0);try{const o=await ae("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:lt});if(n!==k.current)return;D(rr(o.results??"")),j((o.matchCount??0)>=lt)}catch{if(n!==k.current)return;D([]),j(!1)}finally{n===k.current&&N(!1)}}function zt(t){const n=t.trim(),o=++k.current;It(n,o),n.length<Br?(D(null),N(!1),j(!1)):Kt(n,o)}function $t(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){Lt();return}G.current=setTimeout(()=>{zt(t)},Vr)}function Qe(t){const n=Q.current;if(!n||n.path!==f)return;Q.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function _t(t){Q.current={path:t.path,line:t.line};const n=f===t.path&&me.get(t.path)?.loaded;he(t.path),n&&Pe.current&&Qe(Pe.current)}async function Gt(t,n){try{await ae("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ye.invalidateQueries({queryKey:st(m)});try{const o=await Mn(m);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}de(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 Bt(t){O(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),be(null),C.includes(t)||g(n=>[...n,t]),We(t)}function Vt(t){g(n=>{const o=n.filter(c=>c!==t);return f===t&&O(o[o.length-1]??null),o}),de(n=>{const o=new Map(n);return o.delete(t),o})}function Xe(t){x(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Ut(t){if($e(t,K.current))try{if(await He(t))return}catch(n){te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}Xe(t)}async function qt(t,n){if(n){Xe(t);return}await Ut(t)}async function Ht(t){await H.current,await At(w,t);const n=ze(t);x(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),Bt(t)}function he(t){Ht(t).catch(n=>{te.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Wt(){return X?.kind==="directory"?X.path:X?.kind==="file"?Se(X.path):f?Se(f):"/"}function Ye(t){const n=Wt();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Qt=Qn(b,E),Je=Xn(Qt,h),Le=L?.length??0,Ze=Yn(P??[]),et=P?.length??0,ue=f?me.get(f):null,Xt=ue?.loaded&&ue.editorValue!==ue.savedContent,Yt=ke?jt(ke.path):[],Jt=(t,n)=>{Pe.current=t,Qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!f)return;const o=t.getValue();await Gt(f,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!f)return;const p=c.getValueInRange(o);be({filePath:f,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Zt(t){if(!ie)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ie.filePath}\``,`**Lines:** ${ie.lineStart}–${ie.lineEnd}`];if(ie.selectedCode){const o=Ke(ie.filePath),c=ie.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),Ct(),vt({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),be(null)}return F&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{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(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:R,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(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Ye("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(tt,{children:[r.jsx(nt,{asChild:!0,children:r.jsx(Re,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Ye("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(rt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!R&&Je.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=h.has(n.path),v=X?.path===n.path,ce=Jn(n.path,n.kind),Ne=c&&ee.has(n.path);return r.jsx(Gr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:Ne,fileVisual:Ie(n.name),onSelect:()=>I(n),onOpen:()=>{c?qt(n.path,p):he(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>Be(w,"Path",Ee(n.path)),onCopyRelativePath:()=>Be(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Fe(n)},n.path)}),!R&&$&&Je.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),R&&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")}),Le>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=ct?"+":""]})]}),L!==null&&L.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),L?.map(t=>{const n=t.split("/").pop()??t,o=Se(t),{Icon:c,color:p}=Ie(n),v=f===t;return r.jsxs("button",{type:"button",onClick:()=>he(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)})]}),R&&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")}),et>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[et,M?"+":""]}),S&&r.jsx(pe,{size:10,className:"animate-spin"})]}),!S&&P!==null&&Ze.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ze.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Ie(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:()=>_t(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(qr,{text:p.text,query:R})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[C.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:C.map(t=>{const n=me.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=f===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:()=>{O(t),We(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(),Vt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ie&&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()&&Zt(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"&&be(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:f&&ue?.loaded?r.jsx(Sn,{language:Ke(f),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ue.editorValue,path:f,onChange:t=>{const n=f;n&&de(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Jt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{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}}},f):f&&!ue?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(pe,{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")})}),f&&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:f}),r.jsxs("span",{children:[w(Xt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(f)]})]})]}),r.jsx(ar,{open:U!==null,mode:U?.mode??"new-file",initialName:U?.mode==="rename"?U.node.name:"",parentLabel:U&&U.mode!=="rename"?U.parentDir==="/"?"/":re(U.parentDir):void 0,isPending:ve,onSubmit:t=>Tt(w,t),onOpenChange:t=>{!t&&!ve&&oe(null)}}),r.jsx(lr,{deleteTarget:ke,deleteDirtyPaths:Yt,fsActionPending:ve,onOpenChange:t=>{!t&&!ve&&Fe(null)},onConfirm:t=>{Rt(w,t)}})]})}export{Xi as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P,H as Z,r as Y,j as i,B as ee,L as ge,ak as ue,an as ne,b as G,p as fe,ax as pe,ay as xe,e as re,q as te,t as F,K as oe,du as ie,dv as se,dw as Q,az as he,Y as je,ac as Se,I as ae,cU as ze,cV as Ae,y as ve,P as W,dx as be}from"./index-WnnLGrso.js";import{A as ye,b as _e}from"./alert-DHJpYb4r.js";import{i as Ce}from"./XCircle-D6rPTffO.js";import{n as Oe}from"./LinkExternal01-CowmNsE8.js";import{s as De}from"./XClose-DAdaIat-.js";import{u as Ne}from"./use-org-auth-client-COrOxhr5.js";import{u as we}from"./use-debounced-autosave-BkXMiMuU.js";import{A as Te}from"./avatar-CHBxqpBG.js";import{I as le}from"./input-CDpdC0tP.js";import{d as ce,S as Fe,a as ke,b as Pe,c as Ee}from"./select-DUtamJhc.js";import{A as me}from"./agent-icon-BNiFw9pa.js";import{a as Ie,i as Le,d as Me}from"./constants-dLUUoWH7.js";import{u as Re}from"./use-virtual-mcp-CKxnHsjh.js";import{g as Ve}from"./agent-capabilities-B52k7xCe.js";import{g as $e,j as Ue}from"./use-organization-settings-BEo7NnG8.js";import{C as qe}from"./review-settings-CiCaCzxK.js";import{D as Be}from"./domain-settings-B1WLjP-T.js";import{c as Ke,d as Ge,b as Qe,f as Ye,g as He,e as We,a as Ze,A as Je}from"./alert-dialog-Z5MegBZ1.js";import{R as Xe}from"./require-capability-d7tq3luv.js";import"./User01-DqbtX0Mm.js";import"./Check-dMF9hfDW.js";import"./ChevronDown-_zHtp2mi.js";import"./ChevronUp-BY_jPS3y.js";import"./AlertCircle-uCFwUT4D.js";import"./UserSquare-CrW5dbk9.js";import"./Tool01-Bpm7pW3l.js";import"./ArrowUp-HON1SXj9.js";import"./ArrowLeft-CyFw_ZAc.js";import"./Tool02-D8DKruBK.js";import"./TrendUp01-B6tyfzkz.js";import"./ZapSquare-ChUgXei6.js";import"./ZoomOut-Cp6Wgfdk.js";import"./Users03-Cwu3MDED.js";import"./CheckCircle-CJU10mQs.js";import"./ChevronRight-mg1CozRX.js";import"./ChevronSelectorVertical-qKYq7QdT.js";import"./DotsVertical-DIrSgn8J.js";import"./Stars02-CkhejPZU.js";import"./Copy01-D4DKkrNa.js";import"./CreditCard01-BzXZ70FC.js";import"./Download01-Br2q00Km.js";import"./Settings02-BWYsBVvl.js";import"./Eye-BawWrBSR.js";import"./FilterLines-CWv0gwTq.js";import"./Share07-CAWy1Jc2.js";import"./GitBranch01-BHQWjDQ8.js";import"./Globe01-2G4S7hap.js";import"./Globe04-dte6e3Tn.js";import"./SwitchHorizontal01-DaHl0WJE.js";import"./HardDrive-D8NpBmYZ.js";import"./Image01-BcfWbfgs.js";import"./Key01-zcL3Jetr.js";import"./LockUnlocked01-B42moyHj.js";import"./LogOut01-pQssVOeo.js";import"./Monitor01-BisokFUR.js";import"./Sun-BzDP5Wkc.js";import"./Package-DqE8AAiL.js";import"./Palette-BIg2FmR0.js";import"./Play-CE83iAVt.js";import"./Plus-6fDaqupl.js";import"./SearchLg-DwCjVmxR.js";import"./SearchMd-CrGhreLP.js";import"./Shield01-DEbNpm3q.js";import"./Stars01-viLOjXnm.js";import"./Trash01-Dy3MdYJw.js";import"./Upload01-NxuWdNFJ.js";import"./Users01-De14zlGQ.js";import"./Zap-xbaG-vsx.js";import"./use-mcp-client-Ck5btS3m.js";import"./auth-B6GdneuP.js";import"./schema-DJV9p5H0.js";import"./task-board-071VXUrT.js";import"./switch-AVWIy_bp.js";import"./badge-CveqZ_Mf.js";import"./access-gate-B9jtqZ9Q.js";import"./capability-load-error-G3zGppmC.js";function de(e){return`connect-banner-dismissed:${e}`}function et(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function tt(){const e=P.c(17),{org:t}=Z();let s;e[0]!==t.id?(s=()=>et(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,c]=Y.useState(s);if(l)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 d=a;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Oe,{}),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 n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Ce,{size:12}),e[8]=n):n=e[8];let g;e[9]!==f?(g=i.jsx(ee,{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 ",n]})}),e[9]=f,e[10]=g):g=e[10];let r;e[11]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{size:14}),e[11]=r):r=e[11];let u;e[12]!==d?(u=i.jsx(ee,{variant:"ghost",size:"icon",className:"size-7",onClick:d,"aria-label":"Dismiss",children:r}),e[12]=d,e[13]=u):u=e[13];let p;return e[14]!==g||e[15]!==u?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(_e,{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:[g,u]})]})]}),e[14]=g,e[15]=u,e[16]=p):p=e[16],p}const it=ue({name:ne().min(1,"Name is required").max(255,"Name is too long"),logo:ne().optional()});function st(e){const t=P.c(17),{value:s,onChange:l,name:c,disabled:a}=e,d=G(),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 n;t[1]!==l||t[2]!==d?(n=O=>{const x=O.target.files?.[0];if(!x)return;if(x.size>2097152){F.error(d("settings.organizationForm.imageTooLarge"));return}const h=new FileReader;h.onerror=()=>F.error(d("settings.organizationForm.failedToReadImage")),h.onloadend=()=>{h.result&&l(h.result),m.current&&(m.current.value="")},h.readAsDataURL(x)},t[1]=l,t[2]=d,t[3]=n):n=t[3];const g=n;let r;t[4]!==d?(r=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=r):r=t[5];let u;t[6]!==a||t[7]!==g?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:g,className:"hidden",disabled:a}),t[6]=a,t[7]=g,t[8]=u):u=t[8];const p=s||void 0,j=c??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Te,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let A;return t[12]!==a||t[13]!==r||t[14]!==u||t[15]!==S?(A=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":r,children:[u,S]}),t[12]=a,t[13]=r,t[14]=u,t[15]=S,t[16]=A):A=t[16],A}function nt(){const e=G(),{org:t}=Z(),s=Ne(),l=fe(),c=pe({resolver:xe(it),values:{name:t.name??"",logo:t.logo??""}}),a=re({mutationFn:async n=>{const g={name:n.name};n.logo&&(g.logo=n.logo);const r=await s.organization.update({data:g});if(r?.error)throw new Error(r.error.message||e("settings.organizationForm.failedToUpdateOrg"));return r},onSuccess:(n,g)=>{te("organization_settings_updated",{organization_id:t.id,fields:Object.keys(g)}),l.invalidateQueries({queryKey:oe.organizations()}),l.invalidateQueries({queryKey:oe.activeOrganization(t.slug)}),F.success(e("settings.organizationForm.updateSuccess"))},onError:(n,g)=>{te("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(g),error:n instanceof Error?n.message:String(n)}),F.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=we({save:async()=>{const n=c.control._formState.dirtyFields;if(Object.keys(n).length===0||!await c.trigger())return;const r=c.getValues(),u=c.control._defaultValues;c.reset(r,{keepValues:!0});try{await a.mutateAsync(r)}catch{c.reset(u,{keepValues:!0})}}}),o=c.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(ie,{children:i.jsxs(se,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(st,{value:c.watch("logo"),onChange:n=>{c.setValue("logo",n??"",{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:n})=>i.jsx(le,{id:"org-name",...n,onChange:g=>{n.onChange(g),d()},onBlur:()=>{n.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 X="__super_agent__";function ot(){const e=P.c(42),t=G(),{org:s}=Z(),l=Re(),{mainAgentId:c}=$e(),a=Ue();let d,m,o,f,n,g,r,u;if(e[0]!==l||e[1]!==c||e[2]!==s.id||e[3]!==a||e[4]!==t){const S=Ve(l),A=(l??[]).filter(lt).filter(z=>!S.has(z.id)).filter(rt);let O;e[13]!==s.id?(O=Ie(s.id),e[13]=s.id,e[14]=O):O=e[14];const x=O,h=c!=null?(l??[]).find(z=>z.id===c):void 0,D=h?h.id:X,N=h&&!A.some(z=>z.id===h.id)?[h,...A]:A;let C;e[15]!==l||e[16]!==a||e[17]!==x.title||e[18]!==t?(C=z=>{const _=z===X?null:z,E=_===null?x.title:(l??[]).find(T=>T.id===_)?.title??"";a.mutate(_,{onSuccess:()=>F.success(_===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:E})),onError:()=>F.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=a,e[17]=x.title,e[18]=t,e[19]=C):C=e[19];const w=C;m=Fe,n=D,g=w,r=a.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ke,{className:"w-full sm:w-[280px]",children:i.jsx(Pe,{})}),e[20]=u):u=e[20],d=Ee;let v;e[21]!==x.icon||e[22]!==x.title?(v=i.jsx(me,{icon:x.icon,name:x.title,size:"xs",className:"shrink-0"}),e[21]=x.icon,e[22]=x.title,e[23]=v):v=e[23];let b;e[24]!==t?(b=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=b):b=e[25];let y;e[26]!==b?(y=i.jsx("span",{className:"truncate",children:b}),e[26]=b,e[27]=y):y=e[27],e[28]!==y||e[29]!==v?(o=i.jsx(ce,{value:X,children:i.jsxs("span",{className:"flex items-center gap-2",children:[v,y]})}),e[28]=y,e[29]=v,e[30]=o):o=e[30],f=N.map(at),e[0]=l,e[1]=c,e[2]=s.id,e[3]=a,e[4]=t,e[5]=d,e[6]=m,e[7]=o,e[8]=f,e[9]=n,e[10]=g,e[11]=r,e[12]=u}else d=e[5],m=e[6],o=e[7],f=e[8],n=e[9],g=e[10],r=e[11],u=e[12];let p;e[31]!==d||e[32]!==o||e[33]!==f?(p=i.jsxs(d,{children:[o,f]}),e[31]=d,e[32]=o,e[33]=f,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==n||e[37]!==g||e[38]!==r||e[39]!==u||e[40]!==p?(j=i.jsxs(m,{value:n,onValueChange:g,disabled:r,children:[u,p]}),e[35]=m,e[36]=n,e[37]=g,e[38]=r,e[39]=u,e[40]=p,e[41]=j):j=e[41],j}function at(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 rt(e){return!Me(e.id)}function lt(e){return!Le(e.id)}function ct(){const e=P.c(16),t=G();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=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 d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Y.Suspense,{fallback:i.jsx(je,{className:"h-9 w-[280px]"}),children:i.jsx(ot,{})}),e[8]=d):d=e[8];let m;e[9]!==c||e[10]!==a?(m=i.jsx(se,{children:i.jsx(Q,{title:c,description:a,action:d})}),e[9]=c,e[10]=a,e[11]=m):m=e[11];let o;return e[12]!==s||e[13]!==l||e[14]!==m?(o=i.jsx(ie,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=o):o=e[15],o}function mt(){const e=P.c(86),t=G(),{org:s}=Z(),[l,c]=Y.useState(!1),[a,d]=Y.useState(""),m=Se();let o;e[0]!==s.id||e[1]!==m?(o=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=o):o=e[2];let f;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(f=()=>{te("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),ze()?.org===s.slug&&Ae(),ve(),F.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=f):f=e[6];let n;e[7]!==t?(n=k=>{F.error(k instanceof Error?k.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=n):n=e[8];let g;e[9]!==o||e[10]!==f||e[11]!==n?(g={mutationFn:o,onSuccess:f,onError:n},e[9]=o,e[10]=f,e[11]=n,e[12]=g):g=e[12];const r=re(g);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 A;e[21]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),e[21]=A):A=e[21];const O=r.isPending;let x;e[22]!==t?(x=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=x):x=e[23];let h;e[24]!==r.isPending||e[25]!==x?(h=i.jsx(ee,{variant:"destructive",size:"sm",onClick:A,disabled:O,children:x}),e[24]=r.isPending,e[25]=x,e[26]=h):h=e[26];let D;e[27]!==h||e[28]!==j||e[29]!==S?(D=i.jsx(se,{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 N;e[31]!==D||e[32]!==u||e[33]!==p?(N=i.jsx(ie,{title:u,description:p,children:D}),e[31]=D,e[32]=u,e[33]=p,e[34]=N):N=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{c(k),k||d("")},e[35]=C):C=e[35];let w;e[36]!==t?(w=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=w):w=e[37];let v;e[38]!==w?(v=i.jsx(Ke,{children:w}),e[38]=w,e[39]=v):v=e[39];let b;e[40]!==s.name||e[41]!==t?(b=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=b):b=e[42];let y;e[43]!==b?(y=i.jsx("p",{children:b}),e[43]=b,e[44]=y):y=e[44];let z;e[45]!==s.name||e[46]!==t?(z=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=z):z=e[47];let _;e[48]!==z?(_=i.jsx("p",{className:"mt-3 mb-1.5",children:z}),e[48]=z,e[49]=_):_=e[49];let E;e[50]===Symbol.for("react.memo_cache_sentinel")?(E=k=>d(k.target.value),e[50]=E):E=e[50];let T;e[51]!==a||e[52]!==s.name?(T=i.jsx(le,{value:a,onChange:E,placeholder:s.name,autoFocus:!0}),e[51]=a,e[52]=s.name,e[53]=T):T=e[53];let I;e[54]!==y||e[55]!==_||e[56]!==T?(I=i.jsx(Ge,{asChild:!0,children:i.jsxs("div",{children:[y,_,T]})}),e[54]=y,e[55]=_,e[56]=T,e[57]=I):I=e[57];let L;e[58]!==v||e[59]!==I?(L=i.jsxs(Qe,{children:[v,I]}),e[58]=v,e[59]=I,e[60]=L):L=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(Ye,{children:M}),e[63]=M,e[64]=R):R=e[64];let V;e[65]!==r?(V=()=>r.mutate(),e[65]=r,e[66]=V):V=e[66];const J=a!==s.name||r.isPending;let $;e[67]!==r.isPending||e[68]!==t?($=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=r.isPending,e[68]=t,e[69]=$):$=e[69];let U;e[70]!==V||e[71]!==J||e[72]!==$?(U=i.jsx(He,{onClick:V,disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:$}),e[70]=V,e[71]=J,e[72]=$,e[73]=U):U=e[73];let q;e[74]!==R||e[75]!==U?(q=i.jsxs(We,{children:[R,U]}),e[74]=R,e[75]=U,e[76]=q):q=e[76];let B;e[77]!==L||e[78]!==q?(B=i.jsxs(Ze,{children:[L,q]}),e[77]=L,e[78]=q,e[79]=B):B=e[79];let K;e[80]!==l||e[81]!==B?(K=i.jsx(Je,{open:l,onOpenChange:C,children:B}),e[80]=l,e[81]=B,e[82]=K):K=e[82];let H;return e[83]!==N||e[84]!==K?(H=i.jsxs(i.Fragment,{children:[N,K]}),e[83]=N,e[84]=K,e[85]=H):H=e[85],H}function dt(){const e=P.c(12),t=G();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let c,a,d,m,o,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(tt,{}),a=i.jsx(nt,{}),d=i.jsx(ct,{}),m=i.jsx(qe,{}),o=i.jsx(Be,{}),f=i.jsx(mt,{}),e[4]=c,e[5]=a,e[6]=d,e[7]=m,e[8]=o,e[9]=f):(c=e[4],a=e[5],d=e[6],m=e[7],o=e[8],f=e[9]);let n;return e[10]!==l?(n=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(be,{children:[l,c,a,d,m,o,f]})})})}),e[10]=l,e[11]=n):n=e[11],n}function Pi(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Xe,{capability:"org:manage",area:"general settings",children:i.jsx(dt,{})}),e[0]=t):t=e[0],t}export{Pi as default};
|