decocms 4.319.9 → 4.319.10
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-Cbfze2vA.js → AlertCircle-BiKf-1nc.js} +1 -1
- package/dist/client/assets/{AreaChart-ESWfdZrx.js → AreaChart-D0fJgkgV.js} +1 -1
- package/dist/client/assets/{ArrowLeft-sTRXJKw4.js → ArrowLeft-BHdO000x.js} +1 -1
- package/dist/client/assets/{ArrowUp-Ck_S8UXb.js → ArrowUp-B-msjQVL.js} +1 -1
- package/dist/client/assets/{Check-BSrzKRPt.js → Check-C-_rAuIj.js} +1 -1
- package/dist/client/assets/{CheckCircle-DyLCcRg7.js → CheckCircle-nBD-5mcw.js} +1 -1
- package/dist/client/assets/{ChevronDown-DS4KDE95.js → ChevronDown-DfQ790RG.js} +1 -1
- package/dist/client/assets/{ChevronRight-HiBK7iT4.js → ChevronRight-DwyI683B.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CfYYUsnO.js → ChevronSelectorVertical-BY-jYyPt.js} +1 -1
- package/dist/client/assets/{ChevronUp-DBNo7toe.js → ChevronUp-B_QneCv9.js} +1 -1
- package/dist/client/assets/{Copy01-cV8y7I27.js → Copy01-CAi2uMRB.js} +1 -1
- package/dist/client/assets/{CreditCard01-D2p53cnj.js → CreditCard01-Bw1Cdid_.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cn-HQJLl.js → DotsVertical-Bg-qQed1.js} +1 -1
- package/dist/client/assets/{Download01-DKxxD2lG.js → Download01-DCvnxXRA.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CjrL28Ly.js → ErrorBarContext-X5PYnJNW.js} +1 -1
- package/dist/client/assets/{Eye-CFsMHhc3.js → Eye-4inhMKtP.js} +1 -1
- package/dist/client/assets/{FilterLines-CY-R2Pgs.js → FilterLines-Bg7xYl69.js} +1 -1
- package/dist/client/assets/{GitBranch01-gzbYsobG.js → GitBranch01-B6yy8e6P.js} +1 -1
- package/dist/client/assets/{Globe01-wsmSifpz.js → Globe01-DVmDQt2e.js} +1 -1
- package/dist/client/assets/{Globe04-BbtNoerk.js → Globe04-D8S6BvXW.js} +1 -1
- package/dist/client/assets/{HardDrive-B2Kmw_-U.js → HardDrive-DPIIMJjo.js} +1 -1
- package/dist/client/assets/{Image01-4ZjVZeII.js → Image01-D6guMsZD.js} +1 -1
- package/dist/client/assets/{Key01-BGSob3xF.js → Key01-9fuIk8HH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DgCDtWFz.js → LinkExternal01-BWm2ZiUJ.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-DPANpO_w.js → LockUnlocked01-BVsDhJmX.js} +1 -1
- package/dist/client/assets/{LogOut01-y1fQHOm-.js → LogOut01-BYrJMywj.js} +1 -1
- package/dist/client/assets/{Monitor01-DZQMQTQG.js → Monitor01-BS3TJUk-.js} +1 -1
- package/dist/client/assets/{Package-FFc5eynf.js → Package-B0vgBgvN.js} +1 -1
- package/dist/client/assets/{Palette-_BVhH0qL.js → Palette-ClolmdvP.js} +1 -1
- package/dist/client/assets/{Play-mDAbVXyx.js → Play-DOPYKC1w.js} +1 -1
- package/dist/client/assets/{Plus-DuwKEMqs.js → Plus-DiHsi401.js} +1 -1
- package/dist/client/assets/{SearchLg-BWCvW3vV.js → SearchLg-CJ-KKAUW.js} +1 -1
- package/dist/client/assets/{SearchMd-BNMN35l9.js → SearchMd-921MfxAT.js} +1 -1
- package/dist/client/assets/{Sector-Ci4Ux-xI.js → Sector-BGqrxORr.js} +1 -1
- package/dist/client/assets/{Settings02-BdKfdvdO.js → Settings02-DCV1j6nU.js} +1 -1
- package/dist/client/assets/{Share07-DgnKCkn5.js → Share07-BZJcpbaj.js} +1 -1
- package/dist/client/assets/{Shield01-CRyZWHgQ.js → Shield01-4oI6EZUO.js} +1 -1
- package/dist/client/assets/{Stars01-CqIitG82.js → Stars01-KnUKHNri.js} +1 -1
- package/dist/client/assets/{Stars02-C5vVPVXG.js → Stars02-x_mAPCiw.js} +1 -1
- package/dist/client/assets/{Sun-B_wiAXGd.js → Sun-DhCg-Tsb.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BSS5u6hh.js → SwitchHorizontal01-66SyypWf.js} +1 -1
- package/dist/client/assets/{Tool01-kD_St_C1.js → Tool01-Do6i0zeO.js} +1 -1
- package/dist/client/assets/{Tool02-C4Mhmh2n.js → Tool02-BgANXxCG.js} +1 -1
- package/dist/client/assets/{Trash01-BQ7TqJow.js → Trash01-3d_pGxON.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dmxvc_8Y.js → TrendUp01-BUnuTzXo.js} +1 -1
- package/dist/client/assets/{Upload01-BUUJWF9q.js → Upload01-1LQq1ra7.js} +1 -1
- package/dist/client/assets/{User01-6GEEYLNL.js → User01-Dl-fkky8.js} +1 -1
- package/dist/client/assets/{UserSquare-B1QhMNkc.js → UserSquare-Bo3Fu208.js} +1 -1
- package/dist/client/assets/{Users01-D3492jop.js → Users01-DaAICNwK.js} +1 -1
- package/dist/client/assets/{Users03-C-fPfgy4.js → Users03-CO8-xfj6.js} +1 -1
- package/dist/client/assets/{XCircle-BR9peTMp.js → XCircle-BDC_QQcY.js} +1 -1
- package/dist/client/assets/{XClose-CId8Q3oo.js → XClose-D5jrJPPg.js} +1 -1
- package/dist/client/assets/{YAxis-D1yzoPbg.js → YAxis-rdgxIX-Q.js} +1 -1
- package/dist/client/assets/{Zap-C81otJUu.js → Zap-CFjJF-hR.js} +1 -1
- package/dist/client/assets/{ZapSquare-DafqFLME.js → ZapSquare-CMqXXL-G.js} +1 -1
- package/dist/client/assets/{ZoomOut-A4Edr_rF.js → ZoomOut-BI1S9bPt.js} +1 -1
- package/dist/client/assets/{access-gate-b5TlHoe3.js → access-gate-4BBXThic.js} +1 -1
- package/dist/client/assets/{agent-icon-patNN3F9.js → agent-icon-Cx9KG3Y1.js} +1 -1
- package/dist/client/assets/{agents-list-CYdT80sf.js → agents-list-C0C-9w36.js} +1 -1
- package/dist/client/assets/{ai-providers-BwuVzE7K.js → ai-providers-CsIxyCDP.js} +1 -1
- package/dist/client/assets/{alert-BBHy--nB.js → alert-B5APpkZw.js} +1 -1
- package/dist/client/assets/{alert-dialog-B0BRtAnp.js → alert-dialog-Bi_UzY-A.js} +1 -1
- package/dist/client/assets/{analytics-tab-ypQ97HlI.js → analytics-tab-CPy4_Pu8.js} +1 -1
- package/dist/client/assets/{api-keys-Cgz1SOLn.js → api-keys-KJwbX2Jn.js} +1 -1
- package/dist/client/assets/{app-editor-lRxxGwYD.js → app-editor-CklFFPML.js} +1 -1
- package/dist/client/assets/{auth-Di--WQHJ.js → auth-CazizifS.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cxvoz1wY.js → auth-catchall-B2ar2cIN.js} +1 -1
- package/dist/client/assets/{auth-entry-JjGry1jW.js → auth-entry-Olil2Stz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D5KuCOy0.js → auth-split-layout-B30s1bT8.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CjESgZgI.js → authenticate-and-persist-oauth-BPWOTdhI.js} +1 -1
- package/dist/client/assets/{automation-list-row-1Zs7zFIm.js → automation-list-row-uL0lU4BQ.js} +1 -1
- package/dist/client/assets/{automation-runs-BnvqbNbI.js → automation-runs-DuTkKstu.js} +1 -1
- package/dist/client/assets/{automations-BgsL-M5q.js → automations-BCSfYFL6.js} +1 -1
- package/dist/client/assets/{avatar-DpXC79Fw.js → avatar-8ilgylmd.js} +1 -1
- package/dist/client/assets/{badge-mutKhjD6.js → badge-CdG7dC5P.js} +1 -1
- package/dist/client/assets/{block-document-BNyDHxm6.js → block-document-NDnocJ7P.js} +1 -1
- package/dist/client/assets/{breadcrumb-TFEAIiKj.js → breadcrumb-DSfB0xrk.js} +1 -1
- package/dist/client/assets/{buckets-CJTbBrrA.js → buckets-BwBpFbsF.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B59puZE1.js → bulk-category-panel--SDfQrW2.js} +1 -1
- package/dist/client/assets/{capability-load-error-DW5RgyIb.js → capability-load-error-CM-Xup3L.js} +1 -1
- package/dist/client/assets/{cards-B_0ClWxN.js → cards-CWqHa4-W.js} +1 -1
- package/dist/client/assets/{category-editor-D_rSR82G.js → category-editor-DX30ajCs.js} +1 -1
- package/dist/client/assets/{cdn-tab-DfZZi1_D.js → cdn-tab-CN_Y4s6x.js} +1 -1
- package/dist/client/assets/{chart-DsuJR6l_.js → chart-T2GD8EtK.js} +1 -1
- package/dist/client/assets/{chat-context-DdSuZE3w.js → chat-context-BQMZribE.js} +1 -1
- package/dist/client/assets/{checkbox-BlKIO9QJ.js → checkbox-Bc4FMpFu.js} +1 -1
- package/dist/client/assets/{choose-editor-CyA_vGg2.js → choose-editor-DTz1CUvQ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BCjskaVH.js → cli-auth-success-DRj9VXSe.js} +1 -1
- package/dist/client/assets/{collection-detail-D2PAk6Qd.js → collection-detail-IGcfTDmY.js} +1 -1
- package/dist/client/assets/{collection-display-button-uov2GUqF.js → collection-display-button-DOAwE5Tw.js} +1 -1
- package/dist/client/assets/{collection-search-DpMT1vYf.js → collection-search-3KzkGzMw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-etwMAVIq.js → collection-table-wrapper-CMu7JE3j.js} +1 -1
- package/dist/client/assets/{collection-tabs-6TyH3ybi.js → collection-tabs-dylv9NKM.js} +1 -1
- package/dist/client/assets/{command-0A8TicqW.js → command-BocQrEgM.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DlZzl8Qx.js → commerce-onboarding-B8JwqwfK.js} +1 -1
- package/dist/client/assets/{config-FZs5m7aB.js → config-ClbRNIQT.js} +1 -1
- package/dist/client/assets/{connect-D1Az22LS.js → connect-Dqz_Rz8g.js} +1 -1
- package/dist/client/assets/{connection-BOKd-Vhl.js → connection-CebLCGEl.js} +1 -1
- package/dist/client/assets/{connection-card-C0r2lBXt.js → connection-card-CKXxB-Po.js} +1 -1
- package/dist/client/assets/{connection-detail-DR0uEKCM.js → connection-detail-Dzsa_IDx.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cx0hSG8H.js → connection-form-helpers-DrDLIWBH.js} +1 -1
- package/dist/client/assets/{connections-50b_6B2i.js → connections-C3JdNnys.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BGdXs4q_.js → decopilot-sse-pool-8tSKMRqy.js} +1 -1
- package/dist/client/assets/{dialog-CefQc73v.js → dialog-CeNX0yRN.js} +1 -1
- package/dist/client/assets/{domain-settings-f40JEWNa.js → domain-settings-G2ipTpu4.js} +1 -1
- package/dist/client/assets/{drawer-BZ-PaoE1.js → drawer-BJTg8YjY.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dmm7Trn3.js → dropdown-menu-BgCWwdwF.js} +1 -1
- package/dist/client/assets/{e2e-tab-CGSRbTy5.js → e2e-tab-Chmxg6vx.js} +1 -1
- package/dist/client/assets/{editor-BxhxuLJa.js → editor-DETZ-96F.js} +1 -1
- package/dist/client/assets/{empty-state-mYORqltN.js → empty-state-C0IRzoZr.js} +1 -1
- package/dist/client/assets/{empty-state-C54Q6sBj.js → empty-state-CcrxYKAq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DXnTgJE5.js → extract-connection-data-DUuPRZ_W.js} +1 -1
- package/dist/client/assets/{file-explorer-CEisRSg0.js → file-explorer-BhzyhwGD.js} +1 -1
- package/dist/client/assets/{file-type-icon-BFYTEN10.js → file-type-icon-3xYk44u1.js} +1 -1
- package/dist/client/assets/{folder-icon-DD3eiqXL.js → folder-icon-D0bHF6Zs.js} +1 -1
- package/dist/client/assets/{form-CAcKi06k.js → form-C1oJfi4e.js} +1 -1
- package/dist/client/assets/{general-ChXYwEto.js → general-BGCV1D-z.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C-0rHR-M.js → github-repo-picker-D2M_eq3D.js} +1 -1
- package/dist/client/assets/{hooks-DHadwCKp.js → hooks-Cc4ES1dM.js} +1 -1
- package/dist/client/assets/{hosting-tab-yn6WUggV.js → hosting-tab-U1nefYHT.js} +1 -1
- package/dist/client/assets/{index-BCzXIVbP.js → index-B32BMozg.js} +1 -1
- package/dist/client/assets/{index-eiH1IWjN.js → index-B3u0-gGU.js} +1 -1
- package/dist/client/assets/{index-DEVfPJkj.js → index-BpxlYMFY.js} +6 -6
- package/dist/client/assets/index-Bwvz-azu.js +1 -0
- package/dist/client/assets/{index-DfY5ZnY2.js → index-C38kbYHD.js} +1 -1
- package/dist/client/assets/{index-CyVZ5lgJ.js → index-Cm-tI8HA.js} +3 -3
- package/dist/client/assets/{index-CIZG7m9-.js → index-DLeZmbTZ.js} +1 -1
- package/dist/client/assets/{index-WnatCyEy.js → index-Dv6G5BQL.js} +1 -1
- package/dist/client/assets/{index-TfAJegqd.js → index-JvxGeL_G.js} +1 -1
- package/dist/client/assets/{index-redirect-BJRrlGCr.js → index-redirect-BUP1Y4Bj.js} +1 -1
- package/dist/client/assets/{infra-billing-x14J2hwN.js → infra-billing-DB6C79O8.js} +1 -1
- package/dist/client/assets/{input-DJ33AwMQ.js → input-2eed-wFb.js} +1 -1
- package/dist/client/assets/{integration-icon-Bp-AVupB.js → integration-icon-ByuP1sfL.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C1tLDFqS.js → invite-member-dialog-CUgCE2Gc.js} +1 -1
- package/dist/client/assets/{label-C3nYoz5C.js → label-tXVvZcr6.js} +1 -1
- package/dist/client/assets/{layout-CWV7yC9D.js → layout-CixdgJCU.js} +1 -1
- package/dist/client/assets/{login-B3u4sQZp.js → login-DKcjVCNC.js} +1 -1
- package/dist/client/assets/{markdown-BkQsssiC.js → markdown-BGaoSnfw.js} +1 -1
- package/dist/client/assets/mcp-oauth-BhrXYHgy.js +1 -0
- package/dist/client/assets/{members-Dg4YsBhQ.js → members-DqGkrAuN.js} +1 -1
- package/dist/client/assets/{monaco-editor-CekVK54D.js → monaco-editor-CxkEA7O6.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-By6Kd2TD.js → monitoring-stats-row-DFVlmDgN.js} +1 -1
- package/dist/client/assets/{multi-select-BtoaMUJz.js → multi-select-BaEfr9nh.js} +1 -1
- package/dist/client/assets/{oauth-callback-6tEtW-LM.js → oauth-callback-DdfUxDGD.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-MDX175zJ.js → oauth-callback-ai-provider-DTLpN3Ic.js} +1 -1
- package/dist/client/assets/{onboarding-4-7USRUz.js → onboarding-C_1O9_Z6.js} +1 -1
- package/dist/client/assets/{org-layout-BVuUNoCr.js → org-layout-DGYUTjfn.js} +1 -1
- package/dist/client/assets/{organization-choice-IjHgk-3p.js → organization-choice-Dwl3S67f.js} +1 -1
- package/dist/client/assets/{orgs-tZDlTKNv.js → orgs-Cbfk15fx.js} +1 -1
- package/dist/client/assets/{page-seo-form-Cp6KSuC_.js → page-seo-form-CtdWrbUH.js} +1 -1
- package/dist/client/assets/{popover-D55EARay.js → popover-iv9-bRVo.js} +1 -1
- package/dist/client/assets/{post-calendar-BFF6JP7b.js → post-calendar-BF-3BKmT.js} +1 -1
- package/dist/client/assets/{post-editor-Bm1hF1x-.js → post-editor-CSUm1g3w.js} +1 -1
- package/dist/client/assets/{primitives-BrSMCaVk.js → primitives-BMUbY-3r.js} +1 -1
- package/dist/client/assets/{profile-Bhc2V-M8.js → profile-ChgER_w4.js} +1 -1
- package/dist/client/assets/{project-app-view-DrWz74Sr.js → project-app-view-zffLScld.js} +1 -1
- package/dist/client/assets/{prompts-_NVNULaa.js → prompts-BJXEQtkp.js} +1 -1
- package/dist/client/assets/record-editor-ZVt5qmcU.js +1 -0
- package/dist/client/assets/redirect-editor-_hEA33NV.js +1 -0
- package/dist/client/assets/registry-BAXQbBPU.js +2 -0
- package/dist/client/assets/{registry-layout-BrJe1W34.js → registry-layout-qmpmNbSh.js} +1 -1
- package/dist/client/assets/{reports-CWdoeFlh.js → reports-CHDpapuy.js} +1 -1
- package/dist/client/assets/{require-capability-BwNGmU08.js → require-capability-3wcMpc8f.js} +1 -1
- package/dist/client/assets/{required-auth-layout-rRB3j86p.js → required-auth-layout-hMaUVoOg.js} +1 -1
- package/dist/client/assets/{reset-password-CxGtiwtI.js → reset-password-CmWhjgQ4.js} +1 -1
- package/dist/client/assets/{review-settings-CWIQgB3U.js → review-settings-DUcw01FO.js} +1 -1
- package/dist/client/assets/{roles-DtbJAGmi.js → roles-Bd9mQU6Y.js} +1 -1
- package/dist/client/assets/{schema-CTX-wtUj.js → schema-Cds_E6TQ.js} +1 -1
- package/dist/client/assets/{scroll-area-BhaZbee4.js → scroll-area-BO5OUDWz.js} +1 -1
- package/dist/client/assets/{search-input-CVs6a7cw.js → search-input-D55d6B9W.js} +1 -1
- package/dist/client/assets/{secrets-C3f__cCp.js → secrets-D9-fjgJX.js} +1 -1
- package/dist/client/assets/{sections-editor-BqhaMUe3.js → sections-editor-BjCDrWcU.js} +1 -1
- package/dist/client/assets/{select-model-D1dRIP_D.js → select-model-jKA2YuBU.js} +1 -1
- package/dist/client/assets/{select-C8VpiT9w.js → select-obKAMpm9.js} +1 -1
- package/dist/client/assets/{self-tool-result-C8bZjo2U.js → self-tool-result-BpbxkZvS.js} +1 -1
- package/dist/client/assets/{seo-editor-DPQFMo68.js → seo-editor-DLNX1nSm.js} +1 -1
- package/dist/client/assets/{settings-layout-DNHHSoYV.js → settings-layout-BC0cYiLp.js} +1 -1
- package/dist/client/assets/{shell-controls-BlgO97pY.js → shell-controls-CiXVPkBL.js} +1 -1
- package/dist/client/assets/{shell-layout-DdASzo_y.js → shell-layout-BIv7OFJR.js} +1 -1
- package/dist/client/assets/{skill-preview-Cux1kH84.js → skill-preview-CZSTc-AG.js} +1 -1
- package/dist/client/assets/{skills-ByWAAiCH.js → skills-H4kLjMgC.js} +1 -1
- package/dist/client/assets/{spinner-BKgquf7Q.js → spinner-CD0IuFgR.js} +1 -1
- package/dist/client/assets/{sso-BuMyYnVO.js → sso-tei7Iw9q.js} +1 -1
- package/dist/client/assets/{store-BvYy-wk5.js → store-B0gh9mUO.js} +1 -1
- package/dist/client/assets/store-registry-R9PWigS9.js +2 -0
- package/dist/client/assets/{super-agent-icon-X7k4V5iD.js → super-agent-icon-DLJ1KbaV.js} +1 -1
- package/dist/client/assets/{switch-ekFlz4BX.js → switch-BnLZoBmg.js} +1 -1
- package/dist/client/assets/{synced-repos-pwl6TyIr.js → synced-repos-XpZNx3tG.js} +1 -1
- package/dist/client/assets/{table-DxIpuuMu.js → table-CP_nPk_K.js} +1 -1
- package/dist/client/assets/{tabs-Cb3eYxFR.js → tabs-CA7VmlUB.js} +1 -1
- package/dist/client/assets/{task-board-BR_pi0j4.js → task-board-Dga8ccP5.js} +1 -1
- package/dist/client/assets/{tasks-1DwMg88n.js → tasks-CxvH-jKN.js} +1 -1
- package/dist/client/assets/{textarea-DmjAO8WJ.js → textarea-BP2ohu2S.js} +1 -1
- package/dist/client/assets/thread-route-BBDxdOc-.js +1 -0
- package/dist/client/assets/{toggle-group-Buj7cwOI.js → toggle-group-ibYeynko.js} +1 -1
- package/dist/client/assets/{toolbar-T9fNZ5Dm.js → toolbar-DUW3zCdJ.js} +1 -1
- package/dist/client/assets/{track-UqVBrAJT.js → track-BQ5QPnlv.js} +1 -1
- package/dist/client/assets/{types-sWp7JVPE.js → types-Chkrp81i.js} +1 -1
- package/dist/client/assets/{use-ai-providers-QUqgpHAI.js → use-ai-providers-DbmPHdHr.js} +1 -1
- package/dist/client/assets/{use-api-keys-CJDSbqKR.js → use-api-keys-CB6WptRL.js} +1 -1
- package/dist/client/assets/{use-automations-BFLuZmRd.js → use-automations-Cq77GVFG.js} +1 -1
- package/dist/client/assets/{use-autosave-K_2e8huM.js → use-autosave-B_SF2Lgp.js} +1 -1
- package/dist/client/assets/{use-connection-CklhgwT-.js → use-connection-8bb6KUvW.js} +1 -1
- package/dist/client/assets/{use-copy-DXvQhxzo.js → use-copy-C_bz2QMu.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bir9un1y.js → use-create-virtual-mcp-B7qjIXKS.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DDM-x_p4.js → use-debounced-autosave-D4X30b0b.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BX1Z2C1S.js → use-debounced-value-g3CBpavU.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BCpugb4D.js → use-decopilot-events-vaHWss2q.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DXsyiE-F.js → use-delete-connection-BDcn5K8Q.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CpYjp9p_.js → use-deployment-admin-CqUyOr3O.js} +1 -1
- package/dist/client/assets/{use-destination-route-C4i1vP71.js → use-destination-route-CnpOOvjT.js} +1 -1
- package/dist/client/assets/{use-file-configs-C0TVz0AH.js → use-file-configs-DYwI0fup.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DHeyE3Gp.js → use-infinite-scroll-CntYeMaq.js} +1 -1
- package/dist/client/assets/{use-join-requests-2b4gCXfW.js → use-join-requests-jSZwWNOg.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CWXW9vhJ.js → use-mcp-auth-status-RrafTSKa.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BiMbFhZA.js → use-mcp-client-D97h0h5m.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D1SQ9VQp.js → use-mcp-tools-CCcxTn0o.js} +1 -1
- package/dist/client/assets/{use-members-KzBukpu-.js → use-members-CZbriDhf.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DMGreR6U.js → use-navigate-to-agent-C9zcTGhr.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DXJoDvFV.js → use-org-auth-client-BJWK8HrY.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DABsYoTf.js → use-org-repo-syncs-DMXKqbK7.js} +1 -1
- package/dist/client/assets/{use-org-sso-DvDCIeZJ.js → use-org-sso-DEy0sssU.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CxZxpz25.js → use-organization-roles-DVE7C8Dx.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DOmendGP.js → use-organization-settings-C_HbHPzD.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-5GuF3Xky.js → use-panel-navigate-DiZARXsn.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D-9Urbos.js → use-registry-connections-yeoSN6Uu.js} +1 -1
- package/dist/client/assets/{use-secrets-C_EMCwrS.js → use-secrets-B1Zwgh_i.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-JJaaLUdY.js → use-section-preview-base-BOKms3UV.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BvVFIICB.js → use-status-sounds-Db5-HUMF.js} +1 -1
- package/dist/client/assets/{use-tags-CnHiO94-.js → use-tags-CmVNv-r8.js} +1 -1
- package/dist/client/assets/{use-view-mode-BT0iEFTU.js → use-view-mode-FZGz7fYK.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CYMnefxf.js → use-virtual-mcp-DUaqayrx.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CDYVDO6H.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BJGqO6a3.js +1 -0
- package/dist/client/assets/{users-BHgxlfhz.js → users-YGWCb-kB.js} +1 -1
- package/dist/client/assets/{variant-calendar-4jaTpdDv.js → variant-calendar-BJdWzwAh.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BgXxXgC3.js → view-mode-toggle-BnYIof4S.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +157 -157
- package/dist/server/server.js +153 -153
- package/package.json +1 -1
- package/dist/client/assets/index-DFf6BmI8.js +0 -1
- package/dist/client/assets/mcp-oauth-1onT9Dwz.js +0 -1
- package/dist/client/assets/record-editor-rnVyvPSr.js +0 -1
- package/dist/client/assets/redirect-editor-CM_un7BL.js +0 -1
- package/dist/client/assets/registry-B7Kq3HQ7.js +0 -2
- package/dist/client/assets/store-registry-DTeHXWro.js +0 -2
- package/dist/client/assets/thread-route-CvQsqsJY.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CULS4zh1.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DaZYFkir.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,H as oe,o as ke,K as Ae,b as L,j as t,C as Gt,av as Xt,B as te,r as R,bO as Qt,d as ot,w as Wt,n as H,a as ce,t as K,y as Yt,k as Ie,a5 as ht,M as pt,q as B,_ as xt,Z as jt,Y as Zt,a8 as Ce,a9 as ye,ab as Ne,L as Jt,G as en,ax as tn,ay as nn,R as sn,I as on,p as an,ac as ln}from"./index-CyVZ5lgJ.js";import{m as ct,u as rn}from"./use-mcp-client-BiMbFhZA.js";import{C as vt,g as cn,W as dn,S as bt,a as Ct,i as un,d as mn,f as fn}from"./constants-dLUUoWH7.js";import{D as gn}from"./use-destination-route-C4i1vP71.js";import{d as dt,C as hn}from"./self-tool-result-C8bZjo2U.js";import{i as pn}from"./ChevronRight-HiBK7iT4.js";import{aH as xn,N as jn,A as yt,I as vn,s as Je}from"./agent-icon-patNN3F9.js";import{b as Nt,d as bn,e as wt}from"./thread-route-CvQsqsJY.js";import{t as _t}from"./ChevronDown-DS4KDE95.js";import{u as it,a as Cn}from"./use-virtual-mcp-CYMnefxf.js";import{g as yn}from"./github-repo-BpKUwJal.js";import{a as Re,b as St,P as Dt}from"./popover-D55EARay.js";import{i as Ve}from"./Check-BSrzKRPt.js";import{s as we}from"./Plus-DuwKEMqs.js";import{i as kt}from"./SearchMd-BNMN35l9.js";import{s as It}from"./XClose-CId8Q3oo.js";import{T as At}from"./toolbar-T9fNZ5Dm.js";import{D as Tt,a as Pt,b as Ot,c as Nn,g as wn,e as _n,f as Sn}from"./drawer-BZ-PaoE1.js";import{a as Dn,G as kn}from"./github-repo-picker-C-0rHR-M.js";import{g as In,a as An,b as zt}from"./hooks-DHadwCKp.js";import{u as Tn,g as Pn,c as On,d as zn,b as Mn}from"./use-navigate-to-agent-DMGreR6U.js";import{g as $n,a as Mt}from"./agent-capabilities-BxGDQyCw.js";import{u as $t}from"./shell-layout-DdASzo_y.js";import{d as Fn}from"./session-runtime-C-KTDVeQ.js";import{C as Ln}from"./collection-search-DpMT1vYf.js";import{g as En,a as Bn,b as Rn,e as Vn}from"./extract-connection-data-DXnTgJE5.js";import{u as Ft,a as Lt,g as Kn,C as et}from"./connection-card-C0r2lBXt.js";import{D as Et,b as Bt,c as Rt,d as Vt,h as Hn,e as Un}from"./dialog-CefQc73v.js";import{d as W,a as Y,e as Z,b as J,c as ee,F as ut}from"./form-CAcKi06k.js";import{I as re}from"./input-DJ33AwMQ.js";import{S as qn,a as Gn,b as Xn,c as Qn,d as De}from"./select-C8VpiT9w.js";import{T as Wn}from"./textarea-DmjAO8WJ.js";import{b as Kt}from"./use-connection-CklhgwT-.js";import{n as Be,i as tt}from"./Tool02-C4Mhmh2n.js";import{e as Yn}from"./UserSquare-B1QhMNkc.js";import{c as Zn,i as Le,a as mt,E as Jn,p as es,b as ts,d as ns}from"./connection-form-helpers-Cx0hSG8H.js";import{a as nt}from"./authenticate-and-persist-oauth-CjESgZgI.js";import{g as ss}from"./connection-slug-CITJ0kGN.js";import{C as os}from"./collection-tabs-6TyH3ybi.js";import{u as ft}from"./use-infinite-scroll-DHeyE3Gp.js";import{B as Ee}from"./badge-mutKhjD6.js";import{u as is}from"./useSuspenseInfiniteQuery-DaZYFkir.js";import{g as Ke}from"./metadata-dUsYcpuu.js";import{u as as}from"./use-ai-providers-QUqgpHAI.js";function ls(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const rs=2e4;function cs(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Qo(){const n=O.c(19),{org:e}=oe(),s=dn.COMMERCE_DISCOVERY(e.id);let o;n[0]!==e.id||n[1]!==e.slug?(o=ct({connectionId:bt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=o):o=n[2];const{data:a}=ke(o),i=ke({queryKey:Ae.commerceDiscoveryConnection(e.id,s),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const k=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return dt(k)}}),l=i.data?.item??null,{data:r}=ke({...ct({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!l}),c=Ae.commerceDiscoveryDiagnostic(e.id,s),u=!!r;let m;n[3]!==r?(m=async()=>{if(!r)throw new Error("cdClient not ready");const k=await r.callTool({name:vt,arguments:{}});return dt(k).diagnostic??null},n[3]=r,n[4]=m):m=n[4];let f;n[5]!==c||n[6]!==u||n[7]!==m?(f={queryKey:c,enabled:u,retry:1,refetchInterval:ds,queryFn:m},n[5]=c,n[6]=u,n[7]=m,n[8]=f):f=n[8];const d=ke(f),g=l?.metadata?.siteUrl,v=d.data??null,p=d.isSuccess,h=i.isPending||!!l&&d.isPending,j=typeof g=="string"&&g?g:null;let b;n[9]!==g?(b=cs(g),n[9]=g,n[10]=b):b=n[10];const C=r??null;let _;return n[11]!==s||n[12]!==d.isSuccess||n[13]!==C||n[14]!==v||n[15]!==h||n[16]!==j||n[17]!==b?(_={diagnostic:v,isSuccess:p,isLoading:h,siteUrl:j,host:b,connectionId:s,cdClient:C},n[11]=s,n[12]=d.isSuccess,n[13]=C,n[14]=v,n[15]=h,n[16]=j,n[17]=b,n[18]=_):_=n[18],_}function ds(n){return n.state.status!=="error"&&ls(n.state.data)==="generating"?rs:!1}function Wo(n,e){return{to:gn.agents,params:{org:n.slug,project:cn(n.id),panel:"app"},search:{connection:e,tool:vt}}}const us="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function ms(){const n=O.c(13),e=L();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:us,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let l;n[6]!==e?(l=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=l):l=n[7];let r;n[8]!==l?(r=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:l})]}),n[8]=l,n[9]=r):r=n[9];let c;return n[10]!==a||n[11]!==r?(c=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,r]}),n[10]=a,n[11]=r,n[12]=c):c=n[12],c}function fs(){const n=O.c(19),e=L();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:xn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Gt,label:a},n[6]=a,n[7]=i):i=n[7];let l;n[8]!==e?(l=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=l):l=n[9];let r;n[10]!==l?(r={Icon:jn,label:l},n[10]=l,n[11]=r):r=n[11];let c;n[12]!==o||n[13]!==i||n[14]!==r?(c=[o,i,r],n[12]=o,n[13]=i,n[14]=r,n[15]=c):c=n[15];const u=c;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(gs)})]}),n[17]=u,n[18]=f):f=n[18],f}function gs(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function Yo(n){const e=O.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,l=L(),r=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let c;e[0]!==a||e[1]!==l?(c=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":l("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Xt,{size:18})}),e[0]=a,e[1]=l,e[2]=c):c=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==r||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(pn,{size:16,className:"shrink-0 text-foreground/25"}),r&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:r,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=r,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let g;e[10]!==o?(g=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=g):g=e[11];let v;e[12]!==i||e[13]!==d||e[14]!==g?(v=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,g]}),e[12]=i,e[13]=d,e[14]=g,e[15]=v):v=e[15];let p,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),h=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=p,e[17]=h):(p=e[16],h=e[17]);let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[p,h,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(ms,{}),t.jsx("div",{className:"flex-1"}),t.jsx(fs,{})]})]}),e[18]=j):j=e[18];let b;return e[19]!==c||e[20]!==v?(b=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,v,j]}),e[19]=c,e[20]=v,e[21]=b):b=e[21],b}function Zo(n){const e=O.c(5),{ready:s,pending:o,label:a,onClick:i,children:l}=n,r=o||!s,c=s&&!o?l:null;let u;return e[0]!==a||e[1]!==i||e[2]!==r||e[3]!==c?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:r,children:[a,c]}),e[0]=a,e[1]=i,e[2]=r,e[3]=c,e[4]=u):u=e[4],u}function Ht(){const n=R.useContext(Qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function hs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function at(n){const e=O.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",l=a==="xs"?"text-[9px]":"text-xs";let r;e[0]!==i?(r=H(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=r):r=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:hs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:H("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let m;return e[9]!==r||e[10]!==c||e[11]!==u?(m=t.jsx("div",{className:r,style:c,children:u}),e[9]=r,e[10]=c,e[11]=u,e[12]=m):m=e[12],m}function ps({invitation:n,onChanged:e}){const s=L(),[o,a]=R.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),l=async()=>{a(!0);try{const u=await ce.organization.acceptInvitation({invitationId:n.id});if(u.error){K.error(u.error.message),a(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}K.success(s("header.orgSwitcher.joined",{name:i})),Yt();let c;try{c=(await ce.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},r=async()=>{a(!0);try{const c=await ce.organization.rejectInvitation({invitationId:n.id});if(c.error){K.error(c.error.message),a(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{K.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(at,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:l,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:r,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(It,{size:14})})]})]})}function xs(n){const e=O.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=L(),{data:l}=Wt(),{invitations:r,refetch:c}=Ht();let u;e[0]!==s?(u=(I,A)=>I.slug===s?-1:A.slug===s?1:I.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...l??[]].sort(u),[f,d]=R.useState(""),g=f.toLowerCase(),v=g?m.filter(I=>I.name.toLowerCase().includes(g)||I.slug.toLowerCase().includes(g)):m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(kt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=p):p=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=I=>d(I.target.value),e[3]=h):h=e[3];let j;e[4]!==f?(j=I=>I.key==="Escape"&&f&&d(""),e[4]=f,e[5]=j):j=e[5];let b;e[6]!==i?(b=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=b):b=e[7];let C;e[8]!==f||e[9]!==j||e[10]!==b?(C=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:h,onKeyDown:j,placeholder:b,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=j,e[10]=b,e[11]=C):C=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(we,{size:16}),e[12]=_):_=e[12];let k;e[13]!==a?(k=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:_}),e[13]=a,e[14]=k):k=e[14];let D;e[15]!==C||e[16]!==k?(D=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[p,C,k]}),e[15]=C,e[16]=k,e[17]=D):D=e[17];const z="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let x;e[18]!==r||e[19]!==f||e[20]!==c?(x=!f&&r.map(I=>t.jsx(ps,{invitation:I,onChanged:c},I.id)),e[18]=r,e[19]=f,e[20]=c,e[21]=x):x=e[21];const S=v.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let P;e[22]!==o||e[23]!==s?(P=I=>t.jsxs("button",{type:"button",onClick:()=>o(I.slug),className:H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",I.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(at,{org:I,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.slug})]}),I.slug===s&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},I.id),e[22]=o,e[23]=s,e[24]=P):P=e[24];const N=v.map(P);let y;e[25]!==x||e[26]!==S||e[27]!==N?(y=t.jsxs("div",{className:z,children:[x,S,N]}),e[25]=x,e[26]=S,e[27]=N,e[28]=y):y=e[28];let T;return e[29]!==y||e[30]!==D?(T=t.jsxs(t.Fragment,{children:[D,y]}),e[29]=y,e[30]=D,e[31]=T):T=e[31],T}function js(n){const e=O.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,l=a===void 0?"start":a,r=i===void 0?"bottom":i,c=ot(),[u,m]=R.useState(!1),[f,d]=R.useState(!1);let g;e[0]!==s?(g=t.jsx(Re,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const v=String(u);let p;e[2]!==c?(p=D=>{m(!1),c({to:"/$org",params:{org:D}})},e[2]=c,e[3]=p):p=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m(!1),d(!0)},e[4]=h):h=e[4];let j;e[5]!==o||e[6]!==v||e[7]!==p?(j=t.jsx(xs,{orgParam:o,onSelectOrg:p,onCreateOrg:h},v),e[5]=o,e[6]=v,e[7]=p,e[8]=j):j=e[8];let b;e[9]!==l||e[10]!==r||e[11]!==j?(b=t.jsx(St,{side:r,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:bs,onCloseAutoFocus:vs,children:j}),e[9]=l,e[10]=r,e[11]=j,e[12]=b):b=e[12];let C;e[13]!==u||e[14]!==g||e[15]!==b?(C=t.jsxs(Dt,{open:u,onOpenChange:m,children:[g,b]}),e[13]=u,e[14]=g,e[15]=b,e[16]=C):C=e[16];let _;e[17]!==f?(_=t.jsx(hn,{open:f,onOpenChange:d}),e[17]=f,e[18]=_):_=e[18];let k;return e[19]!==_||e[20]!==C?(k=t.jsxs(t.Fragment,{children:[C,_]}),e[19]=_,e[20]=C,e[21]=k):k=e[21],k}function vs(n){return n.preventDefault()}function bs(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Cs(n){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:r,disabled:c}=n,u=a===void 0?"Search...":a;let m;e[0]!==l?(m=H("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=m):m=e[1];const f=c?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=H("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let g;e[4]!==r?(g=r?t.jsx(Ie,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=r,e[5]=g):g=e[5];let v;e[6]!==o?(v=b=>o(b.target.value),e[6]=o,e[7]=v):v=e[7];let p;e[8]!==c||e[9]!==i||e[10]!==u||e[11]!==v||e[12]!==s?(p=t.jsx("input",{type:"text",value:s,onChange:v,onKeyDown:i,placeholder:u,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=u,e[11]=v,e[12]=s,e[13]=p):p=e[13];let h;e[14]!==d||e[15]!==g||e[16]!==p?(h=t.jsxs("label",{className:d,children:[g,p]}),e[14]=d,e[15]=g,e[16]=p,e[17]=h):h=e[17];let j;return e[18]!==m||e[19]!==h?(j=t.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=j):j=e[20],j}function ys(n,e,s){if(!s)return null;const o=In(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function Ns(n){const e=O.c(6),{value:s,onChange:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(Cs,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function ws(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function _s(n){const e=O.c(10),{org:s,onClose:o}=n,a=L();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let r;e[4]!==a?(r=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==r?(c=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Jt,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:r})}),e[6]=i,e[7]=l,e[8]=r,e[9]=c):c=e[9],c}function Ss(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ut,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ds(n){const e=O.c(11),{onImportFromGithub:s}=n,o=L();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(kn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==o?(r=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=r):r=e[7];let c;return e[8]!==l||e[9]!==r?(c=t.jsx(Ut,{action:l,children:r}),e[8]=l,e[9]=r,e[10]=c):c=e[10],c}function ks(n){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H(o),e[2]=o,e[3]=l):l=e[3];let r;e[4]!==s?(r=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=r):r=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{className:"size-4"}),e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==r?(u=t.jsx(At,{"aria-label":i,className:l,onClick:r,children:c}),e[7]=i,e[8]=l,e[9]=r,e[10]=u):u=e[10],u}function Is(n){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==a?(r=H(a),e[3]=a,e[4]=r):r=e[4];let c;e[5]!==s?(c=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==l||e[13]!==r||e[14]!==c||e[15]!==f?(d=t.jsx(xt,{children:t.jsxs(jt,{tooltip:l,className:r,onClick:c,children:[u,f]})}),e[12]=l,e[13]=r,e[14]=c,e[15]=f,e[16]=d):d=e[16],d}function As(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ot,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ts(n){const e=O.c(8),{emptyCtaClass:s}=n,o=L();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=H(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[4]=l):l=e[4];let r;return e[5]!==a||e[6]!==i?(r=t.jsx(At,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=r):r=e[7],r}function Ps(n){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==a?(r=H(a),e[3]=a,e[4]=r):r=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{}),e[5]=c):c=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==l||e[11]!==r||e[12]!==m?(f=t.jsx(Re,{asChild:!0,children:t.jsxs(jt,{tooltip:l,className:r,children:[c,m]})}),e[10]=l,e[11]=r,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let g;return e[17]!==d?(g=t.jsx(xt,{children:d}),e[17]=d,e[18]=g):g=e[18],g}function Os(n){const e=O.c(9),{children:s}=n,o=L();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let r;return e[6]!==a||e[7]!==l?(r=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=r):r=e[8],r}function zs(n){const e=ot(),{create:s}=An(),{locator:o}=oe(),a=Nt(),i=bn();return async l=>{const r=crypto.randomUUID(),c=l===i?ys(n,o,a??""):null;try{await s({id:r,virtual_mcp_id:l,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:r},search:{virtualmcpid:l}})}}function st(n){const e=O.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let r;e[2]!==s.icon||e[3]!==s.title?(r=t.jsx(yt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=r):r=e[4];let c;e[5]!==s.title?(c=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==c||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[9]=c,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==l||e[16]!==r||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:l,children:[r,m,f]}),e[14]=a,e[15]=l,e[16]=r,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function Ut(n){const e=O.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function Ms(n){const e=O.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,r]=R.useState(""),c=it(),u=c??[],{org:m}=oe(),{data:f}=ce.useSession(),d=f?.user?.id??"anon",g=Pn(c),v=On(),p=zs(m.slug),h=$n(c),j=l.toLowerCase(),b=u.filter(Es).filter(F=>!h.has(F.id)).filter(Ls).filter(F=>!l||F.title.toLowerCase().includes(j)),C=b.filter(Fs),_=b.filter($s),k=Ct(m.id),D=!l||k.title.toLowerCase().includes(j),z=!!(o&&D);let x;e[0]!==s||e[1]!==o?(x=()=>{o?.(null),s(),r("")},e[0]=s,e[1]=o,e[2]=x):x=e[2];const S=x,P=F=>{if(o){o(F.id),s(),r("");return}zn({orgId:m.id,userId:d},F.id,g),v(),s(),r(""),p(F.id)},N="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==l?(y=t.jsx(Ns,{value:l,onChange:r}),e[3]=l,e[4]=y):y=e[4];const T="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",I=o&&D&&k&&t.jsx(st,{agent:k,selected:!a||a===k.id,onClick:S}),A=(C.length>0||!l)&&t.jsx(Ds,{onImportFromGithub:i}),M=C.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>P(F)},F.id)),V=_.length>0&&t.jsx(Ss,{}),X=_.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>P(F)},F.id));let E;e[5]!==z||e[6]!==l||e[7]!==b.length?(E=b.length===0&&!z&&l&&t.jsx(ws,{}),e[5]=z,e[6]=l,e[7]=b.length,e[8]=E):E=e[8];let ne;e[9]!==E||e[10]!==I||e[11]!==A||e[12]!==M||e[13]!==V||e[14]!==X?(ne=t.jsxs("div",{className:T,children:[I,A,M,V,X,E]}),e[9]=E,e[10]=I,e[11]=A,e[12]=M,e[13]=V,e[14]=X,e[15]=ne):ne=e[15];let q;e[16]!==s||e[17]!==m?(q=t.jsx(_s,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=q):q=e[18];let de;return e[19]!==ne||e[20]!==q||e[21]!==y?(de=t.jsxs("div",{className:N,children:[y,ne,q]}),e[19]=ne,e[20]=q,e[21]=y,e[22]=de):de=e[22],de}function $s(n){return!Mt(n.metadata)}function Fs(n){return Mt(n.metadata)}function Ls(n){return!mn(n.id)}function Es(n){return!un(n.id)}function Bs(n){const e=O.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:l,side:r,align:c}=s,u=o===void 0?!1:o,m=r===void 0?"right":r,f=c===void 0?"start":c,[d,g]=R.useState(!1),[v,p]=R.useState(!1),h=ht(),{setOpenMobile:j}=pt(),b=Tn(),C=b?"border border-border":void 0;let _;e[2]!==b?(_=A=>b?t.jsx(Os,{children:A}):A,e[2]=b,e[3]=_):_=e[3];const k=_;let D;e[4]!==h||e[5]!==j?(D=()=>{g(!1),h&&j(!1)},e[4]=h,e[5]=j,e[6]=D):D=e[6];const z=D;let x;e[7]!==z?(x=()=>{z(),p(!0)},e[7]=z,e[8]=x):x=e[8];const S=x;let P;e[9]!==z||e[10]!==S||e[11]!==i||e[12]!==d||e[13]!==l?(P=d&&t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Zt,{className:"h-4 w-24"})}),children:t.jsx(Ms,{onClose:z,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:S})}),e[9]=z,e[10]=S,e[11]=i,e[12]=d,e[13]=l,e[14]=P):P=e[14];const N=P;let y;e[15]!==f||e[16]!==u||e[17]!==C||e[18]!==b||e[19]!==h||e[20]!==d||e[21]!==N||e[22]!==m||e[23]!==a||e[24]!==k?(y=h?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:a}):u?k(t.jsx(ks,{setOpen:g,emptyCtaClass:C})):t.jsx(Is,{setOpen:g,highlightEmpty:b,emptyCtaClass:C}),t.jsx(Tt,{open:d,onOpenChange:g,direction:"bottom",children:t.jsxs(Pt,{className:"max-h-[85dvh] p-0",children:[t.jsx(As,{}),N]})})]}):t.jsxs(Dt,{open:d,onOpenChange:A=>{A&&!d&&B("agent_browser_opened",{surface:"desktop_popover"}),g(A)},children:[a?t.jsx(Re,{asChild:!0,children:a}):u?k(t.jsx(Re,{asChild:!0,children:t.jsx(Ts,{emptyCtaClass:C})})):t.jsx(Ps,{wrapEmptyHint:k,highlightEmpty:b,emptyCtaClass:C}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:N})]}),e[15]=f,e[16]=u,e[17]=C,e[18]=b,e[19]=h,e[20]=d,e[21]=N,e[22]=m,e[23]=a,e[24]=k,e[25]=y):y=e[25];let T;e[26]!==v?(T=t.jsx(Dn,{open:v,onOpenChange:p,mode:"agent"}),e[26]=v,e[27]=T):T=e[27];let I;return e[28]!==T||e[29]!==y?(I=t.jsxs(t.Fragment,{children:[y,T]}),e[28]=T,e[29]=y,e[30]=I):I=e[30],I}function Rs(){const n=O.c(2),e=it()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?Fn(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Vs="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ks(n){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=L(),r=Cn(s)??o??null;let c,u,m,f,d;e[0]!==r?.title||e[1]!==a||e[2]!==l?(d=r?.title??l("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",c="button",u=a,m=l("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=r?.title,e[1]=a,e[2]=l,e[3]=c,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(c=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const g=r?.icon??null;let v;e[8]!==g||e[9]!==d?(v=t.jsx(yt,{icon:g,name:d,size:"xs"}),e[8]=g,e[9]=d,e[10]=v):v=e[10];let p;e[11]!==c||e[12]!==u||e[13]!==m||e[14]!==v?(p=t.jsx("button",{type:c,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:v}),e[11]=c,e[12]=u,e[13]=m,e[14]=v,e[15]=p):p=e[15];let h;e[16]!==d?(h=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=h):h=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let b;e[19]!==h?(b=t.jsxs("button",{type:"button",className:Vs,children:[h,j]}),e[19]=h,e[20]=b):b=e[20];let C;e[21]!==s||e[22]!==i||e[23]!==b?(C=t.jsx(Bs,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:b}),e[21]=s,e[22]=i,e[23]=b,e[24]=C):C=e[24];let _;return e[25]!==C||e[26]!==f||e[27]!==p?(_=t.jsxs("div",{className:f,children:[p,C]}),e[25]=C,e[26]=f,e[27]=p,e[28]=_):_=e[28],_}function Jo(n){const e=O.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=L(),{org:i}=oe(),{state:l,isMobile:r}=pt(),c=Ht().invitations.length>0,u=l==="collapsed"||r;let m;e[2]!==c||e[3]!==i.name||e[4]!==a?(m=c?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=c,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(at,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==c||e[9]!==u?(d=c&&t.jsx("span",{className:H("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=c,e[9]=u,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==d?(g=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=g):g=e[13];let v;e[14]!==i.name||e[15]!==o?(v=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=v):v=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=p):p=e[17];let h;e[18]!==m||e[19]!==g||e[20]!==v?(h=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,v,p]})}),e[18]=m,e[19]=g,e[20]=v,e[21]=h):h=e[21];let j;e[22]!==i.slug||e[23]!==h?(j=t.jsx(js,{orgParam:i.slug,trigger:h}),e[22]=i.slug,e[23]=h,e[24]=j):j=e[24];let b;e[25]!==i.name?(b=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=b):b=e[26];let C;return e[27]!==b||e[28]!==j?(C=t.jsxs(Ne,{children:[j,b]}),e[27]=b,e[28]=j,e[29]=C):C=e[29],C}function ei(n){const e=O.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=oe(),{threads:i}=zt(),l=it(),{data:r}=ce.useSession(),{setTaskId:c,createNewTask:u}=$t(),m=Rs();let f;e[2]!==a.id?(f=Ct(a.id),e[2]=a.id,e[3]=f):f=e[3];const d=f,g=d.id,v=wt();let p;e[4]!==l||e[5]!==u||e[6]!==g||e[7]!==o||e[8]!==m||e[9]!==r?.user?.id||e[10]!==c||e[11]!==i?(p=k=>{const D=k??g,z=(l??[]).find(S=>S.id===D),x=Mn(i,D,r?.user?.id,m(D),!!(z&&yn(z)));x?c(x.id,D):u(D),o?.()},e[4]=l,e[5]=u,e[6]=g,e[7]=o,e[8]=m,e[9]=r?.user?.id,e[10]=c,e[11]=i,e[12]=p):p=e[12];const h=p;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=j):j=e[13];const b=v===g?d:void 0;let C;e[14]!==v||e[15]!==h?(C=()=>h(v),e[14]=v,e[15]=h,e[16]=C):C=e[16];let _;return e[17]!==v||e[18]!==h||e[19]!==b||e[20]!==C?(_=t.jsx(R.Suspense,{fallback:j,children:t.jsx(Ks,{agentId:v,fallback:b,onOpenHome:C,onPick:h})}),e[17]=v,e[18]=h,e[19]=b,e[20]=C,e[21]=_):_=e[21],_}function ti(){const n=O.c(20),e=L(),{threads:s}=zt(),{createNewTask:o}=$t(),a=wt(),i=Nt();let l;n[0]!==i||n[1]!==s?(l=s.find(h=>h.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const r=l;let c;n[3]!==a||n[4]!==o||n[5]!==r?(c=()=>{o(a,r)},n[3]=a,n[4]=o,n[5]=r,n[6]=c):c=n[6];const u=c;let m;n[7]!==e?(m=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=m):m=n[8];let f;n[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(vn,{size:16}),n[9]=f):f=n[9];let d;n[10]!==u||n[11]!==m?(d=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:u,"aria-label":m,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),n[10]=u,n[11]=m,n[12]=d):d=n[12];let g;n[13]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=g):g=n[14];let v;n[15]!==g?(v=t.jsx(ye,{side:"bottom",children:g}),n[15]=g,n[16]=v):v=n[16];let p;return n[17]!==d||n[18]!==v?(p=t.jsxs(Ne,{children:[d,v]}),n[17]=d,n[18]=v,n[19]=p):p=n[19],p}function Hs({open:n,onOpenChange:e,onCreated:s}){const o=L(),{org:a}=oe(),{data:i}=ce.useSession(),{stdioEnabled:l}=en(),r=ht(),c=Kt(),u=Ft(),f=Lt(u,"").items,d=tn({resolver:nn(Zn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),v=d.watch("connection_url"),p=d.watch("npx_package"),h=Le({uiType:g,connectionUrl:v??"",npxPackage:p??""})??mt({uiType:g,connectionUrl:v??"",registryItems:f}),j=x=>{const S=x.trim();if(!S)return;const P=!!d.formState.dirtyFields.title,N=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,T=A=>{if(A&&(!P&&!d.getValues("title").trim()&&A.title&&d.setValue("title",A.title,{shouldDirty:!1}),!N&&!(d.getValues("description")??"").trim()&&A.description&&d.setValue("description",A.description,{shouldDirty:!1}),!y&&A.envVarKeys?.length)){const M=d.getValues("env_vars")??[],V=new Set(M.map(E=>E.key)),X=A.envVarKeys.filter(E=>!V.has(E));X.length>0&&d.setValue("env_vars",[...M,...X.map(E=>({key:E,value:""}))],{shouldDirty:!0})}},I=es(S);if(I&&l){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",I.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),T(Le({uiType:"NPX",npxPackage:I.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const A=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",A,{shouldDirty:!0}),d.setValue("connection_url",S,{shouldDirty:!0}),T(Le({uiType:A,connectionUrl:S})??mt({uiType:A,connectionUrl:S,registryItems:f}));return}g==="NPX"&&T(Le({uiType:"NPX",npxPackage:S}))},b=x=>{x||d.reset(),e(x)},C=async x=>{let S,P=null,N=null,y=null;x.ui_type==="NPX"?(S="STDIO",P="",y=ts(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(S="STDIO",P="",y=ns(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(S=x.ui_type,P=x.connection_url||"",N=x.connection_token||null);const T=En("conn");try{await c.create.mutateAsync({id:T,title:x.title,description:x.description||null,connection_type:S,connection_url:P,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(T)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},_=o("connections.createConnectionDialog.title"),k=o("connections.createConnectionDialog.description"),D=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),z=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(W,{control:d.control,name:"ui_type",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(qn,{value:x.value,onValueChange:x.onChange,children:[t.jsx(J,{children:t.jsx(Gn,{children:t.jsx(Xn,{})})}),t.jsxs(Qn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Yn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(W,{control:d.control,name:"npx_package",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...x,value:x.value??"",onPaste:S=>{const P=S.clipboardData.getData("text");P&&(S.preventDefault(),d.setValue("npx_package",P.trim(),{shouldDirty:!0}),j(P))},onBlur:S=>{j(S.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(W,{control:d.control,name:"stdio_command",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"stdio_args",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...x,value:x.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(W,{control:d.control,name:"env_vars",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(J,{children:t.jsx(Jn,{value:x.value??[],onChange:x.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(W,{control:d.control,name:"connection_url",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...x,value:x.value??"",onPaste:S=>{const P=S.clipboardData.getData("text");P&&(S.preventDefault(),d.setValue("connection_url",P.trim(),{shouldDirty:!0}),j(P))},onBlur:S=>{j(S.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"connection_token",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:h?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(J,{children:t.jsx(re,{type:"password",placeholder:h?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...x,value:x.value??""})}),h?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"title",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...x})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"description",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(J,{children:t.jsx(Wn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...x,value:x.value??""})}),t.jsx(ee,{})]})})]});return r?t.jsx(Tt,{open:n,onOpenChange:b,children:t.jsxs(Pt,{className:"max-h-[90vh]",children:[t.jsx(Nn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ot,{children:_}),t.jsx(wn,{className:"mt-1",children:k})]}),t.jsx(_n,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(It,{size:16})})})]})}),t.jsx(ut,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:z}),t.jsx(Sn,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:D})})]})})]})}):t.jsx(Et,{open:n,onOpenChange:b,children:t.jsxs(Bt,{className:"sm:max-w-[525px]",children:[t.jsxs(Rt,{children:[t.jsx(Vt,{children:_}),t.jsx(Hn,{children:k})]}),t.jsx(ut,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"py-4",children:z}),t.jsxs(Un,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>b(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:D})]})]})})]})})}function Us(n){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:r,connectingItemId:c,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,g=s===void 0?"add":s,v=d===void 0?"connected":d,p=L(),{org:h}=oe(),j=R.useDeferredValue(u),b=u!==j;let C;e[0]!==j?(C=j.trim().toLowerCase(),e[0]=j,e[1]=C):C=e[1];const _=C;let k;e[2]!==v?(k=w=>w??v,e[2]=v,e[3]=k):k=e[3];const[D,z]=sn(on.connectionsTab(h.slug)+(v==="all"?":home-modal":":agent-modal"),k);let x;e[4]!==D||e[5]!==z?(x=w=>{w!==D&&B("connections_dialog_tab_changed",{to_tab:w}),z(w)},e[4]=D,e[5]=z,e[6]=x):x=e[6];const S=x;let P;e[7]!==h.id||e[8]!==h.slug?(P={connectionId:bt,orgId:h.id,orgSlug:h.slug},e[7]=h.id,e[8]=h.slug,e[9]=P):P=e[9];const N=rn(P),y=j?.trim().split(/\s+/).filter(Boolean)??[],T=y.length>0?{operator:"or",conditions:y.flatMap(Js)}:void 0,I={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(I),{data:M,fetchNextPage:V,hasNextPage:X,isFetchingNextPage:E}=is({queryKey:Ae.collectionListInfinite(N,h.id,"","CONNECTIONS",A),queryFn:async w=>{const{pageParam:$}=w,se=$===void 0?0:$;return(await N.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Ys,staleTime:3e4}),ne=M?.pages.flatMap(Ws)??[],q=Kn(ne),de=new Set(ne.filter(Qs).map(Xs)),F=Ft(),ie=Lt(F,j),He=ft(ie.loadMore,ie.hasMore,ie.isLoadingMore),Ue=ft(V,X??!1,E),G=D==="all"||!!_,lt=G?ie.items.filter(w=>{const $=Bn(w);if($&&de.has($))return!1;if(!_)return!0;const se=Ke(w._meta),ae=[w.title,w.description,w.name,w.server?.title,w.server?.description,w.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(Q=>ae.includes(Q.toLowerCase()))}):[],_e=lt.filter(Gs),Se=lt.filter(qs);let Te;e[10]!==a?(Te=w=>w.some($=>a.has($.id)),e[10]=a,e[11]=Te):Te=e[11];const qe=Te;let Pe;e[12]!==a||e[13]!==o||e[14]!==c||e[15]!==qe||e[16]!==g||e[17]!==i||e[18]!==f||e[19]!==l||e[20]!==p?(Pe=(w,$,se,ae,Q)=>{const Fe=qe(Q),be=Q.find(le=>!a.has(le.id)),U=Q[0];if(g==="browse"){const le=ss(U);return t.jsx(et,{connection:{title:$,icon:se,description:Q.length>1?`${Q.length} instances`:ae??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",p("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{B("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:Q.length}),f?.(le)}},w)}return t.jsx(et,{connection:{title:$,icon:se,description:ae},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Fe&&t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",p("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),be?(B("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&B("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(B("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),l(U))},children:p("virtualMcp.connectionDialogContent.add")})]})},w)},e[12]=a,e[13]=o,e[14]=c,e[15]=qe,e[16]=g,e[17]=i,e[18]=f,e[19]=l,e[20]=p,e[21]=Pe):Pe=e[21];const Oe=Pe;let ze;e[22]!==c||e[23]!==g||e[24]!==r||e[25]!==p?(ze=w=>{const $=Ke(w._meta),se=$?.friendlyName||$?.friendly_name||w.server?.title||w.title||w.server?.name||w.name||w.id||"",ae=w.server?.description||w.description||null,Q=w.server?.icons?.[0]?.src||Rn(w.server?.repository)||null,Fe=$?.official===!0,be=$?.verified===!0,U=$?.owner==="deco";return t.jsx(et,{connection:{title:se,description:ae,icon:Q},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:p("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Fe&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Fe&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),B("connection_add_clicked",{action:"connect_new",registry_item_id:w.id,app_name:$?.friendlyName||w.server?.name||w.name||null}),r(w)},children:c===w.id?t.jsx(Ie,{size:14,className:"animate-spin"}):p(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${w.id}`)},e[22]=c,e[23]=g,e[24]=r,e[25]=p,e[26]=ze):ze=e[26];const rt=ze;let ue;e[27]!==D||e[28]!==S||e[29]!==m||e[30]!==_||e[31]!==p?(ue=!_&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(os,{tabs:[{id:"all",label:p("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:p("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:D,onTabChange:w=>S(w)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{B("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),p("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=D,e[28]=S,e[29]=m,e[30]=_,e[31]=p,e[32]=ue):ue=e[32];const Ge=b&&"opacity-50 pointer-events-none";let me;e[33]!==Ge?(me=H("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[33]=Ge,e[34]=me):me=e[34];const qt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Me;e[35]!==Oe?(Me=w=>{if(w.type==="group")return Oe(w.key,w.title,w.icon,null,w.connections);const $=w.connection;return Oe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Oe,e[36]=Me):Me=e[36];const Xe=q.map(Me);let fe;e[37]!==Ue?(fe=t.jsx("div",{ref:Ue,className:"col-span-full h-1"}),e[37]=Ue,e[38]=fe):fe=e[38];let ge;e[39]!==E?(ge=E&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=E,e[40]=ge):ge=e[40];const Qe=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(tt,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=G&&_e.map(rt),Ye=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ze=G&&Se.map(rt);let he;e[41]!==He||e[42]!==F||e[43]!==G?(he=G&&F.length>0&&t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[41]=He,e[42]=F,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==Xe||e[49]!==fe||e[50]!==ge||e[51]!==Qe||e[52]!==We||e[53]!==Ye||e[54]!==Ze||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:qt,children:[Xe,fe,ge,Qe,We,Ye,Ze,he,pe]}),e[48]=Xe,e[49]=fe,e[50]=ge,e[51]=Qe,e[52]=We,e[53]=Ye,e[54]=Ze,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==D||e[59]!==q.length||e[60]!==Se||e[61]!==u||e[62]!==p||e[63]!==_e?(je=q.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?p("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):p(D==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=D,e[59]=q.length,e[60]=Se,e[61]=u,e[62]=p,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let $e;return e[69]!==ue||e[70]!==ve?($e=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=$e):$e=e[71],$e}function qs(n){return!n.verified&&!Ke(n._meta)?.verified&&!n.meta?.verified}function Gs(n){return n.verified||Ke(n._meta)?.verified||n.meta?.verified}function Xs(n){return n.app_name}function Qs(n){return n.app_name}function Ws(n){return n?.items??[]}function Ys(n,e){if(n?.hasMore)return e.reduce(Zs,0)}function Zs(n,e){return n+(e?.items?.length??0)}function Js(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function ni({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=L(),l=a.mode??"add",r="agentId"in a?a.agentId:void 0,c="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:N=>{},m=(N,y,T)=>{r&&B("agent_connection_attached",{agent_id:r,connection_id:N,app_name:y,mode:T})},[f,d]=R.useState(null),[g,v]=R.useState(o),[p,h]=R.useState(!1),{org:j}=oe(),{data:b}=ce.useSession(),C=Kt(),_=an(),k=ot(),D=N=>{e(!1),k({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:N}})},z=()=>{_.invalidateQueries({predicate:N=>{const y=N.queryKey;return y[1]===j.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},x=async(N,y)=>{B("connection_oauth_succeeded",{connection_id:N,flow:y});const T=new URL(`/api/${j.slug}/mcp/${N}`,window.location.origin);await _.invalidateQueries({queryKey:Ae.isMCPAuthenticated(T.href,null)}),z()},S=async N=>{d(N.app_name??N.id);try{const T=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await C.create.mutateAsync({title:T,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,M=await nt({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:V=>C.update.mutateAsync({id:A,data:{connection_token:V}}).then(()=>{})});if(M.ran&&!M.ok){B("connection_oauth_failed",{connection_id:A,flow:"clone",error:M.error??"no_token"}),K.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:M.error??"no token received"})),await C.delete.mutateAsync(A);return}M.ran&&await x(A,"clone"),m(A,N.app_name??null,"clone"),u(A)}catch(y){console.error("Failed to add connection:",y),K.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async N=>{if(!(!j||!b?.user?.id)){d(N.id);try{const y=Vn(N,j.id,b.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,A=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!A){K.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:M}=await C.create.mutateAsync(y),V=await nt({connectionId:M,orgId:j.id,orgSlug:j.slug,persistFallback:X=>C.update.mutateAsync({id:M,data:{connection_token:X}}).then(()=>{})});if(V.ran&&!V.ok){B("connection_oauth_failed",{connection_id:M,flow:"connect_new",error:V.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:V.error??"no token received"})}),m(M,y.app_name??null,"new"),u(M);return}V.ran?(await x(M,"connect_new"),K.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(i("virtualMcp.addConnectionDialog.connected")),m(M,y.app_name??null,"new"),u(M)}catch(y){console.error("Failed to connect:",y),K.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(Et,{open:n,onOpenChange:e,children:[t.jsxs(Bt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Rt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Vt,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Ln,{value:g,onChange:v,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Us,{mode:l,agentId:r,addedConnectionIds:c,onAdd:u,onCloneAndAdd:S,onConnectAndAdd:P,connectingItemId:f,search:g,onCreateConnection:()=>h(!0),onBrowseNavigate:D,defaultTab:s})})]}),t.jsx(Hs,{open:p,onOpenChange:h,onCreated:async N=>{h(!1);const y=await nt({connectionId:N,orgId:j.id,orgSlug:j.slug,persistFallback:T=>C.update.mutateAsync({id:N,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){B("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:y.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(N,null,"custom"),u(N),e(!1);return}y.ran&&await x(N,"custom_create"),m(N,null,"custom"),u(N),e(!1)}})]})}const gt=new Map;function si(){const{org:n}=oe(),e=ln(),s=as(),o=s.find(h=>h.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:r}=ke({queryKey:Ae.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=a?.balanceCents??null,u=c!=null?c/100:null,m=R.useRef(new Map);if(c!=null){const h=gt.get(n.id);m.current.get(n.id)&&h!=null&&c>h&&B("credits_topped_up_detected",{organization_id:n.id,delta_cents:c-h,previous_balance_cents:h,new_balance_cents:c}),gt.set(n.id,c),m.current.set(n.id,!0)}const f=!!o,d=c!=null&&c>0,g=c!=null&&c===0,v=c!=null&&c===200,p=s.length>0&&s.every(h=>h.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:u,hasCredits:d,isZeroBalance:g,isInitialFreeCredit:v,hasOnlyDecoProvider:p,isLoading:i,isFetching:r,refetch:l}}const eo=4,to="TASK";function no(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,eo)||to}function oi(n,e,s){const o=s?.trim();return o||(e==null?null:`${no(n)}-${String(e).padStart(2,"0")}`)}const so=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function ii(n){const e=so.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function ai(n){const e=O.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let r;return e[4]!==a||e[5]!==i||e[6]!==l?(r=t.jsx("img",{src:fn,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=r):r=e[7],r}export{ei as A,Yo as C,ti as N,Jo as O,ai as S,Zo as a,ni as b,Wo as c,js as d,at as e,Qo as f,ls as g,Rs as h,ii as p,oi as t,si as u};
|
|
1
|
+
import{c as O,H as oe,o as ke,K as Ae,b as L,j as t,C as Gt,av as Xt,B as te,r as R,bO as Qt,d as ot,w as Wt,n as H,a as ce,t as K,y as Yt,k as Ie,a5 as ht,M as pt,q as B,_ as xt,Z as jt,Y as Zt,a8 as Ce,a9 as ye,ab as Ne,L as Jt,G as en,ax as tn,ay as nn,R as sn,I as on,p as an,ac as ln}from"./index-Cm-tI8HA.js";import{m as ct,u as rn}from"./use-mcp-client-D97h0h5m.js";import{C as vt,g as cn,W as dn,S as bt,a as Ct,i as un,d as mn,f as fn}from"./constants-dLUUoWH7.js";import{D as gn}from"./use-destination-route-CnpOOvjT.js";import{d as dt,C as hn}from"./self-tool-result-BpbxkZvS.js";import{i as pn}from"./ChevronRight-DwyI683B.js";import{aH as xn,N as jn,A as yt,I as vn,s as Je}from"./agent-icon-Cx9KG3Y1.js";import{b as Nt,d as bn,e as wt}from"./thread-route-BBDxdOc-.js";import{t as _t}from"./ChevronDown-DfQ790RG.js";import{u as it,a as Cn}from"./use-virtual-mcp-DUaqayrx.js";import{g as yn}from"./github-repo-BpKUwJal.js";import{a as Re,b as St,P as Dt}from"./popover-iv9-bRVo.js";import{i as Ve}from"./Check-C-_rAuIj.js";import{s as we}from"./Plus-DiHsi401.js";import{i as kt}from"./SearchMd-921MfxAT.js";import{s as It}from"./XClose-D5jrJPPg.js";import{T as At}from"./toolbar-DUW3zCdJ.js";import{D as Tt,a as Pt,b as Ot,c as Nn,g as wn,e as _n,f as Sn}from"./drawer-BJTg8YjY.js";import{a as Dn,G as kn}from"./github-repo-picker-D2M_eq3D.js";import{g as In,a as An,b as zt}from"./hooks-Cc4ES1dM.js";import{u as Tn,g as Pn,c as On,d as zn,b as Mn}from"./use-navigate-to-agent-C9zcTGhr.js";import{g as $n,a as Mt}from"./agent-capabilities-BxGDQyCw.js";import{u as $t}from"./shell-layout-BIv7OFJR.js";import{d as Fn}from"./session-runtime-C-KTDVeQ.js";import{C as Ln}from"./collection-search-3KzkGzMw.js";import{g as En,a as Bn,b as Rn,e as Vn}from"./extract-connection-data-DUuPRZ_W.js";import{u as Ft,a as Lt,g as Kn,C as et}from"./connection-card-CKXxB-Po.js";import{D as Et,b as Bt,c as Rt,d as Vt,h as Hn,e as Un}from"./dialog-CeNX0yRN.js";import{d as W,a as Y,e as Z,b as J,c as ee,F as ut}from"./form-C1oJfi4e.js";import{I as re}from"./input-2eed-wFb.js";import{S as qn,a as Gn,b as Xn,c as Qn,d as De}from"./select-obKAMpm9.js";import{T as Wn}from"./textarea-BP2ohu2S.js";import{b as Kt}from"./use-connection-8bb6KUvW.js";import{n as Be,i as tt}from"./Tool02-BgANXxCG.js";import{e as Yn}from"./UserSquare-Bo3Fu208.js";import{c as Zn,i as Le,a as mt,E as Jn,p as es,b as ts,d as ns}from"./connection-form-helpers-DrDLIWBH.js";import{a as nt}from"./authenticate-and-persist-oauth-BPWOTdhI.js";import{g as ss}from"./connection-slug-CITJ0kGN.js";import{C as os}from"./collection-tabs-dylv9NKM.js";import{u as ft}from"./use-infinite-scroll-CntYeMaq.js";import{B as Ee}from"./badge-CdG7dC5P.js";import{u as is}from"./useSuspenseInfiniteQuery-BJGqO6a3.js";import{g as Ke}from"./metadata-dUsYcpuu.js";import{u as as}from"./use-ai-providers-DbmPHdHr.js";function ls(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const rs=2e4;function cs(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Qo(){const n=O.c(19),{org:e}=oe(),s=dn.COMMERCE_DISCOVERY(e.id);let o;n[0]!==e.id||n[1]!==e.slug?(o=ct({connectionId:bt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=o):o=n[2];const{data:a}=ke(o),i=ke({queryKey:Ae.commerceDiscoveryConnection(e.id,s),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const k=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return dt(k)}}),l=i.data?.item??null,{data:r}=ke({...ct({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!l}),c=Ae.commerceDiscoveryDiagnostic(e.id,s),u=!!r;let m;n[3]!==r?(m=async()=>{if(!r)throw new Error("cdClient not ready");const k=await r.callTool({name:vt,arguments:{}});return dt(k).diagnostic??null},n[3]=r,n[4]=m):m=n[4];let f;n[5]!==c||n[6]!==u||n[7]!==m?(f={queryKey:c,enabled:u,retry:1,refetchInterval:ds,queryFn:m},n[5]=c,n[6]=u,n[7]=m,n[8]=f):f=n[8];const d=ke(f),g=l?.metadata?.siteUrl,v=d.data??null,p=d.isSuccess,h=i.isPending||!!l&&d.isPending,j=typeof g=="string"&&g?g:null;let b;n[9]!==g?(b=cs(g),n[9]=g,n[10]=b):b=n[10];const C=r??null;let _;return n[11]!==s||n[12]!==d.isSuccess||n[13]!==C||n[14]!==v||n[15]!==h||n[16]!==j||n[17]!==b?(_={diagnostic:v,isSuccess:p,isLoading:h,siteUrl:j,host:b,connectionId:s,cdClient:C},n[11]=s,n[12]=d.isSuccess,n[13]=C,n[14]=v,n[15]=h,n[16]=j,n[17]=b,n[18]=_):_=n[18],_}function ds(n){return n.state.status!=="error"&&ls(n.state.data)==="generating"?rs:!1}function Wo(n,e){return{to:gn.agents,params:{org:n.slug,project:cn(n.id),panel:"app"},search:{connection:e,tool:vt}}}const us="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function ms(){const n=O.c(13),e=L();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:us,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let l;n[6]!==e?(l=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=l):l=n[7];let r;n[8]!==l?(r=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:l})]}),n[8]=l,n[9]=r):r=n[9];let c;return n[10]!==a||n[11]!==r?(c=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,r]}),n[10]=a,n[11]=r,n[12]=c):c=n[12],c}function fs(){const n=O.c(19),e=L();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:xn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Gt,label:a},n[6]=a,n[7]=i):i=n[7];let l;n[8]!==e?(l=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=l):l=n[9];let r;n[10]!==l?(r={Icon:jn,label:l},n[10]=l,n[11]=r):r=n[11];let c;n[12]!==o||n[13]!==i||n[14]!==r?(c=[o,i,r],n[12]=o,n[13]=i,n[14]=r,n[15]=c):c=n[15];const u=c;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(gs)})]}),n[17]=u,n[18]=f):f=n[18],f}function gs(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function Yo(n){const e=O.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,l=L(),r=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let c;e[0]!==a||e[1]!==l?(c=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":l("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Xt,{size:18})}),e[0]=a,e[1]=l,e[2]=c):c=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==r||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(pn,{size:16,className:"shrink-0 text-foreground/25"}),r&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:r,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=r,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let g;e[10]!==o?(g=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=g):g=e[11];let v;e[12]!==i||e[13]!==d||e[14]!==g?(v=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,g]}),e[12]=i,e[13]=d,e[14]=g,e[15]=v):v=e[15];let p,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),h=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=p,e[17]=h):(p=e[16],h=e[17]);let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[p,h,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(ms,{}),t.jsx("div",{className:"flex-1"}),t.jsx(fs,{})]})]}),e[18]=j):j=e[18];let b;return e[19]!==c||e[20]!==v?(b=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,v,j]}),e[19]=c,e[20]=v,e[21]=b):b=e[21],b}function Zo(n){const e=O.c(5),{ready:s,pending:o,label:a,onClick:i,children:l}=n,r=o||!s,c=s&&!o?l:null;let u;return e[0]!==a||e[1]!==i||e[2]!==r||e[3]!==c?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:r,children:[a,c]}),e[0]=a,e[1]=i,e[2]=r,e[3]=c,e[4]=u):u=e[4],u}function Ht(){const n=R.useContext(Qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function hs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function at(n){const e=O.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",l=a==="xs"?"text-[9px]":"text-xs";let r;e[0]!==i?(r=H(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=r):r=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:hs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:H("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let m;return e[9]!==r||e[10]!==c||e[11]!==u?(m=t.jsx("div",{className:r,style:c,children:u}),e[9]=r,e[10]=c,e[11]=u,e[12]=m):m=e[12],m}function ps({invitation:n,onChanged:e}){const s=L(),[o,a]=R.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),l=async()=>{a(!0);try{const u=await ce.organization.acceptInvitation({invitationId:n.id});if(u.error){K.error(u.error.message),a(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}K.success(s("header.orgSwitcher.joined",{name:i})),Yt();let c;try{c=(await ce.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},r=async()=>{a(!0);try{const c=await ce.organization.rejectInvitation({invitationId:n.id});if(c.error){K.error(c.error.message),a(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{K.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(at,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:l,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:r,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(It,{size:14})})]})]})}function xs(n){const e=O.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=L(),{data:l}=Wt(),{invitations:r,refetch:c}=Ht();let u;e[0]!==s?(u=(I,A)=>I.slug===s?-1:A.slug===s?1:I.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...l??[]].sort(u),[f,d]=R.useState(""),g=f.toLowerCase(),v=g?m.filter(I=>I.name.toLowerCase().includes(g)||I.slug.toLowerCase().includes(g)):m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(kt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=p):p=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=I=>d(I.target.value),e[3]=h):h=e[3];let j;e[4]!==f?(j=I=>I.key==="Escape"&&f&&d(""),e[4]=f,e[5]=j):j=e[5];let b;e[6]!==i?(b=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=b):b=e[7];let C;e[8]!==f||e[9]!==j||e[10]!==b?(C=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:h,onKeyDown:j,placeholder:b,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=j,e[10]=b,e[11]=C):C=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(we,{size:16}),e[12]=_):_=e[12];let k;e[13]!==a?(k=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:_}),e[13]=a,e[14]=k):k=e[14];let D;e[15]!==C||e[16]!==k?(D=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[p,C,k]}),e[15]=C,e[16]=k,e[17]=D):D=e[17];const z="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let x;e[18]!==r||e[19]!==f||e[20]!==c?(x=!f&&r.map(I=>t.jsx(ps,{invitation:I,onChanged:c},I.id)),e[18]=r,e[19]=f,e[20]=c,e[21]=x):x=e[21];const S=v.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let P;e[22]!==o||e[23]!==s?(P=I=>t.jsxs("button",{type:"button",onClick:()=>o(I.slug),className:H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",I.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(at,{org:I,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.slug})]}),I.slug===s&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},I.id),e[22]=o,e[23]=s,e[24]=P):P=e[24];const N=v.map(P);let y;e[25]!==x||e[26]!==S||e[27]!==N?(y=t.jsxs("div",{className:z,children:[x,S,N]}),e[25]=x,e[26]=S,e[27]=N,e[28]=y):y=e[28];let T;return e[29]!==y||e[30]!==D?(T=t.jsxs(t.Fragment,{children:[D,y]}),e[29]=y,e[30]=D,e[31]=T):T=e[31],T}function js(n){const e=O.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,l=a===void 0?"start":a,r=i===void 0?"bottom":i,c=ot(),[u,m]=R.useState(!1),[f,d]=R.useState(!1);let g;e[0]!==s?(g=t.jsx(Re,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const v=String(u);let p;e[2]!==c?(p=D=>{m(!1),c({to:"/$org",params:{org:D}})},e[2]=c,e[3]=p):p=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m(!1),d(!0)},e[4]=h):h=e[4];let j;e[5]!==o||e[6]!==v||e[7]!==p?(j=t.jsx(xs,{orgParam:o,onSelectOrg:p,onCreateOrg:h},v),e[5]=o,e[6]=v,e[7]=p,e[8]=j):j=e[8];let b;e[9]!==l||e[10]!==r||e[11]!==j?(b=t.jsx(St,{side:r,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:bs,onCloseAutoFocus:vs,children:j}),e[9]=l,e[10]=r,e[11]=j,e[12]=b):b=e[12];let C;e[13]!==u||e[14]!==g||e[15]!==b?(C=t.jsxs(Dt,{open:u,onOpenChange:m,children:[g,b]}),e[13]=u,e[14]=g,e[15]=b,e[16]=C):C=e[16];let _;e[17]!==f?(_=t.jsx(hn,{open:f,onOpenChange:d}),e[17]=f,e[18]=_):_=e[18];let k;return e[19]!==_||e[20]!==C?(k=t.jsxs(t.Fragment,{children:[C,_]}),e[19]=_,e[20]=C,e[21]=k):k=e[21],k}function vs(n){return n.preventDefault()}function bs(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Cs(n){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:r,disabled:c}=n,u=a===void 0?"Search...":a;let m;e[0]!==l?(m=H("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=m):m=e[1];const f=c?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=H("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let g;e[4]!==r?(g=r?t.jsx(Ie,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(kt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=r,e[5]=g):g=e[5];let v;e[6]!==o?(v=b=>o(b.target.value),e[6]=o,e[7]=v):v=e[7];let p;e[8]!==c||e[9]!==i||e[10]!==u||e[11]!==v||e[12]!==s?(p=t.jsx("input",{type:"text",value:s,onChange:v,onKeyDown:i,placeholder:u,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=u,e[11]=v,e[12]=s,e[13]=p):p=e[13];let h;e[14]!==d||e[15]!==g||e[16]!==p?(h=t.jsxs("label",{className:d,children:[g,p]}),e[14]=d,e[15]=g,e[16]=p,e[17]=h):h=e[17];let j;return e[18]!==m||e[19]!==h?(j=t.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=j):j=e[20],j}function ys(n,e,s){if(!s)return null;const o=In(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function Ns(n){const e=O.c(6),{value:s,onChange:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(Cs,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function ws(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function _s(n){const e=O.c(10),{org:s,onClose:o}=n,a=L();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let r;e[4]!==a?(r=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==r?(c=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Jt,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:r})}),e[6]=i,e[7]=l,e[8]=r,e[9]=c):c=e[9],c}function Ss(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ut,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ds(n){const e=O.c(11),{onImportFromGithub:s}=n,o=L();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(kn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==o?(r=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=r):r=e[7];let c;return e[8]!==l||e[9]!==r?(c=t.jsx(Ut,{action:l,children:r}),e[8]=l,e[9]=r,e[10]=c):c=e[10],c}function ks(n){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=n,a=L();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H(o),e[2]=o,e[3]=l):l=e[3];let r;e[4]!==s?(r=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=r):r=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{className:"size-4"}),e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==l||e[9]!==r?(u=t.jsx(At,{"aria-label":i,className:l,onClick:r,children:c}),e[7]=i,e[8]=l,e[9]=r,e[10]=u):u=e[10],u}function Is(n){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==a?(r=H(a),e[3]=a,e[4]=r):r=e[4];let c;e[5]!==s?(c=()=>{B("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==l||e[13]!==r||e[14]!==c||e[15]!==f?(d=t.jsx(xt,{children:t.jsxs(jt,{tooltip:l,className:r,onClick:c,children:[u,f]})}),e[12]=l,e[13]=r,e[14]=c,e[15]=f,e[16]=d):d=e[16],d}function As(){const n=O.c(4),e=L();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Ot,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ts(n){const e=O.c(8),{emptyCtaClass:s}=n,o=L();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=H(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[4]=l):l=e[4];let r;return e[5]!==a||e[6]!==i?(r=t.jsx(At,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=r):r=e[7],r}function Ps(n){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=L();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==a?(r=H(a),e[3]=a,e[4]=r):r=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{}),e[5]=c):c=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==l||e[11]!==r||e[12]!==m?(f=t.jsx(Re,{asChild:!0,children:t.jsxs(jt,{tooltip:l,className:r,children:[c,m]})}),e[10]=l,e[11]=r,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let g;return e[17]!==d?(g=t.jsx(xt,{children:d}),e[17]=d,e[18]=g):g=e[18],g}function Os(n){const e=O.c(9),{children:s}=n,o=L();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let r;return e[6]!==a||e[7]!==l?(r=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=r):r=e[8],r}function zs(n){const e=ot(),{create:s}=An(),{locator:o}=oe(),a=Nt(),i=bn();return async l=>{const r=crypto.randomUUID(),c=l===i?ys(n,o,a??""):null;try{await s({id:r,virtual_mcp_id:l,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:r},search:{virtualmcpid:l}})}}function st(n){const e=O.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let r;e[2]!==s.icon||e[3]!==s.title?(r=t.jsx(yt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=r):r=e[4];let c;e[5]!==s.title?(c=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==c||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[9]=c,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ve,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==l||e[16]!==r||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:l,children:[r,m,f]}),e[14]=a,e[15]=l,e[16]=r,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function Ut(n){const e=O.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function Ms(n){const e=O.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,r]=R.useState(""),c=it(),u=c??[],{org:m}=oe(),{data:f}=ce.useSession(),d=f?.user?.id??"anon",g=Pn(c),v=On(),p=zs(m.slug),h=$n(c),j=l.toLowerCase(),b=u.filter(Es).filter(F=>!h.has(F.id)).filter(Ls).filter(F=>!l||F.title.toLowerCase().includes(j)),C=b.filter(Fs),_=b.filter($s),k=Ct(m.id),D=!l||k.title.toLowerCase().includes(j),z=!!(o&&D);let x;e[0]!==s||e[1]!==o?(x=()=>{o?.(null),s(),r("")},e[0]=s,e[1]=o,e[2]=x):x=e[2];const S=x,P=F=>{if(o){o(F.id),s(),r("");return}zn({orgId:m.id,userId:d},F.id,g),v(),s(),r(""),p(F.id)},N="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==l?(y=t.jsx(Ns,{value:l,onChange:r}),e[3]=l,e[4]=y):y=e[4];const T="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",I=o&&D&&k&&t.jsx(st,{agent:k,selected:!a||a===k.id,onClick:S}),A=(C.length>0||!l)&&t.jsx(Ds,{onImportFromGithub:i}),M=C.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>P(F)},F.id)),V=_.length>0&&t.jsx(Ss,{}),X=_.map(F=>t.jsx(st,{agent:F,selected:o?a===F.id:void 0,onClick:()=>P(F)},F.id));let E;e[5]!==z||e[6]!==l||e[7]!==b.length?(E=b.length===0&&!z&&l&&t.jsx(ws,{}),e[5]=z,e[6]=l,e[7]=b.length,e[8]=E):E=e[8];let ne;e[9]!==E||e[10]!==I||e[11]!==A||e[12]!==M||e[13]!==V||e[14]!==X?(ne=t.jsxs("div",{className:T,children:[I,A,M,V,X,E]}),e[9]=E,e[10]=I,e[11]=A,e[12]=M,e[13]=V,e[14]=X,e[15]=ne):ne=e[15];let q;e[16]!==s||e[17]!==m?(q=t.jsx(_s,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=q):q=e[18];let de;return e[19]!==ne||e[20]!==q||e[21]!==y?(de=t.jsxs("div",{className:N,children:[y,ne,q]}),e[19]=ne,e[20]=q,e[21]=y,e[22]=de):de=e[22],de}function $s(n){return!Mt(n.metadata)}function Fs(n){return Mt(n.metadata)}function Ls(n){return!mn(n.id)}function Es(n){return!un(n.id)}function Bs(n){const e=O.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:l,side:r,align:c}=s,u=o===void 0?!1:o,m=r===void 0?"right":r,f=c===void 0?"start":c,[d,g]=R.useState(!1),[v,p]=R.useState(!1),h=ht(),{setOpenMobile:j}=pt(),b=Tn(),C=b?"border border-border":void 0;let _;e[2]!==b?(_=A=>b?t.jsx(Os,{children:A}):A,e[2]=b,e[3]=_):_=e[3];const k=_;let D;e[4]!==h||e[5]!==j?(D=()=>{g(!1),h&&j(!1)},e[4]=h,e[5]=j,e[6]=D):D=e[6];const z=D;let x;e[7]!==z?(x=()=>{z(),p(!0)},e[7]=z,e[8]=x):x=e[8];const S=x;let P;e[9]!==z||e[10]!==S||e[11]!==i||e[12]!==d||e[13]!==l?(P=d&&t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Zt,{className:"h-4 w-24"})}),children:t.jsx(Ms,{onClose:z,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:S})}),e[9]=z,e[10]=S,e[11]=i,e[12]=d,e[13]=l,e[14]=P):P=e[14];const N=P;let y;e[15]!==f||e[16]!==u||e[17]!==C||e[18]!==b||e[19]!==h||e[20]!==d||e[21]!==N||e[22]!==m||e[23]!==a||e[24]!==k?(y=h?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:a}):u?k(t.jsx(ks,{setOpen:g,emptyCtaClass:C})):t.jsx(Is,{setOpen:g,highlightEmpty:b,emptyCtaClass:C}),t.jsx(Tt,{open:d,onOpenChange:g,direction:"bottom",children:t.jsxs(Pt,{className:"max-h-[85dvh] p-0",children:[t.jsx(As,{}),N]})})]}):t.jsxs(Dt,{open:d,onOpenChange:A=>{A&&!d&&B("agent_browser_opened",{surface:"desktop_popover"}),g(A)},children:[a?t.jsx(Re,{asChild:!0,children:a}):u?k(t.jsx(Re,{asChild:!0,children:t.jsx(Ts,{emptyCtaClass:C})})):t.jsx(Ps,{wrapEmptyHint:k,highlightEmpty:b,emptyCtaClass:C}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:N})]}),e[15]=f,e[16]=u,e[17]=C,e[18]=b,e[19]=h,e[20]=d,e[21]=N,e[22]=m,e[23]=a,e[24]=k,e[25]=y):y=e[25];let T;e[26]!==v?(T=t.jsx(Dn,{open:v,onOpenChange:p,mode:"agent"}),e[26]=v,e[27]=T):T=e[27];let I;return e[28]!==T||e[29]!==y?(I=t.jsxs(t.Fragment,{children:[y,T]}),e[28]=T,e[29]=y,e[30]=I):I=e[30],I}function Rs(){const n=O.c(2),e=it()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?Fn(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Vs="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ks(n){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=L(),r=Cn(s)??o??null;let c,u,m,f,d;e[0]!==r?.title||e[1]!==a||e[2]!==l?(d=r?.title??l("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",c="button",u=a,m=l("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=r?.title,e[1]=a,e[2]=l,e[3]=c,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(c=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const g=r?.icon??null;let v;e[8]!==g||e[9]!==d?(v=t.jsx(yt,{icon:g,name:d,size:"xs"}),e[8]=g,e[9]=d,e[10]=v):v=e[10];let p;e[11]!==c||e[12]!==u||e[13]!==m||e[14]!==v?(p=t.jsx("button",{type:c,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:v}),e[11]=c,e[12]=u,e[13]=m,e[14]=v,e[15]=p):p=e[15];let h;e[16]!==d?(h=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=h):h=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let b;e[19]!==h?(b=t.jsxs("button",{type:"button",className:Vs,children:[h,j]}),e[19]=h,e[20]=b):b=e[20];let C;e[21]!==s||e[22]!==i||e[23]!==b?(C=t.jsx(Bs,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:b}),e[21]=s,e[22]=i,e[23]=b,e[24]=C):C=e[24];let _;return e[25]!==C||e[26]!==f||e[27]!==p?(_=t.jsxs("div",{className:f,children:[p,C]}),e[25]=C,e[26]=f,e[27]=p,e[28]=_):_=e[28],_}function Jo(n){const e=O.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=L(),{org:i}=oe(),{state:l,isMobile:r}=pt(),c=Ht().invitations.length>0,u=l==="collapsed"||r;let m;e[2]!==c||e[3]!==i.name||e[4]!==a?(m=c?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=c,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(at,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==c||e[9]!==u?(d=c&&t.jsx("span",{className:H("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=c,e[9]=u,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==d?(g=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=g):g=e[13];let v;e[14]!==i.name||e[15]!==o?(v=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=v):v=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=p):p=e[17];let h;e[18]!==m||e[19]!==g||e[20]!==v?(h=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,v,p]})}),e[18]=m,e[19]=g,e[20]=v,e[21]=h):h=e[21];let j;e[22]!==i.slug||e[23]!==h?(j=t.jsx(js,{orgParam:i.slug,trigger:h}),e[22]=i.slug,e[23]=h,e[24]=j):j=e[24];let b;e[25]!==i.name?(b=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=b):b=e[26];let C;return e[27]!==b||e[28]!==j?(C=t.jsxs(Ne,{children:[j,b]}),e[27]=b,e[28]=j,e[29]=C):C=e[29],C}function ei(n){const e=O.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=oe(),{threads:i}=zt(),l=it(),{data:r}=ce.useSession(),{setTaskId:c,createNewTask:u}=$t(),m=Rs();let f;e[2]!==a.id?(f=Ct(a.id),e[2]=a.id,e[3]=f):f=e[3];const d=f,g=d.id,v=wt();let p;e[4]!==l||e[5]!==u||e[6]!==g||e[7]!==o||e[8]!==m||e[9]!==r?.user?.id||e[10]!==c||e[11]!==i?(p=k=>{const D=k??g,z=(l??[]).find(S=>S.id===D),x=Mn(i,D,r?.user?.id,m(D),!!(z&&yn(z)));x?c(x.id,D):u(D),o?.()},e[4]=l,e[5]=u,e[6]=g,e[7]=o,e[8]=m,e[9]=r?.user?.id,e[10]=c,e[11]=i,e[12]=p):p=e[12];const h=p;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=j):j=e[13];const b=v===g?d:void 0;let C;e[14]!==v||e[15]!==h?(C=()=>h(v),e[14]=v,e[15]=h,e[16]=C):C=e[16];let _;return e[17]!==v||e[18]!==h||e[19]!==b||e[20]!==C?(_=t.jsx(R.Suspense,{fallback:j,children:t.jsx(Ks,{agentId:v,fallback:b,onOpenHome:C,onPick:h})}),e[17]=v,e[18]=h,e[19]=b,e[20]=C,e[21]=_):_=e[21],_}function ti(){const n=O.c(20),e=L(),{threads:s}=zt(),{createNewTask:o}=$t(),a=wt(),i=Nt();let l;n[0]!==i||n[1]!==s?(l=s.find(h=>h.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const r=l;let c;n[3]!==a||n[4]!==o||n[5]!==r?(c=()=>{o(a,r)},n[3]=a,n[4]=o,n[5]=r,n[6]=c):c=n[6];const u=c;let m;n[7]!==e?(m=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=m):m=n[8];let f;n[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(vn,{size:16}),n[9]=f):f=n[9];let d;n[10]!==u||n[11]!==m?(d=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:u,"aria-label":m,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),n[10]=u,n[11]=m,n[12]=d):d=n[12];let g;n[13]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=g):g=n[14];let v;n[15]!==g?(v=t.jsx(ye,{side:"bottom",children:g}),n[15]=g,n[16]=v):v=n[16];let p;return n[17]!==d||n[18]!==v?(p=t.jsxs(Ne,{children:[d,v]}),n[17]=d,n[18]=v,n[19]=p):p=n[19],p}function Hs({open:n,onOpenChange:e,onCreated:s}){const o=L(),{org:a}=oe(),{data:i}=ce.useSession(),{stdioEnabled:l}=en(),r=ht(),c=Kt(),u=Ft(),f=Lt(u,"").items,d=tn({resolver:nn(Zn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),v=d.watch("connection_url"),p=d.watch("npx_package"),h=Le({uiType:g,connectionUrl:v??"",npxPackage:p??""})??mt({uiType:g,connectionUrl:v??"",registryItems:f}),j=x=>{const S=x.trim();if(!S)return;const P=!!d.formState.dirtyFields.title,N=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,T=A=>{if(A&&(!P&&!d.getValues("title").trim()&&A.title&&d.setValue("title",A.title,{shouldDirty:!1}),!N&&!(d.getValues("description")??"").trim()&&A.description&&d.setValue("description",A.description,{shouldDirty:!1}),!y&&A.envVarKeys?.length)){const M=d.getValues("env_vars")??[],V=new Set(M.map(E=>E.key)),X=A.envVarKeys.filter(E=>!V.has(E));X.length>0&&d.setValue("env_vars",[...M,...X.map(E=>({key:E,value:""}))],{shouldDirty:!0})}},I=es(S);if(I&&l){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",I.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),T(Le({uiType:"NPX",npxPackage:I.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const A=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",A,{shouldDirty:!0}),d.setValue("connection_url",S,{shouldDirty:!0}),T(Le({uiType:A,connectionUrl:S})??mt({uiType:A,connectionUrl:S,registryItems:f}));return}g==="NPX"&&T(Le({uiType:"NPX",npxPackage:S}))},b=x=>{x||d.reset(),e(x)},C=async x=>{let S,P=null,N=null,y=null;x.ui_type==="NPX"?(S="STDIO",P="",y=ts(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(S="STDIO",P="",y=ns(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(S=x.ui_type,P=x.connection_url||"",N=x.connection_token||null);const T=En("conn");try{await c.create.mutateAsync({id:T,title:x.title,description:x.description||null,connection_type:S,connection_url:P,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(T)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},_=o("connections.createConnectionDialog.title"),k=o("connections.createConnectionDialog.description"),D=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),z=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(W,{control:d.control,name:"ui_type",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(qn,{value:x.value,onValueChange:x.onChange,children:[t.jsx(J,{children:t.jsx(Gn,{children:t.jsx(Xn,{})})}),t.jsxs(Qn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Je,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Yn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(W,{control:d.control,name:"npx_package",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...x,value:x.value??"",onPaste:S=>{const P=S.clipboardData.getData("text");P&&(S.preventDefault(),d.setValue("npx_package",P.trim(),{shouldDirty:!0}),j(P))},onBlur:S=>{j(S.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(W,{control:d.control,name:"stdio_command",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"stdio_args",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...x,value:x.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(W,{control:d.control,name:"env_vars",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(J,{children:t.jsx(Jn,{value:x.value??[],onChange:x.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(W,{control:d.control,name:"connection_url",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...x,value:x.value??"",onPaste:S=>{const P=S.clipboardData.getData("text");P&&(S.preventDefault(),d.setValue("connection_url",P.trim(),{shouldDirty:!0}),j(P))},onBlur:S=>{j(S.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"connection_token",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:h?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(J,{children:t.jsx(re,{type:"password",placeholder:h?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...x,value:x.value??""})}),h?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"title",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(J,{children:t.jsx(re,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...x})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"description",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(Z,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(J,{children:t.jsx(Wn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...x,value:x.value??""})}),t.jsx(ee,{})]})})]});return r?t.jsx(Tt,{open:n,onOpenChange:b,children:t.jsxs(Pt,{className:"max-h-[90vh]",children:[t.jsx(Nn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ot,{children:_}),t.jsx(wn,{className:"mt-1",children:k})]}),t.jsx(_n,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(It,{size:16})})})]})}),t.jsx(ut,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:z}),t.jsx(Sn,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:D})})]})})]})}):t.jsx(Et,{open:n,onOpenChange:b,children:t.jsxs(Bt,{className:"sm:max-w-[525px]",children:[t.jsxs(Rt,{children:[t.jsx(Vt,{children:_}),t.jsx(Hn,{children:k})]}),t.jsx(ut,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(C),children:[t.jsx("div",{className:"py-4",children:z}),t.jsxs(Un,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>b(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:D})]})]})})]})})}function Us(n){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:r,connectingItemId:c,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,g=s===void 0?"add":s,v=d===void 0?"connected":d,p=L(),{org:h}=oe(),j=R.useDeferredValue(u),b=u!==j;let C;e[0]!==j?(C=j.trim().toLowerCase(),e[0]=j,e[1]=C):C=e[1];const _=C;let k;e[2]!==v?(k=w=>w??v,e[2]=v,e[3]=k):k=e[3];const[D,z]=sn(on.connectionsTab(h.slug)+(v==="all"?":home-modal":":agent-modal"),k);let x;e[4]!==D||e[5]!==z?(x=w=>{w!==D&&B("connections_dialog_tab_changed",{to_tab:w}),z(w)},e[4]=D,e[5]=z,e[6]=x):x=e[6];const S=x;let P;e[7]!==h.id||e[8]!==h.slug?(P={connectionId:bt,orgId:h.id,orgSlug:h.slug},e[7]=h.id,e[8]=h.slug,e[9]=P):P=e[9];const N=rn(P),y=j?.trim().split(/\s+/).filter(Boolean)??[],T=y.length>0?{operator:"or",conditions:y.flatMap(Js)}:void 0,I={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(I),{data:M,fetchNextPage:V,hasNextPage:X,isFetchingNextPage:E}=is({queryKey:Ae.collectionListInfinite(N,h.id,"","CONNECTIONS",A),queryFn:async w=>{const{pageParam:$}=w,se=$===void 0?0:$;return(await N.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Ys,staleTime:3e4}),ne=M?.pages.flatMap(Ws)??[],q=Kn(ne),de=new Set(ne.filter(Qs).map(Xs)),F=Ft(),ie=Lt(F,j),He=ft(ie.loadMore,ie.hasMore,ie.isLoadingMore),Ue=ft(V,X??!1,E),G=D==="all"||!!_,lt=G?ie.items.filter(w=>{const $=Bn(w);if($&&de.has($))return!1;if(!_)return!0;const se=Ke(w._meta),ae=[w.title,w.description,w.name,w.server?.title,w.server?.description,w.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(Q=>ae.includes(Q.toLowerCase()))}):[],_e=lt.filter(Gs),Se=lt.filter(qs);let Te;e[10]!==a?(Te=w=>w.some($=>a.has($.id)),e[10]=a,e[11]=Te):Te=e[11];const qe=Te;let Pe;e[12]!==a||e[13]!==o||e[14]!==c||e[15]!==qe||e[16]!==g||e[17]!==i||e[18]!==f||e[19]!==l||e[20]!==p?(Pe=(w,$,se,ae,Q)=>{const Fe=qe(Q),be=Q.find(le=>!a.has(le.id)),U=Q[0];if(g==="browse"){const le=ss(U);return t.jsx(et,{connection:{title:$,icon:se,description:Q.length>1?`${Q.length} instances`:ae??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",p("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{B("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:Q.length}),f?.(le)}},w)}return t.jsx(et,{connection:{title:$,icon:se,description:ae},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Fe&&t.jsxs(Ee,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ve,{size:11})," ",p("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),be?(B("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&B("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(B("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),l(U))},children:p("virtualMcp.connectionDialogContent.add")})]})},w)},e[12]=a,e[13]=o,e[14]=c,e[15]=qe,e[16]=g,e[17]=i,e[18]=f,e[19]=l,e[20]=p,e[21]=Pe):Pe=e[21];const Oe=Pe;let ze;e[22]!==c||e[23]!==g||e[24]!==r||e[25]!==p?(ze=w=>{const $=Ke(w._meta),se=$?.friendlyName||$?.friendly_name||w.server?.title||w.title||w.server?.name||w.name||w.id||"",ae=w.server?.description||w.description||null,Q=w.server?.icons?.[0]?.src||Rn(w.server?.repository)||null,Fe=$?.official===!0,be=$?.verified===!0,U=$?.owner==="deco";return t.jsx(et,{connection:{title:se,description:ae,icon:Q},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:p("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Fe&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Fe&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Ee,{variant:"outline",size:"icon",children:t.jsx(tt,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),B("connection_add_clicked",{action:"connect_new",registry_item_id:w.id,app_name:$?.friendlyName||w.server?.name||w.name||null}),r(w)},children:c===w.id?t.jsx(Ie,{size:14,className:"animate-spin"}):p(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${w.id}`)},e[22]=c,e[23]=g,e[24]=r,e[25]=p,e[26]=ze):ze=e[26];const rt=ze;let ue;e[27]!==D||e[28]!==S||e[29]!==m||e[30]!==_||e[31]!==p?(ue=!_&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(os,{tabs:[{id:"all",label:p("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:p("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:D,onTabChange:w=>S(w)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{B("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),p("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=D,e[28]=S,e[29]=m,e[30]=_,e[31]=p,e[32]=ue):ue=e[32];const Ge=b&&"opacity-50 pointer-events-none";let me;e[33]!==Ge?(me=H("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[33]=Ge,e[34]=me):me=e[34];const qt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Me;e[35]!==Oe?(Me=w=>{if(w.type==="group")return Oe(w.key,w.title,w.icon,null,w.connections);const $=w.connection;return Oe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Oe,e[36]=Me):Me=e[36];const Xe=q.map(Me);let fe;e[37]!==Ue?(fe=t.jsx("div",{ref:Ue,className:"col-span-full h-1"}),e[37]=Ue,e[38]=fe):fe=e[38];let ge;e[39]!==E?(ge=E&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=E,e[40]=ge):ge=e[40];const Qe=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(tt,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=G&&_e.map(rt),Ye=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ze=G&&Se.map(rt);let he;e[41]!==He||e[42]!==F||e[43]!==G?(he=G&&F.length>0&&t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[41]=He,e[42]=F,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==Xe||e[49]!==fe||e[50]!==ge||e[51]!==Qe||e[52]!==We||e[53]!==Ye||e[54]!==Ze||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:qt,children:[Xe,fe,ge,Qe,We,Ye,Ze,he,pe]}),e[48]=Xe,e[49]=fe,e[50]=ge,e[51]=Qe,e[52]=We,e[53]=Ye,e[54]=Ze,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==D||e[59]!==q.length||e[60]!==Se||e[61]!==u||e[62]!==p||e[63]!==_e?(je=q.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?p("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):p(D==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=D,e[59]=q.length,e[60]=Se,e[61]=u,e[62]=p,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let $e;return e[69]!==ue||e[70]!==ve?($e=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=$e):$e=e[71],$e}function qs(n){return!n.verified&&!Ke(n._meta)?.verified&&!n.meta?.verified}function Gs(n){return n.verified||Ke(n._meta)?.verified||n.meta?.verified}function Xs(n){return n.app_name}function Qs(n){return n.app_name}function Ws(n){return n?.items??[]}function Ys(n,e){if(n?.hasMore)return e.reduce(Zs,0)}function Zs(n,e){return n+(e?.items?.length??0)}function Js(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function ni({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=L(),l=a.mode??"add",r="agentId"in a?a.agentId:void 0,c="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:N=>{},m=(N,y,T)=>{r&&B("agent_connection_attached",{agent_id:r,connection_id:N,app_name:y,mode:T})},[f,d]=R.useState(null),[g,v]=R.useState(o),[p,h]=R.useState(!1),{org:j}=oe(),{data:b}=ce.useSession(),C=Kt(),_=an(),k=ot(),D=N=>{e(!1),k({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:N}})},z=()=>{_.invalidateQueries({predicate:N=>{const y=N.queryKey;return y[1]===j.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},x=async(N,y)=>{B("connection_oauth_succeeded",{connection_id:N,flow:y});const T=new URL(`/api/${j.slug}/mcp/${N}`,window.location.origin);await _.invalidateQueries({queryKey:Ae.isMCPAuthenticated(T.href,null)}),z()},S=async N=>{d(N.app_name??N.id);try{const T=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await C.create.mutateAsync({title:T,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,M=await nt({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:V=>C.update.mutateAsync({id:A,data:{connection_token:V}}).then(()=>{})});if(M.ran&&!M.ok){B("connection_oauth_failed",{connection_id:A,flow:"clone",error:M.error??"no_token"}),K.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:M.error??"no token received"})),await C.delete.mutateAsync(A);return}M.ran&&await x(A,"clone"),m(A,N.app_name??null,"clone"),u(A)}catch(y){console.error("Failed to add connection:",y),K.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async N=>{if(!(!j||!b?.user?.id)){d(N.id);try{const y=Vn(N,j.id,b.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,A=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!A){K.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:M}=await C.create.mutateAsync(y),V=await nt({connectionId:M,orgId:j.id,orgSlug:j.slug,persistFallback:X=>C.update.mutateAsync({id:M,data:{connection_token:X}}).then(()=>{})});if(V.ran&&!V.ok){B("connection_oauth_failed",{connection_id:M,flow:"connect_new",error:V.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:V.error??"no token received"})}),m(M,y.app_name??null,"new"),u(M);return}V.ran?(await x(M,"connect_new"),K.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(i("virtualMcp.addConnectionDialog.connected")),m(M,y.app_name??null,"new"),u(M)}catch(y){console.error("Failed to connect:",y),K.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(Et,{open:n,onOpenChange:e,children:[t.jsxs(Bt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Rt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Vt,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Ln,{value:g,onChange:v,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(R.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ie,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Us,{mode:l,agentId:r,addedConnectionIds:c,onAdd:u,onCloneAndAdd:S,onConnectAndAdd:P,connectingItemId:f,search:g,onCreateConnection:()=>h(!0),onBrowseNavigate:D,defaultTab:s})})]}),t.jsx(Hs,{open:p,onOpenChange:h,onCreated:async N=>{h(!1);const y=await nt({connectionId:N,orgId:j.id,orgSlug:j.slug,persistFallback:T=>C.update.mutateAsync({id:N,data:{connection_token:T}}).then(()=>{})});if(y.ran&&!y.ok){B("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:y.error??"no_token"}),K.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(N,null,"custom"),u(N),e(!1);return}y.ran&&await x(N,"custom_create"),m(N,null,"custom"),u(N),e(!1)}})]})}const gt=new Map;function si(){const{org:n}=oe(),e=ln(),s=as(),o=s.find(h=>h.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:r}=ke({queryKey:Ae.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=a?.balanceCents??null,u=c!=null?c/100:null,m=R.useRef(new Map);if(c!=null){const h=gt.get(n.id);m.current.get(n.id)&&h!=null&&c>h&&B("credits_topped_up_detected",{organization_id:n.id,delta_cents:c-h,previous_balance_cents:h,new_balance_cents:c}),gt.set(n.id,c),m.current.set(n.id,!0)}const f=!!o,d=c!=null&&c>0,g=c!=null&&c===0,v=c!=null&&c===200,p=s.length>0&&s.every(h=>h.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:u,hasCredits:d,isZeroBalance:g,isInitialFreeCredit:v,hasOnlyDecoProvider:p,isLoading:i,isFetching:r,refetch:l}}const eo=4,to="TASK";function no(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,eo)||to}function oi(n,e,s){const o=s?.trim();return o||(e==null?null:`${no(n)}-${String(e).padStart(2,"0")}`)}const so=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function ii(n){const e=so.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function ai(n){const e=O.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=H("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let r;return e[4]!==a||e[5]!==i||e[6]!==l?(r=t.jsx("img",{src:fn,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=r):r=e[7],r}export{ei as A,Yo as C,ti as N,Jo as O,ai as S,Zo as a,ni as b,Wo as c,js as d,at as e,Qo as f,ls as g,Rs as h,ii as p,oi as t,si as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,bs as C,bw as y,bv as T,by as I,cG as M,cF as H,bu as z,c as A,n as g}from"./index-
|
|
1
|
+
import{r as c,j as i,bs as C,bw as y,bv as T,by as I,cG as M,cF as H,bu as z,c as A,n as g}from"./index-Cm-tI8HA.js";var m="Switch",[U]=z(m),[q,F]=U(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=F(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function G(a){const e=A.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{G as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as te,j as s,dy as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-CyVZ5lgJ.js";import{s as ge}from"./Plus-DuwKEMqs.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-B0BRtAnp.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-CefQc73v.js";import{I as Ie}from"./input-DJ33AwMQ.js";import{G as xe,a as $e}from"./github-repo-picker-C-0rHR-M.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-DABsYoTf.js";import{t as He}from"./cards-B_0ClWxN.js";import{R as Be}from"./require-capability-BwNGmU08.js";import"./collection-search-DpMT1vYf.js";import"./SearchMd-BNMN35l9.js";import"./use-debounced-value-BX1Z2C1S.js";import"./use-connection-CklhgwT-.js";import"./use-mcp-client-BiMbFhZA.js";import"./constants-dLUUoWH7.js";import"./auth-Di--WQHJ.js";import"./authenticate-and-persist-oauth-CjESgZgI.js";import"./mcp-oauth-1onT9Dwz.js";import"./ArrowLeft-sTRXJKw4.js";import"./LinkExternal01-DgCDtWFz.js";import"./LockUnlocked01-DPANpO_w.js";import"./use-mcp-tools-D1SQ9VQp.js";import"./extract-connection-data-DXnTgJE5.js";import"./metadata-dUsYcpuu.js";import"./connection-BOKd-Vhl.js";import"./use-navigate-to-agent-DMGreR6U.js";import"./use-destination-route-C4i1vP71.js";import"./use-virtual-mcp-CYMnefxf.js";import"./hooks-DHadwCKp.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BGdXs4q_.js";import"./task-board-BR_pi0j4.js";import"./schema-CTX-wtUj.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./folder-icon-DD3eiqXL.js";import"./Eye-CFsMHhc3.js";import"./DotsVertical-Cn-HQJLl.js";import"./Download01-DKxxD2lG.js";import"./Share07-DgnKCkn5.js";import"./Globe01-wsmSifpz.js";import"./Key01-BGSob3xF.js";import"./Palette-_BVhH0qL.js";import"./Trash01-BQ7TqJow.js";import"./Zap-C81otJUu.js";import"./dropdown-menu-Dmm7Trn3.js";import"./Check-BSrzKRPt.js";import"./ChevronRight-HiBK7iT4.js";import"./file-type-icon-BFYTEN10.js";import"./access-gate-b5TlHoe3.js";import"./capability-load-error-DW5RgyIb.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let D;e[16]!==b||e[17]!==t?(D=b.length===0?s.jsx(Ye,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=D):D=e[18];let N;e[19]!==t?(N=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=N):N=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==N?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:N,onImportComplete:se}),e[22]=u,e[23]=N,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(De,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(Ne,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==pe||e[99]!==X?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:X}),e[98]=pe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==D||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,D,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=D,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function Mt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Mt as default};
|
|
1
|
+
import{c as te,j as s,dy as ye,b as ue,r as ce,B as ee,n as je,t as ae,Y as be}from"./index-Cm-tI8HA.js";import{s as ge}from"./Plus-DiHsi401.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-Bi_UzY-A.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-CeNX0yRN.js";import{I as Ie}from"./input-2eed-wFb.js";import{G as xe,a as $e}from"./github-repo-picker-D2M_eq3D.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-DMXKqbK7.js";import{t as He}from"./cards-CWqHa4-W.js";import{R as Be}from"./require-capability-3wcMpc8f.js";import"./collection-search-3KzkGzMw.js";import"./SearchMd-921MfxAT.js";import"./use-debounced-value-g3CBpavU.js";import"./use-connection-8bb6KUvW.js";import"./use-mcp-client-D97h0h5m.js";import"./constants-dLUUoWH7.js";import"./auth-CazizifS.js";import"./authenticate-and-persist-oauth-BPWOTdhI.js";import"./mcp-oauth-BhrXYHgy.js";import"./ArrowLeft-BHdO000x.js";import"./LinkExternal01-BWm2ZiUJ.js";import"./LockUnlocked01-BVsDhJmX.js";import"./use-mcp-tools-CCcxTn0o.js";import"./extract-connection-data-DUuPRZ_W.js";import"./metadata-dUsYcpuu.js";import"./connection-CebLCGEl.js";import"./use-navigate-to-agent-C9zcTGhr.js";import"./use-destination-route-CnpOOvjT.js";import"./use-virtual-mcp-DUaqayrx.js";import"./hooks-Cc4ES1dM.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-8tSKMRqy.js";import"./task-board-Dga8ccP5.js";import"./schema-Cds_E6TQ.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./folder-icon-D0bHF6Zs.js";import"./Eye-4inhMKtP.js";import"./DotsVertical-Bg-qQed1.js";import"./Download01-DCvnxXRA.js";import"./Share07-BZJcpbaj.js";import"./Globe01-DVmDQt2e.js";import"./Key01-9fuIk8HH.js";import"./Palette-ClolmdvP.js";import"./Trash01-3d_pGxON.js";import"./Zap-CFjJF-hR.js";import"./dropdown-menu-BgCWwdwF.js";import"./Check-C-_rAuIj.js";import"./ChevronRight-DwyI683B.js";import"./file-type-icon-3xYk44u1.js";import"./access-gate-4BBXThic.js";import"./capability-load-error-CM-Xup3L.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Ye(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Je(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let D;e[16]!==b||e[17]!==t?(D=b.length===0?s.jsx(Ye,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=D):D=e[18];let N;e[19]!==t?(N=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=N):N=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==N?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:N,onImportComplete:se}),e[22]=u,e[23]=N,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let Y;e[78]!==V?(Y=s.jsx(ve,{children:V}),e[78]=V,e[79]=Y):Y=e[79];let J;e[80]!==L||e[81]!==Y?(J=s.jsxs(Se,{children:[L,Y]}),e[80]=L,e[81]=Y,e[82]=J):J=e[82];let K;e[83]!==t?(K=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=K):K=e[84];let M;e[85]!==K?(M=s.jsx(De,{children:K}),e[85]=K,e[86]=M):M=e[86];let Q;e[87]!==t?(Q=t("settings.syncedRepos.remove"),e[87]=t,e[88]=Q):Q=e[88];let U;e[89]!==j||e[90]!==Q?(U=s.jsx(Ne,{onClick:j,children:Q}),e[89]=j,e[90]=Q,e[91]=U):U=e[91];let W;e[92]!==M||e[93]!==U?(W=s.jsxs(_e,{children:[M,U]}),e[92]=M,e[93]=U,e[94]=W):W=e[94];let X;e[95]!==J||e[96]!==W?(X=s.jsxs(Ce,{children:[J,W]}),e[95]=J,e[96]=W,e[97]=X):X=e[97];let Z;e[98]!==pe||e[99]!==X?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:X}),e[98]=pe,e[99]=X,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==D||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,D,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=D,e[105]=_,e[106]=re):re=e[106],re}function Ke(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Je,{})}),e[0]=t):t=e[0],t}function Mt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}export{Mt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,n as i,j as r}from"./index-
|
|
1
|
+
import{c,n as i,j as r}from"./index-Cm-tI8HA.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,m as d,f as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,dz as k,bs as p,by as T,dA as y,bu as M,bx as P,bv as S,bz as F,dB as V,cK as D,c as x,n as g}from"./index-
|
|
1
|
+
import{r as v,j as d,dz as k,bs as p,by as T,dA as y,bu as M,bx as P,bv as S,bz as F,dB as V,cK as D,c as x,n as g}from"./index-Cm-tI8HA.js";var m="Tabs",[G]=M(m,[y]),w=y(),[z,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(z,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var L=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(L,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,O as a,Q as b,J as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as s}from"./schema-
|
|
1
|
+
import{o as s}from"./schema-Cds_E6TQ.js";const v="super-agent",i=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=i[0];function T(e){return i[e%i.length]??c}function w(e){return e.createdBy==="system"}const l="chore",A=["reviewer"],_={reviewer:"Reviewer"},d=["QA Agent","Code Reviewer"];function p(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const R=["approved","merged","post_deploy_validation"];function D(e,t){return e?[_[t],...d].some(r=>e.startsWith(`${r}:`)):!1}function E(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function f(e,t){const r=E(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const o=a.data??{};if(o.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&o.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function S(e,t,r){if(t.length===0)return!1;const n=f(e,r);return t.every(a=>n.get(a)==="approved")}const g="task-board.item.updated",L="task-board.item.deleted",m=4e3;export{l as D,A as R,v as S,g as T,S as a,D as b,L as c,c as d,R as e,m as f,w as i,T as n,p as r};
|