decocms 2.304.15 → 2.305.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-CbUYZGF-.js → AlertCircle-B65qDYSH.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DHj5-FLY.js → ArrowNarrowLeft-fzTyPWny.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BK_iYZ-J.js → ArrowUpRight-BcX-Z0Ku.js} +1 -1
- package/dist/client/assets/Check-a0FPGBtH.js +1 -0
- package/dist/client/assets/{CheckCircle-D9qlmIve.js → CheckCircle-B8cGzYri.js} +1 -1
- package/dist/client/assets/ChevronDown-Z3xhSsnT.js +1 -0
- package/dist/client/assets/{ChevronRight-BIm0-OSp.js → ChevronRight-xkl8cwkd.js} +1 -1
- package/dist/client/assets/{ChevronUp-ClqSoLtD.js → ChevronUp-Cy7lkJW1.js} +1 -1
- package/dist/client/assets/{Container-BCDxdJoG.js → Container-cyfm5-Pb.js} +1 -1
- package/dist/client/assets/{DotsVertical-DEE8M0V4.js → DotsVertical-Bx7sSuAL.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DM7IwrPj.js → LinkExternal01-0g6HjjkD.js} +1 -1
- package/dist/client/assets/{Lock01-BmjkKSvK.js → Lock01-BzMXxHmW.js} +1 -1
- package/dist/client/assets/{Palette-BrJL0UcN.js → Palette-CwWccG-f.js} +1 -1
- package/dist/client/assets/{Play-DSYx2GJ2.js → Play-C-AiMK-Y.js} +1 -1
- package/dist/client/assets/{Plus-BrBimbff.js → Plus-DGrvw6bs.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Cr84gVY8.js → RefreshCcw01-Biyt7Dy2.js} +1 -1
- package/dist/client/assets/{SearchMd-IP-R-mtT.js → SearchMd-OHnYTa8U.js} +1 -1
- package/dist/client/assets/{Settings02-BOckjEVU.js → Settings02-DO2nBrax.js} +1 -1
- package/dist/client/assets/{Shield01-CJggUHAQ.js → Shield01-DQa1zKSX.js} +1 -1
- package/dist/client/assets/Star01-BoJYsaDm.js +1 -0
- package/dist/client/assets/{Sun-B7BWJEHb.js → Sun-DA-QmugE.js} +1 -1
- package/dist/client/assets/{Tool01-D1Rvo01i.js → Tool01-Cq1N-niG.js} +1 -1
- package/dist/client/assets/{Trash01-DaGrAtTq.js → Trash01-PRSN3sYk.js} +1 -1
- package/dist/client/assets/{User01-DmtseI1g.js → User01-DwPCZdnr.js} +1 -1
- package/dist/client/assets/{Users03-DH9QAbco.js → Users03-CB3lBGeX.js} +1 -1
- package/dist/client/assets/{X-viKat0oa.js → X-dZLz-ulr.js} +1 -1
- package/dist/client/assets/{XCircle-DZEMwZj2.js → XCircle-yJD2sr2j.js} +1 -1
- package/dist/client/assets/{XClose-DY7O9VST.js → XClose-Ci4dmV-Y.js} +1 -1
- package/dist/client/assets/{Zap-BMzMPNv3.js → Zap-CYJdRXq9.js} +1 -1
- package/dist/client/assets/{ZapSquare-BDbWe-zU.js → ZapSquare-M3u7o8sc.js} +1 -1
- package/dist/client/assets/{accordion-YgNI8iqn.js → accordion-DtmZjwNB.js} +1 -1
- package/dist/client/assets/agent-icon-D_KgWkiu.js +1 -0
- package/dist/client/assets/agents-list-yD_xsHNb.js +1 -0
- package/dist/client/assets/ai-providers-BHQQzoPJ.js +1 -0
- package/dist/client/assets/{alert-dialog-BvuFarFf.js → alert-dialog-Dog8t-xg.js} +1 -1
- package/dist/client/assets/{auth-catchall-DQeYnh5P.js → auth-catchall-B_yXTiaF.js} +1 -1
- package/dist/client/assets/automation-list-row-BtOPPlS3.js +1 -0
- package/dist/client/assets/automations-CkfQxJNN.js +1 -0
- package/dist/client/assets/{avatar-C4FRugJb.js → avatar-BebTr4u1.js} +1 -1
- package/dist/client/assets/{badge-_ZGDO29b.js → badge-BWEc0v7O.js} +1 -1
- package/dist/client/assets/brand-context-LmKpYr08.js +1 -0
- package/dist/client/assets/{card-oSxwoJvZ.js → card-mlKWkDqb.js} +1 -1
- package/dist/client/assets/{chat-context-C4Hx_rZK.js → chat-context-BmN5ppM9.js} +1 -1
- package/dist/client/assets/checkbox-55NGf7aS.js +1 -0
- package/dist/client/assets/collection-detail-BaNeXOGS.js +1 -0
- package/dist/client/assets/collection-display-button-DnajjLb7.js +1 -0
- package/dist/client/assets/{collection-search-u94VKjvs.js → collection-search-Bsl0avLq.js} +1 -1
- package/dist/client/assets/{collection-search-D_DqZCmL.js → collection-search-CjDGYe9v.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-LzV9CSI7.js → collection-table-wrapper-D5rnMkP_.js} +1 -1
- package/dist/client/assets/{collection-tabs-DW1xYGdq.js → collection-tabs-DgQ6F5X6.js} +1 -1
- package/dist/client/assets/{collections-Cn7VbUFT.js → collections-DAavnhku.js} +1 -1
- package/dist/client/assets/{command-CgMn1LbK.js → command-CN1iJVAp.js} +1 -1
- package/dist/client/assets/{connection-card-BPUe3B60.js → connection-card-D5opGNgQ.js} +1 -1
- package/dist/client/assets/connection-detail-DWinew7y.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CUlzSClK.js → connection-form-helpers-CXHmM_yU.js} +1 -1
- package/dist/client/assets/connections-yUVM9Wts.js +1 -0
- package/dist/client/assets/{constants-CVDNjJTw.js → constants-BNhCk86i.js} +1 -1
- package/dist/client/assets/{constants-CfwGLQ49.js → constants-Ccnt3rmd.js} +2 -2
- package/dist/client/assets/{dialog-CoECADf1.js → dialog-_YlOXdcS.js} +1 -1
- package/dist/client/assets/{domain-settings-D6RV8b16.js → domain-settings-DLCCNpqs.js} +1 -1
- package/dist/client/assets/{drawer-DTk8g2vK.js → drawer-GKYdquRR.js} +1 -1
- package/dist/client/assets/dropdown-menu-BXZVht4Z.js +1 -0
- package/dist/client/assets/{dynamic-plugin-layout-DCoYGhHP.js → dynamic-plugin-layout-ieJ5SRhD.js} +1 -1
- package/dist/client/assets/{empty-state-DoKR-jUX.js → empty-state-CGCgWL8i.js} +1 -1
- package/dist/client/assets/{empty-state-Be0X9mox.js → empty-state-D1x6Uzf-.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CuIeY90s.js → extract-connection-data-BTJzhkiq.js} +1 -1
- package/dist/client/assets/{features-38ZozsmE.js → features-Bmw2Kywv.js} +1 -1
- package/dist/client/assets/{form-BC40Nvzi.js → form-D4Q00YSx.js} +1 -1
- package/dist/client/assets/general-yzH2a6AI.js +1 -0
- package/dist/client/assets/{index-B0TkoX1b.js → index-7DFELu7_.js} +1 -1
- package/dist/client/assets/{index-CbBINyFK.js → index-BBbwvkmx.js} +1 -1
- package/dist/client/assets/{index-DXHNyf1g.css → index-B_4-KoG_.css} +1 -1
- package/dist/client/assets/index-C1kdSX8Z.js +182 -0
- package/dist/client/assets/index-CHcMm4yb.js +1 -0
- package/dist/client/assets/index-CLv-BJNN.js +1 -0
- package/dist/client/assets/{index-CFyIm5CH.js → index-CUuCKerO.js} +1 -1
- package/dist/client/assets/{index-DjgN9qrV.js → index-Cf-Qb03y.js} +1 -1
- package/dist/client/assets/{index-BBrIielu.js → index-DgtpEOsQ.js} +1 -1
- package/dist/client/assets/{index-_TsJo9Ju.js → index-DsOYCD-H.js} +5 -5
- package/dist/client/assets/index-DsncOedH.js +1 -0
- package/dist/client/assets/{index-CvarGBFr.js → index-I3M58vcg.js} +1 -1
- package/dist/client/assets/{index-Bcf94soS.js → index-ILTPQsH4.js} +1 -1
- package/dist/client/assets/{index-Dl2t23Jt.js → index-Ux_PrmKm.js} +2 -2
- package/dist/client/assets/{index-M_qlHNIS.js → index-Yaw_OxhP.js} +1 -1
- package/dist/client/assets/index-tLkyDiOo.js +1 -0
- package/dist/client/assets/{index-nmtbWm5V.js → index-tngOtpnj.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-cqTNhL_G.js → infiniteQueryObserver-C_u8IqUR.js} +1 -1
- package/dist/client/assets/{input-CluxDyoT.js → input-B868_ejo.js} +1 -1
- package/dist/client/assets/{integration-icon-BipCD_m-.js → integration-icon-Ov0IbIMU.js} +1 -1
- package/dist/client/assets/{label-CHKFYnQo.js → label-Cg-2ys6X.js} +1 -1
- package/dist/client/assets/{layout-CV5Wi0Ex.js → layout-DkCp6X2C.js} +1 -1
- package/dist/client/assets/lean-canvas-recruit-modal-BNON-9yt.js +139 -0
- package/dist/client/assets/{login-DdkQloeb.js → login-E_UoTHOE.js} +1 -1
- package/dist/client/assets/{members-BgSG3QM0.js → members-CC6bIoZk.js} +2 -2
- package/dist/client/assets/{monaco-editor-BfaMmupR.js → monaco-editor-DfIGvq7v.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C8V4hqSK.js → monitoring-stats-row-Chavd_5e.js} +1 -1
- package/dist/client/assets/{oauth-callback-BaZqye0L.js → oauth-callback-BQObPuY8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-oz8YNRBq.js → oauth-callback-ai-provider-B_SVXSnf.js} +1 -1
- package/dist/client/assets/{onboarding-WJDxBlF8.js → onboarding-ChmBqh-q.js} +1 -1
- package/dist/client/assets/{org-layout-Ax0KGzlT.js → org-layout-BWsgHF7L.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-C5mxyCcm.js → org-plugin-layout-D0N77j4g.js} +1 -1
- package/dist/client/assets/{pair-JxQa_xAh.js → pair-DlIdkD7u.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C_q24wh6.js → plugin-empty-state-B-u16uuv.js} +1 -1
- package/dist/client/assets/plugin-header-Dt0O0h26.js +1 -0
- package/dist/client/assets/{plugin-layout-NPftDH-k.js → plugin-layout-DK8gsZYL.js} +1 -1
- package/dist/client/assets/{popover-vU5pf5HQ.js → popover-B3f914lR.js} +1 -1
- package/dist/client/assets/profile-pLHlebiO.js +1 -0
- package/dist/client/assets/project-app-view-D-yBQWHo.js +1 -0
- package/dist/client/assets/registry-BcZJCcyc.js +2 -0
- package/dist/client/assets/{registry-layout-D-sbU1qd.js → registry-layout-0cxsWXwz.js} +2 -2
- package/dist/client/assets/{required-auth-layout-BYto5m3H.js → required-auth-layout-DLsc1xkw.js} +1 -1
- package/dist/client/assets/{reset-password-DL944kGr.js → reset-password-BS6m_G36.js} +1 -1
- package/dist/client/assets/roles-B_ljw5IA.js +1 -0
- package/dist/client/assets/{scroll-area-D4F3EM5Z.js → scroll-area-_bumfcjA.js} +1 -1
- package/dist/client/assets/{search-input-CslwpPEh.js → search-input-Bhq8p539.js} +1 -1
- package/dist/client/assets/select-model-D3fobWv8.js +4 -0
- package/dist/client/assets/select-slwRPncS.js +1 -0
- package/dist/client/assets/settings-layout-DRkmNgVc.js +1 -0
- package/dist/client/assets/{settings-section-qcMAXuoQ.js → settings-section-CIXHBPOa.js} +1 -1
- package/dist/client/assets/{shell-layout-CzPr_0c2.js → shell-layout-Drnm9mfO.js} +1 -1
- package/dist/client/assets/{skeleton-eOgaLAHa.js → skeleton-ChUR9knm.js} +1 -1
- package/dist/client/assets/{sso-Dozga0JK.js → sso--URfWQeo.js} +1 -1
- package/dist/client/assets/{store-BA7fLJKJ.js → store-htVNKvqn.js} +1 -1
- package/dist/client/assets/store-registry-CaCyYvRn.js +2 -0
- package/dist/client/assets/{switch-W_Nrj6rK.js → switch-Cf5BCxU5.js} +1 -1
- package/dist/client/assets/{table-rVVQNhet.js → table-CBFs2U43.js} +1 -1
- package/dist/client/assets/{tabs-6T1N4Szc.js → tabs-Ctrs4bAF.js} +1 -1
- package/dist/client/assets/{task-status-DsmpMdW6.js → task-status-DUVd5pLA.js} +1 -1
- package/dist/client/assets/{textarea-Cld3tG5R.js → textarea-BbtfG9Ru.js} +1 -1
- package/dist/client/assets/{toggle-group-COcCk4lG.js → toggle-group-DCLBHyZD.js} +1 -1
- package/dist/client/assets/{tools-list-COvHAWAZ.js → tools-list-DGhR4Qyt.js} +1 -1
- package/dist/client/assets/{tooltip-CxizQODk.js → tooltip-BOsmkVZD.js} +1 -1
- package/dist/client/assets/{types-CvYZZZog.js → types-BSAKF0wC.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bt2yRX0n.js → use-ai-providers-aNlhpnwf.js} +1 -1
- package/dist/client/assets/{use-collections-CwD8DZNY.js → use-collections-CqB4T92N.js} +1 -1
- package/dist/client/assets/{use-connection-pSv7eY2y.js → use-connection-C_n04i0m.js} +1 -1
- package/dist/client/assets/{use-copy-CHAuyAMC.js → use-copy-B8gaSETz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-1DfbQRRy.js → use-create-virtual-mcp-DvxMGqTu.js} +1 -1
- package/dist/client/assets/use-debounced-autosave-BAy1X_D8.js +1 -0
- package/dist/client/assets/{use-decopilot-events-CXVUS53e.js → use-decopilot-events-BA4osLiM.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BNRuOYcY.js → use-delete-connection-C4xdydWE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ca5zEcXn.js → use-infinite-scroll-CW0QmsIe.js} +1 -1
- package/dist/client/assets/{use-list-state-Jttwyvy3.js → use-list-state-Dm-Ww-Vo.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BdYIFx9S.js → use-mcp-tools-uazou5KQ.js} +1 -1
- package/dist/client/assets/{use-members-s6X83kyp.js → use-members-BM40IfsI.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Tn-rhKXX.js → use-navigate-to-agent-kI9r54wH.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CS0Acn4M.js → use-org-auth-client-DCENSdBc.js} +1 -1
- package/dist/client/assets/{use-org-sso-CPzDtjox.js → use-org-sso-BIqIcUQM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-TW9At1F2.js → use-organization-roles-DAO7QdGg.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dak2xww8.js → use-organization-settings-C-NHhw4n.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CMFnR2M3.js → use-registry-connections-B1oBXsUK.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D0-nlwJm.js → use-status-sounds-DEn9-reM.js} +1 -1
- package/dist/client/assets/{use-tasks-yxuEm5KK.js → use-tasks-CJ3vNKME.js} +1 -1
- package/dist/client/assets/{use-view-mode-w75x4zz0.js → use-view-mode-DTFti-L5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BHEEZv3B.js → use-virtual-mcp-Cd4gN6tQ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BMlr4G1E.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BNLcV52p.js +1 -0
- package/dist/client/assets/{user-QrqGbmQG.js → user-BirTYLn0.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C9HAxT_f.js → view-mode-toggle-_LNgXbfe.js} +1 -1
- package/dist/client/assets/workflow-CE9nGfJB.js +1 -0
- package/dist/client/assets/workflow-detail-hgfq2rMH.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +24 -25
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/license +9 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/license +9 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/dist/server/server.js +23 -24
- package/package.json +1 -1
- package/dist/client/assets/ChevronDown-tb8ftSUO.js +0 -1
- package/dist/client/assets/Star01-PFA-ZRDO.js +0 -1
- package/dist/client/assets/agent-icon-BXkkrCT3.js +0 -1
- package/dist/client/assets/agents-list-pk00bfJc.js +0 -1
- package/dist/client/assets/ai-providers-Dveb48ZT.js +0 -1
- package/dist/client/assets/automation-list-row-Uxaz0oZ0.js +0 -1
- package/dist/client/assets/automations-D7r6frZo.js +0 -1
- package/dist/client/assets/brand-context-5BxhNz9E.js +0 -1
- package/dist/client/assets/checkbox-CzxaEVzA.js +0 -1
- package/dist/client/assets/collection-detail-Be4vkD6s.js +0 -1
- package/dist/client/assets/collection-display-button-CPI0oCFf.js +0 -1
- package/dist/client/assets/connection-detail-CPlnEGaw.js +0 -1
- package/dist/client/assets/connections-BhKrBMUX.js +0 -1
- package/dist/client/assets/dropdown-menu-C6XDnng5.js +0 -1
- package/dist/client/assets/general-CvDecDeA.js +0 -1
- package/dist/client/assets/index-B1-8qqRf.js +0 -1
- package/dist/client/assets/index-BycfnvwM.js +0 -1
- package/dist/client/assets/index-CwBiuTbX.js +0 -189
- package/dist/client/assets/index-DHF2V7ZS.js +0 -1
- package/dist/client/assets/index-DQfkXdA9.js +0 -1
- package/dist/client/assets/lean-canvas-recruit-modal-CnBIlbd0.js +0 -116
- package/dist/client/assets/plugin-header-CBh0Saol.js +0 -1
- package/dist/client/assets/profile-CW9gorWX.js +0 -1
- package/dist/client/assets/project-app-view-DZI64J4I.js +0 -1
- package/dist/client/assets/registry-Q3WKF7CA.js +0 -2
- package/dist/client/assets/roles-CJua0nhs.js +0 -1
- package/dist/client/assets/select-C0JTp_6a.js +0 -1
- package/dist/client/assets/select-model-D0i0wiFX.js +0 -4
- package/dist/client/assets/settings-layout-CFCdg7G4.js +0 -1
- package/dist/client/assets/store-registry-D0a7tFCj.js +0 -2
- package/dist/client/assets/useInfiniteQuery-3jN4yA7O.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CEYJOeyf.js +0 -1
- package/dist/client/assets/workflow-D70YjEfw.js +0 -1
- package/dist/client/assets/workflow-detail-1NvP9qC0.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as n,j as r,r as d,g as h,O as f,l as u}from"./index-Dl2t23Jt.js";import{S as j,a as b,b as S}from"./index-Bcf94soS.js";import{u as _}from"./tooltip-CxizQODk.js";import{u as k,T as y,a as T,b as i,S as g}from"./index-DQfkXdA9.js";import{C as v}from"./chat-context-C4Hx_rZK.js";import"./X-viKat0oa.js";import"./agent-icon-BXkkrCT3.js";import"./AlertCircle-CbUYZGF-.js";import"./Tool01-D1Rvo01i.js";import"./XClose-DY7O9VST.js";import"./RefreshCcw01-Cr84gVY8.js";import"./ArrowNarrowLeft-DHj5-FLY.js";import"./XCircle-DZEMwZj2.js";import"./ArrowUpRight-BK_iYZ-J.js";import"./ZapSquare-BDbWe-zU.js";import"./Users03-DH9QAbco.js";import"./CheckCircle-D9qlmIve.js";import"./ChevronDown-tb8ftSUO.js";import"./ChevronRight-BIm0-OSp.js";import"./ChevronUp-ClqSoLtD.js";import"./DotsVertical-DEE8M0V4.js";import"./Container-BCDxdJoG.js";import"./Star01-PFA-ZRDO.js";import"./Palette-BrJL0UcN.js";import"./SearchMd-IP-R-mtT.js";import"./LinkExternal01-DM7IwrPj.js";import"./Lock01-BmjkKSvK.js";import"./Sun-B7BWJEHb.js";import"./Play-DSYx2GJ2.js";import"./Plus-BrBimbff.js";import"./Settings02-BOckjEVU.js";import"./Shield01-CJggUHAQ.js";import"./Trash01-DaGrAtTq.js";import"./User01-DmtseI1g.js";import"./Zap-BMzMPNv3.js";import"./shell-layout-CzPr_0c2.js";import"./dialog-CoECADf1.js";import"./required-auth-layout-BYto5m3H.js";import"./use-tasks-yxuEm5KK.js";import"./use-collections-CwD8DZNY.js";import"./constants-CfwGLQ49.js";import"./use-organization-settings-Dak2xww8.js";import"./use-org-sso-CPzDtjox.js";import"./pair-JxQa_xAh.js";import"./index-BBrIielu.js";import"./use-copy-CHAuyAMC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-CvYZZZog.js";import"./integration-icon-BipCD_m-.js";import"./use-virtual-mcp-BHEEZv3B.js";import"./skeleton-eOgaLAHa.js";import"./popover-vU5pf5HQ.js";import"./drawer-DTk8g2vK.js";import"./avatar-C4FRugJb.js";import"./alert-dialog-BvuFarFf.js";import"./form-BC40Nvzi.js";import"./label-CHKFYnQo.js";import"./input-CluxDyoT.js";import"./index-DjgN9qrV.js";import"./use-mcp-tools-BdYIFx9S.js";import"./use-ai-providers-Bt2yRX0n.js";import"./index-_TsJo9Ju.js";import"./switch-W_Nrj6rK.js";import"./use-connection-pSv7eY2y.js";import"./lean-canvas-recruit-modal-CnBIlbd0.js";import"./use-navigate-to-agent-Tn-rhKXX.js";import"./collection-search-u94VKjvs.js";import"./checkbox-CzxaEVzA.js";import"./extract-connection-data-CuIeY90s.js";import"./constants-CVDNjJTw.js";import"./collections-Cn7VbUFT.js";import"./tabs-6T1N4Szc.js";import"./dropdown-menu-C6XDnng5.js";import"./select-C0JTp_6a.js";import"./toggle-group-COcCk4lG.js";import"./select-model-D0i0wiFX.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-qcMAXuoQ.js";import"./card-oSxwoJvZ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-CvarGBFr.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BPUe3B60.js";import"./use-registry-connections-CMFnR2M3.js";import"./useInfiniteQuery-3jN4yA7O.js";import"./infiniteQueryObserver-cqTNhL_G.js";import"./collection-tabs-DW1xYGdq.js";import"./badge-_ZGDO29b.js";import"./textarea-Cld3tG5R.js";import"./connection-form-helpers-CUlzSClK.js";import"./use-infinite-scroll-Ca5zEcXn.js";import"./useSuspenseInfiniteQuery-CEYJOeyf.js";import"./collection-search-D_DqZCmL.js";import"./use-create-virtual-mcp-1DfbQRRy.js";import"./empty-state-Be0X9mox.js";import"./use-decopilot-events-CXVUS53e.js";import"./create-sse-subscription-CxkOgzKf.js";import"./task-status-DsmpMdW6.js";const N=280;function P(){const t=n.c(2),{tasksOpen:e}=k();if(!e)return null;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:`${N}px`},t[0]=o):o=t[0];let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx("aside",{className:"shrink-0 h-full bg-sidebar pb-1",style:o,children:r.jsx("div",{className:"h-full p-0.5 pt-0.25",children:r.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden card-shadow",children:r.jsx(y,{})})})}),t[1]=m):m=t[1],m}function C(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:null,children:r.jsx(P,{})}),t[0]=e):e=t[0],e}function x(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"flex-1 flex items-center justify-center",children:r.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function yr(){const t=n.c(7),e=_();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const c=!!h(o).taskId;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={"--sidebar-width-icon":"3.5rem"},t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(g,{}),t[2]=l):l=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},t[3]=p):p=t[3];let a;return t[4]!==c||t[5]!==e?(a=r.jsx(j,{defaultOpen:!1,children:r.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:r.jsxs(b,{className:"flex-1 bg-sidebar",style:s,children:[l,r.jsx(S,{className:"flex flex-col",style:p,children:r.jsx(v,{children:r.jsx(T,{children:e?r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})}):r.jsxs(i,{children:[r.jsxs(i.Header,{children:[r.jsxs(i.LeftColumn,{children:[r.jsx(i.Nav,{}),r.jsx(i.TogglesSlot,{})]}),r.jsx(i.CenterSlot,{}),r.jsxs(i.RightColumn,{children:[r.jsx(i.TabsSlot,{}),r.jsx(i.RightSlot,{})]})]}),r.jsxs("div",{className:"flex-1 min-h-0 flex flex-row",children:[c&&r.jsx(C,{}),r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})})]})]})})})})]})})}),t[4]=c,t[5]=e,t[6]=a):a=t[6],a}export{yr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as C,s as pe,f as ve,U as It,g as We,d as qe,W as ys,X as _s,Y as Ss,j as n,Z as Cs,c as J,t as se,r as b,$ as Mt,a0 as $t,H as Ns,J as ks,C as ws,z as Is,a as Ms,B as et,b as Se,a1 as $s,P as Tt,x as je,a2 as Ts,a3 as As,o as Re,a4 as Ps,a5 as Os,a6 as zs,a7 as Rs,a8 as Oe,a9 as Es,aa as Ds,ab as Ls,ac as Fs,ad as At,ae as Us,af as Gs,ag as Bs,ah as Hs,ai as Vs,aj as Ks,ak as Ws,al as qs,am as Qs,an as Ys,ao as Ee,L as Xs,E as it,K as Pt}from"./index-Dl2t23Jt.js";import{p as Js,g as Zs,D as en,E as mt,F as ft,G as tn,H as xt,I as sn,A as Pe,J as nn,k as on,K as rn,L as ln}from"./agent-icon-BXkkrCT3.js";import{i as an,f as De,g as Le,h as ge,u as Qe,j as he,k as ie,l as Ot,m as zt,n as cn,o as Rt,p as Et}from"./index-Bcf94soS.js";import{u as Dt,r as Lt}from"./shell-layout-CzPr_0c2.js";import{f as dn,g as un,h as mn}from"./pair-JxQa_xAh.js";import{S as Ve}from"./skeleton-eOgaLAHa.js";import{b as lt,P as at,a as ct}from"./popover-vU5pf5HQ.js";import{b as Ft,a as Ut,D as Gt}from"./drawer-DTk8g2vK.js";import{A as pt}from"./avatar-C4FRugJb.js";import{u as Bt,a as tt,b as st,c as ht,T as nt}from"./tooltip-CxizQODk.js";import{i as Ht}from"./ChevronDown-tb8ftSUO.js";import{c as gt,a as fn,e as xn}from"./XCircle-DZEMwZj2.js";import{i as pn,b as hn,n as gn}from"./ZapSquare-BDbWe-zU.js";import{n as bn,a as jn,i as vn}from"./Sun-B7BWJEHb.js";import{s as Ke}from"./Plus-BrBimbff.js";import{a as Ye}from"./Settings02-BOckjEVU.js";import{i as yn}from"./Shield01-CJggUHAQ.js";import{a as Vt}from"./Users03-DH9QAbco.js";import{f as _n,a as Sn,b as Cn,c as Nn,d as kn,e as wn,A as In}from"./alert-dialog-BvuFarFf.js";import{F as Mn,a as $n,b as Tn,c as An,d as Pn,e as On,f as zn}from"./form-BC40Nvzi.js";import{I as Rn}from"./input-CluxDyoT.js";import{S as En}from"./index-BBrIielu.js";import"./index-DjgN9qrV.js";import{s as Dn}from"./XClose-DY7O9VST.js";import{S as Kt,u as Wt,W as ze,i as Ln,b as Fn}from"./constants-CfwGLQ49.js";import{u as Un}from"./use-mcp-tools-BdYIFx9S.js";import{u as Gn}from"./use-ai-providers-Bt2yRX0n.js";import{A as Bn,b as Hn,S as Vn,c as Kn,d as Wn,C as qn}from"./index-_TsJo9Ju.js";import{u as Qn,a as bt,K as Yn,P as Xn,S as Jn,v as Zn,D as eo,c as to,s as so,b as no,d as oo,C as ro,e as io}from"./collection-search-D_DqZCmL.js";import{i as jt}from"./X-viKat0oa.js";import{b as qt,u as Qt}from"./use-virtual-mcp-BHEEZv3B.js";import{u as Yt,a as lo}from"./use-navigate-to-agent-Tn-rhKXX.js";import{u as ao}from"./use-create-virtual-mcp-1DfbQRRy.js";import{I as co,a as uo,S as mo,L as fo,b as xo,G as po}from"./lean-canvas-recruit-modal-CnBIlbd0.js";import{u as Xt}from"./use-tasks-yxuEm5KK.js";import{e as ot,f as ho}from"./chat-context-C4Hx_rZK.js";import{i as go}from"./ChevronRight-BIm0-OSp.js";import{E as bo}from"./empty-state-Be0X9mox.js";import{u as jo}from"./use-decopilot-events-CXVUS53e.js";import{g as Jt,a as vt,b as yt,h as _t,D as St}from"./dropdown-menu-C6XDnng5.js";import{i as vo}from"./Zap-BMzMPNv3.js";import{g as yo}from"./task-status-DsmpMdW6.js";function Zt(){const t=C.c(77),{org:e}=pe(),s=ve(),o=It(),{setTasksOpen:r,openTab:i}=Dt(),l=e.slug,a=pe().project;let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const u=We(c);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[1]=d):d=t[1];const m=qe(d),f=o.location.pathname;let x;t[2]!==a.enabledPlugins?(x=a.enabledPlugins??[],t[2]=a.enabledPlugins,t[3]=x):x=t[3];const p=x;let j;t[4]!==a.ui?(j=a.ui?.pinnedViews??[],t[4]=a.ui,t[5]=j):j=t[5];const I=j;let g,k,h,S;if(t[6]!==a.id||t[7]!==p||t[8]!==s||t[9]!==l||t[10]!==u.pluginId||t[11]!==u.taskId||t[12]!==m.virtualmcpid){let N;t[17]!==p?(N=X=>p.includes(X.pluginId),t[17]=p,t[18]=N):N=t[18];const K=ys.filter(N),W=m.virtualmcpid??a.id;k=!!m.virtualmcpid;const G=u.taskId??"",Y=u.pluginId;let ee;t[19]!==Y?(ee=X=>Y===X,t[19]=Y,t[20]=ee):ee=t[20],g=ee;let Z;t[21]!==G||t[22]!==s||t[23]!==l||t[24]!==W?(Z=X=>{const oe=G||crypto.randomUUID();s({to:"/$org/$taskId/$pluginId",params:{org:l,taskId:oe,pluginId:X},search:ae=>({...ae,virtualmcpid:W})})},t[21]=G,t[22]=s,t[23]=l,t[24]=W,t[25]=Z):Z=t[25],h=Z;let ne;t[26]!==g||t[27]!==h?(ne=X=>({key:X.pluginId,label:X.label,icon:X.icon,isActive:g(X.pluginId),onClick:()=>h(X.pluginId)}),t[26]=g,t[27]=h,t[28]=ne):ne=t[28],S=K.map(ne),t[6]=a.id,t[7]=p,t[8]=s,t[9]=l,t[10]=u.pluginId,t[11]=u.taskId,t[12]=m.virtualmcpid,t[13]=g,t[14]=k,t[15]=h,t[16]=S}else g=t[13],k=t[14],h=t[15],S=t[16];const y=S;let v;if(t[29]!==p||t[30]!==g||t[31]!==h){let N;t[33]!==p?(N=G=>p.includes(G.pluginId),t[33]=p,t[34]=N):N=t[34];const K=_s.filter(N);let W;t[35]!==g||t[36]!==h?(W=G=>({type:"group",group:{id:`${G.pluginId}-${G.id}`,label:G.label,items:G.items.map((Y,ee)=>({key:`${G.pluginId}-${G.id}-${ee}`,label:Y.label,icon:Y.icon,isActive:g(G.pluginId),onClick:()=>h(G.pluginId)})),defaultExpanded:G.defaultExpanded??!0}}),t[35]=g,t[36]=h,t[37]=W):W=t[37],v=K.map(W),t[29]=p,t[30]=g,t[31]=h,t[32]=v}else v=t[32];const _=v;let M;if(t[38]!==i||t[39]!==I){let N;t[41]!==i?(N=K=>{const W=Js(K.icon),G=W.type==="icon"?Zs(W.name):null;return{key:`app-${K.connectionId}-${K.toolName}`,label:K.label||K.toolName,icon:G?n.jsx(G,{size:16,className:"text-muted-foreground"}):W.type==="url"?n.jsx("img",{src:W.url,alt:"",className:"size-4 rounded"}):n.jsx(an,{size:16,className:"text-muted-foreground"}),isActive:!1,onClick:()=>i(dn(K.connectionId,K.toolName))}},t[41]=i,t[42]=N):N=t[42],M=I.map(N),t[38]=i,t[39]=I,t[40]=M}else M=t[40];const D=M;let w;t[43]!==D?(w=D.length>0?{type:"group",group:{id:"apps",label:"Apps",items:D,defaultExpanded:!0}}:null,t[43]=D,t[44]=w):w=t[44];const $=w;let O;t[45]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(en,{className:"size-4!"}),t[45]=O):O=t[45];const T=f===`/${l}`||f===`/${l}/`;let A;t[46]!==s||t[47]!==l||t[48]!==r?(A=()=>{r(!1),s({to:"/$org",params:{org:l}})},t[46]=s,t[47]=l,t[48]=r,t[49]=A):A=t[49];let P;t[50]!==A||t[51]!==T?(P={key:"home",label:"Home",icon:O,isActive:T,onClick:A},t[50]=A,t[51]=T,t[52]=P):P=t[52];const z=P;let L;t[53]!==p?(L=p.includes(Ss),t[53]=p,t[54]=L):L=t[54];const R=L;let B;t[55]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Cs,{className:"size-4!"}),t[55]=B):B=t[55];let U;t[56]!==l||t[57]!==f?(U=f.startsWith(`/${l}/settings/workflows`),t[56]=l,t[57]=f,t[58]=U):U=t[58];let F;t[59]!==s||t[60]!==l?(F=()=>s({to:"/$org/settings/workflows",params:{org:l}}),t[59]=s,t[60]=l,t[61]=F):F=t[61];let H;t[62]!==U||t[63]!==F?(H={key:"workflows",label:"Workflows",icon:B,isActive:U,onClick:F},t[62]=U,t[63]=F,t[64]=H):H=t[64];const V=H;let q;if(t[65]!==z||t[66]!==k||t[67]!==R||t[68]!==V){const N=[z];k&&R&&N.push(V),q={type:"items",items:N},t[65]=z,t[66]=k,t[67]=R,t[68]=V,t[69]=q}else q=t[69];let Q;if(t[70]!==$||t[71]!==_||t[72]!==y||t[73]!==q){if(Q=[q],y.length>0){let N;t[75]!==y?(N={type:"items",items:y},t[75]=y,t[76]=N):N=t[76],Q.push(N)}_.length>0&&Q.push(..._),$&&Q.push($),t[70]=$,t[71]=_,t[72]=y,t[73]=q,t[74]=Q}else Q=t[74];return Q}function es(t){const e=C.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex h-6 items-center",children:n.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=o):o=e[0];let r;return e[1]!==s?(r=n.jsxs(De,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[o,n.jsx(Le,{children:n.jsx(ge,{className:"gap-0.5",children:s})})]}),e[1]=s,e[2]=r):r=e[2],r}function _o(){const t=C.c(7),s=Mt().logo??$t,o=typeof s=="string"?s:s.light,r=typeof s=="string"?s:s.dark;let i;t[0]!==o?(i=n.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=i):i=t[1];let l;t[2]!==r?(l=n.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=r,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=n.jsx(Rt,{className:"flex items-center justify-center shrink-0 px-2 pb-0",children:n.jsxs("div",{className:"flex w-full aspect-square items-center justify-center",children:[i,l]})}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function ts(t){const e=C.c(15),{item:s}=t,{isMobile:o,setOpenMobile:r}=Qe();let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=()=>{se("nav_item_clicked",{nav_key:s.key,nav_label:s.label,is_active:!!s.isActive,is_mobile:o}),s.onClick?.(),o&&r(!1)},e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];const l=i,a=s.key,c=s.isActive&&"z-10";let u;e[4]!==c?(u=J(c),e[4]=c,e[5]=u):u=e[5];let d;e[6]!==l||e[7]!==s.icon||e[8]!==s.isActive||e[9]!==s.label?(d=n.jsx(he,{onClick:l,isActive:s.isActive,tooltip:s.label,className:"bg-muted/75",children:s.icon}),e[6]=l,e[7]=s.icon,e[8]=s.isActive,e[9]=s.label,e[10]=d):d=e[10];let m;return e[11]!==s.key||e[12]!==u||e[13]!==d?(m=n.jsx(ie,{className:u,children:d},a),e[11]=s.key,e[12]=u,e[13]=d,e[14]=m):m=e[14],m}function So(t){const e=C.c(12),{section:s}=t;switch(s.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ot,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=s.group.label,r=s.group.defaultExpanded;let i;e[2]!==s.group.items?(i=s.group.items.map(No),e[2]=s.group.items,e[3]=i):i=e[3];let l;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==i?(l=n.jsx(es,{label:o,defaultExpanded:r,children:i}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=i,e[7]=l):l=e[7],l}case"items":{let o;e[8]!==s.items?(o=s.items.map(Co),e[8]=s.items,e[9]=o):o=e[9];let r;return e[10]!==o?(r=n.jsx(De,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-1.5",children:o})})}),e[10]=o,e[11]=r):r=e[11],r}}}function Co(t){return n.jsx(ts,{item:t},t.key)}function No(t){return n.jsx(ts,{item:t},t.key)}function ko(t){const e=C.c(14),{sections:s,header:o,footer:r,additionalContent:i,variant:l,contentClassName:a}=t,c=l===void 0?"sidebar":l;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"h-10 shrink-0"}),children:n.jsx(_o,{})}),e[0]=u):u=e[0];let d;e[1]!==a?(d=J("flex flex-col flex-1 px-2 py-2 gap-0",a),e[1]=a,e[2]=d):d=e[2];let m;e[3]!==s?(m=s.map(wo),e[3]=s,e[4]=m):m=e[4];let f;e[5]!==i||e[6]!==d||e[7]!==m?(f=n.jsxs(zt,{className:d,children:[m,i]}),e[5]=i,e[6]=d,e[7]=m,e[8]=f):f=e[8];let x;return e[9]!==r||e[10]!==o||e[11]!==f||e[12]!==c?(x=n.jsxs(cn,{variant:c,children:[u,o,f,r]}),e[9]=r,e[10]=o,e[11]=f,e[12]=c,e[13]=x):x=e[13],x}function wo(t,e){return n.jsx(So,{section:t},e)}function ss(t){const e=C.c(2);let s;return e[0]!==t?(s=n.jsx(ko,{...t}),e[0]=t,e[1]=s):s=e[1],s}ss.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(Ve,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function Io(){const t=C.c(7),s=Mt().logo??$t,o=typeof s=="string"?s:s.light,r=typeof s=="string"?s:s.dark;let i;t[0]!==o?(i=n.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=i):i=t[1];let l;t[2]!==r?(l=n.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=r,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=n.jsx(Rt,{className:"flex items-center justify-center shrink-0 px-2 pb-0",children:n.jsxs("div",{className:"flex w-full aspect-square items-center justify-center",children:[i,l]})}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function Ct(t){const e=C.c(15),{item:s,onClose:o}=t,r=s.isActive&&"z-10";let i;e[0]!==r?(i=J(r),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==s||e[3]!==o?(l=()=>{s.onClick?.(),o()},e[2]=s,e[3]=o,e[4]=l):l=e[4];let a;e[5]!==s.icon?(a=n.jsx("span",{className:"[&>svg]:size-8",children:s.icon}),e[5]=s.icon,e[6]=a):a=e[6];let c;e[7]!==s.isActive||e[8]!==s.label||e[9]!==l||e[10]!==a?(c=n.jsx(he,{onClick:l,isActive:s.isActive,tooltip:s.label,className:"bg-muted/75",children:a}),e[7]=s.isActive,e[8]=s.label,e[9]=l,e[10]=a,e[11]=c):c=e[11];let u;return e[12]!==i||e[13]!==c?(u=n.jsx(ie,{className:i,children:c}),e[12]=i,e[13]=c,e[14]=u):u=e[14],u}function Mo(t){const e=C.c(18),{section:s,onClose:o}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ot,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,i=s.group.defaultExpanded;let l;if(e[2]!==o||e[3]!==s.group.items){let c;e[5]!==o?(c=u=>n.jsx(Ct,{item:u,onClose:o},u.key),e[5]=o,e[6]=c):c=e[6],l=s.group.items.map(c),e[2]=o,e[3]=s.group.items,e[4]=l}else l=e[4];let a;return e[7]!==s.group.defaultExpanded||e[8]!==s.group.label||e[9]!==l?(a=n.jsx(es,{label:r,defaultExpanded:i,children:l}),e[7]=s.group.defaultExpanded,e[8]=s.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==o||e[12]!==s.items){let l;e[14]!==o?(l=a=>n.jsx(Ct,{item:a,onClose:o},a.key),e[14]=o,e[15]=l):l=e[15],r=s.items.map(l),e[11]=o,e[12]=s.items,e[13]=r}else r=e[13];let i;return e[16]!==r?(i=n.jsx(De,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=i):i=e[17],i}}}function $o(t){const e=C.c(12),{sections:s,onClose:o,footer:r,additionalContent:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"h-10 shrink-0"}),children:n.jsx(Io,{})}),e[0]=l):l=e[0];let a;if(e[1]!==o||e[2]!==s){let d;e[4]!==o?(d=(m,f)=>n.jsx(Mo,{section:m,onClose:o},f),e[4]=o,e[5]=d):d=e[5],a=s.map(d),e[1]=o,e[2]=s,e[3]=a}else a=e[3];let c;e[6]!==i||e[7]!==a?(c=n.jsxs(zt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[a,i]}),e[6]=i,e[7]=a,e[8]=c):c=e[8];let u;return e[9]!==r||e[10]!==c?(u=n.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[l,c,r]}),e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const To=Ns({name:ks().min(2,"Organization name is required")});function Ao(t){const e=C.c(41),{open:s,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:ws(To),defaultValues:{name:""}},e[0]=r):r=e[0];const i=Is(r);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:Oo,onSuccess:Po},e[1]=l):l=e[1];const a=Ms(l),c=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(Cn,{children:[n.jsx(Nn,{children:"Create a new organization"}),n.jsx(kn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=u):u=e[2];let d;if(e[3]!==a||e[4]!==i){let _;e[6]!==a?(_=M=>a.mutateAsync(M),e[6]=a,e[7]=_):_=e[7],d=i.handleSubmit(_),e[3]=a,e[4]=i,e[5]=d}else d=e[5];let m;e[8]!==i.formState.isSubmitting?(m=_=>{const{field:M}=_;return n.jsxs(Tn,{children:[n.jsx(An,{children:"Organization Name"}),n.jsx(Pn,{children:n.jsx(Rn,{...M,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),n.jsx(On,{children:"The name of your company or organization"}),M.value&&n.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",n.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",ns(M.value)]})]}),n.jsx(zn,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=n.jsx(Mn,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let x;e[13]!==c?(x=c&&n.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,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 j;e[18]!==i.formState.isSubmitting||e[19]!==p?(j=n.jsx(_n,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=j):j=e[20];const I=!i.formState.isValid||i.formState.isSubmitting;let g;e[21]!==i.formState.isSubmitting?(g=i.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(En,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=g):g=e[22];let k;e[23]!==I||e[24]!==g?(k=n.jsx(et,{type:"submit",variant:"default",disabled:I,children:g}),e[23]=I,e[24]=g,e[25]=k):k=e[25];let h;e[26]!==k||e[27]!==j?(h=n.jsxs(wn,{children:[j,k]}),e[26]=k,e[27]=j,e[28]=h):h=e[28];let S;e[29]!==h||e[30]!==d||e[31]!==f||e[32]!==x?(S=n.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,x,h]}),e[29]=h,e[30]=d,e[31]=f,e[32]=x,e[33]=S):S=e[33];let y;e[34]!==i||e[35]!==S?(y=n.jsxs(Sn,{children:[u,n.jsx($n,{...i,children:S})]}),e[34]=i,e[35]=S,e[36]=y):y=e[36];let v;return e[37]!==o||e[38]!==s||e[39]!==y?(v=n.jsx(In,{open:s,onOpenChange:o,children:y}),e[37]=o,e[38]=s,e[39]=y,e[40]=v):v=e[40],v}function Po(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Oo(t){const e=ns(t.name);if(!e)throw new Error("Organization slug is invalid");const s=await Se.organization.create({name:t.name,slug:e});if(s?.error)throw new Error(s.error.message||"Failed to create organization");const o=s?.data?.slug??e;if(!o)throw new Error("Failed to create organization");return{orgSlug:o}}function rt(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function zo(t){const e=C.c(13),{org:s,size:o}=t,r=o===void 0?"sm":o,i=r==="xs"?"size-5":"size-6",l=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=J(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 c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:rt(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:J("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let d;return e[9]!==a||e[10]!==c||e[11]!==u?(d=n.jsx("div",{className:a,style:c,children:u}),e[9]=a,e[10]=c,e[11]=u,e[12]=d):d=e[12],d}function Be(t){const e=C.c(22),{item:s,onClose:o}=t;if(s.href){const c=s.external?"_blank":void 0,u=s.external?"noopener noreferrer":void 0;let d;e[0]!==s.icon?(d=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[0]=s.icon,e[1]=d):d=e[1];let m;e[2]!==s.label?(m=n.jsx("span",{className:"flex-1",children:s.label}),e[2]=s.label,e[3]=m):m=e[3];let f;return e[4]!==s.href||e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==d||e[9]!==m?(f=n.jsxs("a",{href:s.href,target:c,rel:u,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:o,children:[d,m]}),e[4]=s.href,e[5]=o,e[6]=c,e[7]=u,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}let r;e[11]!==s||e[12]!==o?(r=()=>{s.onClick?.(),o()},e[11]=s,e[12]=o,e[13]=r):r=e[13];let i;e[14]!==s.icon?(i=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[14]=s.icon,e[15]=i):i=e[15];let l;e[16]!==s.label?(l=n.jsx("span",{className:"flex-1",children:s.label}),e[16]=s.label,e[17]=l):l=e[17];let a;return e[18]!==r||e[19]!==i||e[20]!==l?(a=n.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,l]}),e[18]=r,e[19]=i,e[20]=l,e[21]=a):a=e[21],a}function Nt(t){const e=C.c(16),{sortedOrgs:s,orgParam:o,onSelectOrg:r,onCreateOrg:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ke,{size:16}),e[1]=a):a=e[1];let c;e[2]!==i?(c=n.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[l,n.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:a})]}),e[2]=i,e[3]=c):c=e[3];let u;if(e[4]!==r||e[5]!==o||e[6]!==s){let f;e[8]!==r||e[9]!==o?(f=x=>n.jsxs("button",{type:"button",onClick:()=>r(x.slug),className:J("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",x.slug===o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[n.jsx(zo,{org:x,size:"sm"}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium truncate",children:x.name}),n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:x.slug})]}),x.slug===o&&n.jsx(Ht,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},x.id),e[8]=r,e[9]=o,e[10]=f):f=e[10],u=s.map(f),e[4]=r,e[5]=o,e[6]=s,e[7]=u}else u=e[7];let d;e[11]!==u?(d=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",children:u}),e[11]=u,e[12]=d):d=e[12];let m;return e[13]!==c||e[14]!==d?(m=n.jsxs(n.Fragment,{children:[c,d]}),e[13]=c,e[14]=d,e[15]=m):m=e[15],m}function kt(t){const e=C.c(142),{user:s,userImage:o,menuItems:r,signOutItem:i,themeOptions:l,preferences:a,setPreferences:c,sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f,close:x,isMobile:p}=t;if(p){const G=s?.name??"U";let Y;e[0]!==G||e[1]!==o?(Y=n.jsx(pt,{url:o,fallback:G,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=G,e[1]=o,e[2]=Y):Y=e[2];const ee=s?.name??"User";let Z;e[3]!==ee?(Z=n.jsx("p",{className:"text-sm font-medium truncate",children:ee}),e[3]=ee,e[4]=Z):Z=e[4];const ne=s?.email;let X;e[5]!==ne?(X=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ne}),e[5]=ne,e[6]=X):X=e[6];let oe;e[7]!==Z||e[8]!==X?(oe=n.jsxs("div",{className:"flex-1 min-w-0",children:[Z,X]}),e[7]=Z,e[8]=X,e[9]=oe):oe=e[9];let ae;e[10]!==s?(ae=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(Lo)},e[10]=s,e[11]=ae):ae=e[11];let Ne;e[12]===Symbol.for("react.memo_cache_sentinel")?(Ne=n.jsx(gt,{size:14}),e[12]=Ne):Ne=e[12];let ce;e[13]!==ae?(ce=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:ae,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:Ne})}),e[13]=ae,e[14]=ce):ce=e[14];let ye;e[15]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(st,{side:"right",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=ye):ye=e[15];let _e;e[16]!==ce?(_e=n.jsx(ht,{delayDuration:300,children:n.jsxs(nt,{children:[ce,ye]})}),e[16]=ce,e[17]=_e):_e=e[17];let re;e[18]!==_e||e[19]!==Y||e[20]!==oe?(re=n.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[Y,oe,_e]}),e[18]=_e,e[19]=Y,e[20]=oe,e[21]=re):re=e[21];let de;e[22]!==f||e[23]!==m||e[24]!==d||e[25]!==u?(de=n.jsx("div",{className:"border-b border-border pb-2",children:n.jsx(Nt,{sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f})}),e[22]=f,e[23]=m,e[24]=d,e[25]=u,e[26]=de):de=e[26];let ue;if(e[27]!==x||e[28]!==r){let be;e[30]!==x?(be=Ge=>n.jsx(Be,{item:Ge,onClose:x},Ge.key),e[30]=x,e[31]=be):be=e[31],ue=r.map(be),e[27]=x,e[28]=r,e[29]=ue}else ue=e[29];let me;e[32]!==x||e[33]!==i?(me=n.jsx(Be,{item:i,onClose:x}),e[32]=x,e[33]=i,e[34]=me):me=e[34];let fe;e[35]!==ue||e[36]!==me?(fe=n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[ue,me]}),e[35]=ue,e[36]=me,e[37]=fe):fe=e[37];let xe;e[38]!==de||e[39]!==fe?(xe=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[de,fe]}),e[38]=de,e[39]=fe,e[40]=xe):xe=e[40];let E;if(e[41]!==a.theme||e[42]!==c||e[43]!==l){let be;e[45]!==a.theme||e[46]!==c?(be=Ge=>{const{value:Ze,icon:bs,label:js}=Ge;return n.jsx("button",{type:"button","aria-label":js,onClick:()=>c(vs=>({...vs,theme:Ze})),className:J("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:bs},Ze)},e[45]=a.theme,e[46]=c,e[47]=be):be=e[47],E=l.map(be),e[41]=a.theme,e[42]=c,e[43]=l,e[44]=E}else E=e[44];let ke;e[48]!==E?(ke=n.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[48]=E,e[49]=ke):ke=e[49];const Xe=a.enableSounds?"Disable sounds":"Enable sounds";let we;e[50]!==c?(we=()=>c(Do),e[50]=c,e[51]=we):we=e[51];const Je=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Ie;e[52]!==Je?(Ie=J("size-8 rounded-md flex items-center justify-center transition-colors",Je),e[52]=Je,e[53]=Ie):Ie=e[53];let Me;e[54]!==a.enableSounds?(Me=a.enableSounds?n.jsx(mt,{size:14}):n.jsx(ft,{size:14}),e[54]=a.enableSounds,e[55]=Me):Me=e[55];let $e;e[56]!==Xe||e[57]!==we||e[58]!==Ie||e[59]!==Me?($e=n.jsx("button",{type:"button","aria-label":Xe,onClick:we,className:Ie,children:Me}),e[56]=Xe,e[57]=we,e[58]=Ie,e[59]=Me,e[60]=$e):$e=e[60];let Fe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Fe=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.304.15"]}),e[61]=Fe):Fe=e[61];let Te;e[62]!==$e?(Te=n.jsxs("div",{className:"flex items-center gap-2",children:[$e,Fe]}),e[62]=$e,e[63]=Te):Te=e[63];let Ae;e[64]!==ke||e[65]!==Te?(Ae=n.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ke,Te]}),e[64]=ke,e[65]=Te,e[66]=Ae):Ae=e[66];let Ue;return e[67]!==re||e[68]!==xe||e[69]!==Ae?(Ue=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[re,xe,Ae]}),e[67]=re,e[68]=xe,e[69]=Ae,e[70]=Ue):Ue=e[70],Ue}const j=s?.name??"U";let I;e[71]!==j||e[72]!==o?(I=n.jsx(pt,{url:o,fallback:j,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=j,e[72]=o,e[73]=I):I=e[73];const g=s?.name??"User";let k;e[74]!==g?(k=n.jsx("p",{className:"text-sm font-medium truncate",children:g}),e[74]=g,e[75]=k):k=e[75];const h=s?.email;let S;e[76]!==h?(S=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[76]=h,e[77]=S):S=e[77];let y;e[78]!==k||e[79]!==S?(y=n.jsxs("div",{className:"flex-1 min-w-0",children:[k,S]}),e[78]=k,e[79]=S,e[80]=y):y=e[80];let v;e[81]!==s?(v=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(Eo)},e[81]=s,e[82]=v):v=e[82];let _;e[83]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(gt,{size:14}),e[83]=_):_=e[83];let M;e[84]!==v?(M=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[84]=v,e[85]=M):M=e[85];let D;e[86]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(st,{side:"right",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=D):D=e[86];let w;e[87]!==M?(w=n.jsx(ht,{delayDuration:300,children:n.jsxs(nt,{children:[M,D]})}),e[87]=M,e[88]=w):w=e[88];let $;e[89]!==w||e[90]!==I||e[91]!==y?($=n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[I,y,w]}),e[89]=w,e[90]=I,e[91]=y,e[92]=$):$=e[92];let O;if(e[93]!==x||e[94]!==r){let G;e[96]!==x?(G=Y=>n.jsx(Be,{item:Y,onClose:x},Y.key),e[96]=x,e[97]=G):G=e[97],O=r.map(G),e[93]=x,e[94]=r,e[95]=O}else O=e[95];let T;e[98]!==x||e[99]!==i?(T=n.jsx(Be,{item:i,onClose:x}),e[98]=x,e[99]=i,e[100]=T):T=e[100];let A;e[101]!==O||e[102]!==T?(A=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[O,T]}),e[101]=O,e[102]=T,e[103]=A):A=e[103];let P;if(e[104]!==a.theme||e[105]!==c||e[106]!==l){let G;e[108]!==a.theme||e[109]!==c?(G=Y=>{const{value:ee,icon:Z,label:ne}=Y;return n.jsx("button",{type:"button","aria-label":ne,onClick:()=>c(X=>({...X,theme:ee})),className:J("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===ee?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},ee)},e[108]=a.theme,e[109]=c,e[110]=G):G=e[110],P=l.map(G),e[104]=a.theme,e[105]=c,e[106]=l,e[107]=P}else P=e[107];let z;e[111]!==P?(z=n.jsx("div",{className:"flex items-center gap-0.5",children:P}),e[111]=P,e[112]=z):z=e[112];const L=a.enableSounds?"Disable sounds":"Enable sounds";let R;e[113]!==c?(R=()=>c(Ro),e[113]=c,e[114]=R):R=e[114];const B=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let U;e[115]!==B?(U=J("size-7 rounded-md flex items-center justify-center transition-colors",B),e[115]=B,e[116]=U):U=e[116];let F;e[117]!==a.enableSounds?(F=a.enableSounds?n.jsx(mt,{size:14}):n.jsx(ft,{size:14}),e[117]=a.enableSounds,e[118]=F):F=e[118];let H;e[119]!==L||e[120]!==R||e[121]!==U||e[122]!==F?(H=n.jsx("button",{type:"button","aria-label":L,onClick:R,className:U,children:F}),e[119]=L,e[120]=R,e[121]=U,e[122]=F,e[123]=H):H=e[123];let V;e[124]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.304.15"]}),e[124]=V):V=e[124];let q;e[125]!==H?(q=n.jsxs("div",{className:"flex items-center gap-2",children:[H,V]}),e[125]=H,e[126]=q):q=e[126];let Q;e[127]!==z||e[128]!==q?(Q=n.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[z,q]}),e[127]=z,e[128]=q,e[129]=Q):Q=e[129];let N;e[130]!==$||e[131]!==A||e[132]!==Q?(N=n.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[$,A,Q]}),e[130]=$,e[131]=A,e[132]=Q,e[133]=N):N=e[133];let K;e[134]!==f||e[135]!==m||e[136]!==d||e[137]!==u?(K=n.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:n.jsx(Nt,{sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f})}),e[134]=f,e[135]=m,e[136]=d,e[137]=u,e[138]=K):K=e[138];let W;return e[139]!==N||e[140]!==K?(W=n.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[N,K]}),e[139]=N,e[140]=K,e[141]=W):W=e[141],W}function Ro(t){return{...t,enableSounds:!t.enableSounds}}function Eo(){je.success("User ID copied")}function Do(t){return{...t,enableSounds:!t.enableSounds}}function Lo(){je.success("User ID copied")}function os(){const t=C.c(50),{data:e}=Se.useSession(),{data:s}=Se.useListOrganizations(),o=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const l=$s(r)?.params.org,[a,c]=Tt(),u=Bt(),[d,m]=b.useState(!1),[f,x]=b.useState(!1),p=e?.user,j=p?.image;let I;if(t[1]!==u||t[2]!==o||t[3]!==d||t[4]!==l||t[5]!==s||t[6]!==a||t[7]!==c||t[8]!==p||t[9]!==j){const h=s?.find(W=>W.slug===l);let S;if(t[11]!==l||t[12]!==s){let W;t[14]!==l?(W=(G,Y)=>G.slug===l?-1:Y.slug===l?1:G.name.localeCompare(Y.name),t[14]=l,t[15]=W):W=t[15],S=[...s??[]].sort(W),t[11]=l,t[12]=s,t[13]=S}else S=t[13];const y=S;let v;t[16]!==o?(v=W=>{m(!1),o({to:"/$org",params:{org:W}})},t[16]=o,t[17]=v):v=t[17];const _=v;let M;t[18]===Symbol.for("react.memo_cache_sentinel")?(M=()=>m(!1),t[18]=M):M=t[18];const D=M;let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Ye,{size:16}),t[19]=w):w=t[19];let $;t[20]!==o||t[21]!==l?($={key:"preferences",label:"Preferences",icon:w,onClick:()=>{o({to:"/$org/settings/profile",params:{org:l??""}})}},t[20]=o,t[21]=l,t[22]=$):$=t[22];let O;t[23]===Symbol.for("react.memo_cache_sentinel")?(O={key:"terms",label:"Terms of Use",icon:n.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[23]=O):O=t[23];let T;t[24]===Symbol.for("react.memo_cache_sentinel")?(T={key:"privacy",label:"Privacy Policy",icon:n.jsx(yn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[24]=T):T=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A={key:"github",label:"decocms/studio",icon:n.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[25]=A):A=t[25];let P;t[26]===Symbol.for("react.memo_cache_sentinel")?(P={key:"community",label:"Community",icon:n.jsx(Vt,{size:16}),href:"https://decocms.com/discord",external:!0},t[26]=P):P=t[26];let z;t[27]===Symbol.for("react.memo_cache_sentinel")?(z={key:"homepage",label:"Homepage",icon:n.jsx(fn,{size:16}),href:"https://decocms.com",external:!0},t[27]=z):z=t[27];let L;t[28]!==$?(L=[$,O,T,A,P,z],t[28]=$,t[29]=L):L=t[29];const R=L;let B;t[30]===Symbol.for("react.memo_cache_sentinel")?(B={key:"logout",label:"Sign out",icon:n.jsx(pn,{size:16}),onClick:Uo},t[30]=B):B=t[30];const U=B;let F;t[31]===Symbol.for("react.memo_cache_sentinel")?(F={value:"light",icon:n.jsx(bn,{size:14}),label:"Light theme"},t[31]=F):F=t[31];let H;t[32]===Symbol.for("react.memo_cache_sentinel")?(H={value:"dark",icon:n.jsx(jn,{size:14}),label:"Dark theme"},t[32]=H):H=t[32];let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=[F,H,{value:"system",icon:n.jsx(vn,{size:14}),label:"System theme"}],t[33]=V):V=t[33];const q=V;let Q;t[34]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{m(!1),x(!0)},t[34]=Q):Q=t[34];let N;t[35]!==_||t[36]!==u||t[37]!==R||t[38]!==l||t[39]!==a||t[40]!==c||t[41]!==y||t[42]!==p||t[43]!==j?(N={user:p,userImage:j,menuItems:R,signOutItem:U,themeOptions:q,preferences:a,setPreferences:c,sortedOrgs:y,orgParam:l,onSelectOrg:_,onCreateOrg:Q,close:D,isMobile:u},t[35]=_,t[36]=u,t[37]=R,t[38]=l,t[39]=a,t[40]=c,t[41]=y,t[42]=p,t[43]=j,t[44]=N):N=t[44];const K=N;I=u?n.jsxs(Ft,{open:d,onOpenChange:m,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>m(!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:[n.jsx("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:h?.logo?void 0:rt(h?.name??""),children:h?.logo?n.jsx("img",{src:h.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(h?.name??"?").slice(0,2).toUpperCase()})}),n.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),n.jsxs(Ut,{className:"h-[80dvh] p-0",children:[n.jsx(Gt,{className:"sr-only",children:"Account"}),n.jsx(kt,{...K})]})]}):n.jsxs(lt,{open:d,onOpenChange:m,children:[n.jsx(at,{asChild:!0,children:n.jsx(he,{tooltip:h?.name??"Account",className:"rounded-md",children:n.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:h?.logo?void 0:rt(h?.name??""),children:h?.logo?n.jsx("img",{src:h.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(h?.name??"?").slice(0,2).toUpperCase()})})})}),n.jsx(ct,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:Fo,children:n.jsx(kt,{...K})})]}),t[1]=u,t[2]=o,t[3]=d,t[4]=l,t[5]=s,t[6]=a,t[7]=c,t[8]=p,t[9]=j,t[10]=I}else I=t[10];let g;t[45]!==f?(g=n.jsx(Ao,{open:f,onOpenChange:x}),t[45]=f,t[46]=g):g=t[46];let k;return t[47]!==I||t[48]!==g?(k=n.jsxs(n.Fragment,{children:[I,g]}),t[47]=I,t[48]=g,t[49]=k):k=t[49],k}function Fo(t){return t.preventDefault()}function Uo(){se("signed_out",{source:"account_popover"}),Se.signOut()}function Go({invitation:t}){const[e,s]=b.useState(!1),[o,r]=b.useState(!1),i=Re(),l=async()=>{s(!0);try{const c=await Se.organization.acceptInvitation({invitationId:t.id});if(c.error)je.error(c.error.message),s(!1);else{const u=await Se.organization.getFullOrganization({query:{organizationId:t.organizationId}});je.success("Invitation accepted!");const d=u?.data?.slug;window.location.href=d?`/${d}`:"/"}}catch{je.error("Failed to accept invitation"),s(!1)}},a=async()=>{r(!0);try{const c=await Se.organization.rejectInvitation({invitationId:t.id});c.error?(je.error(c.error.message),r(!1)):(je.success("Invitation declined"),i.invalidateQueries())}catch{je.error("Failed to decline invitation"),r(!1)}};return n.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:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),n.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),n.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[n.jsx(et,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:l,disabled:e||o,"aria-label":"Accept invitation",children:n.jsx(Ht,{size:14})}),n.jsx(et,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||o,"aria-label":"Decline invitation",children:n.jsx(Dn,{size:14})})]})]})}function Bo(){const t=b.useContext(As),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date)}class Ho extends b.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Vo(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Ko(){const t=C.c(20),e=ve(),{org:s}=pe();let o;t[0]!==s.id||t[1]!==s.slug?(o={connectionId:Kt,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=o):o=t[2];const r=Wt(o);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i={providerId:"deco"},t[3]=i):i=t[3];let l;t[4]!==r?(l={client:r,toolName:"AI_PROVIDER_CREDITS",toolArguments:i,staleTime:6e4,select:Wo},t[4]=r,t[5]=l):l=t[5];const{data:a,isPending:c,isError:u}=Un(l),d=a?.balanceCents!=null?a.balanceCents/100:null;let m;t[6]!==d||t[7]!==u||t[8]!==c?(m=c||u||d==null?"Credits":`Credits: $${d.toFixed(2)}`,t[6]=d,t[7]=u,t[8]=c,t[9]=m):m=t[9];const f=m;let x;t[10]!==d?(x=J(d!=null&&Vo(d)),t[10]=d,t[11]=x):x=t[11];let p;t[12]!==e||t[13]!==s.slug?(p=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[12]=e,t[13]=s.slug,t[14]=p):p=t[14];let j;t[15]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(sn,{size:24}),t[15]=j):j=t[15];let I;return t[16]!==x||t[17]!==p||t[18]!==f?(I=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:f,className:x,onClick:p,children:j})})}),t[16]=x,t[17]=p,t[18]=f,t[19]=I):I=t[19],I}function Wo(t){return t.structuredContent}function qo(){const t=C.c(1);if(!Gn().some(Qo))return null;let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ko,{}),t[0]=o):o=t[0],o}function Qo(t){return t.providerId==="deco"}function Yo(){const t=C.c(3),[e,s]=b.useState(!1);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:"Connections",onClick:()=>{se("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),s(!0)},children:n.jsx(hn,{size:24})})})}),t[0]=o):o=t[0];let r;return t[1]!==e?(r=n.jsxs(n.Fragment,{children:[o,n.jsx(Bn,{mode:"browse",open:e,onOpenChange:s,defaultTab:"all"})]}),t[1]=e,t[2]=r):r=t[2],r}function Xo(){const t=C.c(11),e=Bo();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xt,{size:24}),t[0]=s):s=t[0];let o;t[1]!==e.length?(o=e.length>0&&n.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e.length,t[2]=o):o=t[2];let r;t[3]!==o?(r=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(at,{asChild:!0,children:n.jsxs(he,{tooltip:"Inbox",className:"relative",children:[s,o]})})})}),t[3]=o,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:n.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[5]=i):i=t[5];let l;t[6]!==e?(l=n.jsxs(ct,{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:[i,e.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[n.jsx(xt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:"No invites pending"}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Organization invitations will appear here"})]}):n.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(Jo)})]}),t[6]=e,t[7]=l):l=t[7];let a;return t[8]!==r||t[9]!==l?(a=n.jsxs(lt,{children:[r,l]}),t[8]=r,t[9]=l,t[10]=a):a=t[10],a}function Jo(t){return n.jsx(Go,{invitation:t},t.id)}function Zo(){const t=C.c(6),e=ve(),{org:s}=pe();let o;t[0]!==e||t[1]!==s.slug?(o=()=>e({to:"/$org/settings",params:{org:s.slug}}),t[0]=e,t[1]=s.slug,t[2]=o):o=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ye,{size:24}),t[3]=r):r=t[3];let i;return t[4]!==o?(i=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:"Settings",onClick:o,children:r})})}),t[4]=o,t[5]=i):i=t[5],i}function er(){const t=C.c(5);let e,s,o,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ho,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(qo,{})})}),s=n.jsx(Yo,{}),o=n.jsx(Xo,{}),r=n.jsx(Zo,{}),t[0]=e,t[1]=s,t[2]=o,t[3]=r):(e=t[0],s=t[1],o=t[2],r=t[3]);let i;return t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs(Et,{className:"px-2 pb-3 gap-1",children:[e,s,o,r,n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(os,{})})})]}),t[4]=i):i=t[4],i}function tr(){const t=C.c(10),e=ve(),{org:s}=pe(),{setOpenMobile:o}=Qe();let r;t[0]!==e||t[1]!==s.slug||t[2]!==o?(r=()=>{e({to:"/$org/settings",params:{org:s.slug}}),o(!1)},t[0]=e,t[1]=s.slug,t[2]=o,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ye,{}),t[4]=i):i=t[4];let l;t[5]!==r?(l=n.jsx(ie,{children:n.jsx(he,{tooltip:"Settings",onClick:r,children:i})}),t[5]=r,t[6]=l):l=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ie,{children:n.jsx(os,{})}),t[7]=a):a=t[7];let c;return t[8]!==l?(c=n.jsx(Et,{children:n.jsxs(ge,{children:[l,a]})}),t[8]=l,t[9]=c):c=t[9],c}var dt="ContextMenu",[sr]=Us(dt,[At]),te=At(),[nr,rs]=sr(dt),is=t=>{const{__scopeContextMenu:e,children:s,onOpenChange:o,dir:r,modal:i=!0}=t,[l,a]=b.useState(!1),c=te(e),u=Ps(o),d=b.useCallback(m=>{a(m),u(m)},[u]);return n.jsx(nr,{scope:e,open:l,onOpenChange:d,modal:i,children:n.jsx(Os,{...c,dir:r,open:l,onOpenChange:d,modal:i,children:s})})};is.displayName=dt;var ls="ContextMenuTrigger",as=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,disabled:o=!1,...r}=t,i=rs(ls,s),l=te(s),a=b.useRef({x:0,y:0}),c=b.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),u=b.useRef(0),d=b.useCallback(()=>window.clearTimeout(u.current),[]),m=f=>{a.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return b.useEffect(()=>d,[d]),b.useEffect(()=>{o&&d()},[o,d]),n.jsxs(n.Fragment,{children:[n.jsx(zs,{...l,virtualRef:c}),n.jsx(Rs.span,{"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,...r,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:o?t.onContextMenu:Oe(t.onContextMenu,f=>{d(),m(f),f.preventDefault()}),onPointerDown:o?t.onPointerDown:Oe(t.onPointerDown,He(f=>{d(),u.current=window.setTimeout(()=>m(f),700)})),onPointerMove:o?t.onPointerMove:Oe(t.onPointerMove,He(d)),onPointerCancel:o?t.onPointerCancel:Oe(t.onPointerCancel,He(d)),onPointerUp:o?t.onPointerUp:Oe(t.onPointerUp,He(d))})]})});as.displayName=ls;var or="ContextMenuPortal",cs=t=>{const{__scopeContextMenu:e,...s}=t,o=te(e);return n.jsx(Es,{...o,...s})};cs.displayName=or;var ds="ContextMenuContent",us=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=rs(ds,s),i=te(s),l=b.useRef(!1);return n.jsx(Ds,{...i,...o,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),!a.defaultPrevented&&l.current&&a.preventDefault(),l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),!a.defaultPrevented&&!r.modal&&(l.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});us.displayName=ds;var rr="ContextMenuGroup",ir=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Gs,{...r,...o,ref:e})});ir.displayName=rr;var lr="ContextMenuLabel",ar=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Bs,{...r,...o,ref:e})});ar.displayName=lr;var cr="ContextMenuItem",ms=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ls,{...r,...o,ref:e})});ms.displayName=cr;var dr="ContextMenuCheckboxItem",ur=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Hs,{...r,...o,ref:e})});ur.displayName=dr;var mr="ContextMenuRadioGroup",fr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Vs,{...r,...o,ref:e})});fr.displayName=mr;var xr="ContextMenuRadioItem",pr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ks,{...r,...o,ref:e})});pr.displayName=xr;var hr="ContextMenuItemIndicator",gr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ws,{...r,...o,ref:e})});gr.displayName=hr;var br="ContextMenuSeparator",fs=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Fs,{...r,...o,ref:e})});fs.displayName=br;var jr="ContextMenuArrow",vr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(qs,{...r,...o,ref:e})});vr.displayName=jr;var yr="ContextMenuSubTrigger",_r=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Qs,{...r,...o,ref:e})});_r.displayName=yr;var Sr="ContextMenuSubContent",Cr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ys,{...r,...o,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cr.displayName=Sr;function He(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Nr=is,kr=as,wr=cs,Ir=us,Mr=ms,$r=fs;function Tr(t){const e=C.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(Nr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=o):o=e[3],o}function Ar(t){const e=C.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(kr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=o):o=e[3],o}function Pr(t){const e=C.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let r;e[3]!==s?(r=J("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=r):r=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsx(wr,{children:n.jsx(Ir,{"data-slot":"context-menu-content",className:r,...o})}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function wt(t){const e=C.c(12);let s,o,r,i;e[0]!==t?({className:s,inset:o,variant:i,...r}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=r,e[4]=i):(s=e[1],o=e[2],r=e[3],i=e[4]);const l=i===void 0?"default":i;let a;e[5]!==s?(a=J("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=a):a=e[6];let c;return e[7]!==o||e[8]!==r||e[9]!==a||e[10]!==l?(c=n.jsx(Mr,{"data-slot":"context-menu-item","data-inset":o,"data-variant":l,className:a,...r}),e[7]=o,e[8]=r,e[9]=a,e[10]=l,e[11]=c):c=e[11],c}function Or(t){const e=C.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let r;e[3]!==s?(r=J("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=r):r=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsx($r,{"data-slot":"context-menu-separator",className:r,...o}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function zr(t){const e=ve(),s=Re(),o=Xt(),{locator:r}=pe(),i=We({strict:!1}),l=qe({strict:!1});return async a=>{const c=crypto.randomUUID(),u=a===l.virtualmcpid?Lt(s,r,i.taskId??""):null;try{await o.create.mutateAsync({id:c,virtual_mcp_id:a,...u?{branch:u}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:c},search:{virtualmcpid:a}})}}function Rr({agent:t,org:e,onUnpin:s,isDragging:o}){const r=ve(),{isMobile:i,setOpenMobile:l}=Qe(),a=Hn(e),u=It({select:h=>h.location.pathname}).startsWith(`/${e}/${t.id}`),[d,m]=b.useState(null),f=b.useRef(null),x=b.useRef(null),p=b.useRef(!1);p.current=!!o,o&&(d||x.current)&&(x.current&&(clearTimeout(x.current),x.current=null),d&&m(null));const j=h=>{if(p.current)return;const S=h.currentTarget.getBoundingClientRect();x.current=setTimeout(()=>{p.current||m(S)},550)},I=h=>{x.current&&(clearTimeout(x.current),x.current=null),!(f.current&&h.relatedTarget instanceof Node&&f.current.contains(h.relatedTarget))&&m(null)},g=d?Math.round(d.height*.9):0,k=d?d.width+g:0;return n.jsx(Tr,{children:n.jsxs(ie,{className:J(d&&"z-[55]"),children:[n.jsx(Ar,{asChild:!0,children:n.jsx(he,{tooltip:d?void 0:t.title,isActive:u,onClick:async()=>{i&&l(!1);const{resumed:h}=await a(t.id);se("sidebar_agent_pin_clicked",{agent_id:t.id,agent_title:t.title,resumed:h})},onMouseEnter:j,onMouseLeave:I,children:n.jsx(Pe,{icon:t.icon,name:t.title,size:"xs",className:"w-full h-full [&_svg]:w-1/2 [&_svg]:h-1/2"})})}),n.jsxs(Pr,{children:[n.jsxs(wt,{onClick:()=>{const h=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:e,taskId:h},search:{virtualmcpid:t.id}})},children:[n.jsx(Ye,{size:14}),"Settings"]}),n.jsx(Or,{}),n.jsxs(wt,{onClick:()=>{s(),u&&r({to:"/$org",params:{org:e}})},className:"",children:[n.jsx(jt,{size:14}),"Unpin"]})]}),d&&Ee.createPortal(n.jsx("button",{ref:f,type:"button",onMouseLeave:()=>m(null),onClick:h=>{h.stopPropagation(),m(null),s(),r({to:"/$org",params:{org:e}})},className:J("flex items-center justify-center","bg-sidebar-accent text-muted-foreground","rounded-xl cursor-pointer","animate-in fade-in-0 slide-in-from-right-2","duration-150 [animation-timing-function:cubic-bezier(0.165,0.84,0.44,1)]","hover:text-foreground transition-colors"),style:{position:"fixed",top:d.top,left:d.left,height:d.height,width:k,paddingLeft:d.width,zIndex:50,boxShadow:"inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0 0 0.5px hsla(0, 0%, 0%, 0.12)"},children:n.jsx(jt,{size:14})}),document.body)]})})}function Er(t){const e=C.c(18);let s;e[0]!==t.agent.id?(s={id:t.agent.id},e[0]=t.agent.id,e[1]=s):s=e[1];const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a,isDragging:c}=oo(s);let u;e[2]!==l?(u=ro.Transform.toString(l?{...l,x:0}:null),e[2]=l,e[3]=u):u=e[3];const d=c?.5:void 0,m=c?100:void 0;let f;e[4]!==u||e[5]!==d||e[6]!==m||e[7]!==a?(f={transform:u,transition:a,opacity:d,zIndex:m},e[4]=u,e[5]=d,e[6]=m,e[7]=a,e[8]=f):f=e[8];const x=f;let p;e[9]!==c||e[10]!==t?(p=n.jsx(Rr,{...t,isDragging:c}),e[9]=c,e[10]=t,e[11]=p):p=e[11];let j;return e[12]!==o||e[13]!==r||e[14]!==i||e[15]!==x||e[16]!==p?(j=n.jsx("div",{ref:i,style:x,...o,...r,tabIndex:-1,className:"w-full",children:p}),e[12]=o,e[13]=r,e[14]=i,e[15]=x,e[16]=p,e[17]=j):j=e[17],j}function Dr(t){const e=C.c(9),{agent:s,onClick:o}=t;let r;e[0]!==s.icon||e[1]!==s.title?(r=n.jsx(Pe,{icon:s.icon,name:s.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=s.icon,e[1]=s.title,e[2]=r):r=e[2];let i;e[3]!==s.title?(i=n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:s.title}),e[3]=s.title,e[4]=i):i=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==i?(l=n.jsxs("button",{type:"button",onClick:o,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[r,i]}),e[5]=o,e[6]=r,e[7]=i,e[8]=l):l=e[8],l}function Lr(t){const e=C.c(80),{onClose:s,onOpenImportDeco:o,onOpenGithubImport:r,onOpenSelfHealing:i,onOpenDiagnosticsModal:l,onOpenLeanCanvasModal:a,onOpenStudioPackModal:c,onOpenAiImageModal:u,onOpenAiResearchModal:d}=t,[m,f]=b.useState(""),x=qt(),{org:p}=pe();let j;e[0]!==x?(j=x.filter(Wr).map(Kr),e[0]=x,e[1]=j):j=e[1];const I=j,{pin:g,isPinned:k}=Yt(p.id,I);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={navigateOnCreate:!0},e[2]=h):h=e[2];const{createVirtualMCP:S,isCreating:y}=ao(h),[v]=Tt(),_=zr(p.slug),M=lo();let D,w,$,O,T,A,P,z;if(e[3]!==x||e[4]!==S||e[5]!==y||e[6]!==k||e[7]!==M||e[8]!==_||e[9]!==s||e[10]!==u||e[11]!==d||e[12]!==l||e[13]!==r||e[14]!==o||e[15]!==a||e[16]!==i||e[17]!==c||e[18]!==g||e[19]!==v.experimental_vibecode||e[20]!==m){const V=m.toLowerCase();z=x.filter(Vr).filter(E=>!m||E.title.toLowerCase().includes(V));let q;e[29]!==x?(q=x.some(Hr),e[29]=x,e[30]=q):q=e[30];const Q=q;D=ze.filter(E=>(!m||E.title.toLowerCase().includes(V))&&!(E.id==="studio-pack"&&Q)&&!(E.id==="self-healing-storefront"&&!v.experimental_vibecode));let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=ze.find(Br),e[31]=N):N=e[31];const K=N,W=K?x.find(E=>E.metadata?.type===K.id):void 0;let G;e[32]===Symbol.for("react.memo_cache_sentinel")?(G=ze.find(Gr),e[32]=G):G=e[32];const Y=G,ee=Y?x.find(E=>E.metadata?.type===Y.id):void 0;let Z;e[33]===Symbol.for("react.memo_cache_sentinel")?(Z=ze.find(Ur),e[33]=Z):Z=e[33];const ne=Z,X=ne?x.find(E=>E.metadata?.type===ne.id):void 0;let oe;e[34]===Symbol.for("react.memo_cache_sentinel")?(oe=ze.find(Fr),e[34]=oe):oe=e[34];const ae=oe,Ne=ae?x.find(E=>E.metadata?.type===ae.id):void 0;let ce;e[35]!==k||e[36]!==_||e[37]!==s||e[38]!==g?(ce=E=>{k(E.id)||g(E.id),s(),f(""),_(E.id)},e[35]=k,e[36]=_,e[37]=s,e[38]=g,e[39]=ce):ce=e[39];const ye=ce,_e=E=>{s(),f(""),E==="self-healing-storefront"?i():E==="site-editor"?o():E==="site-diagnostics"?W?M(W.id):l():E==="lean-canvas"?ee?M(ee.id):a():E==="ai-image"?X?M(X.id):u():E==="ai-research"?Ne?M(Ne.id):d():E==="studio-pack"?c():_(E)};A="flex flex-col max-h-[min(640px,80dvh)]",e[40]!==m?(P=n.jsx(io,{value:m,onChange:f,placeholder:"Search agents..."}),e[40]=m,e[41]=P):P=e[41],w="overflow-y-auto flex-1 min-h-0 px-3 pb-3",e[42]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx("div",{className:"px-1 pt-3 pb-2",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[42]=$):$=e[42];let re;e[43]!==S||e[44]!==s?(re=async()=>{se("agent_create_new_clicked",{source:"browse_popover"}),await S(),s()},e[43]=S,e[44]=s,e[45]=re):re=e[45];let de,ue;e[46]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),ue=n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[46]=de,e[47]=ue):(de=e[46],ue=e[47]);let me;e[48]!==y||e[49]!==re?(me=n.jsxs("button",{type:"button",disabled:y,onClick:re,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[de,ue]}),e[48]=y,e[49]=re,e[50]=me):me=e[50];let fe;e[51]!==s||e[52]!==r||e[53]!==v.experimental_vibecode?(fe=v.experimental_vibecode&&n.jsxs("button",{type:"button",onClick:()=>{se("agent_import_clicked",{source:"github"}),r(),s()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:n.jsx(po,{className:"size-5 text-muted-foreground"})}),n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"})]}),e[51]=s,e[52]=r,e[53]=v.experimental_vibecode,e[54]=fe):fe=e[54];let xe;e[55]!==ye?(xe=E=>n.jsx(Dr,{agent:E,onClick:()=>ye(E)},E.id),e[55]=ye,e[56]=xe):xe=e[56],O=n.jsxs("div",{className:"grid grid-cols-3 gap-1",children:[me,fe,z.map(xe)]}),T=D.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-1 pt-4 pb-2",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agent templates"})}),n.jsx("div",{className:"grid grid-cols-3 gap-1",children:D.map(E=>n.jsxs("button",{type:"button",onClick:()=>{se("agent_template_clicked",{template_id:E.id,template_title:E.title}),_e(E.id)},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[n.jsx(Pe,{icon:E.icon,name:E.title,size:"md",className:"transition-transform group-hover:scale-105"}),n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:E.title})]},E.id))})]}),e[3]=x,e[4]=S,e[5]=y,e[6]=k,e[7]=M,e[8]=_,e[9]=s,e[10]=u,e[11]=d,e[12]=l,e[13]=r,e[14]=o,e[15]=a,e[16]=i,e[17]=c,e[18]=g,e[19]=v.experimental_vibecode,e[20]=m,e[21]=D,e[22]=w,e[23]=$,e[24]=O,e[25]=T,e[26]=A,e[27]=P,e[28]=z}else D=e[21],w=e[22],$=e[23],O=e[24],T=e[25],A=e[26],P=e[27],z=e[28];let L;e[57]!==D||e[58]!==y||e[59]!==m||e[60]!==z.length?(L=z.length===0&&D.length===0&&!y&&n.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:m?"No agents found":"No agents yet"}),e[57]=D,e[58]=y,e[59]=m,e[60]=z.length,e[61]=L):L=e[61];let R;e[62]!==w||e[63]!==$||e[64]!==O||e[65]!==T||e[66]!==L?(R=n.jsxs("div",{className:w,children:[$,O,T,L]}),e[62]=w,e[63]=$,e[64]=O,e[65]=T,e[66]=L,e[67]=R):R=e[67];let B;e[68]!==p.slug?(B={org:p.slug},e[68]=p.slug,e[69]=B):B=e[69];let U;e[70]!==s?(U=()=>s(),e[70]=s,e[71]=U):U=e[71];let F;e[72]!==B||e[73]!==U?(F=n.jsx("div",{className:"border-t border-border px-3 py-2.5",children:n.jsx(Xs,{to:"/$org/settings/agents",params:B,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[72]=B,e[73]=U,e[74]=F):F=e[74];let H;return e[75]!==R||e[76]!==F||e[77]!==A||e[78]!==P?(H=n.jsxs("div",{className:A,children:[P,R,F]}),e[75]=R,e[76]=F,e[77]=A,e[78]=P,e[79]=H):H=e[79],H}function Fr(t){return t.id==="ai-research"}function Ur(t){return t.id==="ai-image"}function Gr(t){return t.id==="lean-canvas"}function Br(t){return t.id==="site-diagnostics"}function Hr(t){return Fn(t.id)}function Vr(t){return!Ln(t.id)}function Kr(t){return t.id}function Wr(t){return t.pinned}function qr(){const t=C.c(36),[e,s]=b.useState(!1),[o,r]=b.useState(!1),[i,l]=b.useState(!1),[a,c]=b.useState(!1),[u,d]=b.useState(!1),[m,f]=b.useState(!1),[x,p]=b.useState(!1),[j,I]=b.useState(!1),[g,k]=b.useState(!1),h=Bt(),{setOpenMobile:S}=Qe();let y;t[0]!==h||t[1]!==S?(y=()=>{s(!1),h&&S(!1)},t[0]=h,t[1]=S,t[2]=y):y=t[2];const v=y;let _;t[3]!==v||t[4]!==e?(_=e&&n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Ve,{className:"h-4 w-24"})}),children:n.jsx(Lr,{onClose:v,onOpenImportDeco:()=>r(!0),onOpenGithubImport:()=>{l(!0),v()},onOpenSelfHealing:()=>{c(!0),v()},onOpenDiagnosticsModal:()=>d(!0),onOpenLeanCanvasModal:()=>f(!0),onOpenStudioPackModal:()=>p(!0),onOpenAiImageModal:()=>I(!0),onOpenAiResearchModal:()=>k(!0)})}),t[3]=v,t[4]=e,t[5]=_):_=t[5];const M=_;let D;t[6]!==h||t[7]!==e||t[8]!==M?(D=h?n.jsxs(n.Fragment,{children:[n.jsx(ie,{children:n.jsx(he,{tooltip:"Browse agents",className:"bg-muted/75 hover:bg-sidebar-accent",onClick:()=>{se("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},children:n.jsx(Ke,{className:"!opacity-100"})})}),n.jsx(Ft,{open:e,onOpenChange:s,direction:"bottom",children:n.jsxs(Ut,{className:"max-h-[85dvh] p-0",children:[n.jsx(Gt,{className:"sr-only",children:"Browse agents"}),M]})})]}):n.jsxs(lt,{open:e,onOpenChange:B=>{B&&!e&&se("agent_browser_opened",{surface:"desktop_popover"}),s(B)},children:[n.jsx(ie,{children:n.jsx(at,{asChild:!0,children:n.jsx(he,{tooltip:"Browse agents",className:"bg-muted/75 hover:bg-sidebar-accent",children:n.jsx(Ke,{className:"!opacity-100"})})})}),n.jsx(ct,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:M})]}),t[6]=h,t[7]=e,t[8]=M,t[9]=D):D=t[9];let w;t[10]!==o?(w=n.jsx(co,{open:o,onOpenChange:r}),t[10]=o,t[11]=w):w=t[11];let $;t[12]!==i?($=n.jsx(uo,{open:i,onOpenChange:l}),t[12]=i,t[13]=$):$=t[13];let O;t[14]!==a?(O=n.jsx(Vn,{open:a,onOpenChange:c}),t[14]=a,t[15]=O):O=t[15];let T;t[16]!==u?(T=n.jsx(mo,{open:u,onOpenChange:d}),t[16]=u,t[17]=T):T=t[17];let A;t[18]!==m?(A=n.jsx(fo,{open:m,onOpenChange:f}),t[18]=m,t[19]=A):A=t[19];let P;t[20]!==x?(P=n.jsx(xo,{open:x,onOpenChange:p}),t[20]=x,t[21]=P):P=t[21];let z;t[22]!==j?(z=n.jsx(Kn,{open:j,onOpenChange:I}),t[22]=j,t[23]=z):z=t[23];let L;t[24]!==g?(L=n.jsx(Wn,{open:g,onOpenChange:k}),t[24]=g,t[25]=L):L=t[25];let R;return t[26]!==L||t[27]!==D||t[28]!==w||t[29]!==$||t[30]!==O||t[31]!==T||t[32]!==A||t[33]!==P||t[34]!==z?(R=n.jsxs(n.Fragment,{children:[D,w,$,O,T,A,P,z,L]}),t[26]=L,t[27]=D,t[28]=w,t[29]=$,t[30]=O,t[31]=T,t[32]=A,t[33]=P,t[34]=z,t[35]=R):R=t[35],R}function Qr(){const t=C.c(34),e=qt(),{org:s}=pe();let o;t[0]!==e?(o=e.filter(Zr).map(Jr),t[0]=e,t[1]=o):o=t[1];const r=o,{pinnedIds:i,unpin:l,reorder:a}=Yt(s.id,r),c=new Map(e.map(Xr)),u=i.map(R=>c.get(R)).filter(Yr);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:5}},t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m={coordinateGetter:so},t[3]=m):m=t[3];const f=Qn(bt(Xn,d),bt(Yn,m));let x;t[4]!==i||t[5]!==a?(x=R=>{const{active:B,over:U}=R;if(!U||B.id===U.id)return;const F=i.indexOf(B.id),H=i.indexOf(U.id);F===-1||H===-1||a(no([...i],F,H))},t[4]=i,t[5]=a,t[6]=x):x=t[6];const p=x,j=De,I="py-0 px-0 mt-2 flex-1 min-h-0";let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"h-px bg-border mx-2 mb-2"}),t[7]=g):g=t[7];const k=Le,h="flex flex-1 min-h-0 flex-col overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",S=ge,y="gap-2";let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(qr,{}),t[8]=v):v=t[8];const _=eo,M=to,D=Jn,w=Zn;let $;t[9]!==s.slug||t[10]!==l?($=R=>n.jsx(Er,{agent:R,org:s.slug,onUnpin:()=>l(R.id)},R.id),t[9]=s.slug,t[10]=l,t[11]=$):$=t[11];const O=u.map($);let T;t[12]!==D||t[13]!==i||t[14]!==w||t[15]!==O?(T=n.jsx(D,{items:i,strategy:w,children:O}),t[12]=D,t[13]=i,t[14]=w,t[15]=O,t[16]=T):T=t[16];let A;t[17]!==_||t[18]!==p||t[19]!==f||t[20]!==T||t[21]!==M?(A=n.jsx(_,{sensors:f,collisionDetection:M,onDragEnd:p,children:T}),t[17]=_,t[18]=p,t[19]=f,t[20]=T,t[21]=M,t[22]=A):A=t[22];let P;t[23]!==S||t[24]!==A||t[25]!==v?(P=n.jsxs(S,{className:y,children:[v,A]}),t[23]=S,t[24]=A,t[25]=v,t[26]=P):P=t[26];let z;t[27]!==k||t[28]!==P?(z=n.jsx(k,{className:h,children:P}),t[27]=k,t[28]=P,t[29]=z):z=t[29];let L;return t[30]!==j||t[31]!==z||t[32]!==g?(L=n.jsxs(j,{className:I,children:[g,z]}),t[30]=j,t[31]=z,t[32]=g,t[33]=L):L=t[33],L}function Yr(t){return!!t}function Xr(t){return[t.id,t]}function Jr(t){return t.id}function Zr(t){return t.pinned}function xs(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(b.Suspense,{fallback:n.jsx(De,{className:"py-0 px-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-2",children:n.jsx(ie,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(Ve,{className:"h-4 w-4 rounded"}),n.jsx(Ve,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Qr,{})}),t[0]=e):e=t[0],e}function yl(){const t=C.c(4),e=Zt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(er,{}),t[0]=s):s=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(it,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(xs,{})})}),t[1]=o):o=t[1];let r;return t[2]!==e?(r=n.jsx(ss,{sections:e,footer:s,additionalContent:o}),t[2]=e,t[3]=r):r=t[3],r}function _l(t){const e=C.c(5),{onClose:s}=t,o=Zt();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(tr,{}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(it,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(xs,{})})}),e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx($o,{sections:o,onClose:s,footer:r,additionalContent:i}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ei(t,e){return t===1?!0:t===0?!1:e}function ti(t){const e=t.entityMetadata?.defaultMainView??null,s=e==null||e.type==="chat",o=t.mainParamPresent?t.mainParamValue!=="0":!s,r=s?!0:t.entityMetadata?.chatDefaultOpen??!1;return{mainOpen:o,chatOpen:r}}function Sl(t,e){return t&&e?{chat:45,main:55}:t&&!e?{chat:100,main:0}:!t&&e?{chat:0,main:100}:{chat:0,main:0}}function si(t,e){return t===1?!0:t===0?!1:e}function Cl(t,e){const s=ve(),o=qe({strict:!1}),r=We({strict:!1}),i=Re(),l=Xt(),{locator:a}=pe(),{virtualMcpId:c,orgSlug:u,isAgentRoute:d}=e,m=ti({entityMetadata:t,mainParamPresent:o.main!==void 0,mainParamValue:o.main}),f=si(o.chat,m.chatOpen),x=m.mainOpen,p=b.useRef(crypto.randomUUID()),j=r.taskId??p.current,I="/$org/$taskId",g=w=>({org:u,taskId:w}),k=d?{virtualmcpid:c}:{},h=(w,$)=>{s({to:I,params:g(j),search:O=>({...O,...w}),replace:$?.replace??!1})},S=(w,$)=>{s({to:I,params:g(w),search:O=>{const T={};return $?T.virtualmcpid=$:d&&(T.virtualmcpid=c),O.tasks&&(T.tasks=O.tasks),T}})},y=()=>{x?h({main:"0"},{replace:!0}):h({main:un(t)},{replace:!0})},v=()=>{h({chat:f?0:1},{replace:!0})},_=()=>{f||h({chat:1},{replace:!0})},M=async()=>{const w=crypto.randomUUID(),$=Lt(i,a,j);try{await l.create.mutateAsync({id:w,virtual_mcp_id:c,...$?{branch:$}:{}})}catch{}s({to:I,params:g(w),search:O=>{const T={...k,chat:1};return O.tasks&&(T.tasks=O.tasks),T}})},D=w=>{h({main:w},{replace:!0})};return{taskId:j,mainOpen:x,chatOpen:f,mainParam:o.main,setTaskId:S,toggleMain:y,toggleChat:v,openChat:_,createNewTask:M,openTab:D}}const ut=b.createContext(null);function Nl(t){const e=C.c(15),{children:s}=t,o=ve();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=qe(r);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={owner:"all",status:"open"},e[1]=l):l=e[1];const{tasks:a}=ot(l);let c;e[2]!==i.tasks||e[3]!==a.length?(c=()=>ei(i.tasks,a.length>0),e[2]=i.tasks,e[3]=a.length,e[4]=c):c=e[4];const[u,d]=b.useState(c);let m,f;e[5]!==o||e[6]!==u?(m=()=>{o({search:(g=>({...g,tasks:u?1:0})),replace:!0})},f=[u,o],e[5]=o,e[6]=u,e[7]=m,e[8]=f):(m=e[7],f=e[8]),b.useEffect(m,f);let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=()=>d(ni),e[9]=x):x=e[9];const p=x;let j;e[10]!==u?(j={tasksOpen:u,toggleTasks:p},e[10]=u,e[11]=j):j=e[11];let I;return e[12]!==s||e[13]!==j?(I=n.jsx(ut.Provider,{value:j,children:s}),e[12]=s,e[13]=j,e[14]=I):I=e[14],I}function ni(t){return!t}function kl(){const t=b.useContext(ut);if(!t)throw new Error("useTasksPanelState must be used inside <TasksPanelStateProvider>");return t}function wl(){return b.useContext(ut)}const ps=b.createContext(null);function Ce(){const t=b.use(ps);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function le(t){const e=C.c(10),{children:s}=t,[o,r]=b.useState(null),[i,l]=b.useState(null),[a,c]=b.useState(null),[u,d]=b.useState(null);let m;e[0]!==a||e[1]!==u||e[2]!==i||e[3]!==o?(m={togglesEl:o,setTogglesEl:r,tabsEl:i,setTabsEl:l,centerEl:a,setCenterEl:c,rightEl:u,setRightEl:d},e[0]=a,e[1]=u,e[2]=i,e[3]=o,e[4]=m):m=e[4];let f;e[5]!==s?(f=n.jsx("div",{className:"flex flex-col h-full min-h-0",children:s}),e[5]=s,e[6]=f):f=e[6];let x;return e[7]!==m||e[8]!==f?(x=n.jsx(ps,{value:m,children:f}),e[7]=m,e[8]=f,e[9]=x):x=e[9],x}function oi(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12",children:s}),e[0]=s,e[1]=o):o=e[1],o}function ri(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=o):o=e[1],o}function ii(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=o):o=e[1],o}function li(){const t=C.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("button",{type:"button",onClick:ci,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go back",children:n.jsx(gn,{size:16})}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs(n.Fragment,{children:[e,n.jsx("button",{type:"button",onClick:ai,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go forward",children:n.jsx(go,{size:16})})]}),t[1]=s):s=t[1],s}function ai(){return window.history.forward()}function ci(){return window.history.back()}function di(){const t=C.c(2),{setCenterEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function ui(t){const e=C.c(3),{children:s}=t,{centerEl:o}=Ce();if(!o)return null;let r;return e[0]!==o||e[1]!==s?(r=Ee.createPortal(s,o),e[0]=o,e[1]=s,e[2]=r):r=e[2],r}function mi(){const t=C.c(2),{setTabsEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"shrink-0 flex items-center overflow-x-auto"}),t[0]=e,t[1]=s):s=t[1],s}function fi(t){const e=C.c(3),{children:s}=t,{tabsEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}function xi(){const t=C.c(2),{setTogglesEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"flex items-center gap-0.5 shrink-0 ml-0.5"}),t[0]=e,t[1]=s):s=t[1],s}function pi(t){const e=C.c(3),{children:s}=t,{togglesEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}function hi(){const t=C.c(2),{setRightEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function gi(t){const e=C.c(3),{children:s}=t,{rightEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}le.Header=oi;le.LeftColumn=ri;le.RightColumn=ii;le.Nav=li;le.CenterSlot=di;le.Center=ui;le.TabsSlot=mi;le.Tabs=fi;le.TogglesSlot=xi;le.Toggles=pi;le.RightSlot=hi;le.Right=gi;function bi(){const t=C.c(6),{org:e,locator:s}=pe(),o=Re();let r;t[0]!==s||t[1]!==o?(r=()=>{o.invalidateQueries({queryKey:Pt.tasksPrefix(s)})},t[0]=s,t[1]=o,t[2]=r):r=t[2];let i;t[3]!==e.slug||t[4]!==r?(i={orgSlug:e.slug,onTaskStatus:r},t[3]=e.slug,t[4]=r,t[5]=i):i=t[5],jo(i)}function ji(t){const e=C.c(8),{virtualMcpId:s,size:o,showAutomationBadge:r}=t,i=o===void 0?"sm":o;let l;e[0]!==i||e[1]!==s?(l=s?n.jsx(vi,{virtualMcpId:s,size:i}):n.jsx(Pe,{icon:null,name:"?",size:i}),e[0]=i,e[1]=s,e[2]=l):l=e[2];let a;e[3]!==r?(a=r&&n.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:n.jsx(vo,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=n.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function vi(t){const e=C.c(6),{virtualMcpId:s,size:o}=t,r=Qt(s);if(!r){let a;return e[0]!==o?(a=n.jsx(Pe,{icon:null,name:"?",size:o}),e[0]=o,e[1]=a):a=e[1],a}const i=r.icon??null;let l;return e[2]!==r.title||e[3]!==o||e[4]!==i?(l=n.jsx(Pe,{icon:i,name:r.title,size:o}),e[2]=r.title,e[3]=o,e[4]=i,e[5]=l):l=e[5],l}function yi(t){const e=t?.metadata?.githubRepo;return e?.connectionId&&t?.connections?.some(o=>o.connection_id===e.connectionId)?e:null}function _i(t){const e=C.c(47),{task:s,isActive:o,onClick:r,onArchive:i,showAutomationBadge:l}=t,a=yo(s.status),c=a.icon,u=Qt(s.virtual_mcp_id);let d;e[0]!==u?(d=yi(u),e[0]=u,e[1]=d):d=e[1];const m=d,f=b.useRef(null);let x;e[2]!==o?(x=()=>{if(!o)return;const V=f.current;V&&(V.focus({preventScroll:!0}),V.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}))},e[2]=o,e[3]=x):x=e[3];let p;e[4]!==o||e[5]!==s.id?(p=[o,s.id],e[4]=o,e[5]=s.id,e[6]=p):p=e[6],b.useEffect(x,p);const j="button",I=0;let g;e[7]!==r?(g=V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),r())},e[7]=r,e[8]=g):g=e[8];const k=o?"bg-accent":"hover:bg-accent/60";let h;e[9]!==k?(h=J("group/row flex items-center gap-3 px-2 py-1.5 rounded-md cursor-pointer transition-colors","focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",k),e[9]=k,e[10]=h):h=e[10];let S;e[11]!==l||e[12]!==s.virtual_mcp_id?(S=n.jsx(ji,{virtualMcpId:s.virtual_mcp_id,size:"xs",showAutomationBadge:l}),e[11]=l,e[12]=s.virtual_mcp_id,e[13]=S):S=e[13];const y=s.title||"Untitled task";let v;e[14]!==y?(v=n.jsx("div",{className:"text-sm text-foreground truncate",children:y}),e[14]=y,e[15]=v):v=e[15];let _;e[16]!==m||e[17]!==s.branch||e[18]!==s.updated_at?(_=s.updated_at&&n.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground min-w-0",children:[s.branch?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):m?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[m.owner,"/",m.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:mn(new Date(s.updated_at))})]}),e[16]=m,e[17]=s.branch,e[18]=s.updated_at,e[19]=_):_=e[19];let M;e[20]!==v||e[21]!==_?(M=n.jsxs("div",{className:"flex-1 min-w-0",children:[v,_]}),e[20]=v,e[21]=_,e[22]=M):M=e[22];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",w="[grid-area:slot] flex size-7 items-center justify-center group-hover/row:invisible",$=a.label,O=14,T=J(a.iconClassName,s.status==="in_progress"&&"animate-spin");let A;e[23]!==c||e[24]!==T?(A=n.jsx(c,{size:O,className:T}),e[23]=c,e[24]=T,e[25]=A):A=e[25];let P;e[26]!==a||e[27]!==A?(P=n.jsx("span",{className:w,"aria-label":$,children:A}),e[26]=a,e[27]=A,e[28]=P):P=e[28];let z;e[29]!==i?(z=V=>{V.stopPropagation(),i()},e[29]=i,e[30]=z):z=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(nn,{size:14}),e[31]=L):L=e[31];let R;e[32]!==z?(R=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Archive task",onClick:z,className:"[grid-area:slot] invisible group-hover/row:visible flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted",children:L})}),e[32]=z,e[33]=R):R=e[33];let B;e[34]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(st,{side:"right",children:"Archive"}),e[34]=B):B=e[34];let U;e[35]!==R?(U=n.jsxs(nt,{children:[R,B]}),e[35]=R,e[36]=U):U=e[36];let F;e[37]!==P||e[38]!==U?(F=n.jsxs("div",{className:D,children:[P,U]}),e[37]=P,e[38]=U,e[39]=F):F=e[39];let H;return e[40]!==r||e[41]!==M||e[42]!==F||e[43]!==g||e[44]!==h||e[45]!==S?(H=n.jsxs("div",{ref:f,role:j,tabIndex:I,onClick:r,onKeyDown:g,className:h,children:[S,M,F]}),e[40]=r,e[41]=M,e[42]=F,e[43]=g,e[44]=h,e[45]=S,e[46]=H):H=e[46],H}const hs={all:"All tasks",manual:"Chats",automation:"Automation"},gs={all:"All members",mine:"Mine only"};function Si(t){const e=C.c(59),{title:s,tasks:o,activeTaskId:r,onSelect:i,onArchive:l,onNew:a,showNewButton:c,showAutomationBadge:u,emptyLabel:d,currentUserId:m}=t,[f,x]=b.useState("all"),[p,j]=b.useState("mine");let I;e[0]!==m||e[1]!==p||e[2]!==o?(I=p==="mine"&&m?o.filter(N=>N.created_by===m):o,e[0]=m,e[1]=p,e[2]=o,e[3]=I):I=e[3];const g=I;let k;e[4]!==f||e[5]!==g?(k=f==="automation"?g.filter(wi):f==="manual"?g.filter(ki):g,e[4]=f,e[5]=g,e[6]=k):k=e[6];const h=k;let S;e[7]!==s?(S=n.jsx("span",{children:s}),e[7]=s,e[8]=S):S=e[8];let y;e[9]!==p?(y=n.jsx(vt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Filter by member",className:"flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",children:p==="mine"?n.jsx(rn,{size:16}):n.jsx(Vt,{size:16})})}),e[9]=p,e[10]=y):y=e[10];let v;e[11]!==p?(v=N=>{const K=N;K!==p&&se("tasks_panel_member_filter_changed",{to_value:K}),j(K)},e[11]=p,e[12]=v):v=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=Object.keys(gs),e[13]=_):_=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=_.map(Ni),e[14]=M):M=e[14];let D;e[15]!==p||e[16]!==v?(D=n.jsx(yt,{align:"end",children:n.jsx(_t,{value:p,onValueChange:v,children:M})}),e[15]=p,e[16]=v,e[17]=D):D=e[17];let w;e[18]!==y||e[19]!==D?(w=n.jsxs(St,{children:[y,D]}),e[18]=y,e[19]=D,e[20]=w):w=e[20];const $=f!=="all"&&"text-purple-500";let O;e[21]!==$?(O=J("flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",$),e[21]=$,e[22]=O):O=e[22];let T;e[23]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(xn,{size:16}),e[23]=T):T=e[23];let A;e[24]!==O?(A=n.jsx(vt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Filter tasks",className:O,children:T})}),e[24]=O,e[25]=A):A=e[25];let P;e[26]!==f?(P=N=>{const K=N;K!==f&&se("tasks_panel_filter_changed",{to_value:K}),x(K)},e[26]=f,e[27]=P):P=e[27];let z;e[28]===Symbol.for("react.memo_cache_sentinel")?(z=Object.keys(hs),e[28]=z):z=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=z.map(Ci),e[29]=L):L=e[29];let R;e[30]!==f||e[31]!==P?(R=n.jsx(yt,{align:"end",children:n.jsx(_t,{value:f,onValueChange:P,children:L})}),e[30]=f,e[31]=P,e[32]=R):R=e[32];let B;e[33]!==A||e[34]!==R?(B=n.jsxs(St,{children:[A,R]}),e[33]=A,e[34]=R,e[35]=B):B=e[35];let U;e[36]!==a||e[37]!==c||e[38]!==s?(U=c&&a&&n.jsx("button",{type:"button",onClick:()=>{se("tasks_panel_new_clicked"),a()},"aria-label":`New ${s.toLowerCase()}`,className:"flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",children:n.jsx(on,{size:16})}),e[36]=a,e[37]=c,e[38]=s,e[39]=U):U=e[39];let F;e[40]!==B||e[41]!==U||e[42]!==w?(F=n.jsxs("div",{className:"flex items-center gap-0.5",children:[w,B,U]}),e[40]=B,e[41]=U,e[42]=w,e[43]=F):F=e[43];let H;e[44]!==F||e[45]!==S?(H=n.jsxs("div",{className:"shrink-0 pl-2 pr-1.5 h-7 flex items-center justify-between text-xs font-medium text-muted-foreground mb-1",children:[S,F]}),e[44]=F,e[45]=S,e[46]=H):H=e[46];let V;e[47]!==r||e[48]!==d||e[49]!==l||e[50]!==i||e[51]!==u||e[52]!==h?(V=h.length===0&&d?n.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground/70",children:d}):h.map(N=>n.jsx(_i,{task:N,isActive:r===N.id,onClick:()=>{r!==N.id&&se("tasks_panel_task_clicked",{thread_id:N.id,virtual_mcp_id:N.virtual_mcp_id??null,from_automation:!!N.fromAutomation}),i(N)},onArchive:()=>{se("tasks_panel_task_archived",{thread_id:N.id,virtual_mcp_id:N.virtual_mcp_id??null}),l(N)},showAutomationBadge:u||N.fromAutomation},N.id)),e[47]=r,e[48]=d,e[49]=l,e[50]=i,e[51]=u,e[52]=h,e[53]=V):V=e[53];let q;e[54]!==V?(q=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto flex flex-col gap-0.5",children:V}),e[54]=V,e[55]=q):q=e[55];let Q;return e[56]!==H||e[57]!==q?(Q=n.jsxs("div",{className:"flex flex-col h-full min-h-0 mt-1",children:[H,q]}),e[56]=H,e[57]=q,e[58]=Q):Q=e[58],Q}function Ci(t){return n.jsx(Jt,{value:t,children:hs[t]},t)}function Ni(t){return n.jsx(Jt,{value:t,children:gs[t]},t)}function ki(t){return!t.fromAutomation}function wi(t){return t.fromAutomation}function Ii(){const t=C.c(23);bi();const{data:e}=Se.useSession(),s=e?.user?.id;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={owner:"me",status:"open",hasTrigger:!1},t[0]=o):o=t[0];const{tasks:r}=ot(o);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={owner:"all",status:"open",hasTrigger:!0},t[1]=i):i=t[1];const{tasks:l}=ot(i),{setTaskId:a,createNewTask:c}=Dt();let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},t[2]=u):u=t[2];const d=We(u),{locator:m,org:f}=pe(),x=Re();let p;t[3]!==f.id||t[4]!==f.slug?(p={connectionId:Kt,orgId:f.id,orgSlug:f.slug},t[3]=f.id,t[4]=f.slug,t[5]=p):p=t[5];const j=Wt(p),I=d.taskId??null;let g;t[6]!==l||t[7]!==r?(g=[...r,...l.map($i)].sort(Mi),t[6]=l,t[7]=r,t[8]=g):g=t[8];const k=g;let h;t[9]!==j||t[10]!==m||t[11]!==x?(h=async _=>{try{await ho(j,_.id,{hidden:!0}),x.invalidateQueries({queryKey:Pt.tasksPrefix(m)})}catch(M){const w=M;je.error(`Failed to archive task: ${w.message}`)}},t[9]=j,t[10]=m,t[11]=x,t[12]=h):h=t[12];const S=h;if(k.length===0){let _;return t[13]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"h-full flex items-center justify-center p-4",children:n.jsx(bo,{image:n.jsx(ln,{size:48,className:"text-muted-foreground"}),title:"No tasks yet",description:"Start a conversation to create your first task."})}),t[13]=_):_=t[13],_}let y;t[14]!==a?(y=_=>a(_.id,_.virtual_mcp_id),t[14]=a,t[15]=y):y=t[15];let v;return t[16]!==I||t[17]!==k||t[18]!==c||t[19]!==s||t[20]!==S||t[21]!==y?(v=n.jsx("div",{className:"flex flex-col h-full min-h-0 p-2 gap-3",children:n.jsx(Si,{title:"Tasks",tasks:k,activeTaskId:I,onSelect:y,onArchive:S,onNew:c,showNewButton:!0,currentUserId:s})}),t[16]=I,t[17]=k,t[18]=c,t[19]=s,t[20]=S,t[21]=y,t[22]=v):v=t[22],v}function Mi(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function $i(t){return{...t,fromAutomation:!0}}function Ti(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col h-full p-2 gap-1.5",children:Array.from({length:6}).map(Ai)}),t[0]=e):e=t[0],e}function Ai(t,e){return n.jsx("div",{className:"h-10 rounded-md bg-muted/60 animate-pulse"},e)}function Il(){const t=C.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(qn.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(it,{fallback:e,children:n.jsx(b.Suspense,{fallback:n.jsx(Ti,{}),children:n.jsx(Ii,{})})}),t[1]=s):s=t[1],s}export{yl as S,Il as T,Nl as a,le as b,Sl as c,wl as d,Cl as e,_l as f,yi as g,kl as u};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import{e as U,j as t,s as V,o as we,b as Fe,r as O,K as ne,n as He,a as Be,c as xe,B as ae,t as D,x as oe,G as Je,F as Xe,v as je,P as Ze,l as Ne,w as et,f as tt}from"./index-Dl2t23Jt.js";import{S as ce,u as $,d as Se,W as qe,j as be}from"./constants-CfwGLQ49.js";import{a as _e}from"./use-navigate-to-agent-Tn-rhKXX.js";import{a as le,b as de,c as ue,d as me,D as nt}from"./dialog-CoECADf1.js";import{i as Ae}from"./RefreshCcw01-Cr84gVY8.js";import{C as Qe}from"./collection-search-u94VKjvs.js";import{C as st}from"./checkbox-CzxaEVzA.js";import{b as Ee,u as it}from"./use-connection-pSv7eY2y.js";import{i as ot}from"./Lock01-BmjkKSvK.js";import{n as at}from"./agent-icon-BXkkrCT3.js";import{e as rt}from"./extract-connection-data-CuIeY90s.js";import{b as Oe,a as Le,c as Re,D as Me}from"./drawer-DTk8g2vK.js";import{u as ke}from"./tooltip-CxizQODk.js";import{I as Ue}from"./integration-icon-BipCD_m-.js";import{u as ct,d as Ye}from"./use-mcp-tools-BdYIFx9S.js";import{a as Pe,b as lt}from"./use-virtual-mcp-BHEEZv3B.js";function re(a){const e=U.c(4),{size:s,className:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=d):d=e[0];let n;return e[1]!==o||e[2]!==s?(n=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:d}),e[1]=o,e[2]=s,e[3]=n):n=e[3],n}function dt(a){return a.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ut(a){const e=await fetch(`/api/${a}/deco-sites`);if(!e.ok){const s=await e.json().catch(()=>({}));throw new Error(s.error??`Failed to load sites (${e.status})`)}return e.json()}function Wt(a){const e=U.c(70),{open:s,onOpenChange:o,onBack:d}=a,{org:n}=V(),c=_e(),u=we(),{data:l}=Fe.useSession(),[_,p]=O.useState(null),[C,g]=O.useState("");let m;e[0]!==n.id||e[1]!==n.slug?(m={connectionId:ce,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=m):m=e[2];const f=$(m);let r;e[3]!==l?.user?.email?(r=ne.decoSites(l?.user?.email),e[3]=l?.user?.email,e[4]=r):r=e[4];let h;e[5]!==n.slug?(h=()=>ut(n.slug),e[5]=n.slug,e[6]=h):h=e[6];const x=s&&!!l?.user?.email;let T;e[7]!==r||e[8]!==h||e[9]!==x?(T={queryKey:r,queryFn:h,enabled:x,staleTime:6e4,retry:!1},e[7]=r,e[8]=h,e[9]=x,e[10]=T):T=e[10];const{data:b,isLoading:N,error:y}=He(T),i=b?.sites??[];let I;e[11]!==o?(I=w=>{w||(p(null),g("")),o(w)},e[11]=o,e[12]=I):I=e[12];const v=I;let j;e[13]!==C?(j=w=>w.name.toLowerCase().includes(C.toLowerCase())||w.domains?.[0]?.domain.toLowerCase().includes(C.toLowerCase()),e[13]=C,e[14]=j):j=e[14];const S=i.filter(j),A=!_||S.some(w=>w.name===_);let E;e[15]!==f||e[16]!==n.id||e[17]!==n.slug?(E=async w=>{D("deco_site_import_started",{site_name:w});const P=await fetch(`/api/${n.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:w,orgId:n.id})}),G=await P.json().catch(gt);if(!P.ok)throw new Error(G.error??`Failed to create connection (${P.status})`);const M=G.connId;if(!M)throw new Error("Server did not return a connection ID");const he=G.icon??null,te=dt(w),Ge=await f.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:w,description:"Imported from deco.cx",pinned:!0,icon:he??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:he,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:M,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:M,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:M,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:M,toolName:"file_explorer"}}}},connections:[{connection_id:M}]}}}),De=Ge.structuredContent??Ge;return{slug:te,virtualMcpId:De.item.id,connId:M,item:De.item}},e[15]=f,e[16]=n.id,e[17]=n.slug,e[18]=E):E=e[18];let R;e[19]!==f||e[20]!==v||e[21]!==c||e[22]!==n.id||e[23]!==u?(R=w=>{const{slug:P,virtualMcpId:G,item:M}=w;D("deco_site_import_succeeded",{site_name:M.title,virtual_mcp_id:G,slug:P}),u.setQueryData(ne.collectionItem(f,n.id,"","VIRTUAL_MCP",G),{item:M}),u.invalidateQueries({predicate:he=>{const te=he.queryKey;return te[1]===n.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:ne.projects(n.id)}),oe.success(`Imported ${P} from deco.cx`),v(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(G)},e[19]=f,e[20]=v,e[21]=c,e[22]=n.id,e[23]=u,e[24]=R):R=e[24];let z;e[25]!==E||e[26]!==R?(z={mutationFn:E,onSuccess:R,onError:ft},e[25]=E,e[26]=R,e[27]=z):z=e[27];const k=Be(z),se=de,L=le,ie="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let F;e[28]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:"Import from deco.cx"})}),e[28]=F):F=e[28];let H;e[29]!==d?(H=d&&t.jsx("button",{type:"button",onClick:d,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ae,{size:18})}),e[29]=d,e[30]=H):H=e[30];let fe;e[31]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[31]=fe):fe=e[31];let B;e[32]!==H?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[H,fe]}),e[32]=H,e[33]=B):B=e[33];let ge;e[34]===Symbol.for("react.memo_cache_sentinel")?(ge=w=>{w.key==="Escape"&&g("")},e[34]=ge):ge=e[34];let q;e[35]!==C?(q=t.jsx("div",{children:t.jsx(Qe,{value:C,onChange:g,placeholder:"Search sites...",onKeyDown:ge})}),e[35]=C,e[36]=q):q=e[36];const We="pb-0 min-h-[300px]";let Q;e[37]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[37]=N,e[38]=Q):Q=e[38];const Ce=!N&&!y&&i.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Ie=!N&&i.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[S.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",C,"”"]}),S.map(w=>{const P=w.domains?.find(mt)?.domain??w.domains?.[0]?.domain,G=_===w.name;return t.jsxs("button",{type:"button",onClick:()=>p(w.name),className:xe("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",G?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:w.thumb_url?t.jsx("img",{src:w.thumb_url,alt:w.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:w.name}),P&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:P})]})]},w.name)})]});let Y;e[39]!==Q||e[40]!==Ce||e[41]!==Ie?(Y=t.jsxs("div",{className:We,children:[Q,Ce,Ie]}),e[39]=Q,e[40]=Ce,e[41]=Ie,e[42]=Y):Y=e[42];let K;e[43]!==v?(K=()=>v(!1),e[43]=v,e[44]=K):K=e[44];let W;e[45]!==k.isPending||e[46]!==K?(W=t.jsx(ae,{variant:"outline",onClick:K,disabled:k.isPending,children:"Cancel"}),e[45]=k.isPending,e[46]=K,e[47]=W):W=e[47];const Te=!_||!A||k.isPending||N;let J;e[48]!==k||e[49]!==_?(J=()=>_&&k.mutate(_),e[48]=k,e[49]=_,e[50]=J):J=e[50];const ye=k.isPending?"Importing...":"Import";let X;e[51]!==Te||e[52]!==J||e[53]!==ye?(X=t.jsx(ae,{disabled:Te,onClick:J,children:ye}),e[51]=Te,e[52]=J,e[53]=ye,e[54]=X):X=e[54];let Z;e[55]!==W||e[56]!==X?(Z=t.jsxs(nt,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[55]=W,e[56]=X,e[57]=Z):Z=e[57];let ee;e[58]!==L||e[59]!==F||e[60]!==B||e[61]!==q||e[62]!==Y||e[63]!==Z?(ee=t.jsxs(L,{className:ie,children:[F,B,q,Y,Z]}),e[58]=L,e[59]=F,e[60]=B,e[61]=q,e[62]=Y,e[63]=Z,e[64]=ee):ee=e[64];let pe;return e[65]!==se||e[66]!==v||e[67]!==s||e[68]!==ee?(pe=t.jsx(se,{open:s,onOpenChange:v,children:ee}),e[65]=se,e[66]=v,e[67]=s,e[68]=ee,e[69]=pe):pe=e[69],pe}function mt(a){return a.production}function ft(a){D("deco_site_import_failed",{error:a instanceof Error?a.message:"Unknown error"}),oe.error("Import failed: "+(a instanceof Error?a.message:"Unknown error"))}function gt(){return{}}function Ke(a,e){const s=U.c(12),{org:o}=V();let d;s[0]!==o.id?(d=Se.REGISTRY(o.id),s[0]=o.id,s[1]=d):d=s[1];const n=d;let c;s[2]!==o.id||s[3]!==o.slug||s[4]!==n?(c={connectionId:n,orgId:o.id,orgSlug:o.slug},s[2]=o.id,s[3]=o.slug,s[4]=n,s[5]=c):c=s[5];const u=$(c);let l;s[6]!==a?(l={name:a},s[6]=a,s[7]=l):l=s[7];const _=e?.enabled??!0;let p;return s[8]!==u||s[9]!==l||s[10]!==_?(p={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:l,enabled:_,staleTime:3e5,select:pt},s[8]=u,s[9]=l,s[10]=_,s[11]=p):p=s[11],ct(p)}function pt(a){return a.structuredContent?.item??null}const ht="deco/mcp-github";function xt(a){const{org:e}=V(),{data:s}=Fe.useSession(),o=Ee(),d=we(),[n,c]=O.useState("idle"),[u,l]=O.useState(null),[_,p]=O.useState(null),{data:C,isLoading:g}=Ke(ht,{enabled:a.enabled}),m=O.useRef(!1);a.enabled&&C&&!g&&!m.current&&s?.user?.id&&n==="idle"&&(m.current=!0,f());async function f(){if(!(!C||!s?.user?.id||!e))try{c("installing"),l(null);const h=rt(C,e.id,s.user.id,{remoteIndex:0});if(!h.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:T}=await o.create.mutateAsync(h);c("authenticating");const b=new URL(`/api/${e.slug}/mcp/${T}`,window.location.origin),N=await Je({url:b.href,token:null,orgId:e.id});if(N.supportsOAuth&&!N.isAuthenticated){const{token:y,tokenInfo:i,error:I}=await Xe({connectionId:T,orgSlug:e.slug,scope:"offline_access"});if(I||!y){try{await o.delete.mutateAsync(T)}catch{}throw new Error(I??"No token received from GitHub")}if(i)try{(await fetch(`/api/${e.slug}/connections/${T}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:i.accessToken,refreshToken:i.refreshToken,expiresIn:i.expiresIn,scope:i.scope,clientId:i.clientId,clientSecret:i.clientSecret,tokenEndpoint:i.tokenEndpoint})})).ok||await o.update.mutateAsync({id:T,data:{connection_token:y}})}catch{await o.update.mutateAsync({id:T,data:{connection_token:y}})}}je(d,e.id),p(h),c("ready")}catch(h){l(h instanceof Error?h.message:String(h)),c("error")}}function r(){c("idle"),l(null),p(null),m.current=!1}return a.enabled&&g&&n==="idle"?{status:"installing",error:null,connection:null,retry:r}:{status:n,error:u,connection:_,retry:r}}function Jt(a){const e=U.c(21),{open:s,onOpenChange:o,title:d,hideAutoRespondCheckbox:n,onImportComplete:c}=a,u=d===void 0?"Import from GitHub":d,l=n===void 0?!1:n,[_]=Ze(),[p,C]=O.useState(null);if(!_.experimental_vibecode)return null;let g;e[0]!==u?(g=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:u})}),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==p||e[3]!==u?(m=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(Ae,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(re,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:u})]})}),e[2]=p,e[3]=u,e[4]=m):m=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=f):f=e[5];let r;e[6]!==o?(r=()=>o(!1),e[6]=o,e[7]=r):r=e[7];let h;e[8]!==l||e[9]!==c||e[10]!==p||e[11]!==r?(h=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(O.Suspense,{fallback:f,children:t.jsx(Nt,{onComplete:r,selectedInstallation:p,onSelectInstallation:C,hideAutoRespondCheckbox:l,onImportComplete:c})})}),e[8]=l,e[9]=c,e[10]=p,e[11]=r,e[12]=h):h=e[12];let x;e[13]!==g||e[14]!==m||e[15]!==h?(x=t.jsxs(le,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[g,m,h]}),e[13]=g,e[14]=m,e[15]=h,e[16]=x):x=e[16];let T;return e[17]!==o||e[18]!==s||e[19]!==x?(T=t.jsx(de,{open:s,onOpenChange:o,children:x}),e[17]=o,e[18]=s,e[19]=x,e[20]=T):T=e[20],T}function Nt({onComplete:a,selectedInstallation:e,onSelectInstallation:s,hideAutoRespondCheckbox:o,onImportComplete:d}){const{org:n}=V(),c=we(),u=_e(),[l,_]=O.useState(null),[p,C]=O.useState(!0),g=o?!0:p,m=it({slug:"mcp-github"}),f=xt({enabled:m.length===0}),r=m.length===1?m[0]??null:l,h=$({connectionId:r?.id??"",orgId:n.id,orgSlug:n.slug}),x=$({connectionId:ce,orgId:n.id,orgSlug:n.slug}),T=async(i,I)=>{try{const j=await h.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:I}});if(j.isError)return null;const A=j.content?.find(E=>E.type==="resource")?.resource?.text;if(!A)return null;try{const E=JSON.parse(A);return typeof E=="string"?E:JSON.stringify(E)}catch{return A}}catch{return null}},b=(i,I)=>{Promise.all([T(I,"AGENTS.md"),T(I,"CLAUDE.md")]).then(async([v,j])=>{const S=v??j??null;S&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:S}}}}),je(c,n.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},N=async({virtualMcpId:i,repo:I,connectionId:v})=>{const j=await h.callTool({name:"TRIGGER_LIST",arguments:{}}),S=j.structuredContent??j,A=S.triggers?.find(L=>L.type==="github.issues.opened")??S.triggers?.find(L=>{const ie=L.type.toLowerCase();return/\bissues?\./.test(ie)&&(ie.endsWith(".opened")||ie.endsWith(".created"))});if(!A)throw new Error("No issue-created trigger exposed by GitHub connection");const E=new Set;if(Array.isArray(A.params))for(const L of A.params)E.add(L.name);else if(A.params&&typeof A.params=="object")for(const L of Object.keys(A.params))E.add(L);if(A.paramsSchema)for(const L of Object.keys(A.paramsSchema))E.add(L);const R={};E.has("repo")?R.repo=`${I.owner}/${I.name}`:(E.has("owner")&&(R.owner=I.owner),E.has("name")&&(R.name=I.name),E.has("repository")&&(R.repository=`${I.owner}/${I.name}`));const z=`A new GitHub issue has been opened in ${I.owner}/${I.name}. Read the issue details, explore the relevant code in the repository, create a new branch, implement the fix or feature requested, and open a pull request that resolves the issue. Reference the issue number in the PR description.`,k=await x.callTool({name:"AUTOMATION_CREATE",arguments:{name:`${I.name}: auto-respond to issues`,virtual_mcp_id:i,messages:z,active:!0}}),se=k.structuredContent??k;await x.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:se.id,type:"event",connection_id:v,event_type:A.type,params:R}})},y=Be({mutationFn:async i=>{if(!r||!e)throw new Error("No GitHub connection or installation");const I=r.id,v=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:e.installationId,connectionId:I},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:I}]}}}),j=v.structuredContent??v,S=j.item.id;return g&&await N({virtualMcpId:S,repo:i,connectionId:I}).catch(A=>{console.error("Failed to set up issue automation:",A),oe.warning("Imported repo, but failed to set up issue auto-response. You can add the trigger manually from the automations view.")}),{virtualMcpId:S,repo:i,connectionId:I,item:j.item}},onSuccess:({virtualMcpId:i,repo:I,connectionId:v,item:j})=>{if(c.setQueryData(ne.collectionItem(x,n.id,"","VIRTUAL_MCP",i),{item:j}),je(c,n.id),b(i,I),d){d({virtualMcpId:i,repo:I,connectionId:v});return}oe.success(`Imported ${I.name} from GitHub`),a(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),u(i)},onError:i=>{oe.error("Failed to import repo: "+(i instanceof Error?i.message:"Unknown error"))}});return f.status==="installing"||f.status==="authenticating"?t.jsx(ve,{status:f.status,error:null,retry:f.retry}):f.status==="error"?t.jsx(ve,{status:"error",error:f.error,retry:f.retry}):m.length===0&&f.status==="idle"?t.jsx(ve,{status:"installing",error:null,retry:f.retry}):m.length>1&&!r?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),m.map(i=>t.jsxs("button",{type:"button",onClick:()=>_(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(re,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):r?e?t.jsx(Ct,{connectionId:r.id,orgId:n.id,orgSlug:n.slug,installation:e,onSelectRepo:i=>y.mutate(i),isSaving:y.isPending,autoRespondToIssues:p,onAutoRespondChange:C,hideAutoRespondCheckbox:o}):t.jsx(_t,{connectionId:r.id,orgId:n.id,orgSlug:n.slug,onSelect:s,showBackButton:m.length>1,onBack:()=>_(null)}):null}function _t(a){const e=U.c(31),{connectionId:s,orgId:o,orgSlug:d,onSelect:n,showBackButton:c,onBack:u}=a;let l;e[0]!==o||e[1]!==d?(l={connectionId:ce,orgId:o,orgSlug:d},e[0]=o,e[1]=d,e[2]=l):l=e[2];const _=$(l);let p;e[3]!==s||e[4]!==o?(p=ne.githubUserOrgs(o,s),e[3]=s,e[4]=o,e[5]=p):p=e[5];let C;e[6]!==s||e[7]!==_?(C=async()=>{const I=(await _.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:s}})).content?.[0]?.text;if(!I)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(I)},e[6]=s,e[7]=_,e[8]=C):C=e[8];let g;e[9]!==p||e[10]!==C?(g={queryKey:p,queryFn:C},e[9]=p,e[10]=C,e[11]=g):g=e[11];const m=He(g);if(m.isLoading){let i;return e[12]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=i):i=e[12],i}if(m.isError){let i;return e[13]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=i):i=e[13],i}const f=m.data;if(!f)return null;let r;e[14]!==u||e[15]!==c?(r=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ae,{size:12}),"Change connection"]})}),e[14]=u,e[15]=c,e[16]=r):r=e[16];let h;if(e[17]!==f.installations||e[18]!==n){let i;e[20]!==n?(i=I=>t.jsxs("button",{type:"button",onClick:()=>n(I),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:I.avatarUrl,alt:I.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:I.login}),I.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},I.installationId),e[20]=n,e[21]=i):i=e[21],h=f.installations.map(i),e[17]=f.installations,e[18]=n,e[19]=h}else h=e[19];let x;e[22]!==h?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:h}),e[22]=h,e[23]=x):x=e[23];const T=f.appSlug?`https://github.com/apps/${f.appSlug}/installations/new`:"https://github.com/settings/installations";let b;e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=b):b=e[24];let N;e[25]!==T?(N=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",b]})}),e[25]=T,e[26]=N):N=e[26];let y;return e[27]!==N||e[28]!==r||e[29]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r,x,N]}),e[27]=N,e[28]=r,e[29]=x,e[30]=y):y=e[30],y}function Ct(a){const e=U.c(25),{connectionId:s,orgId:o,orgSlug:d,installation:n,onSelectRepo:c,isSaving:u,autoRespondToIssues:l,onAutoRespondChange:_,hideAutoRespondCheckbox:p}=a,[C,g]=O.useState(""),m=O.useDeferredValue(C),f=C!==m;let r;e[0]!==f||e[1]!==C?(r=t.jsx(Qe,{placeholder:"Search repositories...",value:C,onChange:g,isSearching:f}),e[0]=f,e[1]=C,e[2]=r):r=e[2];const h=f?"opacity-40":"opacity-100";let x;e[3]!==h?(x=xe("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",h),e[3]=h,e[4]=x):x=e[4];let T;e[5]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=T):T=e[5];let b;e[6]!==s||e[7]!==m||e[8]!==n||e[9]!==u||e[10]!==c||e[11]!==o||e[12]!==d?(b=t.jsx(O.Suspense,{fallback:T,children:t.jsx(It,{connectionId:s,orgId:o,orgSlug:d,installation:n,query:m,onSelectRepo:c,isSaving:u})}),e[6]=s,e[7]=m,e[8]=n,e[9]=u,e[10]=c,e[11]=o,e[12]=d,e[13]=b):b=e[13];let N;e[14]!==x||e[15]!==b?(N=t.jsx("div",{className:x,children:b}),e[14]=x,e[15]=b,e[16]=N):N=e[16];let y;e[17]!==l||e[18]!==p||e[19]!==_?(y=!p&&t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 border-t border-border shrink-0 cursor-pointer select-none",children:[t.jsx(st,{checked:l,onCheckedChange:I=>_(I===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Auto-respond to new issues with a PR"})]}),e[17]=l,e[18]=p,e[19]=_,e[20]=y):y=e[20];let i;return e[21]!==r||e[22]!==N||e[23]!==y?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r,N,y]}),e[21]=r,e[22]=N,e[23]=y,e[24]=i):i=e[24],i}function It(a){const e=U.c(29),{connectionId:s,orgId:o,orgSlug:d,installation:n,query:c,onSelectRepo:u,isSaving:l}=a;let _;e[0]!==s||e[1]!==o||e[2]!==d?(_={connectionId:s,orgId:o,orgSlug:d},e[0]=s,e[1]=o,e[2]=d,e[3]=_):_=e[3];const p=$(_),C=n.type==="User"?"user":"org",g=c?`${C}:${n.login} ${c} in:name`:`${C}:${n.login}`;let m;e[4]!==s||e[5]!==n.login||e[6]!==o||e[7]!==c?(m=ne.githubOrgRepos(o,s,n.login,c),e[4]=s,e[5]=n.login,e[6]=o,e[7]=c,e[8]=m):m=e[8];let f;e[9]!==p||e[10]!==g?(f=async()=>{const N=(await p.callTool({name:"search_repositories",arguments:{query:g,page:1,perPage:30}})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(Tt)},e[9]=p,e[10]=g,e[11]=f):f=e[11];let r;e[12]!==m||e[13]!==f?(r={queryKey:m,queryFn:f},e[12]=m,e[13]=f,e[14]=r):r=e[14];const{data:h}=et(r);if(h.length===0){let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=b):b=e[15];let N;e[16]!==c?(N=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=c,e[17]=N):N=e[17];let y;return e[18]!==N?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[b,N]}),e[18]=N,e[19]=y):y=e[19],y}let x;if(e[20]!==l||e[21]!==u||e[22]!==h){let b;e[24]!==l||e[25]!==u?(b=N=>t.jsxs("button",{type:"button",onClick:()=>u(N),disabled:l,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(re,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:N.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[N.private?t.jsx(ot,{size:10}):t.jsx(at,{size:10}),N.private?"Private":"Public"]})]},N.fullName),e[24]=l,e[25]=u,e[26]=b):b=e[26],x=h.map(b),e[20]=l,e[21]=u,e[22]=h,e[23]=x}else x=e[23];let T;return e[27]!==x?(T=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:x}),e[27]=x,e[28]=T):T=e[28],T}function Tt(a){return{name:a.name,fullName:a.full_name,owner:a.full_name.split("/")[0]??"",url:a.html_url,private:a.private,description:a.description,updatedAt:a.updated_at}}function ve(a){const e=U.c(33),{status:s,error:o,retry:d}=a;if(s==="error"){let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-destructive"})}),e[0]=i):i=e[0];let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=I):I=e[1];const v=o??"Something went wrong while connecting to GitHub.";let j;e[2]!==v?(j=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[I,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:v})]}),e[2]=v,e[3]=j):j=e[3];let S;e[4]!==d?(S=t.jsx("button",{type:"button",onClick:d,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=d,e[5]=S):S=e[5];let A;return e[6]!==j||e[7]!==S?(A=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[i,j,S]}),e[6]=j,e[7]=S,e[8]=A):A=e[8],A}const n=s==="authenticating";let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-foreground"})}),e[9]=c):c=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[c,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Ne,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const l=n?"Authenticating with GitHub":"Setting up GitHub";let _;e[11]!==l?(_=t.jsx("p",{className:"text-sm font-medium",children:l}),e[11]=l,e[12]=_):_=e[12];const p=n?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let C;e[13]!==p?(C=t.jsx("p",{className:"text-xs text-muted-foreground",children:p}),e[13]=p,e[14]=C):C=e[14];let g;e[15]!==_||e[16]!==C?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,C]}),e[15]=_,e[16]=C,e[17]=g):g=e[17];const m=n?"bg-muted-foreground/30":"bg-foreground animate-pulse";let f;e[18]!==m?(f=xe("size-1.5 rounded-full",m),e[18]=m,e[19]=f):f=e[19];let r;e[20]!==f?(r=t.jsx("span",{className:f}),e[20]=f,e[21]=r):r=e[21];const h=n?"bg-foreground animate-pulse":"bg-muted-foreground/30";let x;e[22]!==h?(x=xe("size-1.5 rounded-full",h),e[22]=h,e[23]=x):x=e[23];let T;e[24]!==x?(T=t.jsx("span",{className:x}),e[24]=x,e[25]=T):T=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=b):b=e[26];let N;e[27]!==r||e[28]!==T?(N=t.jsxs("div",{className:"flex items-center gap-1.5",children:[r,T,b]}),e[27]=r,e[28]=T,e[29]=N):N=e[29];let y;return e[30]!==N||e[31]!==g?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,g,N]}),e[30]=N,e[31]=g,e[32]=y):y=e[32],y}const yt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function $e(a){const e=U.c(7),{onRecruit:s,isRecruiting:o,isLoading:d}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=n):n=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[c,t.jsx("ul",{className:"space-y-1.5",children:yt.map(bt)})]}),e[2]=u):u=e[2];const l=o||d,_=o?"Setting up...":"Add Site Diagnostics";let p;return e[3]!==s||e[4]!==l||e[5]!==_?(p=t.jsxs("div",{className:"flex flex-col gap-6",children:[n,u,t.jsx(ae,{onClick:s,disabled:l,className:"w-full cursor-pointer",children:_})]}),e[3]=s,e[4]=l,e[5]=_,e[6]=p):p=e[6],p}function bt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function Xt({open:a,onOpenChange:e,existingAgent:s}){const o=ke(),{org:d}=V(),n=_e(),c=Ee(),u=Pe(),l=$({connectionId:ce,orgId:d.id,orgSlug:d.slug}),_=Ye({client:l}),[p,C]=O.useState(!1),g=qe.find(y=>y.id==="site-diagnostics"),{data:m,isLoading:f}=Ke(g.appId,{enabled:a}),r=m?.title||m?.server?.title||m?.server?.name||g.title,h=m?.server?.icons?.[0]?.src??g.icon,x=m?.server?.description??null,T=t.jsx(Ue,{icon:h,name:r,size:"sm"}),b=async()=>{if(m){if(s){e(!1),n(s.id);return}C(!0);try{const y=await _.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:g.appId},limit:1,offset:0}});let i;const v=y?.structuredContent?.items?.find(S=>S.app_id===g.appId);if(v)i=v.id;else{const S=m.server?.remotes?.[0]?.url;if(!S)throw new Error("Registry item is missing a remote URL for site-diagnostics");i=(await c.create.mutateAsync({title:r,description:x,icon:m.server?.icons?.[0]?.src??g.icon,connection_type:"HTTP",connection_url:S,app_name:m.server?.name??"site-diagnostics",app_id:g.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:g.appId,verified:!0}})).id}const j=await u.create.mutateAsync({title:r,description:x,icon:h,status:"active",connections:[{connection_id:i,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:i,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:i,toolName:"diagnose"}}}}});D("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:j.id}),e(!1),n(j.id)}catch(y){D("agent_recruit_failed",{template_id:"site-diagnostics",error:y instanceof Error?y.message:String(y)}),console.error("Failed to create Site Diagnostics agent:",y)}finally{C(!1)}}},N=`Add ${r}`;return o?t.jsx(Oe,{open:a,onOpenChange:e,children:t.jsxs(Le,{className:"h-[70dvh]",children:[t.jsx(Re,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[T,t.jsx(Me,{className:"text-xl font-semibold",children:N})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx($e,{onRecruit:b,isRecruiting:p,isLoading:f})})]})}):t.jsx(de,{open:a,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-[500px] p-8",children:[t.jsx(ue,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[T,t.jsx(me,{className:"text-xl font-semibold",children:N})]})}),t.jsx($e,{onRecruit:b,isRecruiting:p,isLoading:f})]})})}const vt=`<role>
|
|
2
|
-
You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
|
|
3
|
-
</role>
|
|
4
|
-
|
|
5
|
-
<capabilities>
|
|
6
|
-
- Create new agents with appropriate connections and instructions.
|
|
7
|
-
- Update agent configurations: instructions, connections, tool/resource/prompt selection.
|
|
8
|
-
- List and inspect existing agents and their current setup.
|
|
9
|
-
- Delete agents that are no longer needed.
|
|
10
|
-
- Configure agent plugins and pinned views.
|
|
11
|
-
- Browse available connections to help decide what to aggregate into an agent.
|
|
12
|
-
</capabilities>
|
|
13
|
-
|
|
14
|
-
<constraints>
|
|
15
|
-
- You can list and inspect connections but cannot create, modify, or delete them.
|
|
16
|
-
- Always confirm with the user before deleting an agent.
|
|
17
|
-
- When adding connections to an agent, verify the connection exists by listing or getting it first.
|
|
18
|
-
- Do not broaden an agent's scope unless the user explicitly requests it.
|
|
19
|
-
- Preserve existing behavior when updating — apply the smallest necessary change set.
|
|
20
|
-
</constraints>
|
|
21
|
-
|
|
22
|
-
<workflows>
|
|
23
|
-
1. Creating an agent:
|
|
24
|
-
a. List available connections with COLLECTION_CONNECTIONS_LIST.
|
|
25
|
-
b. Confirm the agent's purpose, target user, and scope with the user.
|
|
26
|
-
c. Create the agent with COLLECTION_VIRTUAL_MCP_CREATE, including a focused title, description, selected connections, and XML-structured instructions.
|
|
27
|
-
d. Verify the saved configuration with COLLECTION_VIRTUAL_MCP_GET.
|
|
28
|
-
|
|
29
|
-
2. Updating an agent:
|
|
30
|
-
a. Get the current agent config with COLLECTION_VIRTUAL_MCP_GET.
|
|
31
|
-
b. If the update changes connections, verify new connections exist with COLLECTION_CONNECTIONS_GET.
|
|
32
|
-
c. Apply changes with COLLECTION_VIRTUAL_MCP_UPDATE using the smallest change set.
|
|
33
|
-
d. Confirm the final state with COLLECTION_VIRTUAL_MCP_GET.
|
|
34
|
-
|
|
35
|
-
3. Reviewing agents:
|
|
36
|
-
a. List all agents with COLLECTION_VIRTUAL_MCP_LIST.
|
|
37
|
-
b. For detailed inspection, use COLLECTION_VIRTUAL_MCP_GET on specific agents.
|
|
38
|
-
c. Cross-reference with COLLECTION_CONNECTIONS_LIST to identify unused or missing connections.
|
|
39
|
-
</workflows>`,jt=`<role>
|
|
40
|
-
You are the Automation Manager. You create, configure, and manage automations — background agents that run on triggers (cron schedules or events).
|
|
41
|
-
</role>
|
|
42
|
-
|
|
43
|
-
<capabilities>
|
|
44
|
-
- Create automations with instructions, model configuration, and triggers.
|
|
45
|
-
- Add and remove triggers (cron schedules or event-based).
|
|
46
|
-
- Manually run automations for testing.
|
|
47
|
-
- Update automation behavior, instructions, and model settings.
|
|
48
|
-
- List and inspect existing automations.
|
|
49
|
-
- Delete automations that are no longer needed.
|
|
50
|
-
- Browse available agents and connections to configure automation targets.
|
|
51
|
-
</capabilities>
|
|
52
|
-
|
|
53
|
-
<constraints>
|
|
54
|
-
- You can list and inspect agents and connections but cannot create, modify, or delete them.
|
|
55
|
-
- Always confirm with the user before deleting an automation.
|
|
56
|
-
- When assigning an agent to an automation, verify the agent exists first.
|
|
57
|
-
- Validate cron expressions before adding cron triggers.
|
|
58
|
-
- Warn the user about high-frequency triggers (less than 1 minute intervals).
|
|
59
|
-
</constraints>
|
|
60
|
-
|
|
61
|
-
<workflows>
|
|
62
|
-
1. Creating an automation:
|
|
63
|
-
a. Clarify the automation's purpose, schedule, and expected behavior.
|
|
64
|
-
b. List agents with COLLECTION_VIRTUAL_MCP_LIST and confirm the target — pass its id as virtual_mcp_id to AUTOMATION_CREATE.
|
|
65
|
-
c. Create the automation with AUTOMATION_CREATE, including clear instructions and model config.
|
|
66
|
-
d. Add triggers with AUTOMATION_TRIGGER_ADD (cron or event-based).
|
|
67
|
-
e. Verify with AUTOMATION_GET.
|
|
68
|
-
|
|
69
|
-
2. Updating an automation:
|
|
70
|
-
a. Get current config with AUTOMATION_GET.
|
|
71
|
-
b. Apply changes with AUTOMATION_UPDATE.
|
|
72
|
-
c. If triggers need updating, use AUTOMATION_TRIGGER_REMOVE and AUTOMATION_TRIGGER_ADD.
|
|
73
|
-
d. Confirm the final state with AUTOMATION_GET.
|
|
74
|
-
|
|
75
|
-
3. Testing an automation:
|
|
76
|
-
a. Get the automation config with AUTOMATION_GET to review its setup.
|
|
77
|
-
b. Run it manually with AUTOMATION_RUN.
|
|
78
|
-
c. Report the result to the user.
|
|
79
|
-
</workflows>`,wt=`<role>
|
|
80
|
-
You are the Connection Manager. You create, configure, test, and manage MCP connections in this workspace.
|
|
81
|
-
</role>
|
|
82
|
-
|
|
83
|
-
<capabilities>
|
|
84
|
-
- Create new connections (HTTP, SSE, STDIO types) with proper configuration.
|
|
85
|
-
- List and inspect existing connections and their status.
|
|
86
|
-
- Update connection details: URL, headers, authentication, metadata.
|
|
87
|
-
- Test connection health to verify connectivity.
|
|
88
|
-
- Delete connections that are no longer needed.
|
|
89
|
-
</capabilities>
|
|
90
|
-
|
|
91
|
-
<constraints>
|
|
92
|
-
- Always confirm with the user before deleting a connection.
|
|
93
|
-
- Never expose connection tokens or secrets in responses — refer to them as "configured" or "not configured."
|
|
94
|
-
- When creating HTTP connections, validate that a URL is provided.
|
|
95
|
-
- Test connections after creation or URL changes to verify they work.
|
|
96
|
-
- Warn the user if deleting a connection that might be in use by agents (suggest they check first).
|
|
97
|
-
</constraints>
|
|
98
|
-
|
|
99
|
-
<workflows>
|
|
100
|
-
1. Creating a connection:
|
|
101
|
-
a. Clarify the connection type (HTTP, SSE, or STDIO) and target URL/command.
|
|
102
|
-
b. Create with COLLECTION_CONNECTIONS_CREATE, including title, description, type, and URL.
|
|
103
|
-
c. Test the new connection with CONNECTION_TEST.
|
|
104
|
-
d. Report the result to the user.
|
|
105
|
-
|
|
106
|
-
2. Troubleshooting a connection:
|
|
107
|
-
a. Get the connection details with COLLECTION_CONNECTIONS_GET.
|
|
108
|
-
b. Run CONNECTION_TEST to check health.
|
|
109
|
-
c. If the test fails, review the configuration and suggest fixes.
|
|
110
|
-
d. After fixes, re-test to confirm.
|
|
111
|
-
|
|
112
|
-
3. Auditing connections:
|
|
113
|
-
a. List all connections with COLLECTION_CONNECTIONS_LIST.
|
|
114
|
-
b. Test each connection's health with CONNECTION_TEST.
|
|
115
|
-
c. Report which connections are healthy, erroring, or inactive.
|
|
116
|
-
</workflows>`,St=[{id:"studio-agent-manager",title:"Agent Manager",icon:"icon://Bot?color=violet",description:"Create, configure, and manage agents",selectedTools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET"],instructions:vt,getId:be.AGENT_MANAGER},{id:"studio-automation-manager",title:"Automation Manager",icon:"icon://Zap?color=amber",description:"Create, configure, and run automations with triggers",selectedTools:["AUTOMATION_CREATE","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_RUN","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET"],instructions:jt,getId:be.AUTOMATION_MANAGER},{id:"studio-connection-manager",title:"Connection Manager",icon:"icon://Link01?color=cyan",description:"Create, configure, test, and manage connections",selectedTools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","CONNECTION_TEST"],instructions:wt,getId:be.CONNECTION_MANAGER}],At=[{title:"Agent Manager",description:"Create, configure, and manage agents"},{title:"Automation Manager",description:"Create, configure, and run automations with triggers"},{title:"Connection Manager",description:"Create, configure, test, and manage connections"}];function Ve(a){const e=U.c(7),{onInstall:s,isInstalling:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Install a suite of pre-configured agents for managing your studio. Each agent is scoped to a specific domain with focused instructions."}),e[0]=d):d=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Included agents"}),e[1]=n):n=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"space-y-2",children:[n,t.jsx("ul",{className:"space-y-1.5",children:At.map(Et)})]}),e[2]=c):c=e[2];const u=o?"Installing...":"Install Studio Pack";let l;return e[3]!==o||e[4]!==s||e[5]!==u?(l=t.jsxs("div",{className:"flex flex-col gap-6",children:[d,c,t.jsx(ae,{onClick:s,disabled:o,className:"w-full cursor-pointer",children:u})]}),e[3]=o,e[4]=s,e[5]=u,e[6]=l):l=e[6],l}function Et(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),t.jsxs("span",{children:[t.jsx("span",{className:"text-foreground font-medium",children:a.title})," ","— ",a.description]})]},a.title)}function Zt({open:a,onOpenChange:e}){const s=ke(),{org:o}=V(),d=Pe(),n=lt(),c=tt(),[u,l]=O.useState(!1),_=t.jsx(Ue,{icon:"icon://Package?color=blue",name:"Studio Pack",size:"sm"}),p=async()=>{l(!0);try{const g=Se.SELF(o.id),m=new Set(n.map(r=>r.title));let f=0;for(const r of St)m.has(r.title)||(await d.create.mutateAsync({title:r.title,description:r.description,icon:r.icon,status:"active",metadata:{instructions:r.instructions},connections:[{connection_id:g,selected_tools:[...r.selectedTools],selected_resources:null,selected_prompts:null}]}),f++);D("agent_recruit_confirmed",{template_id:"studio-pack",installed_count:f}),e(!1),c({to:"/$org",params:{org:o.slug}})}catch(g){D("agent_recruit_failed",{template_id:"studio-pack",error:g instanceof Error?g.message:String(g)}),console.error("Failed to install Studio Pack:",g)}finally{l(!1)}},C="Install Studio Pack";return s?t.jsx(Oe,{open:a,onOpenChange:e,children:t.jsxs(Le,{className:"h-[70dvh]",children:[t.jsx(Re,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Me,{className:"text-xl font-semibold",children:C})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onInstall:p,isInstalling:u})})]})}):t.jsx(de,{open:a,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-[500px] p-8",children:[t.jsx(ue,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(me,{className:"text-xl font-semibold",children:C})]})}),t.jsx(Ve,{onInstall:p,isInstalling:u})]})})}const Ot="https://sites-lean-canva.decocache.com/api/mcp",Lt=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function ze(a){const e=U.c(7),{onRecruit:s,isRecruiting:o}=a;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=d):d=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=n):n=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"space-y-2",children:[n,t.jsx("ul",{className:"space-y-1.5",children:Lt.map(Rt)})]}),e[2]=c):c=e[2];const u=o?"Setting up...":"Add Lean Canvas";let l;return e[3]!==o||e[4]!==s||e[5]!==u?(l=t.jsxs("div",{className:"flex flex-col gap-6",children:[d,c,t.jsx(ae,{onClick:s,disabled:o,className:"w-full cursor-pointer",children:u})]}),e[3]=o,e[4]=s,e[5]=u,e[6]=l):l=e[6],l}function Rt(a){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),a]},a)}function en({open:a,onOpenChange:e,existingAgent:s}){const o=ke(),{org:d}=V(),n=_e(),c=Ee(),u=Pe(),l=$({connectionId:ce,orgId:d.id,orgSlug:d.slug}),_=Ye({client:l}),[p,C]=O.useState(!1),g=qe.find(h=>h.id==="lean-canvas"),m=t.jsx(Ue,{icon:g.icon,name:g.title,size:"sm"}),f=async()=>{if(s){e(!1),n(s.id);return}C(!0);try{const h=await _.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let x;const b=h?.structuredContent?.items?.find(i=>i.app_id==="lean-canvas"),N=Se.SELF(d.id);b?x=b.id:x=(await c.create.mutateAsync({title:g.title,description:"Lean Canvas business model builder",icon:g.icon,connection_type:"HTTP",connection_url:Ot,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:N}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const y=await u.create.mutateAsync({title:g.title,description:"Lean Canvas business model builder",icon:g.icon,status:"active",connections:[{connection_id:x,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:N,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:x,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:x,toolName:"lean_canvas"}}}}});D("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:y.id}),e(!1),n(y.id)}catch(h){D("agent_recruit_failed",{template_id:"lean-canvas",error:h instanceof Error?h.message:String(h)}),console.error("Failed to create Lean Canvas agent:",h)}finally{C(!1)}},r=`Add ${g.title}`;return o?t.jsx(Oe,{open:a,onOpenChange:e,children:t.jsxs(Le,{className:"h-[70dvh]",children:[t.jsx(Re,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[m,t.jsx(Me,{className:"text-xl font-semibold",children:r})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(ze,{onRecruit:f,isRecruiting:p})})]})}):t.jsx(de,{open:a,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-[500px] p-8",children:[t.jsx(ue,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[m,t.jsx(me,{className:"text-xl font-semibold",children:r})]})}),t.jsx(ze,{onRecruit:f,isRecruiting:p})]})})}export{re as G,Wt as I,en as L,Xt as S,Jt as a,Zt as b,Ke as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as S,j as s,r as w,Z as y}from"./index-Dl2t23Jt.js";import{i as R,t as _}from"./ChevronDown-tb8ftSUO.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as z,j as t,b as G,r as R,B as V,P as B,t as f,x as I}from"./index-Dl2t23Jt.js";import{P as E}from"./index-Bcf94soS.js";import{A as U}from"./avatar-C4FRugJb.js";import{S as T}from"./switch-W_Nrj6rK.js";import{S as H,a as Y,d as q,c as F}from"./select-C0JTp_6a.js";import{T as K,a as L}from"./toggle-group-COcCk4lG.js";import{I as J}from"./input-CluxDyoT.js";import{n as M,a as O,i as Q}from"./Sun-B7BWJEHb.js";import{i as W}from"./Play-DSYx2GJ2.js";import{p as X,q as Z}from"./question-004-sINsf4GQ.js";import"./index-DjgN9qrV.js";import{d as ee,S as $,a as D,b as h,c as te}from"./settings-section-qcMAXuoQ.js";import"./tooltip-CxizQODk.js";import"./X-viKat0oa.js";import"./User01-DmtseI1g.js";import"./ChevronDown-tb8ftSUO.js";import"./ChevronUp-ClqSoLtD.js";import"./card-oSxwoJvZ.js";import"./ArrowUpRight-BK_iYZ-J.js";function ie(){const{data:e,isPending:i}=G.useSession(),n=e?.user,l=n?.image,[s,o]=R.useState(null),[a,c]=R.useState(!1),m=s??n?.name??"",p=s!==null&&s!==(n?.name??""),u=async()=>{if(p){c(!0);try{await G.updateUser({name:m}),f("profile_updated",{fields:["name"]}),o(null),I.success("Profile updated")}catch{I.error("Failed to update profile")}finally{c(!1)}}};return i?null:t.jsx($,{children:t.jsxs(D,{children:[t.jsx(h,{title:"Avatar",action:t.jsx(U,{url:l,fallback:n?.name??"U",shape:"circle",size:"base"})}),t.jsx(h,{title:"Display name",action:t.jsx(J,{id:"display-name",value:m,onChange:d=>o(d.target.value),onKeyDown:d=>{d.key==="Enter"&&u()},placeholder:"Your name",className:"w-[280px]"})}),t.jsx(h,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:n?.email})}),p&&t.jsxs(te,{children:[t.jsx(V,{variant:"outline",size:"sm",onClick:()=>o(null),disabled:a,children:"Cancel"}),t.jsx(V,{onClick:u,disabled:a,size:"sm",children:a?"Saving…":"Save"})]})]})})}function ne(){const e=z.c(48),[i,n]=B();let l;e[0]!==n?(l=async r=>{if(r&&await Notification.requestPermission()!=="granted"){f("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),n(ae);return}f("preferences_notifications_toggled",{enabled:r}),n(x=>({...x,enableNotifications:r}))},e[0]=n,e[1]=l):l=e[1];const s=l;let o;e[2]!==n?(o=r=>{r&&(f("preferences_theme_changed",{to_value:r}),n(x=>({...x,theme:r})))},e[2]=n,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(L,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(L,{value:"dark","aria-label":"Dark theme",children:t.jsx(O,{size:14})}),e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(L,{value:"system","aria-label":"System theme",children:t.jsx(Q,{size:14})}),e[6]=m):m=e[6];let p;e[7]!==i.theme||e[8]!==o?(p=t.jsx(h,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(K,{type:"single",size:"sm",variant:"outline",value:i.theme,onValueChange:o,children:[a,c,m]})}),e[7]=i.theme,e[8]=o,e[9]=p):p=e[9];let u;e[10]!==s||e[11]!==i.enableNotifications?(u=typeof Notification<"u"?()=>s(!i.enableNotifications):void 0,e[10]=s,e[11]=i.enableNotifications,e[12]=u):u=e[12];let d;e[13]!==s||e[14]!==i.enableNotifications?(d=t.jsx(T,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:s}),e[13]=s,e[14]=i.enableNotifications,e[15]=d):d=e[15];let b;e[16]!==u||e[17]!==d?(b=t.jsx(h,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:u,action:d}),e[16]=u,e[17]=d,e[18]=b):b=e[18];let v;e[19]!==i.enableSounds||e[20]!==n?(v=()=>{f("preferences_sounds_toggled",{enabled:!i.enableSounds}),n(le)},e[19]=i.enableSounds,e[20]=n,e[21]=v):v=e[21];let P;e[22]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:se,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=P):P=e[22];let g;e[23]!==n?(g=r=>{f("preferences_sounds_toggled",{enabled:r}),n(x=>({...x,enableSounds:r}))},e[23]=n,e[24]=g):g=e[24];let j;e[25]!==i.enableSounds||e[26]!==g?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[P,t.jsx(T,{checked:i.enableSounds,onCheckedChange:g})]}),e[25]=i.enableSounds,e[26]=g,e[27]=j):j=e[27];let _;e[28]!==j||e[29]!==v?(_=t.jsx(h,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:v,action:j}),e[28]=j,e[29]=v,e[30]=_):_=e[30];let S;e[31]!==n?(S=r=>{f("preferences_tool_approval_changed",{to_value:r}),n(x=>({...x,toolApprovalLevel:r}))},e[31]=n,e[32]=S):S=e[32];let y;e[33]!==i.toolApprovalLevel?(y={readonly:"Ask before edit",auto:"Auto approve"}[i.toolApprovalLevel]??"Ask before edit",e[33]=i.toolApprovalLevel,e[34]=y):y=e[34];let N;e[35]!==y?(N=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:y})}),e[35]=y,e[36]=N):N=e[36];let A;e[37]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(q,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=A):A=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(F,{children:[A,t.jsx(q,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let C;e[39]!==i.toolApprovalLevel||e[40]!==S||e[41]!==N?(C=t.jsx(h,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(H,{value:i.toolApprovalLevel,onValueChange:S,children:[N,k]})}),e[39]=i.toolApprovalLevel,e[40]=S,e[41]=N,e[42]=C):C=e[42];let w;return e[43]!==_||e[44]!==C||e[45]!==p||e[46]!==b?(w=t.jsx($,{title:"Preferences",children:t.jsxs(D,{children:[p,b,_,C]})}),e[43]=_,e[44]=C,e[45]=p,e[46]=b,e[47]=w):w=e[47],w}function se(){f("preferences_sounds_previewed"),X(Z.dataUri).catch(oe)}function oe(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=z.c(11),[i,n]=B();let l;e[0]!==i.experimental_vibecode||e[1]!==n?(l=()=>{f("preferences_experimental_vibecode_toggled",{enabled:!i.experimental_vibecode}),n(ce)},e[0]=i.experimental_vibecode,e[1]=n,e[2]=l):l=e[2];let s;e[3]!==n?(s=c=>{f("preferences_experimental_vibecode_toggled",{enabled:c}),n(m=>({...m,experimental_vibecode:c}))},e[3]=n,e[4]=s):s=e[4];let o;e[5]!==i.experimental_vibecode||e[6]!==s?(o=t.jsx(T,{checked:i.experimental_vibecode,onCheckedChange:s}),e[5]=i.experimental_vibecode,e[6]=s,e[7]=o):o=e[7];let a;return e[8]!==l||e[9]!==o?(a=t.jsx($,{title:"Experimental",children:t.jsx(D,{children:t.jsx(h,{title:"Import from GitHub",description:"Enable importing agents from GitHub repositories.",onClick:l,action:o})})}),e[8]=l,e[9]=o,e[10]=a):a=e[10],a}function ce(e){return{...e,experimental_vibecode:!e.experimental_vibecode}}function de(){const e=z.c(1);let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ee,{children:[t.jsx(E.Title,{children:"Profile & Preferences"}),t.jsx(ie,{}),t.jsx(ne,{}),t.jsx(re,{})]})})})}),e[0]=i):i=e[0],i}function Ee(){const e=z.c(1);let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(de,{}),e[0]=i):i=e[0],i}export{Ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as E,s as H,j as N}from"./index-Dl2t23Jt.js";import{m as O,k as $,s as v}from"./pair-JxQa_xAh.js";import{u as L}from"./constants-CfwGLQ49.js";import{a as k,c as q}from"./use-mcp-tools-BdYIFx9S.js";import{c as B}from"./content-blocks-o63cs2vh.js";import{g as Y,M as G,b as w}from"./types-CvYZZZog.js";import{c as V,b as z}from"./chat-context-C4Hx_rZK.js";import{u as F}from"./shell-layout-CzPr_0c2.js";import"./agent-icon-BXkkrCT3.js";import"./AlertCircle-CbUYZGF-.js";import"./Tool01-D1Rvo01i.js";import"./XClose-DY7O9VST.js";import"./RefreshCcw01-Cr84gVY8.js";import"./ArrowNarrowLeft-DHj5-FLY.js";import"./XCircle-DZEMwZj2.js";import"./ArrowUpRight-BK_iYZ-J.js";import"./ZapSquare-BDbWe-zU.js";import"./Users03-DH9QAbco.js";import"./CheckCircle-D9qlmIve.js";import"./ChevronDown-tb8ftSUO.js";import"./ChevronRight-BIm0-OSp.js";import"./ChevronUp-ClqSoLtD.js";import"./DotsVertical-DEE8M0V4.js";import"./Container-BCDxdJoG.js";import"./Star01-PFA-ZRDO.js";import"./Palette-BrJL0UcN.js";import"./SearchMd-IP-R-mtT.js";import"./index-Bcf94soS.js";import"./tooltip-CxizQODk.js";import"./X-viKat0oa.js";import"./LinkExternal01-DM7IwrPj.js";import"./Lock01-BmjkKSvK.js";import"./Sun-B7BWJEHb.js";import"./Play-DSYx2GJ2.js";import"./Plus-BrBimbff.js";import"./Settings02-BOckjEVU.js";import"./Shield01-CJggUHAQ.js";import"./Trash01-DaGrAtTq.js";import"./User01-DmtseI1g.js";import"./Zap-BMzMPNv3.js";import"./index-BBrIielu.js";import"./use-copy-CHAuyAMC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-CoECADf1.js";import"./integration-icon-BipCD_m-.js";import"./use-virtual-mcp-BHEEZv3B.js";import"./use-collections-CwD8DZNY.js";import"./use-ai-providers-Bt2yRX0n.js";import"./use-decopilot-events-CXVUS53e.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-yxuEm5KK.js";import"./use-organization-settings-Dak2xww8.js";import"./required-auth-layout-BYto5m3H.js";import"./use-org-sso-CPzDtjox.js";const J={};function K(S){const t=E.c(37),{client:s,resourceURI:P,tool:e,connectionId:n,orgId:p,args:a}=S,{sendMessage:c}=V(),{setAppContext:f,clearAppContext:g}=z(),{setChatOpen:u,openTab:r}=F(),m=`${n}:${e.name}`;let o;t[0]!==r?(o=h=>h==="inline"?(r("0"),"inline"):"fullscreen",t[0]=r,t[1]=o):o=t[1];const d=o,l=a??J;let i;t[2]!==s||t[3]!==e.name||t[4]!==l?(i={client:s,toolName:e.name,toolArguments:l},t[2]=s,t[3]=e.name,t[4]=l,t[5]=i):i=t[5];const{data:T}=q(i);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=$(e._meta);R=v(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let x;t[9]!==e.inputSchema?(x=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=x):x=t[10];let A;t[11]!==U||t[12]!==x||t[13]!==e?(A={...e,name:U,inputSchema:x},t[11]=U,t[12]=x,t[13]=e,t[14]=A):A=t[14];const y=A;let _;t[15]!==c||t[16]!==u?(_=h=>{const b=B(h.content);b.content.length>0&&(u(!0),c({tiptapDoc:b}))},t[15]=c,t[16]=u,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let I;t[20]!==f||t[21]!==m?(I=h=>f(m,h),t[20]=f,t[21]=m,t[22]=I):I=t[22];let M;t[23]!==g||t[24]!==m?(M=()=>g(m),t[23]=g,t[24]=m,t[25]=M):M=t[25];let j;return t[26]!==s||t[27]!==D||t[28]!==d||t[29]!==p||t[30]!==P||t[31]!==C||t[32]!==I||t[33]!==M||t[34]!==l||t[35]!==T?(j=N.jsx(G,{resourceURI:P,orgId:p,toolInfo:C,toolInput:l,toolResult:T,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:s,onMessage:D,onUpdateModelContext:I,onTeardown:M,onRequestDisplayMode:d,className:"h-full"}),t[26]=s,t[27]=D,t[28]=d,t[29]=p,t[30]=P,t[31]=C,t[32]=I,t[33]=M,t[34]=l,t[35]=T,t[36]=j):j=t[36],j}function Qt(S){const t=E.c(23),{connectionId:s,toolName:P,args:e}=S,{org:n}=H();let p;t[0]!==s||t[1]!==n.id||t[2]!==n.slug?(p={connectionId:s,orgId:n.id,orgSlug:n.slug},t[0]=s,t[1]=n.id,t[2]=n.slug,t[3]=p):p=t[3];const a=L(p);let c;t[4]!==a?(c={client:a},t[4]=a,t[5]=c):c=t[5];const{data:f}=k(c),g=decodeURIComponent(P);let u;t[6]!==g?(u=O(g),t[6]=g,t[7]=u):u=t[7];const r=u;let m,o;if(t[8]!==r||t[9]!==f.tools){let i;t[12]!==r?(i=T=>T.name===r,t[12]=r,t[13]=i):i=t[13],o=f.tools.find(i),m=o?._meta?Y(o._meta):void 0,t[8]=r,t[9]=f.tools,t[10]=m,t[11]=o}else m=t[10],o=t[11];const d=m;if(!o||!d){let i;return t[14]!==r?(i=N.jsx("div",{className:"flex items-center justify-center h-full w-full",children:N.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[14]=r,t[15]=i):i=t[15],i}let l;return t[16]!==e||t[17]!==a||t[18]!==s||t[19]!==n.id||t[20]!==d||t[21]!==o?(l=N.jsx(K,{client:a,resourceURI:d,tool:o,connectionId:s,orgId:n.id,args:e}),t[16]=e,t[17]=a,t[18]=s,t[19]=n.id,t[20]=d,t[21]=o,t[22]=l):l=t[22],l}export{Qt as AppViewContent};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-D-sbU1qd.js","assets/index-Dl2t23Jt.js","assets/index-DXHNyf1g.css","assets/ArrowNarrowLeft-DHj5-FLY.js","assets/CheckCircle-D9qlmIve.js","assets/Container-BCDxdJoG.js","assets/Settings02-BOckjEVU.js","assets/XCircle-DZEMwZj2.js","assets/constants-CfwGLQ49.js","assets/useInfiniteQuery-3jN4yA7O.js","assets/infiniteQueryObserver-cqTNhL_G.js","assets/badge-_ZGDO29b.js","assets/input-CluxDyoT.js","assets/dropdown-menu-C6XDnng5.js","assets/ChevronDown-tb8ftSUO.js","assets/ChevronRight-BIm0-OSp.js","assets/DotsVertical-DEE8M0V4.js","assets/table-rVVQNhet.js","assets/toggle-group-COcCk4lG.js","assets/use-view-mode-w75x4zz0.js","assets/tooltip-CxizQODk.js","assets/SearchMd-IP-R-mtT.js","assets/dialog-CoECADf1.js","assets/X-viKat0oa.js","assets/AlertCircle-CbUYZGF-.js","assets/alert-dialog-BvuFarFf.js","assets/card-oSxwoJvZ.js","assets/Trash01-DaGrAtTq.js","assets/label-CHKFYnQo.js","assets/select-C0JTp_6a.js","assets/ChevronUp-ClqSoLtD.js","assets/switch-W_Nrj6rK.js","assets/textarea-Cld3tG5R.js","assets/RefreshCcw01-Cr84gVY8.js","assets/checkbox-CzxaEVzA.js","assets/LinkExternal01-DM7IwrPj.js","assets/use-copy-CHAuyAMC.js","assets/Plus-BrBimbff.js","assets/Play-DSYx2GJ2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as a,j as t,r,l as i,_ as o}from"./index-Dl2t23Jt.js";const n=r.lazy(()=>o(()=>import("./registry-layout-D-sbU1qd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
|