decocms 4.404.0 → 4.405.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-BbNYew1e.js → AlertCircle-DsUEjB1y.js} +1 -1
- package/dist/client/assets/{AreaChart-CyrIzzBK.js → AreaChart-BRDOpSI-.js} +1 -1
- package/dist/client/assets/{ArrowLeft-ez9Y1Onk.js → ArrowLeft-CxRjfeZc.js} +1 -1
- package/dist/client/assets/{ArrowRight-E6fKygmt.js → ArrowRight-eKUb0n2T.js} +1 -1
- package/dist/client/assets/{ArrowUp-BiIj6tlg.js → ArrowUp-CX6DmOcK.js} +1 -1
- package/dist/client/assets/{CartesianChart-DDqoeeEY.js → CartesianChart-CqtpuEW2.js} +1 -1
- package/dist/client/assets/{Check-CapvsdGu.js → Check-C47vZGc9.js} +1 -1
- package/dist/client/assets/{CheckCircle-B1OVLKZR.js → CheckCircle-bbegiaBM.js} +1 -1
- package/dist/client/assets/{ChevronUp-ChAmXWjD.js → ChevronUp-CpSCTQZS.js} +1 -1
- package/dist/client/assets/{Copy01-DDkSTuTY.js → Copy01-BJU01N4U.js} +1 -1
- package/dist/client/assets/{CreditCard01-OHGsZ6Bw.js → CreditCard01-DC24GL_m.js} +1 -1
- package/dist/client/assets/{DotsVertical-5emZ3MQ9.js → DotsVertical-DZNzJWKj.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-BePb3GYh.js → ErrorBarContext-DSBwGBE1.js} +1 -1
- package/dist/client/assets/{Eye-BrViZp-5.js → Eye-CNkWuzWx.js} +1 -1
- package/dist/client/assets/{Globe04-CAYZzkRC.js → Globe04-DhVTbcPw.js} +1 -1
- package/dist/client/assets/{Image01-SKNmlwlF.js → Image01-B3RqtHm-.js} +1 -1
- package/dist/client/assets/{Key01-CXg7nR14.js → Key01-Cp3mTBvm.js} +1 -1
- package/dist/client/assets/{LayoutLeft-nHNyhUOC.js → LayoutLeft-R0hY03zy.js} +1 -1
- package/dist/client/assets/{Line-bJ3m68oK.js → Line-CH538az5.js} +1 -1
- package/dist/client/assets/{Link01-Byw0zCMT.js → Link01-B54Jeukm.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CFar3COz.js → LinkExternal01-ZYxwJi4c.js} +1 -1
- package/dist/client/assets/{Monitor01-CFnDja5J.js → Monitor01-DKi30I8e.js} +1 -1
- package/dist/client/assets/{Palette-DwexJoWb.js → Palette-CB7RyOHv.js} +1 -1
- package/dist/client/assets/{Plus-CrWT7UIJ.js → Plus-K9ZpzFJZ.js} +1 -1
- package/dist/client/assets/{SearchMd-CVxuC9Yh.js → SearchMd-Bs1QtwQ9.js} +1 -1
- package/dist/client/assets/{Sector-8R3-bNXY.js → Sector-DPVvirap.js} +1 -1
- package/dist/client/assets/{Share07-BY2hIBvI.js → Share07-BSBmBJl6.js} +1 -1
- package/dist/client/assets/{Sun-B2sJ8Eow.js → Sun-Dp-NCeHB.js} +1 -1
- package/dist/client/assets/{Tool01-CjL9B5Pb.js → Tool01-Cg6st-mQ.js} +1 -1
- package/dist/client/assets/{Trash01-DGERm_SA.js → Trash01-Pso5bybc.js} +1 -1
- package/dist/client/assets/{Upload01-BMWzLzBx.js → Upload01-JoSAzPxB.js} +1 -1
- package/dist/client/assets/{User01-B6jvxPbq.js → User01-B6NQ0PY-.js} +1 -1
- package/dist/client/assets/{UserSquare-BGTYrtN8.js → UserSquare-JAwDD8yK.js} +1 -1
- package/dist/client/assets/{Users01-lstimZpI.js → Users01-DdaptQvV.js} +1 -1
- package/dist/client/assets/{X-DZouMoq2.js → X-Cf3B8UPs.js} +1 -1
- package/dist/client/assets/{XClose-BWjIThCL.js → XClose-Db8fLrAk.js} +1 -1
- package/dist/client/assets/{Zap-CAIuML8h.js → Zap-CGkZfZn3.js} +1 -1
- package/dist/client/assets/{ZoomOut-kCU9bgKm.js → ZoomOut-CqDz8pWP.js} +1 -1
- package/dist/client/assets/{access-gate-CXWsTo2H.js → access-gate-CpD0T0Z7.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BvYu9ZLH.js → add-connection-dialog-BvGiaD4j.js} +1 -1
- package/dist/client/assets/{agent-analytics-BAC6sZrC.js → agent-analytics-DJ0jHUU_.js} +1 -1
- package/dist/client/assets/agent-app-s83EqitU.js +1 -0
- package/dist/client/assets/{agent-assets-Cgl-_NqO.js → agent-assets-Y6S9Evzj.js} +1 -1
- package/dist/client/assets/{agent-automation-uZpVL-6r.js → agent-automation-DS33AtWX.js} +1 -1
- package/dist/client/assets/{agent-automations-DO5z0Q_f.js → agent-automations-D5Cs6slq.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DcEjSsA2.js → agent-connect-sources-C19Ncb9i.js} +1 -1
- package/dist/client/assets/agent-deck-WZJTTBYj.js +1 -0
- package/dist/client/assets/{agent-e2e-D5oWT2cu.js → agent-e2e-DiFXrwdb.js} +1 -1
- package/dist/client/assets/{agent-experiments-BMX32UgF.js → agent-experiments-krT8jDwR.js} +1 -1
- package/dist/client/assets/{agent-file-kq412zIx.js → agent-file-_AMAGkCi.js} +1 -1
- package/dist/client/assets/{agent-git-DHhLQdWz.js → agent-git-Nuk-Z_IW.js} +1 -1
- package/dist/client/assets/{agent-hosting-CM21tZ8K.js → agent-hosting-37l2SBDK.js} +1 -1
- package/dist/client/assets/{agent-icon-Cmy8McnK.js → agent-icon-2JtFJ4_g.js} +1 -1
- package/dist/client/assets/agent-library-file-jhD05a-J.js +1 -0
- package/dist/client/assets/{agent-monitor-DmocYJA8.js → agent-monitor-BPp6ZGvE.js} +1 -1
- package/dist/client/assets/{agent-overview-BXOXzWwO.js → agent-overview-D6EMAXSv.js} +1 -1
- package/dist/client/assets/agent-settings-C7Qj41jR.js +1 -0
- package/dist/client/assets/{agent-site-editor-HS5VxqRS.js → agent-site-editor-DeGeacW9.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-3cz8fGiG.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CODZYLvh.js → agent-site-editor-content-1fuHnPdU.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-D-YxKY7I.js → agent-site-editor-preview-Cw6g-T0N.js} +3 -3
- package/dist/client/assets/agent-view-Dvx7sTES.js +1 -0
- package/dist/client/assets/{agent-view-guard-DbiXXwvF.js → agent-view-guard-z6x7Nm-M.js} +1 -1
- package/dist/client/assets/{agents-list-CyrikF26.js → agents-list-CL1iCZzE.js} +1 -1
- package/dist/client/assets/{ai-providers-icLargnn.js → ai-providers-C5ektYHB.js} +1 -1
- package/dist/client/assets/{alert-CiBA0aDn.js → alert-Dl6kFooW.js} +1 -1
- package/dist/client/assets/{alert-dialog-CQJ6L-fd.js → alert-dialog-i3oXAGgD.js} +1 -1
- package/dist/client/assets/{analytics-sections-BoMA3rRV.js → analytics-sections-qrxE64IW.js} +1 -1
- package/dist/client/assets/api-keys-CRIX4At_.js +1 -0
- package/dist/client/assets/{api-keys-bUSBPRtA.js → api-keys-DGIbcgfp.js} +1 -1
- package/dist/client/assets/app-editor-Jk9A4xW_.js +1 -0
- package/dist/client/assets/{asset-utils-CWpboJeO.js → asset-utils-B6oJ7SUl.js} +1 -1
- package/dist/client/assets/{auth-Cyn2xymY.js → auth-DZGX-aYF.js} +1 -1
- package/dist/client/assets/{auth-catchall-CwaYWibx.js → auth-catchall-Cjy0xwd1.js} +1 -1
- package/dist/client/assets/{auth-entry-BHe_YWyE.js → auth-entry-OuVKDzQ_.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Zg5hezNy.js → auth-split-layout-BnmWVJas.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BvIb3Xk5.js → authenticate-and-persist-oauth-CbvB7TLO.js} +1 -1
- package/dist/client/assets/{automation-list-row-DddaztKP.js → automation-list-row-OQeKNB2H.js} +1 -1
- package/dist/client/assets/{automation-runs-oAMRwC7o.js → automation-runs-BM7Yw2Eq.js} +1 -1
- package/dist/client/assets/{automations-qQTVYfDL.js → automations-efhes8rR.js} +1 -1
- package/dist/client/assets/{autosend-CFp_YbNU.js → autosend-DJOIimLd.js} +1 -1
- package/dist/client/assets/{avatar-Bbn37Vzx.js → avatar-FPeNmw2i.js} +1 -1
- package/dist/client/assets/{badge-CrCnpvUj.js → badge-Bm2rr-BJ.js} +1 -1
- package/dist/client/assets/{block-document-hfus3v0u.js → block-document-BBVUlehr.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CNOGiw3w.js → blocks-preview-workspace-context-C2RrHeY4.js} +1 -1
- package/dist/client/assets/{buckets-BIbh8I2I.js → buckets-C3-HQjpu.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-lPD5ppsw.js → build-improve-prompt-doc-BF8D4qJT.js} +1 -1
- package/dist/client/assets/{calendar-PNSW4-z7.js → calendar-CcQzKXt2.js} +1 -1
- package/dist/client/assets/{capability-load-error-CVvco4Ot.js → capability-load-error-CIXQEGJJ.js} +1 -1
- package/dist/client/assets/{cards-BkCGO6Kt.js → cards-Ba18JLi3.js} +1 -1
- package/dist/client/assets/{category-editor-B4zAIYVR.js → category-editor-8gMuA_qk.js} +1 -1
- package/dist/client/assets/{chart-BisoenwS.js → chart-CMWlO3gW.js} +1 -1
- package/dist/client/assets/{chat-context-DUOWaPKi.js → chat-context-gHGpwBR0.js} +1 -1
- package/dist/client/assets/{chat-draft-BVdC4I7_.js → chat-draft-DALA5d_a.js} +1 -1
- package/dist/client/assets/{checkbox-eIasmi-8.js → checkbox-X3rwkbl_.js} +1 -1
- package/dist/client/assets/{choose-editor-BoaZ_w_l.js → choose-editor-DkEu4jVj.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-WG8f16_j.js → claim-phase-copy-Cm4suJFn.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CNqNgFdk.js → cli-auth-success-Da8SJJAt.js} +1 -1
- package/dist/client/assets/{client-icons-D9zQlbJS.js → client-icons-Dxr8Yq32.js} +1 -1
- package/dist/client/assets/{collapsible-pZTQk4TI.js → collapsible-K7HXR552.js} +1 -1
- package/dist/client/assets/{collection-detail-CHdyjTCh.js → collection-detail-BZUXDRPJ.js} +1 -1
- package/dist/client/assets/{collection-display-button-CQNehznu.js → collection-display-button-BjojfXU0.js} +1 -1
- package/dist/client/assets/{collection-search-CLjQtaPy.js → collection-search-CkBXUEir.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C0pPgW_S.js → collection-table-wrapper-DN6s2ezH.js} +1 -1
- package/dist/client/assets/{collection-tabs-mguLm2RL.js → collection-tabs-h69TId83.js} +1 -1
- package/dist/client/assets/{combobox-BifSrqJF.js → combobox-Dtm1D1Gx.js} +1 -1
- package/dist/client/assets/{command-Cvu7KW7q.js → command-CVsrsI4m.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-RXkfUsB4.js → companion-mcps-section-BuP-DvjF.js} +1 -1
- package/dist/client/assets/{connect-B0PiTR8n.js → connect-BoYDAi_l.js} +1 -1
- package/dist/client/assets/{connect-layout-BpZBikOw.js → connect-layout-DoSkHXO9.js} +1 -1
- package/dist/client/assets/{connection-card-A6aYN3Ch.js → connection-card-KAiDM8CK.js} +1 -1
- package/dist/client/assets/{connection-detail-DeIZFNSH.js → connection-detail-CzNkVerg.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D81_RJtX.js → connection-form-helpers-DXZ3P4tF.js} +1 -1
- package/dist/client/assets/{connection-B88XtkV2.js → connection-hgnPVi5k.js} +1 -1
- package/dist/client/assets/{connections-Ii4Fhwk2.js → connections-CnlMLJZm.js} +1 -1
- package/dist/client/assets/{context-QsmYUpSB.js → context-Bd72LbTF.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C_uXNh4Y.js → create-organization-dialog-i0CZVTID.js} +1 -1
- package/dist/client/assets/{decopilot-lzqAroU6.js → decopilot-BI4MNQek.js} +1 -1
- package/dist/client/assets/{dialog-Co6zFTX7.js → dialog-Dz5U96w4.js} +1 -1
- package/dist/client/assets/{discover-B4MDVt_D.js → discover-najCHmTL.js} +1 -1
- package/dist/client/assets/{domain-settings-DdvXZBk0.js → domain-settings-DNwTY7PM.js} +1 -1
- package/dist/client/assets/{download-app-dialog-C1apE888.js → download-app-dialog-DGOmfby-.js} +1 -1
- package/dist/client/assets/{drawer-DWByFqsm.js → drawer-D10zZUJc.js} +1 -1
- package/dist/client/assets/{editor-DB4WW31s.js → editor-D2xPr_F4.js} +1 -1
- package/dist/client/assets/{empty-state-B_zfMTAY.js → empty-state-C3Y4Vd_i.js} +1 -1
- package/dist/client/assets/{empty-state-6SR7W13N.js → empty-state-C9c8w1ej.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BZ39OCYI.js → extract-connection-data-DHIKYRMr.js} +1 -1
- package/dist/client/assets/{feature-gate-U11G36VB.js → feature-gate-B48tqaZu.js} +1 -1
- package/dist/client/assets/{feature-paywall-rYbT6jro.js → feature-paywall-qXQ1HIVx.js} +1 -1
- package/dist/client/assets/{file-explorer-ESJbsuX7.js → file-explorer-DSXowg_W.js} +1 -1
- package/dist/client/assets/{file-preview-B-s3azNt.js → file-preview-C6JgW7Ry.js} +1 -1
- package/dist/client/assets/{file-share-button-DjI7bSLZ.js → file-share-button-CXdrjH5i.js} +1 -1
- package/dist/client/assets/{file-type-icon-3LjfdOqY.js → file-type-icon-C5jBCqyr.js} +1 -1
- package/dist/client/assets/{folder-icon-pOMyK4Xx.js → folder-icon-CLfej4Jo.js} +1 -1
- package/dist/client/assets/{form-CR07LiEf.js → form-dzTiwEC8.js} +1 -1
- package/dist/client/assets/{gateway-client-CvspeF7R.js → gateway-client-CQ99_F9N.js} +1 -1
- package/dist/client/assets/{general-Dr7N1IOz.js → general-BOFVBpvc.js} +1 -1
- package/dist/client/assets/{github-icon-BFVkYGiB.js → github-icon-DQKhcsF7.js} +1 -1
- package/dist/client/assets/{home-DsC0PAQ2.js → home-BJL80DBy.js} +1 -1
- package/dist/client/assets/{hooks-vxTM1gXs.js → hooks-CIjNCBKM.js} +1 -1
- package/dist/client/assets/{icon-button-D2WBOak9.js → icon-button-BTyh33gY.js} +1 -1
- package/dist/client/assets/{index-BuEPLkrP.js → index-3B-rQ9Sg.js} +1 -1
- package/dist/client/assets/{index-DVzaRP6y.js → index-BwIM1E_p.js} +1 -1
- package/dist/client/assets/{index-CeZiK-yi.js → index-C8m20OOl.js} +1 -1
- package/dist/client/assets/{index-DIchPxE-.js → index-CDrqgvtL.js} +1 -1
- package/dist/client/assets/{index-BI8cotxY.js → index-CHgxICOu.js} +1 -1
- package/dist/client/assets/{index-oInLRegO.js → index-CKFxHbnr.js} +41 -41
- package/dist/client/assets/{index-C6YWxuEI.js → index-CUHMaDus.js} +1 -1
- package/dist/client/assets/{index-DUUPpuUX.js → index-CWhfWvDv.js} +1 -1
- package/dist/client/assets/{index-C1j5wK2H.js → index-D6K21KS-.js} +1 -1
- package/dist/client/assets/{index-CDs-itgn.js → index-DRZWAo_x.js} +1 -1
- package/dist/client/assets/{index-Bk4CLjGS.js → index-DYsgV6Ph.js} +1 -1
- package/dist/client/assets/{index-i8l1CBWn.js → index-DsMZ3RYm.js} +1 -1
- package/dist/client/assets/{index-D5YihiGB.js → index-fDTFynqB.js} +1 -1
- package/dist/client/assets/{index-redirect-BwnEa2Q5.js → index-redirect-DdIeh8Z8.js} +1 -1
- package/dist/client/assets/{index-BH02SjQa.js → index-vfgVsYie.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Cuusnxij.js → infiniteQueryObserver-DhhqlhlM.js} +1 -1
- package/dist/client/assets/{infra-billing-BK1JVegc.js → infra-billing-CvukVSxB.js} +1 -1
- package/dist/client/assets/{input-g-_2Ow3k.js → input-BwYzPEPU.js} +1 -1
- package/dist/client/assets/{input-DN8Quxr_.js → input-CkB9UxHQ.js} +1 -1
- package/dist/client/assets/{input-DeNzjyfg.js → input-DxQMUEiU.js} +1 -1
- package/dist/client/assets/{integration-icon-Uz5RxAVi.js → integration-icon-B1VfMW51.js} +1 -1
- package/dist/client/assets/{label-Be1evrK0.js → label-Byavsfld.js} +1 -1
- package/dist/client/assets/{last-preview-page-B6MFR7mx.js → last-preview-page-DUWcbCE7.js} +1 -1
- package/dist/client/assets/{layout-Cb-X3TEf.js → layout-B-sEL084.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CxR0cfBP.js → legacy-agents-deep-DQRfRExe.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DqgHqeYi.js → legacy-main-redirect-DEsEEeKY.js} +1 -1
- package/dist/client/assets/{library-eEt5Ayu-.js → library-DT6klu8j.js} +1 -1
- package/dist/client/assets/{login-DrVcYPbR.js → login-MIjocvdU.js} +1 -1
- package/dist/client/assets/{markdown-3kIoJtjQ.js → markdown-CtPprix1.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-JNmWwrWf.js → mcp-app-renderer-Cu2_lqRx.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DkrJY4dD.js → mcp-oauth-t4nAyfWQ.js} +1 -1
- package/dist/client/assets/{members-DnZjaQ1T.js → members-C0H81MGh.js} +1 -1
- package/dist/client/assets/{message-templates-DUtCxF4i.js → message-templates-BLVZkLuU.js} +1 -1
- package/dist/client/assets/{mini-report-page-B4J2AhL2.js → mini-report-page-B0R6DrC-.js} +1 -1
- package/dist/client/assets/mock-board-DkPAOTPZ.js +10 -0
- package/dist/client/assets/{monaco-editor-DHJIGXAo.js → monaco-editor-CviGEIDQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BJsXZ4tn.js → monitoring-stats-row-DKRFV8Sj.js} +1 -1
- package/dist/client/assets/{multi-select-BfYtzZ_c.js → multi-select-CASCfNC5.js} +1 -1
- package/dist/client/assets/{mustache-CGHah8NU.js → mustache-xJcbJqt3.js} +1 -1
- package/dist/client/assets/{oauth-callback-CUYnm623.js → oauth-callback-DgK7voTw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bm5TDAIT.js → oauth-callback-ai-provider-C7khkRGZ.js} +1 -1
- package/dist/client/assets/{onboarding-BPgw_GvO.js → onboarding-ByYhY5XE.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DHStkeWV.js → optimistic-project-sidebar-views-B_oHISvm.js} +1 -1
- package/dist/client/assets/{org-file-open-context-DA2DiiBk.js → org-file-open-context-Bwu-baYU.js} +1 -1
- package/dist/client/assets/{organization-choice-lTUDkT9X.js → organization-choice-CCBX3ogL.js} +1 -1
- package/dist/client/assets/{orgs-K2SiByKT.js → orgs-AS92pNs0.js} +1 -1
- package/dist/client/assets/{page-seo-form-C6QKL4-m.js → page-seo-form-D5Sws58P.js} +1 -1
- package/dist/client/assets/{pair-ZHGt6bef.js → pair-MV6enRyS.js} +1 -1
- package/dist/client/assets/{plan-ladder-BmO6LQXU.js → plan-ladder-Czwx75Rs.js} +1 -1
- package/dist/client/assets/{popover-COlLm0r0.js → popover-BdCX7ryo.js} +1 -1
- package/dist/client/assets/{post-calendar-CaFAM92h.js → post-calendar-B-Mf8ZWz.js} +1 -1
- package/dist/client/assets/{post-editor-BZYloy2g.js → post-editor-Ar3Q7Pip.js} +1 -1
- package/dist/client/assets/{preview-content-BR4RbkDm.js → preview-content-s5k1Cbyz.js} +1 -1
- package/dist/client/assets/{preview-dialog-BwQkmkta.js → preview-dialog-DuTtXNNd.js} +1 -1
- package/dist/client/assets/{profile-C7Xv3F-Y.js → profile-CzeUr_Ho.js} +1 -1
- package/dist/client/assets/{project-app-view-BjFT7eiW.js → project-app-view-CoKvxaNv.js} +1 -1
- package/dist/client/assets/{project-feed-C5enZNe6.js → project-feed-Bffo6UQZ.js} +1 -1
- package/dist/client/assets/{project-icon-BdOYvLpp.js → project-icon-Be-Ni96A.js} +1 -1
- package/dist/client/assets/project-reports-DGtApGn_.js +1 -0
- package/dist/client/assets/project-tasks-C6bTWPYs.js +1 -0
- package/dist/client/assets/{prompts-C-re156T.js → prompts-bcmTsSOK.js} +1 -1
- package/dist/client/assets/record-editor-BmfhaIV0.js +1 -0
- package/dist/client/assets/{redirect-editor-B7Rn2j3q.js → redirect-editor-CffiC-_L.js} +1 -1
- package/dist/client/assets/{reports-o_5q4e3r.js → reports-B9J-0pwm.js} +1 -1
- package/dist/client/assets/reports-D__MXfnc.js +1 -0
- package/dist/client/assets/{reports-onboarding-o8YDthiF.js → reports-onboarding-BaQ-4i_2.js} +1 -1
- package/dist/client/assets/{reports-tab-Di1avIHr.js → reports-tab-CyOnuHv8.js} +2 -2
- package/dist/client/assets/{repositories-D0EGMPZ0.js → repositories-Bbpp5SgW.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DbE5qt2Q.js → repository-import-picker-B5FDCmL1.js} +1 -1
- package/dist/client/assets/{repository-picker-ttYZl_VU.js → repository-picker-Hzd_E6oP.js} +1 -1
- package/dist/client/assets/{require-capability-cFAfNeHI.js → require-capability-BiVnHM5-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CyPDzKJB.js → required-auth-layout-BIF9HPgK.js} +1 -1
- package/dist/client/assets/{reset-password-B08n6w8p.js → reset-password-B1vGE6sA.js} +1 -1
- package/dist/client/assets/{resizable-C2ZZg82t.js → resizable-eQlpFDx1.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CBXDCirr.js → resolve-tab-icon-CRRFoIat.js} +1 -1
- package/dist/client/assets/{review-settings-Bafj1hN2.js → review-settings-CCgGhKT8.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-QVLwQ_g7.js → rich-text-link-control-z-Yv55rX.js} +1 -1
- package/dist/client/assets/{roles-Brz4rEHD.js → roles-CpvpHgz9.js} +1 -1
- package/dist/client/assets/{route-iXKvUaiv.js → route-8dVhoFE6.js} +1 -1
- package/dist/client/assets/{route-D7tF1uJe.js → route-CE5dJ4Bv.js} +1 -1
- package/dist/client/assets/{route-aMHk5C5-.js → route-DJiiQ0FB.js} +1 -1
- package/dist/client/assets/{route-page-header-DUQyJQ1r.js → route-page-header-CU_K_kqW.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-O1sQLoUa.js → runnable-block-editor-DO1y86de.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BGf3c59K.js → sandbox-lifecycle-context-uLRMQhBA.js} +1 -1
- package/dist/client/assets/{schema-BUeJ0pO6.js → schema-CnqoZ8XQ.js} +1 -1
- package/dist/client/assets/{scroll-area-Bi7CwTF7.js → scroll-area-mXx1_HGL.js} +1 -1
- package/dist/client/assets/{search-input-D8YyIx5o.js → search-input-CrsnKDit.js} +1 -1
- package/dist/client/assets/{search-toggle-ga33xasT.js → search-toggle-CQ_ABEOc.js} +1 -1
- package/dist/client/assets/{secret-picker-VrIRp4P8.js → secret-picker-DftAn2T4.js} +1 -1
- package/dist/client/assets/{secrets-D59kHqnX.js → secrets-BenDeLd0.js} +1 -1
- package/dist/client/assets/{sections-editor-B0UHb4kn.js → sections-editor-CPzIAZe_.js} +1 -1
- package/dist/client/assets/{select-DMFXyiyi.js → select-BxPDCCiu.js} +1 -1
- package/dist/client/assets/{select-model-CWZYRt6y.js → select-model-DqVMLwya.js} +1 -1
- package/dist/client/assets/{seo-editor-CkF_wa8A.js → seo-editor-CMhOrU3n.js} +1 -1
- package/dist/client/assets/{separator-BmxJoEMj.js → separator-BGdDqiZ3.js} +1 -1
- package/dist/client/assets/{settings-tab-ClonbMIR.js → settings-tab-CnB_ZxAu.js} +1 -1
- package/dist/client/assets/{sheet-C3oOEvZN.js → sheet-BtadI1Rc.js} +1 -1
- package/dist/client/assets/{shell-layout-DM5WIQIJ.js → shell-layout-DLejAPNB.js} +1 -1
- package/dist/client/assets/{skill-preview-BiwkN-Il.js → skill-preview-BFvfROVY.js} +1 -1
- package/dist/client/assets/{skills-DRGo4Ure.js → skills-DbhvAlhu.js} +1 -1
- package/dist/client/assets/{sso-Df8abmv9.js → sso-KEEpxd2V.js} +1 -1
- package/dist/client/assets/{suggestion-aPccODil.js → suggestion-BmwmNKL9.js} +1 -1
- package/dist/client/assets/{switch-C0HRK106.js → switch-C-nd7OoO.js} +1 -1
- package/dist/client/assets/{synced-repos-CiNb59uv.js → synced-repos-C9tzSlRg.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-TyAyK-DT.js → tab-icon-glyph-kI1zUO91.js} +1 -1
- package/dist/client/assets/{table-DRvQpNV6.js → table-Bkx16DCE.js} +1 -1
- package/dist/client/assets/{tabs-jHa9G-vf.js → tabs-D4SJ_C0_.js} +1 -1
- package/dist/client/assets/task-board-BiZDtBvo.js +1 -0
- package/dist/client/assets/{task-route-Bp1cgZUA.js → task-route-CP0YfIgz.js} +1 -1
- package/dist/client/assets/{task-status-oiK7INsX.js → task-status-B6r3yHWv.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-xpnr-0qC.js → taskboard-analytics-DmlVpaFB.js} +1 -1
- package/dist/client/assets/tasks-BvH9oEPg.js +1 -0
- package/dist/client/assets/{tasks-BDyHrg5B.js → tasks-DnfB9nFq.js} +1 -1
- package/dist/client/assets/{textarea-D5Eclrlp.js → textarea-DNWE-6Y9.js} +1 -1
- package/dist/client/assets/{thread-analytics-BfheS9dM.js → thread-analytics-CP3fz6fJ.js} +1 -1
- package/dist/client/assets/{thread-button-BH-_he_P.js → thread-button-FFo62BGk.js} +1 -1
- package/dist/client/assets/{thread-intent-CkoGvx8c.js → thread-intent-Bq726Q6v.js} +1 -1
- package/dist/client/assets/{thread-route-BJqMY0AQ.js → thread-route-B-izFvIN.js} +1 -1
- package/dist/client/assets/{thread-route-CGYm3fF8.js → thread-route-Dd8d9CtW.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-5pQe3GSc.js → thread-sheet-body-Bgz2ZRh4.js} +1 -1
- package/dist/client/assets/{toggle-group-CHmpxRzg.js → toggle-group-C87FhCR6.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BSvcTlnJ.js → toolbar-icon-button-C5f-3a6j.js} +1 -1
- package/dist/client/assets/{tooltip-Cj1caoDj.js → tooltip-FnCBMECQ.js} +1 -1
- package/dist/client/assets/{track-DL1Ik-aq.js → track-FnF5w7SG.js} +1 -1
- package/dist/client/assets/{types-DrNJI_4G.js → types-BDMWnOnU.js} +1 -1
- package/dist/client/assets/{usage-stats-F7lEx0gp.js → usage-stats-PqvLrMvL.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DD6uRv7t.js → use-ai-providers-DX5RCTyk.js} +1 -1
- package/dist/client/assets/{use-automations-Bghm_ev7.js → use-automations-B52bw_uU.js} +1 -1
- package/dist/client/assets/{use-autosave-DL8SsAJe.js → use-autosave-Cr1_mFYt.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Bg5qSD0k.js → use-connect-companion-BMwg9HX5.js} +1 -1
- package/dist/client/assets/{use-connection-D1_P2UM7.js → use-connection-f-a8Qdyq.js} +1 -1
- package/dist/client/assets/{use-copy-tkmTe99_.js → use-copy-CtPa5sGC.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cu165Xq3.js → use-create-virtual-mcp-BnP_uBRN.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Cy_ZOEN3.js → use-date-fns-locale-u1XmWKbn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dkasmyrk.js → use-debounced-autosave-BnUeJQls.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B-XggGv3.js → use-debounced-value-D_DsKTtH.js} +1 -1
- package/dist/client/assets/{use-deco-credits-C9d7yr9E.js → use-deco-credits-DxZywp4f.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CLlGlKKA.js → use-decopilot-events-V3tZf_dX.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BXeFewuz.js → use-delete-connection-ClW0p9w1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D1OnMxdQ.js → use-deployment-admin-D2HwbKOU.js} +1 -1
- package/dist/client/assets/{use-entitlements-Du-stDmT.js → use-entitlements-CRnZA3kQ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Cu3j9blF.js → use-fast-preview-draft-url-DGcapIoW.js} +1 -1
- package/dist/client/assets/{use-file-configs-Y_eOk11s.js → use-file-configs-BFXH2dey.js} +1 -1
- package/dist/client/assets/{use-in-settings-CHHpBmp_.js → use-in-settings-Go9vg8-w.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cs2QqMJ2.js → use-infinite-scroll-DN7aYmR0.js} +1 -1
- package/dist/client/assets/{use-join-requests-D1fqDIoF.js → use-join-requests-DpMQ4JQd.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-0qXXzcWV.js → use-main-panel-tabs-DwGgMMyl.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DFlWa_9i.js → use-mcp-auth-status-BSKhuKI8.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BYq8F19a.js → use-mcp-client-BbE5oF5S.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B_O4_Eqa.js → use-mcp-prompts-OVQRwZ_K.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Igf_NQxw.js → use-mcp-tools-NGNtMvWY.js} +1 -1
- package/dist/client/assets/{use-members-ge_cM2s0.js → use-members-CmZKIOqi.js} +1 -1
- package/dist/client/assets/{use-mobile-oRi4pmRL.js → use-mobile-DMGxFZym.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CkBwcPWu.js → use-navigate-to-agent-IjoqsC0h.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BdwulaF1.js → use-open-billing-url-BbRW82Lk.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bb0pQPV4.js → use-org-auth-client-CZApnVJs.js} +1 -1
- package/dist/client/assets/{use-org-fs-DzuidZRI.js → use-org-fs-COWrCwL3.js} +1 -1
- package/dist/client/assets/{use-org-sso-sxxqv7vp.js → use-org-sso-BZq8Xs3N.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BUUeB7bt.js → use-organization-roles-DJmiqdhn.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CgmxRFUz.js → use-organization-settings-WcEHLqay.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-C1DdIaZR.js → use-panel-navigate-F2B5eu7B.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DOMgNBIw.js → use-project-native-view-presence-D919Yq9m.js} +1 -1
- package/dist/client/assets/{use-project-scope-BHSj7jFR.js → use-project-scope-CCu6T1jl.js} +1 -1
- package/dist/client/assets/{use-releases-BS8V6pHg.js → use-releases-aCBEyP2H.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DiF2Fjnq.js → use-reports-diagnostic-CvnCzOKZ.js} +1 -1
- package/dist/client/assets/{use-route-default-main-tMpRLh5c.js → use-route-default-main-Kkt1_YCq.js} +1 -1
- package/dist/client/assets/{use-secrets-gEhG4Eql.js → use-secrets-D53eEmvY.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CmkVZE89.js → use-section-preview-base-4k4D7MWH.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BDM1EdKf.js → use-session-runtime-DtQVGbHh.js} +1 -1
- package/dist/client/assets/{use-tags-BqhD54NY.js → use-tags-FWLb-Jps.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-K1WeUBKl.js → use-task-board-analytics-DTSpZdm9.js} +1 -1
- package/dist/client/assets/{use-task-metadata-tyRgew5h.js → use-task-metadata-Cz142Q4d.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DRPR7i2Q.js → use-thread-analytics-BCI9hL1f.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-C4IALELC.js → use-thread-outputs-CuBHQW76.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D0flWviz.js → use-virtual-mcp-DTQxhTEh.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ESd3SKYM.js +1 -0
- package/dist/client/assets/{useQueries-CRr6ONcA.js → useQueries-lYCE6ZBe.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BeckhPCo.js +1 -0
- package/dist/client/assets/{users-BNsUtLHb.js → users-Caiu8Aay.js} +1 -1
- package/dist/client/assets/{utils-CAJo3oRt.js → utils-D_RcVxGX.js} +1 -1
- package/dist/client/assets/{variant-calendar-CRiZPDRr.js → variant-calendar-BGSsg1ox.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CQ9lwDkv.js → variant-matcher-override-BhczYSjn.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Dj27LOnW.js → view-mode-toggle-CA00KZ7m.js} +1 -1
- package/dist/client/assets/{virtual-mcp-dmsusViQ.js → virtual-mcp-BcOOKIcs.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Br7Vg4dZ.js +0 -1
- package/dist/client/assets/agent-deck-uRRglpGW.js +0 -1
- package/dist/client/assets/agent-library-file-CnkVrwOu.js +0 -1
- package/dist/client/assets/agent-settings-BCpoXgn0.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DtyXglJi.js +0 -2
- package/dist/client/assets/agent-view-BGZLiigf.js +0 -1
- package/dist/client/assets/api-keys-BwjlpjJ4.js +0 -1
- package/dist/client/assets/app-editor-D9iKqtWe.js +0 -1
- package/dist/client/assets/mock-board-BbmAbRkf.js +0 -10
- package/dist/client/assets/project-reports-D9u_NGy1.js +0 -1
- package/dist/client/assets/project-tasks-B7vVW0WN.js +0 -1
- package/dist/client/assets/record-editor-B31N5BVz.js +0 -1
- package/dist/client/assets/reports-nNyk3Ys-.js +0 -1
- package/dist/client/assets/task-board-FWoiIhQM.js +0 -1
- package/dist/client/assets/tasks-B8WE3oRT.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BpcJR9xI.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ByHovaCi.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-oInLRegO.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-CHHpBmp_.js";import{S as Hs,a as Gs,b as Qs}from"./sheet-C3oOEvZN.js";import{u as st}from"./use-mobile-oRi4pmRL.js";import{S as Js,a as zt}from"./thread-button-BH-_he_P.js";import{u as Xs,L as te,i as Tt}from"./shell-layout-DM5WIQIJ.js";import{u as ke,a as Ke,b as At}from"./use-project-scope-BHSj7jFR.js";import{u as Ys}from"./thread-route-CGYm3fF8.js";import{P as nt,a as Ue,b as ot}from"./popover-COlLm0r0.js";import{D as Ot,a as Rt,b as Dt,c as Zs}from"./drawer-DWByFqsm.js";import{A as Ee}from"./avatar-Bbn37Vzx.js";import{T as it,a as at,b as en,c as rt}from"./tooltip-Cj1caoDj.js";import{a as tn}from"./Copy01-DDkSTuTY.js";import{n as sn}from"./Eye-BrViZp-5.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-Cmy8McnK.js";import{i as bn,a as jn}from"./Share07-BY2hIBvI.js";import{n as Ft}from"./LinkExternal01-CFar3COz.js";import{i as qt}from"./Monitor01-CFnDja5J.js";import{n as vn,a as yn}from"./Sun-B2sJ8Eow.js";import{a as Bt,i as kn,t as Sn}from"./Tool01-CjL9B5Pb.js";import{u as Nn}from"./use-deployment-admin-D1OnMxdQ.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-C1apE888.js";import{I as Cn,u as Pn}from"./use-join-requests-D1fqDIoF.js";import{u as In}from"./use-deco-credits-C9d7yr9E.js";import{u as zn,a as Vt}from"./use-entitlements-Du-stDmT.js";import{u as Tn,P as An}from"./plan-ladder-BmO6LQXU.js";import{u as On}from"./use-organization-settings-CgmxRFUz.js";import{S as Rn}from"./scroll-area-Bi7CwTF7.js";import{u as Dn}from"./useInfiniteQuery-BpcJR9xI.js";import{n as Mn}from"./hooks-vxTM1gXs.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-Bp1cgZUA.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-nHNyhUOC.js";import{I as Hn,T as Wt}from"./toolbar-icon-button-BSvcTlnJ.js";import{i as Le}from"./Check-CapvsdGu.js";import{s as Ht}from"./Plus-CrWT7UIJ.js";import{C as xt,a as Oe,b as Fe,c as Gn,d as Qn,e as Jn}from"./command-Cvu7KW7q.js";import{P as ct}from"./project-icon-BdOYvLpp.js";import{C as Xn}from"./create-organization-dialog-C_uXNh4Y.js";import{s as Yn,c as Zn}from"./XClose-BWjIThCL.js";import{u as eo}from"./use-virtual-mcp-D0flWviz.js";import{i as to}from"./ArrowLeft-ez9Y1Onk.js";import{u as so}from"./use-thread-analytics-DRPR7i2Q.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-DOMgNBIw.js";import{u as Qt}from"./optimistic-project-sidebar-views-DHStkeWV.js";import{u as dt}from"./use-navigate-to-agent-CkBwcPWu.js";import{a as lo}from"./Image01-SKNmlwlF.js";import{u as co}from"./use-panel-navigate-C1DdIaZR.js";import{r as uo}from"./resolve-tab-icon-CBXDCirr.js";import{T as mo}from"./tab-icon-glyph-TyAyK-DT.js";import{R as fo}from"./repository-import-picker-DbE5qt2Q.js";import{t as po}from"./ChevronUp-ChAmXWjD.js";import{t as xo}from"./Globe04-CAYZzkRC.js";import{i as go}from"./CreditCard01-OHGsZ6Bw.js";import{i as ho}from"./Key01-CXg7nR14.js";import{s as bo}from"./User01-B6jvxPbq.js";import{i as jo}from"./Zap-CAIuML8h.js";import{p as vo,q as yo}from"./question-004-sINsf4GQ.js";import{u as ko}from"./use-decopilot-events-CLlGlKKA.js";import"./X-DZouMoq2.js";import"./use-route-default-main-tMpRLh5c.js";import"./UserSquare-BGTYrtN8.js";import"./CheckCircle-B1OVLKZR.js";import"./dialog-Co6zFTX7.js";import"./integration-icon-Uz5RxAVi.js";import"./use-mcp-client-BYq8F19a.js";import"./auth-Cyn2xymY.js";import"./required-auth-layout-CyPDzKJB.js";import"./autosend-CFp_YbNU.js";import"./use-org-sso-sxxqv7vp.js";import"./github-repo-BknN0SVI.js";import"./index-DVzaRP6y.js";import"./AlertCircle-BbNYew1e.js";import"./ArrowUp-BiIj6tlg.js";import"./ArrowRight-E6fKygmt.js";import"./ZoomOut-kCU9bgKm.js";import"./DotsVertical-5emZ3MQ9.js";import"./Link01-Byw0zCMT.js";import"./Palette-DwexJoWb.js";import"./SearchMd-CVxuC9Yh.js";import"./Trash01-DGERm_SA.js";import"./Upload01-BMWzLzBx.js";import"./Users01-lstimZpI.js";import"./form-CR07LiEf.js";import"./label-Be1evrK0.js";import"./select-DMFXyiyi.js";import"./textarea-D5Eclrlp.js";import"./use-org-auth-client-Bb0pQPV4.js";import"./use-organization-roles-BUUeB7bt.js";import"./use-ai-providers-DD6uRv7t.js";import"./schema-BUeJ0pO6.js";import"./task-board-FWoiIhQM.js";import"./infiniteQueryObserver-Cuusnxij.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-C1j5wK2H.js";import"./alert-dialog-CQJ6L-fd.js";import"./input-DN8Quxr_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Y_eOk11s.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-CkoGvx8c.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-ttYZl_VU.js";import"./github-icon-BFVkYGiB.js";import"./collection-search-CLjQtaPy.js";import"./use-debounced-value-B-XggGv3.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.404.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",requires:"org:manage"},{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.404.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 al(){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{al 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-CKFxHbnr.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-Go9vg8-w.js";import{S as Hs,a as Gs,b as Qs}from"./sheet-BtadI1Rc.js";import{u as st}from"./use-mobile-DMGxFZym.js";import{S as Js,a as zt}from"./thread-button-FFo62BGk.js";import{u as Xs,L as te,i as Tt}from"./shell-layout-DLejAPNB.js";import{u as ke,a as Ke,b as At}from"./use-project-scope-CCu6T1jl.js";import{u as Ys}from"./thread-route-Dd8d9CtW.js";import{P as nt,a as Ue,b as ot}from"./popover-BdCX7ryo.js";import{D as Ot,a as Rt,b as Dt,c as Zs}from"./drawer-D10zZUJc.js";import{A as Ee}from"./avatar-FPeNmw2i.js";import{T as it,a as at,b as en,c as rt}from"./tooltip-FnCBMECQ.js";import{a as tn}from"./Copy01-BJU01N4U.js";import{n as sn}from"./Eye-CNkWuzWx.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-2JtFJ4_g.js";import{i as bn,a as jn}from"./Share07-BSBmBJl6.js";import{n as Ft}from"./LinkExternal01-ZYxwJi4c.js";import{i as qt}from"./Monitor01-DKi30I8e.js";import{n as vn,a as yn}from"./Sun-Dp-NCeHB.js";import{a as Bt,i as kn,t as Sn}from"./Tool01-Cg6st-mQ.js";import{u as Nn}from"./use-deployment-admin-D2HwbKOU.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-DGOmfby-.js";import{I as Cn,u as Pn}from"./use-join-requests-DpMQ4JQd.js";import{u as In}from"./use-deco-credits-DxZywp4f.js";import{u as zn,a as Vt}from"./use-entitlements-CRnZA3kQ.js";import{u as Tn,P as An}from"./plan-ladder-Czwx75Rs.js";import{u as On}from"./use-organization-settings-WcEHLqay.js";import{S as Rn}from"./scroll-area-mXx1_HGL.js";import{u as Dn}from"./useInfiniteQuery-ESd3SKYM.js";import{n as Mn}from"./hooks-CIjNCBKM.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-CP0YfIgz.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-R0hY03zy.js";import{I as Hn,T as Wt}from"./toolbar-icon-button-C5f-3a6j.js";import{i as Le}from"./Check-C47vZGc9.js";import{s as Ht}from"./Plus-K9ZpzFJZ.js";import{C as xt,a as Oe,b as Fe,c as Gn,d as Qn,e as Jn}from"./command-CVsrsI4m.js";import{P as ct}from"./project-icon-Be-Ni96A.js";import{C as Xn}from"./create-organization-dialog-i0CZVTID.js";import{s as Yn,c as Zn}from"./XClose-Db8fLrAk.js";import{u as eo}from"./use-virtual-mcp-DTQxhTEh.js";import{i as to}from"./ArrowLeft-CxRjfeZc.js";import{u as so}from"./use-thread-analytics-BCI9hL1f.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-D919Yq9m.js";import{u as Qt}from"./optimistic-project-sidebar-views-B_oHISvm.js";import{u as dt}from"./use-navigate-to-agent-IjoqsC0h.js";import{a as lo}from"./Image01-B3RqtHm-.js";import{u as co}from"./use-panel-navigate-F2B5eu7B.js";import{r as uo}from"./resolve-tab-icon-CRRFoIat.js";import{T as mo}from"./tab-icon-glyph-kI1zUO91.js";import{R as fo}from"./repository-import-picker-B5FDCmL1.js";import{t as po}from"./ChevronUp-CpSCTQZS.js";import{t as xo}from"./Globe04-DhVTbcPw.js";import{i as go}from"./CreditCard01-DC24GL_m.js";import{i as ho}from"./Key01-Cp3mTBvm.js";import{s as bo}from"./User01-B6NQ0PY-.js";import{i as jo}from"./Zap-CGkZfZn3.js";import{p as vo,q as yo}from"./question-004-sINsf4GQ.js";import{u as ko}from"./use-decopilot-events-V3tZf_dX.js";import"./X-Cf3B8UPs.js";import"./use-route-default-main-Kkt1_YCq.js";import"./UserSquare-JAwDD8yK.js";import"./CheckCircle-bbegiaBM.js";import"./dialog-Dz5U96w4.js";import"./integration-icon-B1VfMW51.js";import"./use-mcp-client-BbE5oF5S.js";import"./auth-DZGX-aYF.js";import"./required-auth-layout-BIF9HPgK.js";import"./autosend-DJOIimLd.js";import"./use-org-sso-BZq8Xs3N.js";import"./github-repo-BknN0SVI.js";import"./index-BwIM1E_p.js";import"./AlertCircle-DsUEjB1y.js";import"./ArrowUp-CX6DmOcK.js";import"./ArrowRight-eKUb0n2T.js";import"./ZoomOut-CqDz8pWP.js";import"./DotsVertical-DZNzJWKj.js";import"./Link01-B54Jeukm.js";import"./Palette-CB7RyOHv.js";import"./SearchMd-Bs1QtwQ9.js";import"./Trash01-Pso5bybc.js";import"./Upload01-JoSAzPxB.js";import"./Users01-DdaptQvV.js";import"./form-dzTiwEC8.js";import"./label-Byavsfld.js";import"./select-BxPDCCiu.js";import"./textarea-DNWE-6Y9.js";import"./use-org-auth-client-CZApnVJs.js";import"./use-organization-roles-DJmiqdhn.js";import"./use-ai-providers-DX5RCTyk.js";import"./schema-CnqoZ8XQ.js";import"./task-board-BiZDtBvo.js";import"./infiniteQueryObserver-DhhqlhlM.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-D6K21KS-.js";import"./alert-dialog-i3oXAGgD.js";import"./input-CkB9UxHQ.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BFXH2dey.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-Bq726Q6v.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-Hzd_E6oP.js";import"./github-icon-DQKhcsF7.js";import"./collection-search-CkBXUEir.js";import"./use-debounced-value-D_DsKTtH.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.405.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",requires:"org:manage"},{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.405.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 al(){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{al as default};
|