decocms 4.407.1 → 4.408.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CqiDjZtO.js → AlertCircle-B4TBXI97.js} +1 -1
- package/dist/client/assets/{AreaChart-DmB0UyKI.js → AreaChart-BT_BBtMg.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CoTYI8n8.js → ArrowLeft-Du5HwAty.js} +1 -1
- package/dist/client/assets/{ArrowRight-CBrn5XhG.js → ArrowRight-Bk-h8Spa.js} +1 -1
- package/dist/client/assets/{ArrowUp-CIy98yKC.js → ArrowUp-DfYHJg8n.js} +1 -1
- package/dist/client/assets/{CartesianChart-Zpi0oHsU.js → CartesianChart-B5akGwBy.js} +1 -1
- package/dist/client/assets/{Check-D8fh3HxN.js → Check-e9hufNdV.js} +1 -1
- package/dist/client/assets/{CheckCircle-OhMMVayl.js → CheckCircle-Du0Z4Mo4.js} +1 -1
- package/dist/client/assets/{ChevronUp-B02P5KVq.js → ChevronUp-Dijj6L1D.js} +1 -1
- package/dist/client/assets/{Copy01-D1VXAb_E.js → Copy01-Rd2DUITb.js} +1 -1
- package/dist/client/assets/{CreditCard01-Buj0ay80.js → CreditCard01-CuV3PHbW.js} +1 -1
- package/dist/client/assets/{DotsVertical-BRGjxbLE.js → DotsVertical-CUOWG-18.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B6URqiwQ.js → ErrorBarContext-BCo_1Dyd.js} +1 -1
- package/dist/client/assets/{Eye-CHDK5SzP.js → Eye-CATcYqq7.js} +1 -1
- package/dist/client/assets/{Globe04-DVrgctQH.js → Globe04-dvDQwL6D.js} +1 -1
- package/dist/client/assets/{Image01-Bospa-dw.js → Image01-CK0bgOXc.js} +1 -1
- package/dist/client/assets/{Key01-CDWjnJp8.js → Key01-B2Ks3SjW.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BikLyKZh.js → LayoutLeft-o4EwT_f4.js} +1 -1
- package/dist/client/assets/{Line-DdFX7Wqo.js → Line-51pigb_T.js} +1 -1
- package/dist/client/assets/{Link01-D8neQKry.js → Link01-t9xcN1_J.js} +1 -1
- package/dist/client/assets/{LinkExternal01-6pj5RpJR.js → LinkExternal01-E0yllQfW.js} +1 -1
- package/dist/client/assets/{Monitor01-EpELW75B.js → Monitor01-2SrwE2A4.js} +1 -1
- package/dist/client/assets/{Palette-DWn5bbaO.js → Palette-DdJDZNuI.js} +1 -1
- package/dist/client/assets/{Plus-dO-o-OZ1.js → Plus-BfQMVZRL.js} +1 -1
- package/dist/client/assets/{SearchMd-BxSEQNj1.js → SearchMd-BPxAMeCu.js} +1 -1
- package/dist/client/assets/{Sector-De7bawQH.js → Sector-DomxOOd2.js} +1 -1
- package/dist/client/assets/{Share07-CpK9-QLV.js → Share07-CAPMGK5H.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CqpFwFw-.js → ShoppingBag01-Dj-9rxCI.js} +1 -1
- package/dist/client/assets/{Sun-BIEAAQBy.js → Sun-Dc2rioTm.js} +1 -1
- package/dist/client/assets/{Tool01-wdU6mbFw.js → Tool01-DAfFPt6l.js} +1 -1
- package/dist/client/assets/{Trash01-Dy5IpZCR.js → Trash01-BpbNxWxU.js} +1 -1
- package/dist/client/assets/{Upload01-k78JIhqS.js → Upload01-Cu5y084h.js} +1 -1
- package/dist/client/assets/{User01-CRjEXTD9.js → User01-DZIaW3qt.js} +1 -1
- package/dist/client/assets/{UserSquare-XdFChMN5.js → UserSquare-CMMvch3p.js} +1 -1
- package/dist/client/assets/{Users01-LNPkBtQM.js → Users01-B6wD4vfR.js} +1 -1
- package/dist/client/assets/{X-BwnLOPPu.js → X-7V7RNG20.js} +1 -1
- package/dist/client/assets/{XClose-mbsgepx1.js → XClose-CgE_NvFQ.js} +1 -1
- package/dist/client/assets/{Zap-CKU9kVKj.js → Zap-BnKV6W7m.js} +1 -1
- package/dist/client/assets/{ZoomOut-D1F1D8yI.js → ZoomOut-9vKhCWKn.js} +1 -1
- package/dist/client/assets/{access-gate-0oyoHLh0.js → access-gate-C2DM5elO.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B2Lm5FSw.js → add-connection-dialog-CfJFvo0n.js} +1 -1
- package/dist/client/assets/{agent-analytics-BZhII6Sc.js → agent-analytics-D3NPULfo.js} +1 -1
- package/dist/client/assets/agent-app-CbeamK3b.js +1 -0
- package/dist/client/assets/{agent-assets-CuooEtas.js → agent-assets-Csm6M0Fe.js} +1 -1
- package/dist/client/assets/{agent-automation-qNPu2J1J.js → agent-automation-LvpxhSzD.js} +1 -1
- package/dist/client/assets/{agent-automations-DybjCNwT.js → agent-automations-CCXip6X6.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Bc1EY-5M.js → agent-connect-sources-Cx2sX-zQ.js} +1 -1
- package/dist/client/assets/agent-deck-DtYstLjo.js +1 -0
- package/dist/client/assets/{agent-e2e-CNS1tBeu.js → agent-e2e-Dd6W8dQn.js} +1 -1
- package/dist/client/assets/{agent-experiments-BNJx2Uga.js → agent-experiments-CcAMb-uk.js} +1 -1
- package/dist/client/assets/{agent-file-DFb8cNXj.js → agent-file-1tvyjICj.js} +1 -1
- package/dist/client/assets/{agent-git-Bf2Q05gW.js → agent-git-DAcJMVD4.js} +1 -1
- package/dist/client/assets/{agent-hosting-2OXTpkaH.js → agent-hosting-TSmf3TUW.js} +1 -1
- package/dist/client/assets/{agent-icon-BVQ4eiSp.js → agent-icon-CP5XN9a-.js} +1 -1
- package/dist/client/assets/agent-library-file-DQKMT-An.js +1 -0
- package/dist/client/assets/{agent-monitor-BOdJD8Za.js → agent-monitor-DFJdCDDa.js} +1 -1
- package/dist/client/assets/{agent-overview-Dq2ivtgU.js → agent-overview-DsLUNfy5.js} +1 -1
- package/dist/client/assets/agent-settings-DjUOw7yi.js +1 -0
- package/dist/client/assets/{agent-site-editor-BwFJgMkq.js → agent-site-editor-DVPUbL6E.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-Btc2xHC2.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CEK4dCAj.js → agent-site-editor-content-D16Neg7_.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-B3IcD5Vx.js → agent-site-editor-preview-DsyVdlnU.js} +3 -3
- package/dist/client/assets/agent-view-2NBoqN30.js +1 -0
- package/dist/client/assets/{agent-view-guard-8DkADQnc.js → agent-view-guard-B21vN7fV.js} +1 -1
- package/dist/client/assets/{agents-list-Ms4vP1N_.js → agents-list-CXO3qqSU.js} +1 -1
- package/dist/client/assets/{ai-providers-nE8SmeZZ.js → ai-providers-CS-7rqRe.js} +1 -1
- package/dist/client/assets/{alert-BXAqKYMq.js → alert-DA8xSuNw.js} +1 -1
- package/dist/client/assets/{alert-dialog-CZds33Na.js → alert-dialog-DOZYkVkM.js} +1 -1
- package/dist/client/assets/{analytics-sections-BA_72ni2.js → analytics-sections-D-vmE_mj.js} +1 -1
- package/dist/client/assets/api-keys-B_m68tgF.js +1 -0
- package/dist/client/assets/{api-keys-C2mTwzEm.js → api-keys-Dw0ULTM2.js} +1 -1
- package/dist/client/assets/app-editor-BUq8LbjS.js +1 -0
- package/dist/client/assets/{asset-utils-BlHyLIZk.js → asset-utils-KW2eRq0C.js} +1 -1
- package/dist/client/assets/{auth-H8QpcxPz.js → auth-WDJFc9Hm.js} +1 -1
- package/dist/client/assets/{auth-catchall-DSeRpLFk.js → auth-catchall-DFKT24Uv.js} +1 -1
- package/dist/client/assets/{auth-entry-ItG1LnnA.js → auth-entry-D_MUtVLc.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D4cQ_TzY.js → auth-split-layout-C2beZWug.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CByyYh2r.js → authenticate-and-persist-oauth-BdWTTo89.js} +1 -1
- package/dist/client/assets/{automation-list-row-CVtICczc.js → automation-list-row-DF4C0izx.js} +1 -1
- package/dist/client/assets/{automation-runs-B-726bZk.js → automation-runs-a1jd9j7n.js} +1 -1
- package/dist/client/assets/{automations-DMGTV0n1.js → automations-Cn4R0PwJ.js} +1 -1
- package/dist/client/assets/{autosend-C9P73iEp.js → autosend-BUpRVcwj.js} +1 -1
- package/dist/client/assets/{avatar-CU8lt9cG.js → avatar-JIBRtdC_.js} +1 -1
- package/dist/client/assets/{badge-DFURQVVL.js → badge-6y8k_9-5.js} +1 -1
- package/dist/client/assets/{block-document-D8PH4-_C.js → block-document-CIJVCQ3G.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BWEYeVE-.js → blocks-preview-workspace-context-D1BaC02Q.js} +1 -1
- package/dist/client/assets/{buckets-D-Ou3nAx.js → buckets-C9rH2WAo.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Cr2dVb8Z.js → build-improve-prompt-doc-uYATas8q.js} +1 -1
- package/dist/client/assets/{calendar-C0TNAbuF.js → calendar-C9s_iZ3-.js} +1 -1
- package/dist/client/assets/{capability-load-error-IMp7H0U5.js → capability-load-error-BPW-viM7.js} +1 -1
- package/dist/client/assets/{cards-C0HEmP6V.js → cards-j_YM4uLm.js} +1 -1
- package/dist/client/assets/{category-editor-BOryu3oh.js → category-editor-CJshYeZK.js} +1 -1
- package/dist/client/assets/{chart-DQxGCNwG.js → chart-BXtamRvp.js} +1 -1
- package/dist/client/assets/{chat-context-BSiYT6x-.js → chat-context-B6r2nJ6g.js} +1 -1
- package/dist/client/assets/{chat-draft-BYWaPW2i.js → chat-draft-CerneUSv.js} +1 -1
- package/dist/client/assets/{checkbox-CFcmjH8P.js → checkbox-CjlcA4Zf.js} +1 -1
- package/dist/client/assets/{choose-editor-D_Q-s8bQ.js → choose-editor-CCjCgFix.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-BwvtJUCV.js → claim-phase-copy-Dvvzpbgr.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DSnJnolh.js → cli-auth-success-Cp9ve11h.js} +1 -1
- package/dist/client/assets/{client-icons-DEUB9Vg6.js → client-icons-CZY4712U.js} +1 -1
- package/dist/client/assets/{collapsible-a49rGOz6.js → collapsible-D8RyGf9b.js} +1 -1
- package/dist/client/assets/{collection-detail-CZEkDE3N.js → collection-detail-ivXkBsms.js} +1 -1
- package/dist/client/assets/{collection-display-button-BlP4Uqw9.js → collection-display-button-COB8om2q.js} +1 -1
- package/dist/client/assets/{collection-search-BSlnvqKA.js → collection-search-Bm4yfKio.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CAb0M2wu.js → collection-table-wrapper-DR3ABum3.js} +1 -1
- package/dist/client/assets/{collection-tabs-DmB7ERnW.js → collection-tabs-CyEDGPVJ.js} +1 -1
- package/dist/client/assets/{combobox-mwCqJmES.js → combobox--akRwZt5.js} +1 -1
- package/dist/client/assets/{command-CaEhDN7h.js → command-BXe_2Y8J.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-By__A48R.js → companion-mcps-section-bE4HzUrd.js} +1 -1
- package/dist/client/assets/{connect-C4yHJZCA.js → connect-CA2SeR7c.js} +1 -1
- package/dist/client/assets/{connect-layout-C61-VnOR.js → connect-layout-D-VHpq78.js} +1 -1
- package/dist/client/assets/{connection-Ca2YXP4J.js → connection-C1K_L2Xe.js} +1 -1
- package/dist/client/assets/{connection-card-BY3_Gacl.js → connection-card-C0UBOriU.js} +1 -1
- package/dist/client/assets/{connection-detail-sfM64Mg-.js → connection-detail-B54gylCL.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DrqEsKFW.js → connection-form-helpers-DmenEJQq.js} +1 -1
- package/dist/client/assets/{connections-Zz3LzI2c.js → connections-qW3uwEes.js} +1 -1
- package/dist/client/assets/{context-Bhv0bFWJ.js → context-D8xt-q96.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BgUibshB.js → create-organization-dialog-CfY_Fp3w.js} +1 -1
- package/dist/client/assets/{decopilot-BOdao_R4.js → decopilot-C7BBIc4w.js} +1 -1
- package/dist/client/assets/{dialog-DJsfAYzZ.js → dialog-B9AmIVi-.js} +1 -1
- package/dist/client/assets/{discover-BPSUFufF.js → discover-C2vIznYH.js} +1 -1
- package/dist/client/assets/{domain-settings-Yo5MD25-.js → domain-settings-CadsJlyS.js} +1 -1
- package/dist/client/assets/{download-app-dialog-58eeoMgv.js → download-app-dialog-BngIghKX.js} +1 -1
- package/dist/client/assets/{drawer-B2h_E7ZU.js → drawer-Cmzocoxj.js} +1 -1
- package/dist/client/assets/{editor-BN9OQ3T_.js → editor-B64zb0TF.js} +1 -1
- package/dist/client/assets/{empty-state-Tcy6goml.js → empty-state-CnuzaP1O.js} +1 -1
- package/dist/client/assets/{empty-state-BShA_Zt_.js → empty-state-Df0p9Roq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BlOiGNBy.js → extract-connection-data-ZkeqSXbM.js} +1 -1
- package/dist/client/assets/{feature-gate-BlZO1dlo.js → feature-gate-D1_CJv3S.js} +1 -1
- package/dist/client/assets/{feature-paywall-Bvq165uY.js → feature-paywall-BK6Diems.js} +1 -1
- package/dist/client/assets/{file-explorer-t-yyOrQ2.js → file-explorer-B5hK7sWB.js} +1 -1
- package/dist/client/assets/{file-preview-DV0egHtJ.js → file-preview-BAf9QLKP.js} +1 -1
- package/dist/client/assets/{file-share-button--q2NXT9M.js → file-share-button-z0zbJCjq.js} +1 -1
- package/dist/client/assets/{file-type-icon-eovymU8z.js → file-type-icon-ddHjZWG7.js} +1 -1
- package/dist/client/assets/{folder-icon-DM-fT3_E.js → folder-icon-CGbzITGc.js} +1 -1
- package/dist/client/assets/{form-CQb0RBzJ.js → form-CIkzBIkD.js} +1 -1
- package/dist/client/assets/{gateway-client-BQJuH-u5.js → gateway-client-BfoDyNyS.js} +1 -1
- package/dist/client/assets/{general-DlwjNv1u.js → general-0uJSAIg1.js} +1 -1
- package/dist/client/assets/{github-icon-czgJF8rE.js → github-icon-ZHfVS9cH.js} +1 -1
- package/dist/client/assets/{home-CPOYzyNO.js → home-fbC7tn9p.js} +1 -1
- package/dist/client/assets/{hooks-BjpNlqA7.js → hooks-DETt4AT1.js} +1 -1
- package/dist/client/assets/{icon-button-tuRLg8j7.js → icon-button-B2SkFvD9.js} +1 -1
- package/dist/client/assets/{index-DL9QYxDl.js → index-5-VvRKCO.js} +1 -1
- package/dist/client/assets/{index-C-zKandM.js → index-B7X5CqyW.js} +1 -1
- package/dist/client/assets/{index-ChDRElR2.js → index-BAMGe25h.js} +1 -1
- package/dist/client/assets/{index-CRWXLb_O.js → index-BEGmWtb3.js} +1 -1
- package/dist/client/assets/{index-CdRlCc6V.js → index-CIQBtrDT.js} +1 -1
- package/dist/client/assets/{index-DKHVLAZY.js → index-CKwDISQd.js} +1 -1
- package/dist/client/assets/{index-BFsoPEqX.js → index-DIXFYX3T.js} +1 -1
- package/dist/client/assets/{index-AQWsWtp7.js → index-DNZ8aOGc.js} +1 -1
- package/dist/client/assets/{index-DYoRF-O4.js → index-DRbZIwZq.js} +1 -1
- package/dist/client/assets/{index-MsCW10BI.js → index-DeHNRxdT.js} +1 -1
- package/dist/client/assets/{index-D5YaP9fl.js → index-SYS1m8f-.js} +1 -1
- package/dist/client/assets/{index-la7MvvCD.js → index-izHBwn3I.js} +2 -2
- package/dist/client/assets/{index-mhdC9JUY.js → index-nrrh0CII.js} +1 -1
- package/dist/client/assets/{index-redirect-DnYgi54M.js → index-redirect-9bNSLe_3.js} +1 -1
- package/dist/client/assets/{index-HrpTfEP9.js → index-xb9O7QC9.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DHGpRERl.js → infiniteQueryObserver-DiUuMuMD.js} +1 -1
- package/dist/client/assets/{infra-billing-BF-bWe5S.js → infra-billing-MS1pmTh3.js} +1 -1
- package/dist/client/assets/{input-BCLmKz5x.js → input-BLSONHqE.js} +1 -1
- package/dist/client/assets/{input-B0WmrbVe.js → input-C9yULiWh.js} +1 -1
- package/dist/client/assets/{input-DtLRf-AB.js → input-tXV80IJ3.js} +1 -1
- package/dist/client/assets/{integration-icon-CJHZMMbJ.js → integration-icon-Vvc8ojiC.js} +1 -1
- package/dist/client/assets/{label-2xig-2_L.js → label-BIuQy2__.js} +1 -1
- package/dist/client/assets/{last-preview-page-bq3_FCxn.js → last-preview-page-PW6mp0AD.js} +1 -1
- package/dist/client/assets/{layout-R3Ne2FL_.js → layout-CGB_h5K-.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Buz-954t.js → legacy-agents-deep-CUAA26fQ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Dx9gt9UU.js → legacy-main-redirect-BMP2JlQ8.js} +1 -1
- package/dist/client/assets/{library-BL5YGRzC.js → library-SSPs2Mk7.js} +1 -1
- package/dist/client/assets/{login-BZVErza-.js → login-CFVOuIMS.js} +1 -1
- package/dist/client/assets/{markdown-D6wMhWiM.js → markdown-BNo5hmT4.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CDjIsVDu.js → mcp-app-renderer-DC6jfKUS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-W0WZ-aUZ.js → mcp-oauth-B-JicvF4.js} +1 -1
- package/dist/client/assets/{members-Qfvwu1Jq.js → members-BPE4uAmB.js} +1 -1
- package/dist/client/assets/{message-templates-hrxYBvQV.js → message-templates-Dbunnp9s.js} +1 -1
- package/dist/client/assets/{mini-report-page-DjujmGFr.js → mini-report-page-BV-nrHu-.js} +1 -1
- package/dist/client/assets/{mock-board-BeeOkGmH.js → mock-board-BG3v7vPA.js} +3 -3
- package/dist/client/assets/{monaco-editor-DNIvxekG.js → monaco-editor-BhwzWl9K.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DHuwpNpA.js → monitoring-stats-row-SjTsJ9Vo.js} +1 -1
- package/dist/client/assets/{multi-select-CVLav2Kg.js → multi-select-DsBbPc3L.js} +1 -1
- package/dist/client/assets/{mustache-D2pffCPO.js → mustache-Dhzc6QWC.js} +1 -1
- package/dist/client/assets/{oauth-callback-1SRi76nH.js → oauth-callback-C9qvlwPd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-LQfrzFT9.js → oauth-callback-ai-provider-BLsrFMT9.js} +1 -1
- package/dist/client/assets/{onboarding-CHQ2K1zC.js → onboarding-DdgObshe.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CKMtyBc7.js → optimistic-project-sidebar-views-BCSGdK6N.js} +1 -1
- package/dist/client/assets/{org-file-open-context-0Xek-YPZ.js → org-file-open-context-LEXGiXCZ.js} +1 -1
- package/dist/client/assets/{organization-choice-Cg6gj7Tb.js → organization-choice-DWiDrQVs.js} +1 -1
- package/dist/client/assets/{orgs-auyCtT1J.js → orgs-CYRhbeGN.js} +1 -1
- package/dist/client/assets/{page-seo-form-CpOqrpjk.js → page-seo-form-Cp5_stqo.js} +1 -1
- package/dist/client/assets/{pair-BvJe2vuW.js → pair-BJZlwx5z.js} +1 -1
- package/dist/client/assets/{plan-ladder-BDecMKba.js → plan-ladder-BCVwOSVp.js} +1 -1
- package/dist/client/assets/{popover-57eEekDu.js → popover-BiGAM8js.js} +1 -1
- package/dist/client/assets/{post-calendar-DeEV8AFn.js → post-calendar-DKkZ8xsV.js} +1 -1
- package/dist/client/assets/{post-editor-CmLdNVzQ.js → post-editor-C-1jCs1B.js} +1 -1
- package/dist/client/assets/{preview-content-WYDokyps.js → preview-content-CJyGfLqn.js} +1 -1
- package/dist/client/assets/{preview-dialog-BxYYoE1U.js → preview-dialog-D4GsgUKO.js} +1 -1
- package/dist/client/assets/{profile-B6Yyj2rq.js → profile-FdAYJLKb.js} +1 -1
- package/dist/client/assets/{project-app-view-pAOgWYFa.js → project-app-view-B9SXqzvV.js} +1 -1
- package/dist/client/assets/{project-feed-BbLtZ21V.js → project-feed-D09MAcoq.js} +1 -1
- package/dist/client/assets/{project-icon-Cbpot0NA.js → project-icon-BfMBNeXz.js} +1 -1
- package/dist/client/assets/project-reports-DwtBmH51.js +1 -0
- package/dist/client/assets/project-tasks-CN6hEoJ8.js +1 -0
- package/dist/client/assets/{prompts-BALUrguv.js → prompts-DDRxwhhq.js} +1 -1
- package/dist/client/assets/record-editor-VDQOze8g.js +1 -0
- package/dist/client/assets/{redirect-editor-B2IozbZ6.js → redirect-editor-Cbk1QsyX.js} +1 -1
- package/dist/client/assets/{reports-RkxkIHme.js → reports-C7YnJw_5.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DOwSa27p.js → reports-onboarding-DhCB4bD9.js} +1 -1
- package/dist/client/assets/{reports-tab-Bm6higcG.js → reports-tab-Do-8_DzV.js} +2 -2
- package/dist/client/assets/reports-wlU1uxEN.js +1 -0
- package/dist/client/assets/{repositories-krbAkvGh.js → repositories-BDnwrsmL.js} +1 -1
- package/dist/client/assets/{repository-import-picker-B_v72BhY.js → repository-import-picker-DHUG6o-B.js} +1 -1
- package/dist/client/assets/{repository-picker-LOfOejYP.js → repository-picker-TE4ZcEAF.js} +1 -1
- package/dist/client/assets/{require-capability-DKLCcKep.js → require-capability-Hi6Rc10j.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CGa3XL_A.js → required-auth-layout-qs1Hm0B9.js} +1 -1
- package/dist/client/assets/{reset-password-ClXtKGtt.js → reset-password-BHO5OYEQ.js} +1 -1
- package/dist/client/assets/{resizable-DY3zDAh-.js → resizable-DvI1E7pk.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BSK_ZtfY.js → resolve-tab-icon-nUEsT-q-.js} +1 -1
- package/dist/client/assets/{review-settings-CvTj3ng-.js → review-settings-QvrNgLQu.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-B1xoqjFM.js → rich-text-link-control-DxPxXWmB.js} +1 -1
- package/dist/client/assets/{roles-CV5sMEK7.js → roles-Cgr78ewd.js} +1 -1
- package/dist/client/assets/{route-Cq82r011.js → route-BZFTlR2C.js} +1 -1
- package/dist/client/assets/{route-Dcm53IEy.js → route-CTkokDka.js} +1 -1
- package/dist/client/assets/{route-B0wlApnN.js → route-CawzfcpW.js} +1 -1
- package/dist/client/assets/{route-page-header-B1JKzg0J.js → route-page-header-KSRwTD4y.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-BW1O_q1l.js → runnable-block-editor-CJpnHgrX.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-IVo09SV7.js → sandbox-lifecycle-context-D0nuKJ_b.js} +1 -1
- package/dist/client/assets/{schema-D41P9rFK.js → schema-DNqDLF82.js} +1 -1
- package/dist/client/assets/{scroll-area-DtUzJSfO.js → scroll-area-DQZQeCpt.js} +1 -1
- package/dist/client/assets/{search-input-QqxNG-MM.js → search-input-BQOyz7rC.js} +1 -1
- package/dist/client/assets/{search-toggle-BatppdaH.js → search-toggle-B9bFME_G.js} +1 -1
- package/dist/client/assets/{secret-picker-C-mBD0ue.js → secret-picker-BprAET2c.js} +1 -1
- package/dist/client/assets/{secrets-xSiF3fuq.js → secrets-BrFL2imQ.js} +1 -1
- package/dist/client/assets/{sections-editor-BrGiGYM9.js → sections-editor-6HKWBNOE.js} +1 -1
- package/dist/client/assets/{select-Z1B5hMAv.js → select-BsUP6XU-.js} +1 -1
- package/dist/client/assets/{select-model-DARJfYvZ.js → select-model-DX5_kOlo.js} +1 -1
- package/dist/client/assets/{seo-editor-DkZTFtbW.js → seo-editor-DCzXUICs.js} +1 -1
- package/dist/client/assets/{separator-DO9SDVcD.js → separator-gB9bmgZ5.js} +1 -1
- package/dist/client/assets/{settings-tab-DkiqqnlX.js → settings-tab-C6cS3QDh.js} +1 -1
- package/dist/client/assets/{sheet-CvN1ikSs.js → sheet-DTIr0quY.js} +1 -1
- package/dist/client/assets/{shell-layout-BIxmWbtr.js → shell-layout-BadbomY4.js} +1 -1
- package/dist/client/assets/{skill-preview-CHP7SuX_.js → skill-preview-CrxujJbZ.js} +1 -1
- package/dist/client/assets/{skills-TAgw84aD.js → skills-BjCVlq9E.js} +1 -1
- package/dist/client/assets/{sso-Lmq-9UoE.js → sso-H7fs23iU.js} +1 -1
- package/dist/client/assets/{suggestion-5RVby0S_.js → suggestion-Cub6xPAJ.js} +1 -1
- package/dist/client/assets/{switch-CtDu-MBx.js → switch-BjEW4lQy.js} +1 -1
- package/dist/client/assets/{synced-repos-BwvEZogL.js → synced-repos-BOQveWA9.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DUN-h4u2.js → tab-icon-glyph-BvrqhHgJ.js} +1 -1
- package/dist/client/assets/{table-B9-VMZYP.js → table-DeAQZdMp.js} +1 -1
- package/dist/client/assets/{tabs-Q0hITVpE.js → tabs-UXACuQIA.js} +1 -1
- package/dist/client/assets/{task-board-DVxNVXhb.js → task-board-CFetJZKk.js} +1 -1
- package/dist/client/assets/{task-route-DMmR_2lC.js → task-route-uQ4EUqTW.js} +1 -1
- package/dist/client/assets/{task-status-DU--pTl-.js → task-status-VgarGQNj.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DOI9G9_P.js → taskboard-analytics-057esZ8F.js} +1 -1
- package/dist/client/assets/tasks-B88XVIi1.js +1 -0
- package/dist/client/assets/{tasks-Cilk6wif.js → tasks-DM161h6Q.js} +1 -1
- package/dist/client/assets/{textarea-qfhaNSmC.js → textarea-tfNNqm-_.js} +1 -1
- package/dist/client/assets/{thread-analytics-BZ3RK1l1.js → thread-analytics-D6lYkGRr.js} +1 -1
- package/dist/client/assets/{thread-button-CMx8Gju3.js → thread-button-CqHz48Ii.js} +1 -1
- package/dist/client/assets/{thread-intent-CqTshOQy.js → thread-intent-EOvgTchU.js} +1 -1
- package/dist/client/assets/{thread-route-TlKg3LdX.js → thread-route-Dg7kv_hv.js} +1 -1
- package/dist/client/assets/{thread-route-9TfWumfl.js → thread-route-DwXk0pzt.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CokQYhbs.js → thread-sheet-body-BN1cpBVG.js} +1 -1
- package/dist/client/assets/{toggle-group-DPbXSYWV.js → toggle-group-DfCcVTyX.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B9nlex_6.js → toolbar-icon-button-DOCtjUrJ.js} +1 -1
- package/dist/client/assets/{tooltip-CoZI31uD.js → tooltip-DqtfkXwI.js} +1 -1
- package/dist/client/assets/{track-BKL5LAvY.js → track-CWXt8cRU.js} +1 -1
- package/dist/client/assets/{types-rPt_-Qll.js → types-QqaS24ZV.js} +1 -1
- package/dist/client/assets/{usage-stats-BuI3unRc.js → usage-stats-GlPgZezF.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D7OXOS-G.js → use-ai-providers-BGPaB7ua.js} +1 -1
- package/dist/client/assets/{use-automations-z7xbjQIQ.js → use-automations-DoGtKsiF.js} +1 -1
- package/dist/client/assets/{use-autosave-Bxiu0vla.js → use-autosave-D1L_iXh-.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BTjPom26.js → use-connect-companion-C9bH45vI.js} +1 -1
- package/dist/client/assets/{use-connection-CPDdSysq.js → use-connection-BsLte2he.js} +1 -1
- package/dist/client/assets/{use-copy-C0ynkPTX.js → use-copy-CaOPCxF5.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BZO8qY0j.js → use-create-virtual-mcp-BE_pJ71b.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BqXKjYjg.js → use-date-fns-locale-Cjw89uE-.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CLPi0hya.js → use-debounced-autosave-CmBQ3Dtm.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B-zmOhoh.js → use-debounced-value-D1fDrXmw.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CNEoBh1g.js → use-deco-credits-BnljnX-n.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BoV3es7X.js → use-decopilot-events-oRqi_MUt.js} +1 -1
- package/dist/client/assets/{use-delete-connection-LK4cZZqb.js → use-delete-connection-CfXTYsut.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C6TOor9I.js → use-deployment-admin-BYSK4yu-.js} +1 -1
- package/dist/client/assets/{use-entitlements-DlE4tXhq.js → use-entitlements-g5-cEVzp.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-5uqeJHN1.js → use-fast-preview-draft-url-ByATm-6k.js} +1 -1
- package/dist/client/assets/{use-file-configs-yZYdsSBL.js → use-file-configs-D0LRhOPo.js} +1 -1
- package/dist/client/assets/{use-in-settings-BjcHlhO5.js → use-in-settings-BA5wQFQ2.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-KcE3dKaA.js → use-infinite-scroll-EFF__ehg.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqLd88Kn.js → use-join-requests-Df_QAPcD.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-UUqYOyvz.js → use-main-panel-tabs-4SKVKtlD.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CuSCsS3V.js → use-mcp-auth-status-r6Fv7Ux6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B9CL9mXZ.js → use-mcp-client-CNVDhuvd.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DxFmwtgG.js → use-mcp-prompts-Bd28eC02.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-NkAGGesA.js → use-mcp-tools-D1dyg5U7.js} +1 -1
- package/dist/client/assets/{use-members-mJ_vsORi.js → use-members-CcYULDVF.js} +1 -1
- package/dist/client/assets/{use-mobile-CO15Vvi5.js → use-mobile-Dn4_VWcj.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DXSW85Ka.js → use-navigate-to-agent-soNoKU2z.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-_DNbqg93.js +1 -0
- package/dist/client/assets/{use-open-billing-url-yYOsq126.js → use-open-billing-url-DLsqsUAn.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bu1d-xI_.js → use-org-auth-client-BbRXHP84.js} +1 -1
- package/dist/client/assets/{use-org-fs-D3qiMbvK.js → use-org-fs-B9N-OGu5.js} +1 -1
- package/dist/client/assets/{use-org-sso-HLuhRfMG.js → use-org-sso-DcCWDiTW.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Dt3Wxaut.js → use-organization-roles-CIWlEEfM.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DAp3UXWL.js → use-organization-settings-BWZsG9HZ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DpDJATeP.js → use-panel-navigate-BpzTFK7R.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-oox2PoJv.js → use-project-native-view-presence-Bn9lK-SY.js} +1 -1
- package/dist/client/assets/{use-project-scope-CRxtlodI.js → use-project-scope-DIRKMaLK.js} +1 -1
- package/dist/client/assets/{use-releases-CFEyzv5l.js → use-releases-DBFdzdKG.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DTRVC09n.js → use-reports-diagnostic-M-tFAPHb.js} +1 -1
- package/dist/client/assets/{use-route-default-main-vbSzjPnk.js → use-route-default-main-BeQVGvWs.js} +1 -1
- package/dist/client/assets/{use-secrets-C-srj8mK.js → use-secrets-BtIO9CRs.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DKdR_SDL.js → use-section-preview-base-CgQax-JH.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DX22bfMF.js → use-session-runtime-CHP3YGA3.js} +1 -1
- package/dist/client/assets/{use-tags-ZX6Z9wHS.js → use-tags-Dx91jKms.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-gGCzAptX.js → use-task-board-analytics-DO-u1jni.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C8C_PmHj.js → use-task-metadata-BxMvdi8M.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BXxtgoOB.js → use-thread-analytics-Duxs7POX.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DWpGJipS.js → use-thread-outputs-BmNXBkF5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CWjAgZ_C.js → use-virtual-mcp-D8Whl5cH.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ByafV4ZI.js +1 -0
- package/dist/client/assets/{useQueries-DZcanOle.js → useQueries-e2PQJS28.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CflcpPwQ.js +1 -0
- package/dist/client/assets/{users-7r6H1fxa.js → users-OvID5j24.js} +1 -1
- package/dist/client/assets/{utils-CqblQM8O.js → utils-Dn4NkWqd.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dd4D8c-D.js → variant-calendar-D7VOB7kp.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-B-CtC_QE.js → variant-matcher-override-CVQeLuOR.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BZtTUFXf.js → view-mode-toggle-5kJtAe-y.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CPBnFFsB.js → virtual-mcp-DWa9T_f2.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +81 -81
- package/dist/server/server.js +223 -223
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BNUwBXYq.js +0 -1
- package/dist/client/assets/agent-deck-Bp5a_bfF.js +0 -1
- package/dist/client/assets/agent-library-file-D1rkXH6g.js +0 -1
- package/dist/client/assets/agent-settings-CjmR1FyN.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BJHtR0NW.js +0 -2
- package/dist/client/assets/agent-view-DSVixx3B.js +0 -1
- package/dist/client/assets/api-keys-QLTg329O.js +0 -1
- package/dist/client/assets/app-editor-3cEBKiKd.js +0 -1
- package/dist/client/assets/project-reports-CDn4J1zo.js +0 -1
- package/dist/client/assets/project-tasks-BME3lPuD.js +0 -1
- package/dist/client/assets/record-editor-Dly6eoym.js +0 -1
- package/dist/client/assets/reports-D_64de9i.js +0 -1
- package/dist/client/assets/tasks-CqM_oFvc.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-CB_7yWVh.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D2SNl7a0.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dw6PIqvY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,b as z,j as n,U as Nt,r as T,V as fs,P as ps,X as B,l as O,B as De,Y as xs,Z as Ne,_ as Re,q as V,a as ee,d as we,$ as gs,x as wt,t as re,a0 as hs,a1 as bs,p as Qe,a2 as _t,a3 as $t,o as Ct,e as js,K as Me,y as vs,a4 as ys,m as et,a5 as ks,w as Ss,L as Pt,a6 as D,J as de,a7 as tt,a8 as Ns,a9 as ws,aa as _s,ab as $s,ac as Cs,ad as Ps,ae as Is,af as zs,ag as Ts,ah as As,ai as Os,f as Rs,k as Ds,aj as Ms,ak as Es,E as Ls,u as Fs,O as qs}from"./index-la7MvvCD.js";import{u as Ve,S as Bs,a as Vs,b as Ks,c as le,d as q,e as oe,f as Je,g as Us,h as Ws,i as It}from"./use-in-settings-BjcHlhO5.js";import{S as Hs,a as Gs,b as Qs}from"./sheet-CvN1ikSs.js";import{u as st}from"./use-mobile-CO15Vvi5.js";import{S as Js,a as zt}from"./thread-button-CMx8Gju3.js";import{u as Xs,L as te,i as Tt}from"./shell-layout-BIxmWbtr.js";import{u as ke,a as Ke,b as At}from"./use-project-scope-CRxtlodI.js";import{u as Ys}from"./thread-route-TlKg3LdX.js";import{P as nt,a as Ue,b as ot}from"./popover-57eEekDu.js";import{D as Ot,a as Rt,b as Dt,c as Zs}from"./drawer-B2h_E7ZU.js";import{A as Ee}from"./avatar-CU8lt9cG.js";import{T as it,a as at,b as en,c as rt}from"./tooltip-CoZI31uD.js";import{a as tn}from"./Copy01-D1VXAb_E.js";import{n as sn}from"./Eye-CHDK5SzP.js";import{t as nn,i as Xe,a as on,b as an,c as rn,d as ln,e as Mt,s as lt,f as cn,A as dn,g as un,n as Et,h as Lt,j as mn,k as fn,l as pn,m as xn,o as gn,p as hn}from"./agent-icon-BVQ4eiSp.js";import{i as bn,a as jn}from"./Share07-CpK9-QLV.js";import{n as Ft}from"./LinkExternal01-6pj5RpJR.js";import{i as qt}from"./Monitor01-EpELW75B.js";import{n as vn,a as yn}from"./Sun-BIEAAQBy.js";import{a as Bt,i as kn,t as Sn}from"./Tool01-wdU6mbFw.js";import{u as Nn}from"./use-deployment-admin-C6TOor9I.js";import{u as wn}from"./use-is-desktop-app-BNujXJc_.js";import{i as _n,a as pt,D as $n}from"./download-app-dialog-58eeoMgv.js";import{I as Cn,u as Pn}from"./use-join-requests-DqLd88Kn.js";import{u as In}from"./use-deco-credits-CNEoBh1g.js";import{u as zn,a as Vt}from"./use-entitlements-DlE4tXhq.js";import{u as Tn,P as An}from"./plan-ladder-BDecMKba.js";import{u as On}from"./use-organization-settings-DAp3UXWL.js";import{S as Rn}from"./scroll-area-DtUzJSfO.js";import{u as Dn}from"./useInfiniteQuery-D2SNl7a0.js";import{n as Mn}from"./hooks-BjpNlqA7.js";import{t as Kt,S as En,b as Ln,p as Fn,a as qn,i as Bn,c as Vn,d as Kn}from"./task-route-DMmR_2lC.js";import{g as Un}from"./get-initials-D-f_fDFw.js";import{a as Wn}from"./format-time-BtXRrtv4.js";import{i as Ut}from"./LayoutLeft-BikLyKZh.js";import{I as Hn,T as Wt}from"./toolbar-icon-button-B9nlex_6.js";import{i as Le}from"./Check-D8fh3HxN.js";import{s as Ht}from"./Plus-dO-o-OZ1.js";import{C as xt,a as Oe,b as Fe,c as Gn,d as Qn,e as Jn}from"./command-CaEhDN7h.js";import{P as ct}from"./project-icon-Cbpot0NA.js";import{C as Xn}from"./create-organization-dialog-BgUibshB.js";import{s as Yn,c as Zn}from"./XClose-mbsgepx1.js";import{u as eo}from"./use-virtual-mcp-CWjAgZ_C.js";import{i as to}from"./ArrowLeft-CoTYI8n8.js";import{u as so}from"./use-thread-analytics-BXxtgoOB.js";import{e as no,r as Gt,u as oo,s as io,p as ao,P as ro}from"./use-project-native-view-presence-oox2PoJv.js";import{u as Qt}from"./optimistic-project-sidebar-views-CKMtyBc7.js";import{u as dt}from"./use-navigate-to-agent-DXSW85Ka.js";import{a as lo}from"./Image01-Bospa-dw.js";import{u as co}from"./use-panel-navigate-DpDJATeP.js";import{r as uo}from"./resolve-tab-icon-BSK_ZtfY.js";import{T as mo}from"./tab-icon-glyph-DUN-h4u2.js";import{R as fo}from"./repository-import-picker-B_v72BhY.js";import{t as po}from"./ChevronUp-B02P5KVq.js";import{t as xo}from"./Globe04-DVrgctQH.js";import{i as go}from"./CreditCard01-Buj0ay80.js";import{i as ho}from"./Key01-CDWjnJp8.js";import{s as bo}from"./User01-CRjEXTD9.js";import{i as jo}from"./Zap-CKU9kVKj.js";import{p as vo,q as yo}from"./question-004-sINsf4GQ.js";import{u as ko}from"./use-decopilot-events-BoV3es7X.js";import"./X-BwnLOPPu.js";import"./use-route-default-main-vbSzjPnk.js";import"./UserSquare-XdFChMN5.js";import"./CheckCircle-OhMMVayl.js";import"./dialog-DJsfAYzZ.js";import"./integration-icon-CJHZMMbJ.js";import"./use-mcp-client-B9CL9mXZ.js";import"./auth-H8QpcxPz.js";import"./required-auth-layout-CGa3XL_A.js";import"./autosend-C9P73iEp.js";import"./use-org-sso-HLuhRfMG.js";import"./github-repo-B15wwZ1g.js";import"./index-HrpTfEP9.js";import"./AlertCircle-CqiDjZtO.js";import"./ArrowUp-CIy98yKC.js";import"./ArrowRight-CBrn5XhG.js";import"./ShoppingBag01-CqpFwFw-.js";import"./ZoomOut-D1F1D8yI.js";import"./DotsVertical-BRGjxbLE.js";import"./Link01-D8neQKry.js";import"./Palette-DWn5bbaO.js";import"./SearchMd-BxSEQNj1.js";import"./Trash01-Dy5IpZCR.js";import"./Upload01-k78JIhqS.js";import"./Users01-LNPkBtQM.js";import"./form-CQb0RBzJ.js";import"./label-2xig-2_L.js";import"./select-Z1B5hMAv.js";import"./textarea-qfhaNSmC.js";import"./use-org-auth-client-Bu1d-xI_.js";import"./use-organization-roles-Dt3Wxaut.js";import"./use-ai-providers-D7OXOS-G.js";import"./schema-D41P9rFK.js";import"./task-board-DVxNVXhb.js";import"./infiniteQueryObserver-DHGpRERl.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-ChDRElR2.js";import"./alert-dialog-CZds33Na.js";import"./input-BCLmKz5x.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-yZYdsSBL.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-CqTshOQy.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-LOfOejYP.js";import"./github-icon-czgJF8rE.js";import"./collection-search-BSlnvqKA.js";import"./use-debounced-value-B-zmOhoh.js";function ie(){const{state:t,isMobile:e}=Ve();return t==="collapsed"&&!e}function So(t){const e=S.c(15),{width:s,minWidth:i,maxWidth:o,onPointerDown:a,onKeyDown:r,onDoubleClick:l}=t,c=z(),{isMobile:d}=Ve(),u=ie();if(d||u)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let f;e[2]!==c?(f=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=f):f=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},x=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==r||e[10]!==a||e[11]!==m||e[12]!==f||e[13]!==s?(h=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":i,"aria-valuemax":o,title:f,tabIndex:0,onPointerDown:a,onKeyDown:r,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:p,children:x}),e[6]=o,e[7]=i,e[8]=l,e[9]=r,e[10]=a,e[11]=m,e[12]=f,e[13]=s,e[14]=h):h=e[14],h}const Ye=400,gt=16,No="sidebar.width";function wo(){const t=S.c(14),e=_o;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=x=>typeof x=="number"?e(x):224,t[0]=s):s=t[0];const[i,o]=Nt(No,s),a=T.useRef(null);let r;t[1]!==o||t[2]!==i?(r=x=>{x.preventDefault();const h=x.clientX,b=e(i),g=a.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),v=g?Array.from(g.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const k of v)k.style.transition="none";const j=k=>{const N=e(b+(k.clientX-h));g?.style.setProperty("--sidebar-width",`${N}px`)},y=k=>{const N=e(b+(k.clientX-h));o(N);for(const w of v)w.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=o,t[2]=i,t[3]=r):r=t[3];const l=r;let c;t[4]!==o?(c=()=>{o(224)},t[4]=o,t[5]=c):c=t[5];const d=c;let u;t[6]!==o||t[7]!==i?(u=x=>{if(x.key==="ArrowLeft")o(e(i-gt));else if(x.key==="ArrowRight")o(e(i+gt));else if(x.key==="Home")o(224);else if(x.key==="End")o(Ye);else return;x.preventDefault()},t[6]=o,t[7]=i,t[8]=u):u=t[8];const m=u,f=e(i);let p;return t[9]!==m||t[10]!==l||t[11]!==d||t[12]!==f?(p={width:f,minWidth:224,maxWidth:Ye,wrapperRef:a,onStartResize:l,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function _o(t){return Math.max(224,Math.min(Ye,t))}const Jt=T.createContext(null);function $o(){const t=T.use(Jt);if(!t)throw new Error("Layout regions require a Layout");return t}function Co({children:t,notice:e}){const s=st(),[i,o]=Nt(fs.sidebarOpen(),!0),a=wo();return n.jsx(Jt,{value:{isMobile:s,resize:a},children:n.jsx(Bs,{open:i,onOpenChange:o,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Vs,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.25rem"},children:n.jsx(Js,{children:t})})]})})})}function Po(t){const e=S.c(26),{children:s,renderMobile:i}=t,o=z(),{isMobile:a,resize:r}=$o(),{openMobile:l,setOpenMobile:c}=Ve();if(!a){let h;e[0]!==r.maxWidth||e[1]!==r.minWidth||e[2]!==r.onKeyDownResize||e[3]!==r.onStartResize||e[4]!==r.resetWidth||e[5]!==r.width?(h=n.jsx(So,{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,onPointerDown:r.onStartResize,onKeyDown:r.onKeyDownResize,onDoubleClick:r.resetWidth}),e[0]=r.maxWidth,e[1]=r.minWidth,e[2]=r.onKeyDownResize,e[3]=r.onStartResize,e[4]=r.resetWidth,e[5]=r.width,e[6]=h):h=e[6];let b;return e[7]!==s||e[8]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[7]=s,e[8]=h,e[9]=b):b=e[9],b}let d;e[10]!==o?(d=o("layouts.shellControls.navigationTitle"),e[10]=o,e[11]=d):d=e[11];let u;e[12]!==d?(u=n.jsx(Hs,{className:"sr-only",children:d}),e[12]=d,e[13]=u):u=e[13];let m;e[14]!==c?(m=()=>c(!1),e[14]=c,e[15]=m):m=e[15];let f;e[16]!==i||e[17]!==m?(f=i({onClose:m}),e[16]=i,e[17]=m,e[18]=f):f=e[18];let p;e[19]!==u||e[20]!==f?(p=n.jsxs(Gs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[19]=u,e[20]=f,e[21]=p):p=e[21];let x;return e[22]!==l||e[23]!==c||e[24]!==p?(x=n.jsx(Qs,{open:l,onOpenChange:c,children:p}),e[22]=l,e[23]=c,e[24]=p,e[25]=x):x=e[25],x}function Io(t){const e=S.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={background:"transparent",containerType:"inline-size"},e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsx(Ks,{className:"flex flex-col min-h-0",style:i,children:n.jsx(ps,{variant:"plain",className:"bg-sidebar",children:n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=o):o=e[2],o}const Ge=Object.assign(Co,{Sidebar:Po,Content:Io});function zo(){const t=S.c(19),{org:e}=B(),{data:s}=Xs(e.slug);if(!s)return null;const i=s.severity==="block",o=i?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let a;t[0]!==o?(a=O("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=a):a=t[1];const r=i?void 0:"text-warning";let l;t[2]!==r?(l=O("size-4 shrink-0",r),t[2]=r,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(xs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(De,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=m):m=t[12];let f;return t[13]!==a||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:a,children:[c,d,u,m]}),t[13]=a,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function To(){const t=S.c(4),{setScope:e}=ke(),s=Ys(),i=Ne();let o;return t[0]!==i||t[1]!==s||t[2]!==e?(o=()=>{const a=s!==void 0?"route_resolves_scope":Re(i,null)?null:"route_needs_scope";V("scope_cleared",{relocated:a!==null,reason:a}),e(null)},t[0]=i,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}const qe="size-4 shrink-0";function ut(t){const e=S.c(5),{children:s,className:i}=t;let o;e[0]!==i?(o=O("flex w-4 shrink-0 items-center justify-center",i),e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function ye(t){const e=S.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const a=o;if(s.href){const u=s.external?"_blank":void 0,m=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let x;return e[6]!==a||e[7]!==s.href||e[8]!==i||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(x=n.jsxs("a",{href:s.href,target:u,rel:m,className:a,onClick:i,children:[f,p]}),e[6]=a,e[7]=s.href,e[8]=i,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==i?(r=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=r):r=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==a||e[22]!==r||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:r,className:a,children:[l,c]}),e[21]=a,e[22]=r,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function Ao(){const t=S.c(4),e=z();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function ht(t){const e=S.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:a}=t,r=z(),l=a?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==i?(u=n.jsx(Ee,{url:i,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=i,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==s?.name?(m=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(Ao,{}),e[10]=o,e[11]=p):p=e[11];let x;e[12]!==f||e[13]!==p?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let g;e[17]!==b||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[17]=b,e[18]=x,e[19]=g):g=e[19];let v;e[20]!==r||e[21]!==s?(v=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=v):v=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(tn,{size:14}),e[23]=j):j=e[23];let y;e[24]!==v?(y=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[24]=v,e[25]=y):y=e[25];let k;e[26]!==r?(k=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(at,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let w;e[30]!==y||e[31]!==N?(w=n.jsx(en,{delayDuration:300,children:n.jsxs(rt,{children:[y,N]})}),e[30]=y,e[31]=N,e[32]=w):w=e[32];let _;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==u?(_=n.jsxs("div",{className:c,children:[u,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=u,e[37]=_):_=e[37],_}function bt(t){const e=S.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:a}=t,r=z(),l=a?"size-8":"size-7",c=a?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=O("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==i.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==i.theme||e[9]!==o?(k=N=>{const{value:w,icon:_,label:$}=N;return n.jsx("button",{type:"button","aria-label":$,onClick:()=>o(C=>({...C,theme:w})),className:O(l,"rounded-lg flex items-center justify-center transition-colors",i.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},w)},e[7]=l,e[8]=i.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==i.enableSounds||e[14]!==r?(f=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(Oo),e[16]=o,e[17]=p):p=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==x?(h=O(l,"rounded-lg flex items-center justify-center transition-colors",x),e[18]=l,e[19]=x,e[20]=h):h=e[20];let b;e[21]!==i.enableSounds?(b=i.enableSounds?n.jsx(an,{size:14}):n.jsx(rn,{size:14}),e[21]=i.enableSounds,e[22]=b):b=e[22];let g;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(g=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=g):g=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.407.1"]}),e[28]=v):v=e[28];let j;e[29]!==g?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[g,v]}),e[29]=g,e[30]=j):j=e[30];let y;return e[31]!==j||e[32]!==d||e[33]!==m?(y=n.jsxs("div",{className:d,children:[m,j]}),e[31]=j,e[32]=d,e[33]=m,e[34]=y):y=e[34],y}function Oo(t){return{...t,enableSounds:!t.enableSounds}}function jt(t){const e=S.c(54),{user:s,userImage:i,menuItems:o,signOutItem:a,stopImpersonatingItem:r,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let y;e[0]!==l||e[1]!==s||e[2]!==i?(y=n.jsx(ht,{user:s,userImage:i,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=i,e[3]=y):y=e[3];let k;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=R=>n.jsx(ye,{item:R,onClose:m},R.key),e[7]=m,e[8]=I):I=e[8],k=o.map(I),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==r?(N=r&&n.jsx(ye,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=N):N=e[11];let w;e[12]!==m||e[13]!==a?(w=n.jsx(ye,{item:a,onClose:m}),e[12]=m,e[13]=a,e[14]=w):w=e[14];let _;e[15]!==k||e[16]!==N||e[17]!==w?(_=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[k,N,w]})}),e[15]=k,e[16]=N,e[17]=w,e[18]=_):_=e[18];let $;e[19]!==d||e[20]!==u||e[21]!==c?($=n.jsx(bt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=$):$=e[22];let C;return e[23]!==y||e[24]!==_||e[25]!==$?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,_,$]}),e[23]=y,e[24]=_,e[25]=$,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==i?(p=n.jsx(ht,{user:s,userImage:i,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=i,e[30]=p):p=e[30];let x;if(e[31]!==m||e[32]!==o){let y;e[34]!==m?(y=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=y):y=e[35],x=o.map(y),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==m||e[37]!==r?(h=r&&n.jsx(ye,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==a?(b=n.jsx(ye,{item:a,onClose:m}),e[39]=m,e[40]=a,e[41]=b):b=e[41];let g;e[42]!==x||e[43]!==h||e[44]!==b?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,b]}),e[42]=x,e[43]=h,e[44]=b,e[45]=g):g=e[45];let v;e[46]!==d||e[47]!==u||e[48]!==c?(v=n.jsx(bt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=v):v=e[49];let j;return e[50]!==p||e[51]!==g||e[52]!==v?(j=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,g,v]})}),e[50]=p,e[51]=g,e[52]=v,e[53]=j):j=e[53],j}function Ze(){const t=S.c(107),e=z(),{data:s}=ee.useSession(),{org:i}=B(),o=we();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org",shouldThrow:!1},t[0]=a):a=t[0];const l=gs(a)?.params.org,[c,d]=wt(),u=st(),{isAdmin:m}=Nn(),f=wn(),[p,x]=T.useState(!1),[h,b]=T.useState(!1),g=s?.user,v=g?.image,j=!!s?.session?.impersonatedBy;let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),t[1]=y):y=t[1];const k=y;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Bt,{size:16}),t[4]=w):w=t[4];let _;t[5]!==o||t[6]!==l?(_=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=_):_=t[7];let $;t[8]!==N||t[9]!==_?($={key:"preferences",label:N,icon:w,onClick:_},t[8]=N,t[9]=_,t[10]=$):$=t[10];let C;t[11]!==i||t[12]!==o?(C=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(Ft,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=C):C=t[13];let I;t[14]!==f||t[15]!==e?(I=(_n()||pt())&&!f?[{key:"install-desktop-app",label:pt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(sn,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=I):I=t[16];let R;t[17]!==e?(R=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=R):R=t[18];let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(on,{size:16}),t[19]=Q):Q=t[19];let A;t[20]!==R?(A={key:"terms",label:R,icon:Q,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=R,t[21]=A):A=t[21];let E;t[22]!==e?(E=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=E):E=t[23];let K;t[24]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(hs,{size:16}),t[24]=K):K=t[24];let L;t[25]!==E?(L={key:"privacy",label:E,icon:K,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=E,t[26]=L):L=t[26];let J;t[27]!==e?(J=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=J):J=t[28];let U;t[29]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(bs,{className:"w-4 h-4"}),t[29]=U):U=t[29];let W;t[30]!==J?(W={key:"github",label:J,icon:U,href:"https://github.com/decocms/studio",external:!0},t[30]=J,t[31]=W):W=t[31];let X;t[32]!==e?(X=e("common.accountPopover.community"),t[32]=e,t[33]=X):X=t[33];let se;t[34]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Qe,{size:16}),t[34]=se):se=t[34];let Y;t[35]!==X?(Y={key:"community",label:X,icon:se,href:"https://decocms.com/discord",external:!0},t[35]=X,t[36]=Y):Y=t[36];let H;t[37]!==e?(H=e("common.accountPopover.homepage"),t[37]=e,t[38]=H):H=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(bn,{size:16}),t[39]=me):me=t[39];let F;t[40]!==H?(F={key:"homepage",label:H,icon:me,href:"https://decocms.com",external:!0},t[40]=H,t[41]=F):F=t[41];let G;t[42]!==m||t[43]!==o||t[44]!==e?(G=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(nn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=G):G=t[45];let ae;t[46]!==A||t[47]!==L||t[48]!==W||t[49]!==Y||t[50]!==F||t[51]!==G||t[52]!==$||t[53]!==C||t[54]!==I?(ae=[$,...C,...I,A,L,W,Y,F,...G],t[46]=A,t[47]=L,t[48]=W,t[49]=Y,t[50]=F,t[51]=G,t[52]=$,t[53]=C,t[54]=I,t[55]=ae):ae=t[55];const Se=ae;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let ne;t[58]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Xe,{size:16}),t[58]=ne):ne=t[58];let P;t[59]!==Z?(P={key:"logout",label:Z,icon:ne,onClick:Do},t[59]=Z,t[60]=P):P=t[60];const M=P;let _e;t[61]!==j||t[62]!==e?(_e=j?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Xe,{size:16}),onClick:async()=>{const{error:ft}=await ee.admin.stopImpersonating();if(ft){re.error(ft.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=j,t[62]=e,t[63]=_e):_e=t[63];const We=_e;let $e;t[64]===Symbol.for("react.memo_cache_sentinel")?($e=n.jsx(vn,{size:14}),t[64]=$e):$e=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:$e,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Ce;t[69]===Symbol.for("react.memo_cache_sentinel")?(Ce=n.jsx(yn,{size:14}),t[69]=Ce):Ce=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Ce,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let Pe;t[74]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(qt,{size:14}),t[74]=Pe):Pe=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:Pe,label:he},t[77]=he,t[78]=be):be=t[78];let Ie;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ie=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ie):Ie=t[82];const He=Ie;let ze;t[83]!==j||t[84]!==u||t[85]!==Se||t[86]!==c||t[87]!==d||t[88]!==M||t[89]!==We||t[90]!==He||t[91]!==g||t[92]!==v?(ze={user:g,userImage:v,menuItems:Se,signOutItem:M,stopImpersonatingItem:We,isImpersonating:j,themeOptions:He,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=j,t[84]=u,t[85]=Se,t[86]=c,t[87]=d,t[88]=M,t[89]=We,t[90]=He,t[91]=g,t[92]=v,t[93]=ze):ze=t[93];const Te=ze;let je;t[94]!==j||t[95]!==u||t[96]!==p||t[97]!==Te||t[98]!==e||t[99]!==g?.name||t[100]!==v?(je=u?n.jsxs(Ot,{open:p,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",j&&"border-2 border-dashed border-warning"),children:[n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Rt,{className:"h-[80dvh] p-0",children:[n.jsx(Dt,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(jt,{...Te})]})]}):n.jsxs(nt,{open:p,onOpenChange:x,children:[n.jsx(Ue,{asChild:!0,children:n.jsxs(le,{"data-tour":te.account,tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:O(j&&"border-2 border-dashed border-warning"),children:[n.jsx(ut,{children:n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(ot,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ro,children:n.jsx(jt,{...Te})})]}),t[94]=j,t[95]=u,t[96]=p,t[97]=Te,t[98]=e,t[99]=g?.name,t[100]=v,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx($n,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let Ae;return t[104]!==je||t[105]!==ve?(Ae=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=Ae):Ae=t[106],Ae}function Ro(t){return t.preventDefault()}function Do(){V("signed_out",{source:"account_popover"}),_t(),ee.signOut()}class Mo extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Eo(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Lo(){const t=S.c(17),e=we(),{org:s}=B(),{hasDecoKey:i,balanceDollars:o}=In();if(!i)return null;let a;t[0]!==o?(a=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=a):a=t[1];let r;t[2]!==o?(r=O(o!=null&&Eo(o)),t[2]=o,t[3]=r):r=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ln,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==a||t[13]!==r||t[14]!==l||t[15]!==u?(m=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:a,className:r,onClick:l,children:[c,u]})})}),t[12]=a,t[13]=r,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Fo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},qo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Bo(){const t=S.c(40),e=z(),s=ie(),i=we(),{org:o}=B(),{data:a}=Vt();if(!a?.usage||!a.features.chat)return null;let r,l;if(t[0]!==a.usage.percent?(r=Math.round(a.usage.percent*100),l=Number.isFinite(r),t[0]=a.usage.percent,t[1]=r,t[2]=l):(r=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,r)),d=a.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==i||t[6]!==o.slug?(f=()=>i({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=i,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let x;t[8]!==p?(x=O(p),t[8]=p,t[9]=x):x=t[9];let h;t[10]!==a.plan.id||t[11]!==a.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Ko,{percent:c,state:a.usage.state}):n.jsx(Vo,{planId:a.plan.id}),t[10]=a.plan.id,t[11]=a.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==x||t[16]!==h?(b=n.jsx(ut,{className:x,children:h}),t[15]=x,t[16]=h,t[17]=b):b=t[17];let g;t[18]!==a.plan.name?(g=n.jsx("span",{className:"truncate font-medium",children:a.plan.name}),t[18]=a.plan.name,t[19]=g):g=t[19];let v;t[20]!==c?(v=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==g?(j=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[g,v]}),t[22]=v,t[23]=g,t[24]=j):j=t[24];const y=qo[a.usage.state];let k;t[25]!==y?(k=O("block h-full rounded-full",y),t[25]=y,t[26]=k):k=t[26];const N=`${c}%`;let w;t[27]!==N?(w={width:N},t[27]=N,t[28]=w):w=t[28];let _;t[29]!==k||t[30]!==w?(_=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:w})}),t[29]=k,t[30]=w,t[31]=_):_=t[31];let $;t[32]!==j||t[33]!==_?($=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[j,_]}),t[32]=j,t[33]=_,t[34]=$):$=t[34];let C;return t[35]!==$||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,$]})})}),t[35]=$,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Vo(t){const e=S.c(6),{planId:s}=t,{data:i}=Tn();let o;e[0]!==s||e[1]!==i?(o=i?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=i,e[2]=o):o=e[2];const a=o;if(a<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Mt,{className:qe}),e[3]=l):l=e[3],l}let r;return e[4]!==a?(r=n.jsx(An,{index:a,className:qe}),e[4]=a,e[5]=r):r=e[5],r}function Ko(t){const e=S.c(5),{percent:s,state:i}=t,o=2*Math.PI*8;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=O("-rotate-90",qe),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=r):r=e[1];const l=Fo[i],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:a,"aria-hidden":"true",children:[r,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Uo(){return zn()?n.jsx(Bo,{}):n.jsx(Lo,{})}function vt(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Mo,{children:n.jsx(T.Suspense,{fallback:null,children:n.jsx(Uo,{})})}),t[0]=e):e=t[0],e}const Wo=6e4;function Ho(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Go(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const l=r.notifications.filter(c=>s&&!s.has(c.id)?!0:(i++,!1));return{...r,notifications:l}}),a=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:a}))}}function Qo(t,e){const s=S.c(4),{data:i}=ee.useSession(),o=i?.user?.id;let a;s[0]!==e||s[1]!==t||s[2]!==o?(a=r=>!t||!o?Yo:Mn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=a):a=s[3],T.useSyncExternalStore(a,Xo,Jo)}function Jo(){return 0}function Xo(){return 0}function Yo(){}function Xt(){const t=S.c(37),{locator:e,org:s}=B(),i=$t(),o=Ct();let a;t[0]!==e?(a=Me.notifications(e),t[0]=e,t[1]=a):a=t[1];const r=a;let l;t[2]!==i?(l=_=>{const{pageParam:$}=_;return Ho(i,$)},t[2]=i,t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==l?(c={queryKey:r,queryFn:l,initialPageParam:void 0,getNextPageParam:ti,refetchInterval:Wo},t[4]=r,t[5]=l,t[6]=c):c=t[6];const d=Dn(c);let u;t[7]!==o||t[8]!==r?(u=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=u):u=t[9],Qo(s.slug,u);let m;t[10]!==i?(m=_=>i.call("NOTIFICATION_MARK_READ",_?{ids:_}:{}),t[10]=i,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==r?(f=async _=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,$=>Go($,_))},p=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let x;t[16]!==m||t[17]!==f||t[18]!==p?(x={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=x):x=t[19];const h=js(x);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const g=b;let v;t[22]!==g?(v=g.flatMap(Zo),t[22]=g,t[23]=v):v=t[23];const j=g[0]?.unreadCount??0;let y;t[24]!==d?(y=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=y):y=t[25];let k,N;t[26]!==h?(k=()=>h.mutate(null),N=_=>h.mutate([_]),t[26]=h,t[27]=k,t[28]=N):(k=t[27],N=t[28]);let w;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==j||t[32]!==y||t[33]!==k||t[34]!==N||t[35]!==v?(w={updates:v,redDotCount:j,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:y,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=j,t[32]=y,t[33]=k,t[34]=N,t[35]=v,t[36]=w):w=t[36],w}function Zo(t){return t.notifications.map(ei)}function ei(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function ti(t){return t.nextCursor??void 0}function si(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function ni(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function oi(t){const e=S.c(36),{update:s,orgSlug:i,onSelect:o}=t,a=z();let r;e[0]!==i||e[1]!==s.taskKeySeq?(r=Kt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const l=r,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(En,{size:24}):n.jsx(Ee,{url:s.actorImage??void 0,fallback:Un(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=Wn(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let x;e[16]!==l?(x=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=x):x=e[17];let h;e[18]!==s.action?(h=O(si(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==a||e[21]!==s?(b=ni(s,a),e[20]=a,e[21]=s,e[22]=b):b=e[22];let g;e[23]!==h||e[24]!==b?(g=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=g):g=e[25];let v;e[26]!==g||e[27]!==x?(v=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=v):v=e[28];let j;e[29]!==v||e[30]!==p?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,v]}),e[29]=v,e[30]=p,e[31]=j):j=e[31];let y;return e[32]!==o||e[33]!==j||e[34]!==d?(y=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,j]}),e[32]=o,e[33]=j,e[34]=d,e[35]=y):y=e[35],y}function ii(t){const e=S.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const a=new IntersectionObserver(r=>{r.some(ai)&&s()});return a.observe(o),()=>a.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function ai(t){return t.isIntersecting}function ri(t){const e=S.c(23),{onClose:s}=t,i=z(),o=we(),{org:a}=B(),{updates:r,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Xt();let m;e[0]!==i?(m=i("sidebar.inbox.title"),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==i||e[6]!==r.length?(p=r.length>0&&n.jsx(De,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:i("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=i,e[6]=r.length,e[7]=p):p=e[7];let x;e[8]!==f||e[9]!==p?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=x):x=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==a||e[17]!==i||e[18]!==r?(h=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(lt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Rn,{className:"min-h-0 flex-1",children:[r.map(g=>{const v=Kt(a.slug,g.taskKeySeq);return n.jsx(oi,{update:g,orgSlug:a.slug,onSelect:()=>{c(g.id),s(),v&&o({to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:v}})}},g.id)}),d&&n.jsx(ii,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=a,e[17]=i,e[18]=r,e[19]=h):h=e[19];let b;return e[20]!==x||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=b):b=e[22],b}function Yt(){const t=S.c(1),{redDotCount:e}=Xt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Zt(t){const e=S.c(10),{open:s,onOpenChange:i,children:o}=t;let a;e[0]!==i||e[1]!==s?(a=s&&n.jsx(ri,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let r;e[3]!==a?(r=n.jsx(ot,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:a}),e[3]=a,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==i||e[7]!==s||e[8]!==r?(l=n.jsxs(nt,{open:s,onOpenChange:i,children:[o,r]}),e[5]=o,e[6]=i,e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function es(){const t=S.c(9),e=z(),[s,i]=T.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let a,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(lt,{size:15}),r=n.jsx(Yt,{}),t[2]=a,t[3]=r):(a=t[2],r=t[3]);let l;t[4]!==o?(l=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[a,r]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(Zt,{open:s,onOpenChange:i,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function li(){const t=S.c(15),e=z(),[s,i]=T.useState(!1),o=ie();let a;t[0]!==o||t[1]!==e?(a=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=a):a=t[2];let r,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(lt,{}),l=n.jsx(Yt,{}),t[3]=r,t[4]=l):(r=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let u;t[9]!==a||t[10]!==d?(u=n.jsx(Ue,{asChild:!0,children:n.jsxs(le,{tooltip:a,className:"relative",children:[r,l,d]})}),t[9]=a,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(Zt,{open:s,onOpenChange:i,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function yt(){const t=S.c(10),e=z();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ut,{children:n.jsx(cn,{className:qe})}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let a;t[5]!==o?(a=n.jsx("span",{children:o}),t[5]=o,t[6]=a):a=t[6];let r;return t[7]!==s||t[8]!==a?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsx(Cn,{trigger:n.jsxs(le,{tooltip:s,children:[i,a]})})})}),t[7]=s,t[8]=a,t[9]=r):r=t[9],r}function ci(){const t=S.c(13),e=ie(),i=!On();if(e){let c;t[0]!==i?(c=i&&n.jsx(vt,{}),t[0]=i,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(yt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(oe,{children:n.jsx(li,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(q,{children:[u,n.jsx(oe,{children:n.jsx(Ze,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Je,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==i?(o=i&&n.jsx(vt,{}),t[7]=i,t[8]=o):o=t[8];let a;t[9]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(yt,{}),t[9]=a):a=t[9];let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Ze,{})}),n.jsx(es,{})]})})}),t[10]=r):r=t[10];let l;return t[11]!==o?(l=n.jsxs(Je,{className:"px-2 pb-3 gap-0.5",children:[o,a,r]}),t[11]=o,t[12]=l):l=t[12],l}function di(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Je,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(q,{children:n.jsx(oe,{children:n.jsx(Ze,{})})})}),n.jsx(es,{})]})}),t[0]=e):e=t[0],e}function ui(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function mt(t){const e=S.c(13),{org:s,size:i}=t,o=i===void 0?"sm":i,a=o==="xs"?"size-5":"size-6",r=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==a?(l=O(a,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ui(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:O("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function mi({invitation:t,onChanged:e}){const s=z(),[i,o]=T.useState(!1),a=t.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{o(!0);try{const d=await ee.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:a})),vs();let c;try{c=(await ee.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await ee.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(mt,{org:{name:a},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:a}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(De,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:i,children:s("header.orgSwitcher.accept")}),n.jsx(De,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:i,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:a}),children:n.jsx(Yn,{size:14})})]})]})}function ts(){const t=T.useContext(ys),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function fi(t){const e=S.c(13),s=t.trim(),{data:i}=ee.useSession(),o=i?.user?.id??"",a=s.length>0&&!!o,r=Me.projectSearch(o,s);let l;e[0]!==s?(l=async g=>{const{signal:v}=g,j=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:v});if(!j.ok)throw new Error(`Project search failed: ${j.status}`);return await j.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==a||e[3]!==r||e[4]!==l?(c={queryKey:r,queryFn:l,enabled:a,placeholderData:ks,staleTime:3e4,retry:!1},e[2]=a,e[3]=r,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=et(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const x=a&&u,h=a&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==x||e[11]!==h?(b={hits:p,isSearching:x,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=x,e[11]=h,e[12]=b):b=e[12],b}function kt(t){const e=S.c(15),{id:s,label:i,createLabel:o,onCreate:a}=t;let r;e[0]!==s||e[1]!==i?(r=n.jsx("span",{id:s,className:"truncate",children:i}),e[0]=s,e[1]=i,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ht,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==a?(c=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-lg p-1 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",onClick:a,children:l})}),e[4]=o,e[5]=a,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(at,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(rt,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==r||e[13]!==u?(m=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,u]}),e[12]=r,e[13]=u,e[14]=m):m=e[14],m}const Be="min-h-9 items-center",ue={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function pi(t){const e=S.c(9),{active:s,rows:i}=t,o=z();let a,r,l;if(e[0]!==s||e[1]!==i||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=i.get(s);if(d?.kind!=="travel"){l=null;break e}a="border-t border-border px-3 py-2 text-xs text-warning",r=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=i,e[2]=o,e[3]=a,e[4]=r,e[5]=l}else a=e[3],r=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==a||e[7]!==r?(c=n.jsx("div",{className:a,children:r}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function xi(t){const e=S.c(25),{onClose:s,onCreateOrg:i,className:o}=t,a=z(),r=T.useId(),l=T.useId(),c=we(),{org:d}=B(),{scopeId:u,projects:m,setScope:f}=ke(),{hasMore:p}=eo(),[x,h]=T.useState(""),[b,g]=T.useState(ue.allProjects),v=T.useDeferredValue(x);let j;e[0]!==v?(j=v.trim(),e[0]=v,e[1]=j):j=e[1];const y=j,k=y.length>0,{data:N}=Ss(),{invitations:w,refetch:_}=ts();let $;e[2]!==d.slug?($=(P,M)=>P.slug===d.slug?-1:M.slug===d.slug?1:0,e[2]=d.slug,e[3]=$):$=e[3];const C=(N??[]).slice().sort($),{hits:I,isSearching:R,isStale:Q,isError:A}=fi(k?y:""),E=k?C.filter(P=>{const M=y.toLowerCase();return P.name.toLowerCase().includes(M)||P.slug.toLowerCase().includes(M)}):[],K=Ne();let L;e[4]!==K?(L=K.startsWith("/$org/settings"),e[4]=K,e[5]=L):L=e[5];const J=L,U=new Map;let W;e[6]!==J||e[7]!==s||e[8]!==f?(W=P=>{V("scope_set",{scoped:P!==null,fromSettings:J}),f(P),s()},e[6]=J,e[7]=s,e[8]=f,e[9]=W):W=e[9];const X=W;let se;e[10]!==c||e[11]!==s?(se=(P,M)=>{V("org_project_travel",{scoped:!!M}),c(M?{to:"/$org/projects/$agentId",params:{org:P,agentId:M}}:{to:"/$org/home",params:{org:P}}),s()},e[10]=c,e[11]=s,e[12]=se):se=e[12];const Y=se;let H;e[13]!==c||e[14]!==s||e[15]!==d.slug?(H=()=>{V("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=H):H=e[16];const me=H;U.set(ue.allProjects,{kind:"scope",label:a("sidebar.scope.allProjects")});let F;e[17]!==a?(F=a("sidebar.picker.searchPlaceholder"),e[17]=a,e[18]=F):F=e[18];let G;e[19]!==x||e[20]!==F?(G=n.jsx(Jn,{value:x,onValueChange:h,placeholder:F}),e[19]=x,e[20]=F,e[21]=G):G=e[21];const ae=Gn,Se="max-h-none min-h-0 flex-1",Z=k?n.jsxs(n.Fragment,{children:[A&&n.jsx(xt,{children:a("sidebar.picker.searchFailed")}),!A&&!R&&I.length===0&&E.length===0&&n.jsx(xt,{children:a("sidebar.picker.noMatches",{query:y})}),!A&&I.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.projectsHeading"),className:O(Q&&"opacity-50"),children:I.map(P=>n.jsx(gi,{hit:P,currentOrgSlug:d.slug,scopeId:u,rows:U,onScope:X,onTravel:Y},`${P.orgSlug}:${P.id}`))}),E.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.orgsHeading"),children:E.map(P=>n.jsx(St,{candidate:P,currentOrgSlug:d.slug,rows:U,onTravel:Y,onClose:s},P.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx(kt,{id:r,label:a("sidebar.picker.projectsHeading"),createLabel:a("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Oe,{"aria-labelledby":r,children:[n.jsxs(Fe,{value:ue.allProjects,className:Be,onSelect:()=>X(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:a("sidebar.scope.allProjects")}),u===null&&n.jsx(Le,{size:14})]}),m.map(P=>{const M=ue.project(P.id);return U.set(M,{kind:"scope",label:P.title}),n.jsxs(Fe,{value:M,className:Be,onSelect:()=>X(P.id),children:[n.jsx(ct,{icon:P.icon,name:P.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.title}),u===P.id&&n.jsx(Le,{size:14})]},P.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:a("sidebar.picker.moreExist")})]}),n.jsx(kt,{id:l,label:a("sidebar.picker.orgsHeading"),createLabel:a("sidebar.picker.newOrganization"),onCreate:i}),n.jsxs(Oe,{"aria-labelledby":l,children:[w.map(P=>n.jsx(mi,{invitation:P,onChanged:_},P.id)),C.map(P=>n.jsx(St,{candidate:P,currentOrgSlug:d.slug,rows:U,onTravel:Y,onClose:s},P.id))]})]});let ne;return e[22]!==ae||e[23]!==Z?(ne=n.jsx(ae,{className:Se,children:Z}),e[22]=ae,e[23]=Z,e[24]=ne):ne=e[24],n.jsxs(Qn,{shouldFilter:!1,value:b,onValueChange:g,className:o,children:[G,ne,n.jsx(pi,{active:b,rows:U})]})}function St(t){const e=S.c(22),{candidate:s,currentOrgSlug:i,rows:o,onTravel:a,onClose:r}=t,l=s.slug===i;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=ue.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==r||e[8]!==a?(d=()=>l?r():a(s.slug),e[5]=s.slug,e[6]=l,e[7]=r,e[8]=a,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(mt,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(Le,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Fe,{value:c,className:Be,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function gi(t){const e=S.c(30),{hit:s,currentOrgSlug:i,scopeId:o,rows:a,onScope:r,onTravel:l}=t,c=s.orgSlug===i;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==a?(d=c?ue.project(s.id):ue.foreignProject(s.orgSlug,s.id),a.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=a,e[5]=d):d=e[5];let u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==r||e[10]!==l?(u=()=>c?r(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=r,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ct,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let x;e[19]!==s.id||e[20]!==c||e[21]!==o?(x=c&&o===s.id&&n.jsx(Le,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=x):x=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==x||e[28]!==d?(h=n.jsxs(Fe,{value:d,className:Be,onSelect:u,children:[m,f,p,x]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=x,e[28]=d,e[29]=h):h=e[29],h}function ss(t){const e=S.c(32),{collapsed:s,onNavigate:i}=t,o=s===void 0?!1:s,a=z(),{org:r}=B(),{project:l}=ke(),{invitations:c}=ts(),[d,u]=T.useState(!1),[m,f]=T.useState(!1),p=st();let x;if(e[0]!==o||e[1]!==c.length||e[2]!==r||e[3]!==l||e[4]!==a){const _=l?a("sidebar.picker.projectInOrg",{project:l.title,org:r.name}):r.name;let $;e[6]!==r||e[7]!==l?($=l?n.jsx(dn,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(mt,{org:r,size:"sm"}),e[6]=r,e[7]=l,e[8]=$):$=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let I;e[11]!==$||e[12]!==C?(I=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[$,C]}),e[11]=$,e[12]=C,e[13]=I):I=e[13];const R=I;x=o?n.jsx(le,{tooltip:_,"data-tour":te.switcher,children:R}):n.jsxs("button",{type:"button","data-tour":te.switcher,"aria-label":a("sidebar.picker.ariaLabel",{name:_}),className:O("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Hn),children:[R,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:r.name}),n.jsx(kn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=r,e[3]=l,e[4]=a,e[5]=x}else x=e[5];const h=x,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let g;e[14]!==i?(g=()=>{u(!1),i?.()},e[14]=i,e[15]=g):g=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{u(!1),f(!0)},e[16]=v):v=e[16];let j;e[17]!==b||e[18]!==g?(j=n.jsx(xi,{onClose:g,onCreateOrg:v,className:b}),e[17]=b,e[18]=g,e[19]=j):j=e[19];const y=j;let k;e[20]!==o||e[21]!==y||e[22]!==p||e[23]!==d||e[24]!==a||e[25]!==h?(k=p?n.jsxs(Ot,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Zs,{asChild:!0,children:h}),n.jsxs(Rt,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Dt,{className:"sr-only",children:a("sidebar.picker.title")}),y]})]}):n.jsxs(nt,{open:d,onOpenChange:u,children:[n.jsx(Ue,{asChild:!0,children:h}),n.jsx(ot,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=o,e[21]=y,e[22]=p,e[23]=d,e[24]=a,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Xn,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let w;return e[29]!==k||e[30]!==N?(w=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=w):w=e[31],w}const ns=16;function hi(){const t=S.c(6),e=ie();let s;t[0]!==e?(s=n.jsx(ss,{collapsed:e}),t[0]=e,t[1]=s):s=t[1];let i,o;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ji,{}),o=n.jsx(zt,{}),t[2]=i,t[3]=o):(i=t[2],o=t[3]);let a;return t[4]!==s?(a=n.jsxs(n.Fragment,{children:[s,i,o]}),t[4]=s,t[5]=a):a=t[5],a}function bi(t){const e=S.c(13),{onClose:s}=t,i=z();let o;e[0]!==s?(o=n.jsx(ss,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex-1"}),r=n.jsx(zt,{}),e[2]=a,e[3]=r):(a=e[2],r=e[3]);let l;e[4]!==i?(l=i("sidebar.header.closeSidebar"),e[4]=i,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ut,{size:ns}),e[6]=c):c=e[6];let d;e[7]!==s||e[8]!==l?(d=n.jsx(Wt,{onClick:s,"aria-label":l,children:c}),e[7]=s,e[8]=l,e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==d?(u=n.jsxs(n.Fragment,{children:[o,a,r,d]}),e[10]=o,e[11]=d,e[12]=u):u=e[12],u}function ji(){const t=S.c(13),e=z(),s=ie(),{toggleSidebar:i}=Ve(),o=s?"page.expandSidebar":"page.collapseSidebar";let a;t[0]!==e||t[1]!==o?(a=e(o),t[0]=e,t[1]=o,t[2]=a):a=t[2];const r=a;let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ut,{size:ns}),t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==i?(c=n.jsx(it,{asChild:!0,children:n.jsx(Wt,{"aria-label":r,onClick:i,className:"shrink-0 group-data-[state=collapsed]/sidebar:mx-auto size-7 group-data-[state=collapsed]/sidebar:size-8",children:l})}),t[4]=r,t[5]=i,t[6]=c):c=t[6];const d=!s;let u;t[7]!==r||t[8]!==d?(u=n.jsx(at,{side:"right",hidden:d,children:r}),t[7]=r,t[8]=d,t[9]=u):u=t[9];let m;return t[10]!==c||t[11]!==u?(m=n.jsxs(rt,{children:[c,u]}),t[10]=c,t[11]=u,t[12]=m):m=t[12],m}function ce(t){const e=S.c(33),{icon:s,label:i,isActive:o,link:a,onSelect:r,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=ie(),x=l??i,h=p?x:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const g=b;let v;e[5]!==m?(v=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=v):v=e[6];let j;e[7]!==i?(j=n.jsx("span",{className:"truncate",children:i}),e[7]=i,e[8]=j):j=e[8];let y;e[9]!==s||e[10]!==v||e[11]!==j?(y=n.jsxs(n.Fragment,{children:[s,v,j]}),e[9]=s,e[10]=v,e[11]=j,e[12]=y):y=e[12];const k=y;if(a){const _=f?"page":void 0;let $;e[13]!==k||e[14]!==a||e[15]!==x||e[16]!==r||e[17]!==_?($=n.jsx(Pt,{...a,"aria-label":x,"aria-current":_,onClick:r,children:k}),e[13]=k,e[14]=a,e[15]=x,e[16]=r,e[17]=_,e[18]=$):$=e[18];let C;e[19]!==g||e[20]!==$?(C=n.jsx(le,{asChild:!0,...g,children:$}),e[19]=g,e[20]=$,e[21]=C):C=e[21];let I;return e[22]!==u||e[23]!==C?(I=n.jsxs(oe,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=I):I=e[24],I}let N;e[25]!==k||e[26]!==x||e[27]!==r||e[28]!==g?(N=n.jsx(le,{...g,"aria-label":x,onClick:r,children:k}),e[25]=k,e[26]=x,e[27]=r,e[28]=g,e[29]=N):N=e[29];let w;return e[30]!==u||e[31]!==N?(w=n.jsxs(oe,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=w):w=e[32],w}function os(t){const e=S.c(5),{label:s,link:i,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(to,{size:16}),e[0]=a):a=e[0];let r;return e[1]!==s||e[2]!==i||e[3]!==o?(r=n.jsx("div",{className:"contents",children:n.jsx(q,{className:"shrink-0",children:n.jsx(ce,{icon:a,label:s,className:"text-sidebar-foreground/70",link:i,onSelect:o})})}),e[1]=s,e[2]=i,e[3]=o,e[4]=r):r=e[4],r}function vi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Tt(t)?"cms":null}function is(){const t=S.c(2),{data:e}=Vt();let s;return t[0]!==e?(s=i=>{const o=vi(i);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const yi="settings",ki=["overview","reports","board","files","threadAnalytics"];function Si(t,e){return!t||!e?!1:!At(e.metadata)}function Ni(t,e,s,i){if(!t||!e)return!0;const o=i!==void 0;return no(o?i:Gt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function wi(){const t=S.c(17),e=z(),{org:s}=B(),i=Ne(),o=Ke(),{project:a,repo:r}=ke(),l=Qt(a?.id),c=so().data?.isAdmin===!0;let d;t[0]!==a||t[1]!==o?(d=Si(o,a),t[0]=a,t[1]=o,t[2]=d):d=t[2];const u=d;let m;t[3]!==l||t[4]!==a||t[5]!==o?(m=x=>Ni(o,a,x,l),t[3]=l,t[4]=a,t[5]=o,t[6]=m):m=t[6];const f=m;let p;if(t[7]!==f||t[8]!==c||t[9]!==u||t[10]!==i||t[11]!==s||t[12]!==a?.id||t[13]!==r||t[14]!==o||t[15]!==e){const x={overview:u||!f("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(mn,{size:16}),isActive:i===D.home||i===D.orgIndex||i===de.root||i===`${de.root}/`,trackAs:"overview",link:o?{to:de.root,params:{org:s.slug,agentId:o}}:{to:D.home,params:{org:s.slug}}},reports:Re(D.reports,o)&&!u&&f("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Lt,{size:16}),isActive:i===D.reports||i===de.reports,trackAs:"reports",link:o?{to:de.reports,params:{org:s.slug,agentId:o}}:{to:D.reports,params:{org:s.slug}}}:null,board:u||!f("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Et,{size:16}),isActive:i===D.tasks||i===de.tasks,trackAs:"board",dataTour:te.tasks,link:{to:o?de.tasks:D.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:h=>{const b=r??a?.id;return b?{...h,repo:b}:h}}},files:Re(D.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(jn,{size:16}),isActive:i===D.library,trackAs:"files",link:{to:D.library,params:{org:s.slug}}}:null,threadAnalytics:c&&Re(D.threadAnalytics,o)?{key:"threadAnalytics",label:e("sidebar.navDestinations.threadAnalytics"),icon:n.jsx(un,{size:16}),isActive:i===D.threadAnalytics,trackAs:"thread_analytics",link:{to:D.threadAnalytics,params:{org:s.slug}}}:null};p=ki.map(h=>x[h]).filter(_i),t[7]=f,t[8]=c,t[9]=u,t[10]=i,t[11]=s,t[12]=a?.id,t[13]=r,t[14]=o,t[15]=e,t[16]=p}else p=t[16];return p}function _i(t){return t!==null}function $i(t){const e=S.c(9),{onNavigate:s}=t,i=wi(),o=is();let a;if(e[0]!==i||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ce,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],a=i.map(l),e[0]=i,e[1]=o,e[2]=s,e[3]=a}else a=e[3];let r;return e[7]!==a?(r=n.jsx(q,{className:"gap-1",children:a}),e[7]=a,e[8]=r):r=e[8],r}function Ci(t){const e=S.c(18),{onNavigate:s}=t,i=z(),{org:o}=B(),a=Ke(),r=dt(),l=Ne(),c=Ns();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(D.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==i?(m=i("sidebar.navDestinations.settings"),e[3]=i,e[4]=m):m=e[4];const f=m;let p;e[5]!==o||e[6]!==a?(p=a?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=a,e[7]=p):p=e[7];const x=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==r||e[10]!==s||e[11]!==a?(b=()=>{V("nav_destination_clicked",{destination:yi,target:a?"project":"org"}),a&&r(a,{panel:"settings"}),s?.()},e[9]=r,e[10]=s,e[11]=a,e[12]=b):b=e[12];let g;return e[13]!==u||e[14]!==f||e[15]!==x||e[16]!==b?(g=n.jsx(q,{className:"gap-1",children:n.jsx(ce,{dataTour:te.settings,icon:h,label:f,isActive:u,link:x,onSelect:b})}),e[13]=u,e[14]=f,e[15]=x,e[16]=b,e[17]=g):g=e[17],g}function Pi(t,e){const s=new Set(e);return s.size===0?t:t.filter(i=>s.has(i.connectionId))}function Ii(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function zi(t){const e=S.c(13),{onNavigate:s}=t,i=z(),{project:o}=ke(),a=dt(),r=Ne(),l=co(),c=oo(o),d=is(),u=Qt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const x=At(o.metadata),h=u??Gt(o.metadata);m=new Set(io(h,ao(x,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==r||e[7]!==a||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==i){const x=[];f.has("site-editor")&&x.push({key:"site-editor",label:i("sidebar.projectNav.siteEditor"),icon:n.jsx(qt,{size:16}),panel:"site-editor",isActive:Oi,dataTour:te.siteEditor});const h={assets:{label:i("common.mainPanelTabs.assets"),icon:n.jsx(lo,{size:16})},hosting:{label:i("common.mainPanelTabs.hosting"),icon:n.jsx(_s,{size:16})},e2e:{label:i("common.mainPanelTabs.e2e"),icon:n.jsx(xn,{size:16})},analytics:{label:i("common.mainPanelTabs.analytics"),icon:n.jsx(Lt,{size:16})},cdn:{label:i("common.mainPanelTabs.cdn"),icon:n.jsx(pn,{size:16})},experiments:{label:i("experiments.title"),icon:n.jsx(fn,{size:16})}};for(const g of ro){if(!f.has(g))continue;const v=h[g];x.push({key:g,label:v.label,icon:v.icon,panel:g,isActive:j=>j===g})}for(const g of Pi(Ii(o),(o.connections??[]).map(Ai))){if(g.toolName==="fetch_assets")continue;const v=ws(g.connectionId,g.toolName),j=uo({tabId:v,kind:"expanded",iconUrl:g.icon,connections:[]});x.push({key:`pinned:${g.connectionId}:${g.toolName}`,label:g.label||g.toolName,icon:j.kind==="fallback"?n.jsx(Zn,{size:16}):n.jsx(mo,{icon:j}),panel:v,isActive:y=>y===v})}f.has("automations")&&x.push({key:"automations",label:i("sidebar.projectNav.automations"),icon:n.jsx(Mt,{size:16}),panel:"automations",isActive:Ti,dataTour:te.automations});const b=r.startsWith(D.projects);p=n.jsx(q,{className:"gap-1",children:x.map(g=>n.jsx(ce,{icon:g.icon,label:g.label,dataTour:g.dataTour,isActive:b&&g.isActive(l),trailing:d(g.panel)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("project_nav_clicked",{surface:g.key}),a(o.id,{panel:g.panel}),s?.()}},g.key))}),e[4]=l,e[5]=d,e[6]=r,e[7]=a,e[8]=s,e[9]=o,e[10]=f,e[11]=i,e[12]=p}else p=e[12];return p}function Ti(t){return t==="automations"||$s(t)!==null}function Ai(t){return t.connection_id}function Oi(t){return!!t&&Tt(t)}const Ri=3;function Di(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Bn(t)||Vn(t)}function Mi(t,e,s){const i=new Map;for(const a of e){if(!Di(a,s))continue;const r=Fn(a,t);for(const l of r){const c=i.get(l.id)??[];c.push({task:a,only:r.length===1}),i.set(l.id,c)}}const o=new Map;for(const[a,r]of i)r.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(a,r.slice(0,Ri).map(l=>l.task));return o}function Ei(t){const e=S.c(21),{task:s,orgSlug:i,isLast:o,onNavigate:a}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=r):r=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s?(c=qn(i,s),e[3]=i,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==i||e[7]!==c?(d={org:i,taskKey:c},e[6]=i,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==a||e[10]!==s.status?(u=()=>{V("sidebar_attention_task_clicked",{status:s.status}),a?.()},e[9]=a,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Pt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[r,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Li(t){const e=S.c(42),{onNavigate:s}=t,i=z(),o=ie(),[a,r]=T.useState(!1),{granted:l}=Cs("agents:manage"),{org:c,locator:d}=B(),u=$t(),{projects:m}=ke(),f=Ke(),p=dt(),{data:x}=ee.useSession();let h;e[0]!==d||e[1]!==u?(h=Kn(d,u),e[0]=d,e[1]=u,e[2]=h):h=e[2];const b=!o&&!f;let g;e[3]!==h||e[4]!==b?(g={...h,enabled:b},e[3]=h,e[4]=b,e[5]=g):g=e[5];const{data:v}=et(g);if(f||m.length===0&&!l)return null;let j,y,k,N,w,_;if(e[6]!==o||e[7]!==v?.items||e[8]!==p||e[9]!==s||e[10]!==c||e[11]!==m||e[12]!==f||e[13]!==x?.user?.id||e[14]!==i){const Q=Mi(Ln(m),v?.items??[],x?.user?.id);N="flex flex-col gap-2",w=te.projects,e[21]!==o||e[22]!==i?(_=!o&&n.jsx("p",{className:"px-2 text-xs font-medium text-muted-foreground",children:i("sidebar.projects.heading")}),e[21]=o,e[22]=i,e[23]=_):_=e[23],j=q,y="gap-1",k=m.map(A=>{const E=Q.get(A.id)??[];return n.jsx(ce,{icon:n.jsx(ct,{icon:A.icon,name:A.title}),label:A.title,isActive:A.id===f,onSelect:()=>{V("sidebar_project_clicked"),p(A.id,{panel:Ps(A.metadata?.ui?.layout)}),s?.()},children:!o&&E.length>0&&n.jsx("ul",{className:"flex flex-col",children:E.map((K,L)=>n.jsx(Ei,{task:K,orgSlug:c.slug,isLast:L===E.length-1,onNavigate:s},K.id))})},A.id)}),e[6]=o,e[7]=v?.items,e[8]=p,e[9]=s,e[10]=c,e[11]=m,e[12]=f,e[13]=x?.user?.id,e[14]=i,e[15]=j,e[16]=y,e[17]=k,e[18]=N,e[19]=w,e[20]=_}else j=e[15],y=e[16],k=e[17],N=e[18],w=e[19],_=e[20];let $;e[24]!==l||e[25]!==i?($=l&&n.jsx(ce,{icon:n.jsx(Ht,{size:16}),label:i("sidebar.projects.addProject"),onSelect:()=>r(!0)}),e[24]=l,e[25]=i,e[26]=$):$=e[26];let C;e[27]!==j||e[28]!==y||e[29]!==k||e[30]!==$?(C=n.jsxs(j,{className:y,children:[k,$]}),e[27]=j,e[28]=y,e[29]=k,e[30]=$,e[31]=C):C=e[31];let I;e[32]!==a||e[33]!==p||e[34]!==s?(I=a&&n.jsx(T.Suspense,{fallback:null,children:n.jsx(fo,{open:!0,onOpenChange:r,onImportComplete:Q=>{const{virtualMcpId:A}=Q;A&&p(A),s?.()}})}),e[32]=a,e[33]=p,e[34]=s,e[35]=I):I=e[35];let R;return e[36]!==C||e[37]!==I||e[38]!==N||e[39]!==w||e[40]!==_?(R=n.jsxs("div",{className:N,"data-tour":w,children:[_,C,I]}),e[36]=C,e[37]=I,e[38]=N,e[39]=w,e[40]=_,e[41]=R):R=e[41],R}function Fi(){const t=S.c(8),e=z(),{capabilities:s,isPrivileged:i,loading:o,error:a}=Is(),r=Pn().length,l=zs();let c;return t[0]!==s||t[1]!==a||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(bo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(xo,{size:14}),to:"/$org/settings/general"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(go,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(Ft,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Et,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(Ts,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(gn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(jo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(Sn,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(hn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(ho,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(As,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(tt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Os(m.group)?[]:[m]}return o||a?[m]:m.privilegedOnly?i?[m]:[]:m.requires?i||s[m.requires]?[m]:[]:[m]})})).filter(qi),t[0]=s,t[1]=a,t[2]=i,t[3]=r,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function qi(t){return t.items.length>0}function as(){const t=S.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Rs(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:Bi},t[1]=i):i=t[1];const o=Ds(i);let a;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};a=d=>[d.to,...d.group?Ms(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=a}else a=t[4];const r=a;let l;return t[5]!==r||t[6]!==s?(l={org:s,isActive:r},t[5]=r,t[6]=s,t[7]=l):l=t[7],l}function Bi(t){return t.location.pathname}function Vi(){const t=S.c(9),{isActive:e}=as();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[i,o]=T.useState(s);let a;t[1]!==e||t[2]!==i?(a=u=>i[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=i,t[3]=a):a=t[3];const r=a;let l;t[4]!==r?(l=u=>o(m=>({...m,[u.key]:!r(u)})),t[4]=r,t[5]=l):l=t[5];const c=l;let d;return t[6]!==r||t[7]!==c?(d={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=d):d=t[8],d}function Ki(t){const e=S.c(21),{group:s,open:i,onToggle:o,className:a}=t;let r,l,c,d,u;if(e[0]!==a||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==i){u=Symbol.for("react.early_return_sentinel");e:{const x=O("text-xs font-medium text-muted-foreground/60 truncate",a);if(!s.collapsible){u=n.jsx("p",{className:x,children:s.label});break e}r="button",l=o,c=i,d=O("flex w-full items-center gap-1 rounded-lg hover:text-muted-foreground",x)}e[0]=a,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=i,e[5]=r,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else r=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==i?(m=i?n.jsx(po,{size:12}):n.jsx(Es,{size:12}),e[10]=i,e[11]=m):m=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==r||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:r,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=r,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Ui(t){const e=S.c(5),{icon:s,badge:i}=t;let o;e[0]!==i?(o=i?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function rs(t){const e=S.c(24),{onNavigate:s}=t,i=ie(),o=z(),a=Fi(),{org:r,isActive:l}=as(),{isOpen:c,toggle:d}=Vi();let u;if(e[0]!==i||e[1]!==a||e[2]!==l||e[3]!==c||e[4]!==s||e[5]!==r||e[6]!==d){let b;e[8]!==i||e[9]!==l||e[10]!==c||e[11]!==s||e[12]!==r||e[13]!==d?(b=(g,v)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!i&&n.jsx(Ki,{group:g,open:c(g),onToggle:()=>d(g),className:O("px-2 pt-1.5 pb-0.5",v>0&&"mt-3")}),(i||c(g))&&n.jsx(q,{className:"gap-0.5",children:g.items.map(j=>n.jsx(ce,{icon:n.jsx(Ui,{icon:j.icon,badge:j.badge}),label:j.label,isActive:l(j),link:{to:j.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{V("settings_nav_clicked",{section_key:j.key,group_key:g.key}),s?.()}},j.key))})]},g.key),e[8]=i,e[9]=l,e[10]=c,e[11]=s,e[12]=r,e[13]=d,e[14]=b):b=e[14],u=a.map(b),e[0]=i,e[1]=a,e[2]=l,e[3]=c,e[4]=s,e[5]=r,e[6]=d,e[7]=u}else u=e[7];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 hidden"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"shrink-0",children:n.jsx(Xe,{size:14})}),e[16]=f):f=e[16];let p;e[17]!==o?(p=o("settings.nav.signOut"),e[17]=o,e[18]=p):p=e[18];let x;e[19]!==p?(x=n.jsxs("div",{className:"mt-auto flex flex-col pt-4",children:[m,n.jsx(q,{className:"gap-0.5",children:n.jsx(ce,{icon:f,label:p,className:"gap-2.5",onSelect:Wi})})]}),e[19]=p,e[20]=x):x=e[20];let h;return e[21]!==u||e[22]!==x?(h=n.jsxs(n.Fragment,{children:[u,x]}),e[21]=u,e[22]=x,e[23]=h):h=e[23],h}function Wi(){V("signed_out",{source:"settings_sidebar"}),_t(),ee.signOut()}function ls(t){const e=S.c(8),{onNavigate:s}=t,i=z(),{org:o}=B();let a;e[0]!==i?(a=i("settings.nav.backToHome"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let l;return e[4]!==s||e[5]!==a||e[6]!==r?(l=n.jsx(os,{label:a,link:r,onSelect:s}),e[4]=s,e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function cs(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.407.1"]})}),t[0]=e):e=t[0],e}const Hi="pt-1.5";function ds(t){const e=S.c(18),{header:s,back:i,body:o,footer:a,sheet:r}=t;let l;e[0]!==s?(l=s&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==s?(c=s&&n.jsx("div",{className:"hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==o||e[7]!==d?(u=n.jsxs(Us,{className:"gap-0 overflow-y-auto px-2 pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[d,o]}),e[6]=o,e[7]=d,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==l||e[11]!==c||e[12]!==u?(m=n.jsxs(n.Fragment,{children:[l,c,u,a]}),e[9]=a,e[10]=l,e[11]=c,e[12]=u,e[13]=m):m=e[13];const f=m;if(r){let x;return e[14]!==f?(x=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":te.nav,children:f}),e[14]=f,e[15]=x):x=e[15],x}let p;return e[16]!==f?(p=n.jsx(Ws,{className:Hi,"data-tour":te.nav,children:f}),e[16]=f,e[17]=p):p=e[17],p}function us(t){const e=S.c(8),{onNavigate:s}=t,i=z(),o=Ke(),a=To();if(!o)return null;let r;e[0]!==i?(r=i("sidebar.scope.allProjects"),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==a||e[3]!==s?(l=()=>{a(),s?.()},e[2]=a,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==l?(c=n.jsx(os,{label:r,onSelect:l}),e[5]=r,e[6]=l,e[7]=c):c=e[7],c}function ms(t){const e=S.c(2),{onNavigate:s}=t;let i;return e[0]!==s?(i=n.jsx(Ls,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx($i,{onNavigate:s}),n.jsx(zi,{onNavigate:s}),n.jsx(Ci,{onNavigate:s})]}),n.jsx(Li,{onNavigate:s})]})}),e[0]=s,e[1]=i):i=e[1],i}function Gi(){const t=S.c(3),e=It();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(hi,{}),t[0]=s):s=t[0];let i;return t[1]!==e?(i=n.jsx(ds,{header:s,back:e?n.jsx(ls,{}):n.jsx(us,{}),body:e?n.jsx(rs,{}):n.jsx(ms,{}),footer:e?n.jsx(cs,{}):n.jsx(ci,{})}),t[1]=e,t[2]=i):i=t[2],i}function Qi(t){const e=S.c(13),{onClose:s}=t,i=It();let o;e[0]!==s?(o=n.jsx(bi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]!==i||e[3]!==s?(a=i?n.jsx(ls,{onNavigate:s}):n.jsx(us,{onNavigate:s}),r=i?n.jsx(rs,{onNavigate:s}):n.jsx(ms,{onNavigate:s}),e[2]=i,e[3]=s,e[4]=a,e[5]=r):(a=e[4],r=e[5]);let l;e[6]!==i?(l=i?n.jsx(cs,{}):n.jsx(di,{}),e[6]=i,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==a||e[10]!==r||e[11]!==l?(c=n.jsx(ds,{sheet:!0,header:o,back:a,body:r,footer:l}),e[8]=o,e[9]=a,e[10]=r,e[11]=l,e[12]=c):c=e[12],c}const Ji=new Set(["completed","failed","requires_action"]);function Xi(t){const e=S.c(5),[s]=wt();let i;e[0]!==s?(i=a=>{s.enableSounds&&Ji.has(a.data.status)&&vo(yo.dataUri).catch(Yi)},e[0]=s,e[1]=i):i=e[1];let o;e[2]!==t||e[3]!==i?(o={orgSlug:t,onTaskStatus:i},e[2]=t,e[3]=i,e[4]=o):o=e[4],ko(o)}function Yi(t){console.warn("[status-sounds] playback failed:",t)}const Zi=2e3,ea=4e4;function ta(t){return t==="success"||t==="updated"}function sa(t){const e=S.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Fs(s),o=Ct();let a;e[1]!==i.checkout?(a=ta(i.checkout),e[1]=i.checkout,e[2]=a):a=e[2];const r=a,[l]=T.useState(na);let c;e[3]!==t?(c=Me.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Zi:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Me.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==r||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=r,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],et(m)}function na(){return Date.now()+ea}function rl(){const t=S.c(3),{org:e}=B();Xi(e.slug),sa(e.id);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(zo,{}),t[0]=s):s=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ge.Sidebar,{renderMobile:oa,children:n.jsx(Gi,{})}),t[1]=i):i=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Ge,{notice:s,children:[i,n.jsx(Ge.Content,{children:n.jsx(qs,{})})]}),t[2]=o):o=t[2],o}function oa(t){const{onClose:e}=t;return n.jsx(Qi,{onClose:e})}export{rl as default};
|
|
1
|
+
import{c as S,b as z,j as n,U as Nt,r as T,V as fs,P as ps,X as B,l as O,B as De,Y as xs,Z as Ne,_ as Re,q as V,a as ee,d as we,$ as gs,x as wt,t as re,a0 as hs,a1 as bs,p as Qe,a2 as _t,a3 as $t,o as Ct,e as js,K as Me,y as vs,a4 as ys,m as et,a5 as ks,w as Ss,L as Pt,a6 as D,J as de,a7 as tt,a8 as Ns,a9 as ws,aa as _s,ab as $s,ac as Cs,ad as Ps,ae as Is,af as zs,ag as Ts,ah as As,ai as Os,f as Rs,k as Ds,aj as Ms,ak as Es,E as Ls,u as Fs,O as qs}from"./index-izHBwn3I.js";import{u as Ve,S as Bs,a as Vs,b as Ks,c as le,d as q,e as oe,f as Je,g as Us,h as Ws,i as It}from"./use-in-settings-BA5wQFQ2.js";import{S as Hs,a as Gs,b as Qs}from"./sheet-DTIr0quY.js";import{u as st}from"./use-mobile-Dn4_VWcj.js";import{S as Js,a as zt}from"./thread-button-CqHz48Ii.js";import{u as Xs,L as te,i as Tt}from"./shell-layout-BadbomY4.js";import{u as ke,a as Ke,b as At}from"./use-project-scope-DIRKMaLK.js";import{u as Ys}from"./thread-route-Dg7kv_hv.js";import{P as nt,a as Ue,b as ot}from"./popover-BiGAM8js.js";import{D as Ot,a as Rt,b as Dt,c as Zs}from"./drawer-Cmzocoxj.js";import{A as Ee}from"./avatar-JIBRtdC_.js";import{T as it,a as at,b as en,c as rt}from"./tooltip-DqtfkXwI.js";import{a as tn}from"./Copy01-Rd2DUITb.js";import{n as sn}from"./Eye-CATcYqq7.js";import{t as nn,i as Xe,a as on,b as an,c as rn,d as ln,e as Mt,s as lt,f as cn,A as dn,g as un,n as Et,h as Lt,j as mn,k as fn,l as pn,m as xn,o as gn,p as hn}from"./agent-icon-CP5XN9a-.js";import{i as bn,a as jn}from"./Share07-CAPMGK5H.js";import{n as Ft}from"./LinkExternal01-E0yllQfW.js";import{i as qt}from"./Monitor01-2SrwE2A4.js";import{n as vn,a as yn}from"./Sun-Dc2rioTm.js";import{a as Bt,i as kn,t as Sn}from"./Tool01-DAfFPt6l.js";import{u as Nn}from"./use-deployment-admin-BYSK4yu-.js";import{u as wn}from"./use-is-desktop-app-BNujXJc_.js";import{i as _n,a as pt,D as $n}from"./download-app-dialog-BngIghKX.js";import{I as Cn,u as Pn}from"./use-join-requests-Df_QAPcD.js";import{u as In}from"./use-deco-credits-BnljnX-n.js";import{u as zn,a as Vt}from"./use-entitlements-g5-cEVzp.js";import{u as Tn,P as An}from"./plan-ladder-BCVwOSVp.js";import{u as On}from"./use-organization-settings-BWZsG9HZ.js";import{S as Rn}from"./scroll-area-DQZQeCpt.js";import{u as Dn}from"./useInfiniteQuery-ByafV4ZI.js";import{n as Mn}from"./hooks-DETt4AT1.js";import{t as Kt,S as En,b as Ln,p as Fn,a as qn,i as Bn,c as Vn,d as Kn}from"./task-route-uQ4EUqTW.js";import{g as Un}from"./get-initials-D-f_fDFw.js";import{a as Wn}from"./format-time-BtXRrtv4.js";import{i as Ut}from"./LayoutLeft-o4EwT_f4.js";import{I as Hn,T as Wt}from"./toolbar-icon-button-DOCtjUrJ.js";import{i as Le}from"./Check-e9hufNdV.js";import{s as Ht}from"./Plus-BfQMVZRL.js";import{C as xt,a as Oe,b as Fe,c as Gn,d as Qn,e as Jn}from"./command-BXe_2Y8J.js";import{P as ct}from"./project-icon-BfMBNeXz.js";import{C as Xn}from"./create-organization-dialog-CfY_Fp3w.js";import{s as Yn,c as Zn}from"./XClose-CgE_NvFQ.js";import{u as eo}from"./use-virtual-mcp-D8Whl5cH.js";import{i as to}from"./ArrowLeft-Du5HwAty.js";import{u as so}from"./use-thread-analytics-Duxs7POX.js";import{e as no,r as Gt,u as oo,s as io,p as ao,P as ro}from"./use-project-native-view-presence-Bn9lK-SY.js";import{u as Qt}from"./optimistic-project-sidebar-views-BCSGdK6N.js";import{u as dt}from"./use-navigate-to-agent-soNoKU2z.js";import{a as lo}from"./Image01-CK0bgOXc.js";import{u as co}from"./use-panel-navigate-BpzTFK7R.js";import{r as uo}from"./resolve-tab-icon-nUEsT-q-.js";import{T as mo}from"./tab-icon-glyph-BvrqhHgJ.js";import{R as fo}from"./repository-import-picker-DHUG6o-B.js";import{t as po}from"./ChevronUp-Dijj6L1D.js";import{t as xo}from"./Globe04-dvDQwL6D.js";import{i as go}from"./CreditCard01-CuV3PHbW.js";import{i as ho}from"./Key01-B2Ks3SjW.js";import{s as bo}from"./User01-DZIaW3qt.js";import{i as jo}from"./Zap-BnKV6W7m.js";import{p as vo,q as yo}from"./question-004-sINsf4GQ.js";import{u as ko}from"./use-decopilot-events-oRqi_MUt.js";import"./X-7V7RNG20.js";import"./use-route-default-main-BeQVGvWs.js";import"./UserSquare-CMMvch3p.js";import"./CheckCircle-Du0Z4Mo4.js";import"./dialog-B9AmIVi-.js";import"./integration-icon-Vvc8ojiC.js";import"./use-mcp-client-CNVDhuvd.js";import"./auth-WDJFc9Hm.js";import"./required-auth-layout-qs1Hm0B9.js";import"./autosend-BUpRVcwj.js";import"./use-org-sso-DcCWDiTW.js";import"./github-repo-B15wwZ1g.js";import"./index-xb9O7QC9.js";import"./AlertCircle-B4TBXI97.js";import"./ArrowUp-DfYHJg8n.js";import"./ArrowRight-Bk-h8Spa.js";import"./ShoppingBag01-Dj-9rxCI.js";import"./ZoomOut-9vKhCWKn.js";import"./DotsVertical-CUOWG-18.js";import"./Link01-t9xcN1_J.js";import"./Palette-DdJDZNuI.js";import"./SearchMd-BPxAMeCu.js";import"./Trash01-BpbNxWxU.js";import"./Upload01-Cu5y084h.js";import"./Users01-B6wD4vfR.js";import"./form-CIkzBIkD.js";import"./label-BIuQy2__.js";import"./select-BsUP6XU-.js";import"./textarea-tfNNqm-_.js";import"./use-org-auth-client-BbRXHP84.js";import"./use-organization-roles-CIWlEEfM.js";import"./use-ai-providers-BGPaB7ua.js";import"./schema-DNqDLF82.js";import"./task-board-CFetJZKk.js";import"./infiniteQueryObserver-DiUuMuMD.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-BAMGe25h.js";import"./alert-dialog-DOZYkVkM.js";import"./input-BLSONHqE.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-D0LRhOPo.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-EOvgTchU.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-TE4ZcEAF.js";import"./github-icon-ZHfVS9cH.js";import"./collection-search-Bm4yfKio.js";import"./use-debounced-value-D1fDrXmw.js";function ie(){const{state:t,isMobile:e}=Ve();return t==="collapsed"&&!e}function So(t){const e=S.c(15),{width:s,minWidth:i,maxWidth:o,onPointerDown:a,onKeyDown:r,onDoubleClick:l}=t,c=z(),{isMobile:d}=Ve(),u=ie();if(d||u)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let f;e[2]!==c?(f=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=f):f=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},x=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==r||e[10]!==a||e[11]!==m||e[12]!==f||e[13]!==s?(h=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":i,"aria-valuemax":o,title:f,tabIndex:0,onPointerDown:a,onKeyDown:r,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:p,children:x}),e[6]=o,e[7]=i,e[8]=l,e[9]=r,e[10]=a,e[11]=m,e[12]=f,e[13]=s,e[14]=h):h=e[14],h}const Ye=400,gt=16,No="sidebar.width";function wo(){const t=S.c(14),e=_o;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=x=>typeof x=="number"?e(x):224,t[0]=s):s=t[0];const[i,o]=Nt(No,s),a=T.useRef(null);let r;t[1]!==o||t[2]!==i?(r=x=>{x.preventDefault();const h=x.clientX,b=e(i),g=a.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),v=g?Array.from(g.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const k of v)k.style.transition="none";const j=k=>{const N=e(b+(k.clientX-h));g?.style.setProperty("--sidebar-width",`${N}px`)},y=k=>{const N=e(b+(k.clientX-h));o(N);for(const w of v)w.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=o,t[2]=i,t[3]=r):r=t[3];const l=r;let c;t[4]!==o?(c=()=>{o(224)},t[4]=o,t[5]=c):c=t[5];const d=c;let u;t[6]!==o||t[7]!==i?(u=x=>{if(x.key==="ArrowLeft")o(e(i-gt));else if(x.key==="ArrowRight")o(e(i+gt));else if(x.key==="Home")o(224);else if(x.key==="End")o(Ye);else return;x.preventDefault()},t[6]=o,t[7]=i,t[8]=u):u=t[8];const m=u,f=e(i);let p;return t[9]!==m||t[10]!==l||t[11]!==d||t[12]!==f?(p={width:f,minWidth:224,maxWidth:Ye,wrapperRef:a,onStartResize:l,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=l,t[11]=d,t[12]=f,t[13]=p):p=t[13],p}function _o(t){return Math.max(224,Math.min(Ye,t))}const Jt=T.createContext(null);function $o(){const t=T.use(Jt);if(!t)throw new Error("Layout regions require a Layout");return t}function Co({children:t,notice:e}){const s=st(),[i,o]=Nt(fs.sidebarOpen(),!0),a=wo();return n.jsx(Jt,{value:{isMobile:s,resize:a},children:n.jsx(Bs,{open:i,onOpenChange:o,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Vs,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.25rem"},children:n.jsx(Js,{children:t})})]})})})}function Po(t){const e=S.c(26),{children:s,renderMobile:i}=t,o=z(),{isMobile:a,resize:r}=$o(),{openMobile:l,setOpenMobile:c}=Ve();if(!a){let h;e[0]!==r.maxWidth||e[1]!==r.minWidth||e[2]!==r.onKeyDownResize||e[3]!==r.onStartResize||e[4]!==r.resetWidth||e[5]!==r.width?(h=n.jsx(So,{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,onPointerDown:r.onStartResize,onKeyDown:r.onKeyDownResize,onDoubleClick:r.resetWidth}),e[0]=r.maxWidth,e[1]=r.minWidth,e[2]=r.onKeyDownResize,e[3]=r.onStartResize,e[4]=r.resetWidth,e[5]=r.width,e[6]=h):h=e[6];let b;return e[7]!==s||e[8]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[7]=s,e[8]=h,e[9]=b):b=e[9],b}let d;e[10]!==o?(d=o("layouts.shellControls.navigationTitle"),e[10]=o,e[11]=d):d=e[11];let u;e[12]!==d?(u=n.jsx(Hs,{className:"sr-only",children:d}),e[12]=d,e[13]=u):u=e[13];let m;e[14]!==c?(m=()=>c(!1),e[14]=c,e[15]=m):m=e[15];let f;e[16]!==i||e[17]!==m?(f=i({onClose:m}),e[16]=i,e[17]=m,e[18]=f):f=e[18];let p;e[19]!==u||e[20]!==f?(p=n.jsxs(Gs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[19]=u,e[20]=f,e[21]=p):p=e[21];let x;return e[22]!==l||e[23]!==c||e[24]!==p?(x=n.jsx(Qs,{open:l,onOpenChange:c,children:p}),e[22]=l,e[23]=c,e[24]=p,e[25]=x):x=e[25],x}function Io(t){const e=S.c(3),{children:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={background:"transparent",containerType:"inline-size"},e[0]=i):i=e[0];let o;return e[1]!==s?(o=n.jsx(Ks,{className:"flex flex-col min-h-0",style:i,children:n.jsx(ps,{variant:"plain",className:"bg-sidebar",children:n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=o):o=e[2],o}const Ge=Object.assign(Co,{Sidebar:Po,Content:Io});function zo(){const t=S.c(19),{org:e}=B(),{data:s}=Xs(e.slug);if(!s)return null;const i=s.severity==="block",o=i?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let a;t[0]!==o?(a=O("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=a):a=t[1];const r=i?void 0:"text-warning";let l;t[2]!==r?(l=O("size-4 shrink-0",r),t[2]=r,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(xs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(De,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=m):m=t[12];let f;return t[13]!==a||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:a,children:[c,d,u,m]}),t[13]=a,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function To(){const t=S.c(4),{setScope:e}=ke(),s=Ys(),i=Ne();let o;return t[0]!==i||t[1]!==s||t[2]!==e?(o=()=>{const a=s!==void 0?"route_resolves_scope":Re(i,null)?null:"route_needs_scope";V("scope_cleared",{relocated:a!==null,reason:a}),e(null)},t[0]=i,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}const qe="size-4 shrink-0";function ut(t){const e=S.c(5),{children:s,className:i}=t;let o;e[0]!==i?(o=O("flex w-4 shrink-0 items-center justify-center",i),e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function ye(t){const e=S.c(26),{item:s,onClose:i}=t;let o;e[0]!==s.className?(o=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const a=o;if(s.href){const u=s.external?"_blank":void 0,m=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let x;return e[6]!==a||e[7]!==s.href||e[8]!==i||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(x=n.jsxs("a",{href:s.href,target:u,rel:m,className:a,onClick:i,children:[f,p]}),e[6]=a,e[7]=s.href,e[8]=i,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==i?(r=()=>{s.onClick?.(),i()},e[14]=s,e[15]=i,e[16]=r):r=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==a||e[22]!==r||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:r,className:a,children:[l,c]}),e[21]=a,e[22]=r,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function Ao(){const t=S.c(4),e=z();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let i;return t[2]!==s?(i=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=i):i=t[3],i}function ht(t){const e=S.c(38),{user:s,userImage:i,isImpersonating:o,isMobile:a}=t,r=z(),l=a?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==i?(u=n.jsx(Ee,{url:i,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=i,e[4]=u):u=e[4];let m;e[5]!==r||e[6]!==s?.name?(m=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(Ao,{}),e[10]=o,e[11]=p):p=e[11];let x;e[12]!==f||e[13]!==p?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let g;e[17]!==b||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[17]=b,e[18]=x,e[19]=g):g=e[19];let v;e[20]!==r||e[21]!==s?(v=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=v):v=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(tn,{size:14}),e[23]=j):j=e[23];let y;e[24]!==v?(y=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[24]=v,e[25]=y):y=e[25];let k;e[26]!==r?(k=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(at,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let w;e[30]!==y||e[31]!==N?(w=n.jsx(en,{delayDuration:300,children:n.jsxs(rt,{children:[y,N]})}),e[30]=y,e[31]=N,e[32]=w):w=e[32];let _;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==u?(_=n.jsxs("div",{className:c,children:[u,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=u,e[37]=_):_=e[37],_}function bt(t){const e=S.c(35),{themeOptions:s,preferences:i,setPreferences:o,isMobile:a}=t,r=z(),l=a?"size-8":"size-7",c=a?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=O("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==i.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==i.theme||e[9]!==o?(k=N=>{const{value:w,icon:_,label:$}=N;return n.jsx("button",{type:"button","aria-label":$,onClick:()=>o(C=>({...C,theme:w})),className:O(l,"rounded-lg flex items-center justify-center transition-colors",i.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},w)},e[7]=l,e[8]=i.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=i.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==i.enableSounds||e[14]!==r?(f=i.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=r,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(Oo),e[16]=o,e[17]=p):p=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==x?(h=O(l,"rounded-lg flex items-center justify-center transition-colors",x),e[18]=l,e[19]=x,e[20]=h):h=e[20];let b;e[21]!==i.enableSounds?(b=i.enableSounds?n.jsx(an,{size:14}):n.jsx(rn,{size:14}),e[21]=i.enableSounds,e[22]=b):b=e[22];let g;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(g=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=g):g=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.408.0"]}),e[28]=v):v=e[28];let j;e[29]!==g?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[g,v]}),e[29]=g,e[30]=j):j=e[30];let y;return e[31]!==j||e[32]!==d||e[33]!==m?(y=n.jsxs("div",{className:d,children:[m,j]}),e[31]=j,e[32]=d,e[33]=m,e[34]=y):y=e[34],y}function Oo(t){return{...t,enableSounds:!t.enableSounds}}function jt(t){const e=S.c(54),{user:s,userImage:i,menuItems:o,signOutItem:a,stopImpersonatingItem:r,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let y;e[0]!==l||e[1]!==s||e[2]!==i?(y=n.jsx(ht,{user:s,userImage:i,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=i,e[3]=y):y=e[3];let k;if(e[4]!==m||e[5]!==o){let I;e[7]!==m?(I=R=>n.jsx(ye,{item:R,onClose:m},R.key),e[7]=m,e[8]=I):I=e[8],k=o.map(I),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==r?(N=r&&n.jsx(ye,{item:r,onClose:m}),e[9]=m,e[10]=r,e[11]=N):N=e[11];let w;e[12]!==m||e[13]!==a?(w=n.jsx(ye,{item:a,onClose:m}),e[12]=m,e[13]=a,e[14]=w):w=e[14];let _;e[15]!==k||e[16]!==N||e[17]!==w?(_=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[k,N,w]})}),e[15]=k,e[16]=N,e[17]=w,e[18]=_):_=e[18];let $;e[19]!==d||e[20]!==u||e[21]!==c?($=n.jsx(bt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=$):$=e[22];let C;return e[23]!==y||e[24]!==_||e[25]!==$?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,_,$]}),e[23]=y,e[24]=_,e[25]=$,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==i?(p=n.jsx(ht,{user:s,userImage:i,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=i,e[30]=p):p=e[30];let x;if(e[31]!==m||e[32]!==o){let y;e[34]!==m?(y=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=y):y=e[35],x=o.map(y),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==m||e[37]!==r?(h=r&&n.jsx(ye,{item:r,onClose:m}),e[36]=m,e[37]=r,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==a?(b=n.jsx(ye,{item:a,onClose:m}),e[39]=m,e[40]=a,e[41]=b):b=e[41];let g;e[42]!==x||e[43]!==h||e[44]!==b?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,b]}),e[42]=x,e[43]=h,e[44]=b,e[45]=g):g=e[45];let v;e[46]!==d||e[47]!==u||e[48]!==c?(v=n.jsx(bt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=v):v=e[49];let j;return e[50]!==p||e[51]!==g||e[52]!==v?(j=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,g,v]})}),e[50]=p,e[51]=g,e[52]=v,e[53]=j):j=e[53],j}function Ze(){const t=S.c(107),e=z(),{data:s}=ee.useSession(),{org:i}=B(),o=we();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org",shouldThrow:!1},t[0]=a):a=t[0];const l=gs(a)?.params.org,[c,d]=wt(),u=st(),{isAdmin:m}=Nn(),f=wn(),[p,x]=T.useState(!1),[h,b]=T.useState(!1),g=s?.user,v=g?.image,j=!!s?.session?.impersonatedBy;let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),t[1]=y):y=t[1];const k=y;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Bt,{size:16}),t[4]=w):w=t[4];let _;t[5]!==o||t[6]!==l?(_=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=_):_=t[7];let $;t[8]!==N||t[9]!==_?($={key:"preferences",label:N,icon:w,onClick:_},t[8]=N,t[9]=_,t[10]=$):$=t[10];let C;t[11]!==i||t[12]!==o?(C=i?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(Ft,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=C):C=t[13];let I;t[14]!==f||t[15]!==e?(I=(_n()||pt())&&!f?[{key:"install-desktop-app",label:pt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(sn,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=I):I=t[16];let R;t[17]!==e?(R=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=R):R=t[18];let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=n.jsx(on,{size:16}),t[19]=Q):Q=t[19];let A;t[20]!==R?(A={key:"terms",label:R,icon:Q,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=R,t[21]=A):A=t[21];let E;t[22]!==e?(E=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=E):E=t[23];let K;t[24]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx(hs,{size:16}),t[24]=K):K=t[24];let L;t[25]!==E?(L={key:"privacy",label:E,icon:K,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=E,t[26]=L):L=t[26];let J;t[27]!==e?(J=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=J):J=t[28];let U;t[29]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(bs,{className:"w-4 h-4"}),t[29]=U):U=t[29];let W;t[30]!==J?(W={key:"github",label:J,icon:U,href:"https://github.com/decocms/studio",external:!0},t[30]=J,t[31]=W):W=t[31];let X;t[32]!==e?(X=e("common.accountPopover.community"),t[32]=e,t[33]=X):X=t[33];let se;t[34]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Qe,{size:16}),t[34]=se):se=t[34];let Y;t[35]!==X?(Y={key:"community",label:X,icon:se,href:"https://decocms.com/discord",external:!0},t[35]=X,t[36]=Y):Y=t[36];let H;t[37]!==e?(H=e("common.accountPopover.homepage"),t[37]=e,t[38]=H):H=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(bn,{size:16}),t[39]=me):me=t[39];let F;t[40]!==H?(F={key:"homepage",label:H,icon:me,href:"https://decocms.com",external:!0},t[40]=H,t[41]=F):F=t[41];let G;t[42]!==m||t[43]!==o||t[44]!==e?(G=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(nn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=G):G=t[45];let ae;t[46]!==A||t[47]!==L||t[48]!==W||t[49]!==Y||t[50]!==F||t[51]!==G||t[52]!==$||t[53]!==C||t[54]!==I?(ae=[$,...C,...I,A,L,W,Y,F,...G],t[46]=A,t[47]=L,t[48]=W,t[49]=Y,t[50]=F,t[51]=G,t[52]=$,t[53]=C,t[54]=I,t[55]=ae):ae=t[55];const Se=ae;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let ne;t[58]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Xe,{size:16}),t[58]=ne):ne=t[58];let P;t[59]!==Z?(P={key:"logout",label:Z,icon:ne,onClick:Do},t[59]=Z,t[60]=P):P=t[60];const M=P;let _e;t[61]!==j||t[62]!==e?(_e=j?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Xe,{size:16}),onClick:async()=>{const{error:ft}=await ee.admin.stopImpersonating();if(ft){re.error(ft.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=j,t[62]=e,t[63]=_e):_e=t[63];const We=_e;let $e;t[64]===Symbol.for("react.memo_cache_sentinel")?($e=n.jsx(vn,{size:14}),t[64]=$e):$e=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:$e,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Ce;t[69]===Symbol.for("react.memo_cache_sentinel")?(Ce=n.jsx(yn,{size:14}),t[69]=Ce):Ce=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Ce,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let Pe;t[74]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(qt,{size:14}),t[74]=Pe):Pe=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:Pe,label:he},t[77]=he,t[78]=be):be=t[78];let Ie;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ie=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ie):Ie=t[82];const He=Ie;let ze;t[83]!==j||t[84]!==u||t[85]!==Se||t[86]!==c||t[87]!==d||t[88]!==M||t[89]!==We||t[90]!==He||t[91]!==g||t[92]!==v?(ze={user:g,userImage:v,menuItems:Se,signOutItem:M,stopImpersonatingItem:We,isImpersonating:j,themeOptions:He,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=j,t[84]=u,t[85]=Se,t[86]=c,t[87]=d,t[88]=M,t[89]=We,t[90]=He,t[91]=g,t[92]=v,t[93]=ze):ze=t[93];const Te=ze;let je;t[94]!==j||t[95]!==u||t[96]!==p||t[97]!==Te||t[98]!==e||t[99]!==g?.name||t[100]!==v?(je=u?n.jsxs(Ot,{open:p,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",j&&"border-2 border-dashed border-warning"),children:[n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Rt,{className:"h-[80dvh] p-0",children:[n.jsx(Dt,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(jt,{...Te})]})]}):n.jsxs(nt,{open:p,onOpenChange:x,children:[n.jsx(Ue,{asChild:!0,children:n.jsxs(le,{"data-tour":te.account,tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:O(j&&"border-2 border-dashed border-warning"),children:[n.jsx(ut,{children:n.jsx(Ee,{url:v,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(ot,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ro,children:n.jsx(jt,{...Te})})]}),t[94]=j,t[95]=u,t[96]=p,t[97]=Te,t[98]=e,t[99]=g?.name,t[100]=v,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx($n,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let Ae;return t[104]!==je||t[105]!==ve?(Ae=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=Ae):Ae=t[106],Ae}function Ro(t){return t.preventDefault()}function Do(){V("signed_out",{source:"account_popover"}),_t(),ee.signOut()}class Mo extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Eo(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Lo(){const t=S.c(17),e=we(),{org:s}=B(),{hasDecoKey:i,balanceDollars:o}=In();if(!i)return null;let a;t[0]!==o?(a=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=a):a=t[1];let r;t[2]!==o?(r=O(o!=null&&Eo(o)),t[2]=o,t[3]=r):r=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ln,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==a||t[13]!==r||t[14]!==l||t[15]!==u?(m=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:a,className:r,onClick:l,children:[c,u]})})}),t[12]=a,t[13]=r,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Fo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},qo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Bo(){const t=S.c(40),e=z(),s=ie(),i=we(),{org:o}=B(),{data:a}=Vt();if(!a?.usage||!a.features.chat)return null;let r,l;if(t[0]!==a.usage.percent?(r=Math.round(a.usage.percent*100),l=Number.isFinite(r),t[0]=a.usage.percent,t[1]=r,t[2]=l):(r=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,r)),d=a.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==i||t[6]!==o.slug?(f=()=>i({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=i,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let x;t[8]!==p?(x=O(p),t[8]=p,t[9]=x):x=t[9];let h;t[10]!==a.plan.id||t[11]!==a.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Ko,{percent:c,state:a.usage.state}):n.jsx(Vo,{planId:a.plan.id}),t[10]=a.plan.id,t[11]=a.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==x||t[16]!==h?(b=n.jsx(ut,{className:x,children:h}),t[15]=x,t[16]=h,t[17]=b):b=t[17];let g;t[18]!==a.plan.name?(g=n.jsx("span",{className:"truncate font-medium",children:a.plan.name}),t[18]=a.plan.name,t[19]=g):g=t[19];let v;t[20]!==c?(v=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=v):v=t[21];let j;t[22]!==v||t[23]!==g?(j=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[g,v]}),t[22]=v,t[23]=g,t[24]=j):j=t[24];const y=qo[a.usage.state];let k;t[25]!==y?(k=O("block h-full rounded-full",y),t[25]=y,t[26]=k):k=t[26];const N=`${c}%`;let w;t[27]!==N?(w={width:N},t[27]=N,t[28]=w):w=t[28];let _;t[29]!==k||t[30]!==w?(_=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:w})}),t[29]=k,t[30]=w,t[31]=_):_=t[31];let $;t[32]!==j||t[33]!==_?($=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[j,_]}),t[32]=j,t[33]=_,t[34]=$):$=t[34];let C;return t[35]!==$||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,$]})})}),t[35]=$,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Vo(t){const e=S.c(6),{planId:s}=t,{data:i}=Tn();let o;e[0]!==s||e[1]!==i?(o=i?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=i,e[2]=o):o=e[2];const a=o;if(a<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Mt,{className:qe}),e[3]=l):l=e[3],l}let r;return e[4]!==a?(r=n.jsx(An,{index:a,className:qe}),e[4]=a,e[5]=r):r=e[5],r}function Ko(t){const e=S.c(5),{percent:s,state:i}=t,o=2*Math.PI*8;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=O("-rotate-90",qe),e[0]=a):a=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=r):r=e[1];const l=Fo[i],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:a,"aria-hidden":"true",children:[r,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Uo(){return zn()?n.jsx(Bo,{}):n.jsx(Lo,{})}function vt(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Mo,{children:n.jsx(T.Suspense,{fallback:null,children:n.jsx(Uo,{})})}),t[0]=e):e=t[0],e}const Wo=6e4;function Ho(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Go(t,e){if(!t)return t;const s=e?new Set(e):null;let i=0;const o=t.pages.map(r=>{const l=r.notifications.filter(c=>s&&!s.has(c.id)?!0:(i++,!1));return{...r,notifications:l}}),a=s?Math.max(0,(t.pages[0]?.unreadCount??0)-i):0;return{...t,pages:o.map(r=>({...r,unreadCount:a}))}}function Qo(t,e){const s=S.c(4),{data:i}=ee.useSession(),o=i?.user?.id;let a;s[0]!==e||s[1]!==t||s[2]!==o?(a=r=>!t||!o?Yo:Mn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=a):a=s[3],T.useSyncExternalStore(a,Xo,Jo)}function Jo(){return 0}function Xo(){return 0}function Yo(){}function Xt(){const t=S.c(37),{locator:e,org:s}=B(),i=$t(),o=Ct();let a;t[0]!==e?(a=Me.notifications(e),t[0]=e,t[1]=a):a=t[1];const r=a;let l;t[2]!==i?(l=_=>{const{pageParam:$}=_;return Ho(i,$)},t[2]=i,t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==l?(c={queryKey:r,queryFn:l,initialPageParam:void 0,getNextPageParam:ti,refetchInterval:Wo},t[4]=r,t[5]=l,t[6]=c):c=t[6];const d=Dn(c);let u;t[7]!==o||t[8]!==r?(u=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=u):u=t[9],Qo(s.slug,u);let m;t[10]!==i?(m=_=>i.call("NOTIFICATION_MARK_READ",_?{ids:_}:{}),t[10]=i,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==r?(f=async _=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,$=>Go($,_))},p=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let x;t[16]!==m||t[17]!==f||t[18]!==p?(x={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=x):x=t[19];const h=js(x);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const g=b;let v;t[22]!==g?(v=g.flatMap(Zo),t[22]=g,t[23]=v):v=t[23];const j=g[0]?.unreadCount??0;let y;t[24]!==d?(y=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=y):y=t[25];let k,N;t[26]!==h?(k=()=>h.mutate(null),N=_=>h.mutate([_]),t[26]=h,t[27]=k,t[28]=N):(k=t[27],N=t[28]);let w;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==j||t[32]!==y||t[33]!==k||t[34]!==N||t[35]!==v?(w={updates:v,redDotCount:j,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:y,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=j,t[32]=y,t[33]=k,t[34]=N,t[35]=v,t[36]=w):w=t[36],w}function Zo(t){return t.notifications.map(ei)}function ei(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function ti(t){return t.nextCursor??void 0}function si(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function ni(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function oi(t){const e=S.c(36),{update:s,orgSlug:i,onSelect:o}=t,a=z();let r;e[0]!==i||e[1]!==s.taskKeySeq?(r=Kt(i,s.taskKeySeq),e[0]=i,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const l=r,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(En,{size:24}):n.jsx(Ee,{url:s.actorImage??void 0,fallback:Un(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let u;e[7]!==s.taskTitle?(u=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=Wn(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let x;e[16]!==l?(x=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=x):x=e[17];let h;e[18]!==s.action?(h=O(si(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==a||e[21]!==s?(b=ni(s,a),e[20]=a,e[21]=s,e[22]=b):b=e[22];let g;e[23]!==h||e[24]!==b?(g=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=g):g=e[25];let v;e[26]!==g||e[27]!==x?(v=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=v):v=e[28];let j;e[29]!==v||e[30]!==p?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,v]}),e[29]=v,e[30]=p,e[31]=j):j=e[31];let y;return e[32]!==o||e[33]!==j||e[34]!==d?(y=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,j]}),e[32]=o,e[33]=j,e[34]=d,e[35]=y):y=e[35],y}function ii(t){const e=S.c(2),{onReach:s}=t;let i;return e[0]!==s?(i=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const a=new IntersectionObserver(r=>{r.some(ai)&&s()});return a.observe(o),()=>a.disconnect()}}),e[0]=s,e[1]=i):i=e[1],i}function ai(t){return t.isIntersecting}function ri(t){const e=S.c(23),{onClose:s}=t,i=z(),o=we(),{org:a}=B(),{updates:r,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Xt();let m;e[0]!==i?(m=i("sidebar.inbox.title"),e[0]=i,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==i||e[6]!==r.length?(p=r.length>0&&n.jsx(De,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:i("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=i,e[6]=r.length,e[7]=p):p=e[7];let x;e[8]!==f||e[9]!==p?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=x):x=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==a||e[17]!==i||e[18]!==r?(h=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(lt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:i("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:i("sidebar.inbox.emptyBody")})]}):n.jsxs(Rn,{className:"min-h-0 flex-1",children:[r.map(g=>{const v=Kt(a.slug,g.taskKeySeq);return n.jsx(oi,{update:g,orgSlug:a.slug,onSelect:()=>{c(g.id),s(),v&&o({to:"/$org/tasks/{-$taskKey}",params:{org:a.slug,taskKey:v}})}},g.id)}),d&&n.jsx(ii,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=a,e[17]=i,e[18]=r,e[19]=h):h=e[19];let b;return e[20]!==x||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=b):b=e[22],b}function Yt(){const t=S.c(1),{redDotCount:e}=Xt();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Zt(t){const e=S.c(10),{open:s,onOpenChange:i,children:o}=t;let a;e[0]!==i||e[1]!==s?(a=s&&n.jsx(ri,{onClose:()=>i(!1)}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let r;e[3]!==a?(r=n.jsx(ot,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:a}),e[3]=a,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==i||e[7]!==s||e[8]!==r?(l=n.jsxs(nt,{open:s,onOpenChange:i,children:[o,r]}),e[5]=o,e[6]=i,e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function es(){const t=S.c(9),e=z(),[s,i]=T.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let a,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(lt,{size:15}),r=n.jsx(Yt,{}),t[2]=a,t[3]=r):(a=t[2],r=t[3]);let l;t[4]!==o?(l=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[a,r]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(Zt,{open:s,onOpenChange:i,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function li(){const t=S.c(15),e=z(),[s,i]=T.useState(!1),o=ie();let a;t[0]!==o||t[1]!==e?(a=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=a):a=t[2];let r,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(lt,{}),l=n.jsx(Yt,{}),t[3]=r,t[4]=l):(r=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let u;t[9]!==a||t[10]!==d?(u=n.jsx(Ue,{asChild:!0,children:n.jsxs(le,{tooltip:a,className:"relative",children:[r,l,d]})}),t[9]=a,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(Zt,{open:s,onOpenChange:i,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function yt(){const t=S.c(10),e=z();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ut,{children:n.jsx(cn,{className:qe})}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let a;t[5]!==o?(a=n.jsx("span",{children:o}),t[5]=o,t[6]=a):a=t[6];let r;return t[7]!==s||t[8]!==a?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsx(Cn,{trigger:n.jsxs(le,{tooltip:s,children:[i,a]})})})}),t[7]=s,t[8]=a,t[9]=r):r=t[9],r}function ci(){const t=S.c(13),e=ie(),i=!On();if(e){let c;t[0]!==i?(c=i&&n.jsx(vt,{}),t[0]=i,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(yt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(oe,{children:n.jsx(li,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(q,{children:[u,n.jsx(oe,{children:n.jsx(Ze,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Je,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==i?(o=i&&n.jsx(vt,{}),t[7]=i,t[8]=o):o=t[8];let a;t[9]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(yt,{}),t[9]=a):a=t[9];let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(Ze,{})}),n.jsx(es,{})]})})}),t[10]=r):r=t[10];let l;return t[11]!==o?(l=n.jsxs(Je,{className:"px-2 pb-3 gap-0.5",children:[o,a,r]}),t[11]=o,t[12]=l):l=t[12],l}function di(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Je,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(q,{children:n.jsx(oe,{children:n.jsx(Ze,{})})})}),n.jsx(es,{})]})}),t[0]=e):e=t[0],e}function ui(t){let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function mt(t){const e=S.c(13),{org:s,size:i}=t,o=i===void 0?"sm":i,a=o==="xs"?"size-5":"size-6",r=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==a?(l=O(a,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ui(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:O("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function mi({invitation:t,onChanged:e}){const s=z(),[i,o]=T.useState(!1),a=t.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{o(!0);try{const d=await ee.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:a})),vs();let c;try{c=(await ee.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await ee.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(mt,{org:{name:a},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:a}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(De,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:i,children:s("header.orgSwitcher.accept")}),n.jsx(De,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:i,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:a}),children:n.jsx(Yn,{size:14})})]})]})}function ts(){const t=T.useContext(ys),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function fi(t){const e=S.c(13),s=t.trim(),{data:i}=ee.useSession(),o=i?.user?.id??"",a=s.length>0&&!!o,r=Me.projectSearch(o,s);let l;e[0]!==s?(l=async g=>{const{signal:v}=g,j=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:v});if(!j.ok)throw new Error(`Project search failed: ${j.status}`);return await j.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==a||e[3]!==r||e[4]!==l?(c={queryKey:r,queryFn:l,enabled:a,placeholderData:ks,staleTime:3e4,retry:!1},e[2]=a,e[3]=r,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=et(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const x=a&&u,h=a&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==x||e[11]!==h?(b={hits:p,isSearching:x,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=x,e[11]=h,e[12]=b):b=e[12],b}function kt(t){const e=S.c(15),{id:s,label:i,createLabel:o,onCreate:a}=t;let r;e[0]!==s||e[1]!==i?(r=n.jsx("span",{id:s,className:"truncate",children:i}),e[0]=s,e[1]=i,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ht,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==a?(c=n.jsx(it,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-lg p-1 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",onClick:a,children:l})}),e[4]=o,e[5]=a,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(at,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(rt,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==r||e[13]!==u?(m=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,u]}),e[12]=r,e[13]=u,e[14]=m):m=e[14],m}const Be="min-h-9 items-center",ue={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function pi(t){const e=S.c(9),{active:s,rows:i}=t,o=z();let a,r,l;if(e[0]!==s||e[1]!==i||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=i.get(s);if(d?.kind!=="travel"){l=null;break e}a="border-t border-border px-3 py-2 text-xs text-warning",r=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=i,e[2]=o,e[3]=a,e[4]=r,e[5]=l}else a=e[3],r=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==a||e[7]!==r?(c=n.jsx("div",{className:a,children:r}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function xi(t){const e=S.c(25),{onClose:s,onCreateOrg:i,className:o}=t,a=z(),r=T.useId(),l=T.useId(),c=we(),{org:d}=B(),{scopeId:u,projects:m,setScope:f}=ke(),{hasMore:p}=eo(),[x,h]=T.useState(""),[b,g]=T.useState(ue.allProjects),v=T.useDeferredValue(x);let j;e[0]!==v?(j=v.trim(),e[0]=v,e[1]=j):j=e[1];const y=j,k=y.length>0,{data:N}=Ss(),{invitations:w,refetch:_}=ts();let $;e[2]!==d.slug?($=(P,M)=>P.slug===d.slug?-1:M.slug===d.slug?1:0,e[2]=d.slug,e[3]=$):$=e[3];const C=(N??[]).slice().sort($),{hits:I,isSearching:R,isStale:Q,isError:A}=fi(k?y:""),E=k?C.filter(P=>{const M=y.toLowerCase();return P.name.toLowerCase().includes(M)||P.slug.toLowerCase().includes(M)}):[],K=Ne();let L;e[4]!==K?(L=K.startsWith("/$org/settings"),e[4]=K,e[5]=L):L=e[5];const J=L,U=new Map;let W;e[6]!==J||e[7]!==s||e[8]!==f?(W=P=>{V("scope_set",{scoped:P!==null,fromSettings:J}),f(P),s()},e[6]=J,e[7]=s,e[8]=f,e[9]=W):W=e[9];const X=W;let se;e[10]!==c||e[11]!==s?(se=(P,M)=>{V("org_project_travel",{scoped:!!M}),c(M?{to:"/$org/projects/$agentId",params:{org:P,agentId:M}}:{to:"/$org/home",params:{org:P}}),s()},e[10]=c,e[11]=s,e[12]=se):se=e[12];const Y=se;let H;e[13]!==c||e[14]!==s||e[15]!==d.slug?(H=()=>{V("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=H):H=e[16];const me=H;U.set(ue.allProjects,{kind:"scope",label:a("sidebar.scope.allProjects")});let F;e[17]!==a?(F=a("sidebar.picker.searchPlaceholder"),e[17]=a,e[18]=F):F=e[18];let G;e[19]!==x||e[20]!==F?(G=n.jsx(Jn,{value:x,onValueChange:h,placeholder:F}),e[19]=x,e[20]=F,e[21]=G):G=e[21];const ae=Gn,Se="max-h-none min-h-0 flex-1",Z=k?n.jsxs(n.Fragment,{children:[A&&n.jsx(xt,{children:a("sidebar.picker.searchFailed")}),!A&&!R&&I.length===0&&E.length===0&&n.jsx(xt,{children:a("sidebar.picker.noMatches",{query:y})}),!A&&I.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.projectsHeading"),className:O(Q&&"opacity-50"),children:I.map(P=>n.jsx(gi,{hit:P,currentOrgSlug:d.slug,scopeId:u,rows:U,onScope:X,onTravel:Y},`${P.orgSlug}:${P.id}`))}),E.length>0&&n.jsx(Oe,{heading:a("sidebar.picker.orgsHeading"),children:E.map(P=>n.jsx(St,{candidate:P,currentOrgSlug:d.slug,rows:U,onTravel:Y,onClose:s},P.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx(kt,{id:r,label:a("sidebar.picker.projectsHeading"),createLabel:a("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Oe,{"aria-labelledby":r,children:[n.jsxs(Fe,{value:ue.allProjects,className:Be,onSelect:()=>X(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:a("sidebar.scope.allProjects")}),u===null&&n.jsx(Le,{size:14})]}),m.map(P=>{const M=ue.project(P.id);return U.set(M,{kind:"scope",label:P.title}),n.jsxs(Fe,{value:M,className:Be,onSelect:()=>X(P.id),children:[n.jsx(ct,{icon:P.icon,name:P.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.title}),u===P.id&&n.jsx(Le,{size:14})]},P.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:a("sidebar.picker.moreExist")})]}),n.jsx(kt,{id:l,label:a("sidebar.picker.orgsHeading"),createLabel:a("sidebar.picker.newOrganization"),onCreate:i}),n.jsxs(Oe,{"aria-labelledby":l,children:[w.map(P=>n.jsx(mi,{invitation:P,onChanged:_},P.id)),C.map(P=>n.jsx(St,{candidate:P,currentOrgSlug:d.slug,rows:U,onTravel:Y,onClose:s},P.id))]})]});let ne;return e[22]!==ae||e[23]!==Z?(ne=n.jsx(ae,{className:Se,children:Z}),e[22]=ae,e[23]=Z,e[24]=ne):ne=e[24],n.jsxs(Qn,{shouldFilter:!1,value:b,onValueChange:g,className:o,children:[G,ne,n.jsx(pi,{active:b,rows:U})]})}function St(t){const e=S.c(22),{candidate:s,currentOrgSlug:i,rows:o,onTravel:a,onClose:r}=t,l=s.slug===i;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=ue.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==r||e[8]!==a?(d=()=>l?r():a(s.slug),e[5]=s.slug,e[6]=l,e[7]=r,e[8]=a,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(mt,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(Le,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Fe,{value:c,className:Be,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function gi(t){const e=S.c(30),{hit:s,currentOrgSlug:i,scopeId:o,rows:a,onScope:r,onTravel:l}=t,c=s.orgSlug===i;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==a?(d=c?ue.project(s.id):ue.foreignProject(s.orgSlug,s.id),a.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=a,e[5]=d):d=e[5];let u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==r||e[10]!==l?(u=()=>c?r(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=r,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ct,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let x;e[19]!==s.id||e[20]!==c||e[21]!==o?(x=c&&o===s.id&&n.jsx(Le,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=x):x=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==x||e[28]!==d?(h=n.jsxs(Fe,{value:d,className:Be,onSelect:u,children:[m,f,p,x]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=x,e[28]=d,e[29]=h):h=e[29],h}function ss(t){const e=S.c(32),{collapsed:s,onNavigate:i}=t,o=s===void 0?!1:s,a=z(),{org:r}=B(),{project:l}=ke(),{invitations:c}=ts(),[d,u]=T.useState(!1),[m,f]=T.useState(!1),p=st();let x;if(e[0]!==o||e[1]!==c.length||e[2]!==r||e[3]!==l||e[4]!==a){const _=l?a("sidebar.picker.projectInOrg",{project:l.title,org:r.name}):r.name;let $;e[6]!==r||e[7]!==l?($=l?n.jsx(dn,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(mt,{org:r,size:"sm"}),e[6]=r,e[7]=l,e[8]=$):$=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let I;e[11]!==$||e[12]!==C?(I=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[$,C]}),e[11]=$,e[12]=C,e[13]=I):I=e[13];const R=I;x=o?n.jsx(le,{tooltip:_,"data-tour":te.switcher,children:R}):n.jsxs("button",{type:"button","data-tour":te.switcher,"aria-label":a("sidebar.picker.ariaLabel",{name:_}),className:O("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Hn),children:[R,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:r.name}),n.jsx(kn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=r,e[3]=l,e[4]=a,e[5]=x}else x=e[5];const h=x,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let g;e[14]!==i?(g=()=>{u(!1),i?.()},e[14]=i,e[15]=g):g=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{u(!1),f(!0)},e[16]=v):v=e[16];let j;e[17]!==b||e[18]!==g?(j=n.jsx(xi,{onClose:g,onCreateOrg:v,className:b}),e[17]=b,e[18]=g,e[19]=j):j=e[19];const y=j;let k;e[20]!==o||e[21]!==y||e[22]!==p||e[23]!==d||e[24]!==a||e[25]!==h?(k=p?n.jsxs(Ot,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Zs,{asChild:!0,children:h}),n.jsxs(Rt,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Dt,{className:"sr-only",children:a("sidebar.picker.title")}),y]})]}):n.jsxs(nt,{open:d,onOpenChange:u,children:[n.jsx(Ue,{asChild:!0,children:h}),n.jsx(ot,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=o,e[21]=y,e[22]=p,e[23]=d,e[24]=a,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Xn,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let w;return e[29]!==k||e[30]!==N?(w=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=w):w=e[31],w}const ns=16;function hi(){const t=S.c(6),e=ie();let s;t[0]!==e?(s=n.jsx(ss,{collapsed:e}),t[0]=e,t[1]=s):s=t[1];let i,o;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ji,{}),o=n.jsx(zt,{}),t[2]=i,t[3]=o):(i=t[2],o=t[3]);let a;return t[4]!==s?(a=n.jsxs(n.Fragment,{children:[s,i,o]}),t[4]=s,t[5]=a):a=t[5],a}function bi(t){const e=S.c(13),{onClose:s}=t,i=z();let o;e[0]!==s?(o=n.jsx(ss,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("div",{className:"flex-1"}),r=n.jsx(zt,{}),e[2]=a,e[3]=r):(a=e[2],r=e[3]);let l;e[4]!==i?(l=i("sidebar.header.closeSidebar"),e[4]=i,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Ut,{size:ns}),e[6]=c):c=e[6];let d;e[7]!==s||e[8]!==l?(d=n.jsx(Wt,{onClick:s,"aria-label":l,children:c}),e[7]=s,e[8]=l,e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==d?(u=n.jsxs(n.Fragment,{children:[o,a,r,d]}),e[10]=o,e[11]=d,e[12]=u):u=e[12],u}function ji(){const t=S.c(13),e=z(),s=ie(),{toggleSidebar:i}=Ve(),o=s?"page.expandSidebar":"page.collapseSidebar";let a;t[0]!==e||t[1]!==o?(a=e(o),t[0]=e,t[1]=o,t[2]=a):a=t[2];const r=a;let l;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ut,{size:ns}),t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==i?(c=n.jsx(it,{asChild:!0,children:n.jsx(Wt,{"aria-label":r,onClick:i,className:"shrink-0 group-data-[state=collapsed]/sidebar:mx-auto size-7 group-data-[state=collapsed]/sidebar:size-8",children:l})}),t[4]=r,t[5]=i,t[6]=c):c=t[6];const d=!s;let u;t[7]!==r||t[8]!==d?(u=n.jsx(at,{side:"right",hidden:d,children:r}),t[7]=r,t[8]=d,t[9]=u):u=t[9];let m;return t[10]!==c||t[11]!==u?(m=n.jsxs(rt,{children:[c,u]}),t[10]=c,t[11]=u,t[12]=m):m=t[12],m}function ce(t){const e=S.c(33),{icon:s,label:i,isActive:o,link:a,onSelect:r,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=ie(),x=l??i,h=p?x:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const g=b;let v;e[5]!==m?(v=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=v):v=e[6];let j;e[7]!==i?(j=n.jsx("span",{className:"truncate",children:i}),e[7]=i,e[8]=j):j=e[8];let y;e[9]!==s||e[10]!==v||e[11]!==j?(y=n.jsxs(n.Fragment,{children:[s,v,j]}),e[9]=s,e[10]=v,e[11]=j,e[12]=y):y=e[12];const k=y;if(a){const _=f?"page":void 0;let $;e[13]!==k||e[14]!==a||e[15]!==x||e[16]!==r||e[17]!==_?($=n.jsx(Pt,{...a,"aria-label":x,"aria-current":_,onClick:r,children:k}),e[13]=k,e[14]=a,e[15]=x,e[16]=r,e[17]=_,e[18]=$):$=e[18];let C;e[19]!==g||e[20]!==$?(C=n.jsx(le,{asChild:!0,...g,children:$}),e[19]=g,e[20]=$,e[21]=C):C=e[21];let I;return e[22]!==u||e[23]!==C?(I=n.jsxs(oe,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=I):I=e[24],I}let N;e[25]!==k||e[26]!==x||e[27]!==r||e[28]!==g?(N=n.jsx(le,{...g,"aria-label":x,onClick:r,children:k}),e[25]=k,e[26]=x,e[27]=r,e[28]=g,e[29]=N):N=e[29];let w;return e[30]!==u||e[31]!==N?(w=n.jsxs(oe,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=w):w=e[32],w}function os(t){const e=S.c(5),{label:s,link:i,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(to,{size:16}),e[0]=a):a=e[0];let r;return e[1]!==s||e[2]!==i||e[3]!==o?(r=n.jsx("div",{className:"contents",children:n.jsx(q,{className:"shrink-0",children:n.jsx(ce,{icon:a,label:s,className:"text-sidebar-foreground/70",link:i,onSelect:o})})}),e[1]=s,e[2]=i,e[3]=o,e[4]=r):r=e[4],r}function vi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Tt(t)?"cms":null}function is(){const t=S.c(2),{data:e}=Vt();let s;return t[0]!==e?(s=i=>{const o=vi(i);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const yi="settings",ki=["overview","reports","board","files","threadAnalytics"];function Si(t,e){return!t||!e?!1:!At(e.metadata)}function Ni(t,e,s,i){if(!t||!e)return!0;const o=i!==void 0;return no(o?i:Gt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function wi(){const t=S.c(17),e=z(),{org:s}=B(),i=Ne(),o=Ke(),{project:a,repo:r}=ke(),l=Qt(a?.id),c=so().data?.isAdmin===!0;let d;t[0]!==a||t[1]!==o?(d=Si(o,a),t[0]=a,t[1]=o,t[2]=d):d=t[2];const u=d;let m;t[3]!==l||t[4]!==a||t[5]!==o?(m=x=>Ni(o,a,x,l),t[3]=l,t[4]=a,t[5]=o,t[6]=m):m=t[6];const f=m;let p;if(t[7]!==f||t[8]!==c||t[9]!==u||t[10]!==i||t[11]!==s||t[12]!==a?.id||t[13]!==r||t[14]!==o||t[15]!==e){const x={overview:u||!f("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(mn,{size:16}),isActive:i===D.home||i===D.orgIndex||i===de.root||i===`${de.root}/`,trackAs:"overview",link:o?{to:de.root,params:{org:s.slug,agentId:o}}:{to:D.home,params:{org:s.slug}}},reports:Re(D.reports,o)&&!u&&f("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Lt,{size:16}),isActive:i===D.reports||i===de.reports,trackAs:"reports",link:o?{to:de.reports,params:{org:s.slug,agentId:o}}:{to:D.reports,params:{org:s.slug}}}:null,board:u||!f("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Et,{size:16}),isActive:i===D.tasks||i===de.tasks,trackAs:"board",dataTour:te.tasks,link:{to:o?de.tasks:D.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:h=>{const b=r??a?.id;return b?{...h,repo:b}:h}}},files:Re(D.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(jn,{size:16}),isActive:i===D.library,trackAs:"files",link:{to:D.library,params:{org:s.slug}}}:null,threadAnalytics:c&&Re(D.threadAnalytics,o)?{key:"threadAnalytics",label:e("sidebar.navDestinations.threadAnalytics"),icon:n.jsx(un,{size:16}),isActive:i===D.threadAnalytics,trackAs:"thread_analytics",link:{to:D.threadAnalytics,params:{org:s.slug}}}:null};p=ki.map(h=>x[h]).filter(_i),t[7]=f,t[8]=c,t[9]=u,t[10]=i,t[11]=s,t[12]=a?.id,t[13]=r,t[14]=o,t[15]=e,t[16]=p}else p=t[16];return p}function _i(t){return t!==null}function $i(t){const e=S.c(9),{onNavigate:s}=t,i=wi(),o=is();let a;if(e[0]!==i||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ce,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],a=i.map(l),e[0]=i,e[1]=o,e[2]=s,e[3]=a}else a=e[3];let r;return e[7]!==a?(r=n.jsx(q,{className:"gap-1",children:a}),e[7]=a,e[8]=r):r=e[8],r}function Ci(t){const e=S.c(18),{onNavigate:s}=t,i=z(),{org:o}=B(),a=Ke(),r=dt(),l=Ne(),c=Ns();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(D.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==i?(m=i("sidebar.navDestinations.settings"),e[3]=i,e[4]=m):m=e[4];const f=m;let p;e[5]!==o||e[6]!==a?(p=a?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=a,e[7]=p):p=e[7];const x=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==r||e[10]!==s||e[11]!==a?(b=()=>{V("nav_destination_clicked",{destination:yi,target:a?"project":"org"}),a&&r(a,{panel:"settings"}),s?.()},e[9]=r,e[10]=s,e[11]=a,e[12]=b):b=e[12];let g;return e[13]!==u||e[14]!==f||e[15]!==x||e[16]!==b?(g=n.jsx(q,{className:"gap-1",children:n.jsx(ce,{dataTour:te.settings,icon:h,label:f,isActive:u,link:x,onSelect:b})}),e[13]=u,e[14]=f,e[15]=x,e[16]=b,e[17]=g):g=e[17],g}function Pi(t,e){const s=new Set(e);return s.size===0?t:t.filter(i=>s.has(i.connectionId))}function Ii(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function zi(t){const e=S.c(13),{onNavigate:s}=t,i=z(),{project:o}=ke(),a=dt(),r=Ne(),l=co(),c=oo(o),d=is(),u=Qt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const x=At(o.metadata),h=u??Gt(o.metadata);m=new Set(io(h,ao(x,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==r||e[7]!==a||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==i){const x=[];f.has("site-editor")&&x.push({key:"site-editor",label:i("sidebar.projectNav.siteEditor"),icon:n.jsx(qt,{size:16}),panel:"site-editor",isActive:Oi,dataTour:te.siteEditor});const h={assets:{label:i("common.mainPanelTabs.assets"),icon:n.jsx(lo,{size:16})},hosting:{label:i("common.mainPanelTabs.hosting"),icon:n.jsx(_s,{size:16})},e2e:{label:i("common.mainPanelTabs.e2e"),icon:n.jsx(xn,{size:16})},analytics:{label:i("common.mainPanelTabs.analytics"),icon:n.jsx(Lt,{size:16})},cdn:{label:i("common.mainPanelTabs.cdn"),icon:n.jsx(pn,{size:16})},experiments:{label:i("experiments.title"),icon:n.jsx(fn,{size:16})}};for(const g of ro){if(!f.has(g))continue;const v=h[g];x.push({key:g,label:v.label,icon:v.icon,panel:g,isActive:j=>j===g})}for(const g of Pi(Ii(o),(o.connections??[]).map(Ai))){if(g.toolName==="fetch_assets")continue;const v=ws(g.connectionId,g.toolName),j=uo({tabId:v,kind:"expanded",iconUrl:g.icon,connections:[]});x.push({key:`pinned:${g.connectionId}:${g.toolName}`,label:g.label||g.toolName,icon:j.kind==="fallback"?n.jsx(Zn,{size:16}):n.jsx(mo,{icon:j}),panel:v,isActive:y=>y===v})}f.has("automations")&&x.push({key:"automations",label:i("sidebar.projectNav.automations"),icon:n.jsx(Mt,{size:16}),panel:"automations",isActive:Ti,dataTour:te.automations});const b=r.startsWith(D.projects);p=n.jsx(q,{className:"gap-1",children:x.map(g=>n.jsx(ce,{icon:g.icon,label:g.label,dataTour:g.dataTour,isActive:b&&g.isActive(l),trailing:d(g.panel)?n.jsx(tt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{V("project_nav_clicked",{surface:g.key}),a(o.id,{panel:g.panel}),s?.()}},g.key))}),e[4]=l,e[5]=d,e[6]=r,e[7]=a,e[8]=s,e[9]=o,e[10]=f,e[11]=i,e[12]=p}else p=e[12];return p}function Ti(t){return t==="automations"||$s(t)!==null}function Ai(t){return t.connection_id}function Oi(t){return!!t&&Tt(t)}const Ri=3;function Di(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Bn(t)||Vn(t)}function Mi(t,e,s){const i=new Map;for(const a of e){if(!Di(a,s))continue;const r=Fn(a,t);for(const l of r){const c=i.get(l.id)??[];c.push({task:a,only:r.length===1}),i.set(l.id,c)}}const o=new Map;for(const[a,r]of i)r.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(a,r.slice(0,Ri).map(l=>l.task));return o}function Ei(t){const e=S.c(21),{task:s,orgSlug:i,isLast:o,onNavigate:a}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=r):r=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==i||e[4]!==s?(c=qn(i,s),e[3]=i,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==i||e[7]!==c?(d={org:i,taskKey:c},e[6]=i,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==a||e[10]!==s.status?(u=()=>{V("sidebar_attention_task_clicked",{status:s.status}),a?.()},e[9]=a,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Pt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[r,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Li(t){const e=S.c(42),{onNavigate:s}=t,i=z(),o=ie(),[a,r]=T.useState(!1),{granted:l}=Cs("agents:manage"),{org:c,locator:d}=B(),u=$t(),{projects:m}=ke(),f=Ke(),p=dt(),{data:x}=ee.useSession();let h;e[0]!==d||e[1]!==u?(h=Kn(d,u),e[0]=d,e[1]=u,e[2]=h):h=e[2];const b=!o&&!f;let g;e[3]!==h||e[4]!==b?(g={...h,enabled:b},e[3]=h,e[4]=b,e[5]=g):g=e[5];const{data:v}=et(g);if(f||m.length===0&&!l)return null;let j,y,k,N,w,_;if(e[6]!==o||e[7]!==v?.items||e[8]!==p||e[9]!==s||e[10]!==c||e[11]!==m||e[12]!==f||e[13]!==x?.user?.id||e[14]!==i){const Q=Mi(Ln(m),v?.items??[],x?.user?.id);N="flex flex-col gap-2",w=te.projects,e[21]!==o||e[22]!==i?(_=!o&&n.jsx("p",{className:"px-2 text-xs font-medium text-muted-foreground",children:i("sidebar.projects.heading")}),e[21]=o,e[22]=i,e[23]=_):_=e[23],j=q,y="gap-1",k=m.map(A=>{const E=Q.get(A.id)??[];return n.jsx(ce,{icon:n.jsx(ct,{icon:A.icon,name:A.title}),label:A.title,isActive:A.id===f,onSelect:()=>{V("sidebar_project_clicked"),p(A.id,{panel:Ps(A.metadata?.ui?.layout)}),s?.()},children:!o&&E.length>0&&n.jsx("ul",{className:"flex flex-col",children:E.map((K,L)=>n.jsx(Ei,{task:K,orgSlug:c.slug,isLast:L===E.length-1,onNavigate:s},K.id))})},A.id)}),e[6]=o,e[7]=v?.items,e[8]=p,e[9]=s,e[10]=c,e[11]=m,e[12]=f,e[13]=x?.user?.id,e[14]=i,e[15]=j,e[16]=y,e[17]=k,e[18]=N,e[19]=w,e[20]=_}else j=e[15],y=e[16],k=e[17],N=e[18],w=e[19],_=e[20];let $;e[24]!==l||e[25]!==i?($=l&&n.jsx(ce,{icon:n.jsx(Ht,{size:16}),label:i("sidebar.projects.addProject"),onSelect:()=>r(!0)}),e[24]=l,e[25]=i,e[26]=$):$=e[26];let C;e[27]!==j||e[28]!==y||e[29]!==k||e[30]!==$?(C=n.jsxs(j,{className:y,children:[k,$]}),e[27]=j,e[28]=y,e[29]=k,e[30]=$,e[31]=C):C=e[31];let I;e[32]!==a||e[33]!==p||e[34]!==s?(I=a&&n.jsx(T.Suspense,{fallback:null,children:n.jsx(fo,{open:!0,onOpenChange:r,onImportComplete:Q=>{const{virtualMcpId:A}=Q;A&&p(A),s?.()}})}),e[32]=a,e[33]=p,e[34]=s,e[35]=I):I=e[35];let R;return e[36]!==C||e[37]!==I||e[38]!==N||e[39]!==w||e[40]!==_?(R=n.jsxs("div",{className:N,"data-tour":w,children:[_,C,I]}),e[36]=C,e[37]=I,e[38]=N,e[39]=w,e[40]=_,e[41]=R):R=e[41],R}function Fi(){const t=S.c(8),e=z(),{capabilities:s,isPrivileged:i,loading:o,error:a}=Is(),r=Pn().length,l=zs();let c;return t[0]!==s||t[1]!==a||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(bo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(xo,{size:14}),to:"/$org/settings/general"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(go,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(Ft,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Et,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(Ts,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(gn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(jo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(Sn,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(hn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(Qe,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(ho,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(As,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(tt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Os(m.group)?[]:[m]}return o||a?[m]:m.privilegedOnly?i?[m]:[]:m.requires?i||s[m.requires]?[m]:[]:[m]})})).filter(qi),t[0]=s,t[1]=a,t[2]=i,t[3]=r,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function qi(t){return t.items.length>0}function as(){const t=S.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Rs(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:Bi},t[1]=i):i=t[1];const o=Ds(i);let a;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};a=d=>[d.to,...d.group?Ms(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=a}else a=t[4];const r=a;let l;return t[5]!==r||t[6]!==s?(l={org:s,isActive:r},t[5]=r,t[6]=s,t[7]=l):l=t[7],l}function Bi(t){return t.location.pathname}function Vi(){const t=S.c(9),{isActive:e}=as();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[i,o]=T.useState(s);let a;t[1]!==e||t[2]!==i?(a=u=>i[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=i,t[3]=a):a=t[3];const r=a;let l;t[4]!==r?(l=u=>o(m=>({...m,[u.key]:!r(u)})),t[4]=r,t[5]=l):l=t[5];const c=l;let d;return t[6]!==r||t[7]!==c?(d={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=d):d=t[8],d}function Ki(t){const e=S.c(21),{group:s,open:i,onToggle:o,className:a}=t;let r,l,c,d,u;if(e[0]!==a||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==i){u=Symbol.for("react.early_return_sentinel");e:{const x=O("text-xs font-medium text-muted-foreground/60 truncate",a);if(!s.collapsible){u=n.jsx("p",{className:x,children:s.label});break e}r="button",l=o,c=i,d=O("flex w-full items-center gap-1 rounded-lg hover:text-muted-foreground",x)}e[0]=a,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=i,e[5]=r,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else r=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==i?(m=i?n.jsx(po,{size:12}):n.jsx(Es,{size:12}),e[10]=i,e[11]=m):m=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==r||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:r,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=r,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Ui(t){const e=S.c(5),{icon:s,badge:i}=t;let o;e[0]!==i?(o=i?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=i,e[1]=o):o=e[1];let a;return e[2]!==s||e[3]!==o?(a=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=a):a=e[4],a}function rs(t){const e=S.c(24),{onNavigate:s}=t,i=ie(),o=z(),a=Fi(),{org:r,isActive:l}=as(),{isOpen:c,toggle:d}=Vi();let u;if(e[0]!==i||e[1]!==a||e[2]!==l||e[3]!==c||e[4]!==s||e[5]!==r||e[6]!==d){let b;e[8]!==i||e[9]!==l||e[10]!==c||e[11]!==s||e[12]!==r||e[13]!==d?(b=(g,v)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!i&&n.jsx(Ki,{group:g,open:c(g),onToggle:()=>d(g),className:O("px-2 pt-1.5 pb-0.5",v>0&&"mt-3")}),(i||c(g))&&n.jsx(q,{className:"gap-0.5",children:g.items.map(j=>n.jsx(ce,{icon:n.jsx(Ui,{icon:j.icon,badge:j.badge}),label:j.label,isActive:l(j),link:{to:j.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{V("settings_nav_clicked",{section_key:j.key,group_key:g.key}),s?.()}},j.key))})]},g.key),e[8]=i,e[9]=l,e[10]=c,e[11]=s,e[12]=r,e[13]=d,e[14]=b):b=e[14],u=a.map(b),e[0]=i,e[1]=a,e[2]=l,e[3]=c,e[4]=s,e[5]=r,e[6]=d,e[7]=u}else u=e[7];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 hidden"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"shrink-0",children:n.jsx(Xe,{size:14})}),e[16]=f):f=e[16];let p;e[17]!==o?(p=o("settings.nav.signOut"),e[17]=o,e[18]=p):p=e[18];let x;e[19]!==p?(x=n.jsxs("div",{className:"mt-auto flex flex-col pt-4",children:[m,n.jsx(q,{className:"gap-0.5",children:n.jsx(ce,{icon:f,label:p,className:"gap-2.5",onSelect:Wi})})]}),e[19]=p,e[20]=x):x=e[20];let h;return e[21]!==u||e[22]!==x?(h=n.jsxs(n.Fragment,{children:[u,x]}),e[21]=u,e[22]=x,e[23]=h):h=e[23],h}function Wi(){V("signed_out",{source:"settings_sidebar"}),_t(),ee.signOut()}function ls(t){const e=S.c(8),{onNavigate:s}=t,i=z(),{org:o}=B();let a;e[0]!==i?(a=i("settings.nav.backToHome"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let l;return e[4]!==s||e[5]!==a||e[6]!==r?(l=n.jsx(os,{label:a,link:r,onSelect:s}),e[4]=s,e[5]=a,e[6]=r,e[7]=l):l=e[7],l}function cs(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.408.0"]})}),t[0]=e):e=t[0],e}const Hi="pt-1.5";function ds(t){const e=S.c(18),{header:s,back:i,body:o,footer:a,sheet:r}=t;let l;e[0]!==s?(l=s&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==s?(c=s&&n.jsx("div",{className:"hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==o||e[7]!==d?(u=n.jsxs(Us,{className:"gap-0 overflow-y-auto px-2 pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[d,o]}),e[6]=o,e[7]=d,e[8]=u):u=e[8];let m;e[9]!==a||e[10]!==l||e[11]!==c||e[12]!==u?(m=n.jsxs(n.Fragment,{children:[l,c,u,a]}),e[9]=a,e[10]=l,e[11]=c,e[12]=u,e[13]=m):m=e[13];const f=m;if(r){let x;return e[14]!==f?(x=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":te.nav,children:f}),e[14]=f,e[15]=x):x=e[15],x}let p;return e[16]!==f?(p=n.jsx(Ws,{className:Hi,"data-tour":te.nav,children:f}),e[16]=f,e[17]=p):p=e[17],p}function us(t){const e=S.c(8),{onNavigate:s}=t,i=z(),o=Ke(),a=To();if(!o)return null;let r;e[0]!==i?(r=i("sidebar.scope.allProjects"),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==a||e[3]!==s?(l=()=>{a(),s?.()},e[2]=a,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==l?(c=n.jsx(os,{label:r,onSelect:l}),e[5]=r,e[6]=l,e[7]=c):c=e[7],c}function ms(t){const e=S.c(2),{onNavigate:s}=t;let i;return e[0]!==s?(i=n.jsx(Ls,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx($i,{onNavigate:s}),n.jsx(zi,{onNavigate:s}),n.jsx(Ci,{onNavigate:s})]}),n.jsx(Li,{onNavigate:s})]})}),e[0]=s,e[1]=i):i=e[1],i}function Gi(){const t=S.c(3),e=It();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(hi,{}),t[0]=s):s=t[0];let i;return t[1]!==e?(i=n.jsx(ds,{header:s,back:e?n.jsx(ls,{}):n.jsx(us,{}),body:e?n.jsx(rs,{}):n.jsx(ms,{}),footer:e?n.jsx(cs,{}):n.jsx(ci,{})}),t[1]=e,t[2]=i):i=t[2],i}function Qi(t){const e=S.c(13),{onClose:s}=t,i=It();let o;e[0]!==s?(o=n.jsx(bi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let a,r;e[2]!==i||e[3]!==s?(a=i?n.jsx(ls,{onNavigate:s}):n.jsx(us,{onNavigate:s}),r=i?n.jsx(rs,{onNavigate:s}):n.jsx(ms,{onNavigate:s}),e[2]=i,e[3]=s,e[4]=a,e[5]=r):(a=e[4],r=e[5]);let l;e[6]!==i?(l=i?n.jsx(cs,{}):n.jsx(di,{}),e[6]=i,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==a||e[10]!==r||e[11]!==l?(c=n.jsx(ds,{sheet:!0,header:o,back:a,body:r,footer:l}),e[8]=o,e[9]=a,e[10]=r,e[11]=l,e[12]=c):c=e[12],c}const Ji=new Set(["completed","failed","requires_action"]);function Xi(t){const e=S.c(5),[s]=wt();let i;e[0]!==s?(i=a=>{s.enableSounds&&Ji.has(a.data.status)&&vo(yo.dataUri).catch(Yi)},e[0]=s,e[1]=i):i=e[1];let o;e[2]!==t||e[3]!==i?(o={orgSlug:t,onTaskStatus:i},e[2]=t,e[3]=i,e[4]=o):o=e[4],ko(o)}function Yi(t){console.warn("[status-sounds] playback failed:",t)}const Zi=2e3,ea=4e4;function ta(t){return t==="success"||t==="updated"}function sa(t){const e=S.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const i=Fs(s),o=Ct();let a;e[1]!==i.checkout?(a=ta(i.checkout),e[1]=i.checkout,e[2]=a):a=e[2];const r=a,[l]=T.useState(na);let c;e[3]!==t?(c=Me.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Zi:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Me.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==r||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=r,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],et(m)}function na(){return Date.now()+ea}function rl(){const t=S.c(3),{org:e}=B();Xi(e.slug),sa(e.id);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(zo,{}),t[0]=s):s=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ge.Sidebar,{renderMobile:oa,children:n.jsx(Gi,{})}),t[1]=i):i=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Ge,{notice:s,children:[i,n.jsx(Ge.Content,{children:n.jsx(qs,{})})]}),t[2]=o):o=t[2],o}function oa(t){const{onClose:e}=t;return n.jsx(Qi,{onClose:e})}export{rl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,l as d,j as t,n as f,P as c,aq as u,O as x}from"./index-
|
|
1
|
+
import{c as p,l as d,j as t,n as f,P as c,aq as u,O as x}from"./index-izHBwn3I.js";import{u as j}from"./use-mobile-Dn4_VWcj.js";import{R as h}from"./route-page-header-KSRwTD4y.js";import"./LayoutLeft-o4EwT_f4.js";import"./use-in-settings-BA5wQFQ2.js";import"./sheet-DTIr0quY.js";import"./X-7V7RNG20.js";import"./tooltip-DqtfkXwI.js";import"./index-xb9O7QC9.js";import"./toolbar-icon-button-DOCtjUrJ.js";import"./use-project-scope-DIRKMaLK.js";import"./use-virtual-mcp-D8Whl5cH.js";import"./use-mcp-client-CNVDhuvd.js";import"./auth-WDJFc9Hm.js";import"./github-repo-B15wwZ1g.js";function I(){const e=p.c(9),m=j(),n=!m&&"p-1.5";let i;e[0]!==n?(i=d("flex-1 min-h-0",n),e[0]=n,e[1]=i):i=e[1];const l=m?"plain":"card";let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(h,{}),e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(f.Breadcrumbs.Provider,{children:[r,t.jsx(c.Content,{children:t.jsx(u,{children:t.jsx(x,{})})})]}),e[3]=o):o=e[3];let s;e[4]!==l?(s=t.jsx(c,{"data-testid":"settings-panel",variant:l,children:o}),e[4]=l,e[5]=s):s=e[5];let a;return e[6]!==i||e[7]!==s?(a=t.jsx("div",{className:i,children:s}),e[6]=i,e[7]=s,e[8]=a):a=e[8],a}export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,b as C,X as D,k as P,j as _,n as $}from"./index-
|
|
1
|
+
import{c as R,b as C,X as D,k as P,j as _,n as $}from"./index-izHBwn3I.js";import{i as w}from"./LayoutLeft-o4EwT_f4.js";import{i as H,u as B}from"./use-in-settings-BA5wQFQ2.js";import{T as E}from"./toolbar-icon-button-DOCtjUrJ.js";import{a as N}from"./use-project-scope-DIRKMaLK.js";import{d as V}from"./use-virtual-mcp-D8Whl5cH.js";function J(m){const e=R.c(44),{actions:x,navigation:T}=m,t=C(),{org:a}=D(),o=N(),v=V(o),y=H(),{toggleSidebar:I}=B();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={select:z},e[0]=p):p=e[0];const f=P(p),r=f?.mainView==="overview";let d;e[1]!==v?.title||e[2]!==t?(d=v?.title??t("common.loading"),e[1]=v?.title,e[2]=t,e[3]=d):d=e[3];const n=d;let b;e[4]!==r||e[5]!==f?.pageTitle||e[6]!==n||e[7]!==o||e[8]!==t?(b=r?o?n:t("sidebar.navDestinations.home"):t(f?.pageTitle??"page.view"),e[4]=r,e[5]=f?.pageTitle,e[6]=n,e[7]=o,e[8]=t,e[9]=b):b=e[9];const u=b;let l;if(e[10]!==y||e[11]!==r||e[12]!==a||e[13]!==n||e[14]!==o||e[15]!==t||e[16]!==u){if(l=[],y){let s;e[18]!==t?(s=t("sidebar.navDestinations.settings"),e[18]=t,e[19]=s):s=e[19];let i;e[20]!==a.slug?(i={to:"/$org/settings/general",params:{org:a.slug}},e[20]=a.slug,e[21]=i):i=e[21];let k;e[22]!==s||e[23]!==i?(k={key:"settings",label:s,link:i},e[22]=s,e[23]=i,e[24]=k):k=e[24],l.push(k)}else if(o&&!r){let s;e[25]!==a.slug||e[26]!==o?(s={to:"/$org/projects/$agentId",params:{org:a.slug,agentId:o}},e[25]=a.slug,e[26]=o,e[27]=s):s=e[27];let i;e[28]!==n||e[29]!==s?(i={key:"project",label:n,link:s},e[28]=n,e[29]=s,e[30]=i):i=e[30],l.push(i)}let S;e[31]!==u?(S={key:"page",label:u},e[31]=u,e[32]=S):S=e[32],l.push(S),e[10]=y,e[11]=r,e[12]=a,e[13]=n,e[14]=o,e[15]=t,e[16]=u,e[17]=l}else l=e[17];let c;e[33]!==t?(c=t("layouts.shellControls.toggleSidebar"),e[33]=t,e[34]=c):c=e[34];let h;e[35]===Symbol.for("react.memo_cache_sentinel")?(h=_.jsx(w,{size:16}),e[35]=h):h=e[35];let g;e[36]!==c||e[37]!==I?(g=_.jsx(E,{className:"md:hidden",onClick:I,"aria-label":c,children:h}),e[36]=c,e[37]=I,e[38]=g):g=e[38];let j;return e[39]!==x||e[40]!==l||e[41]!==T||e[42]!==g?(j=_.jsx($.Header,{leading:g,breadcrumbs:l,actions:x,navigation:T}),e[39]=x,e[40]=l,e[41]=T,e[42]=g,e[43]=j):j=e[43],j}function z(m){return m.matches.findLast(L)?.staticData}function L(m){return m.staticData.pageTitle}export{J as R};
|
package/dist/client/assets/{runnable-block-editor-BW1O_q1l.js → runnable-block-editor-CJpnHgrX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as kr,c as B,o as Mn,m as Q0,K as Q9,b as u9,j as r,l as H,B as h9,Y as Pn,aD as Nr,e as In,r as I,t as A9,aL as Tr,aM as J9,n as _r,aJ as Fn,F as ce,ak as Le,G as N9,H as G9,I as H9,aN as de,aI as Ie,aH as Cr,h as x0,aO as Er,E as wr,aP as Ar,an as Rr,ao as Mr}from"./index-la7MvvCD.js";import{u as Ke}from"./use-session-runtime-DX22bfMF.js";import{u as Ge,H as Pr,g as On,I as D9,J as Dn,r as F9,K as Ir,b as b9,P as X9,L as e0,N as I0,M as S9,O as Ft,Q as u0,C as Fr,w as Or,x as Dr,y as $r,t as zr,l as Br,T as $n,m as zn,U as Ot,V as Vr,W as Ur,X as Bn,Y as _0,k as Kr,Z as Gr,v as Hr,_ as qr,$ as Yr,a0 as Wr}from"./claim-phase-copy-BwvtJUCV.js";import{e as Vn}from"./backoff-8mStPHYB.js";import{a4 as Jr,a5 as Zr,a6 as Qr,a7 as Xr,a8 as ei,a9 as ti,aa as ni,ab as si,U as ri,ac as Un,ad as ue,u as ii,ae as Kn,$ as A0,S as oi,r as ai,af as li,ag as Dt,ah as ci,a3 as Li,C as di,ai as ui,aj as fi}from"./agent-icon-BVQ4eiSp.js";import{i as Gn}from"./Sun-BIEAAQBy.js";import{S as $t}from"./sandbox-start-errors-BK_aDCyt.js";import{G as mi}from"./pair-BvJe2vuW.js";import{i as q9}from"./Check-D8fh3HxN.js";import{i as He,c as pi,d as hi,e as gi,b as xi}from"./Tool01-wdU6mbFw.js";import{e as fe,C as me,b as K9,a as f0,c as pe,d as qe,f as yi}from"./command-CaEhDN7h.js";import{a as F0,b as O0,P as D0}from"./popover-57eEekDu.js";import{s as vi,a as bi,b as ji}from"./utils-CqblQM8O.js";import{u as Hn}from"./chat-context-BSiYT6x-.js";import{n as qn}from"./LinkExternal01-6pj5RpJR.js";import{i as Yn}from"./X-BwnLOPPu.js";import{S as Wn}from"./scroll-area-DtUzJSfO.js";import{T as _9,a as C9,c as E9}from"./tooltip-CoZI31uD.js";import{a as Ye,d as Si}from"./use-virtual-mcp-CWjAgZ_C.js";import{M as Jn}from"./monaco-editor-DNIvxekG.js";import{C as ki}from"./calendar-C0TNAbuF.js";import{I as R9}from"./input-BCLmKz5x.js";import{T as Ni}from"./textarea-qfhaNSmC.js";import{L as $9}from"./label-2xig-2_L.js";import{u as T9}from"./use-new-blocks-editor-CB_7yWVh.js";import{i as Ti}from"./XClose-mbsgepx1.js";import{s as y0}from"./Plus-dO-o-OZ1.js";import{E as s0,M as _i,m as Ci,g as $0,u as Ei,s as wi,a as Ai,b as Ri}from"./index-C-zKandM.js";import{S as he,b as ge,a as xe,d as ye,c as m0}from"./select-Z1B5hMAv.js";import{a as Mi}from"./Palette-DWn5bbaO.js";import{T as M9,R as Pi,u as We,C as Je,a as Ze,b as p0,s as Qe,K as Xe,P as et,D as tt,c as nt,S as st,v as rt,d as it,e as X0}from"./rich-text-link-control-B1xoqjFM.js";import{S as ot}from"./switch-CtDu-MBx.js";import{a as ve}from"./Copy01-D1VXAb_E.js";import{s as Ii}from"./Eye-CHDK5SzP.js";import{s as r0}from"./Trash01-Dy5IpZCR.js";import{t as z0}from"./ChevronUp-B02P5KVq.js";import{d as N0,i as Zn}from"./UserSquare-XdFChMN5.js";import{i as l0}from"./Share07-CpK9-QLV.js";import{C as Fi}from"./combobox-mwCqJmES.js";import{A as Oi,a as Di,b as $i,c as zi,g as Bi,d as Vi,e as Ui,f as Ki}from"./alert-dialog-CZds33Na.js";import{d as at,h as lt,c as ct,e as Qn,b as Lt,D as dt}from"./dialog-DJsfAYzZ.js";import{b as ut}from"./sandbox-url-D3mC8qhT.js";import{i as Fe}from"./ZoomOut-D1F1D8yI.js";import{i as B0}from"./Upload01-k78JIhqS.js";import{i as Xn}from"./AlertCircle-CqiDjZtO.js";import{i as es}from"./DotsVertical-BRGjxbLE.js";import{a as h0}from"./Image01-Bospa-dw.js";import{S as Gi}from"./search-input-QqxNG-MM.js";import{T as Hi,a as qi,c as Yi,b as Wi}from"./tabs-Q0hITVpE.js";import{u as Ji}from"./use-debounced-value-B-zmOhoh.js";import{u as Zi,a as ts}from"./use-file-configs-yZYdsSBL.js";import{u as Qi,a as ft,i as ns,e as Xi,b as zt,f as e1}from"./asset-utils-BlHyLIZk.js";import{m as ss}from"./match-site-slug-config-D3fUJ6vX.js";import{a as t1,T as n1}from"./toggle-group-DPbXSYWV.js";import{b as s1,a as r1}from"./thread-intent-CqTshOQy.js";import{o as i1}from"./sandbox-git-api-B1R0585s.js";const mt=kr("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),o1="website/loaders/secret.ts",a1=["website/actions/secrets/encrypt.ts","$live/actions/secrets/encrypt.ts"],l1=/^(?:[0-9a-f]{2})*$/i;function R0(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t.__resolveType;return typeof e=="string"&&(e.endsWith("/secret.ts")||e.includes("loaders/secret"))}function pt(t){return typeof t=="string"&&l1.test(t)}class c1 extends Error{constructor(e){super(`Secret at "${e}" is not encrypted. Re-enter it in the Secret field so it is encrypted before saving.`),this.path=e,this.name="PlaintextSecretError"}path}function Oe(t,e=""){if(Array.isArray(t))return t.map((s,i)=>Oe(s,`${e}/${i}`));if(!t||typeof t!="object")return t;const n=Object.entries(t);if(R0(t)){const s=t.encrypted;if(s!==void 0&&!pt(s))throw new c1(e||"/");return Object.fromEntries(n.filter(([i])=>i!=="value"))}return Object.fromEntries(n.map(([s,i])=>[s,Oe(i,`${e}/${s}`)]))}function ht(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function Bt(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function rs(t,e){return ut(t,e)}function L1(t,e){return ut(t,"preview-fetch",{path:e})}function d1(t){return rs(t,"preview-invoke")}function K4(t){return rs(t,"catalog-invoke")}function is(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function u1(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&is(n))return n}return null}function os(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??u1();return n&&is(n)?new URL(e,n).toString():L1(t,e)}function f1(t){return os(t,"/.decofile")}function m1(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function Vt(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function as(t,e){const n=ut(t,"read"),s=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=m1(s.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const a=new Error(`Failed to read ${e}: ${s.status}`);throw a.status=s.status,a}const o=await s.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(vi(o.content))}}catch{return{kind:"unavailable"}}}async function p1(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const s=new Error(`Failed to read committed meta: ${n.status}`);throw s.status=n.status,s}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function gt(t){return Ye(t)?.metadata?.runtime?.path??null}function ls(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function G4(t,e){const n=B.c(16),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=t?ls({...t,localPreviewUrl:s}):"",a=e?.fetchEnabled??!0,l=gt(t?.virtualMcpId),c=Ke(t?.virtualMcpId).runtime==="cms",L=Mn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==a||n[2]!==i||n[3]!==s||n[4]!==l||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const v=await fetch(new URL("/.decofile",s).toString(),{cache:"no-store"}).catch(x1),k=v?.ok?Bt(await v.text()):null;if(k)return k;const j=new Error("decofile unavailable (local tunnel unreachable)");throw j.status=502,j}if(c)return Pr(L,t);const p=()=>as(t,ht(l,".deco/blocks.gen.json"));if(a){const v=await fetch(f1(t),{cache:"no-store"}).catch(g1);if(v?.ok){const x=Bt(await v.text());if(x)return x}const k=await p();if(k.kind==="data")return k.data;const j=new Error(`Failed to fetch decofile: ${v?.status??"network error"}`);throw j.status=Vt({liveOk:!!v?.ok,liveStatus:v?.status,committedAbsent:k.kind==="absent"}),j}const g=await p();if(g.kind==="data")return g.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=Vt({liveOk:!1,committedAbsent:g.kind==="absent"}),h},n[0]=c,n[1]=a,n[2]=i,n[3]=s,n[4]=l,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let y;n[8]!==c||n[9]!==i?(y=(p,g)=>{if(c||i)return p<3;const h=g.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=y):y=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==y?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:y,retryDelay:h1},n[11]=d,n[12]=u,n[13]=f,n[14]=y,n[15]=m):m=n[15],Q0(m)}function h1(t){return Vn(5e3,1e3,t,2,0)}function g1(){return null}function x1(){return null}const y1=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function v1(t){return t.includes("matchers")||t.includes("Match")}function cs(t,e){const n=t.__resolveType;return typeof n!="string"||!n||y1.has(n)?!1:e?Ir(e,n):v1(n)}function b1(t,e){const n=[];for(const[s,i]of Object.entries(e)){if(s.includes("/")||!D9(s)||Dn(s)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;cs(o,t)&&n.push({blockKey:s,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((s,i)=>(s.name??s.blockKey).localeCompare(i.name??i.blockKey))}function v0(t,e,n){if(!t)return!1;const s=t.__resolveType;if(typeof s!="string"||!D9(s)||!Object.hasOwn(e,s))return!1;const i=e[s];return!i||typeof i!="object"||Array.isArray(i)?!1:cs(i,n)}function j1(t,e,n){return v0(t,e,n)?t?.__resolveType??null:null}function Ls(t,e,n){if(!t)return null;const s=t.__resolveType??"";if(!s)return null;if(v0(t,e,n)){const a=e[s]??{},l=a.__resolveType??s,{__resolveType:c,name:L,...d}=a;return{resolveType:l,data:d,blockKey:s}}const{__resolveType:i,...o}=t;return{resolveType:s,data:o}}function ds(t,e,n){const s=Ls(t,e,n);return s?{__resolveType:s.resolveType,...s.data}:{__resolveType:""}}function xt(t,e,n){if(t)return v0(t,e,n)?ds(t,e,n):t}function T0(t,e,n,s){if(!t)return"Default";if(v0(t,e,s)){const i=t.__resolveType??"",o=e[i];return On(i,o)}return n(t)}function S1(t,e,n){return{__resolveType:t,...e,name:n}}function k1(t){return{__resolveType:t}}function N1(t,e,n){const s=Ls(t,e,n);return s?{resolveType:s.resolveType,formValue:s.data}:{resolveType:"",formValue:{}}}function T1(t,e){const n={__resolveType:t};if(!t||!e)return n;const s=F9(t,e),i=s?.type==="inline-union"?s.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function _1(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function C1(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function H4(t,e){const n=B.c(21),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=i||(e?.fetchEnabled??!0),a=s??t?.previewUrl,l=gt(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=Ke(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==a||n[2]!==c?(u=t?C1({...t,previewUrl:a,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=a,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==l||n[8]!==t||n[9]!==a||n[10]!==c?(f=async()=>{const h=w1,v=()=>d?p1(t):as(t,ht(l,".deco/meta.gen.json")),k=i&&a?[{kind:"live",baseUrl:a}]:_1({fetchEnabled:o,previewUrl:a,productionUrl:c,fastPreviewActive:d});for(const x of k){if(x.kind==="committed"){const S=await v();if(S.kind==="data")return S.data;continue}const b=await h(x.baseUrl);if(b)return b}const j=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw j.status=502,j},n[4]=d,n[5]=o,n[6]=i,n[7]=l,n[8]=t,n[9]=a,n[10]=c,n[11]=f):f=n[11];const y=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,v)=>(d||i||v.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let g;return n[15]!==u||n[16]!==f||n[17]!==y||n[18]!==m||n[19]!==p?(g={queryKey:u,queryFn:f,enabled:y,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:E1},n[15]=u,n[16]=f,n[17]=y,n[18]=m,n[19]=p,n[20]=g):g=n[20],Q0(g)}function E1(t){return Vn(5e3,1e3,t,2,0)}async function w1(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(A1);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function A1(){return null}function Ee(t,e,n){const s=n[t];return typeof s?.name=="string"&&s.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function q4(t,e){return t.map((n,s)=>{const i=n.__resolveType??"",o=b9(i);if(!o&&i!==""&&D9(i)&&i in e)return{index:s,resolveType:i,label:Ee(i,s,e),isLazy:!1,isSavedBlock:!0};const a=o?n.section:void 0,l=o?a?.__resolveType??"":i;if(l===X9||l===e0){const L=o?a:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===I0){const y=d[0]?.value??{};let m=y.__resolveType??"";const p=b9(m);let g=y;if(p){const h=y.section;m=h?.__resolveType??m,h&&(g=h)}if(m===X9||m===e0){const v=(Array.isArray(g.variants)?g.variants:[])[0]?.value?.__resolveType,k=v?S9(v):"Section";return{index:s,resolveType:i,label:`Variants of ${k}`,variantOf:k,isHidden:!0,isLazy:p}}return m!==""&&D9(m)&&m in e?{index:s,resolveType:i,label:Ee(m,s,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:s,resolveType:i,label:S9(m)||`Section ${s+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?S9(u):"Section";return{index:s,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&D9(c)&&c in e?{index:s,resolveType:i,label:Ee(c,s,e),isLazy:!0,isSavedBlock:!0}:{index:s,resolveType:i,label:S9(c)||`Section ${s+1}`,isLazy:o}})}function us(t){const e=t.__resolveType??"";return b9(e)?t.section??t:t}function ee(t){const i=(b9(t.__resolveType??"")?t.section:t)?.variants?.[0];return i?.rule?.__resolveType!==I0?null:i?.value??null}function Y4(t){const e=us(t);return{__resolveType:e0,variants:[{value:e,rule:{__resolveType:I0}}]}}function W4(t){const e=t.__resolveType??"";if(!e)return null;if(b9(e))return t.section??null;const n=ee(t);return n?b9(n.__resolveType??"")?n:{__resolveType:Ft,section:us(n)}:{__resolveType:Ft,section:t}}function G0(t){const e=t.__resolveType??"";if(!e)return null;if(b9(e)){const n=t.section,s=n?.__resolveType??"";return!s||!n?null:{resolveType:s,data:n}}return{resolveType:e,data:t}}function J4(t){const e=ee(t);if(e)return G0(e);if(b9(t.__resolveType??"")){const s=t.section;if(!s)return null;const i=ee(s);return G0(i||s)}return G0(t)}function Z4(t){return ee(t)}const R1=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function yt(t){if(!t)return!1;const e=t.__resolveType??"";return e===""?Object.keys(t).length===0:R1.includes(e)||e.includes("always")}function M1(t){const e=t.variants??[];if(e.length===0)return-1;const n=e.findIndex(s=>yt(s.rule));return n!==-1?n:e.length-1}function Q4(t,e,n){const s=n.variants??[];if(s.length===0)return null;const i=M1(n),o=s[i]?.value;if(!o)return null;const a=structuredClone(o);return e.isLazy?{...t,section:a}:a}function fs(t,e){return e.isMultivariate?e.isLazy?t.section??null:t:null}function X4(t,e){return Array.isArray(t.variants)?t.variants.map((n,s)=>({label:e(n.rule)||`Variant ${s+1}`,value:n.value??{},rule:n.rule})):[]}function e5(t,e){const n=t.__resolveType??"";if(!n)return null;if(b9(n)){const s=t.section??t,i=s.__resolveType??n;if(!i.includes("/")&&i in e){const o=e[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...s},resolveType:i}}if(!n.includes("/")&&n in e){const s=e[n]??{};return{data:{...s},resolveType:s.__resolveType??n}}return{data:{...t},resolveType:n}}function P1(t,e){const n=t.__resolveType??"";return b9(n)?{...t,section:e}:e}function I1(t,e,n){return e.isLazy?{...t,section:n}:n}function t5(t,e,n){const s=[...t.variants??[]],i=s[e];if(!i)return t;const o=i.value??{};return s[e]={...i,value:P1(o,n)},{...t,variants:s}}function n5(t,e,n){const s=[...t.variants??[]];return s[e]?(s[e]={...s[e],rule:n},{...t,variants:s}):t}function s5(t,e){const n=[...t.variants??[]],s=n[e];return s?(n.splice(e+1,0,structuredClone(s)),{...t,variants:n}):t}function r5(t,e,n){const s=[...t.variants??[]];if(e===n||e<0||n<0||e>=s.length||n>=s.length)return t;const[i]=s.splice(e,1);return i?(s.splice(n,0,i),{...t,variants:s}):t}function i5(t,e){const n=[...t.variants??[]];return n.length<=1?null:(n.splice(e,1),{...t,variants:n})}function De(t){return{rule:u0(),value:structuredClone(t)}}function ms(t,e){return{...e,__resolveType:e0,variants:t}}function o5(t){return t.isHidden!==!0&&t.isSavedBlock!==!0}function F1(t,e){if(e.isHidden)return null;if(e.isMultivariate){const s=fs(t,e)?.variants??[],i=s[s.length-1]?.value;return i?structuredClone(i):null}if(e.isLazy){const n=t.section;return n?structuredClone(n):null}return structuredClone(t)}function O1(t,e,n){if(e.isMultivariate||e.isHidden)return null;const s=F1(t,e);if(!s)return null;const i=ms([De(s),De(s)]);return e.isLazy?{...t,section:i}:i}function a5(t,e,n){if(e.isHidden||e.isSavedBlock)return null;if(e.isMultivariate){const i=fs(t,e);if(!i)return null;const o=i.variants??[],a=o[o.length-1]?.value;if(!a)return null;const l=ms([...o,De(a)],i);return{section:I1(t,e,l),newVariantIndex:o.length}}const s=O1(t,e);return s?{section:s,newVariantIndex:1}:null}function be(t){return t.anyOfRefs?.some(e=>e.resolveType!==X9?!1:e.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function D1(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;return e.__resolveType===e0&&Array.isArray(e.variants)}function te(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.__resolveType===X9}function $1(t){if(!te(t))return null;const e=t.variants;if(!Array.isArray(e))return null;const n=e[0]?.value;return Array.isArray(n)?n:null}function z1(t,e){if(!te(t))return e;const n=structuredClone(t),s=[...n.variants??[]];return s.length===0?s.push({rule:u0(),value:e}):s[0]={...s[0],value:e},{...n,variants:s}}function l5(t,e){const s=t[e]?.sections;if(!s||Array.isArray(s))return 1;const i=s;return Array.isArray(i.variants)?i.variants.length:1}function c5(t,e,n){const i=t[e]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const a=o[n];return Array.isArray(a?.value)?a.value:[]}}return[]}function B1(t,e,n){if(Array.isArray(t))return[{label:"Default",sections:t}];if(t&&typeof t=="object"){const s=t;if(Array.isArray(s.variants)){const i=s.variants,o=i.map(c=>T0(c.rule,e,n)),a=o.reduce((c,L)=>(c[L]=(c[L]??0)+1,c),{}),l={};return i.map((c,L)=>{const d=o[L]??`Variant ${L+1}`,u=a[d]??1;let f=d;return u>1&&(l[d]=(l[d]??0)+1,f=`${d} ${l[d]}`),{label:f||`Variant ${L+1}`,sections:Array.isArray(c.value)?c.value:[],rule:c.rule}})}}return[]}function k0(t){return{rule:u0(),value:t}}function L0(t,e){return{...e,__resolveType:X9,variants:t}}function L5(t,e){const n=structuredClone(e);if(Array.isArray(t))return L0([k0(t),k0(n)]);if(t&&typeof t=="object"){const s=t;return Array.isArray(s.variants)?L0([...s.variants,k0(n)],s):null}return L0([k0([]),k0(n)])}function d5(t){const e=t.variants;return Array.isArray(e)?e.length-1:1}function u5(t,e){const n=t[e];if(!n)return null;const s=[...t];return s.splice(e+1,0,structuredClone(n)),s}function f5(t,e){if(e.length===0)return L0([],t);if(e.length===1){const n=e[0],s=n?.rule;if(!yt(s))return L0(e,t);if(Array.isArray(n?.value))return n.value}return L0(e,t)}function V1(t,e,n){const s=[];for(const[o,a]of Object.entries(t))o!==e&&s.push(a);const i=new Set;for(;s.length>0;){const o=s.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const a of o)s.push(a);continue}n(o);for(const a of Object.values(o))s.push(a)}}}function m5(t,e,n){if(!e)return 0;let s=0;return V1(t,e,i=>{i.__resolveType===e&&v0(i,t,n)&&s++}),s}const U1={provision:0,cloning:1,install:2,dev:3};function K1(t){return U1[t.step]}const Ut=48,ps=28,hs=3,G1=(()=>{const t=[];let e=0;for(let n=0;n<Ut;n++)n===ps?t.push(null):(t.push(e/(Ut-1)*hs),e++);return t})();function H1(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function q1(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?Fr[e.kind].long:n[t.step]}const O9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",Y1=Array.from({length:35},()=>Math.random()*1.8),W1=Array.from({length:35},()=>Math.random()<.4);function J1(t){const e=B.c(31),{progress:n,claimPhase:s}=t,i=u9();let o;e[0]!==n?(o=K1(n),e[0]=n,e[1]=o):o=e[1];const a=o;let l;e[2]!==s||e[3]!==n||e[4]!==i?(l=q1(n,s,H1(i)),e[2]=s,e[3]=n,e[4]=i,e[5]=l):l=e[5];const c=l;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(mi,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=r.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,r.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(Z1,{}),e[10]=f):f=e[10];let y;e[11]!==a?(y=r.jsx(H0,{phase:0,current:a,children:f}),e[11]=a,e[12]=y):y=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(X1,{}),e[13]=m):m=e[13];let p;e[14]!==a?(p=r.jsx(H0,{phase:1,current:a,children:m}),e[14]=a,e[15]=p):p=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(eo,{}),e[16]=g):g=e[16];let h;e[17]!==a?(h=r.jsx(H0,{phase:2,current:a,children:g}),e[17]=a,e[18]=h):h=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx(no,{}),e[19]=v):v=e[19];let k;e[20]!==a?(k=r.jsx(H0,{phase:3,current:a,children:v}),e[20]=a,e[21]=k):k=e[21];let j;e[22]!==h||e[23]!==k||e[24]!==y||e[25]!==p?(j=r.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[y,p,h,k]}),e[22]=h,e[23]=k,e[24]=y,e[25]=p,e[26]=j):j=e[26];let x;e[27]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx("style",{children:`
|
|
1
|
+
import{aK as kr,c as B,o as Mn,m as Q0,K as Q9,b as u9,j as r,l as H,B as h9,Y as Pn,aD as Nr,e as In,r as I,t as A9,aL as Tr,aM as J9,n as _r,aJ as Fn,F as ce,ak as Le,G as N9,H as G9,I as H9,aN as de,aI as Ie,aH as Cr,h as x0,aO as Er,E as wr,aP as Ar,an as Rr,ao as Mr}from"./index-izHBwn3I.js";import{u as Ke}from"./use-session-runtime-CHP3YGA3.js";import{u as Ge,H as Pr,g as On,I as D9,J as Dn,r as F9,K as Ir,b as b9,P as X9,L as e0,N as I0,M as S9,O as Ft,Q as u0,C as Fr,w as Or,x as Dr,y as $r,t as zr,l as Br,T as $n,m as zn,U as Ot,V as Vr,W as Ur,X as Bn,Y as _0,k as Kr,Z as Gr,v as Hr,_ as qr,$ as Yr,a0 as Wr}from"./claim-phase-copy-Dvvzpbgr.js";import{e as Vn}from"./backoff-8mStPHYB.js";import{a4 as Jr,a5 as Zr,a6 as Qr,a7 as Xr,a8 as ei,a9 as ti,aa as ni,ab as si,U as ri,ac as Un,ad as ue,u as ii,ae as Kn,$ as A0,S as oi,r as ai,af as li,ag as Dt,ah as ci,a3 as Li,C as di,ai as ui,aj as fi}from"./agent-icon-CP5XN9a-.js";import{i as Gn}from"./Sun-Dc2rioTm.js";import{S as $t}from"./sandbox-start-errors-BK_aDCyt.js";import{G as mi}from"./pair-BJZlwx5z.js";import{i as q9}from"./Check-e9hufNdV.js";import{i as He,c as pi,d as hi,e as gi,b as xi}from"./Tool01-DAfFPt6l.js";import{e as fe,C as me,b as K9,a as f0,c as pe,d as qe,f as yi}from"./command-BXe_2Y8J.js";import{a as F0,b as O0,P as D0}from"./popover-BiGAM8js.js";import{s as vi,a as bi,b as ji}from"./utils-Dn4NkWqd.js";import{u as Hn}from"./chat-context-B6r2nJ6g.js";import{n as qn}from"./LinkExternal01-E0yllQfW.js";import{i as Yn}from"./X-7V7RNG20.js";import{S as Wn}from"./scroll-area-DQZQeCpt.js";import{T as _9,a as C9,c as E9}from"./tooltip-DqtfkXwI.js";import{a as Ye,d as Si}from"./use-virtual-mcp-D8Whl5cH.js";import{M as Jn}from"./monaco-editor-BhwzWl9K.js";import{C as ki}from"./calendar-C9s_iZ3-.js";import{I as R9}from"./input-BLSONHqE.js";import{T as Ni}from"./textarea-tfNNqm-_.js";import{L as $9}from"./label-BIuQy2__.js";import{u as T9}from"./use-new-blocks-editor-_DNbqg93.js";import{i as Ti}from"./XClose-CgE_NvFQ.js";import{s as y0}from"./Plus-BfQMVZRL.js";import{E as s0,M as _i,m as Ci,g as $0,u as Ei,s as wi,a as Ai,b as Ri}from"./index-B7X5CqyW.js";import{S as he,b as ge,a as xe,d as ye,c as m0}from"./select-BsUP6XU-.js";import{a as Mi}from"./Palette-DdJDZNuI.js";import{T as M9,R as Pi,u as We,C as Je,a as Ze,b as p0,s as Qe,K as Xe,P as et,D as tt,c as nt,S as st,v as rt,d as it,e as X0}from"./rich-text-link-control-DxPxXWmB.js";import{S as ot}from"./switch-BjEW4lQy.js";import{a as ve}from"./Copy01-Rd2DUITb.js";import{s as Ii}from"./Eye-CATcYqq7.js";import{s as r0}from"./Trash01-BpbNxWxU.js";import{t as z0}from"./ChevronUp-Dijj6L1D.js";import{d as N0,i as Zn}from"./UserSquare-CMMvch3p.js";import{i as l0}from"./Share07-CAPMGK5H.js";import{C as Fi}from"./combobox--akRwZt5.js";import{A as Oi,a as Di,b as $i,c as zi,g as Bi,d as Vi,e as Ui,f as Ki}from"./alert-dialog-DOZYkVkM.js";import{d as at,h as lt,c as ct,e as Qn,b as Lt,D as dt}from"./dialog-B9AmIVi-.js";import{b as ut}from"./sandbox-url-D3mC8qhT.js";import{i as Fe}from"./ZoomOut-9vKhCWKn.js";import{i as B0}from"./Upload01-Cu5y084h.js";import{i as Xn}from"./AlertCircle-B4TBXI97.js";import{i as es}from"./DotsVertical-CUOWG-18.js";import{a as h0}from"./Image01-CK0bgOXc.js";import{S as Gi}from"./search-input-BQOyz7rC.js";import{T as Hi,a as qi,c as Yi,b as Wi}from"./tabs-UXACuQIA.js";import{u as Ji}from"./use-debounced-value-D1fDrXmw.js";import{u as Zi,a as ts}from"./use-file-configs-D0LRhOPo.js";import{u as Qi,a as ft,i as ns,e as Xi,b as zt,f as e1}from"./asset-utils-KW2eRq0C.js";import{m as ss}from"./match-site-slug-config-D3fUJ6vX.js";import{a as t1,T as n1}from"./toggle-group-DfCcVTyX.js";import{b as s1,a as r1}from"./thread-intent-EOvgTchU.js";import{o as i1}from"./sandbox-git-api-B1R0585s.js";const mt=kr("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),o1="website/loaders/secret.ts",a1=["website/actions/secrets/encrypt.ts","$live/actions/secrets/encrypt.ts"],l1=/^(?:[0-9a-f]{2})*$/i;function R0(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t.__resolveType;return typeof e=="string"&&(e.endsWith("/secret.ts")||e.includes("loaders/secret"))}function pt(t){return typeof t=="string"&&l1.test(t)}class c1 extends Error{constructor(e){super(`Secret at "${e}" is not encrypted. Re-enter it in the Secret field so it is encrypted before saving.`),this.path=e,this.name="PlaintextSecretError"}path}function Oe(t,e=""){if(Array.isArray(t))return t.map((s,i)=>Oe(s,`${e}/${i}`));if(!t||typeof t!="object")return t;const n=Object.entries(t);if(R0(t)){const s=t.encrypted;if(s!==void 0&&!pt(s))throw new c1(e||"/");return Object.fromEntries(n.filter(([i])=>i!=="value"))}return Object.fromEntries(n.map(([s,i])=>[s,Oe(i,`${e}/${s}`)]))}function ht(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function Bt(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function rs(t,e){return ut(t,e)}function L1(t,e){return ut(t,"preview-fetch",{path:e})}function d1(t){return rs(t,"preview-invoke")}function K4(t){return rs(t,"catalog-invoke")}function is(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function u1(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&is(n))return n}return null}function os(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??u1();return n&&is(n)?new URL(e,n).toString():L1(t,e)}function f1(t){return os(t,"/.decofile")}function m1(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function Vt(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function as(t,e){const n=ut(t,"read"),s=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=m1(s.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const a=new Error(`Failed to read ${e}: ${s.status}`);throw a.status=s.status,a}const o=await s.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(vi(o.content))}}catch{return{kind:"unavailable"}}}async function p1(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const s=new Error(`Failed to read committed meta: ${n.status}`);throw s.status=n.status,s}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function gt(t){return Ye(t)?.metadata?.runtime?.path??null}function ls(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function G4(t,e){const n=B.c(16),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=t?ls({...t,localPreviewUrl:s}):"",a=e?.fetchEnabled??!0,l=gt(t?.virtualMcpId),c=Ke(t?.virtualMcpId).runtime==="cms",L=Mn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==a||n[2]!==i||n[3]!==s||n[4]!==l||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const v=await fetch(new URL("/.decofile",s).toString(),{cache:"no-store"}).catch(x1),k=v?.ok?Bt(await v.text()):null;if(k)return k;const j=new Error("decofile unavailable (local tunnel unreachable)");throw j.status=502,j}if(c)return Pr(L,t);const p=()=>as(t,ht(l,".deco/blocks.gen.json"));if(a){const v=await fetch(f1(t),{cache:"no-store"}).catch(g1);if(v?.ok){const x=Bt(await v.text());if(x)return x}const k=await p();if(k.kind==="data")return k.data;const j=new Error(`Failed to fetch decofile: ${v?.status??"network error"}`);throw j.status=Vt({liveOk:!!v?.ok,liveStatus:v?.status,committedAbsent:k.kind==="absent"}),j}const g=await p();if(g.kind==="data")return g.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=Vt({liveOk:!1,committedAbsent:g.kind==="absent"}),h},n[0]=c,n[1]=a,n[2]=i,n[3]=s,n[4]=l,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let y;n[8]!==c||n[9]!==i?(y=(p,g)=>{if(c||i)return p<3;const h=g.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=y):y=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==y?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:y,retryDelay:h1},n[11]=d,n[12]=u,n[13]=f,n[14]=y,n[15]=m):m=n[15],Q0(m)}function h1(t){return Vn(5e3,1e3,t,2,0)}function g1(){return null}function x1(){return null}const y1=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function v1(t){return t.includes("matchers")||t.includes("Match")}function cs(t,e){const n=t.__resolveType;return typeof n!="string"||!n||y1.has(n)?!1:e?Ir(e,n):v1(n)}function b1(t,e){const n=[];for(const[s,i]of Object.entries(e)){if(s.includes("/")||!D9(s)||Dn(s)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;cs(o,t)&&n.push({blockKey:s,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((s,i)=>(s.name??s.blockKey).localeCompare(i.name??i.blockKey))}function v0(t,e,n){if(!t)return!1;const s=t.__resolveType;if(typeof s!="string"||!D9(s)||!Object.hasOwn(e,s))return!1;const i=e[s];return!i||typeof i!="object"||Array.isArray(i)?!1:cs(i,n)}function j1(t,e,n){return v0(t,e,n)?t?.__resolveType??null:null}function Ls(t,e,n){if(!t)return null;const s=t.__resolveType??"";if(!s)return null;if(v0(t,e,n)){const a=e[s]??{},l=a.__resolveType??s,{__resolveType:c,name:L,...d}=a;return{resolveType:l,data:d,blockKey:s}}const{__resolveType:i,...o}=t;return{resolveType:s,data:o}}function ds(t,e,n){const s=Ls(t,e,n);return s?{__resolveType:s.resolveType,...s.data}:{__resolveType:""}}function xt(t,e,n){if(t)return v0(t,e,n)?ds(t,e,n):t}function T0(t,e,n,s){if(!t)return"Default";if(v0(t,e,s)){const i=t.__resolveType??"",o=e[i];return On(i,o)}return n(t)}function S1(t,e,n){return{__resolveType:t,...e,name:n}}function k1(t){return{__resolveType:t}}function N1(t,e,n){const s=Ls(t,e,n);return s?{resolveType:s.resolveType,formValue:s.data}:{resolveType:"",formValue:{}}}function T1(t,e){const n={__resolveType:t};if(!t||!e)return n;const s=F9(t,e),i=s?.type==="inline-union"?s.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function _1(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function C1(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function H4(t,e){const n=B.c(21),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=i||(e?.fetchEnabled??!0),a=s??t?.previewUrl,l=gt(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=Ke(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==a||n[2]!==c?(u=t?C1({...t,previewUrl:a,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=a,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==l||n[8]!==t||n[9]!==a||n[10]!==c?(f=async()=>{const h=w1,v=()=>d?p1(t):as(t,ht(l,".deco/meta.gen.json")),k=i&&a?[{kind:"live",baseUrl:a}]:_1({fetchEnabled:o,previewUrl:a,productionUrl:c,fastPreviewActive:d});for(const x of k){if(x.kind==="committed"){const S=await v();if(S.kind==="data")return S.data;continue}const b=await h(x.baseUrl);if(b)return b}const j=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw j.status=502,j},n[4]=d,n[5]=o,n[6]=i,n[7]=l,n[8]=t,n[9]=a,n[10]=c,n[11]=f):f=n[11];const y=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,v)=>(d||i||v.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let g;return n[15]!==u||n[16]!==f||n[17]!==y||n[18]!==m||n[19]!==p?(g={queryKey:u,queryFn:f,enabled:y,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:E1},n[15]=u,n[16]=f,n[17]=y,n[18]=m,n[19]=p,n[20]=g):g=n[20],Q0(g)}function E1(t){return Vn(5e3,1e3,t,2,0)}async function w1(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(A1);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function A1(){return null}function Ee(t,e,n){const s=n[t];return typeof s?.name=="string"&&s.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function q4(t,e){return t.map((n,s)=>{const i=n.__resolveType??"",o=b9(i);if(!o&&i!==""&&D9(i)&&i in e)return{index:s,resolveType:i,label:Ee(i,s,e),isLazy:!1,isSavedBlock:!0};const a=o?n.section:void 0,l=o?a?.__resolveType??"":i;if(l===X9||l===e0){const L=o?a:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===I0){const y=d[0]?.value??{};let m=y.__resolveType??"";const p=b9(m);let g=y;if(p){const h=y.section;m=h?.__resolveType??m,h&&(g=h)}if(m===X9||m===e0){const v=(Array.isArray(g.variants)?g.variants:[])[0]?.value?.__resolveType,k=v?S9(v):"Section";return{index:s,resolveType:i,label:`Variants of ${k}`,variantOf:k,isHidden:!0,isLazy:p}}return m!==""&&D9(m)&&m in e?{index:s,resolveType:i,label:Ee(m,s,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:s,resolveType:i,label:S9(m)||`Section ${s+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?S9(u):"Section";return{index:s,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&D9(c)&&c in e?{index:s,resolveType:i,label:Ee(c,s,e),isLazy:!0,isSavedBlock:!0}:{index:s,resolveType:i,label:S9(c)||`Section ${s+1}`,isLazy:o}})}function us(t){const e=t.__resolveType??"";return b9(e)?t.section??t:t}function ee(t){const i=(b9(t.__resolveType??"")?t.section:t)?.variants?.[0];return i?.rule?.__resolveType!==I0?null:i?.value??null}function Y4(t){const e=us(t);return{__resolveType:e0,variants:[{value:e,rule:{__resolveType:I0}}]}}function W4(t){const e=t.__resolveType??"";if(!e)return null;if(b9(e))return t.section??null;const n=ee(t);return n?b9(n.__resolveType??"")?n:{__resolveType:Ft,section:us(n)}:{__resolveType:Ft,section:t}}function G0(t){const e=t.__resolveType??"";if(!e)return null;if(b9(e)){const n=t.section,s=n?.__resolveType??"";return!s||!n?null:{resolveType:s,data:n}}return{resolveType:e,data:t}}function J4(t){const e=ee(t);if(e)return G0(e);if(b9(t.__resolveType??"")){const s=t.section;if(!s)return null;const i=ee(s);return G0(i||s)}return G0(t)}function Z4(t){return ee(t)}const R1=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function yt(t){if(!t)return!1;const e=t.__resolveType??"";return e===""?Object.keys(t).length===0:R1.includes(e)||e.includes("always")}function M1(t){const e=t.variants??[];if(e.length===0)return-1;const n=e.findIndex(s=>yt(s.rule));return n!==-1?n:e.length-1}function Q4(t,e,n){const s=n.variants??[];if(s.length===0)return null;const i=M1(n),o=s[i]?.value;if(!o)return null;const a=structuredClone(o);return e.isLazy?{...t,section:a}:a}function fs(t,e){return e.isMultivariate?e.isLazy?t.section??null:t:null}function X4(t,e){return Array.isArray(t.variants)?t.variants.map((n,s)=>({label:e(n.rule)||`Variant ${s+1}`,value:n.value??{},rule:n.rule})):[]}function e5(t,e){const n=t.__resolveType??"";if(!n)return null;if(b9(n)){const s=t.section??t,i=s.__resolveType??n;if(!i.includes("/")&&i in e){const o=e[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...s},resolveType:i}}if(!n.includes("/")&&n in e){const s=e[n]??{};return{data:{...s},resolveType:s.__resolveType??n}}return{data:{...t},resolveType:n}}function P1(t,e){const n=t.__resolveType??"";return b9(n)?{...t,section:e}:e}function I1(t,e,n){return e.isLazy?{...t,section:n}:n}function t5(t,e,n){const s=[...t.variants??[]],i=s[e];if(!i)return t;const o=i.value??{};return s[e]={...i,value:P1(o,n)},{...t,variants:s}}function n5(t,e,n){const s=[...t.variants??[]];return s[e]?(s[e]={...s[e],rule:n},{...t,variants:s}):t}function s5(t,e){const n=[...t.variants??[]],s=n[e];return s?(n.splice(e+1,0,structuredClone(s)),{...t,variants:n}):t}function r5(t,e,n){const s=[...t.variants??[]];if(e===n||e<0||n<0||e>=s.length||n>=s.length)return t;const[i]=s.splice(e,1);return i?(s.splice(n,0,i),{...t,variants:s}):t}function i5(t,e){const n=[...t.variants??[]];return n.length<=1?null:(n.splice(e,1),{...t,variants:n})}function De(t){return{rule:u0(),value:structuredClone(t)}}function ms(t,e){return{...e,__resolveType:e0,variants:t}}function o5(t){return t.isHidden!==!0&&t.isSavedBlock!==!0}function F1(t,e){if(e.isHidden)return null;if(e.isMultivariate){const s=fs(t,e)?.variants??[],i=s[s.length-1]?.value;return i?structuredClone(i):null}if(e.isLazy){const n=t.section;return n?structuredClone(n):null}return structuredClone(t)}function O1(t,e,n){if(e.isMultivariate||e.isHidden)return null;const s=F1(t,e);if(!s)return null;const i=ms([De(s),De(s)]);return e.isLazy?{...t,section:i}:i}function a5(t,e,n){if(e.isHidden||e.isSavedBlock)return null;if(e.isMultivariate){const i=fs(t,e);if(!i)return null;const o=i.variants??[],a=o[o.length-1]?.value;if(!a)return null;const l=ms([...o,De(a)],i);return{section:I1(t,e,l),newVariantIndex:o.length}}const s=O1(t,e);return s?{section:s,newVariantIndex:1}:null}function be(t){return t.anyOfRefs?.some(e=>e.resolveType!==X9?!1:e.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function D1(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;return e.__resolveType===e0&&Array.isArray(e.variants)}function te(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.__resolveType===X9}function $1(t){if(!te(t))return null;const e=t.variants;if(!Array.isArray(e))return null;const n=e[0]?.value;return Array.isArray(n)?n:null}function z1(t,e){if(!te(t))return e;const n=structuredClone(t),s=[...n.variants??[]];return s.length===0?s.push({rule:u0(),value:e}):s[0]={...s[0],value:e},{...n,variants:s}}function l5(t,e){const s=t[e]?.sections;if(!s||Array.isArray(s))return 1;const i=s;return Array.isArray(i.variants)?i.variants.length:1}function c5(t,e,n){const i=t[e]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const a=o[n];return Array.isArray(a?.value)?a.value:[]}}return[]}function B1(t,e,n){if(Array.isArray(t))return[{label:"Default",sections:t}];if(t&&typeof t=="object"){const s=t;if(Array.isArray(s.variants)){const i=s.variants,o=i.map(c=>T0(c.rule,e,n)),a=o.reduce((c,L)=>(c[L]=(c[L]??0)+1,c),{}),l={};return i.map((c,L)=>{const d=o[L]??`Variant ${L+1}`,u=a[d]??1;let f=d;return u>1&&(l[d]=(l[d]??0)+1,f=`${d} ${l[d]}`),{label:f||`Variant ${L+1}`,sections:Array.isArray(c.value)?c.value:[],rule:c.rule}})}}return[]}function k0(t){return{rule:u0(),value:t}}function L0(t,e){return{...e,__resolveType:X9,variants:t}}function L5(t,e){const n=structuredClone(e);if(Array.isArray(t))return L0([k0(t),k0(n)]);if(t&&typeof t=="object"){const s=t;return Array.isArray(s.variants)?L0([...s.variants,k0(n)],s):null}return L0([k0([]),k0(n)])}function d5(t){const e=t.variants;return Array.isArray(e)?e.length-1:1}function u5(t,e){const n=t[e];if(!n)return null;const s=[...t];return s.splice(e+1,0,structuredClone(n)),s}function f5(t,e){if(e.length===0)return L0([],t);if(e.length===1){const n=e[0],s=n?.rule;if(!yt(s))return L0(e,t);if(Array.isArray(n?.value))return n.value}return L0(e,t)}function V1(t,e,n){const s=[];for(const[o,a]of Object.entries(t))o!==e&&s.push(a);const i=new Set;for(;s.length>0;){const o=s.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const a of o)s.push(a);continue}n(o);for(const a of Object.values(o))s.push(a)}}}function m5(t,e,n){if(!e)return 0;let s=0;return V1(t,e,i=>{i.__resolveType===e&&v0(i,t,n)&&s++}),s}const U1={provision:0,cloning:1,install:2,dev:3};function K1(t){return U1[t.step]}const Ut=48,ps=28,hs=3,G1=(()=>{const t=[];let e=0;for(let n=0;n<Ut;n++)n===ps?t.push(null):(t.push(e/(Ut-1)*hs),e++);return t})();function H1(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function q1(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?Fr[e.kind].long:n[t.step]}const O9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",Y1=Array.from({length:35},()=>Math.random()*1.8),W1=Array.from({length:35},()=>Math.random()<.4);function J1(t){const e=B.c(31),{progress:n,claimPhase:s}=t,i=u9();let o;e[0]!==n?(o=K1(n),e[0]=n,e[1]=o):o=e[1];const a=o;let l;e[2]!==s||e[3]!==n||e[4]!==i?(l=q1(n,s,H1(i)),e[2]=s,e[3]=n,e[4]=i,e[5]=l):l=e[5];const c=l;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(mi,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=r.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,r.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx(Z1,{}),e[10]=f):f=e[10];let y;e[11]!==a?(y=r.jsx(H0,{phase:0,current:a,children:f}),e[11]=a,e[12]=y):y=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(X1,{}),e[13]=m):m=e[13];let p;e[14]!==a?(p=r.jsx(H0,{phase:1,current:a,children:m}),e[14]=a,e[15]=p):p=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(eo,{}),e[16]=g):g=e[16];let h;e[17]!==a?(h=r.jsx(H0,{phase:2,current:a,children:g}),e[17]=a,e[18]=h):h=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx(no,{}),e[19]=v):v=e[19];let k;e[20]!==a?(k=r.jsx(H0,{phase:3,current:a,children:v}),e[20]=a,e[21]=k):k=e[21];let j;e[22]!==h||e[23]!==k||e[24]!==y||e[25]!==p?(j=r.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[y,p,h,k]}),e[22]=h,e[23]=k,e[24]=y,e[25]=p,e[26]=j):j=e[26];let x;e[27]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx("style",{children:`
|
|
2
2
|
@keyframes vm-pulse-soft {
|
|
3
3
|
0%, 100% { opacity: 0.25; }
|
|
4
4
|
50% { opacity: 1; }
|