decocms 4.24.1 → 4.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-pLuWab2O.js → AlertCircle-Bg-T_OLN.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-5qca7K3c.js → ArrowUpRight-BDCQ4Eu0.js} +1 -1
- package/dist/client/assets/{Check-BmisW-gO.js → Check-DScGPgJ3.js} +1 -1
- package/dist/client/assets/{CheckCircle-CtwfeJGG.js → CheckCircle-B2lAjwtZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-DScAH69v.js → ChevronDown-BlcivPHY.js} +1 -1
- package/dist/client/assets/{ChevronRight-R_IgGJ90.js → ChevronRight-B75PqmYX.js} +1 -1
- package/dist/client/assets/{ChevronUp-DbQrNNT7.js → ChevronUp-BhDTTb3S.js} +1 -1
- package/dist/client/assets/{Circle-Dou1PsAM.js → Circle-Bex6Tk-l.js} +1 -1
- package/dist/client/assets/{Copy01-Cdi4qY0f.js → Copy01-BDuCjG41.js} +1 -1
- package/dist/client/assets/{DotsVertical-D7yw7BOZ.js → DotsVertical-DoBweSC-.js} +1 -1
- package/dist/client/assets/{Eye-DSPSvd-z.js → Eye-D-YpM90d.js} +1 -1
- package/dist/client/assets/{FilterLines-CIre0FvL.js → FilterLines-CE6mNtFl.js} +1 -1
- package/dist/client/assets/{Globe01-BwEqc3Zi.js → Globe01-DZORk1uT.js} +1 -1
- package/dist/client/assets/{Globe04-Ckr1BrL4.js → Globe04-DN-CO9HI.js} +1 -1
- package/dist/client/assets/{HardDrive-BHqIvPTj.js → HardDrive-Tdt-EKFs.js} +1 -1
- package/dist/client/assets/{Key01-lDuHTtYR.js → Key01-RL91nuMn.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BCd4DxZL.js → LayoutLeft-CMLuVn59.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bws57Ghu.js → LinkExternal01-D2_coX1W.js} +1 -1
- package/dist/client/assets/{List-CRp9-m0D.js → List-BN5buwNd.js} +1 -1
- package/dist/client/assets/{Loading02-BQZyOed_.js → Loading02-BQnLooGj.js} +1 -1
- package/dist/client/assets/{Monitor01-CQZr2DXo.js → Monitor01-CmLRaj8m.js} +1 -1
- package/dist/client/assets/{Palette-CjYrZKAr.js → Palette-BvI4deLd.js} +1 -1
- package/dist/client/assets/{Play-CcyHvjQE.js → Play-CSTol7-S.js} +1 -1
- package/dist/client/assets/{Plus-B8hmYxTd.js → Plus-DNKnv5L0.js} +1 -1
- package/dist/client/assets/{SearchLg-QTo8IwQN.js → SearchLg-DgYYZyay.js} +1 -1
- package/dist/client/assets/{SearchMd-DR4ENkEZ.js → SearchMd-BKZUT64K.js} +1 -1
- package/dist/client/assets/{Settings02-DUJ4pdEY.js → Settings02-CNKmZ2g3.js} +1 -1
- package/dist/client/assets/{Shield01-DN8y9VWe.js → Shield01-HcOG3PQt.js} +1 -1
- package/dist/client/assets/{Star01-DP4fzeT_.js → Star01-Dy6idwaU.js} +1 -1
- package/dist/client/assets/{Stars01-AnTTTVLS.js → Stars01-D6aSfSxI.js} +1 -1
- package/dist/client/assets/{Stars02-B67gg490.js → Stars02-D36lf4BX.js} +1 -1
- package/dist/client/assets/{Sun-FzgPMit2.js → Sun-BqJ-2Ajb.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CuYgULrj.js → SwitchHorizontal01-CV6WSeMy.js} +1 -1
- package/dist/client/assets/{Tool01-DItmnBS_.js → Tool01-CLlWa07u.js} +1 -1
- package/dist/client/assets/{Trash01-D6ySBQyD.js → Trash01-D5xSRQNP.js} +1 -1
- package/dist/client/assets/{Upload01-z0eaJfaS.js → Upload01-ylEW-8Jh.js} +1 -1
- package/dist/client/assets/{User01-Bbvktcee.js → User01-eFJp31Bw.js} +1 -1
- package/dist/client/assets/{Users01-kzeWrMKW.js → Users01-By5EbxoM.js} +1 -1
- package/dist/client/assets/{Users03-DW4HTBw0.js → Users03-DPjQM6KP.js} +1 -1
- package/dist/client/assets/{X-CmY2dI4A.js → X-DOqFVerl.js} +1 -1
- package/dist/client/assets/{XCircle-0va8xABq.js → XCircle-CW0nHt-x.js} +1 -1
- package/dist/client/assets/{XClose-CytiRqor.js → XClose-C_DB8bTF.js} +1 -1
- package/dist/client/assets/{Zap-DlYvu5VF.js → Zap-DDWdY0py.js} +1 -1
- package/dist/client/assets/{ZapSquare-3vdDCs3a.js → ZapSquare-DholK8Pl.js} +1 -1
- package/dist/client/assets/{ZoomOut-GeKL8STS.js → ZoomOut-DR7cyN4K.js} +1 -1
- package/dist/client/assets/{access-gate-BmcYHR0A.js → access-gate-DmeStbGZ.js} +1 -1
- package/dist/client/assets/{add-section-modal-BMg96VFk.js → add-section-modal-CzoEd-6j.js} +1 -1
- package/dist/client/assets/{agent-capabilities-C2v-ntJ9.js → agent-capabilities-CgpHy7NE.js} +1 -1
- package/dist/client/assets/{agent-icon-u8Dhjems.js → agent-icon-1qHGI4u0.js} +1 -1
- package/dist/client/assets/agents-list-C6nvWndN.js +1 -0
- package/dist/client/assets/{ai-providers-NWXNM-mp.js → ai-providers-CQwx-fOy.js} +1 -1
- package/dist/client/assets/{alert-BzP_P6Yw.js → alert-C3AKaG6f.js} +1 -1
- package/dist/client/assets/{alert-dialog-Da7c7cgA.js → alert-dialog--OYtNHex.js} +1 -1
- package/dist/client/assets/{app-editor-Y4YyIjtr.js → app-editor-BlttbjAQ.js} +1 -1
- package/dist/client/assets/{auth-C_dVdYxA.js → auth-YOcBaLbg.js} +1 -1
- package/dist/client/assets/{auth-catchall-CGc8uaiH.js → auth-catchall-I-lqSkLv.js} +1 -1
- package/dist/client/assets/{auth-entry-Dd8YUufe.js → auth-entry-DA7hspcP.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CmYuDNzb.js → auth-split-layout-C3d_6oUL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-g441PY51.js → authenticate-and-persist-oauth-CSTOvrHS.js} +1 -1
- package/dist/client/assets/{automation-list-row-BQqkblTJ.js → automation-list-row-BsohOpfn.js} +1 -1
- package/dist/client/assets/{automation-runs-BOOU5NV5.js → automation-runs-CesFHuyn.js} +1 -1
- package/dist/client/assets/{automations-CC1UjFFq.js → automations-BBpkLXa9.js} +1 -1
- package/dist/client/assets/{avatar-D4oK7QP_.js → avatar-BdvK8T2V.js} +1 -1
- package/dist/client/assets/{badge-CTk0aBEM.js → badge-obc97XjK.js} +1 -1
- package/dist/client/assets/{block-document-D4DyUGYi.js → block-document-B3-MYq1G.js} +1 -1
- package/dist/client/assets/{brand-context-PIWbC8M_.js → brand-context-ibnvkR-s.js} +1 -1
- package/dist/client/assets/{breadcrumb-Ci3MX-hV.js → breadcrumb-D_N-Ndgj.js} +1 -1
- package/dist/client/assets/{buckets-BEeAFA9v.js → buckets-C9Y5hRx7.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-dAffh-rA.js → bulk-category-panel-BuwTR720.js} +1 -1
- package/dist/client/assets/{capability-load-error-BiC9g50e.js → capability-load-error-BOdjPSUF.js} +1 -1
- package/dist/client/assets/{card-CWIf1ZTH.js → card-D_O1L9qK.js} +1 -1
- package/dist/client/assets/{category-editor-ypOUXzaR.js → category-editor-DL4VbSeb.js} +1 -1
- package/dist/client/assets/{chat-context-CmaqOUYY.js → chat-context-Dn84a9Wk.js} +1 -1
- package/dist/client/assets/{checkbox-55B4aWK1.js → checkbox-DZI6S5IS.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DV1qELnW.js → cli-auth-success-BL5ivPs4.js} +1 -1
- package/dist/client/assets/{collection-detail-CqGGRfb6.js → collection-detail-Dn_l12z3.js} +1 -1
- package/dist/client/assets/{collection-display-button-DG8ZmqAt.js → collection-display-button-DH7NPVV6.js} +1 -1
- package/dist/client/assets/{collection-search-BGKxt_N-.js → collection-search-gcIk94Vj.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BeC4WKAG.js → collection-table-wrapper-dEij9z_p.js} +1 -1
- package/dist/client/assets/{collection-tabs-BbQxcrcS.js → collection-tabs-DibJgG_W.js} +1 -1
- package/dist/client/assets/{command-BqCpKNr4.js → command-CjZ9Ucx_.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CpL8T6nA.js → commerce-onboarding-B7pB3YyF.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-cZGy4-Ua.js → connect-desktop-dialog-DsEEYlHZ.js} +1 -1
- package/dist/client/assets/{connection-card-D9Bsn_oc.js → connection-card-FltAdnHS.js} +1 -1
- package/dist/client/assets/{connection-detail-CX1SpjmH.js → connection-detail-BkQXIiDC.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cy7HaFyD.js → connection-form-helpers-DBOBYuRj.js} +1 -1
- package/dist/client/assets/{connections-DNwgAdLm.js → connections-DQQ4kVSN.js} +1 -1
- package/dist/client/assets/{constants-C8_Swa4x.js → constants-nH3qQ_1f.js} +1 -1
- package/dist/client/assets/{decopilot-BW_Qp9RR.js → decopilot-CcEEBRJd.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CyMXjbIG.js → decopilot-sse-pool-C9F3rPry.js} +1 -1
- package/dist/client/assets/{dialog-C17LEi_J.js → dialog-_hE_KOWl.js} +1 -1
- package/dist/client/assets/{domain-settings-DcSY9nzQ.js → domain-settings-3ktGORQn.js} +1 -1
- package/dist/client/assets/{drawer-CDkyDWDz.js → drawer-DAq9o-sw.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CDYo85Ch.js → dropdown-menu-DAL2YRm5.js} +1 -1
- package/dist/client/assets/{empty-state-rZEB9QIX.js → empty-state-6wopnpZe.js} +1 -1
- package/dist/client/assets/{extract-connection-data-AIs6sFAy.js → extract-connection-data-D0AUv_jV.js} +1 -1
- package/dist/client/assets/{file-explorer-0Irk0gP9.js → file-explorer-BzSW5xXP.js} +1 -1
- package/dist/client/assets/{file-type-icon-Cto1R_1_.js → file-type-icon-BcWEcM5c.js} +1 -1
- package/dist/client/assets/{files-UEw_ge9M.js → files-4CYUZN9B.js} +1 -1
- package/dist/client/assets/{form-CyQmMYiz.js → form-CMnyDC3P.js} +1 -1
- package/dist/client/assets/{general-D5sGbZlY.js → general-LaV7k-NI.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CbF-Vwgv.js → github-repo-picker-B6ZRsSkB.js} +1 -1
- package/dist/client/assets/{hooks-BY04f5oV.js → hooks-Bx3vrqDY.js} +1 -1
- package/dist/client/assets/{index-hgRWhkZO.js → index-5igL_8iv.js} +5 -5
- package/dist/client/assets/{index-CVreeNNf.js → index-BA6MEFz3.js} +3 -3
- package/dist/client/assets/{index-BKnTCS6u.js → index-BcnvkIGi.js} +1 -1
- package/dist/client/assets/{index-CsOpOO0V.js → index-Bn1c6CVP.js} +1 -1
- package/dist/client/assets/{index-BM0Ym8un.js → index-C6MDz79y.js} +1 -1
- package/dist/client/assets/{index-9LHoYH8C.js → index-CVXqxmme.js} +1 -1
- package/dist/client/assets/{index-jIjNWMXZ.js → index-DSvksGoo.js} +1 -1
- package/dist/client/assets/{index-8jHxLh_t.js → index-DY2HOngM.js} +1 -1
- package/dist/client/assets/{index-Dc3rKDFj.js → index-Dp3EiNZg.js} +1 -1
- package/dist/client/assets/index-H9tHoriD.js +1 -0
- package/dist/client/assets/{index-CMSBFE9x.js → index-P21g_sy1.js} +1 -1
- package/dist/client/assets/{index-BoA06la5.js → index-YlpQ9bxj.js} +1 -1
- package/dist/client/assets/{index-CHq6jp_n.js → index-pDtrxmOm.js} +1 -1
- package/dist/client/assets/{index-redirect-ByfQhzZ5.js → index-redirect-DVEgiR_I.js} +1 -1
- package/dist/client/assets/{index-AN1WZtpr.js → index-zKDNrbN6.js} +1 -1
- package/dist/client/assets/{input-hcZc7h3D.js → input-CYJ6kUlp.js} +1 -1
- package/dist/client/assets/{integration-icon-BC9MaYhQ.js → integration-icon-C-BoAO8Z.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C4_4LgbV.js → invite-member-dialog-bWjKe7MO.js} +1 -1
- package/dist/client/assets/{label-CpclvonI.js → label-BKpc1aJl.js} +1 -1
- package/dist/client/assets/{library-tab-BkEv5Y9A.js → library-tab-6tiJHzh8.js} +1 -1
- package/dist/client/assets/{login-DcJnKBaR.js → login-D6CVF-6e.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CfQhic2C.js → mcp-oauth-DHaYel4V.js} +1 -1
- package/dist/client/assets/{members-N0mEAV1H.js → members-C7SciHuq.js} +1 -1
- package/dist/client/assets/{monaco-editor-BgOaSxTf.js → monaco-editor-C9nigrNX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-vLLfJuxf.js → monitoring-stats-row-5Rz6Z0N9.js} +1 -1
- package/dist/client/assets/{oauth-callback-B5UmIJXD.js → oauth-callback-XeluVtwX.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-8SkwfrjI.js → oauth-callback-ai-provider-BC0tElNL.js} +1 -1
- package/dist/client/assets/{onboarding-CTX74sEQ.js → onboarding-4h2vsT7z.js} +1 -1
- package/dist/client/assets/{org-install-BYjR4YVZ.js → org-install-BfD-dfX5.js} +1 -1
- package/dist/client/assets/{org-layout-CzIIh2X8.js → org-layout-Y4X-Hogj.js} +1 -1
- package/dist/client/assets/{organization-choice-BjZknF-1.js → organization-choice-CvzOfKfh.js} +1 -1
- package/dist/client/assets/{page-seo-form-DyrhUftF.js → page-seo-form-tZdaMlv5.js} +1 -1
- package/dist/client/assets/page-seo-sheet-bpzoDic7.js +1 -0
- package/dist/client/assets/{popover-CrQP6J1V.js → popover-DDOWAzXR.js} +1 -1
- package/dist/client/assets/{post-editor-Cnv36RrY.js → post-editor-HILmaybN.js} +1 -1
- package/dist/client/assets/{primitives-CehCCNQ0.js → primitives-BGo4Nc8s.js} +1 -1
- package/dist/client/assets/{profile-DTRERHK7.js → profile-CTaEEz8R.js} +1 -1
- package/dist/client/assets/project-app-view-DnEIVOV7.js +1 -0
- package/dist/client/assets/record-editor-D0Ria2nh.js +1 -0
- package/dist/client/assets/registry-BMPriEz7.js +2 -0
- package/dist/client/assets/{registry-layout-BtsOJvRw.js → registry-layout-D5K6mQ7o.js} +1 -1
- package/dist/client/assets/{require-capability-DyWKAaq0.js → require-capability-BC8fAJq_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B7xpW-ZL.js → required-auth-layout-C5ZYZgq_.js} +1 -1
- package/dist/client/assets/{reset-password-B5lBZvCf.js → reset-password-DCwmhhU_.js} +1 -1
- package/dist/client/assets/{roles-BJoHqkv_.js → roles-BIYddJP9.js} +1 -1
- package/dist/client/assets/{scroll-area-BZwvo6ZV.js → scroll-area-DHt-bj_k.js} +1 -1
- package/dist/client/assets/{search-input-CvfDFiWW.js → search-input-Br7AaSOM.js} +1 -1
- package/dist/client/assets/{secrets-BSMR5hlC.js → secrets-DpG5Iq68.js} +1 -1
- package/dist/client/assets/{sections-editor-BtFXoD2E.js → sections-editor-i8RGAas2.js} +1 -1
- package/dist/client/assets/{select-w9uizPnB.js → select-CGKgH8xh.js} +1 -1
- package/dist/client/assets/{select-model-DXutO6mM.js → select-model-B4VD6-Oq.js} +1 -1
- package/dist/client/assets/{seo-editor-BplTYJOG.js → seo-editor-BlF0fquY.js} +1 -1
- package/dist/client/assets/{settings-layout-CsXE80-1.js → settings-layout-BkQRWcPu.js} +1 -1
- package/dist/client/assets/{settings-section-Drdvt74p.js → settings-section-DbbUxlae.js} +1 -1
- package/dist/client/assets/{sheet-CzE0lqCT.js → sheet-D2_BBqQh.js} +1 -1
- package/dist/client/assets/{shell-controls-DjoWsXZc.js → shell-controls-Bvo69nGf.js} +1 -1
- package/dist/client/assets/{shell-layout-CYEP4NSP.js → shell-layout-DV4gOWjc.js} +1 -1
- package/dist/client/assets/{sidebar-T4hY424R.js → sidebar-CvSvbjFB.js} +1 -1
- package/dist/client/assets/{skeleton-DLI5J-FI.js → skeleton-BVVuuVur.js} +1 -1
- package/dist/client/assets/{sso-DJ-dx2oz.js → sso-DVdH63JW.js} +1 -1
- package/dist/client/assets/{store-DI69gyZ1.js → store-Br8DfpxG.js} +1 -1
- package/dist/client/assets/store-registry-B7QplIa8.js +2 -0
- package/dist/client/assets/{studio-tools-BOvy4_zw.js → studio-tools-DMyIla9h.js} +1 -1
- package/dist/client/assets/{switch-d9FVpI-I.js → switch-BZi8v6lt.js} +1 -1
- package/dist/client/assets/{table-39SJnwJD.js → table-Dt1EkBZ8.js} +1 -1
- package/dist/client/assets/{tabs-P4C7XOb6.js → tabs-Bgt7xRk9.js} +1 -1
- package/dist/client/assets/{task-row-agrsNosz.js → task-row-GRX-YwuR.js} +1 -1
- package/dist/client/assets/{task-status-BOhK440B.js → task-status-YyGjGPCF.js} +1 -1
- package/dist/client/assets/{textarea-D_hHTNRc.js → textarea-DsHCObgc.js} +1 -1
- package/dist/client/assets/{toggle-group-D9qgeAei.js → toggle-group-BHStouzw.js} +1 -1
- package/dist/client/assets/{toolbar-D8RAkN2H.js → toolbar-B-vgyiTk.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bz1Z7ms8.js → toolbar-icon-button-8ppl0cyk.js} +1 -1
- package/dist/client/assets/{tools-list-BuxcpiJJ.js → tools-list-l9Pd83_j.js} +1 -1
- package/dist/client/assets/{tooltip-D2fONB1l.js → tooltip-CmXkfLQY.js} +1 -1
- package/dist/client/assets/{types-5NV2ded-.js → types-CZ2ZHuSk.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dqngh9k8.js → use-ai-providers-9RivglGR.js} +1 -1
- package/dist/client/assets/{use-automations-bh6ent83.js → use-automations-CFdWN1HW.js} +1 -1
- package/dist/client/assets/{use-capability-CHflJImd.js → use-capability-_bDQAs6n.js} +1 -1
- package/dist/client/assets/{use-clock-tick-B2PF4L99.js → use-clock-tick-7j3is_Bn.js} +1 -1
- package/dist/client/assets/{use-collections-BcZ0NzQS.js → use-collections-D0wABkA_.js} +1 -1
- package/dist/client/assets/{use-connection-DrKbMdFe.js → use-connection-rm05cvFc.js} +1 -1
- package/dist/client/assets/{use-copy-DtLITrmc.js → use-copy-CEKLSzZe.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BSdujGVw.js → use-create-virtual-mcp-hklFtQok.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-FRkauARB.js → use-debounced-autosave-D0EiCASP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D5uOdNo-.js → use-debounced-value-hqGQaL9P.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-yco5iy5n.js → use-decopilot-events-D6VFPKC1.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C8Oy9PPj.js → use-delete-connection-Cfcc4IvD.js} +1 -1
- package/dist/client/assets/{use-file-configs-BIVuClLU.js → use-file-configs-DvvnxWyE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BTBf2Vbg.js → use-infinite-scroll-BT0V9of9.js} +1 -1
- package/dist/client/assets/{use-join-requests-B5qpdQjQ.js → use-join-requests-D-5zxVXQ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BRhV6FVw.js → use-mcp-client-jbumQU5J.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CQq8DZyF.js → use-mcp-prompts-RoPisiTW.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BqeqG-XW.js → use-mcp-tools-BiJT8a_k.js} +1 -1
- package/dist/client/assets/{use-members-DtyR5Xlb.js → use-members-DVhkUNvZ.js} +1 -1
- package/dist/client/assets/{use-mobile-7TG0ePDd.js → use-mobile-CMHXuZqn.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DmmChLl6.js → use-navigate-to-agent-C5ARHsAd.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CZ7VOykS.js → use-org-auth-client-V7TwZ7Dz.js} +1 -1
- package/dist/client/assets/{use-org-sso-BUVU8viD.js → use-org-sso-3oYRaX70.js} +1 -1
- package/dist/client/assets/{use-organization-roles-XIhSarAG.js → use-organization-roles-l__ZRrfO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CNaXayFz.js → use-organization-settings--FKjm86v.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C9RKRQJj.js → use-registry-connections-CXFKVClM.js} +1 -1
- package/dist/client/assets/{use-secrets-Ce2hdeUj.js → use-secrets-B7XOc1VI.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B8x3y24j.js → use-status-sounds-zlt4yJWM.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bi7gdixW.js → use-view-mode-BZ0rohuO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-W2F2Mxfp.js → use-virtual-mcp--pKcuAiF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BTWVwIrP.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CLTDeaAk.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-BJolvyTh.js → useSuspenseQueries-FR05IT-y.js} +1 -1
- package/dist/client/assets/{variant-calendar-CUei3oso.js → variant-calendar-BbKrpLyE.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D7PklEII.js → view-mode-toggle-CYmr31_p.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +3 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-Re_BDsv8.js +0 -1
- package/dist/client/assets/index-CP6SzgI6.js +0 -1
- package/dist/client/assets/page-seo-sheet-C8PanPoI.js +0 -1
- package/dist/client/assets/project-app-view-BKMK7m5v.js +0 -1
- package/dist/client/assets/record-editor-Tm9FgKJg.js +0 -1
- package/dist/client/assets/registry-D3IW22xx.js +0 -2
- package/dist/client/assets/store-registry-BqJNzejR.js +0 -2
- package/dist/client/assets/useInfiniteQuery-RUN_DRM3.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CWzBiY9D.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,j as s,C as We,r as O,D as ee,b as ne,l as B,v as ue,F as zs,G as Ts,a as be,H as Ms,I as Os,t as se,J as Ds,M as Ps,m as Lt,u as Ke,P as vt,B as ze,y as Es,R as Rs,K as Fs,k as Ls,i as Bt,e as ct,E as Ht,o as Bs,s as Hs,n as Us,p as Gs,d as qs,x as Ws,T as Ut,O as Ks,U as Vs}from"./index-BA6MEFz3.js";import{u as ve,S as dt,a as mt,b as fe,c as J,d as K,e as ut,f as Gt,g as Xs,h as Qs,i as st,j as Ys,k as Js,l as Zs}from"./sidebar-CvSvbjFB.js";import{u as ft}from"./use-mobile-CMHXuZqn.js";import{n as en}from"./Loading02-BQnLooGj.js";import{u as tn}from"./use-organization-settings--FKjm86v.js";import{S as oe}from"./skeleton-BVVuuVur.js";import{i as qt}from"./LayoutLeft-CMLuVn59.js";import{T as ae}from"./toolbar-icon-button-8ppl0cyk.js";import{P as De,a as je,b as Pe}from"./popover-DDOWAzXR.js";import{D as Wt,a as Kt,b as Vt}from"./drawer-DAq9o-sw.js";import{A as Oe}from"./avatar-BdvK8T2V.js";import{a as he,b as xe,c as nt,T as pe}from"./tooltip-CmXkfLQY.js";import{a as yt}from"./Copy01-BDuCjG41.js";import{n as sn,i as nn}from"./Globe01-DZORk1uT.js";import{i as ln}from"./ZoomOut-DR7cyN4K.js";import{i as rn,a as on}from"./ZapSquare-DholK8Pl.js";import{i as Xt}from"./Monitor01-CmLRaj8m.js";import{n as an,a as cn}from"./Sun-BqJ-2Ajb.js";import{a as Ve,b as dn}from"./Settings02-CNKmZ2g3.js";import{i as mn}from"./Shield01-HcOG3PQt.js";import{a as un}from"./Users03-DPjQM6KP.js";import{a as St,b as Nt,c as Qt,d as fn,A as Te,e as _t,i as hn,s as xn,f as pn}from"./agent-icon-1qHGI4u0.js";import"./index-pDtrxmOm.js";import{n as Xe}from"./Stars02-D36lf4BX.js";import{D as gn,a as bn,b as jn,c as wt,d as vn}from"./dropdown-menu-DAL2YRm5.js";import{i as Ee}from"./Check-DScGPgJ3.js";import{s as $e}from"./Plus-DNKnv5L0.js";import{u as yn}from"./use-connection-rm05cvFc.js";import{u as Yt}from"./use-mcp-client-jbumQU5J.js";import{u as ht,a as xt}from"./use-virtual-mcp--pKcuAiF.js";import{i as Jt,S as Zt,a as Ge,b as Sn}from"./constants-nH3qQ_1f.js";import{G as Nn,g as lt,i as _n,a as rt}from"./github-repo-picker-B6ZRsSkB.js";import{u as wn,S as es,a as Cn,g as kn,b as In,c as An}from"./use-navigate-to-agent-C5ARHsAd.js";import{I as $n}from"./invite-member-dialog-bWjKe7MO.js";import{u as ts,A as zn,g as Tn}from"./agent-capabilities-CgpHy7NE.js";import{u as Mn,v as On,C as Dn}from"./connect-desktop-dialog-DsEEYlHZ.js";import{s as ss}from"./XClose-C_DB8bTF.js";import{u as Pn,a as En}from"./use-join-requests-D-5zxVXQ.js";import{i as ns}from"./ChevronRight-B75PqmYX.js";import{u as Rn,R as Fn,a as Ln,b as pt,r as Bn}from"./shell-layout-DV4gOWjc.js";import{i as Hn}from"./FilterLines-CE6mNtFl.js";import{T as Un,a as Gn}from"./toggle-group-BHStouzw.js";import{u as qn,a as gt,b as ls,T as Wn}from"./hooks-Bx3vrqDY.js";import{c as Kn,a as Vn,b as Xn,d as Qn,e as Yn}from"./dialog-_hE_KOWl.js";import{C as Jn,a as Zn,b as el,c as tl,d as sl}from"./command-CjZ9Ucx_.js";import{u as rs}from"./studio-tools-DMyIla9h.js";import{i as nl}from"./Zap-DDWdY0py.js";import{S as is,M as ll}from"./shell-controls-Bvo69nGf.js";import{T as os}from"./task-row-GRX-YwuR.js";import{t as bt}from"./ChevronDown-BlcivPHY.js";import{S as rl}from"./task-status-YyGjGPCF.js";import{S as il,C as ol}from"./chat-context-Dn84a9Wk.js";import{B as Ct,a as al,b as cl}from"./breadcrumb-D_N-Ndgj.js";import{T as Z}from"./toolbar-B-vgyiTk.js";import{i as as}from"./SearchMd-BKZUT64K.js";import{A as dl,a as ml,b as ul,c as fl,d as hl,e as xl,f as pl}from"./alert-dialog--OYtNHex.js";import{F as gl,a as bl,b as jl,c as vl,d as yl,f as Sl,e as Nl}from"./form-CMnyDC3P.js";import{I as _l}from"./input-CYJ6kUlp.js";import"./sheet-D2_BBqQh.js";import"./X-DOqFVerl.js";import"./User01-eFJp31Bw.js";import"./AlertCircle-Bg-T_OLN.js";import"./Tool01-CLlWa07u.js";import"./SwitchHorizontal01-CV6WSeMy.js";import"./XCircle-CW0nHt-x.js";import"./ArrowUpRight-BDCQ4Eu0.js";import"./CheckCircle-B2lAjwtZ.js";import"./ChevronUp-BhDTTb3S.js";import"./Circle-Bex6Tk-l.js";import"./DotsVertical-DoBweSC-.js";import"./Eye-D-YpM90d.js";import"./Star01-Dy6idwaU.js";import"./Globe04-DN-CO9HI.js";import"./HardDrive-Tdt-EKFs.js";import"./Key01-RL91nuMn.js";import"./LinkExternal01-D2_coX1W.js";import"./List-BN5buwNd.js";import"./Palette-BvI4deLd.js";import"./Play-CSTol7-S.js";import"./SearchLg-DgYYZyay.js";import"./Stars01-D6aSfSxI.js";import"./Trash01-D5xSRQNP.js";import"./Upload01-ylEW-8Jh.js";import"./Users01-By5EbxoM.js";import"./use-collections-D0wABkA_.js";import"./auth-YOcBaLbg.js";import"./checkbox-DZI6S5IS.js";import"./collection-search-gcIk94Vj.js";import"./use-debounced-value-hqGQaL9P.js";import"./authenticate-and-persist-oauth-CSTOvrHS.js";import"./mcp-oauth-DHaYel4V.js";import"./use-mcp-tools-BiJT8a_k.js";import"./extract-connection-data-D0AUv_jV.js";import"./github-installations-DzN1UQ4x.js";import"./select-CGKgH8xh.js";import"./textarea-DsHCObgc.js";import"./use-org-auth-client-V7TwZ7Dz.js";import"./use-organization-roles-l__ZRrfO.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-FltAdnHS.js";import"./use-registry-connections-CXFKVClM.js";import"./useInfiniteQuery-BTWVwIrP.js";import"./use-infinite-scroll-BT0V9of9.js";import"./card-D_O1L9qK.js";import"./integration-icon-C-BoAO8Z.js";import"./collection-tabs-DibJgG_W.js";import"./badge-obc97XjK.js";import"./connection-form-helpers-DBOBYuRj.js";import"./useSuspenseInfiniteQuery-CLTDeaAk.js";import"./use-ai-providers-9RivglGR.js";import"./use-capability-_bDQAs6n.js";import"./required-auth-layout-C5ZYZgq_.js";import"./tab-id-CLpu897Q.js";import"./use-org-sso-3oYRaX70.js";import"./decopilot-sse-pool-C9F3rPry.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./index-CVXqxmme.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-clock-tick-7j3is_Bn.js";import"./use-decopilot-events-D6VFPKC1.js";import"./label-BKpc1aJl.js";function wl(t){const e=C.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:r,isMobile:i}=ve();if(i||r==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[0]=o,e[1]=a):(o=e[0],a=e[1]);let d;return e[2]!==l||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=d):d=e[4],d}const jt=240,Cl=400,kl="sidebar.width";function Me(t){return Math.max(jt,Math.min(Cl,t))}function Il(){const t=C.c(11),[e,n]=We(kl,Al),l=O.useRef(null);let r;t[0]!==n||t[1]!==e?(r=m=>{m.preventDefault();const u=m.clientX,f=Me(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const h=b=>{const j=Me(f+(b.clientX-u));x?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=Me(f+(b.clientX-u));n(j);for(const v of p)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=r):r=t[2];const i=r;let o;t[3]!==n?(o=()=>{n(jt)},t[3]=n,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Me(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Al(t){return typeof t=="number"?Me(t):jt}function cs(){const t=C.c(8),{org:e}=ee(),n=ne(),l=tn();let r;if(t[0]!==n||t[1]!==e||t[2]!==l){if(r=[],l){let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(en,{className:"size-4!"}),t[4]=i):i=t[4];let o;t[5]!==n||t[6]!==e?(o={type:"items",items:[{key:"board",label:"Board",icon:i,onClick:()=>n({to:"/$org/board",params:{org:e.slug}})}]},t[5]=n,t[6]=e,t[7]=o):o=t[7],r.push(o)}t[0]=n,t[1]=e,t[2]=l,t[3]=r}else r=t[3];return r}function ds(t){const e=C.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let r;return e[1]!==n?(r=s.jsxs(dt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(mt,{children:s.jsx(fe,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=r):r=e[2],r}function ms(t){const e=C.c(18),{item:n}=t,{isMobile:l,setOpenMobile:r}=ve();let i;e[0]!==l||e[1]!==n||e[2]!==r?(i=()=>{ue("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&r(!1)},e[0]=l,e[1]=n,e[2]=r,e[3]=i):i=e[3];const o=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=B(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(J,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(K,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function $l(t){const e=C.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ut,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,r=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(Tl),e[2]=n.group.items,e[3]=i):i=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(o=s.jsx(ds,{label:l,defaultExpanded:r,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(zl),e[8]=n.items,e[9]=l):l=e[9];let r;return e[10]!==l?(r=s.jsx(dt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(mt,{children:s.jsx(fe,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=r):r=e[11],r}case"custom":return n.content}}function zl(t){return s.jsx(ms,{item:t},t.key)}function Tl(t){return s.jsx(ms,{item:t},t.key)}function Ml(t){const e=C.c(14),{sections:n,footer:l,additionalContent:r,variant:i,contentClassName:o}=t,a=i===void 0?"sidebar":i;let d;e[0]!==o?(d=B("flex flex-col flex-1 px-2 py-2 gap-0.5",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(Ol),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==r?(m=r&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:r}),e[4]=r,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Gt,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Xs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ol(t,e){return s.jsx($l,{section:t},e)}function us(t){const e=C.c(2);let n;return e[0]!==t?(n=s.jsx(Ml,{...t}),e[0]=t,e[1]=n):n=e[1],n}us.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(oe,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Dl(t){const e=C.c(16),{onToggle:n,className:l}=t,i=zs().logo??Ts,o=typeof i=="string"?i:i.light,a=typeof i=="string"?i:i.dark;let d;e[0]!==l?(d=B("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let m;e[4]!==a?(m=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(qt,{size:16}),e[9]=f):f=e[9];let x;e[10]!==n?(x=s.jsx(ae,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=x):x=e[11];let p;return e[12]!==d||e[13]!==u||e[14]!==x?(p=s.jsxs(Qs,{className:d,children:[u,x]}),e[12]=d,e[13]=u,e[14]=x,e[15]=p):p=e[15],p}function kt(t){const e=C.c(18),{item:n,onClose:l}=t,r=n.isActive&&"z-10";let i;e[0]!==r?(i=B(r),e[0]=r,e[1]=i):i=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(J,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==i||e[16]!==c?(m=s.jsx(K,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function Pl(t){const e=C.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ut,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,i=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(kt,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],o=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(ds,{label:r,defaultExpanded:i,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(kt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],r=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=r}else r=e[13];let i;return e[16]!==r?(i=s.jsx(dt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(mt,{children:s.jsx(fe,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=i):i=e[17],i}case"custom":return n.content}}function El(t){const e=C.c(17),{sections:n,onClose:l,footer:r,additionalContent:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(O.Suspense,{fallback:o,children:s.jsx(Dl,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(x,p)=>s.jsx(Pl,{section:x,onClose:l},p),e[6]=l,e[7]=f):f=e[7],d=n.map(f),e[3]=l,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==i?(c=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[8]=i,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Gt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==r||e[14]!==a||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,m,r]}),e[13]=r,e[14]=a,e[15]=m,e[16]=u):u=e[16],u}function Be(t){const e=C.c(22),{item:n,onClose:l}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==l||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:l,children:[m,u]}),e[4]=n.href,e[5]=l,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let r;e[11]!==n||e[12]!==l?(r=()=>{n.onClick?.(),l()},e[11]=n,e[12]=l,e[13]=r):r=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let o;e[16]!==n.label?(o=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=o):o=e[17];let a;return e[18]!==r||e[19]!==i||e[20]!==o?(a=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[i,o]}),e[18]=r,e[19]=i,e[20]=o,e[21]=a):a=e[21],a}function It(t){const e=C.c(126),{user:n,userImage:l,menuItems:r,signOutItem:i,themeOptions:o,preferences:a,setPreferences:d,close:c,isMobile:m}=t;if(m){const T=n?.name??"U";let D;e[0]!==T||e[1]!==l?(D=s.jsx(Oe,{url:l,fallback:T,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=T,e[1]=l,e[2]=D):D=e[2];const Y=n?.name??"User";let q;e[3]!==Y?(q=s.jsx("p",{className:"text-sm font-medium truncate",children:Y}),e[3]=Y,e[4]=q):q=e[4];const le=n?.email;let W;e[5]!==le?(W=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:le}),e[5]=le,e[6]=W):W=e[6];let re;e[7]!==q||e[8]!==W?(re=s.jsxs("div",{className:"flex-1 min-w-0",children:[q,W]}),e[7]=q,e[8]=W,e[9]=re):re=e[9];let ie;e[10]!==n?(ie=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Bl)},e[10]=n,e[11]=ie):ie=e[11];let ce;e[12]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(yt,{size:14}),e[12]=ce):ce=e[12];let ge;e[13]!==ie?(ge=s.jsx(he,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:ie,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ce})}),e[13]=ie,e[14]=ge):ge=e[14];let ye;e[15]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(xe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=ye):ye=e[15];let I;e[16]!==ge?(I=s.jsx(nt,{delayDuration:300,children:s.jsxs(pe,{children:[ge,ye]})}),e[16]=ge,e[17]=I):I=e[17];let H;e[18]!==I||e[19]!==D||e[20]!==re?(H=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[D,re,I]}),e[18]=I,e[19]=D,e[20]=re,e[21]=H):H=e[21];let V;if(e[22]!==c||e[23]!==r){let me;e[25]!==c?(me=Le=>s.jsx(Be,{item:Le,onClose:c},Le.key),e[25]=c,e[26]=me):me=e[26],V=r.map(me),e[22]=c,e[23]=r,e[24]=V}else V=e[24];let U;e[27]!==c||e[28]!==i?(U=s.jsx(Be,{item:i,onClose:c}),e[27]=c,e[28]=i,e[29]=U):U=e[29];let de;e[30]!==V||e[31]!==U?(de=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[V,U]})}),e[30]=V,e[31]=U,e[32]=de):de=e[32];let Se;if(e[33]!==a.theme||e[34]!==d||e[35]!==o){let me;e[37]!==a.theme||e[38]!==d?(me=Le=>{const{value:Ze,icon:Is,label:As}=Le;return s.jsx("button",{type:"button","aria-label":As,onClick:()=>d($s=>({...$s,theme:Ze})),className:B("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Ze?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Is},Ze)},e[37]=a.theme,e[38]=d,e[39]=me):me=e[39],Se=o.map(me),e[33]=a.theme,e[34]=d,e[35]=o,e[36]=Se}else Se=e[36];let Ne;e[40]!==Se?(Ne=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=Ne):Ne=e[41];const Ye=a.enableSounds?"Disable sounds":"Enable sounds";let _e;e[42]!==d?(_e=()=>d(Ll),e[42]=d,e[43]=_e):_e=e[43];const Je=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let we;e[44]!==Je?(we=B("size-8 rounded-md flex items-center justify-center transition-colors",Je),e[44]=Je,e[45]=we):we=e[45];let Ce;e[46]!==a.enableSounds?(Ce=a.enableSounds?s.jsx(St,{size:14}):s.jsx(Nt,{size:14}),e[46]=a.enableSounds,e[47]=Ce):Ce=e[47];let ke;e[48]!==Ye||e[49]!==_e||e[50]!==we||e[51]!==Ce?(ke=s.jsx("button",{type:"button","aria-label":Ye,onClick:_e,className:we,children:Ce}),e[48]=Ye,e[49]=_e,e[50]=we,e[51]=Ce,e[52]=ke):ke=e[52];let Re;e[53]===Symbol.for("react.memo_cache_sentinel")?(Re=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.26.0"]}),e[53]=Re):Re=e[53];let Ie;e[54]!==ke?(Ie=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Re]}),e[54]=ke,e[55]=Ie):Ie=e[55];let Ae;e[56]!==Ne||e[57]!==Ie?(Ae=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ne,Ie]}),e[56]=Ne,e[57]=Ie,e[58]=Ae):Ae=e[58];let Fe;return e[59]!==H||e[60]!==de||e[61]!==Ae?(Fe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[H,de,Ae]}),e[59]=H,e[60]=de,e[61]=Ae,e[62]=Fe):Fe=e[62],Fe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==l?(f=s.jsx(Oe,{url:l,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=l,e[65]=f):f=e[65];const x=n?.name??"User";let p;e[66]!==x?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:x}),e[66]=x,e[67]=p):p=e[67];const h=n?.email;let g;e[68]!==h?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[68]=h,e[69]=g):g=e[69];let b;e[70]!==p||e[71]!==g?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,g]}),e[70]=p,e[71]=g,e[72]=b):b=e[72];let j;e[73]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fl)},e[73]=n,e[74]=j):j=e[74];let v;e[75]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(yt,{size:14}),e[75]=v):v=e[75];let y;e[76]!==j?(y=s.jsx(he,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[76]=j,e[77]=y):y=e[77];let _;e[78]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(xe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=_):_=e[78];let k;e[79]!==y?(k=s.jsx(nt,{delayDuration:300,children:s.jsxs(pe,{children:[y,_]})}),e[79]=y,e[80]=k):k=e[80];let N;e[81]!==k||e[82]!==f||e[83]!==b?(N=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,b,k]}),e[81]=k,e[82]=f,e[83]=b,e[84]=N):N=e[84];let w;if(e[85]!==c||e[86]!==r){let T;e[88]!==c?(T=D=>s.jsx(Be,{item:D,onClose:c},D.key),e[88]=c,e[89]=T):T=e[89],w=r.map(T),e[85]=c,e[86]=r,e[87]=w}else w=e[87];let S;e[90]!==c||e[91]!==i?(S=s.jsx(Be,{item:i,onClose:c}),e[90]=c,e[91]=i,e[92]=S):S=e[92];let A;e[93]!==w||e[94]!==S?(A=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[w,S]}),e[93]=w,e[94]=S,e[95]=A):A=e[95];let M;if(e[96]!==a.theme||e[97]!==d||e[98]!==o){let T;e[100]!==a.theme||e[101]!==d?(T=D=>{const{value:Y,icon:q,label:le}=D;return s.jsx("button",{type:"button","aria-label":le,onClick:()=>d(W=>({...W,theme:Y})),className:B("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===Y?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:q},Y)},e[100]=a.theme,e[101]=d,e[102]=T):T=e[102],M=o.map(T),e[96]=a.theme,e[97]=d,e[98]=o,e[99]=M}else M=e[99];let $;e[103]!==M?($=s.jsx("div",{className:"flex items-center gap-0.5",children:M}),e[103]=M,e[104]=$):$=e[104];const z=a.enableSounds?"Disable sounds":"Enable sounds";let F;e[105]!==d?(F=()=>d(Rl),e[105]=d,e[106]=F):F=e[106];const G=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let E;e[107]!==G?(E=B("size-7 rounded-md flex items-center justify-center transition-colors",G),e[107]=G,e[108]=E):E=e[108];let L;e[109]!==a.enableSounds?(L=a.enableSounds?s.jsx(St,{size:14}):s.jsx(Nt,{size:14}),e[109]=a.enableSounds,e[110]=L):L=e[110];let R;e[111]!==z||e[112]!==F||e[113]!==E||e[114]!==L?(R=s.jsx("button",{type:"button","aria-label":z,onClick:F,className:E,children:L}),e[111]=z,e[112]=F,e[113]=E,e[114]=L,e[115]=R):R=e[115];let P;e[116]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.26.0"]}),e[116]=P):P=e[116];let X;e[117]!==R?(X=s.jsxs("div",{className:"flex items-center gap-2",children:[R,P]}),e[117]=R,e[118]=X):X=e[118];let Q;e[119]!==$||e[120]!==X?(Q=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[$,X]}),e[119]=$,e[120]=X,e[121]=Q):Q=e[121];let te;return e[122]!==N||e[123]!==A||e[124]!==Q?(te=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[N,A,Q]})}),e[122]=N,e[123]=A,e[124]=Q,e[125]=te):te=e[125],te}function Rl(t){return{...t,enableSounds:!t.enableSounds}}function Fl(){se.success("User ID copied")}function Ll(t){return{...t,enableSounds:!t.enableSounds}}function Bl(){se.success("User ID copied")}function it(){const t=C.c(34),{data:e}=be.useSession(),{org:n}=ee(),l=ne();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const o=Ms(r)?.params.org,[a,d]=Os(),c=ft(),[m,u]=O.useState(!1),f=e?.user,x=f?.image;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>u(!1),t[1]=p):p=t[1];const h=p;let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ve,{size:16}),t[2]=g):g=t[2];let b;t[3]!==l||t[4]!==o?(b={key:"preferences",label:"Preferences",icon:g,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=b):b=t[5];let j;t[6]!==n||t[7]!==l?(j=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(sn,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=j):j=t[8];let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v={key:"terms",label:"Terms of Use",icon:s.jsx(ln,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=v):v=t[9];let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"privacy",label:"Privacy Policy",icon:s.jsx(mn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=y):y=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={key:"github",label:"decocms/studio",icon:s.jsx(Ds,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=_):_=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k={key:"community",label:"Community",icon:s.jsx(un,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=k):k=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N={key:"homepage",label:"Homepage",icon:s.jsx(nn,{size:16}),href:"https://decocms.com",external:!0},t[13]=N):N=t[13];let w;t[14]!==b||t[15]!==j?(w=[b,...j,v,y,_,k,N],t[14]=b,t[15]=j,t[16]=w):w=t[16];const S=w;let A;t[17]===Symbol.for("react.memo_cache_sentinel")?(A={key:"logout",label:"Sign out",icon:s.jsx(rn,{size:16}),onClick:Ul},t[17]=A):A=t[17];const M=A;let $;t[18]===Symbol.for("react.memo_cache_sentinel")?($={value:"light",icon:s.jsx(an,{size:14}),label:"Light theme"},t[18]=$):$=t[18];let z;t[19]===Symbol.for("react.memo_cache_sentinel")?(z={value:"dark",icon:s.jsx(cn,{size:14}),label:"Dark theme"},t[19]=z):z=t[19];let F;t[20]===Symbol.for("react.memo_cache_sentinel")?(F=[$,z,{value:"system",icon:s.jsx(Xt,{size:14}),label:"System theme"}],t[20]=F):F=t[20];const G=F;let E;t[21]!==c||t[22]!==S||t[23]!==a||t[24]!==d||t[25]!==f||t[26]!==x?(E={user:f,userImage:x,menuItems:S,signOutItem:M,themeOptions:G,preferences:a,setPreferences:d,close:h,isMobile:c},t[21]=c,t[22]=S,t[23]=a,t[24]=d,t[25]=f,t[26]=x,t[27]=E):E=t[27];const L=E;let R;return t[28]!==c||t[29]!==m||t[30]!==L||t[31]!==f?.name||t[32]!==x?(R=s.jsx(s.Fragment,{children:c?s.jsxs(Wt,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx(Oe,{url:x,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Kt,{className:"h-[80dvh] p-0",children:[s.jsx(Vt,{className:"sr-only",children:"Account"}),s.jsx(It,{...L})]})]}):s.jsxs(De,{open:m,onOpenChange:u,children:[s.jsx(je,{asChild:!0,children:s.jsxs(J,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Oe,{url:x,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(Pe,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Hl,children:s.jsx(It,{...L})})]})}),t[28]=c,t[29]=m,t[30]=L,t[31]=f?.name,t[32]=x,t[33]=R):R=t[33],R}function Hl(t){return t.preventDefault()}function Ul(){ue("signed_out",{source:"account_popover"}),Ps(),be.signOut()}const At=["requires_action","in_progress","failed","expired","completed"];function Gl(t){const e=new Map(At.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return At.map(n=>({status:n,threads:e.get(n)}))}function fs(t){const e=C.c(4),{onClick:n}=t;let l,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(rt,{}),r=s.jsx("span",{children:"Add repo"}),e[0]=l,e[1]=r):(l=e[0],r=e[1]);let i;return e[2]!==n?(i=s.jsxs(J,{tooltip:"Add repo",onClick:n,children:[l,r]}),e[2]=n,e[3]=i):i=e[3],i}function ql(t){const e=C.c(41),{onAddNew:n}=t,{org:l}=ee(),r=Lt(),i=ne(),o=wn();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const c=Ke(a).virtualmcpid??null;let m;e[1]!==c?(m=!!c&&!Jt(c),e[1]=c,e[2]=m):m=e[2];const u=m;let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={slug:"mcp-github"},e[3]=f):f=e[3];const p=yn(f).filter(Kl),h=ht(),b=xt(u?c:null)?.metadata?.githubRepo?.connectionId??null;let j;e[4]!==l.id||e[5]!==l.slug?(j={connectionId:Zt,orgId:l.id,orgSlug:l.slug},e[4]=l.id,e[5]=l.slug,e[6]=j):j=e[6];const v=Yt(j);if(p.length===0){let T;return e[7]!==n?(T=s.jsx(fs,{onClick:n}),e[7]=n,e[8]=T):T=e[8],T}let y;e[9]!==c||e[10]!==i||e[11]!==l.id||e[12]!==r||e[13]!==v?(y=async(T,D)=>{await v.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:c,data:{metadata:{githubRepo:T}}}}),vt(r,l.id),se.success(`Previewing ${D}`),i({to:".",search:Wl,replace:!0})},e[9]=c,e[10]=i,e[11]=l.id,e[12]=r,e[13]=v,e[14]=y):y=e[14];const _=y;let k;e[15]!==h||e[16]!==o||e[17]!==l.id||e[18]!==r||e[19]!==v?(k=async(T,D,Y)=>{const q=h.find(re=>{const ie=re.metadata?.githubRepo;return ie?.owner?.toLowerCase()===T.owner.toLowerCase()&&ie?.name?.toLowerCase()===T.name.toLowerCase()});if(q){o(q.id,{search:{main:"preview"}});return}const W=(await v.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:T.name,description:`Imported from ${Y}`,status:"active",pinned:!1,icon:null,connections:[{connection_id:D}],metadata:{githubRepo:T,instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}}}})).structuredContent?.item?.id;if(vt(r,l.id),!W)throw new Error("Failed to create the repo agent");se.success(`Created ${Y}`),o(W,{search:{main:"preview"}})},e[15]=h,e[16]=o,e[17]=l.id,e[18]=r,e[19]=v,e[20]=k):k=e[20];const N=k;let w;e[21]!==_||e[22]!==u||e[23]!==N?(w=async T=>{const D=lt(T);if(!D)return;const Y=`${D.owner}/${D.repo}`,q={owner:D.owner,name:D.repo,url:`https://github.com/${D.owner}/${D.repo}`,installationId:D.installationId,connectionId:T.id};try{u?await _(q,Y):await N(q,T.id,Y)}catch(le){const W=le;se.error("Failed to set preview repo: "+(W instanceof Error?W.message:"Unknown error"))}},e[21]=_,e[22]=u,e[23]=N,e[24]=w):w=e[24];const S=w,A=bn;let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(jn,{asChild:!0,children:s.jsxs(J,{children:[s.jsx(rt,{}),s.jsx("span",{children:"Add repo"})]})}),e[25]=M):M=e[25];const $=gn,z="start",F="right",G="w-56";let E;e[26]!==b||e[27]!==S?(E=T=>{const D=lt(T);return D?s.jsxs(wt,{onSelect:()=>S(T),children:[s.jsx(rt,{className:"size-4 text-muted-foreground"}),s.jsxs("span",{className:"flex-1 truncate",children:[D.owner,"/",D.repo]}),T.id===b&&s.jsx(Ee,{className:"size-4"})]},T.id):null},e[26]=b,e[27]=S,e[28]=E):E=e[28];const L=p.map(E);let R;e[29]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(vn,{}),e[29]=R):R=e[29];let P;e[30]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx($e,{className:"size-4"}),e[30]=P):P=e[30];let X;e[31]!==n?(X=s.jsxs(wt,{onSelect:n,children:[P,"Add new repo…"]}),e[31]=n,e[32]=X):X=e[32];let Q;e[33]!==$||e[34]!==L||e[35]!==X?(Q=s.jsxs($,{align:z,side:F,className:G,children:[L,R,X]}),e[33]=$,e[34]=L,e[35]=X,e[36]=Q):Q=e[36];let te;return e[37]!==A||e[38]!==Q||e[39]!==M?(te=s.jsxs(A,{children:[M,Q]}),e[37]=A,e[38]=Q,e[39]=M,e[40]=te):te=e[40],te}function Wl(t){return{...t,main:"preview"}}function Kl(t){return lt(t)!==null&&_n(t)}function Vl(){const t=C.c(4),[e,n]=O.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(fs,{onClick:()=>n(!0)}),t[0]=l):l=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(O.Suspense,{fallback:l,children:s.jsx(ql,{onAddNew:()=>n(!0)})}),t[1]=r):r=t[1];let i;return t[2]!==e?(i=s.jsxs(s.Fragment,{children:[r,s.jsx(Nn,{open:e,onOpenChange:n,mode:"connection"})]}),t[2]=e,t[3]=i):i=t[3],i}function ot(){const t=C.c(22),e=Mn(),[n,l]=O.useState(!1);let r;if(t[0]!==e.capabilities||t[1]!==e.hostname||t[2]!==e.machineId||t[3]!==e.online){const h=On(e.capabilities);r=e.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:e.hostname??e.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:h.length>0?`Available: ${h.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),t[0]=e.capabilities,t[1]=e.hostname,t[2]=e.machineId,t[3]=e.online,t[4]=r}else r=t[4];const i=r;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),t[5]=o):o=t[5];const a=e.online?"Desktop linked":"Connect your desktop";let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Xt,{size:16}),t[6]=d):d=t[6];let c;t[7]!==e.online?(c=e.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),t[7]=e.online,t[8]=c):c=t[8];let m;t[9]!==a||t[10]!==c?(m=s.jsx(he,{asChild:!0,children:s.jsxs(ae,{onClick:o,"aria-label":a,children:[d,c]})}),t[9]=a,t[10]=c,t[11]=m):m=t[11];let u;t[12]!==i?(u=s.jsx(xe,{side:"bottom",children:i}),t[12]=i,t[13]=u):u=t[13];let f;t[14]!==m||t[15]!==u?(f=s.jsxs(pe,{children:[m,u]}),t[14]=m,t[15]=u,t[16]=f):f=t[16];let x;t[17]!==n?(x=s.jsx(Dn,{open:n,onOpenChange:l}),t[17]=n,t[18]=x):x=t[18];let p;return t[19]!==f||t[20]!==x?(p=s.jsxs(s.Fragment,{children:[f,x]}),t[19]=f,t[20]=x,t[21]=p):p=t[21],p}function Xl({invitation:t}){const[e,n]=O.useState(!1),[l,r]=O.useState(!1),i=Lt(),o=async()=>{n(!0);try{const c=await be.organization.acceptInvitation({invitationId:t.id});if(c.error){se.error(c.error.message),n(!1);return}}catch{se.error("Failed to accept invitation"),n(!1);return}se.success("Invitation accepted!"),Es();let d;try{d=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},a=async()=>{r(!0);try{const d=await be.organization.rejectInvitation({invitationId:t.id});d.error?(se.error(d.error.message),r(!1)):(se.success("Invitation declined"),i.invalidateQueries())}catch{se.error("Failed to decline invitation"),r(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:o,disabled:e||l,"aria-label":"Accept invitation",children:s.jsx(Ee,{size:14})}),s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||l,"aria-label":"Decline invitation",children:s.jsx(ss,{size:14})})]})]})}function Ql(t){const e=C.c(29),{request:n}=t,{approve:l,deny:r}=Pn(),i=l.isPending||r.isPending,o=n.user?.name??n.user?.email??n.userId,a=n.user?.image??void 0;let d;e[0]!==o?(d=o.charAt(0).toUpperCase(),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==d?(c=s.jsx(Oe,{url:a,fallback:d,shape:"circle",size:"sm"}),e[2]=a,e[3]=d,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested to join"}),e[5]=m):m=e[5];let u;e[6]!==o?(u=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,s.jsx("p",{className:"text-sm font-medium truncate",children:o})]}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==n.id?(f=()=>l.mutate(n.id),e[8]=l,e[9]=n.id,e[10]=f):f=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ee,{size:14}),e[11]=x):x=e[11];let p;e[12]!==i||e[13]!==f?(p=s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:f,disabled:i,"aria-label":"Approve join request",children:x}),e[12]=i,e[13]=f,e[14]=p):p=e[14];let h;e[15]!==r||e[16]!==n.id?(h=()=>r.mutate(n.id),e[15]=r,e[16]=n.id,e[17]=h):h=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ss,{size:14}),e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==h?(b=s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:h,disabled:i,"aria-label":"Deny join request",children:g}),e[19]=i,e[20]=h,e[21]=b):b=e[21];let j;e[22]!==b||e[23]!==p?(j=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[p,b]}),e[22]=b,e[23]=p,e[24]=j):j=e[24];let v;return e[25]!==j||e[26]!==c||e[27]!==u?(v=s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[c,u,j]}),e[25]=j,e[26]=c,e[27]=u,e[28]=v):v=e[28],v}function Yl(t){const e=C.c(14),{release:n,isSeen:l,onSelect:r}=t;let i;e[0]!==l?(i=!l&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=l,e[1]=i):i=e[1];let o;e[2]!==n.eyebrow?(o=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=o):o=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let d;e[6]!==o||e[7]!==a?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[o,a]}),e[6]=o,e[7]=a,e[8]=d):d=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ns,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=c):c=e[9];let m;return e[10]!==r||e[11]!==i||e[12]!==d?(m=s.jsxs("button",{type:"button",onClick:r,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,d,c]}),e[10]=r,e[11]=i,e[12]=d,e[13]=m):m=e[13],m}function Jl(){const t=O.useContext(Rs),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(l=>l.status==="pending"&&new Date(l.expiresAt)>new Date)}function hs(){const t=C.c(11),{isSeen:e,markSeen:n,unseenCount:l}=Rn(),r=Jl(),i=En();let o;if(t[0]!==e||t[1]!==r||t[2]!==i){const c=[...i].sort(nr).map(sr),m=[...r].sort(tr).map(er);let u;t[4]!==e?(u=x=>({type:"release",release:x,isSeen:e(x.id)}),t[4]=e,t[5]=u):u=t[5];const f=[...Fn].sort(Zl).map(u);o=[...c,...m,...f],t[0]=e,t[1]=r,t[2]=i,t[3]=o}else o=t[3];const a=l+r.length+i.length;let d;return t[6]!==n||t[7]!==r||t[8]!==o||t[9]!==a?(d={items:o,pendingInvitations:r,redDotCount:a,markReleaseSeen:n},t[6]=n,t[7]=r,t[8]=o,t[9]=a,t[10]=d):d=t[10],d}function Zl(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function er(t){return{type:"invitation",invitation:t}}function tr(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}function sr(t){return{type:"join-request",request:t}}function nr(t,e){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}class xs extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function ps(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function lr(){const t=C.c(17),e=ne(),{org:n}=ee(),{hasDecoKey:l,balanceDollars:r}=ts();if(!l)return null;let i;t[0]!==r?(i=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=i):i=t[1];let o;t[2]!==r?(o=B(r!=null&&ps(r)),t[2]=r,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Qt,{}),t[7]=d):d=t[7];let c;t[8]!==r?(c=r!=null?`$${r.toFixed(2)}`:"Credits",t[8]=r,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==o||t[14]!==a||t[15]!==m?(u=s.jsx(fe,{children:s.jsx(K,{children:s.jsxs(J,{tooltip:i,className:o,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=o,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function rr(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xs,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(lr,{})})}),t[0]=e):e=t[0],e}function ir(){const t=C.c(17),e=ne(),{org:n}=ee(),{hasDecoKey:l,balanceDollars:r}=ts();if(!l)return null;let i;t[0]!==r?(i=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=i):i=t[1];const o=i;let a;t[2]!==e||t[3]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[2]=e,t[3]=n.slug,t[4]=a):a=t[4];let d;t[5]!==r?(d=B(r!=null&&ps(r)),t[5]=r,t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qt,{className:"size-4"}),t[7]=c):c=t[7];let m;t[8]!==a||t[9]!==d||t[10]!==o?(m=s.jsx(he,{asChild:!0,children:s.jsx(ae,{"aria-label":o,onClick:a,className:d,children:c})}),t[8]=a,t[9]=d,t[10]=o,t[11]=m):m=t[11];let u;t[12]!==o?(u=s.jsx(xe,{side:"top",children:o}),t[12]=o,t[13]=u):u=t[13];let f;return t[14]!==m||t[15]!==u?(f=s.jsxs(pe,{delayDuration:300,children:[m,u]}),t[14]=m,t[15]=u,t[16]=f):f=t[16],f}function or(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(xs,{children:s.jsx(O.Suspense,{fallback:null,children:s.jsx(ir,{})})}),t[0]=e):e=t[0],e}function gs(t){const e=C.c(15),{children:n}=t,{items:l,markReleaseSeen:r}=hs(),[i,o]=O.useState(null);let a;if(e[0]!==l||e[1]!==i){let h;e[3]!==i?(h=g=>g.type==="release"&&g.release.id===i,e[3]=i,e[4]=h):h=e[4],a=l.find(h),e[0]=l,e[1]=i,e[2]=a}else a=e[2];const d=a,c=d?.type==="release"?d.release:null;let m;e[5]!==r?(m=h=>{o(h),r(h)},e[5]=r,e[6]=m):m=e[6];const u=m;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=h=>{h||o(null)},e[7]=f):f=e[7];let x;e[8]!==u||e[9]!==l||e[10]!==c?(x=s.jsx(Pe,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(ze,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>o(null),children:s.jsx(dn,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:c.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(Ln,{release:c})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),l.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Xe,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations, join requests, and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:l.map(h=>h.type==="join-request"?s.jsx(Ql,{request:h.request},`req-${h.request.id}`):h.type==="invitation"?s.jsx(Xl,{invitation:h.invitation},`inv-${h.invitation.id}`):s.jsx(Yl,{release:h.release,isSeen:h.isSeen,onSelect:()=>u(h.release.id)},`rel-${h.release.id}`))})]})}),e[8]=u,e[9]=l,e[10]=c,e[11]=x):x=e[11];let p;return e[12]!==n||e[13]!==x?(p=s.jsxs(De,{onOpenChange:f,children:[n,x]}),e[12]=n,e[13]=x,e[14]=p):p=e[14],p}function bs(){const{redDotCount:t}=hs();return t>0}function ar(){const t=C.c(6),e=bs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Xe,{}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=l):l=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("span",{children:"Inbox"}),t[3]=r):r=t[3];let i;return t[4]!==l?(i=s.jsx(gs,{children:s.jsx(je,{asChild:!0,children:s.jsxs(J,{tooltip:"Inbox",className:"relative",children:[n,l,r]})})}),t[4]=l,t[5]=i):i=t[5],i}function cr(){const t=C.c(8),e=bs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Xe,{className:"size-4"}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=l):l=t[2];let r;t[3]!==l?(r=s.jsx(je,{asChild:!0,children:s.jsx(he,{asChild:!0,children:s.jsxs(ae,{"aria-label":"Inbox",children:[n,l]})})}),t[3]=l,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(xe,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let o;return t[6]!==r?(o=s.jsx(gs,{children:s.jsxs(pe,{delayDuration:300,children:[r,i]})}),t[6]=r,t[7]=o):o=t[7],o}function dr(){const t=C.c(7),e=ne(),{org:n}=ee();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let r,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ve,{}),i=s.jsx("span",{children:"Settings"}),t[3]=r,t[4]=i):(r=t[3],i=t[4]);let o;return t[5]!==l?(o=s.jsxs(J,{tooltip:"Settings",onClick:l,children:[r,i]}),t[5]=l,t[6]=o):o=t[6],o}function mr(){const t=C.c(9),e=ne(),{org:n}=ee();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ve,{className:"size-4"}),t[3]=r):r=t[3];let i;t[4]!==l?(i=s.jsx(he,{asChild:!0,children:s.jsx(ae,{"aria-label":"Settings",onClick:l,children:r})}),t[4]=l,t[5]=i):i=t[5];let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(xe,{side:"top",children:"Settings"}),t[6]=o):o=t[6];let a;return t[7]!==i?(a=s.jsxs(pe,{delayDuration:300,children:[i,o]}),t[7]=i,t[8]=a):a=t[8],a}function ur(){const t=C.c(5),[e,n]=O.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{children:s.jsx($n,{trigger:s.jsxs(J,{tooltip:"Invite members",children:[s.jsx(fn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:s.jsx(Vl,{})}),t[1]=r):r=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(fe,{className:"gap-0.5",children:[l,r,s.jsx(K,{children:s.jsxs(J,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(on,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[2]=i):i=t[2];let o;return t[3]!==e?(o=s.jsxs(s.Fragment,{children:[i,s.jsx(zn,{open:e,onOpenChange:n,mode:"browse"})]}),t[3]=e,t[4]=o):o=t[4],o}function fr(){const t=C.c(8),{state:e}=ve();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rr,{}),t[0]=o):o=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(K,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(ot,{})})}),t[1]=a):a=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(K,{children:s.jsx(ar,{})}),t[2]=d):d=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(K,{children:s.jsx(dr,{})}),t[3]=c):c=t[3];let m;return t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(st,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs(fe,{children:[a,d,c,s.jsx(K,{children:s.jsx(it,{})})]})]}),t[4]=m):m=t[4],m}let l,r;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ur,{}),r=s.jsx(ut,{className:"mx-0"}),t[5]=l,t[6]=r):(l=t[5],r=t[6]);let i;return t[7]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(st,{className:"px-2 pb-3 gap-1.5",children:[l,r,s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fe,{children:s.jsx(K,{children:s.jsx(it,{})})})}),s.jsx(mr,{}),s.jsx(cr,{}),s.jsx(ot,{}),s.jsx(or,{})]})]}),t[7]=i):i=t[7],i}function hr(){const t=C.c(8),e=ne(),{org:n}=ee(),{setOpenMobile:l}=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(fe,{children:s.jsx(K,{children:s.jsx(it,{})})})}),t[0]=r):r=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==l?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=i):i=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ve,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==i?(a=s.jsx(st,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(ae,{"aria-label":"Settings",onClick:i,children:o})]})}),t[6]=i,t[7]=a):a=t[7],a}function $t(t){const e=C.c(15),{className:n,wrapperClassName:l,children:r}=t,[i,o]=O.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&o(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=B("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==r||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:r}),e[4]=r,e[5]=n,e[6]=f):f=e[6];const x=i?"opacity-100":"opacity-0";let p;e[7]!==x?(p=B("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=p):p=e[8];let h;e[9]!==p?(h=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=h):h=e[10];let g;return e[11]!==u||e[12]!==f||e[13]!==h?(g=s.jsxs("div",{className:u,children:[f,h]}),e[11]=u,e[12]=f,e[13]=h,e[14]=g):g=e[14],g}function xr(t){const e=C.c(8),{virtualMcpId:n,size:l,showAutomationBadge:r}=t,i=l===void 0?"sm":l;let o;e[0]!==i||e[1]!==n?(o=n?s.jsx(pr,{virtualMcpId:n,size:i}):s.jsx(Te,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==r?(a=r&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(nl,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let d;return e[5]!==o||e[6]!==a?(d=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=d):d=e[7],d}function pr(t){const e=C.c(6),{virtualMcpId:n,size:l}=t,r=xt(n);if(!r){let a;return e[0]!==l?(a=s.jsx(Te,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=r.icon??null;let o;return e[2]!==r.title||e[3]!==l||e[4]!==i?(o=s.jsx(Te,{icon:i,name:r.title,size:l}),e[2]=r.title,e[3]=l,e[4]=i,e[5]=o):o=e[5],o}function zt(t){const e=C.c(36),{open:n,onOpenChange:l}=t,[r,i]=O.useState(""),{org:o}=ee(),{setTaskId:a}=pt(),d=rs();let c,m,u;e[0]!==o.id||e[1]!==r?(u=r.trim(),m=Ls,c=Fs.globalSearch(o.id,u),e[0]=o.id,e[1]=r,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let x;e[5]!==d||e[6]!==u?(x=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=x):x=e[7];let p;e[8]!==c||e[9]!==f||e[10]!==x?(p={queryKey:c,enabled:f,queryFn:x,staleTime:1e4},e[8]=c,e[9]=f,e[10]=x,e[11]=p):p=e[11];const{data:h,isFetching:g}=m(p);let b;e[12]!==h?.items?(b=h?.items??[],e[12]=h?.items,e[13]=b):b=e[13];const j=b;let v;e[14]!==l?(v=z=>{z||i(""),l(z)},e[14]=l,e[15]=v):v=e[15];const y=v;let _;e[16]!==y||e[17]!==a?(_=z=>{y(!1),a(z.id,z.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=_):_=e[18];const k=_;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Kn,{className:"sr-only",children:[s.jsx(Vn,{children:"Search"}),s.jsx(Xn,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let w;e[20]!==r?(w=s.jsx(el,{value:r,onValueChange:i,placeholder:"Search..."}),e[20]=r,e[21]=w):w=e[21];let S;e[22]!==k||e[23]!==g||e[24]!==j||e[25]!==u?(S=u?g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Jn,{children:"No results."}):j.map(z=>z.type==="thread"?s.jsxs(Zn,{value:`thread:${z.id}:${z.title}`,onSelect:()=>k(z),className:"gap-2.5",children:[s.jsx(xr,{virtualMcpId:z.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:z.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(z.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${z.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=k,e[23]=g,e[24]=j,e[25]=u,e[26]=S):S=e[26];let A;e[27]!==S?(A=s.jsx(tl,{children:S}),e[27]=S,e[28]=A):A=e[28];let M;e[29]!==w||e[30]!==A?(M=s.jsxs(Qn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(sl,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[w,A]})]}),e[29]=w,e[30]=A,e[31]=M):M=e[31];let $;return e[32]!==y||e[33]!==n||e[34]!==M?($=s.jsx(Yn,{open:n,onOpenChange:y,children:M}),e[32]=y,e[33]=n,e[34]=M,e[35]=$):$=e[35],$}const gr="sidebar.group.expanded.";function br(t,e){const n=C.c(3),[l,r]=We(`${gr}${t}`,e);let i;return n[0]!==l||n[1]!==r?(i=[l,r],n[0]=l,n[1]=r,n[2]=i):i=n[2],i}function js(t){const e=C.c(12),{onClick:n,isFetching:l,indented:r}=t,i=r?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==i?(o=B("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",i,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Bt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const d=l?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=m):m=e[11],m}function jr(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function vr(t){return t.member==="mine"&&!t.currentUserId}const vs=4;let Ue=0;const at=[];function yr(){for(;Ue<vs&&at.length>0;){const t=at.shift();t&&t()}}function ys(t){return new Promise((e,n)=>{const l=()=>{Ue++,t().then(e,n).finally(()=>{Ue--,yr()})};Ue<vs?l():at.push(l)})}const Qe=10;function Tt(t,e,n,l,r){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const o={where:i,limit:r,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Sr(t,e,n,l){let r=0;for(const i of t)Ss(i,e,n,l)&&r++;return r}function et(t,e,n,l){return Sr(t,e,n,l)}function Nr(t,e){return!!(t>=Qe||t===0&&e)}function Mt(t,e){return t<e}function _r(t,e){return e===!1?!1:e===!0?!0:t}function Ss(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const qe=new Map,He=new Map;function wr(t,e){return e?t>=Qe?!0:null:!1}function Ot(t){return qe.get(t)}function Cr(t,e){qe.set(t,e)}function kr(t,e,n){const l=qe.get(t);if(l!==void 0){n(l);return}let r=He.get(t);r||(r=ys(e).then(i=>(qe.set(t,i),He.delete(t),i)).catch(()=>(He.delete(t),Promise.reject(new Error("group probe failed")))),He.set(t,r)),r.then(n,()=>n(!1))}function Dt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Qe,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ir(t,e,n,l,r){let i=0;for(const o of t)e.has(o.id)||Ss(o,n,l,r)&&i++;return i}function Ar(t,e,n,l){const r=C.c(8),{org:i}=ee(),o=jr(i.id,t,e,n);let a;r[0]!==n?(a=vr(n),r[0]=n,r[1]=a):a=r[1];const d=a,[c,m]=O.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=qn(),{threads:f,hasMore:x}=gt(),p=et(f,t,e,n),h=Nr(p,x),g=wr(p,x),b=rs();if(c.identity===o&&c.serverHasMore===null){const N=g??Ot(o);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===o&&c.serverHasMore===null&&g===null&&Ot(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),kr(o,async()=>{const N=Tt(t,e,0,n,1),w=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:S}=Dt(w),A=et(u.threads.get(),t,e,n);return S===void 0?!1:Mt(A,S)},N=>{m(w=>w.identity!==o?w:{...w,isProbing:!1,serverHasMore:N})}));const v=async function(){if(c.isFetching||c.isProbing||d)return;const w=o;m(S=>S.identity===w?{...S,isFetching:!0}:S);try{const S=et(f,t,e,n),A=Tt(t,e,S,n,Qe),M=await ys(()=>b.call("COLLECTION_THREADS_LIST",A)),{items:$,hasMore:z,totalCount:F}=Dt(M),G=new Set(f.map($r)),E=Ir($,G,t,e,n),L=S;u.mergeThreads($),m(R=>{if(R.identity!==w)return R;let P;return F!==void 0?P=Mt(L+E,F):P=$.length===0||E===0?!1:z,Cr(w,P),{...R,isFetching:!1,serverHasMore:P}})}catch(S){const A=S,M=A instanceof Error?A.message:String(A);se.error(`Could not load more tasks: ${M}`),m($=>$.identity===w?{...$,isFetching:!1}:$)}},y=c.isFetching||c.isProbing,_=!d&&!y&&_r(h,c.serverHasMore);let k;return r[2]!==y||r[3]!==v||r[4]!==_||r[5]!==c.isProbing||r[6]!==c.serverHasMore?(k={hasMore:_,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:v},r[2]=y,r[3]=v,r[4]=_,r[5]=c.isProbing,r[6]=c.serverHasMore,r[7]=k):k=r[7],k}function $r(t){return t.id}function zr(t){const e=C.c(18),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,{isFetching:d,isProbing:c,loadMore:m,hasMore:u,serverHasMore:f}=Ar("status",n,a),[x,p]=O.useState(!1);!x&&l.length===0&&f===!0&&!d&&!c&&(p(!0),queueMicrotask(()=>{m()}));let h;if(e[0]!==r||e[1]!==a||e[2]!==o||e[3]!==i||e[4]!==l){let j;e[6]!==r||e[7]!==a||e[8]!==o||e[9]!==i?(j=v=>s.jsx(os,{task:v,isActive:r===v.id,onClick:()=>i(v),onArchive:v.created_by===a.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[6]=r,e[7]=a,e[8]=o,e[9]=i,e[10]=j):j=e[10],h=l.map(j),e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=h}else h=e[5];let g;e[11]!==u||e[12]!==d||e[13]!==m?(g=(u||d)&&s.jsx(js,{onClick:()=>{m()},isFetching:d,indented:!0}),e[11]=u,e[12]=d,e[13]=m,e[14]=g):g=e[14];let b;return e[15]!==h||e[16]!==g?(b=s.jsxs(s.Fragment,{children:[h,g]}),e[15]=h,e[16]=g,e[17]=b):b=e[17],b}function Tr(t){const e=C.c(35),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,d=rl[n],c=d.icon,[m,u]=br(`status-${n}`,!1);let f;e[0]!==m||e[1]!==u?(f=function(){u(!m)},e[0]=m,e[1]=u,e[2]=f):f=e[2];const x=f;let p;e[3]!==x?(p=N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),x())},e[3]=x,e[4]=p):p=e[4];let h;e[5]!==c||e[6]!==d.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(c,{size:12,className:d.iconClassName})}),e[5]=c,e[6]=d.iconClassName,e[7]=h):h=e[7];let g;e[8]!==m?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(bt,{size:14}):s.jsx(ns,{size:14})}),e[8]=m,e[9]=g):g=e[9];let b;e[10]!==h||e[11]!==g?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,g]}),e[10]=h,e[11]=g,e[12]=b):b=e[12];let j;e[13]!==d.label?(j=s.jsx("span",{className:"flex-1 truncate",children:d.label}),e[13]=d.label,e[14]=j):j=e[14];let v;e[15]!==l.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==x||e[19]!==p||e[20]!==b||e[21]!==j||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:x,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,j,v]}),e[17]=m,e[18]=x,e[19]=p,e[20]=b,e[21]=j,e[22]=v,e[23]=y):y=e[23];let _;e[24]!==r||e[25]!==m||e[26]!==a||e[27]!==o||e[28]!==i||e[29]!==n||e[30]!==l?(_=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(zr,{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a})}),e[24]=r,e[25]=m,e[26]=a,e[27]=o,e[28]=i,e[29]=n,e[30]=l,e[31]=_):_=e[31];let k;return e[32]!==y||e[33]!==_?(k=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,_]}),e[32]=y,e[33]=_,e[34]=k):k=e[34],k}function Pt(t){const e=C.c(34),{threads:n,groupBy:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Xe,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const g=u?"No threads match your filters":"No threads yet";let b;return e[1]!==g?(b=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=b):b=e[2],b}if(l==="status"){let h;if(e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==n){let b;e[9]!==r||e[10]!==a||e[11]!==o||e[12]!==i?(b=j=>s.jsx(Tr,{status:j.status,threads:j.threads,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a},j.status),e[9]=r,e[10]=a,e[11]=o,e[12]=i,e[13]=b):b=e[13],h=Gl(n).map(b),e[3]=r,e[4]=a,e[5]=o,e[6]=i,e[7]=n,e[8]=h}else h=e[8];let g;return e[14]!==h?(g=s.jsx(s.Fragment,{children:h}),e[14]=h,e[15]=g):g=e[15],g}let f;if(e[16]!==r||e[17]!==a||e[18]!==o||e[19]!==i||e[20]!==n){let h;e[22]!==r||e[23]!==a||e[24]!==o||e[25]!==i?(h=g=>s.jsx(os,{task:g,isActive:r===g.id,onClick:()=>i(g),onArchive:g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[22]=r,e[23]=a,e[24]=o,e[25]=i,e[26]=h):h=e[26],f=n.map(h),e[16]=r,e[17]=a,e[18]=o,e[19]=i,e[20]=n,e[21]=f}else f=e[21];let x;e[27]!==d||e[28]!==c||e[29]!==m?(x=(d||c)&&s.jsx(js,{onClick:m,isFetching:c}),e[27]=d,e[28]=c,e[29]=m,e[30]=x):x=e[30];let p;return e[31]!==f||e[32]!==x?(p=s.jsxs(s.Fragment,{children:[f,x]}),e[31]=f,e[32]=x,e[33]=p):p=e[33],p}function Et(t){const e=C.c(17),{label:n,onClick:l,active:r,children:i}=t,[o,a]=O.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=r&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=B(f),e[4]=f,e[5]=x):x=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(p=s.jsx(he,{asChild:!0,children:s.jsx(ae,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=p):p=e[10];let h;e[11]!==n?(h=s.jsx(xe,{side:"bottom",children:n}),e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==o||e[14]!==p||e[15]!==h?(g=s.jsxs(pe,{open:o,children:[p,h]}),e[13]=o,e[14]=p,e[15]=h,e[16]=g):g=e[16],g}function tt(t){const e=C.c(13),{label:n,value:l,onChange:r,options:i}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==r?(a=u=>u&&r(u),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Mr),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Gn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function Mr(t){return s.jsxs(Un,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function Ns({onNavigate:t}={}){const{data:e}=be.useSession(),n=e?.user?.id,{org:l}=ee(),r=Yt({connectionId:Zt,orgId:l.id,orgSlug:l.slug}),i=Ge(l.id).id,o=ht(),{threads:a,hasMore:d,isFetchingMore:c,fetchNextPage:m}=gt(),u=a.filter(I=>!I.hidden),{hide:f}=ls(),x=ne(),{setTaskId:p,createNewTask:h}=pt(),g=ct({strict:!1}),b=Ke({strict:!1}),j=g.taskId??null,v=b.virtualmcpid??a.find(I=>I.id===j)?.virtual_mcp_id??null,y=()=>{t?.()},_=[...u].sort((I,H)=>(H.updated_at??"").localeCompare(I.updated_at??"")),[k,N]=O.useState("all"),[w,S]=O.useState("flat"),[A,M]=We("sidebar-threads-scope-all",!1),[$,z]=O.useState(!1),[F,G]=O.useState(!1),E={type:k,member:"mine",currentUserId:n??null},L=I=>n?I.filter(H=>H.created_by===n):[],R=I=>k==="automation"?I.filter(H=>!!H.trigger_id):k==="manual"?I.filter(H=>!H.trigger_id):I,P=L(_),X=R(P),Q=R(_),te=A?Q:X,T=I=>{if(n&&I.created_by&&I.created_by!==n)return;const H=I.id===j;if(f(I.id),!H)return;const V=P.find(U=>U.id!==I.id&&U.virtual_mcp_id===I.virtual_mcp_id);y(),V?p(V.id,V.virtual_mcp_id):x({to:"/$org",params:{org:l.slug}})},D=I=>{y(),p(I.id,I.virtual_mcp_id)},Y=async I=>{try{const H=await r.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:I,limit:1,offset:0}});return((H.structuredContent??H).items?.length??0)===0}catch{return!1}},q=async()=>{const I=v??i;ue("sidebar_new_thread_clicked",{virtual_mcp_id:I});const H=P.find(V=>V.virtual_mcp_id===I&&V.title==="New chat");if(H&&await Y(H.id)){y(),p(H.id,I);return}y(),h(I)},{state:le,isMobile:W,toggleSidebar:re}=ve();if(le==="collapsed"&&!W){const I=Ge(l.id),H=new Map((o??[]).map(U=>[U.id,U])),V=U=>(U?H.get(U):void 0)??(U===i?I:void 0);return s.jsxs(fe,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(K,{children:s.jsx(J,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:re,children:s.jsx(qt,{size:16})})}),s.jsx(K,{children:s.jsx(J,{tooltip:"New thread",onClick:()=>{q()},children:s.jsx(_t,{size:16})})}),te.map(U=>{const de=V(U.virtual_mcp_id);return s.jsx(K,{children:s.jsx(J,{tooltip:U.title||"New chat",isActive:U.id===j,onClick:()=>D(U),children:s.jsx(Te,{icon:de?.icon??null,name:de?.title??"Agent",size:"2xs"})})},U.id)})]})}const ce=w!=="flat"||k!=="all"||A===!0,ge=s.jsxs(De,{children:[s.jsxs(pe,{children:[s.jsx(he,{asChild:!0,children:s.jsx(je,{asChild:!0,children:s.jsxs(ae,{"aria-label":"Filter threads",active:ce,children:[s.jsx(Hn,{size:16}),ce&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(xe,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Pe,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(tt,{label:"View",value:w,onChange:I=>{ue("tasks_panel_group_by_changed",{to_value:I}),S(I)},options:[{value:"flat",label:"List",icon:s.jsx(xn,{size:13})},{value:"status",label:"Status",icon:s.jsx(pn,{size:13})}]}),s.jsx(tt,{label:"Type",value:k,onChange:I=>{ue("tasks_panel_filter_changed",{to_value:I}),N(I)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(tt,{label:"Scope",value:A?"team":"mine",onChange:I=>M(I==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),ye=I=>s.jsx(nt,{delayDuration:300,children:s.jsxs("div",{className:B("shrink-0 px-1 flex items-center justify-between",I?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!I&&s.jsx(is,{}),ge]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Et,{label:"Search threads",onClick:()=>{ue("tasks_panel_search_opened"),G(!0),z(!0)},children:s.jsx(hn,{size:16})}),s.jsx(Et,{label:"New thread",onClick:()=>{q()},children:s.jsx(_t,{size:16})})]})]})});return W?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ye(!0),s.jsx($t,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Pt,{threads:te,groupBy:w,activeTaskId:j,onSelectTask:D,onArchiveTask:T,filters:E,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ce})}),F&&s.jsx(zt,{open:$,onOpenChange:z})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ye(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx($t,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Pt,{threads:te,groupBy:w,activeTaskId:j,onSelectTask:D,onArchiveTask:T,filters:E,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ce})})}),F&&s.jsx(zt,{open:$,onOpenChange:z})]})}const Or=5,Dr=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function _s(){const t=C.c(3),{state:e}=ve();if(e==="collapsed"){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Or}).map(Rr)}),t[0]=r):r=t[0],r}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"})]}),s.jsx(oe,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Dr.map(Pr)})]}),t[2]=l):l=t[2],l}function Pr(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(oe,{className:"size-5 rounded-full shrink-0"}),s.jsx(oe,{className:B("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Er)})]},e)}function Er(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(oe,{className:"h-3 flex-1 rounded-sm"})},e)}function Rr(t,e){return s.jsx(oe,{className:"size-10 rounded-lg mx-auto"},e)}function Fr(){const t=C.c(4),e=cs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(fr,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ht,{children:s.jsx(O.Suspense,{fallback:s.jsx(_s,{}),children:s.jsx(Ns,{})})}),t[1]=l):l=t[1];let r;return t[2]!==e?(r=s.jsx(es,{children:s.jsx(us,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=r):r=t[3],r}function Lr(t){const e=C.c(8),{onClose:n}=t,l=cs();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(hr,{}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(_s,{}),e[1]=i):i=e[1];let o;e[2]!==n?(o=s.jsx(Ht,{children:s.jsx(O.Suspense,{fallback:i,children:s.jsx(Ns,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(es,{children:s.jsx(El,{sections:l,onClose:n,footer:r,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function ws(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Br=Bs({name:Hs().min(2,"Organization name is required")});function Hr(t){const e=C.c(41),{open:n,onOpenChange:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:Us(Br),defaultValues:{name:""}},e[0]=r):r=e[0];const i=Gs(r);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:Gr,onSuccess:Ur},e[1]=o):o=e[1];const a=qs(o),d=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ul,{children:[s.jsx(fl,{children:"Create a new organization"}),s.jsx(hl,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==a||e[4]!==i){let N;e[6]!==a?(N=w=>a.mutateAsync(w),e[6]=a,e[7]=N):N=e[7],m=i.handleSubmit(N),e[3]=a,e[4]=i,e[5]=m}else m=e[5];let u;e[8]!==i.formState.isSubmitting?(u=N=>{const{field:w}=N;return s.jsxs(jl,{children:[s.jsx(vl,{children:"Organization Name"}),s.jsx(yl,{children:s.jsx(_l,{...w,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(Sl,{children:"The name of your company or organization"}),w.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",ws(w.value)]})]}),s.jsx(Nl,{})]})},e[8]=i.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==i.control||e[11]!==u?(f=s.jsx(gl,{control:i.control,name:"name",render:u}),e[10]=i.control,e[11]=u,e[12]=f):f=e[12];let x;e[13]!==d?(x=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=x):x=e[14];let p;e[15]!==a||e[16]!==i?(p=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=p):p=e[17];let h;e[18]!==i.formState.isSubmitting||e[19]!==p?(h=s.jsx(dl,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=h):h=e[20];const g=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(il,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==g||e[24]!==b?(j=s.jsx(ze,{type:"submit",variant:"default",disabled:g,children:b}),e[23]=g,e[24]=b,e[25]=j):j=e[25];let v;e[26]!==j||e[27]!==h?(v=s.jsxs(xl,{children:[h,j]}),e[26]=j,e[27]=h,e[28]=v):v=e[28];let y;e[29]!==v||e[30]!==m||e[31]!==f||e[32]!==x?(y=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,x,v]}),e[29]=v,e[30]=m,e[31]=f,e[32]=x,e[33]=y):y=e[33];let _;e[34]!==i||e[35]!==y?(_=s.jsxs(ml,{children:[c,s.jsx(bl,{...i,children:y})]}),e[34]=i,e[35]=y,e[36]=_):_=e[36];let k;return e[37]!==l||e[38]!==n||e[39]!==_?(k=s.jsx(pl,{open:n,onOpenChange:l,children:_}),e[37]=l,e[38]=n,e[39]=_,e[40]=k):k=e[40],k}function Ur(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Gr(t){const e=ws(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await be.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function qr(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function Cs(t){const e=C.c(13),{org:n,size:l}=t,r=l===void 0?"sm":l,i=r==="xs"?"size-5":"size-6",o=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=B(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:qr(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:B("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function Wr(t){const e=C.c(24),{orgParam:n,onSelectOrg:l,onCreateOrg:r}=t,{data:i}=Ws();let o;e[0]!==n?(o=(S,A)=>S.slug===n?-1:A.slug===n?1:S.name.localeCompare(A.name),e[0]=n,e[1]=o):o=e[1];const a=[...i??[]].sort(o),[d,c]=O.useState(""),m=d.toLowerCase(),u=m?a.filter(S=>S.name.toLowerCase().includes(m)||S.slug.toLowerCase().includes(m)):a;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(as,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=f):f=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=S=>c(S.target.value),e[3]=x):x=e[3];let p;e[4]!==d?(p=S=>S.key==="Escape"&&d&&c(""),e[4]=d,e[5]=p):p=e[5];let h;e[6]!==d||e[7]!==p?(h=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:x,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=h):h=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($e,{size:16}),e[9]=g):g=e[9];let b;e[10]!==r?(b=s.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:g}),e[10]=r,e[11]=b):b=e[11];let j;e[12]!==h||e[13]!==b?(j=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[f,h,b]}),e[12]=h,e[13]=b,e[14]=j):j=e[14];const v="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",y=u.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let _;e[15]!==l||e[16]!==n?(_=S=>s.jsxs("button",{type:"button",onClick:()=>l(S.slug),className:B("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",S.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(Cs,{org:S,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:S.slug})]}),S.slug===n&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},S.id),e[15]=l,e[16]=n,e[17]=_):_=e[17];const k=u.map(_);let N;e[18]!==y||e[19]!==k?(N=s.jsxs("div",{className:v,children:[y,k]}),e[18]=y,e[19]=k,e[20]=N):N=e[20];let w;return e[21]!==N||e[22]!==j?(w=s.jsxs(s.Fragment,{children:[j,N]}),e[21]=N,e[22]=j,e[23]=w):w=e[23],w}function Kr(t){const e=C.c(22),{trigger:n,orgParam:l,align:r,side:i}=t,o=r===void 0?"start":r,a=i===void 0?"bottom":i,d=ne(),[c,m]=O.useState(!1),[u,f]=O.useState(!1);let x;e[0]!==n?(x=s.jsx(je,{asChild:!0,children:n}),e[0]=n,e[1]=x):x=e[1];const p=String(c);let h;e[2]!==d?(h=k=>{m(!1),d({to:"/$org",params:{org:k}})},e[2]=d,e[3]=h):h=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{m(!1),f(!0)},e[4]=g):g=e[4];let b;e[5]!==l||e[6]!==p||e[7]!==h?(b=s.jsx(Wr,{orgParam:l,onSelectOrg:h,onCreateOrg:g},p),e[5]=l,e[6]=p,e[7]=h,e[8]=b):b=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==b?(j=s.jsx(Pe,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Xr,onCloseAutoFocus:Vr,children:b}),e[9]=o,e[10]=a,e[11]=b,e[12]=j):j=e[12];let v;e[13]!==c||e[14]!==x||e[15]!==j?(v=s.jsxs(De,{open:c,onOpenChange:m,children:[x,j]}),e[13]=c,e[14]=x,e[15]=j,e[16]=v):v=e[16];let y;e[17]!==u?(y=s.jsx(Hr,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let _;return e[19]!==y||e[20]!==v?(_=s.jsxs(s.Fragment,{children:[v,y]}),e[19]=y,e[20]=v,e[21]=_):_=e[21],_}function Vr(t){return t.preventDefault()}function Xr(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Qr(t){const e=C.c(21),{value:n,onChange:l,placeholder:r,onKeyDown:i,className:o,isSearching:a,disabled:d}=t,c=r===void 0?"Search...":r;let m;e[0]!==o?(m=B("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=B("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let x;e[4]!==a?(x=a?s.jsx(Bt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(as,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=x):x=e[5];let p;e[6]!==l?(p=j=>l(j.target.value),e[6]=l,e[7]=p):p=e[7];let h;e[8]!==d||e[9]!==i||e[10]!==c||e[11]!==p||e[12]!==n?(h=s.jsx("input",{type:"text",value:n,onChange:p,onKeyDown:i,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=i,e[10]=c,e[11]=p,e[12]=n,e[13]=h):h=e[13];let g;e[14]!==f||e[15]!==x||e[16]!==h?(g=s.jsxs("label",{className:f,children:[x,h]}),e[14]=f,e[15]=x,e[16]=h,e[17]=g):g=e[17];let b;return e[18]!==m||e[19]!==g?(b=s.jsx("div",{className:m,children:g}),e[18]=m,e[19]=g,e[20]=b):b=e[20],b}const Yr="Select an existing agent";function Jr(t){const e=C.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(he,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(xe,{side:"right",sideOffset:8,children:Yr}),e[2]=r):r=e[2];let i;return e[3]!==l?(i=s.jsxs(pe,{defaultOpen:!0,delayDuration:0,children:[l,r]}),e[3]=l,e[4]=i):i=e[4],i}function Zr(t){const e=ne(),{create:n}=ls(),{locator:l}=ee(),r=ct({strict:!1}),i=Ke({strict:!1});return async o=>{const a=crypto.randomUUID(),d=o===i.virtualmcpid?Bn(t,l,r.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function Rt(t){const e=C.c(20),{agent:n,selected:l,onClick:r}=t,i=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==i?(o=B("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(Te,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==r||e[15]!==o||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:r,className:o,children:[a,m,u]}),e[14]=r,e[15]=o,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function ei(t){const e=C.c(24),{onClose:n,onSelectAgent:l,selectedAgentId:r}=t,[i,o]=O.useState(""),a=ht(),d=a??[],{org:c}=ee(),{data:m}=be.useSession(),u=m?.user?.id??"anon",f=kn(a),x=In(),p=Zr(c.slug),h=Tn(a),g=i.toLowerCase(),b=d.filter(si).filter(P=>!h.has(P.id)).filter(ti).filter(P=>!i||P.title.toLowerCase().includes(g)),j=Ge(c.id),v=!i||j.title.toLowerCase().includes(g),y=!!(l&&v);let _;e[0]!==n||e[1]!==l?(_=()=>{l?.(null),n(),o("")},e[0]=n,e[1]=l,e[2]=_):_=e[2];const k=_,N=P=>{if(l){l(P.id),n(),o("");return}An({orgId:c.id,userId:u},P.id,f),x(),n(),o(""),p(P.id)},w="flex flex-col max-h-[min(640px,80dvh)]";let S;e[3]!==i?(S=s.jsx(Qr,{value:i,onChange:o,placeholder:"Search agents..."}),e[3]=i,e[4]=S):S=e[4];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-1",M=l&&v&&j&&s.jsx(Rt,{agent:j,selected:!r||r===j.id,onClick:k}),$=b.map(P=>s.jsx(Rt,{agent:P,selected:l?r===P.id:void 0,onClick:()=>N(P)},P.id));let z;e[5]!==y||e[6]!==i||e[7]!==b.length?(z=b.length===0&&!y&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[5]=y,e[6]=i,e[7]=b.length,e[8]=z):z=e[8];let F;e[9]!==M||e[10]!==$||e[11]!==z?(F=s.jsxs("div",{className:A,children:[M,$,z]}),e[9]=M,e[10]=$,e[11]=z,e[12]=F):F=e[12];let G;e[13]!==c.slug?(G={org:c.slug},e[13]=c.slug,e[14]=G):G=e[14];let E;e[15]!==n?(E=()=>n(),e[15]=n,e[16]=E):E=e[16];let L;e[17]!==E||e[18]!==G?(L=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ut,{to:"/$org/settings/agents",params:G,onClick:E,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[17]=E,e[18]=G,e[19]=L):L=e[19];let R;return e[20]!==L||e[21]!==S||e[22]!==F?(R=s.jsxs("div",{className:w,children:[S,F,L]}),e[20]=L,e[21]=S,e[22]=F,e[23]=R):R=e[23],R}function ti(t){return!Sn(t.id)}function si(t){return!Jt(t.id)}function ni(t){const e=C.c(23);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:r,onSelectAgent:i,selectedAgentId:o,side:a,align:d}=n,c=l===void 0?!1:l,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,x]=O.useState(!1),p=ft(),{setOpenMobile:h}=ve(),g=Cn(),b=g?"border border-border":void 0;let j;e[2]!==g?(j=S=>g?s.jsx(Jr,{children:S}):S,e[2]=g,e[3]=j):j=e[3];const v=j;let y;e[4]!==p||e[5]!==h?(y=()=>{x(!1),p&&h(!1)},e[4]=p,e[5]=h,e[6]=y):y=e[6];const _=y;let k;e[7]!==_||e[8]!==i||e[9]!==f||e[10]!==o?(k=f&&s.jsx(O.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(oe,{className:"h-4 w-24"})}),children:s.jsx(ei,{onClose:_,onSelectAgent:i,selectedAgentId:o})}),e[7]=_,e[8]=i,e[9]=f,e[10]=o,e[11]=k):k=e[11];const N=k;let w;return e[12]!==u||e[13]!==c||e[14]!==b||e[15]!==g||e[16]!==p||e[17]!==f||e[18]!==N||e[19]!==m||e[20]!==r||e[21]!==v?(w=s.jsx(s.Fragment,{children:p?s.jsxs(s.Fragment,{children:[r?s.jsx("button",{type:"button",onClick:()=>x(!0),className:"contents",children:r}):c?v(s.jsx(ae,{"aria-label":"Browse agents",className:B(b),onClick:()=>{ue("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:s.jsx($e,{className:"size-4"})})):s.jsx(K,{children:v(s.jsxs(J,{tooltip:g?void 0:"Browse agents",className:B(b),onClick:()=>{ue("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Wt,{open:f,onOpenChange:x,direction:"bottom",children:s.jsxs(Kt,{className:"max-h-[85dvh] p-0",children:[s.jsx(Vt,{className:"sr-only",children:"Browse agents"}),N]})})]}):s.jsxs(De,{open:f,onOpenChange:S=>{S&&!f&&ue("agent_browser_opened",{surface:"desktop_popover"}),x(S)},children:[r?s.jsx(je,{asChild:!0,children:r}):c?v(s.jsx(je,{asChild:!0,children:s.jsx(ae,{"aria-label":"Browse agents",className:B(b),children:s.jsx($e,{className:"size-4"})})})):s.jsx(K,{children:v(s.jsx(je,{asChild:!0,children:s.jsxs(J,{tooltip:g?void 0:"Browse agents",className:B(b),children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Pe,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:N})]})}),e[12]=u,e[13]=c,e[14]=b,e[15]=g,e[16]=p,e[17]=f,e[18]=N,e[19]=m,e[20]=r,e[21]=v,e[22]=w):w=e[22],w}const ks="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-1.5 py-1 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function li(t){const e=C.c(19),{agentId:n,onOpenHome:l,onPick:r}=t,i=xt(n),o=i?.title??"Decopilot",a=`Open ${o} home`,d=i?.icon??null;let c;e[0]!==d||e[1]!==o?(c=s.jsx(Te,{icon:d,name:o,size:"2xs"}),e[0]=d,e[1]=o,e[2]=c):c=e[2];let m;e[3]!==l||e[4]!==a||e[5]!==c?(m=s.jsx("button",{type:"button",onClick:l,"aria-label":a,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:c}),e[3]=l,e[4]=a,e[5]=c,e[6]=m):m=e[6];let u;e[7]!==o?(u=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:o}),e[7]=o,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=f):f=e[9];let x;e[10]!==u?(x=s.jsxs("button",{type:"button",className:ks,children:[u,f]}),e[10]=u,e[11]=x):x=e[11];let p;e[12]!==n||e[13]!==r||e[14]!==x?(p=s.jsx(ni,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=p):p=e[15];let h;return e[16]!==m||e[17]!==p?(h=s.jsxs("div",{className:"flex items-center gap-0.5",children:[m,p]}),e[16]=m,e[17]=p,e[18]=h):h=e[18],h}function Ft(){const t=C.c(33),{org:e}=ee(),{state:n}=ve(),l=n==="collapsed",r=ne();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const o=ct(i);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const d=Ke(a),{threads:c}=gt(),{setTaskId:m,createNewTask:u}=pt();let f;t[2]!==e.id?(f=Ge(e.id),t[2]=e.id,t[3]=f):f=t[3];const x=f.id,p=o.taskId?d.virtualmcpid??x:x;let h;t[4]!==u||t[5]!==x||t[6]!==r||t[7]!==e.slug||t[8]!==m||t[9]!==c?(h=A=>{if(!A||A===x){r({to:"/$org",params:{org:e.slug}});return}const M=c.find($=>!$.hidden&&$.virtual_mcp_id===A&&$.title==="New chat"&&(!$.status||$.status==="in_progress"));M?m(M.id,A):u(A)},t[4]=u,t[5]=x,t[6]=r,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=h):h=t[10];const g=h;let b;t[11]!==e.slug?(b={org:e.slug},t[11]=e.slug,t[12]=b):b=t[12];let j;t[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Z.Logo,{}),t[13]=j):j=t[13];let v;t[14]!==b?(v=s.jsx(Ut,{to:"/$org",params:b,"aria-label":"Organization home",title:"Home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer rounded-md px-1 hover:bg-accent/60 transition-colors",children:j}),t[14]=b,t[15]=v):v=t[15];let y;t[16]!==e||t[17]!==l?(y=!l&&s.jsx(Kr,{orgParam:e.slug,trigger:s.jsxs("button",{type:"button",className:ks,children:[s.jsx(Cs,{org:e,size:"xs"}),s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:e.name}),s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"})]})}),t[16]=e,t[17]=l,t[18]=y):y=t[18];let _;t[19]!==v||t[20]!==y?(_=s.jsxs(Ct,{className:"gap-0.5",children:[v,y]}),t[19]=v,t[20]=y,t[21]=_):_=t[21];let k;t[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("span",{className:"h-4 w-24 rounded bg-muted animate-pulse"}),t[22]=k):k=t[22];let N;t[23]!==p||t[24]!==g?(N=()=>g(p),t[23]=p,t[24]=g,t[25]=N):N=t[25];let w;t[26]!==p||t[27]!==g||t[28]!==N?(w=s.jsx(Ct,{children:s.jsx(O.Suspense,{fallback:k,children:s.jsx(li,{agentId:p,onOpenHome:N,onPick:g})})}),t[26]=p,t[27]=g,t[28]=N,t[29]=w):w=t[29];let S;return t[30]!==w||t[31]!==_?(S=s.jsx(al,{className:"wco-no-drag",children:s.jsxs(cl,{className:"flex-nowrap",children:[_,w]})}),t[30]=w,t[31]=_,t[32]=S):S=t[32],S}const ri="sidebar.open";function ii(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Vs,{}),t[0]=e):e=t[0],e}function _a(){const t=C.c(24),e=ft(),[n,l]=We(ri,!1),{width:r,wrapperRef:i,onStartResize:o,resetWidth:a}=Il();let d;t[0]!==e?(d=e?s.jsxs(Z.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[s.jsx(is,{}),s.jsx(Ft,{}),s.jsx(ot,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(Z.TogglesSlot,{}),s.jsx(Z.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(Z.CenterSlot,{}),s.jsx(Z.RightSlot,{})]}):s.jsxs(Z.Header,{children:[s.jsx(Z.LeftColumn,{children:s.jsx(Ft,{})}),s.jsx(Z.CenterSlot,{}),s.jsxs(Z.RightColumn,{children:[s.jsxs("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:[s.jsx(Z.TogglesSlot,{}),s.jsx(Z.TabsSlot,{})]}),s.jsx(Z.RightSlot,{})]})]}),t[0]=e,t[1]=d):d=t[1];const c=`${r}px`;let m;t[2]!==c?(m={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},t[2]=c,t[3]=m):m=t[3];const u=m;let f;t[4]!==e||t[5]!==o||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Fr,{}),s.jsx(wl,{onPointerDown:o,onDoubleClick:a})]}),t[4]=e,t[5]=o,t[6]=a,t[7]=f):f=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[8]=x):x=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ys,{className:"flex flex-col",style:x,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(O.Suspense,{fallback:s.jsx(ii,{}),children:s.jsx(Ks,{})})})})}),t[9]=p):p=t[9];let h;t[10]!==u||t[11]!==f||t[12]!==i?(h=s.jsxs(Js,{ref:i,className:"flex-1 bg-sidebar relative min-h-0",style:u,children:[f,p]}),t[10]=u,t[11]=f,t[12]=i,t[13]=h):h=t[13];let g;t[14]!==e?(g=e&&s.jsx(ll,{renderSidebar:oi}),t[14]=e,t[15]=g):g=t[15];let b;t[16]!==d||t[17]!==h||t[18]!==g?(b=s.jsx(ol,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[d,h,g]})}),t[16]=d,t[17]=h,t[18]=g,t[19]=b):b=t[19];let j;return t[20]!==l||t[21]!==n||t[22]!==b?(j=s.jsx(Wn,{children:s.jsx(Z.Provider,{children:s.jsx(Zs,{open:n,onOpenChange:l,children:b})})}),t[20]=l,t[21]=n,t[22]=b,t[23]=j):j=t[23],j}function oi(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Lr,{onClose:e})})})}export{_a as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,a3 as R}from"./index-
|
|
1
|
+
import{r as a,a3 as R}from"./index-BA6MEFz3.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,D as ce,m as Ze,d as We,K as Q,k as ie,aV as kn,r as k,aF as Ss,l as de,j as l,I as Ns,i as zs,B as Z,a0 as Sn,t as ue,a2 as Cs,T as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-CVreeNNf.js";import{i as Es}from"./ChevronRight-R_IgGJ90.js";import{s as Cn}from"./Eye-DSPSvd-z.js";import{n as Ge,i as yt}from"./Globe01-BwEqc3Zi.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,h as Ls,d as Os}from"./ZoomOut-GeKL8STS.js";import{a as ht}from"./Palette-CjYrZKAr.js";import{s as Rs}from"./Plus-B8hmYxTd.js";import{i as As}from"./SearchLg-QTo8IwQN.js";import{t as _s}from"./Stars01-AnTTTVLS.js";import{i as mt}from"./Upload01-z0eaJfaS.js";import{s as Pn}from"./XClose-CytiRqor.js";import{i as qt}from"./Zap-DlYvu5VF.js";import{u as En}from"./use-mobile-7TG0ePDd.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Vs,g as Gs}from"./alert-dialog-Da7c7cgA.js";import{c as Dn,a as Ue,d as Je,e as et,f as Tn,b as Xs,D as Qs}from"./dialog-C17LEi_J.js";import{I as Xe}from"./input-hcZc7h3D.js";import{S as oe}from"./skeleton-DLI5J-FI.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-Cto1R_1_.js";import{T as Ys}from"./toolbar-D8RAkN2H.js";import{u as Zs}from"./use-debounced-value-D5uOdNo-.js";import{i as vt}from"./DotsVertical-D7yw7BOZ.js";import{i as Mn}from"./Key01-lDuHTtYR.js";import{s as wt}from"./Trash01-D6ySBQyD.js";import{a as tt,b as nt,D as st,c as be}from"./dropdown-menu-CDYo85Ch.js";import{T as Js}from"./textarea-D_hHTNRc.js";import{t as el}from"./ChevronDown-DScAH69v.js";import{n as tl}from"./ChevronUp-DbQrNNT7.js";import{i as pt}from"./X-CmY2dI4A.js";import{a as nl,P as sl,b as ll}from"./popover-CrQP6J1V.js";import{T as ye,a as ve,b as we}from"./tooltip-D2fONB1l.js";import{i as rl}from"./Check-BmisW-gO.js";import{a as il}from"./Copy01-Cdi4qY0f.js";import{n as In}from"./LinkExternal01-Bws57Ghu.js";import{l as al,F as ol}from"./index-CMSBFE9x.js";import{i as cl}from"./LayoutLeft-BCd4DxZL.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],ie(a)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const a=n!==null;let o;s[4]!==t?(o=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=o):o=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==a||s[12]!==o||s[13]!==c?(d={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},s[10]=i,s[11]=a,s[12]=o,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==r.slug?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=o):o=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},t[5]=i,t[6]=a,t[7]=o,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const a=n.length>0;let o;t[3]!==s||t[4]!==r.slug||t[5]!==n?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=o):o=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c={queryKey:i,enabled:a,placeholderData:kn,queryFn:o},t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],ie(c)}function Da(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const o=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==s||e[5]!==r||e[6]!==i?(a={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=a):a=e[7],ie(a)}function ml(n){return{volume:n.volume,path:n.path}}async function Ta(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Fa(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&o.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):a.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){a.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),a.sort(),{files:d,omittedPaths:a}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let a;e[7]!==s?(a=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==n?(a=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==i||e[8]!==a?(o={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=o):o=e[9];const c=We(o);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Gt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Gt(a),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:o,minSize:c},id:v,idIsFromProps:a!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=a!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=o,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Vn)!==0,r=(e&Gn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,a={a:t.a.at(-1),b:t.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Vn=2,Gn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:a}=e,o={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(a))!==null&&i!==void 0?i:0;return Te.set(a,c+1),Qe.add(o),xt(),function(){var f;St.delete(n),Qe.delete(o);const u=(f=Te.get(a))!==null&&f!==void 0?f:1;if(Te.set(a,u-1),xt(),u===1&&Te.delete(a),xe.includes(o)){const h=xe.indexOf(o);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:a}=r,o=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=o,h=Ml?a.coarse:a.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),o)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:a=100,minSize:o=0}=s;if(Me(t,o)<0)if(i){const c=(r+o)/2;Me(t,c)<0?t=r:t=o}else t=o;return t=Math.min(a,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const a=[...e],[o,c]=s;G(o!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:o,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?o:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:o,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?o:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,a[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,a))return r;{const u=n<0?c:o,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(a[u]=p,!me(p,m)){let g=m-p,x=n<0?c:o;for(;x>=0&&x<t.length;){const y=a[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,a[x]=N),me(g,0))break;n>0?x--:x++}}}const f=a.reduce((u,h)=>h+u,0);return me(f,100)?a:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,a=0;const o=t[0];G(o!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===o?(s=g,r=p):(i+=g,a+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-a),f=n[o];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,a,o;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(a=(o=t[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:a}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const o=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=o[c];if(h!=null){const m=r[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{o.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const o=e.current;G(o,"Eager values not found");const{panelDataArray:c}=o,d=Jn(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&a(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,a])}function on(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",a=Nt(e,r);G(a,`No resize handle element found for id "${e}"`);const o=a.getAttribute(se.groupId);G(o,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(o,r);G(f,`No group element found for id "${o}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const a=t==="horizontal";let o=0;n.shiftKey?o=100:r!=null?o=r:o=10;let c=0;switch(n.key){case"ArrowDown":c=a?0:o;break;case"ArrowLeft":c=a?-o:0;break;case"ArrowRight":c=a?o:0;break;case"ArrowUp":c=a?0:-o;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;o!=null&&(s++,e[i]=o,r-=o)}for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;if(o!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];G(i,`Panel data not found for index ${r}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:d=0,collapsible:f}=o,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=a;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const a=t[r];let o;return a==null?o=n!=null?n.toPrecision(i):"1":s.length===1?o="1":o=a.toPrecision(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},a=ns(e);return(r=i[a])!==null&&r!==void 0?r:null}function Gl(n,e,t,s,r){var i;const a=ts(n),o=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(a,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,a)=>i+a,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=100/s*a;t[i]=o}let r=0;for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=Ae({panelConstraints:e,panelIndex:i,size:a});a!=o&&(r+=a-o,t[i]=o)}if(!me(r,0))for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=a+r,c=Ae({panelConstraints:e,panelIndex:i,size:o});if(a!==c&&(r-=c-a,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:o,onLayout:a,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});on(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=a,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Gl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(G(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,ae=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,ae)||(x(ae),w.current.layout=ae,R&&R(ae),Ie(T,ae,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return G(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});on(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let ae=Hl(T,S,Y,te,E,H);const ot=Y==="horizontal";ot&&O&&(ae=-ae);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:ae,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=ae&&(z.current=ae,!ct&&ae!==0?ot?Lt(S,ae<0?Wn:Vn):Lt(S,ae<0?Gn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);G(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),V=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);G(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:V,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,V,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],a=t[s];return{...e.constraints,panelSize:a,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),t(a);break}case"F6":{a.preventDefault();const o=r.getAttribute(se.groupId);G(o,`No group element found for id "${o}"`);const c=Ye(o,s),d=Yn(o,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:a,onDragging:o,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:a,onDragging:o,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=a,y.current.onDragging=o,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Gt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),V=k.useRef({state:v});Fe(()=>{V.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;G(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,G(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=V.current;K=!0,T!=="drag"&&P("hover"),G(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let a;return e[6]!==s||e[7]!==r||e[8]!==i?(a=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("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 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let a;e[6]!==r?(a=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=a):a=e[7];let o;return e[8]!==s||e[9]!==i||e[10]!==a?(o=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:a}),e[8]=s,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Ma(n){return`/${sr(n)}`}const Ia=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function La(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Oa(n,e){return e==="directory"?n:rr(n)}function Ra(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Aa(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function _a(n,e){return ir(n)>=lr&&!e.has(n)}function Ua(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ba(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ha(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function qa(n,e=[]){const t={children:[]},s=i=>{const o=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of o){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const o=Ut(i).split("/").filter(Boolean);let c=t,d="";o.forEach((f,u)=>{d+=`/${f}`;const h=u===o.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((a,o)=>a.kind!==o.kind?a.kind==="directory"?-1:1:a.name.localeCompare(o.name));for(const a of i)a.children.length>0&&r(a.children)};return r(t.children),t.children}function or(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...or(r.children,e,t+1)));return s}function Ka(n){return n.split(`
|
|
1
|
+
import{c as $,D as ce,m as Ze,d as We,K as Q,k as ie,aV as kn,r as k,aF as Ss,l as de,j as l,I as Ns,i as zs,B as Z,a0 as Sn,t as ue,a2 as Cs,T as $s,e as Ps,b as Nn,u as zn,E as Tt}from"./index-BA6MEFz3.js";import{i as Es}from"./ChevronRight-B75PqmYX.js";import{s as Cn}from"./Eye-D-YpM90d.js";import{n as Ge,i as yt}from"./Globe01-DZORk1uT.js";import{b as Ds,c as Ts,e as Fs,i as Ms,f as $n,a as Ht,g as Is,h as Ls,d as Os}from"./ZoomOut-DR7cyN4K.js";import{a as ht}from"./Palette-BvI4deLd.js";import{s as Rs}from"./Plus-DNKnv5L0.js";import{i as As}from"./SearchLg-DgYYZyay.js";import{t as _s}from"./Stars01-D6aSfSxI.js";import{i as mt}from"./Upload01-ylEW-8Jh.js";import{s as Pn}from"./XClose-C_DB8bTF.js";import{i as qt}from"./Zap-DDWdY0py.js";import{u as En}from"./use-mobile-CMHXuZqn.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Vs,g as Gs}from"./alert-dialog--OYtNHex.js";import{c as Dn,a as Ue,d as Je,e as et,f as Tn,b as Xs,D as Qs}from"./dialog-_hE_KOWl.js";import{I as Xe}from"./input-CYJ6kUlp.js";import{S as oe}from"./skeleton-BVVuuVur.js";import{F as Se,M as Kt,d as Fn}from"./file-type-icon-BcWEcM5c.js";import{T as Ys}from"./toolbar-B-vgyiTk.js";import{u as Zs}from"./use-debounced-value-hqGQaL9P.js";import{i as vt}from"./DotsVertical-DoBweSC-.js";import{i as Mn}from"./Key01-RL91nuMn.js";import{s as wt}from"./Trash01-D5xSRQNP.js";import{a as tt,b as nt,D as st,c as be}from"./dropdown-menu-DAL2YRm5.js";import{T as Js}from"./textarea-DsHCObgc.js";import{t as el}from"./ChevronDown-BlcivPHY.js";import{n as tl}from"./ChevronUp-BhDTTb3S.js";import{i as pt}from"./X-DOqFVerl.js";import{a as nl,P as sl,b as ll}from"./popover-DDOWAzXR.js";import{T as ye,a as ve,b as we}from"./tooltip-CmXkfLQY.js";import{i as rl}from"./Check-DScGPgJ3.js";import{a as il}from"./Copy01-BDuCjG41.js";import{n as In}from"./LinkExternal01-D2_coX1W.js";import{l as al,F as ol}from"./index-P21g_sy1.js";import{i as cl}from"./LayoutLeft-CMLuVn59.js";function Ln(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Wt(n,e){const t=$.c(11),{org:s}=ce();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(dl),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let a;return t[8]!==r||t[9]!==i?(a={queryKey:r,placeholderData:kn,queryFn:i},t[8]=r,t[9]=i,t[10]=a):a=t[10],ie(a)}function dl(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function On(n,e,t){const s=$.c(15),{org:r}=ce();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const a=n!==null;let o;s[4]!==t?(o=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=o):o=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==a||s[12]!==o||s[13]!==c?(d={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},s[10]=i,s[11]=a,s[12]=o,s[13]=c,s[14]=d):d=s[14],ie(d)}function ul(n){const e=$.c(9),{org:t}=ce();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function fl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=ce();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==r.slug?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=o):o=t[4];let c;return t[5]!==i||t[6]!==a||t[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},t[5]=i,t[6]=a,t[7]=o,t[8]=c):c=t[8],ie(c)}function hl(n,e){const t=$.c(11),s=50,{org:r}=ce();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const a=n.length>0;let o;t[3]!==s||t[4]!==r.slug||t[5]!==n?(o=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=o):o=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==o?(c={queryKey:i,enabled:a,placeholderData:kn,queryFn:o},t[7]=i,t[8]=a,t[9]=o,t[10]=c):c=t[10],ie(c)}function Da(n){const e=$.c(8),{org:t}=ce();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const o=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(ml)},e[2]=t.slug,e[3]=i):i=e[3];let a;return e[4]!==s||e[5]!==r||e[6]!==i?(a={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=a):a=e[7],ie(a)}function ml(n){return{volume:n.volume,path:n.path}}async function Ta(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function pl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const xl=new Set(["md","mdx","markdown","txt","text"]),gl=25,bl=64*1024,yl=256*1024,vl=4;function wl(n){const e=n.lastIndexOf(".");return e===-1?!1:xl.has(n.slice(e+1).toLowerCase())}async function Fa(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<vl&&o.push({path:m.path,depth:u.depth+1});continue}wl(m.path)&&m.size<=bl&&i.length<gl?i.push(m.path):a.push(r(m.path))}}const c=await Promise.all(i.map(u=>pl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>yl){a.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),a.sort(),{files:d,omittedPaths:a}}function Rn(){const n=$.c(7),{org:e}=ce();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function jl(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=ce();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function An(n){const e=$.c(3),{org:t}=ce();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function kl(n){const e=$.c(18),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let a;e[7]!==s?(a=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=c):c=e[17],We(c)}function At(n){const e=$.c(26),{org:t}=ce(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let a;e[4]!==t||e[5]!==n?(a=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==i||e[8]!==a?(o={mutationFn:a,onSettled:i},e[7]=i,e[8]=a,e[9]=o):o=e[9];const c=We(o);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,sn=Ss.useId,Sl=typeof sn=="function"?sn:()=>null;let Nl=0;function Gt(n=null){const e=Sl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+Nl++),n??t.current}function _n({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Gt(a),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:o,minSize:c},id:v,idIsFromProps:a!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,B={..._};P.current.id=v,P.current.idIsFromProps=a!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=o,_.minSize=c,(B.collapsedSize!==_.collapsedSize||B.collapsible!==_.collapsible||B.maxSize!==_.maxSize||B.minSize!==_.minSize)&&w(P.current,B)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Un=k.forwardRef((n,e)=>k.createElement(_n,{...n,forwardedRef:e}));_n.displayName="Panel";Un.displayName="forwardRef(Panel)";let _t=null,ft=-1,Ce=null;function zl(n,e){if(e){const t=(e&Wn)!==0,s=(e&Vn)!==0,r=(e&Gn)!==0,i=(e&Xn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Cl(){Ce!==null&&(document.head.removeChild(Ce),_t=null,Ce=null,ft=-1)}function Ft(n,e){var t,s;const r=zl(n,e);if(_t!==r){if(_t=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Bn(n){return n.type==="keydown"}function Hn(n){return n.type.startsWith("pointer")}function qn(n){return n.type.startsWith("mouse")}function kt(n){if(Hn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(qn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function $l(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Pl(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function El(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;G(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:rn(ln(t.a)),b:rn(ln(t.b))};if(r.a===r.b){const i=s.childNodes,a={a:t.a.at(-1),b:t.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(r.a-r.b)}const Dl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Tl(n){var e;const t=getComputedStyle((e=Kn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Fl(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Tl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Dl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function ln(n){let e=n.length;for(;e--;){const t=n[e];if(G(t,"Missing node"),Fl(t))return t}return null}function rn(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Kn(n);return e}function Kn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Wn=1,Vn=2,Gn=4,Xn=8,Ml=$l()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Il(n,e,t,s,r){var i;const{ownerDocument:a}=e,o={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(a))!==null&&i!==void 0?i:0;return Te.set(a,c+1),Qe.add(o),xt(),function(){var f;St.delete(n),Qe.delete(o);const u=(f=Te.get(a))!==null&&f!==void 0?f:1;if(Te.set(a,u-1),xt(),u===1&&Te.delete(a),xe.includes(o)){const h=xe.indexOf(o);h>=0&&xe.splice(h,1),Qt(),r("up",!0,null)}}}function Ll(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Xt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Qn(e)||n.stopImmediatePropagation())}function Mt(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Xt({target:s,x:e,y:t})}gt("move",n),Qt(),xe.length>0&&n.preventDefault()}function It(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Qn(e)||n.stopImmediatePropagation()),gt("up",n),Xt({target:e,x:t,y:s}),Qt(),xt()}function Qn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Xt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:a}=r,o=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=o,h=Ml?a.coarse:a.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&El(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(Pl(p.getBoundingClientRect(),o)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Lt(n,e){St.set(n,e)}function Qt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Ft("intersection",t):n?Ft("horizontal",t):e?Ft("vertical",t):Cl()}let Ot=new AbortController;function xt(){Ot.abort(),Ot=new AbortController;const n={capture:!0,signal:Ot.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",It,n),s.addEventListener("pointerleave",Mt,n),s.addEventListener("pointermove",Mt,n))}),window.addEventListener("pointerup",It,n),window.addEventListener("pointercancel",It,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ll,n),s.addEventListener("pointermove",Mt,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Ol(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function G(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Rl(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];G(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:a=100,minSize:o=0}=s;if(Me(t,o)<0)if(i){const c=(r+o)/2;Me(t,c)<0?t=r:t=o}else t=o;return t=Math.min(a,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const a=[...e],[o,c]=s;G(o!=null,"Invalid first pivot index"),G(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:o,h=t[u];G(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?o:c,h=t[u];G(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(G(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:o,m=0;for(;;){const g=e[h];G(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?o:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];G(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,a[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Rl(r,a))return r;{const u=n<0?c:o,h=e[u];G(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(a[u]=p,!me(p,m)){let g=m-p,x=n<0?c:o;for(;x>=0&&x<t.length;){const y=a[x];G(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,a[x]=N),me(g,0))break;n>0?x--:x++}}}const f=a.reduce((u,h)=>h+u,0);return me(f,100)?a:r}function Al({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,a=0;const o=t[0];G(o!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===o?(s=g,r=p):(i+=g,a+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-a),f=n[o];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Yn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Zn(n,e,t){const s=Yn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function Jn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function _l(n,e,t,s=document){var r,i,a,o;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(a=(o=t[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[u,h]}function Ul({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:a}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const o=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=Al({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=o[c];if(h!=null){const m=r[c];G(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{o.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const o=e.current;G(o,"Eager values not found");const{panelDataArray:c}=o,d=Jn(t,i);G(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);G(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);G(m,"Resize handle element has no handle id attribute");const[p,g]=_l(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];G(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Zn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&a(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,a])}function on(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function es(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Bl(n,e,t,s,r){const i=t==="horizontal",a=Nt(e,r);G(a,`No resize handle element found for id "${e}"`);const o=a.getAttribute(se.groupId);G(o,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=es(t,n),f=Jn(o,r);G(f,`No group element found for id "${o}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function Hl(n,e,t,s,r,i){if(Bn(n)){const a=t==="horizontal";let o=0;n.shiftKey?o=100:r!=null?o=r:o=10;let c=0;switch(n.key){case"ArrowDown":c=a?0:o;break;case"ArrowLeft":c=a?-o:0;break;case"ArrowRight":c=a?o:0;break;case"ArrowUp":c=a?0:-o;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Bl(n,e,t,s,i)}function ql({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;o!=null&&(s++,e[i]=o,r-=o)}for(let i=0;i<n.length;i++){const a=t[i];G(a,`Panel constraints not found for index ${i}`);const{defaultSize:o}=a;if(o!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];G(i,`Panel data not found for index ${r}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:d=0,collapsible:f}=o,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=a;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Kl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const a=t[r];let o;return a==null?o=n!=null?n.toPrecision(i):"1":s.length===1?o="1":o=a.toPrecision(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Wl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function cn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ts(n){return`react-resizable-panels:${n}`}function ns(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ss(n,e){try{const t=ts(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ss(n,t))!==null&&s!==void 0?s:{},a=ns(e);return(r=i[a])!==null&&r!==void 0?r:null}function Gl(n,e,t,s,r){var i;const a=ts(n),o=ns(e),c=(i=ss(n,r))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(a,JSON.stringify(c))}catch(d){console.error(d)}}function dn({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,a)=>i+a,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=100/s*a;t[i]=o}let r=0;for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=Ae({panelConstraints:e,panelIndex:i,size:a});a!=o&&(r+=a-o,t[i]=o)}if(!me(r,0))for(let i=0;i<e.length;i++){const a=t[i];G(a!=null,`No layout data found for index ${i}`);const o=a+r,c=Ae({panelConstraints:e,panelIndex:i,size:o});if(a!==c&&(r-=c-a,t[i]=c,me(r,0)))break}return t}const Xl=100,qe={getItem:n=>(cn(qe),qe.getItem(n)),setItem:(n,e)=>{cn(qe),qe.setItem(n,e)}},un={};function ls({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Gt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Ol(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:o,onLayout:a,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=dn({layout:S,panelConstraints:U.map(H=>H.constraints)});on(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=a,C.current.storage=c}),Ul({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=un[n];O==null&&(O=Wl(Gl,Xl),un[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:H=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(G(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,H)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-H:H-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const H=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,ae=He({delta:Pe,initialLayout:U,panelConstraints:H,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,ae)||(x(ae),w.current.layout=ae,R&&R(ae),Ie(T,ae,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return G(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Kl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(H,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:H}=De(R,S,O);return G(H!=null,`Panel size not found for panel "${S.id}"`),!T||Me(H,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,H=U.order;return T==null&&H==null?0:T==null?-1:H==null?1:T-H}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let H=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),H=te.layout)}H==null&&(H=ql({panelDataArray:T}));const Y=dn({layout:H,panelConstraints:T.map(te=>te.constraints)});on(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const H=m.current;if(!H)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Zn(fe,S,H);let ae=Hl(T,S,Y,te,E,H);const ot=Y==="horizontal";ot&&O&&(ae=-ae);const Et=ge.map(Dt=>Dt.constraints),Ee=He({delta:ae,initialLayout:Ne??ne,panelConstraints:Et,pivotIndices:Pe,prevLayout:ne,trigger:Bn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(Hn(T)||qn(T))&&z.current!=ae&&(z.current=ae,!ct&&ae!==0?ot?Lt(S,ae<0?Wn:Vn):Lt(S,ae<0?Gn:Xn):Lt(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),B=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,H=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);G(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:H,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),V=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:H}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(H&&te&&je(X,T)?je(T,Y)||B(S,Y):X<E?B(S,E):X>fe&&B(S,fe))},[B]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);G(T,`Drag handle element not found for id "${S}"`);const H=es(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:H,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:V,registerPanel:A,registerResizeHandle:_,resizePanel:B,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,V,A,_,B,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const rs=k.forwardRef((n,e)=>k.createElement(ls,{...n,forwardedRef:e}));ls.displayName="PanelGroup";rs.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],a=t[s];return{...e.constraints,panelSize:a,pivotIndices:i}}function Ql({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),t(a);break}case"F6":{a.preventDefault();const o=r.getAttribute(se.groupId);G(o,`No group element found for id "${o}"`);const c=Ye(o,s),d=Yn(o,e,s);G(d!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function is({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:a,onDragging:o,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:a,onDragging:o,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=a,y.current.onDragging=o,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Gt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,B]=k.useState(null),V=k.useRef({state:v});Fe(()=>{V.current.state=v}),k.useEffect(()=>{if(t)B(null);else{const L=C(F);B(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;G(L,"Element ref not attached");let K=!1;return Il(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,G(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:H}=y.current;T?.(!0),H?.();break}case"move":{const{state:T}=V.current;K=!0,T!=="drag"&&P("hover"),G(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:H,onPointerUp:Y}=y.current;H?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Ql({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}is.displayName="PanelResizeHandle";function Yl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let a;return e[6]!==s||e[7]!==r||e[8]!==i?(a=l.jsx(rs,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=a):a=e[9],a}function fn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Un,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Zl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=de("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 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let a;e[6]!==r?(a=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ds,{className:"size-2.5"})}),e[6]=r,e[7]=a):a=e[7];let o;return e[8]!==s||e[9]!==i||e[10]!==a?(o=l.jsx(is,{"data-slot":"resizable-handle",className:i,...s,children:a}),e[8]=s,e[9]=i,e[10]=a,e[11]=o):o=e[11],o}function Jl(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function er(n){if(Jl(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function tr(n){try{return decodeURIComponent(n)}catch{return n}}function nr(n){return er(n),encodeURIComponent(n)}function sr(n){return`.deco/blocks/${nr(n)}.json`}function Ma(n){return`/${sr(n)}`}const Ia=1e4,lr=3;function Ut(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Yt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function rr(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function La(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function Oa(n,e){return e==="directory"?n:rr(n)}function Ra(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function ir(n){const e=Yt(n);return e?e.split("/").filter(Boolean).length:0}function Aa(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function _a(n,e){return ir(n)>=lr&&!e.has(n)}function Ua(n,e,t=[]){const s=Yt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ba(n){const e=Yt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return tr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Ha(n){const e=Ut(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function qa(n,e=[]){const t={children:[]},s=i=>{const o=Ut(i).split("/").filter(Boolean);let c=t,d="";for(const f of o){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const o=Ut(i).split("/").filter(Boolean);let c=t,d="";o.forEach((f,u)=>{d+=`/${f}`;const h=u===o.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((a,o)=>a.kind!==o.kind?a.kind==="directory"?-1:1:a.name.localeCompare(o.name));for(const a of i)a.children.length>0&&r(a.children)};return r(t.children),t.children}function or(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...or(r.children,e,t+1)));return s}function Ka(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}al.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function cr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=Ns(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let a;e[0]!==s?(a=ar(s),e[0]=s,e[1]=a):a=e[1];const o=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(zs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==a||e[8]!==o||e[9]!==t?(h=l.jsx(ol,{path:s,language:a,value:t,theme:o,loading:c,options:u},s),e[6]=s,e[7]=a,e[8]=o,e[9]=t,e[10]=h):h=e[10],h}function as(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const dr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),ur=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),hn=2*1024*1024;function fr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return dr.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=hn?"markdown":"download":ur.has(t)&&e<=hn?"text":"download"}function os(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(oe,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(oe,{className:"h-3 w-full"}),l.jsx(oe,{className:"h-3 w-5/6"}),l.jsx(oe,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function cs(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let a;e[4]!==t.size?(a=as(t.size),e[4]=t.size,e[5]=a):a=e[5];const o=s?` · ${s}`:"";let c;e[6]!==a||e[7]!==o?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[a,o]}),e[6]=a,e[7]=o,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ge,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function mn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let a;e[4]!==r||e[5]!==i?(a={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=a):a=e[6];const{data:o,isPending:c,isError:d}=ie(a);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(os,{}),e[7]=u):u=e[7],u}if(d||o===void 0){let u;return e[8]!==t?(u=l.jsx(cs,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==o||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Kt,{id:u,text:o})})}),e[10]=o,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==o||e[14]!==t.filename?(f=l.jsx(cr,{value:o,filename:t.filename}),e[13]=o,e[14]=t.filename,e[15]=f):f=e[15],f}function ds(n){const e=$.c(15),{file:t}=n;switch(fr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(mn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(mn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(cs,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function hr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let a;e[0]!==t?(a=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=a):a=e[1];const o=a;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(cl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==o?(d=()=>window.open(o,"_blank","noopener"),e[4]=o,e[5]=d):d=e[5];let f;e[6]!==o?(f=l.jsx("span",{className:"truncate",children:o}),e[6]=o,e[7]=f):f=e[7];let u;e[8]!==o||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:o,children:f}),e[8]=o,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Sn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:de(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Ts,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==o||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ge,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${o}#print`,"_blank","noopener"),children:[l.jsx(Fs,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:o,download:r,children:[l.jsx(Ms,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:o,download:r,children:l.jsx(Ge,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=o,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==o?(b=()=>window.open(o,"_blank","noopener"),e[23]=o,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(In,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function mr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function us(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function pr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?us(t).length:null}function xr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=us(s),i=e.kind==="move"?e.from:e.at,a=r[i];if(!a)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");a.remove();break}case"duplicate":{const c=a.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");a.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(a,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");a.setAttribute(e.name,e.value);break}case"remove-attr":{a.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");a.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-BA6MEFz3.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,e as p,j as s,i as u,N as a}from"./index-
|
|
1
|
+
import{c as g,e as p,j as s,i as u,N as a}from"./index-BA6MEFz3.js";import{a as x}from"./use-capability-_bDQAs6n.js";import{C as j}from"./capability-load-error-BOdjPSUF.js";function v(){const t=g.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:c,error:f}=x();if(c){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,a9 as L,a7 as B,j as d,b5 as q,a4 as x,a8 as E,b3 as K,aa as C,b4 as _,b6 as T,a6 as w,bE as U,bD as V}from"./index-
|
|
1
|
+
import{r as s,a9 as L,a7 as B,j as d,b5 as q,a4 as x,a8 as E,b3 as K,aa as C,b4 as _,b6 as T,a6 as w,bE as U,bD as V}from"./index-BA6MEFz3.js";var I="Radio",[z,P]=w(I),[H,W]=z(I),k=s.forwardRef((a,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:t,value:l="on",onCheck:f,form:R,...v}=a,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:t,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":t?"":void 0,disabled:t,value:l,...v,ref:i,onClick:C(a.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:t,form:R,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var g="RadioIndicator",G=s.forwardRef((a,c)=>{const{__scopeRadio:o,forceMount:n,...e}=a,r=W(g,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});G.displayName=g;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:a,control:c,checked:o,bubbles:n=!0,...e},r)=>{const t=s.useRef(null),l=E(t,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=t.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(a){return a?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=w(y,[_,P]),j=_(),N=P(),[Q,Z]=J(y),D=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:t=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=a,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:t,disabled:l,value:b,onValueChange:h,children:d.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":t,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=a,r=Z(M,o),t=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{Y.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!t,active:p,children:d.jsx(k,{disabled:t,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((a,c)=>{const{__scopeRadioGroup:o,...n}=a,e=N(o);return d.jsx(G,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,ae=F;export{re as I,oe as R,ae as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,l as a,j as d}from"./index-
|
|
1
|
+
import{c as s,l as a,j as d}from"./index-BA6MEFz3.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|