decocms 4.501.0 → 4.502.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/{ActiveShapeUtils-D-fL_h7g.js → ActiveShapeUtils-DlOtwjEF.js} +1 -1
- package/dist/client/assets/{AlertCircle-D3bAofoi.js → AlertCircle-BYpi54SP.js} +1 -1
- package/dist/client/assets/{AreaChart-BkD3ldvt.js → AreaChart-kTgagvS-.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cdobx1UV.js → ArrowLeft-B3Mf4oiE.js} +1 -1
- package/dist/client/assets/{ArrowUp-D_3dn5Sd.js → ArrowUp-Dm1tTcjd.js} +1 -1
- package/dist/client/assets/{BarChart-DdPh9tNP.js → BarChart-DwQypsuH.js} +1 -1
- package/dist/client/assets/{Building02-Bh6iwr2R.js → Building02-BHmYKmWU.js} +1 -1
- package/dist/client/assets/{CategoricalChart-tLM_K2Lc.js → CategoricalChart-CeTDsFRk.js} +1 -1
- package/dist/client/assets/{CheckCircle-BQiYUYV1.js → CheckCircle-4P58PW4U.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CpMmf6o-.js → ChevronSelectorVertical-Cojq1UR5.js} +1 -1
- package/dist/client/assets/{ChevronUp-CfnfCq3M.js → ChevronUp-DVssCggl.js} +1 -1
- package/dist/client/assets/{Copy01-CKF8jrEa.js → Copy01-DBnXKsvD.js} +1 -1
- package/dist/client/assets/{CreditCard01-B4jz404y.js → CreditCard01-Ku1gLnux.js} +1 -1
- package/dist/client/assets/{DotsVertical-BVuRRGqu.js → DotsVertical-DUEyJX4K.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-D3QRg5_X.js → ErrorBarContext-CsU8-ggF.js} +1 -1
- package/dist/client/assets/{Globe04-CfnS-Tur.js → Globe04-BCy_UIpz.js} +1 -1
- package/dist/client/assets/{Image01-C6EZAhw4.js → Image01-C9QzuJaK.js} +1 -1
- package/dist/client/assets/{Key01-C3bTgL7y.js → Key01-CV3Kr-e4.js} +1 -1
- package/dist/client/assets/{Link01-Bb9ZHTO8.js → Link01-CnwGlGLA.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BbLhCJ9C.js → LinkBroken01-Dt2Tn6rT.js} +1 -1
- package/dist/client/assets/{Monitor01-BT48-O3V.js → Monitor01-CtZrNe_q.js} +1 -1
- package/dist/client/assets/{Play-DlM8u9Zn.js → Play-Bi58F4_E.js} +1 -1
- package/dist/client/assets/{Plus-h-7fG8-i.js → Plus-jTILaZAS.js} +1 -1
- package/dist/client/assets/{SearchMd-DdAgg3kt.js → SearchMd-DIriOluN.js} +1 -1
- package/dist/client/assets/{Sector-udGfVqY9.js → Sector-e1E9Tkoe.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-gtt6oc_g.js → ShoppingBag01-DPhSrshS.js} +1 -1
- package/dist/client/assets/{Sun-D0bMmBqD.js → Sun-Bhq3Un93.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-mzV8h1Yb.js → SwitchHorizontal01-CZeYSoIE.js} +1 -1
- package/dist/client/assets/{Tool01-BOGFE1PW.js → Tool01-DSx5JxKN.js} +1 -1
- package/dist/client/assets/{Trash01-BKZKll81.js → Trash01-BcDxgAC3.js} +1 -1
- package/dist/client/assets/{Upload01-ClJbirSb.js → Upload01-DRNp2B9A.js} +1 -1
- package/dist/client/assets/{User01-jcmfLZ4a.js → User01-DmuhzlMa.js} +1 -1
- package/dist/client/assets/{UserSquare-Dnl3alN_.js → UserSquare-pQAburWh.js} +1 -1
- package/dist/client/assets/{Users01-DBt3BOu-.js → Users01-DXRV-L-2.js} +1 -1
- package/dist/client/assets/{XAxis-DWTEKRSO.js → XAxis-BpuR06LI.js} +1 -1
- package/dist/client/assets/{XClose-DtCD4hEo.js → XClose-B3D-rkas.js} +1 -1
- package/dist/client/assets/{ZoomOut-C-oiWFtM.js → ZoomOut-BfTCLHO9.js} +1 -1
- package/dist/client/assets/{access-gate-Bs83GnN9.js → access-gate-Dvk_zKis.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CkfM8RAE.js → add-connection-dialog-eAWC7UBo.js} +1 -1
- package/dist/client/assets/{agent-analytics-PkbYclRB.js → agent-analytics-BRzAe8IU.js} +1 -1
- package/dist/client/assets/agent-app-BP2SkO_l.js +1 -0
- package/dist/client/assets/{agent-assets-BSNQs1Q4.js → agent-assets-Cx-MRIu9.js} +1 -1
- package/dist/client/assets/{agent-automation-CYLhaLQV.js → agent-automation-B2wvqOTH.js} +1 -1
- package/dist/client/assets/{agent-automations-CylXZmQz.js → agent-automations-DjKZAWU3.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-gehkSGol.js → agent-connect-sources-DKjnLshK.js} +1 -1
- package/dist/client/assets/agent-deck-BelO6wIS.js +1 -0
- package/dist/client/assets/{agent-e2e-gcrRg7hM.js → agent-e2e-U1F_m9II.js} +1 -1
- package/dist/client/assets/{agent-experiments-CMJUnUoe.js → agent-experiments-DxRsWkSH.js} +1 -1
- package/dist/client/assets/{agent-file-JLVKcoj6.js → agent-file-DZx5Nuux.js} +1 -1
- package/dist/client/assets/{agent-hosting-AV1ldWsd.js → agent-hosting-qjQUC-UB.js} +1 -1
- package/dist/client/assets/{agent-icon-D1bIPwJ9.js → agent-icon-DEc9IKAh.js} +1 -1
- package/dist/client/assets/agent-library-DUzFXJHg.js +1 -0
- package/dist/client/assets/agent-library-file-4G0ZOr1s.js +1 -0
- package/dist/client/assets/{agent-monitor-DCEK-_YE.js → agent-monitor-BkFStz1l.js} +1 -1
- package/dist/client/assets/{agent-overview-Bq6iylVc.js → agent-overview-ByhU8NOU.js} +1 -1
- package/dist/client/assets/{agent-releases-0JQ-pNIw.js → agent-releases-B-ko0Nvk.js} +1 -1
- package/dist/client/assets/agent-settings-B8L7H8CP.js +1 -0
- package/dist/client/assets/{agent-site-editor-DUVPLgUJ.js → agent-site-editor-D9PPo_EX.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B3p3URSd.js +2 -0
- package/dist/client/assets/agent-site-editor-content-AFppcDyU.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BFOEKEAQ.js +1 -0
- package/dist/client/assets/agent-view-B2h35tj1.js +1 -0
- package/dist/client/assets/{agent-view-guard-B0ssprgS.js → agent-view-guard-BOJlnRyE.js} +1 -1
- package/dist/client/assets/{agents-list-CL_HbBRx.js → agents-list-BGrLBpdy.js} +1 -1
- package/dist/client/assets/{ai-providers-mazNpep3.js → ai-providers-BqDb2FvJ.js} +1 -1
- package/dist/client/assets/{alert-Bo4bO9Yj.js → alert-B48lGwya.js} +1 -1
- package/dist/client/assets/{alert-dialog-BEUBWKqO.js → alert-dialog-RwCjHRuJ.js} +1 -1
- package/dist/client/assets/{analytics-sections-DM3YuBYq.js → analytics-sections-BRfIYYnq.js} +1 -1
- package/dist/client/assets/{api-keys-DVwB6mPs.js → api-keys-DXmpQOqA.js} +1 -1
- package/dist/client/assets/api-keys-UTO_EG2B.js +1 -0
- package/dist/client/assets/{app-editor-6HFiMwKn.js → app-editor-D3DBnTc6.js} +1 -1
- package/dist/client/assets/{asset-utils-f7af-ti1.js → asset-utils-Bh07kRZG.js} +1 -1
- package/dist/client/assets/{auth-CpMllKKy.js → auth-D_LAZR_h.js} +1 -1
- package/dist/client/assets/{auth-catchall-s5AR8jnh.js → auth-catchall-BGEsffT3.js} +1 -1
- package/dist/client/assets/{auth-entry-DhhGCuwo.js → auth-entry-ClVx4xRq.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CVNIUCsf.js → auth-split-layout-ClyU5qbZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B45I3cgI.js → authenticate-and-persist-oauth-BNqERXi0.js} +1 -1
- package/dist/client/assets/{automation-list-row-sOJZ4uwa.js → automation-list-row-GdOWNpc6.js} +1 -1
- package/dist/client/assets/{automation-runs-CR9XH4Bt.js → automation-runs-BSFUiqcj.js} +1 -1
- package/dist/client/assets/{automations-KO9N3LUU.js → automations-6AzDTyLN.js} +1 -1
- package/dist/client/assets/{autosend-BPCdEy8S.js → autosend-BrkIZMg2.js} +1 -1
- package/dist/client/assets/{avatar-BwGV1yBo.js → avatar-jtTGOflQ.js} +1 -1
- package/dist/client/assets/{badge-DZi2puxG.js → badge-BPJdS_zE.js} +1 -1
- package/dist/client/assets/{block-document-DKS5cj35.js → block-document-D3moBjLJ.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CDjfxqPx.js → blocks-preview-workspace-context-BJF4y2_I.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CdRfYXjG.js → blocks-tab-states-Lfh7PvBk.js} +3 -3
- package/dist/client/assets/{blog-schema-DQu9FHji.js → blog-schema-Bhl0EC0x.js} +1 -1
- package/dist/client/assets/{board-analytics-Br92I9NK.js → board-analytics-v6GjK5j7.js} +1 -1
- package/dist/client/assets/{buckets-BJOMOAgi.js → buckets-BIZMjhec.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DrFz7LF_.js → build-improve-prompt-doc-H9GaTf8V.js} +1 -1
- package/dist/client/assets/{calendar-evfJy3uJ.js → calendar-C3D37oJb.js} +1 -1
- package/dist/client/assets/{capability-load-error-vW3f0aqj.js → capability-load-error-DeivFmvd.js} +1 -1
- package/dist/client/assets/{category-editor-QytvoXKo.js → category-editor-Cp2l4Ien.js} +1 -1
- package/dist/client/assets/{chart-yXoVtu1q.js → chart-CEsCnWQW.js} +1 -1
- package/dist/client/assets/{chat-context-lAP9vX1C.js → chat-context-Ek-8IxEX.js} +1 -1
- package/dist/client/assets/{chat-draft-DVJc17WV.js → chat-draft-CZGFUdc4.js} +1 -1
- package/dist/client/assets/{checkbox-DcDvQwKW.js → checkbox-BjVWCI8i.js} +1 -1
- package/dist/client/assets/{choose-editor-B0ViIXN7.js → choose-editor-DVpPw8Dk.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CKu92ul9.js → cli-auth-success-Dhq78KDh.js} +1 -1
- package/dist/client/assets/{client-icons-DV_DZLb3.js → client-icons-Bat5IWU-.js} +1 -1
- package/dist/client/assets/cms-settings-editor-ozxOescf.js +1 -0
- package/dist/client/assets/{collapsible-BvvJbkUN.js → collapsible-CCU11SRh.js} +1 -1
- package/dist/client/assets/{collection-detail-gDWElNf6.js → collection-detail-BKRzsUUf.js} +1 -1
- package/dist/client/assets/{collection-display-button-CX9hkCzp.js → collection-display-button-BPa0Hjel.js} +1 -1
- package/dist/client/assets/{collection-search-ChJFrp7I.js → collection-search-B3CigRnD.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-S14li0ck.js → collection-table-wrapper-BjP-CvVc.js} +1 -1
- package/dist/client/assets/{collection-tabs-CSxs3D41.js → collection-tabs-CoyfUlqO.js} +1 -1
- package/dist/client/assets/{column-rules-GXfmm3XY.js → column-rules-NvgDnt2S.js} +1 -1
- package/dist/client/assets/{combobox-C7I8ANxO.js → combobox-CrQDuIN4.js} +1 -1
- package/dist/client/assets/{command-3UFu4XzT.js → command-qX8D3Lb4.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-B4r6rXjT.js → companion-mcps-section-CFLiTWod.js} +1 -1
- package/dist/client/assets/{config-CXc91so8.js → config-BNYxxHSE.js} +1 -1
- package/dist/client/assets/{connect-CyItQRMN.js → connect-CtT1H68E.js} +1 -1
- package/dist/client/assets/{connect-layout-C_C_fSz7.js → connect-layout-ffkt2Ns9.js} +1 -1
- package/dist/client/assets/{connection-C37KtOpn.js → connection-B23WvhUe.js} +1 -1
- package/dist/client/assets/{connection-card-BZTmMkIC.js → connection-card-BBtu2Up1.js} +1 -1
- package/dist/client/assets/{connection-detail-D0FXWtUX.js → connection-detail-m7BHtws6.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DxBwDmAB.js → connection-form-helpers-DdClVTZn.js} +1 -1
- package/dist/client/assets/{connections-D-s5sSvb.js → connections-CiS8isT9.js} +1 -1
- package/dist/client/assets/{content-tab-zP6Y355z.js → content-tab-Dbn7dHL_.js} +3 -3
- package/dist/client/assets/{context-CXih-hDd.js → context-Nrq6BYeV.js} +1 -1
- package/dist/client/assets/{context-menu-BVwispbr.js → context-menu-CXHPom5V.js} +1 -1
- package/dist/client/assets/{core.esm-CmRvLUZs.js → core.esm-DaFx0nps.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-MkYGLytC.js → create-organization-dialog-CxI99S6f.js} +1 -1
- package/dist/client/assets/{daily-pulse-C5ZpC1Ja.js → daily-pulse-VFqkAbiP.js} +1 -1
- package/dist/client/assets/{discover-CnNtsI6p.js → discover-BM7hRKue.js} +1 -1
- package/dist/client/assets/{domain-settings-C-ul_GpW.js → domain-settings-DfqKqfG1.js} +1 -1
- package/dist/client/assets/{drawer-BnxsVk9h.js → drawer-CI9x8oi9.js} +1 -1
- package/dist/client/assets/{editor-BcMzCvWI.js → editor-HwnFKTc1.js} +1 -1
- package/dist/client/assets/{editor-classes-qOc25VDM.js → editor-classes-10XEtqAC.js} +1 -1
- package/dist/client/assets/{empty-state-Csd3ZQCl.js → empty-state-BxgUQvsY.js} +1 -1
- package/dist/client/assets/{empty-state-CLULH17h.js → empty-state-Dd0b73U2.js} +1 -1
- package/dist/client/assets/{extract-connection-data-QezQYJtA.js → extract-connection-data-CbabpvQM.js} +1 -1
- package/dist/client/assets/{feature-gate-X9j31WTs.js → feature-gate-CpZYoyZ3.js} +1 -1
- package/dist/client/assets/{feature-paywall-CVHEJqfB.js → feature-paywall-CWg9LcNZ.js} +1 -1
- package/dist/client/assets/{file-explorer-CzlgH02W.js → file-explorer-BiZ29Vvs.js} +1 -1
- package/dist/client/assets/{file-preview-Ddg0WJAM.js → file-preview-CX-aag8f.js} +1 -1
- package/dist/client/assets/{file-share-button-D2qOTxL8.js → file-share-button-Do0yFYDl.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bqf9C4DT.js → file-type-icon-Cp93tNz3.js} +1 -1
- package/dist/client/assets/flat-project-C_90Ow-C.js +1 -0
- package/dist/client/assets/{folder-icon-CktDjbyx.js → folder-icon-DzMf4BF9.js} +1 -1
- package/dist/client/assets/{form-BLRuutWX.js → form-C5lLpfxV.js} +1 -1
- package/dist/client/assets/{general-DAKv-uYe.js → general-Ddy1VvME.js} +1 -1
- package/dist/client/assets/{home-BtntFMXr.js → home-BCnTxZyF.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-DnbP_2C-.js → hosted-publish-feedback-hkJangOF.js} +1 -1
- package/dist/client/assets/{icon-button-08xWmNqW.js → icon-button-BnCc2mV5.js} +1 -1
- package/dist/client/assets/{index-9WXzzgOS.js → index-5z0cgady.js} +1 -1
- package/dist/client/assets/{index-BOjNGNvg.js → index-BC7XYozu.js} +1 -1
- package/dist/client/assets/{index-3yvbELIe.js → index-BbqhjhNr.js} +1 -1
- package/dist/client/assets/{index-BiU97Vx4.js → index-Bdcb7KFh.js} +1 -1
- package/dist/client/assets/{index-BvCsVc8L.js → index-Bh2O5PEv.js} +1 -1
- package/dist/client/assets/{index-BgxfZN5I.js → index-CmhfcT17.js} +2 -2
- package/dist/client/assets/{index-DyeE93ho.js → index-CnTaM5_w.js} +1 -1
- package/dist/client/assets/{index-3um-0YWE.js → index-CpYsIAO7.js} +1 -1
- package/dist/client/assets/{index-Dhveikge.js → index-Cq7eResI.js} +1 -1
- package/dist/client/assets/{index-DT37BMIF.js → index-Cx38FQ3N.js} +3 -3
- package/dist/client/assets/{index-lUChgCue.js → index-DMVF6sM5.js} +1 -1
- package/dist/client/assets/{index-Ct9bVcsr.js → index-DMjmBf92.js} +1 -1
- package/dist/client/assets/{index-Dss8yn2Y.js → index-DfOROPCW.js} +1 -1
- package/dist/client/assets/{index-DIK8YZFn.js → index-DkW_Ruuk.js} +1 -1
- package/dist/client/assets/{index-DJTmuPQQ.js → index-o0uzmEcY.js} +1 -1
- package/dist/client/assets/{index-redirect-CHE6u4Cv.js → index-redirect-lAkX0zfM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-ClCiPTXN.js → infiniteQueryObserver-DPyz6bSI.js} +1 -1
- package/dist/client/assets/{infra-billing-ChfVikin.js → infra-billing-Bn7qwXfY.js} +1 -1
- package/dist/client/assets/{input-BSxNJ_GL.js → input-C5uMiH8T.js} +3 -3
- package/dist/client/assets/{input-BwymrIPS.js → input-DC-8DfMd.js} +1 -1
- package/dist/client/assets/{integration-icon-DmnIXoLv.js → integration-icon-DfWASVi0.js} +1 -1
- package/dist/client/assets/{jira-icon-BLL3j9jm.js → jira-icon-DzQdm_-x.js} +1 -1
- package/dist/client/assets/{label-CXUY_vfR.js → label-BIjDuic6.js} +1 -1
- package/dist/client/assets/{layout-DIeTUTU5.js → layout-DqgRMTH3.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BKyQMU33.js → legacy-agents-deep-DV0_5V89.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BsoX6iN0.js → legacy-main-redirect-Djl3Gt7m.js} +1 -1
- package/dist/client/assets/library-CeUtWN8B.js +1 -0
- package/dist/client/assets/{library-tab-D2qgQui6.js → library-tab-Bs0wzK29.js} +1 -1
- package/dist/client/assets/{login-E4QHNGwe.js → login-3Otd9Wlo.js} +1 -1
- package/dist/client/assets/{markdown-b3WNjA4d.js → markdown-BCZ7Si7p.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cn4aCsu6.js → mcp-app-renderer-DECw4bL7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C3NWluK_.js → mcp-oauth-DK0EZ7_R.js} +1 -1
- package/dist/client/assets/{mcp-oauth-RicpD0nY.js → mcp-oauth-DPp6A0NQ.js} +1 -1
- package/dist/client/assets/{members-BxD5PzHF.js → members-CtZngT65.js} +1 -1
- package/dist/client/assets/{memory-C9XODnnD.js → memory-CYiv9NJT.js} +1 -1
- package/dist/client/assets/{mini-report-page-BIc8DpQB.js → mini-report-page-DOW-8ACI.js} +1 -1
- package/dist/client/assets/{mock-board-ohQUjnsi.js → mock-board-CgfiA9cZ.js} +1 -1
- package/dist/client/assets/{monaco-editor-sh4I5RUd.js → monaco-editor-BBw2sDH2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DV6G65vc.js → monitoring-stats-row-D4k9Gkic.js} +1 -1
- package/dist/client/assets/{multi-select-B-4k-Bqg.js → multi-select-CUZbVevW.js} +1 -1
- package/dist/client/assets/{mustache-Ds0VW1db.js → mustache-Ca--Xhvx.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B1YWyUQY.js → new-project-dialog-MyUIikPS.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dk0amXzl.js → oauth-callback-B8K9Pe1n.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-yxTXgHsL.js → oauth-callback-ai-provider-BWL5p0R4.js} +1 -1
- package/dist/client/assets/{onboarding-WAcQlT34.js → onboarding-DV2onL6W.js} +1 -1
- package/dist/client/assets/{openai-conversation-DdRGYa72.js → openai-conversation-D_cdhmrX.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CX9xIBGl.js → optimistic-project-sidebar-views-J9vXb1-5.js} +1 -1
- package/dist/client/assets/{organization-choice-ByF9jLiX.js → organization-choice-dn5-Ng0u.js} +1 -1
- package/dist/client/assets/{orgs-BQHW_eGH.js → orgs-CwC34Qrv.js} +1 -1
- package/dist/client/assets/{page-seo-form-CHn8Xad5.js → page-seo-form-BoOu9GbW.js} +1 -1
- package/dist/client/assets/{pair-CUEfObr7.js → pair-DC9cMyfj.js} +1 -1
- package/dist/client/assets/{plan-ladder-DCjrzFrn.js → plan-ladder-DhN7mzVE.js} +1 -1
- package/dist/client/assets/{popover-C7Cokk1g.js → popover-D2V0GZfj.js} +1 -1
- package/dist/client/assets/{post-calendar-8u0J9Dxw.js → post-calendar-DXzf3Yut.js} +1 -1
- package/dist/client/assets/{post-editor-BzyUnSeO.js → post-editor-NG32mys6.js} +1 -1
- package/dist/client/assets/{preview-content-DvIKkdby.js → preview-content-DUbzeS7I.js} +1 -1
- package/dist/client/assets/{preview-dialog-l7y7EMMl.js → preview-dialog-2P1PJxEF.js} +1 -1
- package/dist/client/assets/{preview-panel-BVF8JvLU.js → preview-panel-D3qbeO5A.js} +1 -1
- package/dist/client/assets/{preview-tab-DSXQiNWB.js → preview-tab-faQ50twa.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-D1HSCZY-.js → product-picker-dialog-D24ruXmx.js} +1 -1
- package/dist/client/assets/{profile-DLHHp5WU.js → profile-B_J_CZKE.js} +1 -1
- package/dist/client/assets/{project-app-view-BwoWS8NM.js → project-app-view-BlRpizu5.js} +1 -1
- package/dist/client/assets/{project-feed-Bb_IIsXz.js → project-feed-Beh_V-oC.js} +1 -1
- package/dist/client/assets/{project-icon-Dgrl5qpw.js → project-icon-3uE6pYf-.js} +1 -1
- package/dist/client/assets/project-reports-ClNthL44.js +1 -0
- package/dist/client/assets/project-tasks-CI9jMkDu.js +1 -0
- package/dist/client/assets/{projects-DRVKv_2I.js → projects-CzV6A7h3.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CtZ_2AQk.js → projects-empty-state-DnKeX8eY.js} +1 -1
- package/dist/client/assets/{prompts-BeeaQU8h.js → prompts-NBvK8C7O.js} +1 -1
- package/dist/client/assets/record-editor-CZMJvJ37.js +1 -0
- package/dist/client/assets/{redirect-editor-B1Nkj9GS.js → redirect-editor-CBD5SXg0.js} +1 -1
- package/dist/client/assets/{reports-C5l1V9UL.js → reports-CMexiDYO.js} +1 -1
- package/dist/client/assets/reports-S61PwEoP.js +1 -0
- package/dist/client/assets/{reports-onboarding-DP7Vd0T2.js → reports-onboarding-D6lseVrR.js} +1 -1
- package/dist/client/assets/{reports-tab-CtVbVcib.js → reports-tab-CkPkAd2_.js} +2 -2
- package/dist/client/assets/{repositories-CbAg-Btm.js → repositories-DtyuRQ8E.js} +1 -1
- package/dist/client/assets/{repository-binding-BFm9AVly.js → repository-binding-DMbjGWw3.js} +1 -1
- package/dist/client/assets/{repository-import-picker-EyjACjb3.js → repository-import-picker-GIgpyQ8V.js} +1 -1
- package/dist/client/assets/{repository-picker-CIkU8AaT.js → repository-picker-CGWfbl3i.js} +1 -1
- package/dist/client/assets/{require-capability-BHXvQx1F.js → require-capability-C7Dxrm_C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BWy4wi63.js → required-auth-layout-DgGjxHOD.js} +1 -1
- package/dist/client/assets/{reset-password-BmnWobO1.js → reset-password-B8StDavS.js} +1 -1
- package/dist/client/assets/{resizable-ojZdlQ3J.js → resizable-DjAVX_KV.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CQA14gzS.js → resolve-tab-icon-ChFmZL6X.js} +1 -1
- package/dist/client/assets/{review-settings-HBrPojjW.js → review-settings-BGTWCvjH.js} +1 -1
- package/dist/client/assets/roles-qa60Znm-.js +1 -0
- package/dist/client/assets/{route-BnPcnvQE.js → route-BUCd6xE1.js} +1 -1
- package/dist/client/assets/{route-FIzJ_P0a.js → route-BbjzfRwc.js} +1 -1
- package/dist/client/assets/route-rs6-PjAV.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BiADnqP0.js → sandbox-lifecycle-context-BPryhCAI.js} +1 -1
- package/dist/client/assets/{schema-C2wKusx1.js → schema-BCaSsjn6.js} +1 -1
- package/dist/client/assets/{schema-CP7YDlC2.js → schema-BrJvJRY5.js} +1 -1
- package/dist/client/assets/{scroll-area-eDDZTCNn.js → scroll-area-CyRrjPr-.js} +1 -1
- package/dist/client/assets/{search-input-Uw0JKwfe.js → search-input-CflNU9yi.js} +1 -1
- package/dist/client/assets/{search-toggle-sm1qzFKh.js → search-toggle-B30h-Mtc.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-CONJpmu9.js → secret-ciphertext-CZ1toUgb.js} +1 -1
- package/dist/client/assets/{secret-picker-60Shu074.js → secret-picker-HaRgmqbR.js} +1 -1
- package/dist/client/assets/{secrets-BoqLiEya.js → secrets-KUrWlAXl.js} +1 -1
- package/dist/client/assets/{sections-editor-vaJsT4Ye.js → sections-editor-CQ9DIV9u.js} +1 -1
- package/dist/client/assets/{select-BFEZcGSl.js → select-D56vy0cS.js} +1 -1
- package/dist/client/assets/{select-model-DqlWeDem.js → select-model-BQeGMdXQ.js} +1 -1
- package/dist/client/assets/{seo-editor-CH8U1dHr.js → seo-editor-DIXGLI4z.js} +1 -1
- package/dist/client/assets/{separator-B8-QmvpR.js → separator-Kf2aUq3g.js} +1 -1
- package/dist/client/assets/{settings-tab-CKwbS1hi.js → settings-tab-DS_aRKZh.js} +1 -1
- package/dist/client/assets/{sheet-Nq7jp8TZ.js → sheet-CKDqk2Xi.js} +1 -1
- package/dist/client/assets/{shell-layout-D6cRROrP.js → shell-layout-BdBSZR6C.js} +1 -1
- package/dist/client/assets/site-editor-CRE5wbgy.js +1 -0
- package/dist/client/assets/{site-editor-toast-DKv6_ydN.js → site-editor-toast-CaZH_Uob.js} +1 -1
- package/dist/client/assets/{skills-D12rIMUM.js → skills-BfSIFsq0.js} +1 -1
- package/dist/client/assets/{slider-DDXbeLEV.js → slider-Dxef6Thk.js} +1 -1
- package/dist/client/assets/{sortable.esm-B6I_GSlr.js → sortable.esm-wzYNtVNS.js} +1 -1
- package/dist/client/assets/{sso-BlG3mIxu.js → sso-Xjbva5ag.js} +1 -1
- package/dist/client/assets/{suggestion-BDdps7f5.js → suggestion-rl-OY42q.js} +1 -1
- package/dist/client/assets/{switch-fTPKFxtt.js → switch-C8MNBXcu.js} +1 -1
- package/dist/client/assets/{symbol-DzslO63t.js → symbol-wL8hZJTI.js} +1 -1
- package/dist/client/assets/{synced-repos-BoksOfkS.js → synced-repos-B_VSvpp7.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B_Nx9b90.js → tab-icon-glyph-DlPGivr6.js} +1 -1
- package/dist/client/assets/{table-DM6c5ztx.js → table-C_1aW9HL.js} +1 -1
- package/dist/client/assets/{tabs-_ffnq5EI.js → tabs-C0kKyybj.js} +1 -1
- package/dist/client/assets/{task-board-3mxTKXc4.js → task-board-BvUZ8lZX.js} +1 -1
- package/dist/client/assets/{task-route-Bd7_oRze.js → task-route-ChX2gHyG.js} +1 -1
- package/dist/client/assets/{task-status-DobFUFUP.js → task-status-5Qj_YIVL.js} +1 -1
- package/dist/client/assets/taskboard-analytics-v6jV-I8l.js +1 -0
- package/dist/client/assets/{tasks-8erS0IrD.js → tasks-B1ovkqRE.js} +1 -1
- package/dist/client/assets/tasks-BvmGOWZ2.js +1 -0
- package/dist/client/assets/{textarea-DuXoEX68.js → textarea-BOwupY9k.js} +1 -1
- package/dist/client/assets/{thread-analytics-DRN0lWXv.js → thread-analytics-BBdAY352.js} +1 -1
- package/dist/client/assets/{thread-intent-CNERxhpd.js → thread-intent-BxpIEOHD.js} +1 -1
- package/dist/client/assets/{thread-route-Ctf783T8.js → thread-route-YTx0gXdE.js} +1 -1
- package/dist/client/assets/{thread-route-B1yKR26I.js → thread-route-zNwiBPHs.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BOzE-wDr.js → thread-sheet-body-BSfQhy8y.js} +1 -1
- package/dist/client/assets/{time-range-picker-CTRRThMq.js → time-range-picker-DhCebJsY.js} +1 -1
- package/dist/client/assets/{toggle-group-Cfs_-SSG.js → toggle-group-BJNg7a6_.js} +1 -1
- package/dist/client/assets/{tool-namespace-D2ik4cAJ.js → tool-namespace-hcrPHByv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CPspdKt4.js → toolbar-icon-button-BRrBVu2U.js} +1 -1
- package/dist/client/assets/{tooltip-IZurjemL.js → tooltip-4UW874b4.js} +1 -1
- package/dist/client/assets/{tooltipContext-D100ISAz.js → tooltipContext-ph0B5aEk.js} +1 -1
- package/dist/client/assets/{track-Dgx71QRR.js → track-Bs37Vb-v.js} +1 -1
- package/dist/client/assets/{types-BE1SardL.js → types-scp_0M_s.js} +1 -1
- package/dist/client/assets/{url-slug-CwNPw3b4.js → url-slug-BOI9R_Hf.js} +1 -1
- package/dist/client/assets/{usage-stats-CG9oV0kb.js → usage-stats-DGAEuGyH.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CPzOGdQy.js → use-ai-providers-Bujn21Dz.js} +1 -1
- package/dist/client/assets/{use-app-takeover-l9YncUZ0.js → use-app-takeover-BBfqeF1-.js} +1 -1
- package/dist/client/assets/{use-automations-B6o4Nbzc.js → use-automations-Z_kBCKLA.js} +1 -1
- package/dist/client/assets/{use-autosave-DPNBZc_p.js → use-autosave-ndhVJCpx.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Do_KkN8I.js → use-chat-navigation-PVB9XYCZ.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BnfclhFE.js → use-clock-tick-CCLGBtLn.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BPMXolOl.js → use-connect-companion-DimWqtFp.js} +1 -1
- package/dist/client/assets/{use-connection-DS1VAR5N.js → use-connection-Dwi0oczT.js} +1 -1
- package/dist/client/assets/{use-copy-C8TWXH-H.js → use-copy-_JqQfoTc.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CeEuYNMP.js → use-create-virtual-mcp-ZOhkyNoT.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D3qFWxxv.js → use-date-fns-locale-CYNRVF1I.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DsoI68di.js → use-debounced-autosave-3qWJs1sA.js} +1 -1
- package/dist/client/assets/{use-debounced-value-KpwtUdsd.js → use-debounced-value-CvHHa5zM.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DscUzXq9.js → use-deco-credits-iWDhmKz8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D8UIooCs.js → use-decopilot-events-BFFoNVdS.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dnzv3Wbz.js → use-delete-connection-BIID_AaA.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-P_SogPj1.js → use-deployment-admin-DeUv9b4N.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-Dom2nmkC.js → use-ensure-project-folder-B_MNPQsb.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DnHFw81T.js → use-fast-preview-draft-url-CNiIoQU_.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cv2mXUdp.js → use-file-configs-DN9_HbK7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CuKgvt7b.js → use-infinite-scroll-CP5MaPJA.js} +1 -1
- package/dist/client/assets/{use-join-requests-cLAvpRra.js → use-join-requests-DmyW8n9L.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-B0dFgvCE.js → use-main-panel-tabs-DpP9vHof.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DaPeILTX.js → use-mcp-auth-status-C5UkoCc-.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CU2kDBXP.js → use-mcp-client-Ck2YNhED.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CdDXQMlf.js → use-mcp-prompts-DG1X-Jua.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CyHq-JFp.js → use-mcp-tools-DpjJofSD.js} +1 -1
- package/dist/client/assets/{use-members-CkpNHwM6.js → use-members-B1T5bMJ8.js} +1 -1
- package/dist/client/assets/{use-mobile-DNDEd3kt.js → use-mobile-C_h5-Lrd.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-JTDphVE0.js → use-navigate-to-agent-B5O37hfl.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-2Iqpie3T.js → use-open-billing-url-B_ppok7s.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bwzj9WuC.js → use-org-auth-client-CeU98DnY.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cg7EJCYS.js → use-org-fs-BTgLNJoN.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-D4j72pCa.js → use-org-repo-syncs-Bnf4MUmf.js} +1 -1
- package/dist/client/assets/{use-org-sso-CMfwXvs9.js → use-org-sso-CiSoCbsi.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DPDTJ01F.js → use-organization-roles-ENGApVEO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BMIqQlbM.js → use-organization-settings-DsiL1E35.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CL5hztR3.js → use-panel-navigate-DSEJRbyH.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CBbSdoTE.js → use-project-native-view-presence-CHwdqgjD.js} +1 -1
- package/dist/client/assets/{use-project-scope-DqbIN7fa.js → use-project-scope-DGWdW_3w.js} +1 -1
- package/dist/client/assets/{use-recent-apps-Beu6vFHw.js → use-recent-apps-MWmnEI3B.js} +1 -1
- package/dist/client/assets/{use-releases-Bfs5MNEe.js → use-releases-BPZ1Sql5.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-QSfTgm94.js → use-reports-diagnostic-tpNRt1KV.js} +1 -1
- package/dist/client/assets/{use-secrets-BaG_Hkwz.js → use-secrets-CPf3c3Lp.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DUXeQAGw.js → use-section-preview-base-J4BHoe5i.js} +1 -1
- package/dist/client/assets/{use-tags-BWRD1El7.js → use-tags-Cpi6wwHR.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Bkf73btp.js → use-task-board-analytics-CqArCe2L.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CLNIzDoN.js → use-task-board-events-B7HlzAAo.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Bh5krZjb.js → use-task-board-item-prs-DjDyyhsG.js} +1 -1
- package/dist/client/assets/{use-task-board-items-zobNU9xE.js → use-task-board-items-CwavMUzx.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Bsl_Cezz.js → use-task-metadata-B3kpFQ2d.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CdWNwDDd.js → use-thread-analytics-W6uH9m6t.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BkgKa2EX.js → use-thread-outputs-DMthmyl4.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CNEF6i6u.js +1 -0
- package/dist/client/assets/{useQueries-E-2AGLRt.js → useQueries-C0TyeWIY.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DQhsrGc-.js +1 -0
- package/dist/client/assets/{users-L9Rh2Jo7.js → users-KocJqAUG.js} +1 -1
- package/dist/client/assets/{utils-Dx9iFvKJ.js → utils-cJIltehY.js} +1 -1
- package/dist/client/assets/{variant-calendar-CkKYqTGY.js → variant-calendar-BHrspRPP.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-CSAndyah.js → variant-draft-pointer-CTpYDfJi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DxuIXC_C.js → view-mode-toggle-C2xIjQMc.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D7evpUlE.js → virtual-mcp-B3puFk7u.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-Bs34dRKl.js → watch-sse-pool-zJ3qp_pj.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate-dbos.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +608 -601
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Dq_KNzND.js +0 -1
- package/dist/client/assets/agent-deck-CB0RXEGe.js +0 -1
- package/dist/client/assets/agent-library-ChYqVk94.js +0 -1
- package/dist/client/assets/agent-library-file-5NiMKcJU.js +0 -1
- package/dist/client/assets/agent-settings-DutqpeLT.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bs5iWgah.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DG0PHKu_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IbSFpbgz.js +0 -1
- package/dist/client/assets/agent-view-BMSjk6sE.js +0 -1
- package/dist/client/assets/api-keys-BfQZh5eV.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cz5yTS8J.js +0 -1
- package/dist/client/assets/flat-project-EkkB9kye.js +0 -1
- package/dist/client/assets/library-j3CGQ36X.js +0 -1
- package/dist/client/assets/project-reports-C-bRcSvJ.js +0 -1
- package/dist/client/assets/project-tasks-DDJFKuGl.js +0 -1
- package/dist/client/assets/record-editor-5RvQSHc4.js +0 -1
- package/dist/client/assets/reports-BGfmbbJs.js +0 -1
- package/dist/client/assets/roles-Dtyn_BZq.js +0 -1
- package/dist/client/assets/route-tGmKNjFY.js +0 -1
- package/dist/client/assets/site-editor-BZvWDg3I.js +0 -1
- package/dist/client/assets/taskboard-analytics-BqoskKtI.js +0 -1
- package/dist/client/assets/tasks-SfkUPw6i.js +0 -1
- package/dist/client/assets/useInfiniteQuery-pEq0vd9s.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQsEFgzv.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as L,j as A,c as ve,l as He}from"./index-BgxfZN5I.js";import{an as ft}from"./agent-icon-D1bIPwJ9.js";function pt(e,t){const n=getComputedStyle(e),o=parseFloat(n.fontSize);return t*o}function ht(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),o=parseFloat(n.fontSize);return t*o}function gt(e){return e/100*window.innerHeight}function vt(e){return e/100*window.innerWidth}function mt(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function re({groupSize:e,panelElement:t,styleProp:n}){let o;const[r,a]=mt(n);switch(a){case"%":{o=r/100*e;break}case"px":{o=r;break}case"rem":{o=ht(t,r);break}case"em":{o=pt(t,r);break}case"vh":{o=gt(r);break}case"vw":{o=vt(r);break}}return o}function T(e){return parseFloat(e.toFixed(3))}function te({group:e}){const{orientation:t,panels:n}=e;return n.reduce((o,r)=>(o+=t==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,o),0)}function he(e){const{panels:t}=e,n=te({group:e});return n===0?t.map(o=>({groupResizeBehavior:o.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:o.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:o.panelConstraints.disabled,minSize:0,maxSize:100,panelId:o.id})):t.map(o=>{const{element:r,panelConstraints:a}=o;let l=0;if(a.collapsedSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.collapsedSize});l=T(c/n*100)}let s;if(a.defaultSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.defaultSize});s=T(c/n*100)}let i=0;if(a.minSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.minSize});i=T(c/n*100)}let u=100;if(a.maxSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.maxSize});u=T(c/n*100)}return{groupResizeBehavior:a.groupResizeBehavior,collapsedSize:l,collapsible:a.collapsible===!0,defaultSize:s,disabled:a.disabled,minSize:i,maxSize:u,panelId:o.id}})}function P(e,t="Assertion error"){if(!e)throw Error(t)}function ge(e,t){return Array.from(t).sort(e==="horizontal"?bt:yt)}function bt(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function yt(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Ve(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ue(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function zt({orientation:e,rects:t,targetRect:n}){const o={x:n.x+n.width/2,y:n.y+n.height/2};let r,a=Number.MAX_VALUE;for(const l of t){const{x:s,y:i}=Ue(o,l),u=e==="horizontal"?s:i;u<a&&(a=u,r=l)}return P(r,"No rect found"),r}let ue;function St(){return ue===void 0&&(typeof matchMedia=="function"?ue=!!matchMedia("(pointer:coarse)").matches:ue=!1),ue}function Ye(e){const{element:t,orientation:n,panels:o,separators:r}=e,a=ge(n,Array.from(t.children).filter(Ve).map(m=>({element:m}))).map(({element:m})=>m),l=[];let s=!1,i=!1,u=-1,c=-1,h=0,d,S=[];{let m=-1;for(const f of a)f.hasAttribute("data-panel")&&(m++,f.hasAttribute("data-disabled")||(h++,u===-1&&(u=m),c=m))}if(h>1){let m=-1;for(const f of a)if(f.hasAttribute("data-panel")){m++;const g=o.find(p=>p.element===f);if(g){if(d){const p=d.element.getBoundingClientRect(),y=f.getBoundingClientRect();let z;if(i){const b=n==="horizontal"?new DOMRect(p.right,p.top,0,p.height):new DOMRect(p.left,p.bottom,p.width,0),v=n==="horizontal"?new DOMRect(y.left,y.top,0,y.height):new DOMRect(y.left,y.top,y.width,0);switch(S.length){case 0:{z=[b,v];break}case 1:{const R=S[0],E=zt({orientation:n,rects:[p,y],targetRect:R.element.getBoundingClientRect()});z=[R,E===p?v:b];break}default:{z=S;break}}}else S.length?z=S:z=[n==="horizontal"?new DOMRect(p.right,y.top,y.left-p.right,y.height):new DOMRect(y.left,p.bottom,y.width,y.top-p.bottom)];for(const b of z){let v="width"in b?b:b.element.getBoundingClientRect();const R=St()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(v.width<R){const M=R-v.width;v=new DOMRect(v.x-M/2,v.y,v.width+M,v.height)}if(v.height<R){const M=R-v.height;v=new DOMRect(v.x,v.y-M/2,v.width,v.height+M)}const E=m<=u||m>c;!s&&!E&&l.push({group:e,groupSize:te({group:e}),panels:[d,g],separator:"width"in b?void 0:b,rect:v}),s=!1}}i=!1,d=g,S=[]}}else if(f.hasAttribute("data-separator")){f.ariaDisabled!==null&&(s=!0);const g=r.find(p=>p.element===f);g?S.push(g):(d=void 0,S=[])}else i=!0}return l}class Xe{#e={};addListener(t,n){const o=this.#e[t];return o===void 0?this.#e[t]=[n]:o.includes(n)||o.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const o=this.#e[t];if(o!==void 0)if(o.length===1)o[0].call(null,n);else{let r=!1,a=null;const l=Array.from(o);for(let s=0;s<l.length;s++){const i=l[s];try{i.call(null,n)}catch(u){a===null&&(r=!0,a=u)}}if(r)throw a}}removeAllListeners(){this.#e={}}removeListener(t,n){const o=this.#e[t];if(o!==void 0){const r=o.indexOf(n);r>=0&&o.splice(r,1)}}}let Q={cursorFlags:0,state:"inactive"};const me=new Xe;function U(){return Q}function wt(e){return me.addListener("change",e)}function xt(e){const t=Q,n={...Q};n.cursorFlags=e,Q=n,me.emit("change",{prev:t,next:n})}function ee(e){const t=Q;Q=e,me.emit("change",{prev:t,next:e})}const Ct=e=>e,pe=()=>{},_e=1,Je=2,qe=4,Ke=8,Le=3,Re=12;let ce;function Ee(){return ce===void 0&&(ce=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(ce=!0)),ce}function Pt({cursorFlags:e,groups:t,state:n}){let o=0,r=0;switch(n){case"active":case"hover":t.forEach(a=>{if(!a.mutableState.disableCursor)switch(a.orientation){case"horizontal":{o++;break}case"vertical":{r++;break}}})}if(!(o===0&&r===0)){switch(n){case"active":{if(e&&Ee()){const a=(e&_e)!==0,l=(e&Je)!==0,s=(e&qe)!==0,i=(e&Ke)!==0;if(a)return s?"se-resize":i?"ne-resize":"e-resize";if(l)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}break}}return Ee()?o>0&&r>0?"move":o>0?"ew-resize":"ns-resize":o>0&&r>0?"grab":o>0?"col-resize":"row-resize"}}const ke=new WeakMap;function be(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=ke.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const o=U();switch(o.state){case"active":case"hover":{const r=Pt({cursorFlags:o.cursorFlags,groups:o.hitRegions.map(l=>l.group),state:o.state}),a=`*, *:hover {cursor: ${r} !important; }`;if(t===a)return;t=a,r?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}ke.set(e,{prevStyle:t,styleSheet:n})}let F=new Map;const Ze=new Xe;function Lt(e){F=new Map(F),F.delete(e)}function Me(e,t){for(const[n]of F)if(n.id===e)return n}function H(e,t){for(const[n,o]of F)if(n.id===e)return o;if(t)throw Error(`Could not find data for Group with id ${e}`)}function _(){return F}function ye(e,t){return Ze.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function W(e,t,n){const o=F.get(e);F=new Map(F),F.set(e,t),Ze.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:o,next:t})}function Qe(e){const t=U();let n=!1;return t.state==="active"&&(ee({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(be(e),n=!0,t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})}))),n}function De(e){e.defaultPrevented||Qe(e.currentTarget)}function Rt(e,t,n){let o,r={x:1/0,y:1/0};for(const a of t){const l=Ue(n,a.rect);switch(e){case"horizontal":{l.x<=r.x&&(o=a,r=l);break}case"vertical":{l.y<=r.y&&(o=a,r=l);break}}}return o?{distance:r,hitRegion:o}:void 0}function Et(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function kt(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ne(e),b:Ne(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)o=n.a.pop(),n.b.pop();P(o,"Stacking order can only be calculated for elements with a common ancestor");const r={a:Te(Ie(n.a)),b:Te(Ie(n.b))};if(r.a===r.b){const a=o.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=a.length;for(;s--;){const i=a[s];if(i===l.a)return 1;if(i===l.b)return-1}}return Math.sign(r.a-r.b)}const Mt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dt(e){const t=getComputedStyle(et(e)??e).display;return t==="flex"||t==="inline-flex"}function It(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Dt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Mt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ie(e){let t=e.length;for(;t--;){const n=e[t];if(P(n,"Missing node"),It(n))return n}return null}function Te(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ne(e){const t=[];for(;e;)t.push(e),e=et(e);return t}function et(e){const{parentNode:t}=e;return Et(t)?t.host:t}function Tt(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Nt({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Ve(n)||n.contains(e)||e.contains(n))return!0;if(kt(n,e)>0){let o=n;for(;o;){if(o.contains(e))return!0;if(Tt(o.getBoundingClientRect(),t))return!1;o=o.parentElement}}return!0}function ze(e,t){const n=[];return t.forEach((o,r)=>{if(r.disabled)return;const a=Ye(r),l=Rt(r.orientation,a,{x:e.clientX,y:e.clientY});l&&l.distance.x<=0&&l.distance.y<=0&&Nt({groupElement:r.element,hitRegion:l.hitRegion.rect,pointerEventTarget:e.target})&&n.push(l.hitRegion)}),n}function jt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function I(e,t,n=0){return Math.abs(T(e)-T(t))<=n}function O(e,t){return I(e,t)?0:e>t?1:-1}function Z({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:o}){const{collapsedSize:r=0,collapsible:a,disabled:l,maxSize:s=100,minSize:i=0}=t;if(l&&!e)return n;if(O(o,i)<0)if(a){const u=(r+i)/2;O(o,u)<0?o=r:o=i}else o=i;return o=Math.min(s,o),o=T(o),o}function ie({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:r,trigger:a}){if(I(e,0))return t;const l=a==="imperative-api",s=Object.values(t),i=Object.values(r),u=[...s],[c,h]=o;P(c!=null,"Invalid first pivot index"),P(h!=null,"Invalid second pivot index");let d=0;switch(a){case"keyboard":{{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,p)){const v=z-b;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const f=e<0?c:h,g=n[f];P(g,`No panel constraints found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,z)){const v=b-p;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}break}default:{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const p=s[f],{collapsible:y,collapsedSize:z,minSize:b}=g;if(y&&O(p,b)<0)if(e>0){const v=b-z,R=v/2,E=p+e;O(E,b)<0&&(e=O(e,R)<=0?0:v)}else{const v=b-z,R=100-v/2,E=p-e;O(E,b)<0&&(e=O(100+e,R)>0?0:-v)}break}}{const f=e<0?1:-1;let g=e<0?h:c,p=0;for(;;){const z=s[g];P(z!=null,`Previous layout not found for panel index ${g}`);const b=Z({overrideDisabledPanels:l,panelConstraints:n[g],prevSize:z,size:100})-z;if(p+=b,g+=f,g<0||g>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-y:y}{let f=e<0?c:h;for(;f>=0&&f<n.length;){const g=Math.abs(e)-Math.abs(d),p=s[f];P(p!=null,`Previous layout not found for panel index ${f}`);const y=p-g,z=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:p,size:y});if(!I(p,z)&&(d+=p-z,u[f]=z,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(jt(i,u))return r;{const f=e<0?h:c,g=s[f];P(g!=null,`Previous layout not found for panel index ${f}`);const p=g+d,y=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:g,size:p});if(u[f]=y,!I(y,p)){let z=p-y,b=e<0?h:c;for(;b>=0&&b<n.length;){const v=u[b];P(v!=null,`Previous layout not found for panel index ${b}`);const R=v+z,E=Z({overrideDisabledPanels:l,panelConstraints:n[b],prevSize:v,size:R});if(I(v,E)||(z-=E-v,u[b]=E),I(z,0))break;e>0?b--:b++}}}const S=Object.values(u).reduce((f,g)=>g+f,0);if(!I(S,100,.1))return r;const m=Object.keys(r);return u.reduce((f,g,p)=>(f[m[p]]=g,f),{})}function Y(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||O(e[n],t[n])!==0)return!1;return!0}function X({layout:e,panelConstraints:t}){const n=Object.values(e),o=[...n],r=o.reduce((s,i)=>s+i,0);if(o.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${o.map(s=>`${s}%`).join(", ")}`);if(!I(r,100)&&o.length>0)for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=100/r*i;o[s]=u}let a=0;for(let s=0;s<t.length;s++){const i=n[s];P(i!=null,`No layout data found for index ${s}`);const u=o[s];P(u!=null,`No layout data found for index ${s}`);const c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});u!=c&&(a+=u-c,o[s]=c)}if(!I(a,0))for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=i+a,c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});if(i!==c&&(a-=c-i,o[s]=c,I(a,0)))break}const l=Object.keys(e);return o.reduce((s,i,u)=>(s[l[u]]=i,s),{})}function tt({groupId:e,panelId:t}){const n=()=>{const i=_();for(const[u,{defaultLayoutDeferred:c,derivedPanelConstraints:h,layout:d,groupSize:S,separatorToPanels:m}]of i)if(u.id===e)return{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:u,groupSize:S,layout:d,separatorToPanels:m};throw Error(`Group ${e} not found`)},o=()=>{const i=n().derivedPanelConstraints.find(u=>u.panelId===t);if(i!==void 0)return i;throw Error(`Panel constraints not found for Panel ${t}`)},r=()=>{const i=n().group.panels.find(u=>u.id===t);if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},a=()=>{const i=n().layout[t];if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},l=({nextSize:i,panels:u,prevLayout:c,derivedPanelConstraints:h})=>{const d=a(),S=u.findIndex(g=>g.id===t),m=S===0,f=S===u.length-1;if(f&&i<d&&(m||u.slice(0,S).every((g,p)=>{const y=h[p];return y?.collapsible&&I(y.collapsedSize,c[y.panelId])}))){const g=u.slice(0,S).reduce((p,y)=>p+c[y.id],0);return{...c,[t]:T(100-g)}}return ie({delta:f?d-i:i-d,initialLayout:c,panelConstraints:h,pivotIndices:f?[S-1,S]:[S,S+1],prevLayout:c,trigger:"imperative-api"})},s=i=>{const u=a();if(i===u)return;const{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:d,groupSize:S,layout:m,separatorToPanels:f}=n(),g=l({nextSize:i,panels:d.panels,prevLayout:m,derivedPanelConstraints:h}),p=X({layout:g,panelConstraints:h});Y(m,p)||W(d,{defaultLayoutDeferred:c,derivedPanelConstraints:h,groupSize:S,layout:p,separatorToPanels:f})};return{collapse:()=>{const{collapsible:i,collapsedSize:u}=o(),{mutableValues:c}=r(),h=a();i&&h!==u&&(c.expandToSize=h,s(u))},expand:()=>{const{collapsible:i,collapsedSize:u,minSize:c}=o(),{mutableValues:h}=r(),d=a();if(i&&d===u){let S=h.expandToSize??c;S===0&&(S=1),s(S)}},getSize:()=>{const{group:i}=n(),u=a(),{element:c}=r(),h=i.orientation==="horizontal"?c.offsetWidth:c.offsetHeight;return{asPercentage:u,inPixels:h}},isCollapsed:()=>{const{collapsible:i,collapsedSize:u}=o(),c=a();return i&&I(u,c)},resize:i=>{const{group:u}=n(),{element:c}=r(),h=te({group:u}),d=re({groupSize:h,panelElement:c,styleProp:i}),S=T(d/h*100);s(S)}}}function je(e){if(e.defaultPrevented)return;const t=_();ze(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const o=n.panels.find(r=>r.panelConstraints.defaultSize!==void 0);if(o){const r=o.panelConstraints.defaultSize,a=tt({groupId:n.group.id,panelId:o.id});a&&r!==void 0&&(a.resize(r),e.preventDefault())}}})}function de(e){const t=_();for(const[n]of t)if(n.separators.some(o=>o.element===e))return n;throw Error("Could not find parent Group for separator element")}function nt({groupId:e}){const t=()=>{const n=_();for(const[o,r]of n)if(o.id===e)return{group:o,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:o}=t();return n?{}:o},setLayout(n){const{defaultLayoutDeferred:o,derivedPanelConstraints:r,group:a,groupSize:l,layout:s,separatorToPanels:i}=t(),u=X({layout:n,panelConstraints:r});return o?s:(Y(s,u)||W(a,{defaultLayoutDeferred:o,derivedPanelConstraints:r,groupSize:l,layout:u,separatorToPanels:i}),u)}}}function V(e,t){const n=de(e),o=H(n.id,!0),r=n.separators.find(c=>c.element===e);P(r,"Matching separator not found");const a=o.separatorToPanels.get(r);P(a,"Matching panels not found");const l=a.map(c=>n.panels.indexOf(c)),s=nt({groupId:n.id}).getLayout(),i=ie({delta:t,initialLayout:s,panelConstraints:o.derivedPanelConstraints,pivotIndices:l,prevLayout:s,trigger:"keyboard"}),u=X({layout:i,panelConstraints:o.derivedPanelConstraints});Y(s,u)||W(n,{defaultLayoutDeferred:o.defaultLayoutDeferred,derivedPanelConstraints:o.derivedPanelConstraints,groupSize:o.groupSize,layout:u,separatorToPanels:o.separatorToPanels},{isUserInteraction:!0})}function Oe(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=de(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&V(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&V(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&V(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&V(t,-5);break}case"End":{e.preventDefault(),V(t,100);break}case"Enter":{e.preventDefault();const o=de(t),r=H(o.id,!0),{derivedPanelConstraints:a,layout:l,separatorToPanels:s}=r,i=o.separators.find(d=>d.element===t);P(i,"Matching separator not found");const u=s.get(i);P(u,"Matching panels not found");const c=u[0],h=a.find(d=>d.panelId===c.id);if(P(h,"Panel metadata not found"),h.collapsible){const d=l[c.id],S=h.collapsedSize===d?o.mutableState.expandedPanelSizes[c.id]??h.minSize:h.collapsedSize;V(t,S-d)}break}case"F6":{e.preventDefault();const o=de(t).separators.map(l=>l.element),r=Array.from(o).findIndex(l=>l===e.currentTarget);P(r!==null,"Index not found");const a=e.shiftKey?r>0?r-1:o.length-1:r+1<o.length?r+1:0;o[a].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),V(t,-100);break}}}function Fe(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=_(),n=ze(e,t),o=new Map;let r=!1;n.forEach(a=>{a.separator&&(r||(r=!0,a.separator.element.focus({focusVisible:!1,preventScroll:!0})));const l=t.get(a.group);l&&o.set(a.group,l.layout)}),ee({cursorFlags:0,hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function ot({document:e,event:t,hitRegions:n,initialLayoutMap:o,mountedGroups:r,pointerDownAtPoint:a,prevCursorFlags:l}){let s=0;n.forEach(u=>{const{group:c,groupSize:h}=u,{orientation:d,panels:S}=c,{disableCursor:m}=c.mutableState;let f=0;a?d==="horizontal"?f=(t.clientX-a.x)/h*100:f=(t.clientY-a.y)/h*100:d==="horizontal"?f=t.clientX<0?-100:100:f=t.clientY<0?-100:100;const g=o.get(c),p=r.get(c);if(!g||!p)return;const{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:v,separatorToPanels:R}=p;if(z&&v&&R){const E=ie({delta:f,initialLayout:g,panelConstraints:z,pivotIndices:u.panels.map(M=>S.indexOf(M)),prevLayout:v,trigger:"mouse-or-touch"});if(Y(E,v)){if(f!==0&&!m)switch(d){case"horizontal":{s|=f<0?_e:Je;break}case"vertical":{s|=f<0?qe:Ke;break}}}else W(u.group,{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:E,separatorToPanels:R})}});let i=0;t.movementX===0?i|=l&Le:i|=s&Le,t.movementY===0?i|=l&Re:i|=s&Re,xt(i),be(e)}function Ae(e){const t=_(),n=U();n.state==="active"&&ot({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function Ge(e){if(e.defaultPrevented)return;const t=U(),n=_();switch(t.state){case"active":{if(e.buttons===0){ee({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})});return}for(const o of t.hitRegions)if(o.separator){const{element:r}=o.separator;r.hasPointerCapture?.(e.pointerId)||r.setPointerCapture?.(e.pointerId)}ot({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const o=ze(e,n);o.length===0?t.state!=="inactive"&&ee({cursorFlags:0,state:"inactive"}):ee({cursorFlags:0,hitRegions:o,state:"hover"}),be(e.currentTarget);break}}}function $e(e){e.relatedTarget instanceof HTMLIFrameElement&&U().state==="hover"&&ee({cursorFlags:0,state:"inactive"})}function Be(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||Qe(e.currentTarget)&&e.preventDefault()}function We(e){let t=0,n=0;const o={};for(const a of e)if(a.defaultSize!==void 0){t++;const l=T(a.defaultSize);n+=l,o[a.panelId]=l}else o[a.panelId]=void 0;const r=e.length-t;if(r!==0){const a=T((100-n)/r);for(const l of e)l.defaultSize===void 0&&(o[l.panelId]=a)}return o}function Ot(e,t,n){if(!n[0])return;const o=e.panels.find(i=>i.element===t);if(!o||!o.onResize)return;const r=te({group:e}),a=e.orientation==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,l=o.mutableValues.prevSize,s={asPercentage:T(a/r*100),inPixels:a};o.mutableValues.prevSize=s,o.onResize(s,o.id,l)}function Ft(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function At({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:o}){if(n<=0||t<=0||n===t)return o;let r=0,a=0,l=!1;const s=new Map,i=[];for(const h of e.panels){const d=o[h.id]??0;if(h.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){l=!0;const S=d/100*n,m=T(S/t*100);s.set(h.id,m),r+=m}else i.push(h.id),a+=d}if(!l||i.length===0)return o;const u=100-r,c={...o};if(s.forEach((h,d)=>{c[d]=h}),a>0)for(const h of i){const d=o[h]??0;c[h]=T(d/a*u)}else{const h=T(u/i.length);for(const d of i)c[d]=h}return c}function Gt(e,t){const n=e.map(r=>r.id),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(!o.includes(r))return!1;return!0}const K=new Map;function $t(e){let t=!0;P(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,o=new Set,r=new Set,a=new n(m=>{for(const f of m){const{borderBoxSize:g,target:p}=f;if(p===e.element){if(t){const y=te({group:e});if(y===0)return;const z=H(e.id);if(!z)return;const b=he(e),v=z.defaultLayoutDeferred?We(b):z.layout,R=At({group:e,nextGroupSize:y,prevGroupSize:z.groupSize,prevLayout:v}),E=X({layout:R,panelConstraints:b});if(!z.defaultLayoutDeferred&&Y(z.layout,E)&&Ft(z.derivedPanelConstraints,b)&&z.groupSize===y)return;W(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:b,groupSize:y,layout:E,separatorToPanels:z.separatorToPanels})}}else Ot(e,p,g)}});a.observe(e.element),e.panels.forEach(m=>{P(!o.has(m.id),`Panel ids must be unique; id "${m.id}" was used more than once`),o.add(m.id),m.onResize&&a.observe(m.element)});const l=te({group:e}),s=he(e),i=e.panels.map(({id:m})=>m).join(",");let u=e.mutableState.defaultLayout;u&&(Gt(e.panels,u)||(u=void 0));const c=e.mutableState.layouts[i]??u??We(s),h=X({layout:c,panelConstraints:s}),d=e.element.ownerDocument;K.set(d,(K.get(d)??0)+1);const S=new Map;return Ye(e).forEach(m=>{m.separator&&S.set(m.separator,m.panels)}),W(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:s,groupSize:l,layout:h,separatorToPanels:S}),e.separators.forEach(m=>{P(!r.has(m.id),`Separator ids must be unique; id "${m.id}" was used more than once`),r.add(m.id),m.element.addEventListener("keydown",Oe)}),K.get(d)===1&&(d.addEventListener("contextmenu",De,!0),d.addEventListener("dblclick",je,!0),d.addEventListener("pointerdown",Fe,!0),d.addEventListener("pointerleave",Ae),d.addEventListener("pointermove",Ge),d.addEventListener("pointerout",$e),d.addEventListener("pointerup",Be,!0)),function(){t=!1,K.set(d,Math.max(0,(K.get(d)??0)-1)),Lt(e),e.separators.forEach(m=>{m.element.removeEventListener("keydown",Oe)}),K.get(d)||(d.removeEventListener("contextmenu",De,!0),d.removeEventListener("dblclick",je,!0),d.removeEventListener("pointerdown",Fe,!0),d.removeEventListener("pointerleave",Ae),d.removeEventListener("pointermove",Ge),d.removeEventListener("pointerout",$e),d.removeEventListener("pointerup",Be,!0)),a.disconnect()}}function Bt(){const[e,t]=L.useState({}),n=L.useCallback(()=>t({}),[]);return[e,n]}function Se(e){const t=L.useId();return`${e??t}`}const J=typeof window<"u"?L.useLayoutEffect:L.useEffect;function ae(e){const t=L.useRef(e);return J(()=>{t.current=e},[e]),L.useCallback((...n)=>t.current?.(...n),[t])}function we(...e){return ae(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function xe(e){const t=L.useRef({...e});return J(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const rt=L.createContext(null);function Wt(e,t){const n=L.useRef({getLayout:()=>({}),setLayout:Ct});L.useImperativeHandle(t,()=>n.current,[]),J(()=>{Object.assign(n.current,nt({groupId:e}))})}function at({children:e,className:t,defaultLayout:n,disableCursor:o,disabled:r,elementRef:a,groupRef:l,id:s,onLayoutChange:i,onLayoutChanged:u,orientation:c="horizontal",resizeTargetMinimumSize:h={coarse:20,fine:10},style:d,...S}){const m=L.useRef({onLayoutChange:{},onLayoutChanged:{}}),f=ae(w=>{Y(m.current.onLayoutChange,w)||(m.current.onLayoutChange=w,i?.(w))}),g=ae((w,x)=>{Y(m.current.onLayoutChanged,w)||(m.current.onLayoutChanged=w,u?.(w,{isUserInteraction:x}))}),p=Se(s),y=L.useRef(null),[z,b]=Bt(),v=L.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:h,separators:[]}),R=we(y,a);Wt(p,l);const E=ae((w,x)=>{const k=U(),C=Me(w),D=H(w);if(D){let N=!1;return k.state==="active"&&(N=k.hitRegions.some(ne=>ne.group===C)),{flexGrow:D.layout[x]??1,pointerEvents:N?"none":void 0}}if(n?.[x])return{flexGrow:n?.[x]}}),M=xe({defaultLayout:n,disableCursor:o}),j=L.useMemo(()=>({get disableCursor(){return!!M.disableCursor},getPanelStyles:E,id:p,orientation:c,registerPanel:w=>{const x=v.current;return x.panels=ge(c,[...x.panels,w]),b(),()=>{x.panels=x.panels.filter(k=>k!==w),b()}},registerSeparator:w=>{const x=v.current;return x.separators=ge(c,[...x.separators,w]),b(),()=>{x.separators=x.separators.filter(k=>k!==w),b()}},updatePanelProps:(w,{disabled:x})=>{const k=v.current.panels.find(N=>N.id===w);k&&(k.panelConstraints.disabled=x);const C=Me(p),D=H(p);C&&D&&W(C,{...D,derivedPanelConstraints:he(C)})},updateSeparatorProps:(w,{disabled:x,disableDoubleClick:k})=>{const C=v.current.separators.find(D=>D.id===w);C&&(C.disabled=x,C.disableDoubleClick=k)}}),[E,p,b,c,M]),G=L.useRef(null);return J(()=>{const w=y.current;if(w===null)return;const x=v.current;let k;if(M.defaultLayout!==void 0&&Object.keys(M.defaultLayout).length===x.panels.length){k={};for(const $ of x.panels){const q=M.defaultLayout[$.id];q!==void 0&&(k[$.id]=q)}}const C={disabled:!!r,element:w,id:p,mutableState:{defaultLayout:k,disableCursor:!!M.disableCursor,expandedPanelSizes:v.current.lastExpandedPanelSizes,layouts:v.current.layouts},orientation:c,panels:x.panels,resizeTargetMinimumSize:x.resizeTargetMinimumSize,separators:x.separators};G.current=C;const D=$t(C),{defaultLayoutDeferred:N,derivedPanelConstraints:ne,layout:se}=H(C.id,!0);!N&&ne.length>0&&(f(se),g(se,!1));const oe=ye(p,$=>{const{defaultLayoutDeferred:q,derivedPanelConstraints:Pe,layout:le}=$.next;if(q||Pe.length===0)return;const lt=C.panels.map(({id:B})=>B).join(",");C.mutableState.layouts[lt]=le,Pe.forEach(B=>{if(B.collapsible){const{layout:fe}=$.prev??{};if(fe){const ct=I(B.collapsedSize,le[B.panelId]),dt=I(B.collapsedSize,fe[B.panelId]);ct&&!dt&&(C.mutableState.expandedPanelSizes[B.panelId]=fe[B.panelId])}}});const ut=U().state!=="active";f(le),ut&&g(le,$.isUserInteraction)});return()=>{G.current=null,D(),oe()}},[r,p,g,f,c,z,M]),L.useEffect(()=>{const w=G.current;w&&(w.mutableState.defaultLayout=n,w.mutableState.disableCursor=!!o)}),A.jsx(rt.Provider,{value:j,children:A.jsx("div",{...S,className:t,"data-group":!0,"data-testid":p,id:p,ref:R,style:{height:"100%",width:"100%",overflow:"hidden",...d,display:"flex",flexDirection:c==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:c==="horizontal"?"pan-y":"pan-x"},children:e})})}at.displayName="Group";function Ce(){const e=L.useContext(rt);return P(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Ht(e,t){const{id:n}=Ce(),o=L.useRef({collapse:pe,expand:pe,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:pe});L.useImperativeHandle(t,()=>o.current,[]),J(()=>{Object.assign(o.current,tt({groupId:n,panelId:e}))})}function it({children:e,className:t,collapsedSize:n="0%",collapsible:o=!1,defaultSize:r,disabled:a,elementRef:l,groupResizeBehavior:s="preserve-relative-size",id:i,maxSize:u="100%",minSize:c="0%",onResize:h,panelRef:d,style:S,...m}){const f=!!i,g=Se(i),p=xe({disabled:a}),y=L.useRef(null),z=we(y,l),{getPanelStyles:b,id:v,orientation:R,registerPanel:E,updatePanelProps:M}=Ce(),j=h!==null,G=ae((C,D,N)=>{h?.(C,i,N)});J(()=>{const C=y.current;if(C!==null){const D={element:C,id:g,idIsStable:f,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:j?G:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:o,defaultSize:r,disabled:p.disabled,maxSize:u,minSize:c}};return E(D)}},[s,n,o,r,j,g,f,u,c,G,E,p]),L.useEffect(()=>{M(g,{disabled:a})},[a,g,M]),Ht(g,d);const w=()=>{const C=b(v,g);if(C)return JSON.stringify(C)},x=L.useSyncExternalStore(C=>ye(v,C),w,w);let k;return x?k=JSON.parse(x):r!==void 0?k={flexGrow:void 0,flexShrink:void 0,flexBasis:r}:k={flexGrow:1},A.jsx("div",{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:z,style:{...Vt,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...k},children:A.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...S,touchAction:R==="horizontal"?"pan-y":"pan-x"},children:e})})}it.displayName="Panel";const Vt={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Ut({layout:e,panelConstraints:t,panelId:n,panelIndex:o}){let r,a;const l=e[n],s=t.find(i=>i.panelId===n);if(s){const i=s.maxSize,u=s.collapsible?s.collapsedSize:s.minSize,c=[o,o+1];a=X({layout:ie({delta:u-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n],r=X({layout:ie({delta:i-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:r,valueMin:a,valueNow:l}}function st({children:e,className:t,disabled:n,disableDoubleClick:o,elementRef:r,id:a,style:l,...s}){const i=Se(a),u=xe({disabled:n,disableDoubleClick:o}),[c,h]=L.useState({}),[d,S]=L.useState("inactive"),[m,f]=L.useState(!1),g=L.useRef(null),p=we(g,r),{disableCursor:y,id:z,orientation:b,registerSeparator:v,updateSeparatorProps:R}=Ce(),E=b==="horizontal"?"vertical":"horizontal";J(()=>{const G=g.current;if(G!==null){const w={disabled:u.disabled,disableDoubleClick:u.disableDoubleClick,element:G,id:i},x=v(w),k=wt(D=>{S(D.next.state!=="inactive"&&D.next.hitRegions.some(N=>N.separator===w)?D.next.state:"inactive")}),C=ye(z,D=>{const{derivedPanelConstraints:N,layout:ne,separatorToPanels:se}=D.next,oe=se.get(w);if(oe){const $=oe[0],q=oe.indexOf($);h(Ut({layout:ne,panelConstraints:N,panelId:$.id,panelIndex:q}))}});return()=>{k(),C(),x()}}},[z,i,v,u]),L.useEffect(()=>{R(i,{disabled:n,disableDoubleClick:o})},[n,o,i,R]);let M;n&&!y&&(M="not-allowed");let j;return n?j="disabled":d==="active"?j="active":m?j="focus":j=d,A.jsx("div",{...s,"aria-controls":c.valueControls,"aria-disabled":n||void 0,"aria-orientation":E,"aria-valuemax":c.valueMax,"aria-valuemin":c.valueMin,"aria-valuenow":c.valueNow,children:e,className:t,"data-separator":j,"data-testid":i,id:i,onBlur:()=>f(!1),onFocus:()=>f(!0),ref:p,role:"separator",style:{flexBasis:"auto",cursor:M,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}st.displayName="Separator";function _t(e){const t=ve.c(10);let n,o,r;t[0]!==e?({className:n,ref:r,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("flex h-full w-full",n),t[4]=n,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==r||t[8]!==a?(l=A.jsx(at,{groupRef:r,"data-slot":"resizable-panel-group",className:a,...o}),t[6]=o,t[7]=r,t[8]=a,t[9]=l):l=t[9],l}function Jt(e){const t=ve.c(10);let n,o,r;t[0]!==e?({ref:o,style:r,...n}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==r?(a={overflow:"hidden",...r},t[4]=r,t[5]=a):a=t[5];let l;return t[6]!==n||t[7]!==o||t[8]!==a?(l=A.jsx(it,{panelRef:o,"data-slot":"resizable-panel",style:a,...n}),t[6]=n,t[7]=o,t[8]=a,t[9]=l):l=t[9],l}function qt(e){const t=ve.c(12);let n,o,r;t[0]!==e?({withHandle:r,className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90",n),t[4]=n,t[5]=a):a=t[5];let l;t[6]!==r?(l=r&&A.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:A.jsx(ft,{className:"size-2.5"})}),t[6]=r,t[7]=l):l=t[7];let s;return t[8]!==o||t[9]!==a||t[10]!==l?(s=A.jsx(st,{"data-slot":"resizable-handle",className:a,...o,children:l}),t[8]=o,t[9]=a,t[10]=l,t[11]=s):s=t[11],s}export{_t as R,Jt as a,qt as b};
|
|
1
|
+
import{r as L,j as A,c as ve,l as He}from"./index-CmhfcT17.js";import{an as ft}from"./agent-icon-DEc9IKAh.js";function pt(e,t){const n=getComputedStyle(e),o=parseFloat(n.fontSize);return t*o}function ht(e,t){const n=getComputedStyle(e.ownerDocument.documentElement),o=parseFloat(n.fontSize);return t*o}function gt(e){return e/100*window.innerHeight}function vt(e){return e/100*window.innerWidth}function mt(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function re({groupSize:e,panelElement:t,styleProp:n}){let o;const[r,a]=mt(n);switch(a){case"%":{o=r/100*e;break}case"px":{o=r;break}case"rem":{o=ht(t,r);break}case"em":{o=pt(t,r);break}case"vh":{o=gt(r);break}case"vw":{o=vt(r);break}}return o}function T(e){return parseFloat(e.toFixed(3))}function te({group:e}){const{orientation:t,panels:n}=e;return n.reduce((o,r)=>(o+=t==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,o),0)}function he(e){const{panels:t}=e,n=te({group:e});return n===0?t.map(o=>({groupResizeBehavior:o.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:o.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:o.panelConstraints.disabled,minSize:0,maxSize:100,panelId:o.id})):t.map(o=>{const{element:r,panelConstraints:a}=o;let l=0;if(a.collapsedSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.collapsedSize});l=T(c/n*100)}let s;if(a.defaultSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.defaultSize});s=T(c/n*100)}let i=0;if(a.minSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.minSize});i=T(c/n*100)}let u=100;if(a.maxSize!==void 0){const c=re({groupSize:n,panelElement:r,styleProp:a.maxSize});u=T(c/n*100)}return{groupResizeBehavior:a.groupResizeBehavior,collapsedSize:l,collapsible:a.collapsible===!0,defaultSize:s,disabled:a.disabled,minSize:i,maxSize:u,panelId:o.id}})}function P(e,t="Assertion error"){if(!e)throw Error(t)}function ge(e,t){return Array.from(t).sort(e==="horizontal"?bt:yt)}function bt(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function yt(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Ve(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ue(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function zt({orientation:e,rects:t,targetRect:n}){const o={x:n.x+n.width/2,y:n.y+n.height/2};let r,a=Number.MAX_VALUE;for(const l of t){const{x:s,y:i}=Ue(o,l),u=e==="horizontal"?s:i;u<a&&(a=u,r=l)}return P(r,"No rect found"),r}let ue;function St(){return ue===void 0&&(typeof matchMedia=="function"?ue=!!matchMedia("(pointer:coarse)").matches:ue=!1),ue}function Ye(e){const{element:t,orientation:n,panels:o,separators:r}=e,a=ge(n,Array.from(t.children).filter(Ve).map(m=>({element:m}))).map(({element:m})=>m),l=[];let s=!1,i=!1,u=-1,c=-1,h=0,d,S=[];{let m=-1;for(const f of a)f.hasAttribute("data-panel")&&(m++,f.hasAttribute("data-disabled")||(h++,u===-1&&(u=m),c=m))}if(h>1){let m=-1;for(const f of a)if(f.hasAttribute("data-panel")){m++;const g=o.find(p=>p.element===f);if(g){if(d){const p=d.element.getBoundingClientRect(),y=f.getBoundingClientRect();let z;if(i){const b=n==="horizontal"?new DOMRect(p.right,p.top,0,p.height):new DOMRect(p.left,p.bottom,p.width,0),v=n==="horizontal"?new DOMRect(y.left,y.top,0,y.height):new DOMRect(y.left,y.top,y.width,0);switch(S.length){case 0:{z=[b,v];break}case 1:{const R=S[0],E=zt({orientation:n,rects:[p,y],targetRect:R.element.getBoundingClientRect()});z=[R,E===p?v:b];break}default:{z=S;break}}}else S.length?z=S:z=[n==="horizontal"?new DOMRect(p.right,y.top,y.left-p.right,y.height):new DOMRect(y.left,p.bottom,y.width,y.top-p.bottom)];for(const b of z){let v="width"in b?b:b.element.getBoundingClientRect();const R=St()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(v.width<R){const M=R-v.width;v=new DOMRect(v.x-M/2,v.y,v.width+M,v.height)}if(v.height<R){const M=R-v.height;v=new DOMRect(v.x,v.y-M/2,v.width,v.height+M)}const E=m<=u||m>c;!s&&!E&&l.push({group:e,groupSize:te({group:e}),panels:[d,g],separator:"width"in b?void 0:b,rect:v}),s=!1}}i=!1,d=g,S=[]}}else if(f.hasAttribute("data-separator")){f.ariaDisabled!==null&&(s=!0);const g=r.find(p=>p.element===f);g?S.push(g):(d=void 0,S=[])}else i=!0}return l}class Xe{#e={};addListener(t,n){const o=this.#e[t];return o===void 0?this.#e[t]=[n]:o.includes(n)||o.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const o=this.#e[t];if(o!==void 0)if(o.length===1)o[0].call(null,n);else{let r=!1,a=null;const l=Array.from(o);for(let s=0;s<l.length;s++){const i=l[s];try{i.call(null,n)}catch(u){a===null&&(r=!0,a=u)}}if(r)throw a}}removeAllListeners(){this.#e={}}removeListener(t,n){const o=this.#e[t];if(o!==void 0){const r=o.indexOf(n);r>=0&&o.splice(r,1)}}}let Q={cursorFlags:0,state:"inactive"};const me=new Xe;function U(){return Q}function wt(e){return me.addListener("change",e)}function xt(e){const t=Q,n={...Q};n.cursorFlags=e,Q=n,me.emit("change",{prev:t,next:n})}function ee(e){const t=Q;Q=e,me.emit("change",{prev:t,next:e})}const Ct=e=>e,pe=()=>{},_e=1,Je=2,qe=4,Ke=8,Le=3,Re=12;let ce;function Ee(){return ce===void 0&&(ce=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(ce=!0)),ce}function Pt({cursorFlags:e,groups:t,state:n}){let o=0,r=0;switch(n){case"active":case"hover":t.forEach(a=>{if(!a.mutableState.disableCursor)switch(a.orientation){case"horizontal":{o++;break}case"vertical":{r++;break}}})}if(!(o===0&&r===0)){switch(n){case"active":{if(e&&Ee()){const a=(e&_e)!==0,l=(e&Je)!==0,s=(e&qe)!==0,i=(e&Ke)!==0;if(a)return s?"se-resize":i?"ne-resize":"e-resize";if(l)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}break}}return Ee()?o>0&&r>0?"move":o>0?"ew-resize":"ns-resize":o>0&&r>0?"grab":o>0?"col-resize":"row-resize"}}const ke=new WeakMap;function be(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=ke.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const o=U();switch(o.state){case"active":case"hover":{const r=Pt({cursorFlags:o.cursorFlags,groups:o.hitRegions.map(l=>l.group),state:o.state}),a=`*, *:hover {cursor: ${r} !important; }`;if(t===a)return;t=a,r?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}ke.set(e,{prevStyle:t,styleSheet:n})}let F=new Map;const Ze=new Xe;function Lt(e){F=new Map(F),F.delete(e)}function Me(e,t){for(const[n]of F)if(n.id===e)return n}function H(e,t){for(const[n,o]of F)if(n.id===e)return o;if(t)throw Error(`Could not find data for Group with id ${e}`)}function _(){return F}function ye(e,t){return Ze.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function W(e,t,n){const o=F.get(e);F=new Map(F),F.set(e,t),Ze.emit("groupChange",{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:o,next:t})}function Qe(e){const t=U();let n=!1;return t.state==="active"&&(ee({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(be(e),n=!0,t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})}))),n}function De(e){e.defaultPrevented||Qe(e.currentTarget)}function Rt(e,t,n){let o,r={x:1/0,y:1/0};for(const a of t){const l=Ue(n,a.rect);switch(e){case"horizontal":{l.x<=r.x&&(o=a,r=l);break}case"vertical":{l.y<=r.y&&(o=a,r=l);break}}}return o?{distance:r,hitRegion:o}:void 0}function Et(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function kt(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Ne(e),b:Ne(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)o=n.a.pop(),n.b.pop();P(o,"Stacking order can only be calculated for elements with a common ancestor");const r={a:Te(Ie(n.a)),b:Te(Ie(n.b))};if(r.a===r.b){const a=o.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let s=a.length;for(;s--;){const i=a[s];if(i===l.a)return 1;if(i===l.b)return-1}}return Math.sign(r.a-r.b)}const Mt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Dt(e){const t=getComputedStyle(et(e)??e).display;return t==="flex"||t==="inline-flex"}function It(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Dt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Mt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ie(e){let t=e.length;for(;t--;){const n=e[t];if(P(n,"Missing node"),It(n))return n}return null}function Te(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Ne(e){const t=[];for(;e;)t.push(e),e=et(e);return t}function et(e){const{parentNode:t}=e;return Et(t)?t.host:t}function Tt(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Nt({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Ve(n)||n.contains(e)||e.contains(n))return!0;if(kt(n,e)>0){let o=n;for(;o;){if(o.contains(e))return!0;if(Tt(o.getBoundingClientRect(),t))return!1;o=o.parentElement}}return!0}function ze(e,t){const n=[];return t.forEach((o,r)=>{if(r.disabled)return;const a=Ye(r),l=Rt(r.orientation,a,{x:e.clientX,y:e.clientY});l&&l.distance.x<=0&&l.distance.y<=0&&Nt({groupElement:r.element,hitRegion:l.hitRegion.rect,pointerEventTarget:e.target})&&n.push(l.hitRegion)}),n}function jt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function I(e,t,n=0){return Math.abs(T(e)-T(t))<=n}function O(e,t){return I(e,t)?0:e>t?1:-1}function Z({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:o}){const{collapsedSize:r=0,collapsible:a,disabled:l,maxSize:s=100,minSize:i=0}=t;if(l&&!e)return n;if(O(o,i)<0)if(a){const u=(r+i)/2;O(o,u)<0?o=r:o=i}else o=i;return o=Math.min(s,o),o=T(o),o}function ie({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:r,trigger:a}){if(I(e,0))return t;const l=a==="imperative-api",s=Object.values(t),i=Object.values(r),u=[...s],[c,h]=o;P(c!=null,"Invalid first pivot index"),P(h!=null,"Invalid second pivot index");let d=0;switch(a){case"keyboard":{{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,p)){const v=z-b;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const f=e<0?c:h,g=n[f];P(g,`No panel constraints found for index ${f}`);const{collapsedSize:p=0,collapsible:y,minSize:z=0}=g;if(y){const b=s[f];if(P(b!=null,`Previous layout not found for panel index ${f}`),I(b,z)){const v=b-p;O(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}break}default:{const f=e<0?h:c,g=n[f];P(g,`Panel constraints not found for index ${f}`);const p=s[f],{collapsible:y,collapsedSize:z,minSize:b}=g;if(y&&O(p,b)<0)if(e>0){const v=b-z,R=v/2,E=p+e;O(E,b)<0&&(e=O(e,R)<=0?0:v)}else{const v=b-z,R=100-v/2,E=p-e;O(E,b)<0&&(e=O(100+e,R)>0?0:-v)}break}}{const f=e<0?1:-1;let g=e<0?h:c,p=0;for(;;){const z=s[g];P(z!=null,`Previous layout not found for panel index ${g}`);const b=Z({overrideDisabledPanels:l,panelConstraints:n[g],prevSize:z,size:100})-z;if(p+=b,g+=f,g<0||g>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-y:y}{let f=e<0?c:h;for(;f>=0&&f<n.length;){const g=Math.abs(e)-Math.abs(d),p=s[f];P(p!=null,`Previous layout not found for panel index ${f}`);const y=p-g,z=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:p,size:y});if(!I(p,z)&&(d+=p-z,u[f]=z,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(jt(i,u))return r;{const f=e<0?h:c,g=s[f];P(g!=null,`Previous layout not found for panel index ${f}`);const p=g+d,y=Z({overrideDisabledPanels:l,panelConstraints:n[f],prevSize:g,size:p});if(u[f]=y,!I(y,p)){let z=p-y,b=e<0?h:c;for(;b>=0&&b<n.length;){const v=u[b];P(v!=null,`Previous layout not found for panel index ${b}`);const R=v+z,E=Z({overrideDisabledPanels:l,panelConstraints:n[b],prevSize:v,size:R});if(I(v,E)||(z-=E-v,u[b]=E),I(z,0))break;e>0?b--:b++}}}const S=Object.values(u).reduce((f,g)=>g+f,0);if(!I(S,100,.1))return r;const m=Object.keys(r);return u.reduce((f,g,p)=>(f[m[p]]=g,f),{})}function Y(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||O(e[n],t[n])!==0)return!1;return!0}function X({layout:e,panelConstraints:t}){const n=Object.values(e),o=[...n],r=o.reduce((s,i)=>s+i,0);if(o.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${o.map(s=>`${s}%`).join(", ")}`);if(!I(r,100)&&o.length>0)for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=100/r*i;o[s]=u}let a=0;for(let s=0;s<t.length;s++){const i=n[s];P(i!=null,`No layout data found for index ${s}`);const u=o[s];P(u!=null,`No layout data found for index ${s}`);const c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});u!=c&&(a+=u-c,o[s]=c)}if(!I(a,0))for(let s=0;s<t.length;s++){const i=o[s];P(i!=null,`No layout data found for index ${s}`);const u=i+a,c=Z({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:i,size:u});if(i!==c&&(a-=c-i,o[s]=c,I(a,0)))break}const l=Object.keys(e);return o.reduce((s,i,u)=>(s[l[u]]=i,s),{})}function tt({groupId:e,panelId:t}){const n=()=>{const i=_();for(const[u,{defaultLayoutDeferred:c,derivedPanelConstraints:h,layout:d,groupSize:S,separatorToPanels:m}]of i)if(u.id===e)return{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:u,groupSize:S,layout:d,separatorToPanels:m};throw Error(`Group ${e} not found`)},o=()=>{const i=n().derivedPanelConstraints.find(u=>u.panelId===t);if(i!==void 0)return i;throw Error(`Panel constraints not found for Panel ${t}`)},r=()=>{const i=n().group.panels.find(u=>u.id===t);if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},a=()=>{const i=n().layout[t];if(i!==void 0)return i;throw Error(`Layout not found for Panel ${t}`)},l=({nextSize:i,panels:u,prevLayout:c,derivedPanelConstraints:h})=>{const d=a(),S=u.findIndex(g=>g.id===t),m=S===0,f=S===u.length-1;if(f&&i<d&&(m||u.slice(0,S).every((g,p)=>{const y=h[p];return y?.collapsible&&I(y.collapsedSize,c[y.panelId])}))){const g=u.slice(0,S).reduce((p,y)=>p+c[y.id],0);return{...c,[t]:T(100-g)}}return ie({delta:f?d-i:i-d,initialLayout:c,panelConstraints:h,pivotIndices:f?[S-1,S]:[S,S+1],prevLayout:c,trigger:"imperative-api"})},s=i=>{const u=a();if(i===u)return;const{defaultLayoutDeferred:c,derivedPanelConstraints:h,group:d,groupSize:S,layout:m,separatorToPanels:f}=n(),g=l({nextSize:i,panels:d.panels,prevLayout:m,derivedPanelConstraints:h}),p=X({layout:g,panelConstraints:h});Y(m,p)||W(d,{defaultLayoutDeferred:c,derivedPanelConstraints:h,groupSize:S,layout:p,separatorToPanels:f})};return{collapse:()=>{const{collapsible:i,collapsedSize:u}=o(),{mutableValues:c}=r(),h=a();i&&h!==u&&(c.expandToSize=h,s(u))},expand:()=>{const{collapsible:i,collapsedSize:u,minSize:c}=o(),{mutableValues:h}=r(),d=a();if(i&&d===u){let S=h.expandToSize??c;S===0&&(S=1),s(S)}},getSize:()=>{const{group:i}=n(),u=a(),{element:c}=r(),h=i.orientation==="horizontal"?c.offsetWidth:c.offsetHeight;return{asPercentage:u,inPixels:h}},isCollapsed:()=>{const{collapsible:i,collapsedSize:u}=o(),c=a();return i&&I(u,c)},resize:i=>{const{group:u}=n(),{element:c}=r(),h=te({group:u}),d=re({groupSize:h,panelElement:c,styleProp:i}),S=T(d/h*100);s(S)}}}function je(e){if(e.defaultPrevented)return;const t=_();ze(e,t).forEach(n=>{if(n.separator&&!n.separator.disableDoubleClick){const o=n.panels.find(r=>r.panelConstraints.defaultSize!==void 0);if(o){const r=o.panelConstraints.defaultSize,a=tt({groupId:n.group.id,panelId:o.id});a&&r!==void 0&&(a.resize(r),e.preventDefault())}}})}function de(e){const t=_();for(const[n]of t)if(n.separators.some(o=>o.element===e))return n;throw Error("Could not find parent Group for separator element")}function nt({groupId:e}){const t=()=>{const n=_();for(const[o,r]of n)if(o.id===e)return{group:o,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:o}=t();return n?{}:o},setLayout(n){const{defaultLayoutDeferred:o,derivedPanelConstraints:r,group:a,groupSize:l,layout:s,separatorToPanels:i}=t(),u=X({layout:n,panelConstraints:r});return o?s:(Y(s,u)||W(a,{defaultLayoutDeferred:o,derivedPanelConstraints:r,groupSize:l,layout:u,separatorToPanels:i}),u)}}}function V(e,t){const n=de(e),o=H(n.id,!0),r=n.separators.find(c=>c.element===e);P(r,"Matching separator not found");const a=o.separatorToPanels.get(r);P(a,"Matching panels not found");const l=a.map(c=>n.panels.indexOf(c)),s=nt({groupId:n.id}).getLayout(),i=ie({delta:t,initialLayout:s,panelConstraints:o.derivedPanelConstraints,pivotIndices:l,prevLayout:s,trigger:"keyboard"}),u=X({layout:i,panelConstraints:o.derivedPanelConstraints});Y(s,u)||W(n,{defaultLayoutDeferred:o.defaultLayoutDeferred,derivedPanelConstraints:o.derivedPanelConstraints,groupSize:o.groupSize,layout:u,separatorToPanels:o.separatorToPanels},{isUserInteraction:!0})}function Oe(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=de(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&V(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&V(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&V(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&V(t,-5);break}case"End":{e.preventDefault(),V(t,100);break}case"Enter":{e.preventDefault();const o=de(t),r=H(o.id,!0),{derivedPanelConstraints:a,layout:l,separatorToPanels:s}=r,i=o.separators.find(d=>d.element===t);P(i,"Matching separator not found");const u=s.get(i);P(u,"Matching panels not found");const c=u[0],h=a.find(d=>d.panelId===c.id);if(P(h,"Panel metadata not found"),h.collapsible){const d=l[c.id],S=h.collapsedSize===d?o.mutableState.expandedPanelSizes[c.id]??h.minSize:h.collapsedSize;V(t,S-d)}break}case"F6":{e.preventDefault();const o=de(t).separators.map(l=>l.element),r=Array.from(o).findIndex(l=>l===e.currentTarget);P(r!==null,"Index not found");const a=e.shiftKey?r>0?r-1:o.length-1:r+1<o.length?r+1:0;o[a].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),V(t,-100);break}}}function Fe(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=_(),n=ze(e,t),o=new Map;let r=!1;n.forEach(a=>{a.separator&&(r||(r=!0,a.separator.element.focus({focusVisible:!1,preventScroll:!0})));const l=t.get(a.group);l&&o.set(a.group,l.layout)}),ee({cursorFlags:0,hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}function ot({document:e,event:t,hitRegions:n,initialLayoutMap:o,mountedGroups:r,pointerDownAtPoint:a,prevCursorFlags:l}){let s=0;n.forEach(u=>{const{group:c,groupSize:h}=u,{orientation:d,panels:S}=c,{disableCursor:m}=c.mutableState;let f=0;a?d==="horizontal"?f=(t.clientX-a.x)/h*100:f=(t.clientY-a.y)/h*100:d==="horizontal"?f=t.clientX<0?-100:100:f=t.clientY<0?-100:100;const g=o.get(c),p=r.get(c);if(!g||!p)return;const{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:v,separatorToPanels:R}=p;if(z&&v&&R){const E=ie({delta:f,initialLayout:g,panelConstraints:z,pivotIndices:u.panels.map(M=>S.indexOf(M)),prevLayout:v,trigger:"mouse-or-touch"});if(Y(E,v)){if(f!==0&&!m)switch(d){case"horizontal":{s|=f<0?_e:Je;break}case"vertical":{s|=f<0?qe:Ke;break}}}else W(u.group,{defaultLayoutDeferred:y,derivedPanelConstraints:z,groupSize:b,layout:E,separatorToPanels:R})}});let i=0;t.movementX===0?i|=l&Le:i|=s&Le,t.movementY===0?i|=l&Re:i|=s&Re,xt(i),be(e)}function Ae(e){const t=_(),n=U();n.state==="active"&&ot({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function Ge(e){if(e.defaultPrevented)return;const t=U(),n=_();switch(t.state){case"active":{if(e.buttons===0){ee({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(o=>{const r=H(o.group.id,!0);W(o.group,r,{isUserInteraction:!0})});return}for(const o of t.hitRegions)if(o.separator){const{element:r}=o.separator;r.hasPointerCapture?.(e.pointerId)||r.setPointerCapture?.(e.pointerId)}ot({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const o=ze(e,n);o.length===0?t.state!=="inactive"&&ee({cursorFlags:0,state:"inactive"}):ee({cursorFlags:0,hitRegions:o,state:"hover"}),be(e.currentTarget);break}}}function $e(e){e.relatedTarget instanceof HTMLIFrameElement&&U().state==="hover"&&ee({cursorFlags:0,state:"inactive"})}function Be(e){e.defaultPrevented||e.pointerType==="mouse"&&e.button>0||Qe(e.currentTarget)&&e.preventDefault()}function We(e){let t=0,n=0;const o={};for(const a of e)if(a.defaultSize!==void 0){t++;const l=T(a.defaultSize);n+=l,o[a.panelId]=l}else o[a.panelId]=void 0;const r=e.length-t;if(r!==0){const a=T((100-n)/r);for(const l of e)l.defaultSize===void 0&&(o[l.panelId]=a)}return o}function Ot(e,t,n){if(!n[0])return;const o=e.panels.find(i=>i.element===t);if(!o||!o.onResize)return;const r=te({group:e}),a=e.orientation==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,l=o.mutableValues.prevSize,s={asPercentage:T(a/r*100),inPixels:a};o.mutableValues.prevSize=s,o.onResize(s,o.id,l)}function Ft(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function At({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:o}){if(n<=0||t<=0||n===t)return o;let r=0,a=0,l=!1;const s=new Map,i=[];for(const h of e.panels){const d=o[h.id]??0;if(h.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){l=!0;const S=d/100*n,m=T(S/t*100);s.set(h.id,m),r+=m}else i.push(h.id),a+=d}if(!l||i.length===0)return o;const u=100-r,c={...o};if(s.forEach((h,d)=>{c[d]=h}),a>0)for(const h of i){const d=o[h]??0;c[h]=T(d/a*u)}else{const h=T(u/i.length);for(const d of i)c[d]=h}return c}function Gt(e,t){const n=e.map(r=>r.id),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(!o.includes(r))return!1;return!0}const K=new Map;function $t(e){let t=!0;P(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,o=new Set,r=new Set,a=new n(m=>{for(const f of m){const{borderBoxSize:g,target:p}=f;if(p===e.element){if(t){const y=te({group:e});if(y===0)return;const z=H(e.id);if(!z)return;const b=he(e),v=z.defaultLayoutDeferred?We(b):z.layout,R=At({group:e,nextGroupSize:y,prevGroupSize:z.groupSize,prevLayout:v}),E=X({layout:R,panelConstraints:b});if(!z.defaultLayoutDeferred&&Y(z.layout,E)&&Ft(z.derivedPanelConstraints,b)&&z.groupSize===y)return;W(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:b,groupSize:y,layout:E,separatorToPanels:z.separatorToPanels})}}else Ot(e,p,g)}});a.observe(e.element),e.panels.forEach(m=>{P(!o.has(m.id),`Panel ids must be unique; id "${m.id}" was used more than once`),o.add(m.id),m.onResize&&a.observe(m.element)});const l=te({group:e}),s=he(e),i=e.panels.map(({id:m})=>m).join(",");let u=e.mutableState.defaultLayout;u&&(Gt(e.panels,u)||(u=void 0));const c=e.mutableState.layouts[i]??u??We(s),h=X({layout:c,panelConstraints:s}),d=e.element.ownerDocument;K.set(d,(K.get(d)??0)+1);const S=new Map;return Ye(e).forEach(m=>{m.separator&&S.set(m.separator,m.panels)}),W(e,{defaultLayoutDeferred:l===0,derivedPanelConstraints:s,groupSize:l,layout:h,separatorToPanels:S}),e.separators.forEach(m=>{P(!r.has(m.id),`Separator ids must be unique; id "${m.id}" was used more than once`),r.add(m.id),m.element.addEventListener("keydown",Oe)}),K.get(d)===1&&(d.addEventListener("contextmenu",De,!0),d.addEventListener("dblclick",je,!0),d.addEventListener("pointerdown",Fe,!0),d.addEventListener("pointerleave",Ae),d.addEventListener("pointermove",Ge),d.addEventListener("pointerout",$e),d.addEventListener("pointerup",Be,!0)),function(){t=!1,K.set(d,Math.max(0,(K.get(d)??0)-1)),Lt(e),e.separators.forEach(m=>{m.element.removeEventListener("keydown",Oe)}),K.get(d)||(d.removeEventListener("contextmenu",De,!0),d.removeEventListener("dblclick",je,!0),d.removeEventListener("pointerdown",Fe,!0),d.removeEventListener("pointerleave",Ae),d.removeEventListener("pointermove",Ge),d.removeEventListener("pointerout",$e),d.removeEventListener("pointerup",Be,!0)),a.disconnect()}}function Bt(){const[e,t]=L.useState({}),n=L.useCallback(()=>t({}),[]);return[e,n]}function Se(e){const t=L.useId();return`${e??t}`}const J=typeof window<"u"?L.useLayoutEffect:L.useEffect;function ae(e){const t=L.useRef(e);return J(()=>{t.current=e},[e]),L.useCallback((...n)=>t.current?.(...n),[t])}function we(...e){return ae(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function xe(e){const t=L.useRef({...e});return J(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const rt=L.createContext(null);function Wt(e,t){const n=L.useRef({getLayout:()=>({}),setLayout:Ct});L.useImperativeHandle(t,()=>n.current,[]),J(()=>{Object.assign(n.current,nt({groupId:e}))})}function at({children:e,className:t,defaultLayout:n,disableCursor:o,disabled:r,elementRef:a,groupRef:l,id:s,onLayoutChange:i,onLayoutChanged:u,orientation:c="horizontal",resizeTargetMinimumSize:h={coarse:20,fine:10},style:d,...S}){const m=L.useRef({onLayoutChange:{},onLayoutChanged:{}}),f=ae(w=>{Y(m.current.onLayoutChange,w)||(m.current.onLayoutChange=w,i?.(w))}),g=ae((w,x)=>{Y(m.current.onLayoutChanged,w)||(m.current.onLayoutChanged=w,u?.(w,{isUserInteraction:x}))}),p=Se(s),y=L.useRef(null),[z,b]=Bt(),v=L.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:h,separators:[]}),R=we(y,a);Wt(p,l);const E=ae((w,x)=>{const k=U(),C=Me(w),D=H(w);if(D){let N=!1;return k.state==="active"&&(N=k.hitRegions.some(ne=>ne.group===C)),{flexGrow:D.layout[x]??1,pointerEvents:N?"none":void 0}}if(n?.[x])return{flexGrow:n?.[x]}}),M=xe({defaultLayout:n,disableCursor:o}),j=L.useMemo(()=>({get disableCursor(){return!!M.disableCursor},getPanelStyles:E,id:p,orientation:c,registerPanel:w=>{const x=v.current;return x.panels=ge(c,[...x.panels,w]),b(),()=>{x.panels=x.panels.filter(k=>k!==w),b()}},registerSeparator:w=>{const x=v.current;return x.separators=ge(c,[...x.separators,w]),b(),()=>{x.separators=x.separators.filter(k=>k!==w),b()}},updatePanelProps:(w,{disabled:x})=>{const k=v.current.panels.find(N=>N.id===w);k&&(k.panelConstraints.disabled=x);const C=Me(p),D=H(p);C&&D&&W(C,{...D,derivedPanelConstraints:he(C)})},updateSeparatorProps:(w,{disabled:x,disableDoubleClick:k})=>{const C=v.current.separators.find(D=>D.id===w);C&&(C.disabled=x,C.disableDoubleClick=k)}}),[E,p,b,c,M]),G=L.useRef(null);return J(()=>{const w=y.current;if(w===null)return;const x=v.current;let k;if(M.defaultLayout!==void 0&&Object.keys(M.defaultLayout).length===x.panels.length){k={};for(const $ of x.panels){const q=M.defaultLayout[$.id];q!==void 0&&(k[$.id]=q)}}const C={disabled:!!r,element:w,id:p,mutableState:{defaultLayout:k,disableCursor:!!M.disableCursor,expandedPanelSizes:v.current.lastExpandedPanelSizes,layouts:v.current.layouts},orientation:c,panels:x.panels,resizeTargetMinimumSize:x.resizeTargetMinimumSize,separators:x.separators};G.current=C;const D=$t(C),{defaultLayoutDeferred:N,derivedPanelConstraints:ne,layout:se}=H(C.id,!0);!N&&ne.length>0&&(f(se),g(se,!1));const oe=ye(p,$=>{const{defaultLayoutDeferred:q,derivedPanelConstraints:Pe,layout:le}=$.next;if(q||Pe.length===0)return;const lt=C.panels.map(({id:B})=>B).join(",");C.mutableState.layouts[lt]=le,Pe.forEach(B=>{if(B.collapsible){const{layout:fe}=$.prev??{};if(fe){const ct=I(B.collapsedSize,le[B.panelId]),dt=I(B.collapsedSize,fe[B.panelId]);ct&&!dt&&(C.mutableState.expandedPanelSizes[B.panelId]=fe[B.panelId])}}});const ut=U().state!=="active";f(le),ut&&g(le,$.isUserInteraction)});return()=>{G.current=null,D(),oe()}},[r,p,g,f,c,z,M]),L.useEffect(()=>{const w=G.current;w&&(w.mutableState.defaultLayout=n,w.mutableState.disableCursor=!!o)}),A.jsx(rt.Provider,{value:j,children:A.jsx("div",{...S,className:t,"data-group":!0,"data-testid":p,id:p,ref:R,style:{height:"100%",width:"100%",overflow:"hidden",...d,display:"flex",flexDirection:c==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:c==="horizontal"?"pan-y":"pan-x"},children:e})})}at.displayName="Group";function Ce(){const e=L.useContext(rt);return P(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Ht(e,t){const{id:n}=Ce(),o=L.useRef({collapse:pe,expand:pe,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:pe});L.useImperativeHandle(t,()=>o.current,[]),J(()=>{Object.assign(o.current,tt({groupId:n,panelId:e}))})}function it({children:e,className:t,collapsedSize:n="0%",collapsible:o=!1,defaultSize:r,disabled:a,elementRef:l,groupResizeBehavior:s="preserve-relative-size",id:i,maxSize:u="100%",minSize:c="0%",onResize:h,panelRef:d,style:S,...m}){const f=!!i,g=Se(i),p=xe({disabled:a}),y=L.useRef(null),z=we(y,l),{getPanelStyles:b,id:v,orientation:R,registerPanel:E,updatePanelProps:M}=Ce(),j=h!==null,G=ae((C,D,N)=>{h?.(C,i,N)});J(()=>{const C=y.current;if(C!==null){const D={element:C,id:g,idIsStable:f,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:j?G:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:o,defaultSize:r,disabled:p.disabled,maxSize:u,minSize:c}};return E(D)}},[s,n,o,r,j,g,f,u,c,G,E,p]),L.useEffect(()=>{M(g,{disabled:a})},[a,g,M]),Ht(g,d);const w=()=>{const C=b(v,g);if(C)return JSON.stringify(C)},x=L.useSyncExternalStore(C=>ye(v,C),w,w);let k;return x?k=JSON.parse(x):r!==void 0?k={flexGrow:void 0,flexShrink:void 0,flexBasis:r}:k={flexGrow:1},A.jsx("div",{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:z,style:{...Vt,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...k},children:A.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...S,touchAction:R==="horizontal"?"pan-y":"pan-x"},children:e})})}it.displayName="Panel";const Vt={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Ut({layout:e,panelConstraints:t,panelId:n,panelIndex:o}){let r,a;const l=e[n],s=t.find(i=>i.panelId===n);if(s){const i=s.maxSize,u=s.collapsible?s.collapsedSize:s.minSize,c=[o,o+1];a=X({layout:ie({delta:u-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n],r=X({layout:ie({delta:i-l,initialLayout:e,panelConstraints:t,pivotIndices:c,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:r,valueMin:a,valueNow:l}}function st({children:e,className:t,disabled:n,disableDoubleClick:o,elementRef:r,id:a,style:l,...s}){const i=Se(a),u=xe({disabled:n,disableDoubleClick:o}),[c,h]=L.useState({}),[d,S]=L.useState("inactive"),[m,f]=L.useState(!1),g=L.useRef(null),p=we(g,r),{disableCursor:y,id:z,orientation:b,registerSeparator:v,updateSeparatorProps:R}=Ce(),E=b==="horizontal"?"vertical":"horizontal";J(()=>{const G=g.current;if(G!==null){const w={disabled:u.disabled,disableDoubleClick:u.disableDoubleClick,element:G,id:i},x=v(w),k=wt(D=>{S(D.next.state!=="inactive"&&D.next.hitRegions.some(N=>N.separator===w)?D.next.state:"inactive")}),C=ye(z,D=>{const{derivedPanelConstraints:N,layout:ne,separatorToPanels:se}=D.next,oe=se.get(w);if(oe){const $=oe[0],q=oe.indexOf($);h(Ut({layout:ne,panelConstraints:N,panelId:$.id,panelIndex:q}))}});return()=>{k(),C(),x()}}},[z,i,v,u]),L.useEffect(()=>{R(i,{disabled:n,disableDoubleClick:o})},[n,o,i,R]);let M;n&&!y&&(M="not-allowed");let j;return n?j="disabled":d==="active"?j="active":m?j="focus":j=d,A.jsx("div",{...s,"aria-controls":c.valueControls,"aria-disabled":n||void 0,"aria-orientation":E,"aria-valuemax":c.valueMax,"aria-valuemin":c.valueMin,"aria-valuenow":c.valueNow,children:e,className:t,"data-separator":j,"data-testid":i,id:i,onBlur:()=>f(!1),onFocus:()=>f(!0),ref:p,role:"separator",style:{flexBasis:"auto",cursor:M,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}st.displayName="Separator";function _t(e){const t=ve.c(10);let n,o,r;t[0]!==e?({className:n,ref:r,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("flex h-full w-full",n),t[4]=n,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==r||t[8]!==a?(l=A.jsx(at,{groupRef:r,"data-slot":"resizable-panel-group",className:a,...o}),t[6]=o,t[7]=r,t[8]=a,t[9]=l):l=t[9],l}function Jt(e){const t=ve.c(10);let n,o,r;t[0]!==e?({ref:o,style:r,...n}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==r?(a={overflow:"hidden",...r},t[4]=r,t[5]=a):a=t[5];let l;return t[6]!==n||t[7]!==o||t[8]!==a?(l=A.jsx(it,{panelRef:o,"data-slot":"resizable-panel",style:a,...n}),t[6]=n,t[7]=o,t[8]=a,t[9]=l):l=t[9],l}function qt(e){const t=ve.c(12);let n,o,r;t[0]!==e?({withHandle:r,className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=r):(n=t[1],o=t[2],r=t[3]);let a;t[4]!==n?(a=He("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:-translate-y-1/2 aria-[orientation=horizontal]:after:translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90",n),t[4]=n,t[5]=a):a=t[5];let l;t[6]!==r?(l=r&&A.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:A.jsx(ft,{className:"size-2.5"})}),t[6]=r,t[7]=l):l=t[7];let s;return t[8]!==o||t[9]!==a||t[10]!==l?(s=A.jsx(st,{"data-slot":"resizable-handle",className:a,...o,children:l}),t[8]=o,t[9]=a,t[10]=l,t[11]=s):s=t[11],s}export{_t as R,Jt as a,qt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,q as c,m as f,r as u,u as l,aD as d,b as m,f as p,aE as k,g as b,aF as I,ao as $}from"./agent-icon-
|
|
1
|
+
import{h as s,q as c,m as f,r as u,u as l,aD as d,b as m,f as p,aE as k,g as b,aF as I,ao as $}from"./agent-icon-DEc9IKAh.js";import{a as y,b as C}from"./ZoomOut-BfTCLHO9.js";import{ak as S}from"./index-CmhfcT17.js";const e={overview:b,settings:k,automations:p,"site-editor":m,code:d,content:C,assets:y,releases:l,hosting:S,e2e:u,analytics:f,cdn:c,files:s};function T(n){return n in e}function a(n){const t=I(n);if(t.type==="icon"){const i=$(t.name);return i?{kind:"component",Component:i}:null}return t.type==="url"?{kind:"url",src:t.url}:null}function x(n){if(n.kind==="system")return T(n.tabId)?{kind:"component",Component:e[n.tabId]}:{kind:"fallback"};const t=a(n.iconUrl);if(t)return t;if(!n.appId)return{kind:"fallback"};const i=n.connections.find(r=>r.id===n.appId);if(!i)return{kind:"fallback"};const o=a(i.icon);return o||{kind:"fallback"}}export{x as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,b as S,j as i,eo as C,en as E,y as fe,t as ie,ep as q,az as me,Q as ue,H as xe,r as U,B as se,a2 as pe,b1 as he,I as je,W as G}from"./index-BgxfZN5I.js";import{S as ae}from"./switch-fTPKFxtt.js";import{f as be,b as ye,j as ve,e as _e,c as re,h as Se,s as Te,d as ke,a as we,g as Ce,i as Ee}from"./UserSquare-Dnl3alN_.js";import{a as de,g as Me,f as Pe,h as Ke,i as Ne,j as $e,k as Re}from"./use-organization-settings-BMIqQlbM.js";import{u as ze}from"./use-connection-DS1VAR5N.js";function Ue(){const e=j.c(12),t=S();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.review.description"),e[2]=t,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Le,{}),e[4]=n):n=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(v,{flag:"cheap_reviewer_model",icon:i.jsx(be,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[5]=o):o=e[5];let c,r;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(v,{flag:"auto_merge",icon:i.jsx(ye,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),r=i.jsx(He,{}),e[6]=c,e[7]=r):(c=e[6],r=e[7]);let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsxs(C,{children:[n,o,c,r,i.jsx(v,{flag:"auto_assign_report_tasks_to_super_agent",icon:i.jsx(ve,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=b):b=e[8];let g;return e[9]!==s||e[10]!==l?(g=i.jsx(E,{title:s,description:l,children:b}),e[9]=s,e[10]=l,e[11]=g):g=e[11],g}function qe(){const e=j.c(8),t=S();let s;e[0]!==t?(s=t("settings.agentTools.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.agentTools.description"),e[2]=t,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[i.jsx(v,{flag:"coding_agent_org_mcps",icon:i.jsx(_e,{size:16}),titleKey:"settings.agentTools.orgMcpsTitle",descriptionKey:"settings.agentTools.orgMcpsDescription"}),i.jsx(Ae,{})]}),e[4]=n):n=e[4];let o;return e[5]!==s||e[6]!==l?(o=i.jsx(E,{title:s,description:l,children:n}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function Ae(){const e=j.c(2),t=S();if(!de("coding_agent_org_mcps"))return null;let l;return e[0]!==t?(l=i.jsx(ue,{children:n=>{const{reset:o}=n;return i.jsx(xe,{fallback:c=>{const{resetError:r}=c;return i.jsx(q,{title:t("settings.agentTools.orgMcpsPickTitle"),children:i.jsxs("div",{role:"alert",className:"mt-3 flex items-center gap-2",children:[i.jsx("p",{className:"text-sm text-destructive",children:t("settings.agentTools.orgMcpsPickLoadFailed")}),i.jsx(se,{variant:"outline",size:"sm",onClick:()=>{o(),r()},children:t("common.errorBoundary.tryAgain")})]})})},children:i.jsx(U.Suspense,{fallback:i.jsx(De,{}),children:i.jsx(Be,{})})})}}),e[0]=t,e[1]=l):l=e[1],l}function De(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("settings.agentTools.orgMcpsPickTitle"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(he,{className:"mt-3 h-24 w-full"}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(q,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function ce(e){return[...e].sort().join("\0")}function Oe(e,t){return[G.SELF,G.REGISTRY,G.COMMUNITY_REGISTRY,G.DEV_ASSETS,G.REPORTS].some(s=>s(e)===t)}function Be(){const e=j.c(84),t=S(),{org:s}=pe(),l=ze(),n=$e(),o=Re(),[c,r]=U.useState(n);let b;e[0]!==n?(b=ce(n),e[0]=n,e[1]=b):b=e[1];const[g,m]=U.useState(b),[a,u]=U.useState("");let _;e[2]!==n?(_=ce(n),e[2]=n,e[3]=_):_=e[3];const x=_;g!==x&&(m(x),r(n));let p,h,f,M,y;if(e[4]!==l||e[5]!==c||e[6]!==s||e[7]!==a||e[8]!==x){let d;e[14]!==s?(d=k=>!Oe(s.id,k.id),e[14]=s,e[15]=d):d=e[15],f=l.filter(d);const T=a.trim().toLowerCase();y=T?f.filter(k=>`${k.title} ${k.slug??""}`.toLowerCase().includes(T)):f;let w;e[16]!==c?(w=new Set(c),e[16]=c,e[17]=w):w=e[17],h=w,p=ce(c.filter(k=>f.some(ge=>ge.id===k)))!==x,M=y.length>0&&y.every(k=>!h.has(k.id)),e[4]=l,e[5]=c,e[6]=s,e[7]=a,e[8]=x,e[9]=p,e[10]=h,e[11]=f,e[12]=M,e[13]=y}else p=e[9],h=e[10],f=e[11],M=e[12],y=e[13];const P=M;let J;e[18]!==c?(J=(d,T)=>{const w=new Set(d);r(T?c.filter(k=>!w.has(k)):[...new Set([...c,...d])])},e[18]=c,e[19]=J):J=e[19];const K=J;let X;e[20]!==c||e[21]!==f||e[22]!==o||e[23]!==t?(X=()=>o.mutate(c.filter(d=>f.some(T=>T.id===d)),{onSuccess:()=>ie.success(t("settings.agentTools.orgMcpsPickSaved")),onError:()=>ie.error(t("settings.agentTools.orgMcpsPickFailed"))}),e[20]=c,e[21]=f,e[22]=o,e[23]=t,e[24]=X):X=e[24];const le=X;let N;e[25]!==t?(N=t("settings.agentTools.orgMcpsPickTitle"),e[25]=t,e[26]=N):N=e[26];let $;e[27]!==t?($=t("settings.agentTools.orgMcpsPickDescription"),e[27]=t,e[28]=$):$=e[28];let Z;e[29]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(Ee,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[29]=Z):Z=e[29];let ee;e[30]===Symbol.for("react.memo_cache_sentinel")?(ee=d=>u(d.target.value),e[30]=ee):ee=e[30];let R;e[31]!==t?(R=t("settings.agentTools.orgMcpsPickSearch"),e[31]=t,e[32]=R):R=e[32];let z;e[33]!==t?(z=t("settings.agentTools.orgMcpsPickSearch"),e[33]=t,e[34]=z):z=e[34];let A;e[35]!==a||e[36]!==z||e[37]!==R?(A=i.jsxs("div",{className:"relative flex-1",children:[Z,i.jsx(je,{value:a,onChange:ee,placeholder:R,"aria-label":z,className:"h-8 pl-8 text-xs"})]}),e[35]=a,e[36]=z,e[37]=R,e[38]=A):A=e[38];const ne=y.length===0;let D;e[39]!==P||e[40]!==K||e[41]!==y?(D=()=>K(y.map(Fe),!P),e[39]=P,e[40]=K,e[41]=y,e[42]=D):D=e[42];let O;e[43]!==P||e[44]!==t?(O=t(P?"settings.agentTools.orgMcpsPickDisableAll":"settings.agentTools.orgMcpsPickEnableAll"),e[43]=P,e[44]=t,e[45]=O):O=e[45];let B;e[46]!==ne||e[47]!==D||e[48]!==O?(B=i.jsx(se,{variant:"outline",size:"sm",className:"shrink-0",disabled:ne,onClick:D,children:O}),e[46]=ne,e[47]=D,e[48]=O,e[49]=B):B=e[49];let F;e[50]!==A||e[51]!==B?(F=i.jsxs("div",{className:"flex items-center gap-2",children:[A,B]}),e[50]=A,e[51]=B,e[52]=F):F=e[52];let I;e[53]!==h||e[54]!==f.length||e[55]!==K||e[56]!==t||e[57]!==y?(I=f.length===0?i.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickEmpty")}):y.length===0?i.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickNoMatch")}):y.map(d=>{const T=d.title||d.id;return i.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx(Ie,{icon:d.icon,title:T}),i.jsxs("div",{className:"flex min-w-0 flex-col",children:[i.jsx("span",{className:"truncate text-sm leading-tight",children:T}),d.slug&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d.slug})]})]}),i.jsx(ae,{checked:!h.has(d.id),"aria-label":t("settings.agentTools.orgMcpsPickAriaLabel",{name:T}),onCheckedChange:w=>K([d.id],w)})]},d.id)}),e[53]=h,e[54]=f.length,e[55]=K,e[56]=t,e[57]=y,e[58]=I):I=e[58];let L;e[59]!==I?(L=i.jsx("div",{className:"max-h-64 overflow-y-auto rounded-xl border border-border divide-y divide-border",children:I}),e[59]=I,e[60]=L):L=e[60];const oe=!p||o.isPending;let H;e[61]!==o.isPending||e[62]!==t?(H=o.isPending?t("settings.agentTools.orgMcpsPickSaving"):t("settings.agentTools.orgMcpsPickSave"),e[61]=o.isPending,e[62]=t,e[63]=H):H=e[63];let V;e[64]!==le||e[65]!==oe||e[66]!==H?(V=i.jsx(se,{size:"sm",disabled:oe,onClick:le,children:H}),e[64]=le,e[65]=oe,e[66]=H,e[67]=V):V=e[67];let W;e[68]!==p||e[69]!==n||e[70]!==o.isPending||e[71]!==t?(W=p&&i.jsx(se,{variant:"ghost",size:"sm",disabled:o.isPending,onClick:()=>r(n),children:t("settings.agentTools.orgMcpsPickDiscard")}),e[68]=p,e[69]=n,e[70]=o.isPending,e[71]=t,e[72]=W):W=e[72];let Q;e[73]!==V||e[74]!==W?(Q=i.jsxs("div",{className:"flex items-center gap-2",children:[V,W]}),e[73]=V,e[74]=W,e[75]=Q):Q=e[75];let Y;e[76]!==F||e[77]!==L||e[78]!==Q?(Y=i.jsxs("div",{className:"mt-3 flex w-full flex-col gap-2",children:[F,L,Q]}),e[76]=F,e[77]=L,e[78]=Q,e[79]=Y):Y=e[79];let te;return e[80]!==Y||e[81]!==N||e[82]!==$?(te=i.jsx(q,{title:N,description:$,children:Y}),e[80]=Y,e[81]=N,e[82]=$,e[83]=te):te=e[83],te}function Fe(e){return e.id}function Ie(e){const t=j.c(4),{icon:s,title:l}=e,[n,o]=U.useState(!1);let c;return t[0]!==n||t[1]!==s||t[2]!==l?(c=i.jsx("div",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/20",children:s&&!n?i.jsx("img",{src:s,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:()=>o(!0)}):i.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:l.charAt(0).toUpperCase()})}),t[0]=n,t[1]=s,t[2]=l,t[3]=c):c=t[3],c}function Je(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("sidebar.agentsSection.codeAgents"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(C,{children:i.jsx(v,{flag:"coding_agents_claude_code",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.codingAgentsClaudeCodeTitle",descriptionKey:"settings.agentTools.codingAgentsClaudeCodeDescription"})}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(E,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function Xe(){const e=j.c(6),t=S();let s;e[0]!==t?(s=t("settings.agentTools.chatRuntimeSection"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(v,{flag:"chat_harness_sandbox_only",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessSandboxOnlyTitle",descriptionKey:"settings.agentTools.chatHarnessSandboxOnlyDescription"}),e[2]=l):l=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[l,i.jsx(v,{flag:"chat_harness_codex",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessCodexTitle",descriptionKey:"settings.agentTools.chatHarnessCodexDescription"})]}),e[3]=n):n=e[3];let o;return e[4]!==s?(o=i.jsx(E,{title:s,children:n}),e[4]=s,e[5]=o):o=e[5],o}function Ze(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("settings.voice.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(C,{children:i.jsx(v,{flag:"voice_mode",icon:i.jsx(Se,{size:16}),titleKey:"settings.voice.title",descriptionKey:"settings.voice.description"})}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(E,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function et(){const e=j.c(6),t=S();let s;e[0]!==t?(s=t("settings.blog.sectionTitle"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(v,{flag:"blog_ai_enabled",icon:i.jsx(Te,{size:16}),titleKey:"settings.blog.aiTitle",descriptionKey:"settings.blog.aiDescription"}),e[2]=l):l=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[l,i.jsx(v,{flag:"hide_default_blog_blocks",icon:i.jsx(ke,{size:16}),titleKey:"settings.blogBlocks.title",descriptionKey:"settings.blogBlocks.description"})]}),e[3]=n):n=e[3];let o;return e[4]!==s?(o=i.jsx(E,{title:s,children:n}),e[4]=s,e[5]=o):o=e[5],o}function tt(){const e=j.c(24),t=S(),s=de("new_blocks_editor"),l=Me();let n;e[0]!==t?(n=t("sidebar.projectNav.siteEditor"),e[0]=t,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(we,{size:16}),e[2]=o):o=e[2];let c;e[3]!==t?(c=t("settings.blocksEditor.title"),e[3]=t,e[4]=c):c=e[4];let r;e[5]!==t?(r=t("settings.blocksEditor.description"),e[5]=t,e[6]=r):r=e[6];const b=l.isPending;let g;e[7]!==t?(g=t("settings.blocksEditor.title"),e[7]=t,e[8]=g):g=e[8];let m;e[9]!==l||e[10]!==t?(m=x=>{fe("preferences_blocks_editor_toggled",{enabled:x}),l.mutate(x,{onError:()=>ie.error(t("settings.review.updateError"))})},e[9]=l,e[10]=t,e[11]=m):m=e[11];let a;e[12]!==s||e[13]!==l.isPending||e[14]!==g||e[15]!==m?(a=i.jsx(ae,{checked:s,disabled:b,"aria-label":g,onCheckedChange:m}),e[12]=s,e[13]=l.isPending,e[14]=g,e[15]=m,e[16]=a):a=e[16];let u;e[17]!==c||e[18]!==r||e[19]!==a?(u=i.jsx(C,{children:i.jsx(q,{icon:o,title:c,description:r,action:a})}),e[17]=c,e[18]=r,e[19]=a,e[20]=u):u=e[20];let _;return e[21]!==n||e[22]!==u?(_=i.jsx(E,{title:n,children:u}),e[21]=n,e[22]=u,e[23]=_):_=e[23],_}function Le(){const e=j.c(3),t=Pe();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Ce,{size:16}),e[0]=s):s=e[0];let l;return e[1]!==t?(l=i.jsx(v,{flag:"reviewer_enabled",icon:s,titleKey:"settings.review.reviewerTitle",descriptionKey:"settings.review.reviewerDescription",enabled:t}),e[1]=t,e[2]=l):l=e[2],l}function He(){const e=j.c(3),t=Ke();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(me,{size:16}),e[0]=s):s=e[0];let l;return e[1]!==t?(l=i.jsx(v,{flag:"auto_resolve_conflicts",icon:s,titleKey:"settings.review.autoResolveConflictsTitle",descriptionKey:"settings.review.autoResolveConflictsDescription",enabled:t}),e[1]=t,e[2]=l):l=e[2],l}function v(e){const t=j.c(23),{flag:s,icon:l,titleKey:n,descriptionKey:o,enabled:c}=e,r=S(),b=de(s),g=c??b,m=Ne();let a;t[0]!==r||t[1]!==n?(a=r(n),t[0]=r,t[1]=n,t[2]=a):a=t[2];let u;t[3]!==o||t[4]!==r?(u=r(o),t[3]=o,t[4]=r,t[5]=u):u=t[5];const _=m.isPending;let x;t[6]!==r||t[7]!==n?(x=r(n),t[6]=r,t[7]=n,t[8]=x):x=t[8];let p;t[9]!==s||t[10]!==m||t[11]!==r?(p=M=>m.mutate(s,M,{onError:()=>ie.error(r("settings.review.updateError"))}),t[9]=s,t[10]=m,t[11]=r,t[12]=p):p=t[12];let h;t[13]!==g||t[14]!==m.isPending||t[15]!==x||t[16]!==p?(h=i.jsx(ae,{checked:g,disabled:_,"aria-label":x,onCheckedChange:p}),t[13]=g,t[14]=m.isPending,t[15]=x,t[16]=p,t[17]=h):h=t[17];let f;return t[18]!==l||t[19]!==a||t[20]!==u||t[21]!==h?(f=i.jsx(q,{icon:l,title:a,description:u,action:h}),t[18]=l,t[19]=a,t[20]=u,t[21]=h,t[22]=f):f=t[22],f}export{qe as A,et as B,Xe as C,Ue as R,Ze as V,Je as a,tt as b};
|
|
1
|
+
import{c as j,b as S,j as i,eo as C,en as E,y as fe,t as ie,ep as q,az as me,Q as ue,H as xe,r as U,B as se,a2 as pe,b1 as he,I as je,W as G}from"./index-CmhfcT17.js";import{S as ae}from"./switch-C8MNBXcu.js";import{f as be,b as ye,j as ve,e as _e,c as re,h as Se,s as Te,d as ke,a as we,g as Ce,i as Ee}from"./UserSquare-pQAburWh.js";import{a as de,g as Me,f as Pe,h as Ke,i as Ne,j as $e,k as Re}from"./use-organization-settings-DsiL1E35.js";import{u as ze}from"./use-connection-Dwi0oczT.js";function Ue(){const e=j.c(12),t=S();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.review.description"),e[2]=t,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Le,{}),e[4]=n):n=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(v,{flag:"cheap_reviewer_model",icon:i.jsx(be,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[5]=o):o=e[5];let c,r;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(v,{flag:"auto_merge",icon:i.jsx(ye,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),r=i.jsx(He,{}),e[6]=c,e[7]=r):(c=e[6],r=e[7]);let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsxs(C,{children:[n,o,c,r,i.jsx(v,{flag:"auto_assign_report_tasks_to_super_agent",icon:i.jsx(ve,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=b):b=e[8];let g;return e[9]!==s||e[10]!==l?(g=i.jsx(E,{title:s,description:l,children:b}),e[9]=s,e[10]=l,e[11]=g):g=e[11],g}function qe(){const e=j.c(8),t=S();let s;e[0]!==t?(s=t("settings.agentTools.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.agentTools.description"),e[2]=t,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[i.jsx(v,{flag:"coding_agent_org_mcps",icon:i.jsx(_e,{size:16}),titleKey:"settings.agentTools.orgMcpsTitle",descriptionKey:"settings.agentTools.orgMcpsDescription"}),i.jsx(Ae,{})]}),e[4]=n):n=e[4];let o;return e[5]!==s||e[6]!==l?(o=i.jsx(E,{title:s,description:l,children:n}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function Ae(){const e=j.c(2),t=S();if(!de("coding_agent_org_mcps"))return null;let l;return e[0]!==t?(l=i.jsx(ue,{children:n=>{const{reset:o}=n;return i.jsx(xe,{fallback:c=>{const{resetError:r}=c;return i.jsx(q,{title:t("settings.agentTools.orgMcpsPickTitle"),children:i.jsxs("div",{role:"alert",className:"mt-3 flex items-center gap-2",children:[i.jsx("p",{className:"text-sm text-destructive",children:t("settings.agentTools.orgMcpsPickLoadFailed")}),i.jsx(se,{variant:"outline",size:"sm",onClick:()=>{o(),r()},children:t("common.errorBoundary.tryAgain")})]})})},children:i.jsx(U.Suspense,{fallback:i.jsx(De,{}),children:i.jsx(Be,{})})})}}),e[0]=t,e[1]=l):l=e[1],l}function De(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("settings.agentTools.orgMcpsPickTitle"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(he,{className:"mt-3 h-24 w-full"}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(q,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function ce(e){return[...e].sort().join("\0")}function Oe(e,t){return[G.SELF,G.REGISTRY,G.COMMUNITY_REGISTRY,G.DEV_ASSETS,G.REPORTS].some(s=>s(e)===t)}function Be(){const e=j.c(84),t=S(),{org:s}=pe(),l=ze(),n=$e(),o=Re(),[c,r]=U.useState(n);let b;e[0]!==n?(b=ce(n),e[0]=n,e[1]=b):b=e[1];const[g,m]=U.useState(b),[a,u]=U.useState("");let _;e[2]!==n?(_=ce(n),e[2]=n,e[3]=_):_=e[3];const x=_;g!==x&&(m(x),r(n));let p,h,f,M,y;if(e[4]!==l||e[5]!==c||e[6]!==s||e[7]!==a||e[8]!==x){let d;e[14]!==s?(d=k=>!Oe(s.id,k.id),e[14]=s,e[15]=d):d=e[15],f=l.filter(d);const T=a.trim().toLowerCase();y=T?f.filter(k=>`${k.title} ${k.slug??""}`.toLowerCase().includes(T)):f;let w;e[16]!==c?(w=new Set(c),e[16]=c,e[17]=w):w=e[17],h=w,p=ce(c.filter(k=>f.some(ge=>ge.id===k)))!==x,M=y.length>0&&y.every(k=>!h.has(k.id)),e[4]=l,e[5]=c,e[6]=s,e[7]=a,e[8]=x,e[9]=p,e[10]=h,e[11]=f,e[12]=M,e[13]=y}else p=e[9],h=e[10],f=e[11],M=e[12],y=e[13];const P=M;let J;e[18]!==c?(J=(d,T)=>{const w=new Set(d);r(T?c.filter(k=>!w.has(k)):[...new Set([...c,...d])])},e[18]=c,e[19]=J):J=e[19];const K=J;let X;e[20]!==c||e[21]!==f||e[22]!==o||e[23]!==t?(X=()=>o.mutate(c.filter(d=>f.some(T=>T.id===d)),{onSuccess:()=>ie.success(t("settings.agentTools.orgMcpsPickSaved")),onError:()=>ie.error(t("settings.agentTools.orgMcpsPickFailed"))}),e[20]=c,e[21]=f,e[22]=o,e[23]=t,e[24]=X):X=e[24];const le=X;let N;e[25]!==t?(N=t("settings.agentTools.orgMcpsPickTitle"),e[25]=t,e[26]=N):N=e[26];let $;e[27]!==t?($=t("settings.agentTools.orgMcpsPickDescription"),e[27]=t,e[28]=$):$=e[28];let Z;e[29]===Symbol.for("react.memo_cache_sentinel")?(Z=i.jsx(Ee,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[29]=Z):Z=e[29];let ee;e[30]===Symbol.for("react.memo_cache_sentinel")?(ee=d=>u(d.target.value),e[30]=ee):ee=e[30];let R;e[31]!==t?(R=t("settings.agentTools.orgMcpsPickSearch"),e[31]=t,e[32]=R):R=e[32];let z;e[33]!==t?(z=t("settings.agentTools.orgMcpsPickSearch"),e[33]=t,e[34]=z):z=e[34];let A;e[35]!==a||e[36]!==z||e[37]!==R?(A=i.jsxs("div",{className:"relative flex-1",children:[Z,i.jsx(je,{value:a,onChange:ee,placeholder:R,"aria-label":z,className:"h-8 pl-8 text-xs"})]}),e[35]=a,e[36]=z,e[37]=R,e[38]=A):A=e[38];const ne=y.length===0;let D;e[39]!==P||e[40]!==K||e[41]!==y?(D=()=>K(y.map(Fe),!P),e[39]=P,e[40]=K,e[41]=y,e[42]=D):D=e[42];let O;e[43]!==P||e[44]!==t?(O=t(P?"settings.agentTools.orgMcpsPickDisableAll":"settings.agentTools.orgMcpsPickEnableAll"),e[43]=P,e[44]=t,e[45]=O):O=e[45];let B;e[46]!==ne||e[47]!==D||e[48]!==O?(B=i.jsx(se,{variant:"outline",size:"sm",className:"shrink-0",disabled:ne,onClick:D,children:O}),e[46]=ne,e[47]=D,e[48]=O,e[49]=B):B=e[49];let F;e[50]!==A||e[51]!==B?(F=i.jsxs("div",{className:"flex items-center gap-2",children:[A,B]}),e[50]=A,e[51]=B,e[52]=F):F=e[52];let I;e[53]!==h||e[54]!==f.length||e[55]!==K||e[56]!==t||e[57]!==y?(I=f.length===0?i.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickEmpty")}):y.length===0?i.jsx("p",{className:"p-3 text-xs text-muted-foreground",children:t("settings.agentTools.orgMcpsPickNoMatch")}):y.map(d=>{const T=d.title||d.id;return i.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[i.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[i.jsx(Ie,{icon:d.icon,title:T}),i.jsxs("div",{className:"flex min-w-0 flex-col",children:[i.jsx("span",{className:"truncate text-sm leading-tight",children:T}),d.slug&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d.slug})]})]}),i.jsx(ae,{checked:!h.has(d.id),"aria-label":t("settings.agentTools.orgMcpsPickAriaLabel",{name:T}),onCheckedChange:w=>K([d.id],w)})]},d.id)}),e[53]=h,e[54]=f.length,e[55]=K,e[56]=t,e[57]=y,e[58]=I):I=e[58];let L;e[59]!==I?(L=i.jsx("div",{className:"max-h-64 overflow-y-auto rounded-xl border border-border divide-y divide-border",children:I}),e[59]=I,e[60]=L):L=e[60];const oe=!p||o.isPending;let H;e[61]!==o.isPending||e[62]!==t?(H=o.isPending?t("settings.agentTools.orgMcpsPickSaving"):t("settings.agentTools.orgMcpsPickSave"),e[61]=o.isPending,e[62]=t,e[63]=H):H=e[63];let V;e[64]!==le||e[65]!==oe||e[66]!==H?(V=i.jsx(se,{size:"sm",disabled:oe,onClick:le,children:H}),e[64]=le,e[65]=oe,e[66]=H,e[67]=V):V=e[67];let W;e[68]!==p||e[69]!==n||e[70]!==o.isPending||e[71]!==t?(W=p&&i.jsx(se,{variant:"ghost",size:"sm",disabled:o.isPending,onClick:()=>r(n),children:t("settings.agentTools.orgMcpsPickDiscard")}),e[68]=p,e[69]=n,e[70]=o.isPending,e[71]=t,e[72]=W):W=e[72];let Q;e[73]!==V||e[74]!==W?(Q=i.jsxs("div",{className:"flex items-center gap-2",children:[V,W]}),e[73]=V,e[74]=W,e[75]=Q):Q=e[75];let Y;e[76]!==F||e[77]!==L||e[78]!==Q?(Y=i.jsxs("div",{className:"mt-3 flex w-full flex-col gap-2",children:[F,L,Q]}),e[76]=F,e[77]=L,e[78]=Q,e[79]=Y):Y=e[79];let te;return e[80]!==Y||e[81]!==N||e[82]!==$?(te=i.jsx(q,{title:N,description:$,children:Y}),e[80]=Y,e[81]=N,e[82]=$,e[83]=te):te=e[83],te}function Fe(e){return e.id}function Ie(e){const t=j.c(4),{icon:s,title:l}=e,[n,o]=U.useState(!1);let c;return t[0]!==n||t[1]!==s||t[2]!==l?(c=i.jsx("div",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/20",children:s&&!n?i.jsx("img",{src:s,alt:"",loading:"lazy",className:"h-full w-full object-cover",onError:()=>o(!0)}):i.jsx("span",{className:"text-[10px] font-semibold text-muted-foreground",children:l.charAt(0).toUpperCase()})}),t[0]=n,t[1]=s,t[2]=l,t[3]=c):c=t[3],c}function Je(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("sidebar.agentsSection.codeAgents"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(C,{children:i.jsx(v,{flag:"coding_agents_claude_code",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.codingAgentsClaudeCodeTitle",descriptionKey:"settings.agentTools.codingAgentsClaudeCodeDescription"})}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(E,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function Xe(){const e=j.c(6),t=S();let s;e[0]!==t?(s=t("settings.agentTools.chatRuntimeSection"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(v,{flag:"chat_harness_sandbox_only",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessSandboxOnlyTitle",descriptionKey:"settings.agentTools.chatHarnessSandboxOnlyDescription"}),e[2]=l):l=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[l,i.jsx(v,{flag:"chat_harness_codex",icon:i.jsx(re,{size:16}),titleKey:"settings.agentTools.chatHarnessCodexTitle",descriptionKey:"settings.agentTools.chatHarnessCodexDescription"})]}),e[3]=n):n=e[3];let o;return e[4]!==s?(o=i.jsx(E,{title:s,children:n}),e[4]=s,e[5]=o):o=e[5],o}function Ze(){const e=j.c(5),t=S();let s;e[0]!==t?(s=t("settings.voice.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(C,{children:i.jsx(v,{flag:"voice_mode",icon:i.jsx(Se,{size:16}),titleKey:"settings.voice.title",descriptionKey:"settings.voice.description"})}),e[2]=l):l=e[2];let n;return e[3]!==s?(n=i.jsx(E,{title:s,children:l}),e[3]=s,e[4]=n):n=e[4],n}function et(){const e=j.c(6),t=S();let s;e[0]!==t?(s=t("settings.blog.sectionTitle"),e[0]=t,e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(v,{flag:"blog_ai_enabled",icon:i.jsx(Te,{size:16}),titleKey:"settings.blog.aiTitle",descriptionKey:"settings.blog.aiDescription"}),e[2]=l):l=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(C,{children:[l,i.jsx(v,{flag:"hide_default_blog_blocks",icon:i.jsx(ke,{size:16}),titleKey:"settings.blogBlocks.title",descriptionKey:"settings.blogBlocks.description"})]}),e[3]=n):n=e[3];let o;return e[4]!==s?(o=i.jsx(E,{title:s,children:n}),e[4]=s,e[5]=o):o=e[5],o}function tt(){const e=j.c(24),t=S(),s=de("new_blocks_editor"),l=Me();let n;e[0]!==t?(n=t("sidebar.projectNav.siteEditor"),e[0]=t,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(we,{size:16}),e[2]=o):o=e[2];let c;e[3]!==t?(c=t("settings.blocksEditor.title"),e[3]=t,e[4]=c):c=e[4];let r;e[5]!==t?(r=t("settings.blocksEditor.description"),e[5]=t,e[6]=r):r=e[6];const b=l.isPending;let g;e[7]!==t?(g=t("settings.blocksEditor.title"),e[7]=t,e[8]=g):g=e[8];let m;e[9]!==l||e[10]!==t?(m=x=>{fe("preferences_blocks_editor_toggled",{enabled:x}),l.mutate(x,{onError:()=>ie.error(t("settings.review.updateError"))})},e[9]=l,e[10]=t,e[11]=m):m=e[11];let a;e[12]!==s||e[13]!==l.isPending||e[14]!==g||e[15]!==m?(a=i.jsx(ae,{checked:s,disabled:b,"aria-label":g,onCheckedChange:m}),e[12]=s,e[13]=l.isPending,e[14]=g,e[15]=m,e[16]=a):a=e[16];let u;e[17]!==c||e[18]!==r||e[19]!==a?(u=i.jsx(C,{children:i.jsx(q,{icon:o,title:c,description:r,action:a})}),e[17]=c,e[18]=r,e[19]=a,e[20]=u):u=e[20];let _;return e[21]!==n||e[22]!==u?(_=i.jsx(E,{title:n,children:u}),e[21]=n,e[22]=u,e[23]=_):_=e[23],_}function Le(){const e=j.c(3),t=Pe();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(Ce,{size:16}),e[0]=s):s=e[0];let l;return e[1]!==t?(l=i.jsx(v,{flag:"reviewer_enabled",icon:s,titleKey:"settings.review.reviewerTitle",descriptionKey:"settings.review.reviewerDescription",enabled:t}),e[1]=t,e[2]=l):l=e[2],l}function He(){const e=j.c(3),t=Ke();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(me,{size:16}),e[0]=s):s=e[0];let l;return e[1]!==t?(l=i.jsx(v,{flag:"auto_resolve_conflicts",icon:s,titleKey:"settings.review.autoResolveConflictsTitle",descriptionKey:"settings.review.autoResolveConflictsDescription",enabled:t}),e[1]=t,e[2]=l):l=e[2],l}function v(e){const t=j.c(23),{flag:s,icon:l,titleKey:n,descriptionKey:o,enabled:c}=e,r=S(),b=de(s),g=c??b,m=Ne();let a;t[0]!==r||t[1]!==n?(a=r(n),t[0]=r,t[1]=n,t[2]=a):a=t[2];let u;t[3]!==o||t[4]!==r?(u=r(o),t[3]=o,t[4]=r,t[5]=u):u=t[5];const _=m.isPending;let x;t[6]!==r||t[7]!==n?(x=r(n),t[6]=r,t[7]=n,t[8]=x):x=t[8];let p;t[9]!==s||t[10]!==m||t[11]!==r?(p=M=>m.mutate(s,M,{onError:()=>ie.error(r("settings.review.updateError"))}),t[9]=s,t[10]=m,t[11]=r,t[12]=p):p=t[12];let h;t[13]!==g||t[14]!==m.isPending||t[15]!==x||t[16]!==p?(h=i.jsx(ae,{checked:g,disabled:_,"aria-label":x,onCheckedChange:p}),t[13]=g,t[14]=m.isPending,t[15]=x,t[16]=p,t[17]=h):h=t[17];let f;return t[18]!==l||t[19]!==a||t[20]!==u||t[21]!==h?(f=i.jsx(q,{icon:l,title:a,description:u,action:h}),t[18]=l,t[19]=a,t[20]=u,t[21]=h,t[22]=f):f=t[22],f}export{qe as A,et as B,Xe as C,Ue as R,Ze as V,Je as a,tt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as oe,r as Y,a2 as Ue,J as Pt,K as ue,m as Qe,db as Dt,j as s,l as q,h as fe,B as ae,c as J,aF as Xe,bW as me,aG as le,bU as Ge,cY as et,o as it,aE as vt,aD as Lt,e as rt,t as Le,y as He,d9 as Mt,x as yt,n as re,af as at,P as wt,en as tt,eo as st,ep as lt,a3 as kt,aX as ot,au as Gt,ax as Ut,u as ct,f_ as dt,g3 as Bt,H as Kt,d as Vt,X as Ft,T as zt,V as Yt,U as $t}from"./index-CmhfcT17.js";import{P as Fe,l as Qt,a as Ht,C as ze,d as Zt,p as qt,g as Jt,b as Wt,u as Xt}from"./use-organization-roles-ENGApVEO.js";import{u as Ze}from"./use-org-auth-client-CeU98DnY.js";import{g as mt,a as es}from"./role-color-Dn2tXDDF.js";import{B as Me}from"./badge-BPJdS_zE.js";import{f as ut,e as ft,A as gt,a as xt,b as ht,c as Tt,g as pt,d as Et}from"./alert-dialog-RwCjHRuJ.js";import{i as ts}from"./DotsVertical-DUEyJX4K.js";import{s as Ye}from"./Plus-jTILaZAS.js";import{s as ss}from"./Trash01-BcDxgAC3.js";import{C as ls}from"./collection-table-wrapper-BjP-CvVc.js";import{E as nt}from"./empty-state-Dd0b73U2.js";import{S as qe}from"./search-input-CflNU9yi.js";import{P as _t,D as At}from"./ai-providers-logos-DD3qZ33J.js";import{I as Be}from"./integration-icon-DfWASVi0.js";import{u as os}from"./use-infinite-scroll-CP5MaPJA.js";import{C as ye}from"./checkbox-BjVWCI8i.js";import{i as ns}from"./ArrowLeft-B3Mf4oiE.js";import{u as is}from"./useSuspenseInfiniteQuery-DQhsrGc-.js";import{u as rs}from"./use-mcp-client-Ck2YNhED.js";import{C as as}from"./collection-search-B3CigRnD.js";import{p as cs}from"./connection-B23WvhUe.js";import{a as St}from"./use-members-B1T5bMJ8.js";import{g as It}from"./get-initials-D-f_fDFw.js";import{u as Rt}from"./use-connection-Dwi0oczT.js";import{i as ds}from"./repository-binding-DMbjGWw3.js";import{u as ms,h as us}from"./use-ai-providers-Bujn21Dz.js";import{A as Nt}from"./avatar-jtTGOflQ.js";import{S as ge}from"./switch-C8MNBXcu.js";import{b as je,c as Pe,T as De,a as ve}from"./tooltip-4UW874b4.js";import{P as fs}from"./project-icon-3uE6pYf-.js";import{s as gs}from"./use-project-scope-DGWdW_3w.js";import{t as xs}from"./Building02-BHmYKmWU.js";import{t as hs}from"./ChevronUp-DVssCggl.js";import{w as Ts,h as ps}from"./agent-icon-DEc9IKAh.js";import{A as Es}from"./access-gate-Dvk_zKis.js";import"./table-C_1aW9HL.js";import"./ArrowUp-Dm1tTcjd.js";import"./SearchMd-DIriOluN.js";import"./LinkBroken01-Dt2Tn6rT.js";import"./infiniteQueryObserver-DPyz6bSI.js";import"./auth-D_LAZR_h.js";import"./url-slug-BOI9R_Hf.js";import"./User01-DmuhzlMa.js";import"./index-DMVF6sM5.js";import"./AlertCircle-BYpi54SP.js";import"./Tool01-DSx5JxKN.js";import"./ShoppingBag01-DPhSrshS.js";import"./ZoomOut-BfTCLHO9.js";import"./CheckCircle-4P58PW4U.js";import"./ChevronSelectorVertical-Cojq1UR5.js";import"./UserSquare-pQAburWh.js";import"./Copy01-DBnXKsvD.js";import"./CreditCard01-Ku1gLnux.js";import"./Image01-C9QzuJaK.js";import"./Globe04-BCy_UIpz.js";import"./SwitchHorizontal01-CZeYSoIE.js";import"./Key01-CV3Kr-e4.js";import"./Link01-CnwGlGLA.js";import"./Monitor01-CtZrNe_q.js";import"./Sun-Bhq3Un93.js";import"./Play-Bi58F4_E.js";import"./Upload01-DRNp2B9A.js";import"./Users01-DXRV-L-2.js";import"./XClose-B3D-rkas.js";import"./capability-load-error-DeivFmvd.js";const Je="basic-usage",We=[{id:Je,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["CODEX_SUBSCRIPTION_CONNECT","CODEX_SUBSCRIPTION_STATUS","CODEX_SUBSCRIPTION_DISCONNECT","CODEX_SUBSCRIPTION_SYNC","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","CONNECTION_TOOLS_SEARCH","CONNECTION_TOOL_CALL","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_LAST_USED_LIST","SIDEBAR_GET","SIDEBAR_PREFERENCES_SET","PROJECT_FOLDER_ENSURE","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","ORGANIZATION_BILLING_PLAN_PRICES","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","REPOSITORY_SEARCH_BRANCHES","GIT_PROVIDER_CAPABILITIES","GIT_ACCOUNT_LIST","REPOSITORY_LIST","REPOSITORY_SEARCH","CHANGE_REQUEST_STATE","CHANGE_REQUEST_LAST_MERGED","CHANGE_REQUEST_LIST_OPEN","CHANGE_REQUEST_CHECK_LOG","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","ORGANIZATION_HAS_SITE","ORGANIZATION_BLOCKS_EDITOR_SET","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_PROMPT_LIST","TASK_BOARD_PROMPT_UPSERT","TASK_BOARD_PROMPT_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_PREVIEW_PROBE","TASK_BOARD_ITEM_RERUN","TASK_BOARD_RUN_REVIEWER","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE","TASK_BOARD_SPRINT_LIST","TASK_BOARD_SPRINT_CREATE","TASK_BOARD_SPRINT_UPDATE","TASK_BOARD_SPRINT_START","TASK_BOARD_SPRINT_COMPLETE","TASK_BOARD_SPRINT_DELETE","TASK_BOARD_ADMIN_ORG_LIST","TASK_BOARD_DELIVERY","TASK_BOARD_OPERATION","TASK_BOARD_OPERATION_TASKS","TASK_BOARD_REWORK","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_QUALITY","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS","THREAD_ANALYTICS_ORG_LIST","THREAD_ANALYTICS_LIVE","THREAD_ANALYTICS_USAGE","THREAD_ANALYTICS_ERRORS","NOTIFICATION_LIST","NOTIFICATION_MARK_READ","NOTIFICATION_SUBSCRIPTION_SET","NOTIFICATION_SUBSCRIPTION_LIST","generate_image","web_search","deep_research","suggest_task","preview_navigate","update_interests"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_AUTOMATION_LIST","JIRA_AUTOMATION_UPSERT","JIRA_RUN_START"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","REPORTS_SETUP","REPORTS_RUN","REPORTS_BIND","REPORTS_CONNECTION_STATUS","REPORTS_SET_REPOSITORY"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE","PROJECT_FOLDERS_SET"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","AI_PLAN_ENTITLEMENTS","AI_PLAN_LIST","AI_PLAN_SET","AI_PLAN_INVOICE_UPGRADE","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT","GITHUB_COPILOT_CONNECT","GITHUB_COPILOT_STATUS","GITHUB_COPILOT_DISCONNECT","GITHUB_COPILOT_SHARE"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"experiments:manage",label:"Manage experiments",description:"Create, update, and delete A/B experiments, and view results",section:"Experiments",tools:["EXPERIMENT_LIST","EXPERIMENT_GET","EXPERIMENT_CREATE","EXPERIMENT_SUGGEST","EXPERIMENT_IMPLEMENT","EXPERIMENT_IMPLEMENT_LOCAL","EXPERIMENT_PREVIEW_SYNC_LOCAL","EXPERIMENT_UPDATE","EXPERIMENT_DELETE","EXPERIMENT_RESULTS"],dangerous:!0},{id:"registry:manage",label:"Browse registry",description:"Browse the Deco MCP catalog",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"lake:read",label:"Query the data lake",description:"Run read-only SQL over the organization's own data lake (orders from connected stores)",section:"Developer",tools:["CUSTOMER_LAKE_QUERY"]},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...We.find(t=>t.id===Je)?.tools??[]];const _s=["agents:manage","connections:manage"];new Set(We.filter(t=>_s.includes(t.id)).flatMap(t=>t.tools));function As(){const t=new Map;for(const e of We){if(e.id===Je)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function Ss(t,e,l){if(l)return!0;const r=new Set(e);return t.tools.every(i=>r.has(i))}function Is(t,e,l){if(l){const i=new Set(e);for(const n of t.tools)i.add(n);return Array.from(i)}const r=new Set(e);for(const i of t.tools)r.delete(i);return Array.from(r)}function Rs(t){const e=J.c(21),{connection:l,isSelected:r,hasToolsEnabled:i,activeToolsCount:n,totalToolsCount:c,onSelect:f,onToggle:x}=t,d=r?"bg-accent/50":"hover:bg-muted/50";let u;e[0]!==d?(u=q("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),e[0]=d,e[1]=u):u=e[1];let m;e[2]!==l.icon||e[3]!==l.title?(m=s.jsx(Be,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=m):m=e[4];let T;e[5]!==l.title?(T=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=T):T=e[6];let g;e[7]!==f||e[8]!==m||e[9]!==T?(g=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:f,children:[m,T]}),e[7]=f,e[8]=m,e[9]=T,e[10]=g):g=e[10];let a;e[11]!==n||e[12]!==l.tools||e[13]!==i||e[14]!==x||e[15]!==c?(a=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[n,"/",c]}),s.jsx(ye,{checked:i,onCheckedChange:x,onClick:Ns})]}),e[11]=n,e[12]=l.tools,e[13]=i,e[14]=x,e[15]=c,e[16]=a):a=e[16];let h;return e[17]!==u||e[18]!==g||e[19]!==a?(h=s.jsxs("div",{className:u,children:[g,a]}),e[17]=u,e[18]=g,e[19]=a,e[20]=h):h=e[20],h}function Ns(t){return t.stopPropagation()}function Cs(t){const e=J.c(18),{connectionId:l,tool:r,isSelected:i,onToggle:n}=t,c=`tool-${l}-${r.name}`,f=i?"text-foreground":"text-muted-foreground";let x;e[0]!==f?(x=q("text-sm font-medium",f),e[0]=f,e[1]=x):x=e[1];let d;e[2]!==x||e[3]!==r.name?(d=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:x,children:r.name})}),e[2]=x,e[3]=r.name,e[4]=d):d=e[4];let u;e[5]!==r.description?(u=r.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.description}),e[5]=r.description,e[6]=u):u=e[6];let m;e[7]!==d||e[8]!==u?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,u]}),e[7]=d,e[8]=u,e[9]=m):m=e[9];const T=`tool-${l}-${r.name}`;let g;e[10]!==i||e[11]!==n||e[12]!==T?(g=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(ye,{id:T,checked:i,onCheckedChange:n,onClick:Os})}),e[10]=i,e[11]=n,e[12]=T,e[13]=g):g=e[13];let a;return e[14]!==c||e[15]!==m||e[16]!==g?(a=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:c,children:[m,g]}),e[14]=c,e[15]=m,e[16]=g,e[17]=a):a=e[17],a}function Os(t){return t.stopPropagation()}function bs({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:r}){const i=oe(),[n,c]=Y.useState(""),f=r!==void 0?r:n,x=Y.useDeferredValue(f),[d,u]=Y.useState("all"),[m,T]=Y.useState(!1),g=Y.useRef(new Set(Object.keys(t))),{org:a}=Ue(),h=rs({connectionId:Pt,orgId:a.id,orgSlug:a.slug}),R=100,C=x.trim(),_=C?{operator:"or",conditions:[{field:["title"],operator:"contains",value:C},{field:["description"],operator:"contains",value:C}]}:void 0,b=!!l,N={..._&&{where:_},orderBy:[{field:["updated_at"],direction:"asc"}],limit:R,offset:0,...b&&{include_virtual:!0}},j=JSON.stringify(N),{data:A,fetchNextPage:O,hasNextPage:P,isFetchingNextPage:p}=is({queryKey:ue.collectionListInfinite(h,a.id,"","CONNECTIONS",j),queryFn:async({pageParam:I=0})=>(await h.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{..._&&{where:_},orderBy:[{field:["updated_at"],direction:"asc"}],limit:R,offset:I,...b&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(I,U)=>{if(I?.hasMore)return U.reduce((H,Z)=>H+(Z?.items?.length??0),0)},staleTime:3e4}),S=A?.pages.flatMap(I=>I?.items??[])??[],v=os(O,P??!1,p),o=l?S.filter(I=>I.connection_type!=="VIRTUAL"?!0:cs(I.connection_url)!==l):S,E=g.current,M=[...E.values()].map(I=>o.find(U=>U.id===I)).filter(I=>I!==void 0),D=o.filter(I=>!E.has(I.id)),L=[...M,...D],y=I=>{const U=t[I];return U!==void 0&&U.length>0},V=L.filter(I=>{if(d==="all")return!0;const U=y(I.id);return d==="selected"?U:d==="unselected"?!U:!0}),[k,z]=Y.useState(L[0]?.id??null),F=k?L.find(I=>I.id===k)??null:null,{data:B,isFetching:K}=Qe({...Dt(a.id,"CONNECTIONS",k??void 0,h),enabled:!!k}),Q=B?.item?.tools??[],W=(I,U)=>t[I]?.includes(U)??!1,te=(I,U)=>{const H=t[I]??[],Z=H.includes(U),ne={...t};if(Z){const ie=H.filter(ce=>ce!==U);ie.length===0?delete ne[I]:ne[I]=ie}else ne[I]=[...H,U];e(ne)},se=I=>{if((t[I]??[]).length>0){const Z={...t};delete Z[I],e(Z);return}const H=I===k?Q:[];if(!H.length){z(I);return}e({...t,[I]:H.map(Z=>Z.name)})},$=I=>{z(I),T(!0)},X=()=>{T(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:q("w-full md:w-80 border-r border-border flex flex-col",m&&"hidden md:flex"),children:[r===void 0&&s.jsx(as,{value:n,onChange:c,placeholder:i("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{type:"button",onClick:()=>u("all"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border cursor-pointer",d==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterAll")}),s.jsx("button",{type:"button",onClick:()=>u("selected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border cursor-pointer",d==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterSelected")}),s.jsx("button",{type:"button",onClick:()=>u("unselected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border cursor-pointer",d==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:V.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:i(f?"common.toolSetSelector.noConnectionsFound":d==="selected"?"common.toolSetSelector.noServersSelected":d==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[V.map(I=>{const U=k===I.id,H=U?Q.length:0,Z=t[I.id]?.length??0;return s.jsx(Rs,{connection:{...I,tools:U?Q:I.tools},isSelected:U,hasToolsEnabled:y(I.id),activeToolsCount:Z,totalToolsCount:H,onSelect:()=>$(I.id),onToggle:()=>se(I.id)},I.id)}),s.jsx("div",{ref:v,className:"h-4"}),p&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{className:"size-4.5 text-muted-foreground"})})]})})]}),s.jsx("div",{className:q("flex-1 flex-col",m?"flex":"hidden md:flex"),children:F?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ae,{variant:"ghost",size:"sm",onClick:X,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(ns,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Be,{icon:F.icon,name:F.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:F.title}),F.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:F.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:K?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{className:"size-4.5 text-muted-foreground"})}):Q.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:Q.map(I=>s.jsx(Cs,{connectionId:F.id,tool:I,isSelected:W(F.id,I.name),onToggle:()=>te(F.id,I.name)},I.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:i("common.toolSetSelector.selectConnection")})})})]})}const js=Xe({role:Xe({id:le().optional(),slug:le().optional(),label:le()}),allowAllStaticPermissions:Ge(),staticPermissions:me(le()),toolSet:et(le(),me(le())),allowAllModels:Ge(),modelSet:et(le(),me(le())),allowAllProjects:Ge(),projectSet:me(le()),projectExceptions:me(le()),allowAllConnections:Ge(),connectionExceptions:me(le()),memberIds:me(le())});function $e(t,e,l,r){const i=s.jsx(ge,{checked:e,disabled:l,onCheckedChange:r});return l?s.jsx(je,{children:s.jsxs(Pe,{children:[s.jsx(De,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(ve,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function Ps(t){const e=J.c(41),{allowAllStaticPermissions:l,staticPermissions:r,onAllowAllChange:i,onPermissionsChange:n,readOnly:c,searchQuery:f}=t,x=c===void 0?!1:c,d=oe();let u;e[0]!==f?(u=f.trim().toLowerCase(),e[0]=f,e[1]=u):u=e[1];const m=Y.useDeferredValue(u);let T;if(e[2]!==l||e[3]!==m||e[4]!==i||e[5]!==n||e[6]!==x||e[7]!==f||e[8]!==r||e[9]!==d){const g=As(),a=(p,S)=>{if(!x){if(l&&S){const v=g.flatMap(Ls).flatMap(vs);i(!1),n(v.filter(o=>!p.tools.includes(o)));return}l||n(Is(p,r,!S))}};let h;e[11]!==m?(h=p=>{const{section:S,capabilities:v}=p;return{section:S,capabilities:v.filter(o=>!m||o.label.toLowerCase().includes(m)||o.description.toLowerCase().includes(m))}},e[11]=m,e[12]=h):h=e[12];const R=g.map(h).filter(Ds);let C;e[13]!==d?(C=d("settings.orgRoleDetail.general"),e[13]=d,e[14]=C):C=e[14];let _;e[15]!==d?(_=d("settings.orgRoleDetail.allOrgPermissions"),e[15]=d,e[16]=_):_=e[16];let b;e[17]!==d?(b=d("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=d,e[18]=b):b=e[18];let N;e[19]!==l||e[20]!==i||e[21]!==n?(N=()=>{i(!l),n([])},e[19]=l,e[20]=i,e[21]=n,e[22]=N):N=e[22];let j;e[23]!==l||e[24]!==x||e[25]!==d||e[26]!==N?(j=$e(d,l,x,N),e[23]=l,e[24]=x,e[25]=d,e[26]=N,e[27]=j):j=e[27];let A;e[28]!==l||e[29]!==i||e[30]!==n||e[31]!==x?(A=x?void 0:()=>{i(!l),n([])},e[28]=l,e[29]=i,e[30]=n,e[31]=x,e[32]=A):A=e[32];let O;e[33]!==A||e[34]!==_||e[35]!==b||e[36]!==j?(O=s.jsx(st,{children:s.jsx(lt,{title:_,description:b,action:j,onClick:A})}),e[33]=A,e[34]=_,e[35]=b,e[36]=j,e[37]=O):O=e[37];let P;e[38]!==O||e[39]!==C?(P=s.jsx(tt,{title:C,children:O}),e[38]=O,e[39]=C,e[40]=P):P=e[40],T=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[P,R.length===0&&m?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:d("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:f})}):R.map(p=>{const{section:S,capabilities:v}=p;return s.jsx(tt,{title:S,children:s.jsx(st,{children:v.map(o=>{const E=Ss(o,r,l);return s.jsx(lt,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[o.label,o.dangerous&&s.jsx(kt,{size:12,className:"text-warning shrink-0"})]}),description:o.description,action:$e(d,E,x,()=>a(o,E)),onClick:x?void 0:()=>a(o,E)},o.id)})})},S)})]})}),e[2]=l,e[3]=m,e[4]=i,e[5]=n,e[6]=x,e[7]=f,e[8]=r,e[9]=d,e[10]=T}else T=e[10];return T}function Ds(t){return t.capabilities.length>0}function vs(t){return t.tools}function Ls(t){return t.capabilities}const Ct={anthropic:"Anthropic",openrouter:"OpenRouter"},Ms={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ys(t,e){const l=t.indexOf("/"),r=l>0?t.slice(0,l):e;return r.startsWith("~")?r.slice(1):r}function ws(t){return Ms[t]??Ct[t]??t}function ks(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const Ot=30;function Gs(t){const e=J.c(40),{connectionId:l,subProviderId:r,subProviderName:i,groupLogo:n,models:c,allConnectionModelIds:f,selectedModels:x,allowAllModels:d,allConnectionModelsSelected:u,onToggleModel:m,onExitAllowAll:T,readOnly:g,defaultExpanded:a}=t,h=oe(),[R,C]=Y.useState(a),_=a||R,b=C,[N,j]=Y.useState(Ot);let A;e[0]!==u||e[1]!==d||e[2]!==x?(A=p=>d||u||x.includes("*")||x.includes(p),e[0]=u,e[1]=d,e[2]=x,e[3]=A):A=e[3];const O=A;let P;if(e[4]!==f||e[5]!==d||e[6]!==l||e[7]!==_||e[8]!==n||e[9]!==O||e[10]!==c||e[11]!==T||e[12]!==m||e[13]!==g||e[14]!==r||e[15]!==i||e[16]!==h||e[17]!==N){let p;e[19]!==O?(p=K=>O(K.id),e[19]=O,e[20]=p):p=e[20];const S=c.filter(p).length,v=c.slice(0,N),o=c.length>N;let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>b(Vs),e[21]=E):E=e[21];const M=n??_t[r]??At;let D;e[22]!==i||e[23]!==M?(D=s.jsx(Be,{icon:M,name:i,size:"sm"}),e[22]=i,e[23]=M,e[24]=D):D=e[24];let L;e[25]!==i?(L=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[25]=i,e[26]=L):L=e[26];let y;e[27]!==D||e[28]!==L?(y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[D,L]}),e[27]=D,e[28]=L,e[29]=y):y=e[29];const V=h("settings.orgRoleDetail.enabledCount",{enabledCount:S,total:c.length});let k;e[30]!==V?(k=s.jsx(Me,{variant:"secondary",className:"text-xs text-muted-foreground",children:V}),e[30]=V,e[31]=k):k=e[31];let z;e[32]!==_?(z=_?s.jsx(hs,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Gt,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=_,e[33]=z):z=e[33];let F;e[34]!==k||e[35]!==z?(F=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[k,z]}),e[34]=k,e[35]=z,e[36]=F):F=e[36];let B;e[37]!==F||e[38]!==y?(B=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:E,children:[y,F]}),e[37]=F,e[38]=y,e[39]=B):B=e[39],P=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[B,_&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[v.map(K=>{const Q=O(K.id),W=()=>{if(!g){if(d){T(l,f,K.id);return}m(l,K.id)}};return s.jsxs("div",{className:q("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!g&&"hover:bg-muted/50 cursor-pointer"),onClick:W,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:K.title})}),s.jsx("div",{onClick:Ks,children:g?s.jsx(je,{children:s.jsxs(Pe,{children:[s.jsx(De,{asChild:!0,children:s.jsx("div",{children:s.jsx(ge,{checked:Q,disabled:!0,onCheckedChange:Bs})})}),s.jsx(ve,{children:s.jsx("p",{children:h("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ge,{checked:Q,onCheckedChange:W})})]},K.id)}),o&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>j(Us),children:h("settings.orgRoleDetail.showMore",{remaining:c.length-N})})]})]}),e[4]=f,e[5]=d,e[6]=l,e[7]=_,e[8]=n,e[9]=O,e[10]=c,e[11]=T,e[12]=m,e[13]=g,e[14]=r,e[15]=i,e[16]=h,e[17]=N,e[18]=P}else P=e[18];return P}function Us(t){return t+Ot}function Bs(){}function Ks(t){return t.stopPropagation()}function Vs(t){return!t}function Fs(t){const e=J.c(33),{connection:l,selectedModels:r,allowAllModels:i,onToggleModel:n,onExitAllowAll:c,allConnectionModelsSelected:f,searchQuery:x,readOnly:d}=t,u=us(l.id);let m,T,g,a,h;if(e[0]!==f||e[1]!==i||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==n||e[7]!==u||e[8]!==d||e[9]!==x||e[10]!==r){h=Symbol.for("react.early_return_sentinel");e:{let _;e[16]!==l.label?(_=E=>({...E,id:E.modelId,provider:l.label}),e[16]=l.label,e[17]=_):_=e[17];const b=u.filter(Qs).map(_),N=x.trim().toLowerCase(),j=N?b.filter(E=>E.title.toLowerCase().includes(N)||E.id.toLowerCase().includes(N)||E.provider?.toLowerCase().includes(N)):b;if(j.length===0){h=null;break e}const A=new Map;for(const E of j){const M=ys(E.id,l.providerId),D=A.get(M)??{models:[],logo:null};D.models.push({id:E.id,title:ks(E.title),logo:E.logo}),!D.logo&&E.logo&&(D.logo=E.logo),A.set(M,D)}const O=Array.from(A.entries()).map($s).sort(Ys),P=O.length===1||N.length>0;g="flex flex-col gap-3";const p=_t[l.providerId]??At;let S;e[18]!==l.providerId||e[19]!==p?(S=s.jsx("img",{src:p,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=p,e[20]=S):S=e[20];const v=Ct[l.providerId]??l.providerId;let o;e[21]!==v?(o=s.jsx("h4",{className:"text-sm font-medium",children:v}),e[21]=v,e[22]=o):o=e[22],e[23]!==o||e[24]!==S?(a=s.jsxs("div",{className:"flex items-center gap-2",children:[S,o]}),e[23]=o,e[24]=S,e[25]=a):a=e[25],m="flex flex-col gap-3",T=O.map(E=>s.jsx(Gs,{connectionId:l.id,subProviderId:E.id,subProviderName:E.name,groupLogo:E.logo,models:E.models,allConnectionModelIds:b.map(zs),selectedModels:r,allowAllModels:i,allConnectionModelsSelected:f,onToggleModel:n,onExitAllowAll:c,readOnly:d,defaultExpanded:P},E.id))}e[0]=f,e[1]=i,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=n,e[7]=u,e[8]=d,e[9]=x,e[10]=r,e[11]=m,e[12]=T,e[13]=g,e[14]=a,e[15]=h}else m=e[11],T=e[12],g=e[13],a=e[14],h=e[15];if(h!==Symbol.for("react.early_return_sentinel"))return h;let R;e[26]!==m||e[27]!==T?(R=s.jsx("div",{className:m,children:T}),e[26]=m,e[27]=T,e[28]=R):R=e[28];let C;return e[29]!==g||e[30]!==a||e[31]!==R?(C=s.jsxs("div",{className:g,children:[a,R]}),e[29]=g,e[30]=a,e[31]=R,e[32]=C):C=e[32],C}function zs(t){return t.id}function Ys(t,e){return t.name.localeCompare(e.name)}function $s(t){const[e,l]=t;return{id:e,name:ws(e),logo:l.logo,models:l.models}}function Qs(t,e,l){return l.findIndex(r=>r.modelId===t.modelId)===e}function Hs(t){const e=J.c(41),{allowAllModels:l,modelSet:r,onAllowAllChange:i,onModelSetChange:n,readOnly:c,searchQuery:f}=t,x=c===void 0?!1:c,d=oe(),u=Y.useDeferredValue(f),m=ms();let T;e[0]!==r||e[1]!==n?(T=(p,S)=>{const v=r[p]??[],o={...r};if(v.includes(S)){const E=v.filter(M=>M!==S);E.length===0?delete o[p]:o[p]=E}else o[p]=[...v,S];n(o)},e[0]=r,e[1]=n,e[2]=T):T=e[2];const g=T;let a;e[3]!==r||e[4]!==i||e[5]!==n?(a=(p,S,v)=>{i(!1),n({...r,[p]:S.filter(o=>o!==v)})},e[3]=r,e[4]=i,e[5]=n,e[6]=a):a=e[6];const h=a,R=!x&&"hover:bg-muted/50 cursor-pointer";let C;e[7]!==R?(C=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",R),e[7]=R,e[8]=C):C=e[8];let _;e[9]!==l||e[10]!==i||e[11]!==n||e[12]!==x?(_=()=>{if(x)return;const p=!l;i(p),p&&n({})},e[9]=l,e[10]=i,e[11]=n,e[12]=x,e[13]=_):_=e[13];let b;e[14]!==d?(b=d("settings.orgRoleDetail.allModels"),e[14]=d,e[15]=b):b=e[15];let N;e[16]!==b?(N=s.jsx("span",{className:"text-sm font-medium",children:b}),e[16]=b,e[17]=N):N=e[17];let j;e[18]!==l||e[19]!==i||e[20]!==n||e[21]!==x||e[22]!==d?(j=s.jsx("div",{onClick:qs,children:x?s.jsx(je,{children:s.jsxs(Pe,{children:[s.jsx(De,{asChild:!0,children:s.jsx("div",{children:s.jsx(ge,{checked:l,disabled:!0,onCheckedChange:Zs})})}),s.jsx(ve,{children:s.jsx("p",{children:d("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ge,{checked:l,onCheckedChange:p=>{i(p),p&&n({})}})}),e[18]=l,e[19]=i,e[20]=n,e[21]=x,e[22]=d,e[23]=j):j=e[23];let A;e[24]!==C||e[25]!==_||e[26]!==N||e[27]!==j?(A=s.jsxs("div",{className:C,onClick:_,children:[N,j]}),e[24]=C,e[25]=_,e[26]=N,e[27]=j,e[28]=A):A=e[28];let O;e[29]!==m||e[30]!==l||e[31]!==u||e[32]!==h||e[33]!==r||e[34]!==x||e[35]!==d||e[36]!==g?(O=m.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:d("settings.orgRoleDetail.noLlmConnectionsConfigured")}):m.map(p=>s.jsx(Y.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4"}),d("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Fs,{connection:p,selectedModels:r[p.id]??[],allowAllModels:l,onToggleModel:g,onExitAllowAll:h,allConnectionModelsSelected:(r[p.id]??[]).includes("*"),searchQuery:u,readOnly:x})},p.id)),e[29]=m,e[30]=l,e[31]=u,e[32]=h,e[33]=r,e[34]=x,e[35]=d,e[36]=g,e[37]=O):O=e[37];let P;return e[38]!==A||e[39]!==O?(P=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[A,O]}),e[38]=A,e[39]=O,e[40]=P):P=e[40],P}function Zs(){}function qs(t){return t.stopPropagation()}function Js(t){const e=J.c(49),{allowAllProjects:l,projectSet:r,projectExceptions:i,onAllowAllChange:n,onProjectSetChange:c,onProjectExceptionsChange:f,readOnly:x,searchQuery:d}=t,u=x===void 0?!1:x,m=oe(),T=Y.useDeferredValue(d),g=ds();let a;if(e[0]!==l||e[1]!==T||e[2]!==n||e[3]!==f||e[4]!==c||e[5]!==i||e[6]!==r||e[7]!==u||e[8]!==d||e[9]!==m||e[10]!==g){const h=gs(g),R=T.trim().toLowerCase(),C=R?h.filter(L=>L.title.toLowerCase().includes(R)):h;let _;e[12]!==l||e[13]!==f||e[14]!==c||e[15]!==i||e[16]!==r?(_=L=>{const[y,V]=l?[i,f]:[r,c];V(y.includes(L)?y.filter(k=>k!==L):[...y,L])},e[12]=l,e[13]=f,e[14]=c,e[15]=i,e[16]=r,e[17]=_):_=e[17];const b=_;let N;e[18]!==n||e[19]!==f||e[20]!==c?(N=L=>{n(L),c([]),f([])},e[18]=n,e[19]=f,e[20]=c,e[21]=N):N=e[21];const j=N,A=!u&&"hover:bg-muted/50 cursor-pointer";let O;e[22]!==A?(O=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",A),e[22]=A,e[23]=O):O=e[23];let P;e[24]!==l||e[25]!==u||e[26]!==j?(P=()=>{u||j(!l)},e[24]=l,e[25]=u,e[26]=j,e[27]=P):P=e[27];let p;e[28]!==m?(p=m("settings.orgRoleDetail.allProjects"),e[28]=m,e[29]=p):p=e[29];let S;e[30]!==p?(S=s.jsx("span",{className:"text-sm font-medium",children:p}),e[30]=p,e[31]=S):S=e[31];let v;e[32]!==m?(v=m("settings.orgRoleDetail.allProjectsDescription"),e[32]=m,e[33]=v):v=e[33];let o;e[34]!==v?(o=s.jsx("span",{className:"text-xs text-muted-foreground",children:v}),e[34]=v,e[35]=o):o=e[35];let E;e[36]!==o||e[37]!==S?(E=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[S,o]}),e[36]=o,e[37]=S,e[38]=E):E=e[38];let M;e[39]!==l||e[40]!==u||e[41]!==j||e[42]!==m?(M=s.jsx("div",{onClick:Xs,children:u?s.jsx(je,{children:s.jsxs(Pe,{children:[s.jsx(De,{asChild:!0,children:s.jsx("div",{children:s.jsx(ge,{checked:l,disabled:!0,onCheckedChange:Ws})})}),s.jsx(ve,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ge,{checked:l,onCheckedChange:j})}),e[39]=l,e[40]=u,e[41]=j,e[42]=m,e[43]=M):M=e[43];let D;e[44]!==E||e[45]!==M||e[46]!==O||e[47]!==P?(D=s.jsxs("div",{className:O,onClick:P,children:[E,M]}),e[44]=E,e[45]=M,e[46]=O,e[47]=P,e[48]=D):D=e[48],a=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 p-4",children:[D,h.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noProjectsAvailable")}):C.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noProjectsMatch",{searchQuery:d})}):s.jsx("div",{className:"flex flex-col gap-1",children:C.map(L=>{const y=l?!i.includes(L.id):r.includes(L.id);return s.jsxs("label",{className:q("flex items-center gap-3 px-3 py-2 rounded-lg border border-transparent",u?"cursor-default":"hover:bg-muted/50 cursor-pointer"),children:[s.jsx(ye,{checked:y,disabled:u,onCheckedChange:()=>{u||b(L.id)}}),s.jsx(fs,{icon:L.icon,name:L.title}),s.jsx("span",{className:"text-sm truncate",children:L.title})]},L.id)})})]}),e[0]=l,e[1]=T,e[2]=n,e[3]=f,e[4]=c,e[5]=i,e[6]=r,e[7]=u,e[8]=d,e[9]=m,e[10]=g,e[11]=a}else a=e[11];return a}function Ws(){}function Xs(t){return t.stopPropagation()}function el(t){const e=J.c(48),{allowAllConnections:l,connectionExceptions:r,onAllowAllChange:i,onConnectionExceptionsChange:n,readOnly:c,searchQuery:f,children:x}=t,d=c===void 0?!1:c,u=oe(),m=Y.useDeferredValue(f),T=Rt();let g;if(e[0]!==T||e[1]!==m){const D=m.trim().toLowerCase();g=D?T.filter(L=>L.title.toLowerCase().includes(D)):T,e[0]=T,e[1]=m,e[2]=g}else g=e[2];const a=g;let h;e[3]!==r||e[4]!==n?(h=D=>{n(r.includes(D)?r.filter(L=>L!==D):[...r,D])},e[3]=r,e[4]=n,e[5]=h):h=e[5];const R=h,C=!d&&"hover:bg-muted/50 cursor-pointer";let _;e[6]!==C?(_=q("flex items-center justify-between px-4 py-3 border-b border-border",C),e[6]=C,e[7]=_):_=e[7];let b;e[8]!==l||e[9]!==i||e[10]!==d?(b=()=>{d||i(!l)},e[8]=l,e[9]=i,e[10]=d,e[11]=b):b=e[11];let N;e[12]!==u?(N=u("settings.orgRoleDetail.allConnections"),e[12]=u,e[13]=N):N=e[13];let j;e[14]!==N?(j=s.jsx("span",{className:"text-sm font-medium",children:N}),e[14]=N,e[15]=j):j=e[15];let A;e[16]!==u?(A=u("settings.orgRoleDetail.allConnectionsDescription"),e[16]=u,e[17]=A):A=e[17];let O;e[18]!==A?(O=s.jsx("span",{className:"text-xs text-muted-foreground",children:A}),e[18]=A,e[19]=O):O=e[19];let P;e[20]!==O||e[21]!==j?(P=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[j,O]}),e[20]=O,e[21]=j,e[22]=P):P=e[22];let p;e[23]!==l||e[24]!==i?(p=()=>i(!l),e[23]=l,e[24]=i,e[25]=p):p=e[25];let S;e[26]!==l||e[27]!==d||e[28]!==u||e[29]!==p?(S=$e(u,l,d,p),e[26]=l,e[27]=d,e[28]=u,e[29]=p,e[30]=S):S=e[30];let v;e[31]!==S?(v=s.jsx("div",{onClick:tl,children:S}),e[31]=S,e[32]=v):v=e[32];let o;e[33]!==P||e[34]!==v||e[35]!==_||e[36]!==b?(o=s.jsxs("div",{className:_,onClick:b,children:[P,v]}),e[33]=P,e[34]=v,e[35]=_,e[36]=b,e[37]=o):o=e[37];let E;e[38]!==l||e[39]!==x||e[40]!==r||e[41]!==a||e[42]!==d||e[43]!==R?(E=l?s.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-4 flex flex-col gap-1",children:a.map(D=>s.jsxs("label",{className:q("flex items-center gap-3 px-3 py-2 rounded-lg border border-transparent",d?"cursor-default":"hover:bg-muted/50 cursor-pointer"),children:[s.jsx(ye,{checked:!r.includes(D.id),disabled:d,onCheckedChange:()=>{d||R(D.id)}}),s.jsx(Be,{icon:D.icon,name:D.title,size:"sm"}),s.jsx("span",{className:"text-sm truncate",children:D.title})]},D.id))}):s.jsx("div",{className:"flex-1 min-h-0",children:x}),e[38]=l,e[39]=x,e[40]=r,e[41]=a,e[42]=d,e[43]=R,e[44]=E):E=e[44];let M;return e[45]!==o||e[46]!==E?(M=s.jsxs("div",{className:"flex flex-col h-full",children:[o,E]}),e[45]=o,e[46]=E,e[47]=M):M=e[47],M}function tl(t){return t.stopPropagation()}function sl(t){const e=J.c(75),{open:l,onOpenChange:r,selectedMemberIds:i,onAddMembers:n}=t,c=oe(),[f,x]=Y.useState(""),d=Y.useDeferredValue(f);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];const[m,T]=Y.useState(u),{data:g}=St();let a,h,R,C,_,b,N,j,A,O,P;if(e[1]!==g?.data?.members||e[2]!==d||e[3]!==n||e[4]!==r||e[5]!==l||e[6]!==m||e[7]!==f||e[8]!==i||e[9]!==c){const k=g?.data?.members??[];let z;e[21]!==d?(z=$=>{const X=d.toLowerCase();return $.user?.name?.toLowerCase().includes(X)||$.user?.email?.toLowerCase().includes(X)},e[21]=d,e[22]=z):z=e[22];const F=k.filter(z);let B;e[23]!==n||e[24]!==r||e[25]!==m?(B=()=>{n(m),T([]),r(!1)},e[23]=n,e[24]=r,e[25]=m,e[26]=B):B=e[26],R=B,h=ut,O=l,P=r,a=ft,j="sm:max-w-md p-0";let K;e[27]!==c?(K=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=K):K=e[28];let Q;e[29]!==K?(Q=s.jsx(gt,{children:K}),e[29]=K,e[30]=Q):Q=e[30];let W;e[31]!==c?(W=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=W):W=e[32];let te;e[33]!==W?(te=s.jsx(xt,{children:W}),e[33]=W,e[34]=te):te=e[34],e[35]!==Q||e[36]!==te?(A=s.jsxs(ht,{className:"px-6 pt-6",children:[Q,te]}),e[35]=Q,e[36]=te,e[37]=A):A=e[37],b="flex flex-col h-80";let se;e[38]!==c?(se=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=se):se=e[39],e[40]!==f||e[41]!==se?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(qe,{value:f,onChange:x,placeholder:se,className:"w-full"})}),e[40]=f,e[41]=se,e[42]=N):N=e[42],C="flex-1 overflow-auto",_=F.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:c(f?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:F.map($=>{const X=$.role!=="owner",I=i.includes($.id),U=m.includes($.id);return s.jsxs("label",{className:q("flex items-center gap-3 p-2 rounded-lg",!X||I?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(ye,{checked:U||I,onCheckedChange:()=>{!X||I||T(H=>H.includes($.id)?H.filter(Z=>Z!==$.id):[...H,$.id])},disabled:!X||I}),s.jsx(Nt,{url:$.user?.image??void 0,fallback:It($.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:$.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:$.user?.email})]}),!X&&s.jsx(Me,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),I&&X&&s.jsx(Me,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},$.id)})}),e[1]=g?.data?.members,e[2]=d,e[3]=n,e[4]=r,e[5]=l,e[6]=m,e[7]=f,e[8]=i,e[9]=c,e[10]=a,e[11]=h,e[12]=R,e[13]=C,e[14]=_,e[15]=b,e[16]=N,e[17]=j,e[18]=A,e[19]=O,e[20]=P}else a=e[10],h=e[11],R=e[12],C=e[13],_=e[14],b=e[15],N=e[16],j=e[17],A=e[18],O=e[19],P=e[20];let p;e[43]!==C||e[44]!==_?(p=s.jsx("div",{className:C,children:_}),e[43]=C,e[44]=_,e[45]=p):p=e[45];let S;e[46]!==p||e[47]!==b||e[48]!==N?(S=s.jsxs("div",{className:b,children:[N,p]}),e[46]=p,e[47]=b,e[48]=N,e[49]=S):S=e[49];let v;e[50]!==c?(v=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=v):v=e[51];let o;e[52]!==v?(o=s.jsx(Tt,{children:v}),e[52]=v,e[53]=o):o=e[53];const E=m.length===0;let M;e[54]!==m.length||e[55]!==c?(M=c("settings.orgRoleDetail.addWithCount",{count:m.length}),e[54]=m.length,e[55]=c,e[56]=M):M=e[56];let D;e[57]!==R||e[58]!==E||e[59]!==M?(D=s.jsx(pt,{onClick:R,disabled:E,children:M}),e[57]=R,e[58]=E,e[59]=M,e[60]=D):D=e[60];let L;e[61]!==o||e[62]!==D?(L=s.jsxs(Et,{className:"px-6 pb-6",children:[o,D]}),e[61]=o,e[62]=D,e[63]=L):L=e[63];let y;e[64]!==a||e[65]!==S||e[66]!==L||e[67]!==j||e[68]!==A?(y=s.jsxs(a,{className:j,children:[A,S,L]}),e[64]=a,e[65]=S,e[66]=L,e[67]=j,e[68]=A,e[69]=y):y=e[69];let V;return e[70]!==h||e[71]!==y||e[72]!==O||e[73]!==P?(V=s.jsx(h,{open:O,onOpenChange:P,children:y}),e[70]=h,e[71]=y,e[72]=O,e[73]=P,e[74]=V):V=e[74],V}function ll(t){const e=J.c(33),{memberIds:l,onMemberIdsChange:r,readOnly:i,readOnlyMessage:n,searchQuery:c,addMemberDialogOpen:f,onAddMemberDialogOpenChange:x}=t,d=i===void 0?!1:i,u=n===void 0?void 0:n,m=oe(),T=Y.useDeferredValue(c),{data:g}=St();let a,h,R;if(e[0]!==g?.data?.members||e[1]!==T||e[2]!==l||e[3]!==r||e[4]!==d||e[5]!==u||e[6]!==c||e[7]!==m){const j=g?.data?.members??[];let A;e[11]!==l?(A=o=>l.includes(o.id),e[11]=l,e[12]=A):A=e[12];const O=j.filter(A);let P;e[13]!==T?(P=o=>{const E=T.toLowerCase();return o.user?.name?.toLowerCase().includes(E)||o.user?.email?.toLowerCase().includes(E)},e[13]=T,e[14]=P):P=e[14];const p=O.filter(P);let S;e[15]!==u||e[16]!==m?(S=u??m("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=u,e[16]=m,e[17]=S):S=e[17];const v=S;R="flex flex-col h-full",a="flex-1 overflow-auto",h=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:m("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:m("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):p.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:p.map(o=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Nt,{url:o.user?.image??void 0,fallback:It(o.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:o.user?.name||m("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o.user?.email})]}),d?s.jsx(je,{children:s.jsxs(Pe,{children:[s.jsx(De,{asChild:!0,children:s.jsx("div",{children:s.jsx(ae,{variant:"ghost",size:"sm",disabled:!0,"aria-label":m("settings.orgRoleDetail.removeMember",{name:o.user?.name||m("settings.orgRoleDetail.unknown")}),children:s.jsx(ot,{size:16})})})}),s.jsx(ve,{children:s.jsx("p",{children:v})})]})}):s.jsx(ae,{variant:"ghost",size:"sm","aria-label":m("settings.orgRoleDetail.removeMember",{name:o.user?.name||m("settings.orgRoleDetail.unknown")}),onClick:()=>r(l.filter(E=>E!==o.id)),children:s.jsx(ot,{size:16})})]},o.id))}),e[0]=g?.data?.members,e[1]=T,e[2]=l,e[3]=r,e[4]=d,e[5]=u,e[6]=c,e[7]=m,e[8]=a,e[9]=h,e[10]=R}else a=e[8],h=e[9],R=e[10];let C;e[18]!==a||e[19]!==h?(C=s.jsx("div",{className:a,children:h}),e[18]=a,e[19]=h,e[20]=C):C=e[20];let _;e[21]!==l||e[22]!==r?(_=j=>r([...l,...j]),e[21]=l,e[22]=r,e[23]=_):_=e[23];let b;e[24]!==f||e[25]!==l||e[26]!==x||e[27]!==_?(b=s.jsx(sl,{open:f,onOpenChange:x,selectedMemberIds:l,onAddMembers:_}),e[24]=f,e[25]=l,e[26]=x,e[27]=_,e[28]=b):b=e[28];let N;return e[29]!==R||e[30]!==C||e[31]!==b?(N=s.jsxs("div",{className:R,children:[C,b]}),e[29]=R,e[30]=C,e[31]=b,e[32]=N):N=e[32],N}function ol(t){const e=J.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{className:"size-6 text-muted-foreground"})}),e[0]=l):l=e[0];let r;return e[1]!==t?(r=s.jsx(Y.Suspense,{fallback:l,children:s.jsx(ll,{...t})}),e[1]=t,e[2]=r):r=e[2],r}const nl={owner:[],admin:[],user:[]};function il(t,e,l,r){const i=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:nl[t],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],projectExceptions:[],allowAllConnections:i,connectionExceptions:[],memberIds:e.filter(n=>n.role===t).map(n=>n.id)}}function rl(t,e,l){const r=t.permission||{},i=r.self||[],n=i.includes("*"),c=n?[]:i.filter(g=>g!=="*"),f={};for(const[g,a]of Object.entries(r))if(!(g==="self"||g==="models"||g===Fe||g===ze))if(g==="*")for(const h of l)f[h.id]=a.includes("*")?h.tools?.map(R=>R.name)??[]:a;else{const h=l.find(R=>R.id===g);h&&(f[g]=a.includes("*")?h.tools?.map(R=>R.name)??[]:a)}const x=r.models||[],d=x.length===0||x.includes("*:*"),u={};if(!d)for(const g of x){const a=g.indexOf(":");if(a===-1)continue;const h=g.slice(0,a),R=g.slice(a+1);u[h]||(u[h]=[]),u[h].push(R)}const m=qt(Jt(r)),T=Wt(r[ze]??[]);return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:n,staticPermissions:c,toolSet:f,allowAllModels:d,modelSet:u,allowAllProjects:m.kind!=="only",projectSet:m.kind==="only"?m.names:[],projectExceptions:m.kind==="except"?m.names:[],allowAllConnections:T.kind!=="only",connectionExceptions:T.kind==="except"?T.names:[],memberIds:e.filter(g=>g.role===t.role).map(g=>g.id)}}function al(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[r,i]of Object.entries(t.toolSet))if(i.length>0){const c=e.find(f=>f.id===r)?.tools?.map(f=>f.name)??[];l[r]=c.length>0&&c.every(f=>i.includes(f))?["*"]:i}if(t.allowAllModels)l.models=["*:*"];else{const r=[];for(const[i,n]of Object.entries(t.modelSet))for(const c of n)r.push(`${i}:${c}`);r.length>0&&(l.models=r)}return t.allowAllProjects?t.projectExceptions.length>0&&(l[Fe]=Qt({names:t.projectExceptions})):l[Fe]=t.projectSet,t.allowAllConnections&&(l[ze]=[Ht,...t.connectionExceptions.map(Zt)]),l}function cl(t,e,l){return t.kind==="builtin"?il(t.role,e,void 0):t.kind==="custom"?rl(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},allowAllProjects:!0,projectSet:[],projectExceptions:[],allowAllConnections:!1,connectionExceptions:[],memberIds:[]}}function dl(t){const e=J.c(19),{readOnly:l,readOnlyMessage:r,onOpen:i}=t,n=r===void 0?void 0:r,c=oe();let f;e[0]!==n||e[1]!==c?(f=n??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=n,e[1]=c,e[2]=f):f=e[2];const x=f;if(l){let T;e[3]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Ye,{size:16}),e[3]=T):T=e[3];let g;e[4]!==c?(g=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=g):g=e[5];let a;e[6]!==g?(a=s.jsx(De,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ae,{variant:"outline",size:"sm",disabled:!0,children:[T,g]})})}),e[6]=g,e[7]=a):a=e[7];let h;e[8]!==x?(h=s.jsx(ve,{children:s.jsx("p",{children:x})}),e[8]=x,e[9]=h):h=e[9];let R;return e[10]!==a||e[11]!==h?(R=s.jsx(je,{children:s.jsxs(Pe,{children:[a,h]})}),e[10]=a,e[11]=h,e[12]=R):R=e[12],R}let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ye,{size:16}),e[13]=d):d=e[13];let u;e[14]!==c?(u=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=u):u=e[15];let m;return e[16]!==i||e[17]!==u?(m=s.jsxs(ae,{variant:"outline",size:"sm",onClick:i,children:[d,u]}),e[16]=i,e[17]=u,e[18]=m):m=e[18],m}function ml(t){const e=J.c(14),{locator:l}=Ue(),r=Ze(),i=Rt();let n;e[0]!==l?(n=ue.members(l),e[0]=l,e[1]=n):n=e[1];let c;e[2]!==r?(c=()=>r.organization.listMembers(),e[2]=r,e[3]=c):c=e[3];let f;e[4]!==n||e[5]!==c?(f={queryKey:n,queryFn:c},e[4]=n,e[5]=c,e[6]=f):f=e[6];const{data:x,isPending:d}=Qe(f);if(d||!i){let g;return e[7]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(re,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{className:"size-8 text-muted-foreground"})})}),e[7]=g):g=e[7],g}let u;e[8]!==x?.data?.members?(u=x?.data?.members??[],e[8]=x?.data?.members,e[9]=u):u=e[9];const m=u;let T;return e[10]!==i||e[11]!==m||e[12]!==t?(T=s.jsx(ul,{...t,members:m,connections:i}),e[10]=i,e[11]=m,e[12]=t,e[13]=T):T=e[13],T}function ul({target:t,onBack:e,onSaved:l,members:r,connections:i}){const n=oe(),{locator:c}=Ue(),f=Ze(),x=it(),d=t.kind==="builtin",u=t.kind==="builtin"&&t.role==="owner",m=t.kind==="new",[T,g]=Y.useState(d?"org":"mcp"),a=vt({resolver:Lt(js),defaultValues:cl(t,r,i)}),h=a.formState.isValid,R=a.formState.isDirty,C=rt({mutationFn:async o=>{const E=al(o,i),M=o.role.slug||o.role.label.toLowerCase().replace(/\s+/g,"-"),D=(o.role.slug==="owner"||o.role.slug==="admin"||o.role.slug==="user")&&!o.role.id,L=async(y,V)=>{const k=r.filter(B=>B.role===(V??y)).map(B=>B.id),z=o.memberIds.filter(B=>!k.includes(B)),F=k.filter(B=>!o.memberIds.includes(B));for(const B of z){const K=await f.organization.updateMemberRole({memberId:B,role:[y]});if(K?.error)throw new Error(K.error.message??n("settings.orgRoleDetail.somethingWentWrong"))}for(const B of F){const K=await f.organization.updateMemberRole({memberId:B,role:["user"]});if(K?.error)throw new Error(K.error.message??n("settings.orgRoleDetail.somethingWentWrong"))}};if(D)return await L(o.role.slug),o;if(o.role.id){const y=o.role.label.toLowerCase().replace(/\s+/g,"-"),V=o.role.slug,k=y!==V,z=await f.organization.updateRole({roleId:o.role.id,data:{permission:E,...k?{roleName:y}:{}}});if(z?.error)throw new Error(z.error.message??n("settings.orgRoleDetail.somethingWentWrong"));return await L(k?y:V,k?V:void 0),k?{...o,role:{...o.role,slug:y}}:o}else{const y=await f.organization.createRole({role:M,permission:E});if(y?.error)throw new Error(y.error.message??n("settings.orgRoleDetail.somethingWentWrong"));for(const V of o.memberIds){const k=await f.organization.updateMemberRole({memberId:V,role:[M]});if(k?.error)throw new Error(k.error.message)}return{...o,role:{...o.role,id:y.data?.roleData?.id,slug:M}}}},onSuccess:(o,E)=>{x.invalidateQueries({queryKey:ue.members(c)}),x.invalidateQueries({queryKey:ue.organizationRoles(c)});const M=!E.role.id&&!E.role.slug,D=E.role.slug==="owner"&&!E.role.id;He(D?"role_members_updated":M?"role_created":"role_updated",{role_slug:E.role.slug??null}),Le.success(n(D?"settings.orgRoleDetail.membersUpdatedSuccessfully":M?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),a.reset(o),l(o.role.id)},onError:o=>{Le.error(o instanceof Error?o.message:n("settings.orgRoleDetail.failedToSaveRole"))}}),_=a.handleSubmit(o=>{if(!o.role.label.trim()){Le.error(n("settings.orgRoleDetail.roleNameIsRequired")),a.setFocus("role.label");return}C.mutate(o)}),b=!u,N=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",j=[...u?[]:[{id:"mcp",label:n("settings.orgRoleDetail.mcpPermissions"),icon:Ts}],{id:"org",label:n("settings.orgRoleDetail.organizationPermissions"),icon:xs},{id:"models",label:n("settings.orgRoleDetail.models"),icon:Mt},{id:"projects",label:n("settings.orgRoleDetail.projects"),icon:ps},{id:"members",label:n("settings.orgRoleDetail.members"),icon:yt}],[A,O]=Y.useState(""),[P,p]=Y.useState(!1),S=o=>{g(o),O("")},v={mcp:n("settings.orgRoleDetail.searchMcpServers"),org:n("settings.orgRoleDetail.searchPermissions"),models:n("settings.orgRoleDetail.searchModels"),projects:n("settings.orgRoleDetail.searchProjects"),members:n("settings.orgRoleDetail.searchMembers")};return s.jsx(re,{children:s.jsxs(re.Content,{className:q("flex flex-col",T!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(re.Title,{actions:b&&s.jsxs(s.Fragment,{children:[s.jsx(ae,{variant:"outline",size:"sm",onClick:e,disabled:C.isPending,children:n("settings.orgRoleDetail.cancel")}),s.jsx(ae,{size:"sm",onClick:_,disabled:C.isPending||!h||!R,children:C.isPending?n("settings.orgRoleDetail.saving"):n(m?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",t.kind==="builtin"?mt(t.role,!0):es(a.watch("role.label")))}),u&&s.jsx(at,{size:16,className:"text-muted-foreground shrink-0"}),m||t.kind==="custom"?s.jsx("input",{...a.register("role.label"),placeholder:n("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:m}):s.jsx("span",{className:"truncate",children:N})]})}),s.jsx(s.Fragment,{children:s.jsx(wt.Toolbar.Left.Portal,{children:s.jsx(re.Tabs,{children:j.map(o=>s.jsx(re.Tab,{active:T===o.id,onClick:()=>S(o.id),children:o.label},o.id))})})}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(qe,{value:A,onChange:O,placeholder:v[T]??"Search...",className:"w-full md:w-[375px]"}),T==="members"&&s.jsx(dl,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>p(!0)})]})]})}),s.jsx("div",{className:q("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",T!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:q(T!=="org"&&"h-full overflow-hidden",T!=="models"&&T!=="projects"&&T!=="org"&&"border border-border rounded-xl bg-card"),children:[T==="mcp"&&!u&&s.jsx(Y.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{className:"size-6 text-muted-foreground"})}),children:s.jsx(el,{allowAllConnections:a.watch("allowAllConnections"),connectionExceptions:a.watch("connectionExceptions"),onAllowAllChange:o=>{a.setValue("allowAllConnections",o,{shouldDirty:!0}),a.setValue("connectionExceptions",[],{shouldDirty:!0})},onConnectionExceptionsChange:o=>a.setValue("connectionExceptions",o,{shouldDirty:!0}),readOnly:t.kind==="builtin",searchQuery:A,children:s.jsx(bs,{toolSet:a.watch("toolSet"),onToolSetChange:o=>a.setValue("toolSet",o,{shouldDirty:!0}),searchQuery:A})})}),T==="org"&&s.jsx(Ps,{allowAllStaticPermissions:a.watch("allowAllStaticPermissions"),staticPermissions:a.watch("staticPermissions"),onAllowAllChange:o=>a.setValue("allowAllStaticPermissions",o,{shouldDirty:!0}),onPermissionsChange:o=>a.setValue("staticPermissions",o,{shouldDirty:!0}),readOnly:u,searchQuery:A}),T==="models"&&s.jsx(Hs,{allowAllModels:a.watch("allowAllModels"),modelSet:a.watch("modelSet"),onAllowAllChange:o=>a.setValue("allowAllModels",o,{shouldDirty:!0}),onModelSetChange:o=>a.setValue("modelSet",o,{shouldDirty:!0}),readOnly:u,searchQuery:A}),T==="projects"&&s.jsx(Js,{allowAllProjects:a.watch("allowAllProjects"),projectSet:a.watch("projectSet"),projectExceptions:a.watch("projectExceptions"),onAllowAllChange:o=>a.setValue("allowAllProjects",o,{shouldDirty:!0}),onProjectSetChange:o=>a.setValue("projectSet",o,{shouldDirty:!0}),onProjectExceptionsChange:o=>a.setValue("projectExceptions",o,{shouldDirty:!0}),readOnly:u,searchQuery:A}),T==="members"&&s.jsx(ol,{memberIds:a.watch("memberIds"),onMemberIdsChange:o=>a.setValue("memberIds",o,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?n("settings.orgRoleDetail.userIsDefaultRoleMessage"):n("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:A,addMemberDialogOpen:P,onAddMemberDialogOpenChange:p})]})})]})})}function fl(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function gl(t){const e=J.c(6),{area:l,children:r}=t,{isPrivileged:i,loading:n,error:c}=Ut();let f;return e[0]!==l||e[1]!==r||e[2]!==c||e[3]!==i||e[4]!==n?(f=s.jsx(Es,{granted:i,loading:n,error:c,area:l,children:r}),e[0]=l,e[1]=r,e[2]=c,e[3]=i,e[4]=n,e[5]=f):f=e[5],f}const xl=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function hl(){const t=J.c(128),e=oe(),[l,r]=Y.useState(""),[i,n]=Y.useState(null),c=Vt();let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={strict:!1},t[0]=f):f=t[0];const{role:x}=ct(f),{locator:d}=Ue(),u=Ze(),m=it(),{customRoles:T,refetch:g}=Xt();let a;t[1]!==c?(a=w=>c({to:".",search:G=>({...G,role:w})}),t[1]=c,t[2]=a):a=t[2];const h=a;let R;e:{if(!x){R=null;break e}if(x==="new"){R={kind:"new"};break e}if(x.startsWith("builtin-")){R={kind:"builtin",role:x.slice(8)};break e}let w;t[3]!==x?(w=ee=>ee.id===x,t[3]=x,t[4]=w):w=t[4];const G=T.find(w);R=G?{kind:"custom",role:G}:null}const C=R;let _;t[5]!==d?(_=ue.members(d),t[5]=d,t[6]=_):_=t[6];let b;t[7]!==u?(b=()=>u.organization.listMembers(),t[7]=u,t[8]=b):b=t[8];let N;t[9]!==_||t[10]!==b?(N={queryKey:_,queryFn:b},t[9]=_,t[10]=b,t[11]=N):N=t[11];const{data:j}=Qe(N);let A;t[12]!==j?.data?.members?(A=j?.data?.members??[],t[12]=j?.data?.members,t[13]=A):A=t[13];const O=A;let P;t[14]!==O?(P=w=>O.filter(G=>G.role===w).length,t[14]=O,t[15]=P):P=t[15];const p=P;let S;if(t[16]!==T||t[17]!==p||t[18]!==l||t[19]!==e){let w;t[21]!==p||t[22]!==e?(w=de=>({kind:"builtin",role:{...de,memberCount:p(de.role),label:e(de.labelKey)}}),t[21]=p,t[22]=e,t[23]=w):w=t[23];const G=xl.map(w);let ee;t[24]!==p?(ee=de=>({kind:"custom",role:{...de,memberCount:p(de.role)}}),t[24]=p,t[25]=ee):ee=t[25];const bt=T.map(ee);if(S=[...G,...bt],l){const de=l.toLowerCase();S=S.filter(jt=>jt.role.label.toLowerCase().includes(de))}t[16]=T,t[17]=p,t[18]=l,t[19]=e,t[20]=S}else S=t[20];let v;t[26]!==u?(v=async w=>{const G=await u.organization.deleteRole({roleId:w});if(G?.error)throw new Error(G.error.message);return G?.data},t[26]=u,t[27]=v):v=t[27];const o=rt({mutationFn:v,onSuccess:(w,G)=>{He("role_deleted",{role_id:G}),m.invalidateQueries({queryKey:ue.members(d)}),m.invalidateQueries({queryKey:ue.organizationRoles(d)}),Le.success(e("settings.roles.deletedSuccessfully")),g(),C?.kind==="custom"&&C.role.id===G&&h(void 0)},onError:Al});let E;t[28]!==e?(E=e("settings.roles.columnRole"),t[28]=e,t[29]=E):E=t[29];let M;t[30]!==E?(M={id:"role",header:E,render:_l,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=E,t[31]=M):M=t[31];let D;t[32]!==e?(D=e("settings.roles.columnType"),t[32]=e,t[33]=D):D=t[33];let L;t[34]!==e?(L=w=>w.kind==="builtin"?s.jsx(Me,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(Me,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=L):L=t[35];let y;t[36]!==D||t[37]!==L?(y={id:"type",header:D,render:L,cellClassName:"w-28 shrink-0"},t[36]=D,t[37]=L,t[38]=y):y=t[38];let V;t[39]!==e?(V=e("settings.roles.columnPermissions"),t[39]=e,t[40]=V):V=t[40];let k;t[41]!==e?(k=w=>{if(w.kind==="builtin")return w.role.role==="owner"||w.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const G=w.role,ee=[];return G.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):G.staticPermissionCount&&G.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:G.staticPermissionCount})),G.allowsAllConnections?ee.push(e("settings.roles.allConnections")):G.connectionCount&&G.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:G.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=k):k=t[42];let z;t[43]!==V||t[44]!==k?(z={id:"permissions",header:V,render:k,cellClassName:"flex-1 min-w-0"},t[43]=V,t[44]=k,t[45]=z):z=t[45];let F;t[46]!==e?(F=e("settings.roles.columnMembers"),t[46]=e,t[47]=F):F=t[47];let B;t[48]!==F?(B={id:"members",header:F,render:El,cellClassName:"w-24 shrink-0"},t[48]=F,t[49]=B):B=t[49];let K;t[50]!==e?(K={id:"actions",header:"",render:w=>w.kind==="builtin"?null:s.jsxs(Ft,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:pl,children:s.jsx(ts,{size:16})})}),s.jsx(Yt,{align:"end",onClick:Tl,children:s.jsxs($t,{variant:"destructive",onClick:()=>{const G=w.role;G.id&&n({id:G.id,label:G.label})},children:[s.jsx(ss,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=K):K=t[51];let Q;t[52]!==M||t[53]!==y||t[54]!==z||t[55]!==B||t[56]!==K?(Q=[M,y,z,B,K],t[52]=M,t[53]=y,t[54]=z,t[55]=B,t[56]=K,t[57]=Q):Q=t[57];const W=Q;let te;t[58]!==h?(te=w=>{if(w.kind==="builtin")h(`builtin-${w.role.role}`);else{const G=w.role;h(G.id)}},t[58]=h,t[59]=te):te=t[59];const se=te;if(C){let w;t[60]!==h?(w=()=>h(void 0),t[60]=h,t[61]=w):w=t[61];let G;return t[62]!==g||t[63]!==h?(G=()=>{g(),h(void 0)},t[62]=g,t[63]=h,t[64]=G):G=t[64],s.jsx(ml,{target:C,onBack:w,onSaved:G},fl(C))}let $;t[65]!==e?($=e("settings.roles.searchPlaceholder"),t[65]=e,t[66]=$):$=t[66];let X;t[67]===Symbol.for("react.memo_cache_sentinel")?(X=w=>{w.key==="Escape"&&(r(""),w.target.blur())},t[67]=X):X=t[67];let I;t[68]!==l||t[69]!==$?(I=s.jsx(qe,{value:l,onChange:r,placeholder:$,className:"w-full md:w-[375px]",onKeyDown:X}),t[68]=l,t[69]=$,t[70]=I):I=t[70];let U;t[71]!==h?(U=()=>h("new"),t[71]=h,t[72]=U):U=t[72];let H;t[73]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ye,{size:16}),t[73]=H):H=t[73];let Z;t[74]!==e?(Z=e("settings.roles.createRole"),t[74]=e,t[75]=Z):Z=t[75];let ne;t[76]!==U||t[77]!==Z?(ne=s.jsx(re.Actions,{children:s.jsxs(ae,{size:"sm",onClick:U,children:[H,Z]})}),t[76]=U,t[77]=Z,t[78]=ne):ne=t[78];let ie;t[79]!==I||t[80]!==ne?(ie=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[I,ne]}),t[79]=I,t[80]=ne,t[81]=ie):ie=t[81];let ce;t[82]!==l||t[83]!==e?(ce=l?s.jsx(nt,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(nt,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[82]=l,t[83]=e,t[84]=ce):ce=t[84];let xe;t[85]!==S||t[86]!==W||t[87]!==se||t[88]!==ce?(xe=s.jsx(ls,{columns:W,data:S,isLoading:!1,onRowClick:se,emptyState:ce}),t[85]=S,t[86]=W,t[87]=se,t[88]=ce,t[89]=xe):xe=t[89];const Ke=i!==null;let we;t[90]===Symbol.for("react.memo_cache_sentinel")?(we=w=>!w&&n(null),t[90]=we):we=t[90];let he;t[91]!==e?(he=e("settings.roles.deleteRoleTitle"),t[91]=e,t[92]=he):he=t[92];let Te;t[93]!==he?(Te=s.jsx(gt,{children:he}),t[93]=he,t[94]=Te):Te=t[94];const Ve=i?.label??"";let pe;t[95]!==e||t[96]!==Ve?(pe=e("settings.roles.deleteRoleConfirm",{role:Ve}),t[95]=e,t[96]=Ve,t[97]=pe):pe=t[97];let Ee;t[98]!==pe?(Ee=s.jsx(xt,{children:pe}),t[98]=pe,t[99]=Ee):Ee=t[99];let _e;t[100]!==Te||t[101]!==Ee?(_e=s.jsxs(ht,{children:[Te,Ee]}),t[100]=Te,t[101]=Ee,t[102]=_e):_e=t[102];let Ae;t[103]!==e?(Ae=e("settings.roles.cancel"),t[103]=e,t[104]=Ae):Ae=t[104];let Se;t[105]!==Ae?(Se=s.jsx(Tt,{children:Ae}),t[105]=Ae,t[106]=Se):Se=t[106];let Ie;t[107]!==o||t[108]!==i?(Ie=()=>{i?.id&&o.mutate(i.id),n(null)},t[107]=o,t[108]=i,t[109]=Ie):Ie=t[109];let Re;t[110]!==e?(Re=e("settings.roles.delete"),t[110]=e,t[111]=Re):Re=t[111];let Ne;t[112]!==Ie||t[113]!==Re?(Ne=s.jsx(pt,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Re}),t[112]=Ie,t[113]=Re,t[114]=Ne):Ne=t[114];let Ce;t[115]!==Se||t[116]!==Ne?(Ce=s.jsxs(Et,{children:[Se,Ne]}),t[115]=Se,t[116]=Ne,t[117]=Ce):Ce=t[117];let Oe;t[118]!==_e||t[119]!==Ce?(Oe=s.jsxs(ft,{children:[_e,Ce]}),t[118]=_e,t[119]=Ce,t[120]=Oe):Oe=t[120];let be;t[121]!==Ke||t[122]!==Oe?(be=s.jsx(ut,{open:Ke,onOpenChange:we,children:Oe}),t[121]=Ke,t[122]=Oe,t[123]=be):be=t[123];let ke;return t[124]!==ie||t[125]!==xe||t[126]!==be?(ke=s.jsxs(dt,{group:"members",className:"gap-6",children:[ie,xe,be]}),t[124]=ie,t[125]=xe,t[126]=be,t[127]=ke):ke=t[127],ke}function Tl(t){return t.stopPropagation()}function pl(t){return t.stopPropagation()}function El(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function _l(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",mt(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(at,{size:12,className:"text-muted-foreground shrink-0"})]})}function Al(t,e){He("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),Le.error(t instanceof Error?t.message:"Failed to delete role")}function Sl(){const t=J.c(13),e=oe();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{role:r}=ct(l);let i;t[1]!==e?(i=e("settings.roles.failedToLoad"),t[1]=e,t[2]=i):i=t[2];let n;t[3]!==i?(n=s.jsx(re,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:i})})}),t[3]=i,t[4]=n):n=t[4];let c;t[5]!==r?(c=r?s.jsx(re,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{className:"size-8 text-muted-foreground"})})}):s.jsx(dt,{group:"members",className:"gap-6",children:s.jsx(Bt,{})}),t[5]=r,t[6]=c):c=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(hl,{}),t[7]=f):f=t[7];let x;t[8]!==c?(x=s.jsx(Y.Suspense,{fallback:c,children:f}),t[8]=c,t[9]=x):x=t[9];let d;return t[10]!==n||t[11]!==x?(d=s.jsx(Kt,{fallback:n,children:x}),t[10]=n,t[11]=x,t[12]=d):d=t[12],d}function yo(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(gl,{area:"roles",children:s.jsx(Sl,{})}),t[0]=e):e=t[0],e}export{yo as default};
|