decocms 3.19.1 → 3.20.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-CfP2ydlK.js → AlertCircle-B-p2hhbf.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BG7K2o4g.js → ArrowUpRight-Bq-dJGgn.js} +1 -1
- package/dist/client/assets/{Check-Rzhysg8v.js → Check-CSixRgqh.js} +1 -1
- package/dist/client/assets/{CheckCircle-ByVfCd_z.js → CheckCircle-CqLcOI7o.js} +1 -1
- package/dist/client/assets/{ChevronDown-DgAQraB9.js → ChevronDown-BptXi8Ef.js} +1 -1
- package/dist/client/assets/{ChevronLeft-hIkmA-06.js → ChevronLeft-Bq6F--2K.js} +1 -1
- package/dist/client/assets/{ChevronRight-C-1GbVi6.js → ChevronRight-CtziSifX.js} +1 -1
- package/dist/client/assets/{ChevronUp-D95kdAWS.js → ChevronUp-DChs66VU.js} +1 -1
- package/dist/client/assets/{Container-EsK9R8Cs.js → Container-DIwdobum.js} +1 -1
- package/dist/client/assets/{DotsVertical--nxfulT_.js → DotsVertical-DQ3UGDDE.js} +1 -1
- package/dist/client/assets/{Eye-0u1NnyPn.js → Eye-DepFjUJE.js} +1 -1
- package/dist/client/assets/{FilterLines-lN6ZYEU6.js → FilterLines-CIJgiiLT.js} +1 -1
- package/dist/client/assets/{Globe01-CYJ5akFo.js → Globe01-BayTDYGC.js} +1 -1
- package/dist/client/assets/{HardDrive-Bi11tZlO.js → HardDrive-OwnJRrIS.js} +1 -1
- package/dist/client/assets/{Key01-ETI9VuA0.js → Key01-CR8zfCdU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D5P3SyL5.js → LayoutLeft-6fPyjOVd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CMTN51kD.js → LinkExternal01-B2YZgRTN.js} +1 -1
- package/dist/client/assets/{Monitor01-B9COEs1V.js → Monitor01-BNXW6pu5.js} +1 -1
- package/dist/client/assets/{Palette-CvBtCHX7.js → Palette-siqkt4cQ.js} +1 -1
- package/dist/client/assets/{Play-zcNTCzY3.js → Play-CBt0NeLA.js} +1 -1
- package/dist/client/assets/{Plus-BVt3gf6N.js → Plus-gXoAw_mX.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Do9uT8r5.js → RefreshCcw01-DlKjMM-5.js} +1 -1
- package/dist/client/assets/{SearchMd-Ckbe6j0d.js → SearchMd-z6b-QOmX.js} +1 -1
- package/dist/client/assets/{Settings02-BFHOCA5h.js → Settings02-C7YqxsZL.js} +1 -1
- package/dist/client/assets/{Shield01-ebA_Mmqa.js → Shield01-BT66FEMI.js} +1 -1
- package/dist/client/assets/{Star01-DinMZEQp.js → Star01-q6EhXttt.js} +1 -1
- package/dist/client/assets/{Stars01-cUHrtzm6.js → Stars01-DcMeK1n0.js} +1 -1
- package/dist/client/assets/{Stars02-CovFPupV.js → Stars02-DJ4Y5TfK.js} +1 -1
- package/dist/client/assets/{Sun-D5MzBxyK.js → Sun-CeFpMHQU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CLmvgZdy.js → SwitchHorizontal01-__hAuhZa.js} +1 -1
- package/dist/client/assets/{Tool01-D6Ixmgxm.js → Tool01-DXWYgeBe.js} +1 -1
- package/dist/client/assets/{Trash01-C6sXu2xm.js → Trash01-B91-1KNk.js} +1 -1
- package/dist/client/assets/{Upload01-DslYY_N3.js → Upload01-CcwGyBRP.js} +1 -1
- package/dist/client/assets/{User01-9CJ-p7XF.js → User01-JR_76gHl.js} +1 -1
- package/dist/client/assets/{Users01-Ds5_zubO.js → Users01-BM2QLqUJ.js} +1 -1
- package/dist/client/assets/{Users03-C3j_vENk.js → Users03-D5pU3_ql.js} +1 -1
- package/dist/client/assets/{X-Dzpu-bw3.js → X-DCWlm9Ta.js} +1 -1
- package/dist/client/assets/{XCircle-gezQrKJB.js → XCircle-CEKwTNMD.js} +1 -1
- package/dist/client/assets/{XClose-dfaecXcF.js → XClose-DhQ5V0ST.js} +1 -1
- package/dist/client/assets/{Zap-ZCJiHFB8.js → Zap-BLBAeivN.js} +1 -1
- package/dist/client/assets/{ZapSquare-Doe97qp7.js → ZapSquare-DSdwG_FE.js} +1 -1
- package/dist/client/assets/{ZoomOut-u9z9zRXH.js → ZoomOut-CCPaeWry.js} +1 -1
- package/dist/client/assets/{access-gate-CLs4hv6_.js → access-gate-DXlQ8iVy.js} +1 -1
- package/dist/client/assets/{accordion-y8ERtqeD.js → accordion-CsQ2TTIf.js} +1 -1
- package/dist/client/assets/add-section-modal-ilTOPIUe.js +1 -0
- package/dist/client/assets/{agent-capabilities-C4HO1AsU.js → agent-capabilities-CuNGQogd.js} +1 -1
- package/dist/client/assets/{agent-icon-atw8dEpB.js → agent-icon-Lc1AgwlE.js} +1 -1
- package/dist/client/assets/{agent-icons-BO9U458u.js → agent-icons-Cprwkzhw.js} +1 -1
- package/dist/client/assets/agents-list--b7dVWdV.js +1 -0
- package/dist/client/assets/ai-providers-Dw2EV4N6.js +1 -0
- package/dist/client/assets/{alert-f3LQH8ql.js → alert-HSAarVhN.js} +1 -1
- package/dist/client/assets/{alert-dialog-BDuu9Vea.js → alert-dialog-DJLxSS_E.js} +1 -1
- package/dist/client/assets/app-editor-ZPlbW7dI.js +1 -0
- package/dist/client/assets/{auth-catchall-kvc8ufSV.js → auth-catchall-DeBOSldf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CJrIhcxn.js → auth-split-layout-DKKncNKx.js} +1 -1
- package/dist/client/assets/{automation-list-row-DCGCyvJL.js → automation-list-row-C8yWYA2H.js} +1 -1
- package/dist/client/assets/automation-runs-D-WPNg7m.js +1 -0
- package/dist/client/assets/automations-C0KOU0yb.js +1 -0
- package/dist/client/assets/{avatar-DiepLBEZ.js → avatar-3vQWE5Hu.js} +1 -1
- package/dist/client/assets/{badge-Cosh8Jv6.js → badge-DF6gVmsi.js} +1 -1
- package/dist/client/assets/brand-context-EmCiQUXD.js +1 -0
- package/dist/client/assets/buckets-SH6KUYAQ.js +1 -0
- package/dist/client/assets/{calendar-D85iiJjZ.js → calendar-CCqv5TgR.js} +1 -1
- package/dist/client/assets/{capability-load-error-h6odhJ2k.js → capability-load-error-Dn3qy9VI.js} +1 -1
- package/dist/client/assets/{card-B2dT-2ts.js → card-CeH_PUFE.js} +1 -1
- package/dist/client/assets/{chat-context-7nRfVaxU.js → chat-context-BIie9ysT.js} +1 -1
- package/dist/client/assets/{checkbox-B2YbUc0m.js → checkbox-DFFY_m2B.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLeVCI6_.js → cli-auth-success-CKQ9nJ3v.js} +1 -1
- package/dist/client/assets/collection-detail-BVeEbzxz.js +1 -0
- package/dist/client/assets/{collection-display-button-COhijorf.js → collection-display-button-_le1JW4q.js} +1 -1
- package/dist/client/assets/{collection-search-C0bvNtM9.js → collection-search-Bryj5VYk.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C_B1r31J.js → collection-table-wrapper-DoTnvoII.js} +1 -1
- package/dist/client/assets/{collection-tabs-BN4In63u.js → collection-tabs-Y3w8w2D4.js} +1 -1
- package/dist/client/assets/{collections-BUCuRVxl.js → collections-B-UBhIxv.js} +1 -1
- package/dist/client/assets/{command-BjqkQYxa.js → command-KyGHPzm4.js} +1 -1
- package/dist/client/assets/connect-desktop-dialog-BeLm4wl6.js +1 -0
- package/dist/client/assets/connection-card-Dug8PvM2.js +1 -0
- package/dist/client/assets/connection-detail-BXK_93LF.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B093QOVj.js → connection-form-helpers-Ce4ZXQGG.js} +1 -1
- package/dist/client/assets/connections-CVEBwrj4.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-DYhlxmFV.js → decopilot-sse-pool-vfZK3kan.js} +1 -1
- package/dist/client/assets/{dialog-CvJmXij7.js → dialog-nXKceTRB.js} +1 -1
- package/dist/client/assets/domain-settings-OHWjjHlQ.js +1 -0
- package/dist/client/assets/{drawer-Cm2a8ouX.js → drawer-lSnonzW3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-jK5-EocK.js → dropdown-menu-DpfpR4kx.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-BYQB-ubA.js +1 -0
- package/dist/client/assets/{empty-state-BvMn8pb-.js → empty-state-BJuYi96S.js} +1 -1
- package/dist/client/assets/{empty-state-CZ6jnWLa.js → empty-state-CY7XUbo0.js} +1 -1
- package/dist/client/assets/extract-connection-data-DxtHEsy3.js +1 -0
- package/dist/client/assets/features-DeiC9LXr.js +1 -0
- package/dist/client/assets/file-explorer-Ch6ZQfZO.js +2 -0
- package/dist/client/assets/{file-type-icon-B565DmsG.js → file-type-icon-B2skJERp.js} +1 -1
- package/dist/client/assets/{files-DDtaNJV8.js → files-CZNNukx-.js} +1 -1
- package/dist/client/assets/{form-DAahwl9B.js → form-BM4RuTjX.js} +1 -1
- package/dist/client/assets/general-sYzqMtl5.js +1 -0
- package/dist/client/assets/{generate-id-CnLzNGg6.js → generate-id-DvX29Me7.js} +1 -1
- package/dist/client/assets/{github-repo-picker-qDFzaGLa.js → github-repo-picker-Dlio4Q6_.js} +1 -1
- package/dist/client/assets/{header-tab-button-sg2Bkh9m.js → header-tab-button-BY6bk4Fs.js} +1 -1
- package/dist/client/assets/{hover-card-DyNloM84.js → hover-card-DASEEDYA.js} +1 -1
- package/dist/client/assets/image-field-BTCmGBNs.js +1 -0
- package/dist/client/assets/{index-DaTDomcZ.js → index-1xoY7YJX.js} +1 -1
- package/dist/client/assets/{index-DU03U45c.js → index-BXzjL9VS.js} +4 -4
- package/dist/client/assets/{index-RoHcRkq0.js → index-BfzqpoYd.js} +3 -3
- package/dist/client/assets/{index-Dhy2A-ml.js → index-CVPVNlMM.js} +1 -1
- package/dist/client/assets/{index-BlWGRwfE.js → index-CaqKcth7.js} +1 -1
- package/dist/client/assets/{index-B2iHTL-o.js → index-CnLAq3ph.js} +1 -1
- package/dist/client/assets/{index-BloRy46B.js → index-D3hStv8f.js} +1 -1
- package/dist/client/assets/{index-BFIoANt_.js → index-D4BxVbG6.js} +1 -1
- package/dist/client/assets/index-DFmAjKzK.js +1 -0
- package/dist/client/assets/{index-nS3rTKOQ.js → index-DOW4VN4f.js} +1 -1
- package/dist/client/assets/{index-Dw66yPMC.js → index-DcxEaxY4.js} +1 -1
- package/dist/client/assets/index-Dey5W81J.js +1 -0
- package/dist/client/assets/index-e3NOZKNP.js +1 -0
- package/dist/client/assets/{index-BDzZll30.js → index-nkMA7ZNv.js} +1 -1
- package/dist/client/assets/{index-redirect-DNU9Ckad.js → index-redirect-Dz1DdiHC.js} +1 -1
- package/dist/client/assets/{index-3Euwx3bh.js → index-uO0JijnU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-GkUb2zKT.js → infiniteQueryObserver-CvEVG_TM.js} +1 -1
- package/dist/client/assets/{input-DsRHjNfg.js → input-BGQcwAaL.js} +1 -1
- package/dist/client/assets/{integration-icon-BOg4uSLi.js → integration-icon-B-zr5uGs.js} +1 -1
- package/dist/client/assets/{label-WCbT5R_C.js → label-zIig0cjv.js} +1 -1
- package/dist/client/assets/{layout-B9kVRgC4.js → layout-VuI1aPBj.js} +1 -1
- package/dist/client/assets/{login-B2dT1ex9.js → login-DgI1VcxE.js} +1 -1
- package/dist/client/assets/members-BdlFzlWX.js +3 -0
- package/dist/client/assets/{monaco-editor-BleU3J2F.js → monaco-editor-DQviDtyP.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CwPKi62k.js → monitoring-stats-row-Bsjs_3xk.js} +1 -1
- package/dist/client/assets/{oauth-callback-D_06ga7T.js → oauth-callback-CuHVTba4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-kq_yOJkf.js → oauth-callback-ai-provider-B-N2lOyI.js} +1 -1
- package/dist/client/assets/{onboarding-CFkZhYek.js → onboarding-CqGFHsnX.js} +1 -1
- package/dist/client/assets/{org-install-BNh6vn9t.js → org-install-B0qdlOKM.js} +1 -1
- package/dist/client/assets/{org-layout-3aD45RuC.js → org-layout-CMGneEfe.js} +1 -1
- package/dist/client/assets/org-plugin-layout-DGdROiZB.js +1 -0
- package/dist/client/assets/{page-seo-form-CtJ-H1-o.js → page-seo-form-C3bI8Neh.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cs2jXSnd.js +1 -0
- package/dist/client/assets/{pair-DPmFvoFZ.js → pair-NC4sCATE.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-m3Z19NWv.js → plugin-empty-state-FQw8SLzO.js} +1 -1
- package/dist/client/assets/{plugin-header-CeEbbzl3.js → plugin-header-D-cxTW9a.js} +1 -1
- package/dist/client/assets/plugin-layout-DECTyQVg.js +1 -0
- package/dist/client/assets/{popover-00xsE00R.js → popover-B1xAxEac.js} +1 -1
- package/dist/client/assets/{post-editor-DHpEWcQc.js → post-editor-BXy1yxCV.js} +1 -1
- package/dist/client/assets/{primitives-DpFr-gq2.js → primitives-CANqy_LE.js} +1 -1
- package/dist/client/assets/{profile-BJCcQ1KU.js → profile-UNuXVjVg.js} +1 -1
- package/dist/client/assets/project-app-view-7DW_WhHA.js +1 -0
- package/dist/client/assets/record-editor-D9aMJ7nl.js +1 -0
- package/dist/client/assets/registry-Ddq3KnAW.js +2 -0
- package/dist/client/assets/{registry-layout-DfY363OJ.js → registry-layout-DH7-iD95.js} +1 -1
- package/dist/client/assets/{require-capability-USY4c6Pw.js → require-capability-Bi88Fg3q.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BTqABC6o.js → required-auth-layout-3IQyeREK.js} +1 -1
- package/dist/client/assets/{reset-password-DAzKe1m4.js → reset-password-Dstl0VXR.js} +1 -1
- package/dist/client/assets/{resizable-tvU32_PL.js → resizable-Cx-Y9zvP.js} +1 -1
- package/dist/client/assets/roles-BrYnRIt_.js +1 -0
- package/dist/client/assets/{save-status-c_gSkXRz.js → save-status-DSB279Mq.js} +1 -1
- package/dist/client/assets/{schema-form-DC8-fGrX.js → schema-form-f_EsRXt1.js} +1 -1
- package/dist/client/assets/{scroll-area-DjlF9Nhh.js → scroll-area-BYy84ztj.js} +1 -1
- package/dist/client/assets/{search-input-BIE6clnk.js → search-input-C3i2qrnL.js} +1 -1
- package/dist/client/assets/secrets-CAO0zPct.js +1 -0
- package/dist/client/assets/{sections-editor-S-fGjWCd.js → sections-editor-Dq0mEIsn.js} +1 -1
- package/dist/client/assets/{select-DzGY5lz9.js → select-DpYu937I.js} +1 -1
- package/dist/client/assets/{select-model-dzURvkLU.js → select-model-B8gz_8C_.js} +1 -1
- package/dist/client/assets/seo-editor-DCppyDVT.js +1 -0
- package/dist/client/assets/{settings-layout-B12mDVFK.js → settings-layout-BYi6Agz-.js} +1 -1
- package/dist/client/assets/{settings-section-DWjadbjH.js → settings-section-pgSq0Nbi.js} +1 -1
- package/dist/client/assets/{sheet-D-hNRlw_.js → sheet-y2Nja_Ue.js} +1 -1
- package/dist/client/assets/{shell-controls-BGifAFuQ.js → shell-controls-DyDfxDen.js} +1 -1
- package/dist/client/assets/shell-layout-D8qm1N5L.js +1 -0
- package/dist/client/assets/shell-route-loading-DQ0B9hX1.js +1 -0
- package/dist/client/assets/{sidebar-3Sp07kli.js → sidebar-B3S1MC-b.js} +1 -1
- package/dist/client/assets/{skeleton-CQGVA-Lx.js → skeleton-thGJKlMg.js} +1 -1
- package/dist/client/assets/{sortable.esm-DR5iV7W2.js → sortable.esm-DYE94iJD.js} +1 -1
- package/dist/client/assets/{spinner-CCf2Lbex.js → spinner-j70e5pPL.js} +1 -1
- package/dist/client/assets/sso-DUhv1jLf.js +1 -0
- package/dist/client/assets/store-DxrJkSaq.js +1 -0
- package/dist/client/assets/store-registry-B_QywLhG.js +2 -0
- package/dist/client/assets/{switch-DhDeb5VA.js → switch-BZi96ipJ.js} +1 -1
- package/dist/client/assets/{tab-id-BNsa7AXA.js → tab-id-CjkvF5Bz.js} +1 -1
- package/dist/client/assets/{table-BMoC5dcf.js → table-C3TjNbDC.js} +1 -1
- package/dist/client/assets/{tabs-DiVDzsDA.js → tabs-sqzEAKlk.js} +1 -1
- package/dist/client/assets/{task-status-DJjK_vX7.js → task-status-CgfEdw1R.js} +1 -1
- package/dist/client/assets/{textarea-Cq68Cg3C.js → textarea-Bo_ElpPh.js} +1 -1
- package/dist/client/assets/{toggle-group-CVuIqYb9.js → toggle-group-jYWXBndg.js} +1 -1
- package/dist/client/assets/{toolbar-CKVgGEMh.js → toolbar-BIjePcgn.js} +1 -1
- package/dist/client/assets/{tools-list-6s8Pp55V.js → tools-list-9Kj7tcM0.js} +1 -1
- package/dist/client/assets/{tooltip-CLHWv9z-.js → tooltip-CC_mfaKY.js} +1 -1
- package/dist/client/assets/{types-Cxg1qjf9.js → types-btWFnXlQ.js} +1 -1
- package/dist/client/assets/use-ai-providers-D2jZ5H5p.js +1 -0
- package/dist/client/assets/use-automations-B6ZTT5n1.js +1 -0
- package/dist/client/assets/{use-capability-DGItFWVB.js → use-capability-aJI8msnV.js} +1 -1
- package/dist/client/assets/{use-collections-DxWiIX9G.js → use-collections-vRlJo8MD.js} +1 -1
- package/dist/client/assets/use-connection-MP_sOdrQ.js +1 -0
- package/dist/client/assets/{use-copy-N9gIT0E2.js → use-copy-BkzArvj8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DilrGBsI.js → use-create-virtual-mcp-C88u5wPn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B43AQzLm.js → use-debounced-autosave-C2TtzjZB.js} +1 -1
- package/dist/client/assets/use-delete-connection-D8ryW-Gn.js +1 -0
- package/dist/client/assets/use-file-configs-DGSgkVs8.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-DVN8HYM6.js → use-infinite-scroll-BYw2UY-G.js} +1 -1
- package/dist/client/assets/{use-list-state-VA1tpljN.js → use-list-state-CyVLGIWk.js} +1 -1
- package/dist/client/assets/use-mcp-client-Brxiewn2.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-CY9OUQZa.js → use-mcp-prompts-CKvrvNSD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DXY52I1e.js → use-mcp-tools-DFeiBffX.js} +1 -1
- package/dist/client/assets/{use-members-9msf87Qx.js → use-members-D6H6sd8q.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B_6LJV9r.js → use-navigate-to-agent-BRFls8tQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-5h3UhfD-.js → use-org-auth-client-IT7XMFB9.js} +1 -1
- package/dist/client/assets/{use-org-sso-BTJacuR9.js → use-org-sso-BWWAvGBF.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D4RU1UCZ.js → use-organization-roles-S9xtJ6m2.js} +1 -1
- package/dist/client/assets/use-organization-settings-DjvlRnDe.js +1 -0
- package/dist/client/assets/use-registry-connections-BQfixYFV.js +1 -0
- package/dist/client/assets/use-secrets-DEcBibJG.js +1 -0
- package/dist/client/assets/{use-status-sounds-CFOYqswl.js → use-status-sounds-BJZxFfhN.js} +1 -1
- package/dist/client/assets/{use-view-mode-lzqGiNUo.js → use-view-mode-DXlui5dm.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-DDTG_-f6.js +1 -0
- package/dist/client/assets/useInfiniteQuery-BEouccKd.js +1 -0
- package/dist/client/assets/{useRouterState-mAFXQkAT.js → useRouterState-xsU2zFoM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-wDDb-pw7.js +1 -0
- package/dist/client/assets/user-BZco0YX9.js +1 -0
- package/dist/client/assets/{view-mode-toggle-PpUBwSzB.js → view-mode-toggle-BN8FgH0K.js} +1 -1
- package/dist/client/assets/workflow-BxGrEeHN.js +1 -0
- package/dist/client/assets/workflow-detail-QkGhQ2hI.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +489 -488
- package/dist/server/migrate.js +59 -59
- package/dist/server/server.js +311 -310
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-MSG0lE-F.js +0 -1
- package/dist/client/assets/agents-list-BjNtpZI5.js +0 -1
- package/dist/client/assets/ai-providers-DzY2b1ST.js +0 -1
- package/dist/client/assets/app-editor-BOf1C0bR.js +0 -1
- package/dist/client/assets/automation-runs-BPWO4Oxo.js +0 -1
- package/dist/client/assets/automations-BzMfwiu_.js +0 -1
- package/dist/client/assets/brand-context-fK95FTJj.js +0 -1
- package/dist/client/assets/buckets-C3L_6HTA.js +0 -1
- package/dist/client/assets/collection-detail-CindHN_k.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-Cd86_kfs.js +0 -1
- package/dist/client/assets/connection-card-DEJjtCgn.js +0 -1
- package/dist/client/assets/connection-detail-ChUQp5-t.js +0 -1
- package/dist/client/assets/connections-DN6XHtGB.js +0 -1
- package/dist/client/assets/constants-DDZG6Edw.js +0 -10
- package/dist/client/assets/domain-settings-BfbT9yk-.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-DLdasNw1.js +0 -1
- package/dist/client/assets/extract-connection-data-uGXsWpo7.js +0 -1
- package/dist/client/assets/features-Dr9Pp0WS.js +0 -1
- package/dist/client/assets/file-explorer-VM_XUNbz.js +0 -2
- package/dist/client/assets/general-DwCAWtBz.js +0 -1
- package/dist/client/assets/image-field-BaHZoCuZ.js +0 -1
- package/dist/client/assets/index-CEv88FJY.js +0 -1
- package/dist/client/assets/index-CPhDomOg.js +0 -1
- package/dist/client/assets/index-CW47dQON.js +0 -1
- package/dist/client/assets/members-CNZCKoI1.js +0 -3
- package/dist/client/assets/org-plugin-layout-BZ9dFRVl.js +0 -1
- package/dist/client/assets/page-seo-sheet-EUvWIgmh.js +0 -1
- package/dist/client/assets/plugin-layout-Bi-w5408.js +0 -1
- package/dist/client/assets/project-app-view-I1ua83t6.js +0 -1
- package/dist/client/assets/record-editor-B1-ONBrf.js +0 -1
- package/dist/client/assets/registry-CbWwvuqp.js +0 -2
- package/dist/client/assets/roles-B2-ESfgD.js +0 -1
- package/dist/client/assets/secrets-Dx_3aWOf.js +0 -1
- package/dist/client/assets/seo-editor-II_27c8U.js +0 -1
- package/dist/client/assets/shell-layout-DSHLjHdv.js +0 -1
- package/dist/client/assets/shell-route-loading-BMFmixVz.js +0 -1
- package/dist/client/assets/sso-qnvxODbb.js +0 -1
- package/dist/client/assets/store-DDT_HXod.js +0 -1
- package/dist/client/assets/store-registry-IbxDOVas.js +0 -2
- package/dist/client/assets/use-ai-providers-BUmRVTXM.js +0 -1
- package/dist/client/assets/use-automations-BQsS5jcL.js +0 -1
- package/dist/client/assets/use-connection-BKakpvkk.js +0 -1
- package/dist/client/assets/use-delete-connection-Sa9GqDFj.js +0 -1
- package/dist/client/assets/use-file-configs-BSxIo3R0.js +0 -1
- package/dist/client/assets/use-organization-settings-DeuE04BS.js +0 -1
- package/dist/client/assets/use-registry-connections-BFubWEDK.js +0 -1
- package/dist/client/assets/use-secrets-CEE2TPN5.js +0 -1
- package/dist/client/assets/use-virtual-mcp-wf8itLFJ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-FaewV0Uc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DzO-0tti.js +0 -1
- package/dist/client/assets/user-ujRRaChx.js +0 -1
- package/dist/client/assets/workflow-BQljQVTn.js +0 -1
- package/dist/client/assets/workflow-detail-BK_EcA2N.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as C,aJ as Y,ba as q,W as m,aH as O,aI as ke,aK as L,bp as Re,U as $,bq as Ct,q as he,b as kt,o as ae,r as j,j as n,br as _t,bs as Rt,bn as Ie,bt as xe,Y as It,bu as Tt,bv as At,bw as Dt,bg as Te,bh as Ae,bj as Et,a7 as J,bx as X,be as Pt,a8 as W,bf as De,bk as Bt,ag as be,by as Ee,bz as Pe,bA as Ft,e as V,c as ge,B as le,l as ve,f as Mt,E as Ot,x as Vt}from"./index-BfzqpoYd.js";import{E as Be}from"./empty-state-BJuYi96S.js";import{i as $t,u as zt}from"./use-mcp-client-Brxiewn2.js";import{c as Lt}from"./use-mcp-tools-DFeiBffX.js";import{i as Ut}from"./ZoomOut-CCPaeWry.js";import{i as Kt}from"./Key01-CR8zfCdU.js";import{b as Gt,u as qt,a as Wt}from"./use-connection-MP_sOdrQ.js";import{F as Ht,T as Z,g as oe,a as Q,b as ye,c as Yt,d as ee,e as Jt,S as Xt,R as Zt,f as Qt,h as en,i as tn,t as nn,j as Fe,k as sn,l as rn,A as on,s as an,m as ln,n as je,o as Me,p as cn,q as dn,r as re,u as H,v as Oe,w as un,x as mn,y as ue,z as pn,B as fn}from"./index-D4BxVbG6.js";import{B as hn,c as xn}from"./collections-B-UBhIxv.js";import{i as bn,c as gn,b as vn,e as yn}from"./extract-connection-data-DxtHEsy3.js";import{u as jn}from"./use-registry-connections-BQfixYFV.js";import{b as wn}from"./use-organization-settings-DjvlRnDe.js";import{s as Sn}from"./Plus-gXoAw_mX.js";import{e as Ve,d as Nn,S as Cn,a as kn,b as _n,c as Rn}from"./select-DpYu937I.js";import"./index-uO0JijnU.js";import{_ as te}from"./index-CnLAq3ph.js";import{A as $e}from"./agent-icon-Lc1AgwlE.js";import{I as In}from"./input-BGQcwAaL.js";import{a as Tn,b as An,P as Dn}from"./popover-B1xAxEac.js";import{u as En,a as Pn,T as Bn,c as Fn,b as Mn}from"./tooltip-CC_mfaKY.js";import{a as On}from"./use-virtual-mcp-DDTG_-f6.js";import{i as Vn}from"./Check-CSixRgqh.js";import{i as $n}from"./SearchMd-z6b-QOmX.js";import{a as zn}from"./Users03-D5pU3_ql.js";import{u as Ln}from"./use-create-virtual-mcp-C88u5wPn.js";function Un(t){return{isImplementedBy:e=>{for(const s of t){const r=typeof s.name=="string"?new RegExp(`^${s.name}$`):s.name,o=e.find(i=>r.test(i.name));if(!(!o&&s.opt)&&!o)return!1}return!0}}}const Kn=C({id:m(),name:m(),description:m().optional(),inputSchema:Y(m(),q()),outputSchema:Y(m(),q()).optional()}),Gn=hn.extend({_meta:C({"io.decocms":C({id:m(),verified:L(),scopeName:m(),appName:m(),friendlyName:m().nullable().optional(),metadata:Y(m(),q()).nullable().optional(),publishedAt:m().datetime().optional(),updatedAt:m().datetime().optional(),tools:O(Kn).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:C({$schema:m().optional(),_meta:Y(m(),q()).optional(),name:m().describe("The server name (scope/app)"),title:m().optional().describe("User-friendly title"),description:m().optional().describe("Server description"),icons:O(C({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ke(["light","dark"]).optional()})).optional(),remotes:O(C({type:ke(["http","stdio","sse"]),url:m().optional(),headers:O(q()).optional()})).optional(),packages:O(q()).optional(),repository:C({url:m(),source:m().optional(),subfolder:m().optional()}).optional(),version:m().optional(),websiteUrl:m().optional()})});xn("registry_app",Gn,{readOnly:!0});const qn=C({specversion:Re("1.0").describe("CloudEvents specification version"),id:m().describe("Unique identifier for this event (UUID recommended)"),source:m().describe("Connection ID of the event publisher"),type:m().describe("Event type (e.g., 'order.created', 'user.signup')"),time:m().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:m().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:m().optional().default("application/json").describe("Content type of the data attribute"),dataschema:m().url().optional().describe("URI to the schema for the data attribute"),data:q().optional().describe("Event payload (any JSON value)")});C({events:O(qn).min(1).describe("Batch of CloudEvents to process")});const Wn=C({success:L().optional().describe("Whether this event was processed successfully"),error:m().optional().describe("Error message for this event"),retryAfter:$().int().positive().optional().describe("Re-deliver this event after this many ms")});C({success:L().optional().describe("Batch success - applies to events not in results"),error:m().optional().describe("Batch error message - applies to events not in results"),processedCount:$().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:$().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Y(m(),Wn).optional().describe("Per-event results keyed by event ID")});C({type:m().min(1).max(255).describe("Event type identifier"),subject:m().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:q().optional().describe("Event payload"),deliverAt:m().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:m().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});C({id:m().describe("Unique event ID"),type:m().describe("Event type"),source:m().describe("Source connection ID"),time:m().describe("Event timestamp")});C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")});C({subscription:C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")})});const Hn=C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")}),Yn=C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")});C({subscriptions:O(Hn).describe("Desired subscriptions - system will create/update/delete to match")});C({created:$().int().min(0).describe("Number of subscriptions created"),updated:$().int().min(0).describe("Number of subscriptions with filter updated"),deleted:$().int().min(0).describe("Number of subscriptions removed"),unchanged:$().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:O(Yn).describe("Current subscriptions after sync")});C({subscriptionId:m().describe("Subscription ID to remove")});C({success:L().describe("Whether unsubscribe was successful"),subscriptionId:m().describe("Subscription ID that was removed")});C({eventId:m().describe("Event ID to cancel")});C({success:L().describe("Whether cancellation was successful"),eventId:m().describe("Event ID that was cancelled")});C({eventId:m().describe("Event ID to acknowledge")});C({success:L().describe("Whether ACK was successful"),eventId:m().describe("Event ID that was acknowledged")});const Jn=C({type:Re("string"),enum:O(m()).optional(),description:m().optional()}),Xn=C({type:m(),description:m(),paramsSchema:Y(m(),Jn)});C({});C({triggers:O(Xn)});C({type:m(),params:Y(m(),m()),enabled:L(),callbackUrl:Ct().optional(),callbackToken:m().min(1).optional()});C({success:L()});C({prefix:m().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:$().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:m().optional().describe("Token for pagination from previous response"),delimiter:m().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});C({objects:O(C({key:m().describe("Object key/path"),size:$().describe("Object size in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object")})),nextContinuationToken:m().optional().describe("Token for fetching next page of results"),isTruncated:L().describe("Whether there are more results available"),commonPrefixes:O(m()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});C({key:m().describe("Object key/path to get metadata for")});C({contentType:m().optional().describe("MIME type of the object"),contentLength:$().describe("Size of the object in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object"),metadata:Y(m(),m()).optional().describe("Custom metadata key-value pairs")});C({key:m().describe("Object key/path to generate URL for"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});C({url:m().describe("Presigned URL for downloading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path for the upload"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:m().optional().describe("MIME type for the object being uploaded")});C({url:m().describe("Presigned URL for uploading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path to delete")});C({success:L().describe("Whether the deletion was successful"),key:m().describe("The key that was deleted")});C({keys:O(m()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});C({deleted:O(m()).describe("Array of successfully deleted keys"),errors:O(C({key:m(),message:m()})).describe("Array of errors for failed deletions")});const Zn=C({primary:m().optional().describe("Primary brand color (hex)"),secondary:m().optional().describe("Secondary brand color (hex)"),accent:m().optional().describe("Accent / highlight color (hex)"),background:m().optional().describe("Background color (hex)"),foreground:m().optional().describe("Foreground / text color (hex)")}),Qn=C({heading:m().optional().describe("Font family for headings"),body:m().optional().describe("Font family for body text"),code:m().optional().describe("Font family for code / monospace")}),es=C({logo:m().optional().describe("Logo URL"),favicon:m().optional().describe("Favicon URL"),ogImage:m().optional().describe("Open Graph image URL")}),ts=C({id:m(),name:m().describe("Brand / company name"),domain:m().optional().describe("Company domain (e.g. example.com)"),colors:Zn.optional().describe("Semantic color palette"),fonts:Qn.optional().describe("Font families by role"),assets:es.optional().describe("Visual identity assets"),overview:m().optional().describe("Company overview / description"),tagline:m().optional().describe("Brand tagline"),tone:m().optional().describe("Tone of voice description"),metadata:Y(m(),q()).optional().describe("Extra design tokens and metadata")});C({id:m().optional().describe("Brand ID. Omit to get the default brand.")});C({});C({items:O(ts)});const ns={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function ss(t){if(t)return ns[t]}function Xo(t,e){const s=t.tools;if(!s||s.length===0)return!1;const r=s.map(a=>({name:a.name,inputSchema:a.inputSchema})),o=e.map(a=>({name:a.name,inputSchema:a.inputSchema,opt:a.opt}));return Un(o).isImplementedBy(r)}function rs(t){return t.startsWith("@")?t:`@${t}`}function os(){const{org:t}=he(),{data:e}=kt.useSession(),s=Gt(),r=jn(),o=wn(),i=r.filter(c=>o(c.id));return{installByBinding:async c=>{if(!t||!e?.user?.id){ae.error("Not authenticated");return}const u=rs(c),p=(await Promise.all(i.map(async g=>{const v=bn(g.id,t.id);try{const y=await gn(g.id,t.id,t.slug,v,{where:{appName:u}});return vn(y??[])[0]??null}catch{return null}}))).find(g=>g!==null);if(!p){ae.error(`MCP Server not found in registry: ${c}`);return}const l=yn(p,t.id,e.user.id),d=l.connection_type==="STDIO",b=!!l.connection_url,h=d&&l.connection_headers&&typeof l.connection_headers=="object"&&"command"in l.connection_headers;if(!b&&!h){ae.error("This MCP Server cannot be connected: no connection method available");return}return await s.create.mutateAsync(l),{id:l.id,connection:l}},isInstalling:s.create.isPending}}function is(t){return j.forwardRef(({fields:e,widgets:s,templates:r,...o},i)=>(e={...t?.fields,...e},s={...t?.widgets,...s},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},n.jsx(Ht,{...t,...o,fields:e,widgets:s,templates:r,ref:i})))}const as=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ls=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,r)=>r?r.toUpperCase():s.toLowerCase()),_e=t=>{const e=ls(t);return e.charAt(0).toUpperCase()+e.slice(1)},ze=(...t)=>t.filter((e,s,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===s).join(" ").trim(),cs=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var ds={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const us=j.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>j.createElement("svg",{ref:u,...ds,width:e,height:e,stroke:t,strokeWidth:r?Number(s)*24/Number(e):s,className:ze("lucide",o),...!i&&!cs(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,p])=>j.createElement(f,p)),...Array.isArray(i)?i:[i]]));const K=(t,e)=>{const s=j.forwardRef(({className:r,...o},i)=>j.createElement(us,{ref:i,iconNode:e,className:ze(`lucide-${as(_e(t))}`,`lucide-${t}`,r),...o}));return s.displayName=_e(t),s};const ms=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ps=K("check",ms);const fs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Le=K("chevron-down",fs);const hs=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xs=K("chevron-up",hs);const bs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],gs=K("circle-alert",bs);const vs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Ue=K("circle-plus",vs);const ys=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],js=K("circle",ys);const ws=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ss=K("copy",ws);const Ns=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cs=K("search",Ns);const ks=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_s=K("trash-2",ks);const Rs=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ke=K("x",Rs);function I(...t){return _t(Rt(t))}const Is=xe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function we({className:t,variant:e,size:s,asChild:r=!1,...o}){const i=r?Ie:"button";return n.jsx(i,{"data-slot":"button",className:I(Is({variant:e,size:s,className:t})),...o})}function Ts({uiSchema:t,registry:e,className:s,...r}){const{translateString:o}=e;return n.jsx("div",{className:"p-0 m-0",children:n.jsxs(we,{...r,className:I("w-fit gap-2",s),variant:"outline",type:"button",children:[n.jsx(Ue,{size:16})," ",o(Z.AddItemButton)]})})}function As(t){const{children:e,buttonsProps:s,displayLabel:r,hasDescription:o,hasToolbar:i,uiSchema:a,registry:c}=t,u=oe(a),f=Q("ArrayFieldItemButtonsTemplate",c,u),p=o?-6:22;return n.jsx("div",{children:n.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[n.jsx("div",{className:"grow shrink",children:e}),n.jsx("div",{className:"flex items-end justify-end p-0.5",children:i&&n.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${p}px`:void 0},children:n.jsx(f,{...s})})})]})})}function Ds(t){const{canAdd:e,disabled:s,fieldPathId:r,uiSchema:o,items:i,optionalDataControl:a,onAddClick:c,readonly:u,registry:f,required:p,schema:l,title:d}=t,b=oe(o),h=Q("ArrayFieldDescriptionTemplate",f,b),g=Q("ArrayFieldTitleTemplate",f,b),v=!u&&!s,{ButtonTemplates:{AddButton:y}}=f.templates;return n.jsx("div",{children:n.jsx("div",{className:"m-0 flex p-0",children:n.jsxs("div",{className:"m-0 w-full p-0",children:[n.jsx(g,{fieldPathId:r,title:b.title||d,schema:l,uiSchema:o,required:p,registry:f,optionalDataControl:v?a:void 0}),n.jsx(h,{fieldPathId:r,description:b.description||l.description,schema:l,uiSchema:o,registry:f}),n.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[v?void 0:a,i,e&&n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:s||u,uiSchema:o,registry:f})})]},`array-item-list-${r.$id}`)]})})})}function Ge({className:t,type:e,...s}){return n.jsx("input",{type:e,"data-slot":"input",className:I("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...s})}function Es({id:t,htmlName:e,placeholder:s,required:r,readonly:o,disabled:i,type:a,value:c,onChange:u,onChangeOverride:f,onBlur:p,onFocus:l,autofocus:d,options:b,schema:h,rawErrors:g=[],children:v,extraProps:y,className:x,registry:w}){const{ClearButton:N}=w.templates.ButtonTemplates,R={...y,...Yt(h,a,b)},k=({target:{value:E}})=>u(E===""?b.emptyValue:E),S=({target:E})=>p(t,E&&E.value),_=({target:E})=>l(t,E&&E.value),A=j.useCallback(E=>{var T;E.preventDefault(),E.stopPropagation(),u((T=b.emptyValue)!==null&&T!==void 0?T:"")},[u,b.emptyValue]);return n.jsxs("div",{className:"p-0.5",children:[n.jsx(Ge,{id:t,name:e||t,type:a,placeholder:s,autoFocus:d,required:r,disabled:i,readOnly:o,className:I({"border-destructive focus-visible:ring-0":g.length>0},x),list:h.examples?Jt(t):void 0,...R,value:c||c===0?c:"",onChange:f||k,onBlur:S,onFocus:_,"aria-describedby":ee(t,!!h.examples)}),b.allowClearTextInputs&&!o&&!i&&c&&n.jsx(N,{onClick:A,registry:w}),v,n.jsx(Xt,{id:t,schema:h})]})}function Ps({id:t,description:e,registry:s,uiSchema:r}){return e?n.jsx("div",{children:n.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:n.jsx(Zt,{description:e,registry:s,uiSchema:r})})}):null}const Bs=xe("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Fs({className:t,variant:e,...s}){return n.jsx("div",{"data-slot":"alert",role:"alert",className:I(Bs({variant:e}),t),...s})}function Ms({className:t,...e}){return n.jsx("div",{"data-slot":"alert-title",className:I("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Os({className:t,...e}){return n.jsx("div",{"data-slot":"alert-description",className:I("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function Vs({errors:t,registry:e}){const{translateString:s}=e;return n.jsxs(Fs,{variant:"destructive",className:"mb-2",children:[n.jsx(gs,{className:"h-4 w-4"}),n.jsx(Ms,{children:s(Z.ErrorsLabel)}),n.jsx(Os,{className:"flex flex-col gap-1",children:t.map((r,o)=>n.jsxs("span",{children:["• ",r.stack]},o))})]})}function $s(t){const{errors:e=[],fieldPathId:s}=t;if(e.length===0)return null;const r=Qt(s);return n.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((o,i)=>n.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:o},i))})}function zs(t){const{fieldPathId:e,help:s,uiSchema:r,registry:o,hasErrors:i}=t;return s?n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{"text-destructive":i}),id:tn(e),children:n.jsx(en,{help:s,registry:o,uiSchema:r})}):null}function Ls({id:t,children:e,displayLabel:s,rawErrors:r=[],errors:o,help:i,description:a,rawDescription:c,classNames:u,style:f,disabled:p,label:l,hidden:d,onKeyRename:b,onKeyRenameBlur:h,onRemoveProperty:g,readonly:v,required:y,schema:x,uiSchema:w,registry:N}){const R=oe(w),k=Q("WrapIfAdditionalTemplate",N,R);if(d)return n.jsx("div",{className:"hidden",children:e});const S=R.widget==="checkbox";return n.jsx(k,{classNames:u,style:f,disabled:p,id:t,label:l,displayLabel:s,onKeyRename:b,onKeyRenameBlur:h,onRemoveProperty:g,rawDescription:c,readonly:v,required:y,schema:x,uiSchema:w,registry:N,children:n.jsxs("div",{className:"flex flex-col gap-2",children:[s&&!S&&n.jsxs("label",{className:I("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[l,y?"*":null]}),e,s&&c&&!S&&n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:a}),o,i]})})}function Us(t){const{children:e,column:s,className:r,...o}=t;return n.jsx("div",{className:I("grid gap-2",r),...o,children:e})}function ne(t){const{icon:e,iconType:s,className:r,uiSchema:o,registry:i,...a}=t;return n.jsx(we,{size:"icon",variant:"outline",className:r,...a,type:"button",children:e})}function Ks(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.CopyButton),...t,icon:n.jsx(Ss,{className:"h-4 w-4"})})}function Gs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveDownButton),...t,icon:n.jsx(Le,{className:"h-4 w-4"})})}function qs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveUpButton),...t,icon:n.jsx(xs,{className:"h-4 w-4"})})}function qe(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.RemoveButton),...t,className:"border-destructive",icon:n.jsx(_s,{className:"h-4 w-4 stroke-destructive"})})}function Ws(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.ClearButton),...t,icon:n.jsx(Ke,{})})}function Hs({selector:t,optionSchemaField:e}){return n.jsxs("div",{className:I("p-4 border rounded-md bg-background shadow-sm"),children:[n.jsx("div",{className:I("mb-4"),children:t}),e]})}function Ys({description:t,title:e,properties:s,required:r,uiSchema:o,fieldPathId:i,schema:a,formData:c,optionalDataControl:u,onAddProperty:f,disabled:p,readonly:l,registry:d}){const b=oe(o),h=Q("TitleFieldTemplate",d,b),g=Q("DescriptionFieldTemplate",d,b),v=!l&&!p,{ButtonTemplates:{AddButton:y}}=d.templates;return n.jsxs(n.Fragment,{children:[e&&n.jsx(h,{id:nn(i),title:e,required:r,schema:a,uiSchema:o,registry:d,optionalDataControl:v?u:void 0}),t&&n.jsx(g,{id:Fe(i),description:t,schema:a,uiSchema:o,registry:d}),n.jsxs("div",{className:"flex flex-col gap-2",children:[v?void 0:u,s.map((x,w)=>n.jsx("div",{className:`${x.hidden?"hidden":""} flex`,children:n.jsx("div",{className:"w-full",children:x.content})},w)),sn(a,o,c)?n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(i,"add"),onClick:f,disabled:p||l,className:"rjsf-object-property-expand",uiSchema:o,registry:d})}):null]})]})}function Js(t){const{id:e,registry:s,label:r,onAddClick:o,onRemoveClick:i}=t;return o?n.jsx(ne,{id:e,registry:s,className:"rjsf-add-optional-data",onClick:o,title:r,icon:n.jsx(Ue,{}),size:"xs"}):i?n.jsx(qe,{id:e,registry:s,className:"rjsf-remove-optional-data",onClick:i,title:r,size:"xs"}):n.jsx("em",{id:e,children:r})}function Xs(t){const{submitText:e,norender:s,props:r}=rn(t.uiSchema);return s?null:n.jsx("div",{children:n.jsx(we,{type:"submit",...r,className:I("my-2",r?.className),children:e})})}function We({className:t,orientation:e="horizontal",decorative:s=!0,...r}){return n.jsx(It,{"data-slot":"separator",decorative:s,orientation:e,className:I("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Zs({id:t,title:e,uiSchema:s,optionalDataControl:r}){const o=oe(s);let i=n.jsx("h5",{children:o.title||e});return r&&(i=n.jsxs("div",{className:"flex flex-row",children:[n.jsx("div",{className:"flex-grow",children:i}),n.jsx("div",{className:"flex",children:r})]})),n.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[i,n.jsx(We,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Qs({classNames:t,style:e,children:s,disabled:r,id:o,label:i,displayLabel:a,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:f,readonly:p,required:l,schema:d,uiSchema:b,registry:h}){const{templates:g,translateString:v}=h,{RemoveButton:y}=g.ButtonTemplates,x=v(Z.KeyLabel,[i]);if(!(on in d))return n.jsx("div",{className:t,style:e,children:s});const R=a?22+(f?-28:0):0,k=`${o}-key`;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[n.jsx("div",{className:"grid gap-2 col-span-5",children:n.jsxs("div",{className:"flex flex-col gap-2",children:[a&&n.jsx("label",{htmlFor:k,className:"text-sm font-medium text-muted-foreground leading-none",children:x}),n.jsx("div",{className:"pl-0.5",children:n.jsx(Ge,{required:l,defaultValue:i,disabled:r||p,id:k,name:k,onBlur:p?void 0:u,type:"text",className:"w-full border shadow-sm"},i)}),!!f&&n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),n.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:s}),n.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${R}px`},children:n.jsx(y,{id:ye(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||p,onClick:c,uiSchema:b,registry:h})})]}),n.jsx(We,{dir:"horizontal",className:"mt-2"})]})}function er(){return{ArrayFieldItemTemplate:As,ArrayFieldTemplate:Ds,BaseInputTemplate:Es,ButtonTemplates:{AddButton:Ts,CopyButton:Ks,MoveDownButton:Gs,MoveUpButton:qs,RemoveButton:qe,SubmitButton:Xs,ClearButton:Ws},DescriptionFieldTemplate:Ps,ErrorListTemplate:Vs,FieldErrorTemplate:$s,FieldHelpTemplate:zs,FieldTemplate:Ls,GridTemplate:Us,MultiSchemaFieldTemplate:Hs,ObjectFieldTemplate:Ys,OptionalDataControlsTemplate:Js,TitleFieldTemplate:Zs,WrapIfAdditionalTemplate:Qs}}function tr(t,e){if(t==null)return{};var s={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(s[o]=t[o]);return s}var nr=["color"],sr=j.forwardRef(function(t,e){var s=t.color,r=s===void 0?"currentColor":s,o=tr(t,nr);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function He({className:t,...e}){return n.jsx(Tt,{"data-slot":"checkbox",className:I("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:n.jsx(At,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:n.jsx(sr,{className:"size-3.5"})})})}function Se({className:t,...e}){return n.jsx(Dt,{"data-slot":"label",className:I("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function rr(t){const{id:e,htmlName:s,value:r,disabled:o,readonly:i,label:a,hideLabel:c,schema:u,autofocus:f,options:p,onChange:l,onBlur:d,onFocus:b,registry:h,uiSchema:g,className:v}=t,y=an(u),x=Q("DescriptionFieldTemplate",h,p),w=S=>l(S),N=()=>d(e,r),R=()=>b(e,r),k=p.description||u.description;return n.jsxs("div",{className:`relative ${o||i?"cursor-not-allowed opacity-50":""}`,"aria-describedby":ee(e),children:[!c&&k&&n.jsx(x,{id:Fe(e),description:k,schema:u,uiSchema:g,registry:h}),n.jsxs("div",{className:"flex items-center gap-2 my-2",children:[n.jsx(He,{id:e,name:s||e,checked:typeof r>"u"?!1:!!r,required:y,disabled:o||i,autoFocus:f,onCheckedChange:w,onBlur:N,onFocus:R,className:v}),n.jsx(Se,{className:"leading-tight",htmlFor:e,children:ln(a,c||!a)})]})]})}function or({id:t,htmlName:e,disabled:s,options:r,value:o,autofocus:i,readonly:a,required:c,onChange:u,onBlur:f,onFocus:p,className:l}){const{enumOptions:d,enumDisabled:b,inline:h,emptyValue:g}=r,v=je(r),y=Array.isArray(o)?o:[o],x=({target:N})=>f(t,H(N&&N.value,d,v,g)),w=({target:N})=>p(t,H(N&&N.value,d,v,g));return n.jsx("div",{className:I({"flex flex-col gap-2":!h,"flex flex-row gap-4 flex-wrap":h}),children:Array.isArray(d)&&d.map((N,R)=>{const k=Me(N.value,y),S=Array.isArray(b)&&b.indexOf(N.value)!==-1,_=re(t,R);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(He,{id:_,name:e||t,required:c,disabled:s||S||a,onCheckedChange:A=>{u(A?cn(R,y,d):dn(R,y,d))},className:l,checked:k,autoFocus:i&&R===0,onBlur:x,onFocus:w,"aria-describedby":ee(t)}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,R),children:N.label})]},_)})})}var Ne="Radio",[ir,Ye]=be(Ne),[ar,lr]=ir(Ne),Je=j.forwardRef((t,e)=>{const{__scopeRadio:s,name:r,checked:o=!1,required:i,disabled:a,value:c="on",onCheck:u,form:f,...p}=t,[l,d]=j.useState(null),b=X(e,v=>d(v)),h=j.useRef(!1),g=l?f||!!l.closest("form"):!0;return n.jsxs(ar,{scope:s,checked:o,disabled:a,children:[n.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":et(o),"data-disabled":a?"":void 0,disabled:a,value:c,...p,ref:b,onClick:W(t.onClick,v=>{o||u?.(),g&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),g&&n.jsx(Qe,{control:l,bubbles:!h.current,name:r,value:c,checked:o,required:i,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});Je.displayName=Ne;var Xe="RadioIndicator",Ze=j.forwardRef((t,e)=>{const{__scopeRadio:s,forceMount:r,...o}=t,i=lr(Xe,s);return n.jsx(Bt,{present:r||i.checked,children:n.jsx(J.span,{"data-state":et(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:e})})});Ze.displayName=Xe;var cr="RadioBubbleInput",Qe=j.forwardRef(({__scopeRadio:t,control:e,checked:s,bubbles:r=!0,...o},i)=>{const a=j.useRef(null),c=X(a,i),u=Ee(s),f=Pe(e);return j.useEffect(()=>{const p=a.current;if(!p)return;const l=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(l,"checked").set;if(u!==s&&b){const h=new Event("click",{bubbles:r});b.call(p,s),p.dispatchEvent(h)}},[u,s,r]),n.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:s,...o,tabIndex:-1,ref:c,style:{...o.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qe.displayName=cr;function et(t){return t?"checked":"unchecked"}var dr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ce="RadioGroup",[ur]=be(ce,[De,Ye]),tt=De(),nt=Ye(),[mr,pr]=ur(ce),st=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,name:r,defaultValue:o,value:i,required:a=!1,disabled:c=!1,orientation:u,dir:f,loop:p=!0,onValueChange:l,...d}=t,b=tt(s),h=Te(f),[g,v]=Ae({prop:i,defaultProp:o??null,onChange:l,caller:ce});return n.jsx(mr,{scope:s,name:r,required:a,disabled:c,value:g,onValueChange:v,children:n.jsx(Et,{asChild:!0,...b,orientation:u,dir:h,loop:p,children:n.jsx(J.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":c?"":void 0,dir:h,...d,ref:e})})})});st.displayName=ce;var rt="RadioGroupItem",ot=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,disabled:r,...o}=t,i=pr(rt,s),a=i.disabled||r,c=tt(s),u=nt(s),f=j.useRef(null),p=X(e,f),l=i.value===o.value,d=j.useRef(!1);return j.useEffect(()=>{const b=g=>{dr.includes(g.key)&&(d.current=!0)},h=()=>d.current=!1;return document.addEventListener("keydown",b),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",b),document.removeEventListener("keyup",h)}},[]),n.jsx(Pt,{asChild:!0,...c,focusable:!a,active:l,children:n.jsx(Je,{disabled:a,required:i.required,checked:l,...u,...o,name:i.name,ref:p,onCheck:()=>i.onValueChange(o.value),onKeyDown:W(b=>{b.key==="Enter"&&b.preventDefault()}),onFocus:W(o.onFocus,()=>{d.current&&f.current?.click()})})})});ot.displayName=rt;var fr="RadioGroupIndicator",it=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,...r}=t,o=nt(s);return n.jsx(Ze,{...o,...r,ref:e})});it.displayName=fr;var hr=st,xr=ot,br=it;function gr({className:t,...e}){return n.jsx(hr,{"data-slot":"radio-group",className:I("grid gap-3",t),...e})}function vr({className:t,...e}){return n.jsx(xr,{"data-slot":"radio-group-item",className:I("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:n.jsx(br,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:n.jsx(js,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function yr({id:t,options:e,value:s,required:r,disabled:o,readonly:i,onChange:a,onBlur:c,onFocus:u,className:f}){const{enumOptions:p,enumDisabled:l,emptyValue:d}=e,b=je(e),h=x=>a(H(x,p,b,d)),g=({target:x})=>c(t,H(x&&x.value,p,b,d)),v=({target:x})=>u(t,H(x&&x.value,p,b,d)),y=!!(e&&e.inline);return n.jsx("div",{className:"mb-0",children:n.jsx(gr,{defaultValue:s?.toString(),required:r,disabled:o||i,onValueChange:x=>{h(x)},onBlur:g,onFocus:v,"aria-describedby":ee(t),orientation:y?"horizontal":"vertical",className:I("flex flex-wrap",{"flex-col":!y},f),children:Array.isArray(p)&&p.map((x,w)=>{const N=Array.isArray(l)&&l.indexOf(x.value)!==-1,R=Me(x.value,s);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vr,{checked:R,value:Oe(x.value,w,b),id:re(t,w),disabled:N}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,w),children:x.label})]},re(t,w))})})})}var at=["PageUp","PageDown"],lt=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ct={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},se="Slider",[me,jr,wr]=Ft(se),[dt]=be(se,[wr]),[Sr,de]=dt(se),ut=j.forwardRef((t,e)=>{const{name:s,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:p,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:b=!1,form:h,...g}=t,v=j.useRef(new Set),y=j.useRef(0),w=a==="horizontal"?Nr:Cr,[N=[],R]=Ae({prop:p,defaultProp:f,onChange:T=>{[...v.current][y.current]?.focus(),l(T)}}),k=j.useRef(N);function S(T){const D=Tr(N,T);E(T,D)}function _(T){E(T,y.current)}function A(){const T=k.current[y.current];N[y.current]!==T&&d(N)}function E(T,D,{commit:P}={commit:!1}){const F=Pr(i),M=Br(Math.round((T-r)/i)*i+r,F),B=Ve(M,[r,o]);R((z=[])=>{const U=Rr(z,B,D);if(Er(U,u*i)){y.current=U.indexOf(B);const G=String(U)!==String(z);return G&&P&&d(U),G?U:z}else return z})}return n.jsx(Sr,{scope:t.__scopeSlider,name:s,disabled:c,min:r,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:N,orientation:a,form:h,children:n.jsx(me.Provider,{scope:t.__scopeSlider,children:n.jsx(me.Slot,{scope:t.__scopeSlider,children:n.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...g,ref:e,onPointerDown:W(g.onPointerDown,()=>{c||(k.current=N)}),min:r,max:o,inverted:b,onSlideStart:c?void 0:S,onSlideMove:c?void 0:_,onSlideEnd:c?void 0:A,onHomeKeyDown:()=>!c&&E(r,0,{commit:!0}),onEndKeyDown:()=>!c&&E(o,N.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:D})=>{if(!c){const M=at.includes(T.key)||T.shiftKey&<.includes(T.key)?10:1,B=y.current,z=N[B],U=i*M*D;E(z+U,B,{commit:!0})}}})})})})});ut.displayName=se;var[mt,pt]=dt(se,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nr=j.forwardRef((t,e)=>{const{min:s,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:c,onSlideEnd:u,onStepKeyDown:f,...p}=t,[l,d]=j.useState(null),b=X(e,w=>d(w)),h=j.useRef(void 0),g=Te(o),v=g==="ltr",y=v&&!i||!v&&i;function x(w){const N=h.current||l.getBoundingClientRect(),R=[0,N.width],S=Ce(R,y?[s,r]:[r,s]);return h.current=N,S(w-N.left)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:n.jsx(ft,{dir:g,"data-orientation":"horizontal",...p,ref:b,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const N=x(w.clientX);a?.(N)},onSlideMove:w=>{const N=x(w.clientX);c?.(N)},onSlideEnd:()=>{h.current=void 0,u?.()},onStepKeyDown:w=>{const R=ct[y?"from-left":"from-right"].includes(w.key);f?.({event:w,direction:R?-1:1})}})})}),Cr=j.forwardRef((t,e)=>{const{min:s,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=t,p=j.useRef(null),l=X(e,p),d=j.useRef(void 0),b=!o;function h(g){const v=d.current||p.current.getBoundingClientRect(),y=[0,v.height],w=Ce(y,b?[r,s]:[s,r]);return d.current=v,w(g-v.top)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1,children:n.jsx(ft,{"data-orientation":"vertical",...f,ref:l,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const v=h(g.clientY);i?.(v)},onSlideMove:g=>{const v=h(g.clientY);a?.(v)},onSlideEnd:()=>{d.current=void 0,c?.()},onStepKeyDown:g=>{const y=ct[b?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:y?-1:1})}})})}),ft=j.forwardRef((t,e)=>{const{__scopeSlider:s,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:c,onStepKeyDown:u,...f}=t,p=de(se,s);return n.jsx(J.span,{...f,ref:e,onKeyDown:W(t.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(c(l),l.preventDefault()):at.concat(lt).includes(l.key)&&(u(l),l.preventDefault())}),onPointerDown:W(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),p.thumbs.has(d)?d.focus():r(l)}),onPointerMove:W(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&o(l)}),onPointerUp:W(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),ht="SliderTrack",xt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(ht,s);return n.jsx(J.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:e})});xt.displayName=ht;var pe="SliderRange",bt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(pe,s),i=pt(pe,s),a=j.useRef(null),c=X(e,a),u=o.values.length,f=o.values.map(d=>yt(d,o.min,o.max)),p=u>1?Math.min(...f):0,l=100-Math.max(...f);return n.jsx(J.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...t.style,[i.startEdge]:p+"%",[i.endEdge]:l+"%"}})});bt.displayName=pe;var fe="SliderThumb",gt=j.forwardRef((t,e)=>{const s=jr(t.__scopeSlider),[r,o]=j.useState(null),i=X(e,c=>o(c)),a=j.useMemo(()=>r?s().findIndex(c=>c.ref.current===r):-1,[s,r]);return n.jsx(kr,{...t,ref:i,index:a})}),kr=j.forwardRef((t,e)=>{const{__scopeSlider:s,index:r,name:o,...i}=t,a=de(fe,s),c=pt(fe,s),[u,f]=j.useState(null),p=X(e,x=>f(x)),l=u?a.form||!!u.closest("form"):!0,d=Pe(u),b=a.values[r],h=b===void 0?0:yt(b,a.min,a.max),g=Ir(r,a.values.length),v=d?.[c.size],y=v?Ar(v,h,c.direction):0;return j.useEffect(()=>{if(u)return a.thumbs.add(u),()=>{a.thumbs.delete(u)}},[u,a.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${y}px)`},children:[n.jsx(me.ItemSlot,{scope:t.__scopeSlider,children:n.jsx(J.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":a.min,"aria-valuenow":b,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:p,style:b===void 0?{display:"none"}:t.style,onFocus:W(t.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&n.jsx(vt,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:b},r)]})});gt.displayName=fe;var _r="RadioBubbleInput",vt=j.forwardRef(({__scopeSlider:t,value:e,...s},r)=>{const o=j.useRef(null),i=X(o,r),a=Ee(e);return j.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==e&&p){const l=new Event("input",{bubbles:!0});p.call(c,e),c.dispatchEvent(l)}},[a,e]),n.jsx(J.input,{style:{display:"none"},...s,ref:i,defaultValue:e})});vt.displayName=_r;function Rr(t=[],e,s){const r=[...t];return r[s]=e,r.sort((o,i)=>o-i)}function yt(t,e,s){const i=100/(s-e)*(t-e);return Ve(i,[0,100])}function Ir(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function Tr(t,e){if(t.length===1)return 0;const s=t.map(o=>Math.abs(o-e)),r=Math.min(...s);return s.indexOf(r)}function Ar(t,e,s){const r=t/2,i=Ce([0,50],[0,r]);return(r-i(e)*s)*s}function Dr(t){return t.slice(0,-1).map((e,s)=>t[s+1]-e)}function Er(t,e){if(e>0){const s=Dr(t);return Math.min(...s)>=e}return!0}function Ce(t,e){return s=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(s-t[0])}}function Pr(t){return(String(t).split(".")[1]||"").length}function Br(t,e){const s=Math.pow(10,e);return Math.round(t*s)/s}var Fr=ut,Mr=xt,Or=bt,Vr=gt;function $r({className:t,defaultValue:e,value:s,min:r=0,max:o=100,...i}){const a=j.useMemo(()=>Array.isArray(s)?s:Array.isArray(e)?e:[r,o],[s,e,r,o]);return n.jsxs(Fr,{"data-slot":"slider",defaultValue:e,value:s,min:r,max:o,className:I("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...i,children:[n.jsx(Mr,{"data-slot":"slider-track",className:I("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:n.jsx(Or,{"data-slot":"slider-range",className:I("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(c,u)=>n.jsx(Vr,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},u))]})}const zr=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Lr({value:t,readonly:e,disabled:s,options:r,schema:o,onChange:i,label:a,id:c}){const u=l=>i(l[0]),f={...un(o)},p={id:c,...mn(r.props||{},zr)};return n.jsxs(n.Fragment,{children:[n.jsx($r,{disabled:s||e,min:f.min,max:f.max,step:f.step,value:[t],onValueChange:u,...p,"aria-describedby":ee(c)}),t]})}const Ur=xe("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Kr({className:t,variant:e,asChild:s=!1,...r}){const o=s?Ie:"span";return n.jsx(o,{"data-slot":"badge",className:I(Ur({variant:e}),t),...r})}const jt=j.forwardRef(({className:t,...e},s)=>n.jsx(te,{ref:s,"data-slot":"command",className:I("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Gr=j.forwardRef(({className:t,...e},s)=>n.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsx(Cs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsx(te.Input,{ref:s,className:I("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Gr.displayName=te.Input.displayName;function wt({className:t,...e}){return n.jsx(te.List,{"data-slot":"command-list",className:I("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function St({className:t,...e}){return n.jsx(te.Group,{"data-slot":"command-group",className:I("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Nt({className:t,...e}){return n.jsx(te.Item,{"data-slot":"command-item",className:I("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_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=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function qr({multiple:t,items:e=[],selected:s,onValueChange:r,autoFocus:o=!1,disabled:i=!1,ariaDescribedby:a,ariaPlaceholder:c,onFocus:u,onBlur:f,className:p,id:l}){const d=j.useRef(null),[b,h]=j.useState(!1),[g,v]=j.useState(""),y=j.useMemo(()=>e.filter(S=>s.some(_=>ue(S.value,_))),[e,s]),x=j.useMemo(()=>e.filter(S=>!y.some(_=>ue(_.value,S.value))),[e,y]),w=j.useCallback(S=>{if(i)return;const _=y.filter(A=>!ue(A.value,S.value));r?.(_.map(A=>A.index))},[y,r,i]),N=j.useCallback(S=>{if(!(i||!d.current||d.current.value!==""))if(S.key==="Delete"||S.key==="Backspace"){const _=y.slice(0,-1);r?.(_.map(A=>A.index))}else S.key==="Escape"&&d.current.blur()},[y,r,i]),R=j.useCallback(S=>{if(i)return;v("");const _=t?[...y,S]:[S];r?.(_.map(A=>A.index))},[t,y,r,i]),k=j.useCallback(S=>{i||h(!0),u?.(S)},[i,u]);return n.jsxs(jt,{onKeyDown:N,className:I("overflow-visible bg-transparent",p),autoFocus:o,"aria-disabled":i,onBlur:f,onFocus:k,"aria-describedby":a,"aria-placeholder":c,children:[n.jsx("div",{className:I("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",i&&"opacity-50 cursor-not-allowed"),children:n.jsxs("div",{className:"flex gap-1 flex-wrap",children:[y.map(S=>n.jsxs(Kr,{variant:"secondary",children:[S.label,n.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:_=>_.key==="Enter"&&!i&&w(S),onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},onClick:()=>w(S),disabled:i,children:n.jsx(Ke,{className:I("h-3 w-3 text-muted-foreground hover:text-foreground",i&&"pointer-events-none")})})]},S.value)),n.jsx(te.Input,{ref:d,value:g,onValueChange:v,onBlur:()=>h(!1),onFocus:()=>!i&&h(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:i,"aria-controls":`command-item-input-${l}`,"aria-labelledby":`command-item-input-${l}`,id:`command-item-input-${l}`})]})}),b&&!i&&x.length>0&&n.jsx("div",{className:"relative mt-2",children:n.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:x.map(S=>n.jsx(Nt,{disabled:S.disabled,onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},"aria-controls":`${S.value}-command-item`,"aria-labelledby":`${S.value}-command-item`,id:`${S.value}-command-item`,onSelect:()=>R(S),className:"cursor-pointer",children:S.label},`${S.value}-command-item`))})})})})]})}function Wr({items:t,selected:e,onValueChange:s,autoFocus:r=!1,disabled:o=!1,required:i=!1,placeholder:a="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:f,onBlur:p,className:l}){const[d,b]=j.useState(!1),h=t?.find(x=>x.value===e),g=j.useRef(null),v=j.useRef(null);j.useEffect(()=>{d&&g.current&&requestAnimationFrame(()=>{var x;(x=g.current)===null||x===void 0||x.scrollIntoView({block:"nearest"})})},[d]);const y=x=>{v.current&&!v.current.contains(x.relatedTarget)&&b(!1),p?.(x)};return n.jsxs(jt,{ref:v,className:I("overflow-visible bg-transparent",l),autoFocus:r,"aria-disabled":o,onBlur:y,onFocus:f,"aria-describedby":c,"aria-placeholder":u,children:[n.jsxs("div",{onClick:()=>!o&&b(!d),className:I("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!h&&i&&"border-red-500",o&&"opacity-50 cursor-not-allowed",l),children:[n.jsx("span",{className:I("flex-1 line-clamp-1",!h&&"text-muted-foreground"),children:h?.label||a}),n.jsx(Le,{className:"h-4 w-4 opacity-50"})]}),n.jsx("div",{className:"relative",children:d&&t&&t.length>0?n.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:t.map(x=>n.jsxs(Nt,{ref:x.value===e?g:void 0,onMouseDown:w=>{w.preventDefault(),w.stopPropagation()},onSelect:()=>{x.disabled||(s?.(x.value),b(!1))},className:I("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",x.value===e&&"font-semibold",x.disabled&&"opacity-50 cursor-not-allowed"),children:[n.jsx("span",{children:x.label}),n.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:x.value===e&&n.jsx(ps,{className:"h-4 w-4"})})]},x.value))})})}):null})]})}function Hr({id:t,options:e,required:s,disabled:r,readonly:o,value:i,multiple:a,autofocus:c,onChange:u,onBlur:f,onFocus:p,placeholder:l,rawErrors:d=[],className:b}){const{enumOptions:h,enumDisabled:g,emptyValue:v}=e,y=je(e),x=()=>{p(t,H(i,h,y,v))},w=()=>{f(t,H(i,h,y,v))},N=h?.map(({value:k,label:S},_)=>({value:a?k:Oe(k,_,y),label:S,index:_,disabled:Array.isArray(g)&&g.includes(k)})),R=I({"border-destructive":d.length>0},b);return n.jsx("div",{className:"p-0.5",children:a?n.jsx(qr,{id:t,autoFocus:c,disabled:r||o,multiple:!0,className:R,items:N,selected:i,onValueChange:k=>{u(H(k.map(String),h,y,v))},onFocus:x,onBlur:w}):n.jsx(Wr,{items:N,selected:pn(i,h,!1,y,""),onValueChange:k=>{u(H(k,h,y,v))},autoFocus:c,disabled:r||o,required:s,placeholder:l,className:R,onFocus:x,onBlur:w,ariaDescribedby:ee(t)})})}function Yr({className:t,...e}){return n.jsx("textarea",{"data-slot":"textarea",className:I("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Jr({id:t,htmlName:e,placeholder:s,value:r,required:o,disabled:i,autofocus:a,readonly:c,onBlur:u,onFocus:f,onChange:p,options:l,className:d}){const b=({target:{value:v}})=>p(v===""?l.emptyValue:v),h=({target:v})=>u(t,v&&v.value),g=({target:v})=>f(t,v&&v.value);return n.jsx("div",{className:"flex p-0.5",children:n.jsx(Yr,{id:t,name:e||t,placeholder:s,disabled:i,readOnly:c,value:r??"",required:o,autoFocus:a,rows:l.rows||5,onChange:b,onBlur:h,onFocus:g,"aria-describedby":ee(t),className:d})})}function Xr(){return{CheckboxWidget:rr,CheckboxesWidget:or,RadioWidget:yr,RangeWidget:Lr,SelectWidget:Hr,TextareaWidget:Jr}}function Zr(){return{templates:er(),widgets:Xr()}}function Qr(){return is(Zr())}const eo=Qr();function to(t){const e=V.c(21),{virtualMcp:s,isSelected:r}=t,o=r&&"bg-accent";let i;e[0]!==o?(i=ge("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",o),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s.icon||e[3]!==s.title?(a=n.jsx($e,{icon:s.icon,name:s.title,size:"sm"}),e[2]=s.icon,e[3]=s.title,e[4]=a):a=e[4];let c;e[5]!==s.title?(c=n.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==r?(u=r&&n.jsx(Vn,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=u):u=e[8];let f;e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:"flex items-center justify-between",children:[c,u]}),e[9]=c,e[10]=u,e[11]=f):f=e[11];let p;e[12]!==s.description?(p=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:s.description}),e[12]=s.description,e[13]=p):p=e[13];let l;e[14]!==f||e[15]!==p?(l=n.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,p]}),e[14]=f,e[15]=p,e[16]=l):l=e[16];let d;return e[17]!==i||e[18]!==a||e[19]!==l?(d=n.jsxs("div",{className:i,children:[a,l]}),e[17]=i,e[18]=a,e[19]=l,e[20]=d):d=e[20],d}function no(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ve,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function so(t){const e=V.c(33),{selectedVirtualMcpId:s,onVirtualMcpChange:r,searchInputRef:o}=t,i=On(),[a,c]=j.useState(""),u=j.useRef(null),f=o??u;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={navigateOnCreate:!0},e[0]=p):p=e[0];const{createVirtualMCP:l,isCreating:d}=Ln(p);let b,h,g,v;if(e[1]!==l||e[2]!==f||e[3]!==d||e[4]!==r||e[5]!==a||e[6]!==s||e[7]!==i){let w;e:{const D=i.filter(ro);if(!a.trim()){w=D;break e}const P=a.toLowerCase();w=D.filter(F=>F.title.toLowerCase().includes(P)||F.description?.toLowerCase().includes(P))}const N=w;let R;e[12]!==r?(R=D=>{r(D),c("")},e[12]=r,e[13]=R):R=e[13];const k=R;g="flex flex-col max-h-[min(400px,60dvh)]";let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx($n,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=S):S=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=D=>c(D.target.value),e[15]=_):_=e[15];let A;e[16]!==f||e[17]!==a?(A=n.jsx(In,{ref:f,type:"text",placeholder:"Search for an agent...",value:a,onChange:_,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=f,e[17]=a,e[18]=A):A=e[18];const E=d?"Creating...":"Create Agent";let T;e[19]!==l||e[20]!==d||e[21]!==E?(T=n.jsx(le,{onClick:l,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:d,children:E}),e[19]=l,e[20]=d,e[21]=E,e[22]=T):T=e[22],e[23]!==A||e[24]!==T?(v=n.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:n.jsxs("div",{className:"relative flex items-center gap-2",children:[S,A,T]})}),e[23]=A,e[24]=T,e[25]=v):v=e[25],b="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",h=N.length>0?n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:N.map(D=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>k(D.id),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),k(D.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:n.jsx(to,{virtualMcp:D,isSelected:D.id===s})},D.id))}):n.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=l,e[2]=f,e[3]=d,e[4]=r,e[5]=a,e[6]=s,e[7]=i,e[8]=b,e[9]=h,e[10]=g,e[11]=v}else b=e[8],h=e[9],g=e[10],v=e[11];let y;e[26]!==b||e[27]!==h?(y=n.jsx("div",{className:b,children:h}),e[26]=b,e[27]=h,e[28]=y):y=e[28];let x;return e[29]!==g||e[30]!==v||e[31]!==y?(x=n.jsxs("div",{className:g,children:[v,y]}),e[29]=g,e[30]=v,e[31]=y,e[32]=x):x=e[32],x}function ro(t){return!t.id||!$t(t.id)}function oo(t){const e=V.c(3);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(no,{}),e[0]=s):s=e[0];let r;return e[1]!==t?(r=n.jsx(j.Suspense,{fallback:s,children:n.jsx(so,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function io(t){const e=V.c(32),{selectedVirtualMcpId:s,selectedVirtualMcp:r,onVirtualMcpChange:o,className:i,placeholder:a,showTooltip:c,disabled:u}=t,f=a===void 0?"Select Agent":a,p=c===void 0?!0:c,l=u===void 0?!1:u,[d,b]=j.useState(!1),h=j.useRef(null);let g;e[0]!==o?(g=B=>{o(B),b(!1)},e[0]=o,e[1]=g):g=e[1];const v=g,y=En();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=B=>{b(B)},e[2]=x):x=e[2];const w=x;let N,R;e[3]!==y||e[4]!==d?(N=()=>{d&&!y&&setTimeout(()=>{h.current?.focus()},0)},R=[d,y],e[3]=y,e[4]=d,e[5]=N,e[6]=R):(N=e[5],R=e[6]),j.useEffect(N,R);const k=l?!1:d,S=l?void 0:w,_=l?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let A;e[7]!==i||e[8]!==_?(A=ge("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",_,i),e[7]=i,e[8]=_,e[9]=A):A=e[9];let E;e[10]!==r?(E=r?n.jsx($e,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[n.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),n.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),n.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),n.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),n.jsx(zn,{size:16})]}),e[10]=r,e[11]=E):E=e[11];let T;e[12]!==l||e[13]!==f||e[14]!==A||e[15]!==E?(T=n.jsx(Bn,{asChild:!0,children:n.jsx(Tn,{asChild:!0,children:n.jsx("button",{type:"button",disabled:l,className:A,"aria-label":f,children:E})})}),e[12]=l,e[13]=f,e[14]=A,e[15]=E,e[16]=T):T=e[16];let D;e[17]!==d||e[18]!==r?.title||e[19]!==p?(D=p&&!d&&n.jsx(Pn,{side:"top",className:"text-xs",children:r?.title??"Choose an agent to chat with"}),e[17]=d,e[18]=r?.title,e[19]=p,e[20]=D):D=e[20];let P;e[21]!==T||e[22]!==D?(P=n.jsx(Fn,{children:n.jsxs(Mn,{children:[T,D]})}),e[21]=T,e[22]=D,e[23]=P):P=e[23];let F;e[24]!==v||e[25]!==s?(F=n.jsx(An,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:n.jsx(oo,{selectedVirtualMcpId:s,onVirtualMcpChange:v,searchInputRef:h})}),e[24]=v,e[25]=s,e[26]=F):F=e[26];let M;return e[27]!==P||e[28]!==F||e[29]!==k||e[30]!==S?(M=n.jsxs(Dn,{open:k,onOpenChange:S,children:[P,F]}),e[27]=P,e[28]=F,e[29]=k,e[30]=S,e[31]=M):M=e[31],M}function ao(t){const e=t.properties;if(!e)return!1;const s=e.__type,r=e.__binding;return!!(s?.const||r?.const)}function lo(t){const e=t.properties;if(!e)return{};const s=e.__type,r=e.__binding;return{bindingType:s?.const,bindingSchema:r?.const}}function co(t){const e=V.c(10),{bindingSchema:s,bindingType:r,currentValue:o,onValueChange:i,placeholder:a,onAddNew:c,className:u}=t;let f;e[0]!==r?(f=ss(r),e[0]=r,e[1]=f):f=e[1];const l=f??(typeof s=="string"?s:s??void 0);let d;return e[2]!==r||e[3]!==u||e[4]!==o||e[5]!==c||e[6]!==i||e[7]!==a||e[8]!==l?(d=n.jsx(uo,{value:o,onValueChange:i,placeholder:a,binding:l,bindingType:r,onAddNew:c,className:u}),e[2]=r,e[3]=u,e[4]=o,e[5]=c,e[6]=i,e[7]=a,e[8]=l,e[9]=d):d=e[9],d}function uo({value:t,onValueChange:e,placeholder:s="Select a connection...",binding:r,bindingType:o,onAddNew:i,className:a}){const[c,u]=j.useState(!1),{installByBinding:f,isInstalling:p}=os(),l=c||p,d=r?void 0:o||void 0,b=qt(r?{binding:r}:d?{filters:[{column:"app_name",value:d}]}:{}),h=Wt(t&&!b.some(x=>x.id===t)?t:void 0),g=h?[h,...b]:b,v=o?.startsWith("@"),y=async()=>{if(v&&o){u(!0);try{const x=await f(o);x&&e(x.id)}catch(x){const w=x instanceof Error?x.message:String(x);ae.error(`Failed to connect MCP: ${w}`)}finally{u(!1)}return}i?.()};return n.jsxs(Nn,{value:t,onValueChange:e,children:[n.jsx(Cn,{size:"sm",className:ge("w-[200px]",a),children:n.jsx(kn,{placeholder:s})}),n.jsxs(_n,{children:[g.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):g.map(x=>n.jsx(Rn,{value:x.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?n.jsx("img",{src:x.icon,alt:x.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:x.title})]})},x.id)),(i||v)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(le,{onClick:x=>{x.preventDefault(),x.stopPropagation(),y()},disabled:l,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:l?n.jsxs(n.Fragment,{children:[n.jsx(ve,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(Sn,{size:16}),n.jsx("span",{children:"Custom Connection"})]})})})]})]})}function mo(t){const e=V.c(49),{schema:s,formData:r,title:o,description:i,registry:a}=t,c=a.formContext,u=o||"",f=o||"";if(ao(s)){const d=s;let b;e[0]!==d?(b=lo(d),e[0]=d,e[1]=b):b=e[1];const{bindingType:h,bindingSchema:g}=b,y=(c?.formData?.[u]?.value??r?.value)||"";let x;e[2]!==h||e[3]!==u||e[4]!==c||e[5]!==r?(x=M=>{const B={...r,value:M??"",...h&&{__type:h}};c?.onFieldChange(u,B)},e[2]=h,e[3]=u,e[4]=c,e[5]=r,e[6]=x):x=e[6];const w=x,N=fo;let R;e[7]!==f||e[8]!==u||e[9]!==o?(R=N(o||f||u),e[7]=f,e[8]=u,e[9]=o,e[10]=R):R=e[10];const k=R;if(h==="@deco/agent"){let M;e[11]!==k?(M=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[11]=k,e[12]=M):M=e[12];let B;e[13]!==i?(B=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[13]=i,e[14]=B):B=e[14];let z;e[15]!==M||e[16]!==B?(z=n.jsxs("div",{className:"flex-1 min-w-0",children:[M,B]}),e[15]=M,e[16]=B,e[17]=z):z=e[17];const U=y||void 0;let G;e[18]!==w||e[19]!==U?(G=n.jsx(io,{selectedVirtualMcpId:U,onVirtualMcpChange:w,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=w,e[19]=U,e[20]=G):G=e[20];let ie;return e[21]!==z||e[22]!==G?(ie=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[z,G]}),e[21]=z,e[22]=G,e[23]=ie):ie=e[23],ie}let S;e[24]!==k?(S=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[24]=k,e[25]=S):S=e[25];let _;e[26]!==i?(_=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[26]=i,e[27]=_):_=e[27];let A;e[28]!==S||e[29]!==_?(A=n.jsxs("div",{className:"flex-1 min-w-0",children:[S,_]}),e[28]=S,e[29]=_,e[30]=A):A=e[30];let E;e[31]!==k?(E=k.toLowerCase(),e[31]=k,e[32]=E):E=e[32];const T=`Select ${E}...`;let D;e[33]!==c?(D=()=>c?.onAddNew(),e[33]=c,e[34]=D):D=e[34];let P;e[35]!==g||e[36]!==h||e[37]!==y||e[38]!==w||e[39]!==T||e[40]!==D?(P=n.jsx(co,{bindingSchema:g,bindingType:h,currentValue:y,onValueChange:w,placeholder:T,onAddNew:D,className:"w-[200px] shrink-0"}),e[35]=g,e[36]=h,e[37]=y,e[38]=w,e[39]=T,e[40]=D,e[41]=P):P=e[41];let F;return e[42]!==P||e[43]!==A?(F=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[A,P]}),e[42]=P,e[43]=A,e[44]=F):F=e[44],F}let p;e[45]!==t.properties?(p=t.properties.map(po),e[45]=t.properties,e[46]=p):p=e[46];let l;return e[47]!==p?(l=n.jsx("div",{className:"flex flex-col gap-4",children:p}),e[47]=p,e[48]=l):l=e[48],l}function po(t){return t.content}function fo(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,ho)}function ho(t){return t.toUpperCase()}function xo(t){const e=V.c(13),{label:s,children:r,description:o,id:i,schema:a}=t;if(i.includes("__type")||i.includes("__binding"))return null;if(a.type==="object")return r;let c;e[0]!==i||e[1]!==s?(c=s&&n.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:i,children:s}),e[0]=i,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==o?(u=o&&n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o}),e[3]=o,e[4]=u):u=e[4];let f;e[5]!==c||e[6]!==u?(f=n.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[5]=c,e[6]=u,e[7]=f):f=e[7];let p;e[8]!==r?(p=n.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=p):p=e[9];let l;return e[10]!==f||e[11]!==p?(l=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[f,p]}),e[10]=f,e[11]=p,e[12]=l):l=e[12],l}const bo={ObjectFieldTemplate:mo,FieldTemplate:xo};function go(t){const e=V.c(19),{formKey:s,formState:r,onFormStateChange:o,stateSchema:i}=t,{org:a}=he(),c=Mt();let u;e[0]!==o?(u=x=>{x.formData&&o(x.formData)},e[0]=o,e[1]=u):u=e[1];const f=u;let p;e[2]!==r||e[3]!==o?(p=(x,w)=>{const N={...r,[x]:w};o(N)},e[2]=r,e[3]=o,e[4]=p):p=e[4];const l=p;let d;e[5]!==c||e[6]!==a?(d=()=>{c({to:"/$org/settings/connections",params:{org:a.slug},search:{action:"create"}})},e[5]=c,e[6]=a,e[7]=d):d=e[7];const b=d;let h;e[8]!==r||e[9]!==b||e[10]!==l?(h={onFieldChange:l,formData:r,onAddNew:b},e[8]=r,e[9]=b,e[10]=l,e[11]=h):h=e[11];const g=h;let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(n.Fragment,{}),e[12]=v):v=e[12];let y;return e[13]!==g||e[14]!==s||e[15]!==r||e[16]!==f||e[17]!==i?(y=n.jsx("div",{className:"flex flex-col h-full overflow-auto",children:n.jsx(eo,{schema:i,validator:fn,formData:r,onChange:f,formContext:g,liveValidate:!1,showErrorList:!1,templates:bo,children:v},s)}),e[13]=g,e[14]=s,e[15]=r,e[16]=f,e[17]=i,e[18]=y):y=e[18],y}function vo(t){const e=V.c(14),{org:s}=he();let r;e[0]!==t||e[1]!==s.id||e[2]!==s.slug?(r={connectionId:t,orgId:s.id,orgSlug:s.slug},e[0]=t,e[1]=s.id,e[2]=s.slug,e[3]=r):r=e[3];const o=zt(r);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={},e[4]=i):i=e[4];let a;e[5]!==o?(a={client:o,toolName:"MCP_CONFIGURATION",toolArguments:i,select:yo},e[5]=o,e[6]=a):a=e[6];const{data:c}=Lt(a);let u;e[7]!==c.stateSchema?(u=c.stateSchema??{type:"object",properties:{}},e[7]=c.stateSchema,e[8]=u):u=e[8];const f=u;let p;e[9]!==c.scopes?(p=c.scopes??[],e[9]=c.scopes,e[10]=p):p=e[10];const l=p;let d;return e[11]!==l||e[12]!==f?(d={stateSchema:f,scopes:l},e[11]=l,e[12]=f,e[13]=d):d=e[13],d}function yo(t){return t.structuredContent??t}function jo(t){const e=V.c(4),{onAuthenticate:s,buttonText:r}=t,o=r===void 0?"Authenticate":r;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=i):i=e[0];let a;return e[1]!==o||e[2]!==s?(a=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,n.jsx(le,{onClick:s,size:"default",children:o})]})}),e[1]=o,e[2]=s,e[3]=a):a=e[3],a}function wo(t){const e=V.c(7),{hasReadme:s,onViewReadme:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Kt,{size:36,className:"text-muted-foreground"}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Manual Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r?(a=s&&r&&n.jsxs(le,{onClick:r,variant:"outline",size:"lg",children:[n.jsx(Ut,{size:18,className:"mr-2"}),"View README"]}),e[2]=s,e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==a?(c=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[o,i,a]})}),e[5]=a,e[6]=c):c=e[6],c}function So(){const t=V.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=s):s=t[1],s}function No(t){const e=V.c(12),{connection:s,form:r}=t,{stateSchema:o}=vo(s.id);let i;e[0]!==r.control?(i={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=i):i=e[1];const a=Vt(i);let c;e[2]!==r?(c=d=>{r.setValue("configuration_state",d,{shouldDirty:!0})},e[2]=r,e[3]=c):c=e[3];const u=c;if(!(o&&o.properties&&typeof o.properties=="object"&&Object.keys(o.properties).length>0)){let d;return e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[4]=d):d=e[4],d}let p;e[5]!==a?(p=a??{},e[5]=a,e[6]=p):p=e[6];let l;return e[7]!==s.id||e[8]!==u||e[9]!==o||e[10]!==p?(l=n.jsx("div",{className:"flex-1 overflow-auto",children:n.jsx(go,{formKey:s.id,stateSchema:o,formState:p,onFormStateChange:u})}),e[7]=s.id,e[8]=u,e[9]=o,e[10]=p,e[11]=l):l=e[11],l}function Co(t){const e=V.c(11),{connection:s,form:r,hasMcpBinding:o,isMCPAuthenticated:i,supportsOAuth:a,isServerError:c,onAuthenticate:u,onViewReadme:f}=t,l=!!s?.metadata?.repository?.url;if(!i){if(c){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(So,{}),e[0]=g):g=e[0],g}if(a){let g;return e[1]!==u?(g=n.jsx(jo,{onAuthenticate:u}),e[1]=u,e[2]=g):g=e[2],g}let h;return e[3]!==l||e[4]!==f?(h=n.jsx(wo,{hasReadme:l,onViewReadme:f}),e[3]=l,e[4]=f,e[5]=h):h=e[5],h}if(!o){let h;return e[6]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=h):h=e[6],h}let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),e[7]=d):d=e[7];let b;return e[8]!==s||e[9]!==r?(b=n.jsx(Ot,{children:n.jsx(j.Suspense,{fallback:d,children:n.jsx(No,{connection:s,form:r})})}),e[8]=s,e[9]=r,e[10]=b):b=e[10],b}function Zo(t){const e=V.c(2);let s;return e[0]!==t?(s=n.jsx("div",{className:"flex-1 flex h-full",children:n.jsx(Co,{...t})}),e[0]=t,e[1]=s):s=e[1],s}export{wo as M,jo as O,Zo as S,Xo as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-BfzqpoYd.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,b5 as R}from"./index-
|
|
1
|
+
import{r as a,b5 as R}from"./index-BfzqpoYd.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ar as st,as as me,at as it,au as nt,av as Ae,G as pe,aw as rt,ax as ot,r as M,ay as lt,az as at,aA as ct,aB as dt,aC as je,aD as mt,aE as ut,aF as ft,e as $,j as i,q as V,c as K,l as Me,aG as xe,o as W,K as oe,n as le,a as ht,v as pt,E as xt,b as gt,B as we}from"./index-BfzqpoYd.js";import{u as ge}from"./tooltip-CC_mfaKY.js";import{i as bt,u as ee,S as Le,g as yt}from"./use-mcp-client-Brxiewn2.js";import{a as vt,b as jt,v as wt,u as Nt}from"./use-virtual-mcp-DDTG_-f6.js";import{i as St}from"./Check-CSixRgqh.js";import{Z as _t,A as Y,$ as Ct,u as Tt,c as Et}from"./agent-icon-Lc1AgwlE.js";import{s as be}from"./Plus-gXoAw_mX.js";import{i as ze}from"./X-DCWlm9Ta.js";import{u as It,b as kt,h as $t,C as ne}from"./agent-capabilities-CuNGQogd.js";import{u as At,c as Mt}from"./chat-context-BIie9ysT.js";import{N as Lt}from"./agent-icons-Cprwkzhw.js";import{u as Oe,a as re,K as Re,P as Pe,D as De,c as zt,S as Ot,v as Rt,b as Pt,C as Dt,s as Ht,d as Bt,e as Ut,f as Ft}from"./sortable.esm-DYE94iJD.js";import{u as He,a as Be,o as Qt}from"./use-organization-settings-DjvlRnDe.js";import{c as ye,u as Wt,h as qt}from"./shell-layout-D8qm1N5L.js";import{I as Kt}from"./input-BGQcwAaL.js";import{S as Xt}from"./scroll-area-BYy84ztj.js";import{S as Gt,c as Vt,d as Zt,a as Jt,b as Yt}from"./sheet-y2Nja_Ue.js";import{S as D}from"./skeleton-thGJKlMg.js";import{t as Ue}from"./ChevronDown-BptXi8Ef.js";import{d as Fe}from"./ZoomOut-CCPaeWry.js";import{g as es,M as ts}from"./types-btWFnXlQ.js";import{I as ss}from"./integration-icon-B-zr5uGs.js";import{u as is}from"./unwrap-tool-result-BYXdCQMg.js";import{t as Qe,P as ns,e as rs,s as os,g as ls}from"./pair-NC4sCATE.js";import{a as as}from"./XCircle-CEKwTNMD.js";import{g as cs}from"./use-mcp-prompts-CKvrvNSD.js";import{u as ds,w as ms}from"./tab-id-CjkvF5Bz.js";import{D as us,a as fs,b as hs,h as ps,c as Ne,d as xs}from"./dropdown-menu-DpfpR4kx.js";import{s as gs}from"./Trash01-B91-1KNk.js";import{a as bs,u as ys}from"./use-ai-providers-D2jZ5H5p.js";import{a as vs}from"./toolbar-BIjePcgn.js";import"./use-collections-vRlJo8MD.js";import"./AlertCircle-B-p2hhbf.js";import"./Tool01-DXWYgeBe.js";import"./SwitchHorizontal01-__hAuhZa.js";import"./RefreshCcw01-DlKjMM-5.js";import"./ArrowUpRight-Bq-dJGgn.js";import"./ZapSquare-DSdwG_FE.js";import"./Users03-D5pU3_ql.js";import"./CheckCircle-CqLcOI7o.js";import"./ChevronLeft-Bq6F--2K.js";import"./ChevronRight-CtziSifX.js";import"./ChevronUp-DChs66VU.js";import"./DotsVertical-DQ3UGDDE.js";import"./Container-DIwdobum.js";import"./Eye-DepFjUJE.js";import"./Globe01-BayTDYGC.js";import"./FilterLines-CIJgiiLT.js";import"./Star01-q6EhXttt.js";import"./Palette-siqkt4cQ.js";import"./HardDrive-OwnJRrIS.js";import"./Stars02-DJ4Y5TfK.js";import"./Key01-CR8zfCdU.js";import"./LayoutLeft-6fPyjOVd.js";import"./LinkExternal01-B2YZgRTN.js";import"./Monitor01-BNXW6pu5.js";import"./Sun-CeFpMHQU.js";import"./Play-CBt0NeLA.js";import"./SearchMd-z6b-QOmX.js";import"./Settings02-C7YqxsZL.js";import"./Shield01-BT66FEMI.js";import"./Stars01-DcMeK1n0.js";import"./Upload01-CcwGyBRP.js";import"./User01-JR_76gHl.js";import"./Users01-BM2QLqUJ.js";import"./XClose-DhQ5V0ST.js";import"./Zap-BLBAeivN.js";import"./spinner-j70e5pPL.js";import"./dialog-nXKceTRB.js";import"./drawer-lSnonzW3.js";import"./collection-search-Bryj5VYk.js";import"./form-BM4RuTjX.js";import"./label-zIig0cjv.js";import"./select-DpYu937I.js";import"./tabs-sqzEAKlk.js";import"./toggle-group-jYWXBndg.js";import"./connect-desktop-dialog-BeLm4wl6.js";import"./popover-B1xAxEac.js";import"./command-KyGHPzm4.js";import"./index-CnLAq3ph.js";import"./useInfiniteQuery-BEouccKd.js";import"./infiniteQueryObserver-CvEVG_TM.js";import"./index-1xoY7YJX.js";import"./question-004-sINsf4GQ.js";import"./checkbox-DFFY_m2B.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-3vQWE5Hu.js";import"./settings-section-pgSq0Nbi.js";import"./card-CeH_PUFE.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dug8PvM2.js";import"./use-registry-connections-BQfixYFV.js";import"./use-connection-MP_sOdrQ.js";import"./extract-connection-data-DxtHEsy3.js";import"./generate-id-DvX29Me7.js";import"./collections-B-UBhIxv.js";import"./collection-tabs-Y3w8w2D4.js";import"./badge-DF6gVmsi.js";import"./textarea-Bo_ElpPh.js";import"./connection-form-helpers-Ce4ZXQGG.js";import"./use-infinite-scroll-BYw2UY-G.js";import"./useSuspenseInfiniteQuery-wDDb-pw7.js";import"./required-auth-layout-3IQyeREK.js";import"./useRouterState-xsU2zFoM.js";import"./use-org-sso-BWWAvGBF.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BkzArvj8.js";import"./file-type-icon-B2skJERp.js";import"./content-blocks-o63cs2vh.js";import"./use-navigate-to-agent-BRFls8tQ.js";import"./decopilot-sse-pool-vfZK3kan.js";import"./create-sse-subscription-BS5983N4.js";function Se(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function js(t,e,s){const r=t.slice(0);return r[e]=s,r}var ws=class extends st{#n;#e;#r;#i;#t;#s;#o;#l;#a;#c=[];constructor(t,e,s){super(),this.#n=t,this.#i=s,this.#r=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(t=>{t.destroy()})}setQueries(t,e){this.#r=t,this.#i=e,me.batch(()=>{const s=this.#t,r=this.#u(this.#r);r.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const n=r.map(m=>m.observer),l=n.map(m=>m.getCurrentResult()),o=s.length!==n.length,c=n.some((m,u)=>m!==s[u]),a=o||c,d=a?!0:l.some((m,u)=>{const f=this.#e[u];return!f||!it(m,f)});!a&&!d||(a&&(this.#c=r,this.#t=n),this.#e=l,this.hasListeners()&&(a&&(Se(s,n).forEach(m=>{m.destroy()}),Se(n,s).forEach(m=>{m.subscribe(u=>{this.#f(m,u)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(t=>t.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(t,e){const s=this.#u(t),r=s.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),n=s.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>this.#m(l??r,e,n),()=>this.#d(r,s)]}#d(t,e){return e.map((s,r)=>{const n=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,l=>{e.forEach(o=>{o.observer.trackProp(l)})})})}#m(t,e,s){if(e){const r=this.#a,n=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((l,o)=>l!==r[o]));return(!this.#s||this.#e!==this.#l||n||e!==this.#o)&&(this.#o=e,this.#l=this.#e,s!==void 0&&(this.#a=s),this.#s=nt(this.#s,e(t))),this.#s}return t}#p(){return this.#i?.combine!==void 0&&this.#t.some((t,e)=>t.options.suspense&&this.#e[e]?.data===void 0)}#u(t){const e=new Map;this.#t.forEach(r=>{const n=r.options.queryHash;if(!n)return;const l=e.get(n);l?l.push(r):e.set(n,[r])});const s=[];return t.forEach(r=>{const n=this.#n.defaultQueryOptions(r),o=e.get(n.queryHash)?.shift()??new Ae(this.#n,n);s.push({defaultedQueryOptions:n,observer:o})}),s}#f(t,e){const s=this.#t.indexOf(t);s!==-1&&(this.#e=js(this.#e,s,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#d(this.#e,this.#c),e=this.#p(),s=this.#s,r=e?s:this.#m(t,this.#i?.combine);(e||s!==r)&&me.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}};function Ns({queries:t,...e},s){const r=pe(s),n=rt(),l=ot(),o=M.useMemo(()=>t.map(p=>{const h=r.defaultQueryOptions(p);return h._optimisticResults=n?"isRestoring":"optimistic",h}),[t,r,n]);o.forEach(p=>{lt(p);const h=r.getQueryCache().get(p.queryHash);at(p,l,h)}),ct(l);const[c]=M.useState(()=>new ws(r,o,e)),[a,d,m]=c.getOptimisticResult(o,e.combine),u=!n&&e.subscribed!==!1;M.useSyncExternalStore(M.useCallback(p=>u?c.subscribe(me.batchCalls(p)):dt,[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),M.useEffect(()=>{c.setQueries(o,e)},[o,e,c]);const x=a.some((p,h)=>je(o[h],p))?a.flatMap((p,h)=>{const g=o[h];if(g&&je(g,p)){const y=new Ae(r,g);return mt(g,y,l)}return[]}):[];if(x.length>0)throw Promise.all(x);const b=a.find((p,h)=>{const g=o[h];return g&&ut({result:p,errorResetBoundary:l,throwOnError:g.throwOnError,query:r.getQueryCache().get(g.queryHash),suspense:g.suspense})});if(b?.error)throw b.error;return d(m())}function Ss(t,e){return Ns({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:ft,enabled:!0,placeholderData:void 0}))},e)}const te=8;function _s(t){const e=$.c(16),{open:s,onOpenChange:r}=t,[n,l]=M.useState("");let o,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(Gt,{children:"Manage home"}),c=i.jsx(Vt,{children:"Add agents to the home board and pin their interactive UIs or prompts."}),e[0]=o,e[1]=c):(o=e[0],c=e[1]);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(_t,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none","aria-hidden":!0}),e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=p=>l(p.target.value),e[3]=d):d=e[3];let m;e[4]!==n?(m=i.jsxs(Zt,{className:"px-5 py-4 border-b border-border",children:[o,c,i.jsxs("div",{className:"relative mt-3",children:[a,i.jsx(Kt,{value:n,onChange:d,placeholder:"Search agents…",className:"pl-8 h-8 text-sm"})]})]}),e[4]=n,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Ys,{}),e[6]=u):u=e[6];let f;e[7]!==n?(f=i.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3 flex flex-col gap-4",children:i.jsx(M.Suspense,{fallback:u,children:i.jsx(Ts,{search:n})})})}),e[7]=n,e[8]=f):f=e[8];let x;e[9]!==m||e[10]!==f?(x=i.jsxs(Jt,{side:"right",className:"w-full sm:max-w-md p-0 flex flex-col",children:[m,f]}),e[9]=m,e[10]=f,e[11]=x):x=e[11];let b;return e[12]!==r||e[13]!==s||e[14]!==x?(b=i.jsx(Yt,{open:s,onOpenChange:r,children:x}),e[12]=r,e[13]=s,e[14]=x,e[15]=b):b=e[15],b}function Cs(t){const e=$.c(32),{org:s}=V(),r=He();let n;e[0]!==r?.ids?(n=r?.ids??[],e[0]=r?.ids,e[1]=n):n=e[1];const l=n,o=Be(),c=jt(),a=pe();let d;e[2]!==s||e[3]!==a?(d=()=>a.refetchQueries({queryKey:oe.homeNextActions(s.slug),type:"active"}),e[2]=s,e[3]=a,e[4]=d):d=e[4];const m=d;let u;e[5]!==l?(u=_=>l.includes(_),e[5]=l,e[6]=u):u=e[6];const f=u;let x;e[7]!==l||e[8]!==t?(x=t?l.filter(_=>t.has(_)).length:l.length,e[7]=l,e[8]=t,e[9]=x):x=e[9];const p=x>=te;let h;e[10]!==p||e[11]!==f||e[12]!==o?(h=_=>f(_)||p?Promise.resolve():o.apply(T=>T.includes(_)?null:[...T,_]),e[10]=p,e[11]=f,e[12]=o,e[13]=h):h=e[13];const g=h;let y;e[14]!==o?(y=_=>o.apply(T=>T.filter(I=>I!==_)),e[14]=o,e[15]=y):y=e[15];const j=y;let v;e[16]!==o?(v=_=>o.apply(()=>_),e[16]=o,e[17]=v):v=e[17];const w=v;let N;e[18]!==c||e[19]!==p||e[20]!==f||e[21]!==m||e[22]!==o?(N=async(_,T)=>{await c.update.mutateAsync({id:_.id,data:{metadata:T}}),!f(_.id)&&!p&&await o.apply(I=>I.includes(_.id)?null:[...I,_.id]),await m()},e[18]=c,e[19]=p,e[20]=f,e[21]=m,e[22]=o,e[23]=N):N=e[23];const S=N;let C;return e[24]!==g||e[25]!==p||e[26]!==l||e[27]!==f||e[28]!==j||e[29]!==w||e[30]!==S?(C={homeIds:l,isOnHome:f,atLimit:p,addAgent:g,removeAgent:j,reorder:w,saveAgentMetadata:S},e[24]=g,e[25]=p,e[26]=l,e[27]=f,e[28]=j,e[29]=w,e[30]=S,e[31]=C):C=e[31],C}function Ts(t){const e=$.c(21),{search:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={pageSize:1e3},e[0]=r):r=e[0];const n=vt(r);let l;e[1]!==n?(l=new Set(n.map(As)),e[1]=n,e[2]=l):l=e[2];const o=Cs(l);let c,a,d;if(e[3]!==n||e[4]!==o||e[5]!==s){const p=new Map(n.map($s));c=s.trim().toLowerCase();const h=y=>!c||y.title?.toLowerCase().includes(c);a=o.homeIds.map(y=>p.get(y)).filter(ks).filter(h);let g;e[9]!==o?(g=y=>!o.isOnHome(y.id),e[9]=o,e[10]=g):g=e[10],d=n.filter(Is).filter(g).filter(h).sort(Es),e[3]=n,e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=d}else c=e[6],a=e[7],d=e[8];const m=d;let u;e[11]!==o||e[12]!==a?(u=i.jsx(Ms,{home:o,agents:a}),e[11]=o,e[12]=a,e[13]=u):u=e[13];const f=!!c;let x;e[14]!==m||e[15]!==o||e[16]!==f?(x=i.jsx(Os,{home:o,agents:m,hasSearch:f}),e[14]=m,e[15]=o,e[16]=f,e[17]=x):x=e[17];let b;return e[18]!==u||e[19]!==x?(b=i.jsxs(i.Fragment,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=b):b=e[20],b}function Es(t,e){return(t.title??"").localeCompare(e.title??"")}function Is(t){return t.id&&!bt(t.id)}function ks(t){return!!t}function $s(t){return[t.id,t]}function As(t){return t.id}function We(t){const e=$.c(7),{title:s,hint:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1];let l;e[2]!==r?(l=r&&i.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let o;return e[4]!==n||e[5]!==l?(o=i.jsxs("div",{className:"flex items-center justify-between px-1",children:[n,l]}),e[4]=n,e[5]=l,e[6]=o):o=e[6],o}function Ms(t){const e=$.c(14),{home:s,agents:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={activationConstraint:{distance:5}},e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={coordinateGetter:Ht},e[1]=l):l=e[1];const o=Oe(re(Pe,n),re(Re,l));let c;e[2]!==s?(c=x=>{const{active:b,over:p}=x;if(!p||b.id===p.id)return;const h=s.homeIds,g=h.indexOf(b.id),y=h.indexOf(p.id);g===-1||y===-1||s.reorder(Bt([...h],g,y)).catch(zs)},e[2]=s,e[3]=c):c=e[3];const a=c,d=`${s.homeIds.length}/${te}`;let m;e[4]!==d?(m=i.jsx(We,{title:"On home",hint:d}),e[4]=d,e[5]=m):m=e[5];let u;e[6]!==r||e[7]!==a||e[8]!==s||e[9]!==o?(u=r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No agents on the home yet."}):i.jsx(De,{sensors:o,collisionDetection:zt,onDragEnd:a,children:i.jsx(Ot,{items:r.map(Ls),strategy:Rt,children:i.jsx("div",{className:"flex flex-col gap-1",children:r.map(x=>i.jsx(Ps,{agent:x,home:s},x.id))})})}),e[6]=r,e[7]=a,e[8]=s,e[9]=o,e[10]=u):u=e[10];let f;return e[11]!==m||e[12]!==u?(f=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,u]}),e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function Ls(t){return t.id}function zs(){return W.error("Couldn't reorder home — please try again.")}function Os(t){const e=$.c(6),{home:s,agents:r,hasSearch:n}=t,[l,o]=M.useState(20);let c;if(e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==l){const a=r.slice(0,l);let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(We,{title:"Add to home"}),e[5]=d):d=e[5],c=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:n?"No agents match.":"Every agent is on the home."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex flex-col gap-1",children:a.map(m=>i.jsx(Bs,{agent:m,home:s},m.id))}),r.length>l&&i.jsxs("button",{type:"button",onClick:()=>o(Rs),className:"mt-1 self-center rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",children:["Load more (",r.length-l,")"]})]})]}),e[0]=r,e[1]=n,e[2]=s,e[3]=l,e[4]=c}else c=e[4];return c}function Rs(t){return t+20}function qe(t){const e=xe(t.metadata?.ui).filter(l=>!!l.resourceUri).length,s=t.metadata?.ui?.homePrompts,r=Array.isArray(s)?s.length:null,n=[];return e>0&&n.push(`${e} tile${e===1?"":"s"}`),r!==null&&r>0&&n.push(`${r} prompt${r===1?"":"s"}`),r===0&&n.push("prompts off"),n.join(" · ")}function Ps(t){const e=$.c(57),{agent:s,home:r}=t,[n,l]=M.useState(!1);let o;e[0]!==s.id?(o={id:s.id},e[0]=s.id,e[1]=o):o=e[1];const{attributes:c,listeners:a,setNodeRef:d,transform:m,transition:u,isDragging:f}=Pt(o),x=qe(s)||"Quick access";let b;e[2]!==m?(b=Dt.Transform.toString(m),e[2]=m,e[3]=b):b=e[3];const p=f?.5:void 0,h=f?100:void 0;let g;e[4]!==b||e[5]!==p||e[6]!==h||e[7]!==u?(g={transform:b,transition:u,opacity:p,zIndex:h},e[4]=b,e[5]=p,e[6]=h,e[7]=u,e[8]=g):g=e[8];const y=g,j=f&&"shadow-lg";let v;e[9]!==j?(v=K("rounded-lg border border-border bg-card",j),e[9]=j,e[10]=v):v=e[10];const w=`Drag to reorder ${s.title??s.id}`;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(Fe,{size:14}),e[11]=N):N=e[11];let S;e[12]!==c||e[13]!==a||e[14]!==w?(S=i.jsx("button",{type:"button",...c,...a,className:"shrink-0 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","aria-label":w,children:N}),e[12]=c,e[13]=a,e[14]=w,e[15]=S):S=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=()=>l(Hs),e[16]=C):C=e[16];const _=s.title??s.id;let T;e[17]!==s.icon||e[18]!==_?(T=i.jsx(Y,{icon:s.icon,name:_,size:"sm"}),e[17]=s.icon,e[18]=_,e[19]=T):T=e[19];const I=s.title??s.id;let E;e[20]!==I?(E=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:I}),e[20]=I,e[21]=E):E=e[21];let k;e[22]!==x?(k=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:x}),e[22]=x,e[23]=k):k=e[23];let L;e[24]!==E||e[25]!==k?(L=i.jsxs("div",{className:"min-w-0 flex-1",children:[E,k]}),e[24]=E,e[25]=k,e[26]=L):L=e[26];const U=n&&"rotate-180";let O;e[27]!==U?(O=K("shrink-0 text-muted-foreground transition-transform",U),e[27]=U,e[28]=O):O=e[28];let R;e[29]!==O?(R=i.jsx(Ue,{size:16,className:O}),e[29]=O,e[30]=R):R=e[30];let Q;e[31]!==n||e[32]!==T||e[33]!==L||e[34]!==R?(Q=i.jsxs("button",{type:"button",onClick:C,className:"flex min-w-0 flex-1 items-center gap-2.5 text-left outline-none","aria-expanded":n,children:[T,L,R]}),e[31]=n,e[32]=T,e[33]=L,e[34]=R,e[35]=Q):Q=e[35];let A;e[36]!==s.id||e[37]!==r?(A=()=>r.removeAgent(s.id).catch(Ds),e[36]=s.id,e[37]=r,e[38]=A):A=e[38];const F=`Remove ${s.title??s.id} from home`;let P;e[39]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(ze,{size:14}),e[39]=P):P=e[39];let z;e[40]!==A||e[41]!==F?(z=i.jsx("button",{type:"button",onClick:A,"aria-label":F,title:"Remove from home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:P}),e[40]=A,e[41]=F,e[42]=z):z=e[42];let H;e[43]!==S||e[44]!==Q||e[45]!==z?(H=i.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-2.5",children:[S,Q,z]}),e[43]=S,e[44]=Q,e[45]=z,e[46]=H):H=e[46];let B;e[47]!==s||e[48]!==n||e[49]!==r?(B=n&&i.jsx(Ke,{agent:s,home:r}),e[47]=s,e[48]=n,e[49]=r,e[50]=B):B=e[50];let q;return e[51]!==d||e[52]!==y||e[53]!==H||e[54]!==B||e[55]!==v?(q=i.jsxs("div",{ref:d,style:y,className:v,children:[H,B]}),e[51]=d,e[52]=y,e[53]=H,e[54]=B,e[55]=v,e[56]=q):q=e[56],q}function Ds(){return W.error("Couldn't remove from home — please try again.")}function Hs(t){return!t}function Bs({agent:t,home:e}){const[s,r]=M.useState(!1),[n,l]=M.useState(!1),o=qe(t),c=async()=>{if(!e.atLimit){l(!0);try{await e.addAgent(t.id)}catch{W.error("Couldn't add to home — please try again.")}finally{l(!1)}}};return i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[i.jsxs("button",{type:"button",onClick:()=>r(a=>!a),className:"flex min-w-0 flex-1 items-center gap-3 text-left outline-none","aria-expanded":s,children:[i.jsx(Y,{icon:t.icon,name:t.title??t.id,size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:t.title??t.id}),o&&i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),i.jsx(Ue,{size:16,className:K("shrink-0 text-muted-foreground transition-transform",s&&"rotate-180")})]}),i.jsx("button",{type:"button",onClick:c,disabled:n||e.atLimit,"aria-label":"Add to home",title:e.atLimit?`Home is full (${te}) — remove an agent first`:"Add to home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md bg-foreground text-background text-xs hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:n?i.jsx(Me,{size:12,className:"animate-spin"}):i.jsx(be,{size:14})})]}),s&&i.jsx(Ke,{agent:t,home:e})]})}function Ke(t){const e=$.c(26),{agent:s,home:r}=t;let n,l,o,c,a,d,m;if(e[0]!==s||e[1]!==r){const h=xe(s.metadata?.ui);let g;e[9]!==s.connections?(g=(s.connections??[]).map(Fs).sort(),e[9]=s.connections,e[10]=g):g=e[10];const y=g;l=s.metadata?.ui?.homePrompts,m="border-t border-border px-3 py-2 flex flex-col gap-3",n=Ws,o=s,c=r,a=y,d=new Set(h.map(Us)),e[0]=s,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=c,e[6]=a,e[7]=d,e[8]=m}else n=e[2],l=e[3],o=e[4],c=e[5],a=e[6],d=e[7],m=e[8];let u;e[11]!==n||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==d?(u=i.jsx(n,{agent:o,home:c,connectionIds:a,pinnedResourceUris:d}),e[11]=n,e[12]=o,e[13]=c,e[14]=a,e[15]=d,e[16]=u):u=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Qs,{}),e[17]=f):f=e[17];const x=l??null;let b;e[18]!==s||e[19]!==r||e[20]!==x?(b=i.jsx(M.Suspense,{fallback:f,children:i.jsx(Ks,{agent:s,home:r,curated:x})}),e[18]=s,e[19]=r,e[20]=x,e[21]=b):b=e[21];let p;return e[22]!==m||e[23]!==u||e[24]!==b?(p=i.jsxs("div",{className:m,children:[u,b]}),e[22]=m,e[23]=u,e[24]=b,e[25]=p):p=e[25],p}function Us(t){return t.resourceUri}function Fs(t){return t.connection_id}function Qs(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex flex-col gap-2 py-1",children:[i.jsx(D,{className:"h-8 w-full"}),i.jsx(D,{className:"h-8 w-2/3"})]}),t[0]=e):e=t[0],e}function Ws({agent:t,home:e,connectionIds:s,pinnedResourceUris:r}){const{org:n}=V(),l=ee({connectionId:Le,orgId:n.id,orgSlug:n.slug}),{data:o,isLoading:c}=le({queryKey:oe.projectConnectionDetails(t.id,s),enabled:s.length>0,queryFn:async()=>(await Promise.all(s.map(async d=>{try{const m=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}}),{item:u}=is(m),f=(u?.tools??[]).flatMap(x=>{const b=es(x._meta);return b?[{name:x.name,description:x.description,resourceUri:b}]:[]});return{id:d,title:u?.title??d,icon:u?.icon??null,uiTools:f}}catch{return{id:d,title:d,icon:null,uiTools:[]}}}))).filter(d=>d.uiTools.length>0)});return s.length===0?null:c?i.jsxs("div",{className:"flex flex-col gap-1 py-0.5",children:[i.jsx(D,{className:"h-7 w-full"}),i.jsx(D,{className:"h-7 w-2/3"})]}):!o||o.length===0?null:i.jsx("div",{className:"flex flex-col gap-0.5",children:o.map(a=>a.uiTools.map(d=>i.jsx(qs,{agent:t,home:e,connection:a,tool:d,isPinned:r.has(d.resourceUri)},`${a.id}:${d.name}`)))})}function qs({agent:t,home:e,connection:s,tool:r,isPinned:n}){const[l,o]=M.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${te}) — remove an agent first`);return}o(!0);try{const a=xe(t.metadata?.ui),d=n?a.filter(u=>u.resourceUri!==r.resourceUri):[...a,{connectionId:s.id,resourceUri:r.resourceUri}],m={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:d}};await e.saveAgentMetadata(t,m)}catch(a){console.error("[home-tiles] failed to toggle tile",a),W.error("Couldn't update home — please try again.")}finally{o(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx(ss,{icon:s.icon,name:s.title,size:"xs"}),i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:Qe(r.name)}),i.jsx(Xe,{isPinned:n,submitting:l,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Xe(t){const e=$.c(11),{isPinned:s,submitting:r,onClick:n,label:l}=t,o=s?"text-muted-foreground hover:bg-destructive/10 hover:text-destructive":"bg-foreground text-background hover:opacity-90";let c;e[0]!==o?(c=K("inline-flex size-7 shrink-0 items-center justify-center rounded-md text-xs transition-colors disabled:opacity-50 disabled:cursor-progress",o),e[0]=o,e[1]=c):c=e[1];let a;e[2]!==s||e[3]!==r?(a=r?i.jsx(Me,{size:12,className:"animate-spin"}):s?i.jsx(Ct,{size:14}):i.jsx(be,{size:14}),e[2]=s,e[3]=r,e[4]=a):a=e[4];let d;return e[5]!==l||e[6]!==n||e[7]!==r||e[8]!==c||e[9]!==a?(d=i.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":l,title:l,className:c,children:a}),e[5]=l,e[6]=n,e[7]=r,e[8]=c,e[9]=a,e[10]=d):d=e[10],d}function Ks(t){const e=$.c(32),{agent:s,home:r,curated:n}=t,{org:l}=V();let o;e[0]!==s.id||e[1]!==l.id||e[2]!==l.slug?(o={connectionId:s.id,orgId:l.id,orgSlug:l.slug},e[0]=s.id,e[1]=l.id,e[2]=l.slug,e[3]=o):o=e[3];const c=ee(o);let a;e[4]!==s.id||e[5]!==l.id?(a=oe.agentPrompts(l.id,s.id),e[4]=s.id,e[5]=l.id,e[6]=a):a=e[6];let d;e[7]!==c?(d=async()=>{const{prompts:w}=await c.listPrompts();return w.map(Zs)},e[7]=c,e[8]=d):d=e[8];let m;e[9]!==a||e[10]!==d?(m={queryKey:a,queryFn:d,staleTime:3e4,retry:!1},e[9]=a,e[10]=d,e[11]=m):m=e[11];const{data:u,isLoading:f,error:x}=le(m),b=ye(l.slug);let p,h;if(e[12]!==s.id||e[13]!==u||e[14]!==b.prompts){let w;e[17]!==s.id?(w=S=>S.agentId===s.id&&S.promptName,e[17]=s.id,e[18]=w):w=e[18],p=b.prompts.filter(w).map(Vs);let N;e[19]!==u?(N=u??[],e[19]=u,e[20]=N):N=e[20],h=[...N];for(const S of p)h.some(C=>C.name===S.name)||h.push(S);e[12]=s.id,e[13]=u,e[14]=b.prompts,e[15]=p,e[16]=h}else p=e[15],h=e[16];if(f&&p.length===0){let w;return e[21]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(D,{className:"h-7 w-full"}),i.jsx(D,{className:"h-7 w-2/3"})]}),e[21]=w):w=e[21],w}if(x&&p.length===0)return console.error("[home-tiles] listPrompts failed for agent",s.id,x),null;if(h.length===0)return null;let g;e[22]!==n||e[23]!==h?(g=n??h.map(Gs),e[22]=n,e[23]=h,e[24]=g):g=e[24];let y;e[25]!==g?(y=new Set(g),e[25]=g,e[26]=y):y=e[26];const j=y;let v;return e[27]!==s||e[28]!==r||e[29]!==h||e[30]!==j?(v=i.jsx("div",{className:"flex flex-col gap-0.5",children:h.map(w=>i.jsx(Js,{agent:s,home:r,prompt:w,allPromptNames:h.map(Xs),isPinned:j.has(w.name)},w.name))}),e[27]=s,e[28]=r,e[29]=h,e[30]=j,e[31]=v):v=e[31],v}function Xs(t){return t.name}function Gs(t){return t.name}function Vs(t){return{name:t.promptName,title:t.title,description:t.description}}function Zs(t){return{name:t.name,title:t.title,description:t.description}}function Js({agent:t,home:e,prompt:s,allPromptNames:r,isPinned:n}){const[l,o]=M.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${te}) — remove an agent first`);return}o(!0);try{const a=t.metadata?.ui?.homePrompts;let d;Array.isArray(a)?d=n?a.filter(u=>u!==s.name):[...a,s.name]:d=n?r.filter(u=>u!==s.name):r;const m={...t.metadata??{},ui:{...t.metadata?.ui??{},homePrompts:d}};await e.saveAgentMetadata(t,m)}catch(a){console.error("[home-tiles] failed to toggle prompt",a),W.error("Couldn't update home — please try again.")}finally{o(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:s.title??Qe(s.name)}),i.jsx(Xe,{isPinned:n,submitting:l,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Ys(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex flex-col gap-2 p-2",children:Array.from({length:4},ei)}),t[0]=e):e=t[0],e}function ei(t,e){return i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border p-2.5",children:[i.jsx(D,{className:"size-8 rounded-md"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(D,{className:"h-3 w-1/2"}),i.jsx(D,{className:"h-2.5 w-1/3"})]})]},e)}const J=1,Ge=`home-board.layout.v${J}`;function Ve(t){return`home-board.layout.v${J}.${t}`}const Ze={version:J,tiles:{},hidden:[]};function ue(t){return!t||t.version!==J?Ze:{version:J,tiles:t.tiles??{},hidden:Array.isArray(t.hidden)?t.hidden:[]}}function ti(t){return Object.keys(t.tiles).length>0||t.hidden.length>0}function si(t){try{const e=localStorage.getItem(Ve(t));return e?ue(JSON.parse(e)):void 0}catch{return}}function _e(t,e){try{localStorage.setItem(Ve(t),JSON.stringify(e))}catch{}}async function Ce(t,e){if(!(await fetch(`/api/${t}/kv/${Ge}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save board layout")}function ii(t){const e=$.c(24),s=pe();let r;e[0]!==t?(r=oe.boardLayout(t),e[0]=t,e[1]=r):r=e[1];const n=r;let l;e[2]!==t?(l=si(t),e[2]=t,e[3]=l):l=e[3];const o=l;let c;e[4]!==o||e[5]!==t?(c=async()=>{const g=await fetch(`/api/${t}/kv/${Ge}`);if(g.status===404)return o&&ti(o)?(await Ce(t,o),o):Ze;if(!g.ok)throw new Error("Failed to load board layout");const y=await g.json(),j=ue(y.value);return _e(t,j),j},e[4]=o,e[5]=t,e[6]=c):c=e[6];let a;e[7]!==o||e[8]!==n||e[9]!==c?(a={queryKey:n,queryFn:c,initialData:o,staleTime:0,refetchOnWindowFocus:!1},e[7]=o,e[8]=n,e[9]=c,e[10]=a):a=e[10];const{data:d,isLoading:m}=le(a);let u;e[11]!==t?(u={mutationFn:g=>Ce(t,g)},e[11]=t,e[12]=u):u=e[12];const f=ht(u);let x;e[13]!==f||e[14]!==t||e[15]!==s||e[16]!==n?(x=g=>{_e(t,g),s.setQueryData(n,g),f.mutate(g)},e[13]=f,e[14]=t,e[15]=s,e[16]=n,e[17]=x):x=e[17];const b=x;let p;e[18]!==d?(p=ue(d),e[18]=d,e[19]=p):p=e[19];let h;return e[20]!==m||e[21]!==b||e[22]!==p?(h={layout:p,isLoading:m,save:b},e[20]=m,e[21]=b,e[22]=p,e[23]=h):h=e[23],h}const Je=M.createContext(null);function ni(t){const e=$.c(24),{children:s}=t,{org:r}=V(),n=ii(r.slug),[l,o]=M.useState(!1),[c,a]=M.useState(null);let d;e[0]!==n.layout?(d=()=>{a(n.layout),o(!0)},e[0]=n.layout,e[1]=d):d=e[1];const m=d;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{a(null),o(!1)},e[2]=u):u=e[2];const f=u;let x;e[3]!==c||e[4]!==n?(x=()=>{c&&n.save(c),a(null),o(!1)},e[3]=c,e[4]=n,e[5]=x):x=e[5];const b=x,p=l&&c!==null,h=p?c:n.layout;let g;e[6]!==c||e[7]!==p||e[8]!==n.layout?(g=p?JSON.stringify(c)!==JSON.stringify(n.layout):!1,e[6]=c,e[7]=p,e[8]=n.layout,e[9]=g):g=e[9];const y=g;let j;e[10]!==l||e[11]!==n?(j=S=>{l?a(S):n.save(S)},e[10]=l,e[11]=n,e[12]=j):j=e[12];const v=j;let w;e[13]!==v||e[14]!==m||e[15]!==y||e[16]!==l||e[17]!==h||e[18]!==b||e[19]!==n.isLoading?(w={isEditMode:l,enter:m,cancel:f,save:b,hasChanges:y,layout:h,isLayoutLoading:n.isLoading,commitLayout:v},e[13]=v,e[14]=m,e[15]=y,e[16]=l,e[17]=h,e[18]=b,e[19]=n.isLoading,e[20]=w):w=e[20];let N;return e[21]!==s||e[22]!==w?(N=i.jsx(Je.Provider,{value:w,children:s}),e[21]=s,e[22]=w,e[23]=N):N=e[23],N}function Ye(){const t=M.useContext(Je);if(!t)throw new Error("useHomeEdit must be used within a HomeEditProvider");return t}function ri({agentId:t}){const{org:e,locator:s}=V(),r=ee({connectionId:t,orgId:e.id,orgSlug:e.slug}),{create:n}=ds(),{setTaskId:l}=Wt(),[o,c]=M.useState(null),[a,d]=M.useState(!1),m=M.useRef(!1),u=async(h,g)=>{if(!r){W.error("MCP client not available");return}if(!m.current){m.current=!0,d(!0);try{const y=await cs(r,h.name,g),j={type:"doc",content:[{type:"paragraph",content:[rs({id:h.name,name:os(h.name,ls(h._meta)),metadata:y.messages,char:"/",kind:"prompt",args:g}),{type:"text",text:" "}]}]},v=crypto.randomUUID();ms(sessionStorage,s,v,{tiptapDoc:j}),await n({id:v,virtual_mcp_id:t}),l(v,t,{autosend:!0})}catch(y){console.error("[start-thread-from-prompt] failed",y),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},f=async h=>{if(!m.current){if(h.arguments&&h.arguments.length>0){c(h);return}await u(h)}},x=async h=>{if(!o)return;const g=o;c(null),await u(g,h)};return{start:f,startBlank:async()=>{if(!m.current){m.current=!0,d(!0);try{const h=crypto.randomUUID();await n({id:h,virtual_mcp_id:t}),l(h,t)}catch(h){console.error("[start-thread-from-prompt] startBlank failed",h),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},dialog:i.jsx(ns,{prompt:o,setPrompt:h=>c(h),onSubmit:x}),dialogPrompt:o,starting:a}}const G=4,X=100,Te=12,ie={S:{w:1,h:1},M:{w:1,h:2},T:{w:1,h:3},L:{w:2,h:1},XL:{w:2,h:2},LT:{w:2,h:3},XLT:{w:2,h:4},XXLT:{w:2,h:5},W:{w:4,h:1},WT:{w:4,h:3}},oi={S:"Small",M:"Tall",T:"Column",L:"Wide",XL:"Large",LT:"Showcase",XLT:"Display",XXLT:"Tower",W:"Full width",WT:"Hero"},Ee=["S","M","T","L","XL","LT","XLT","XXLT","W","WT"],li=ie.XL;class fe extends M.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,message:e instanceof Error?e.message:"Unknown error"}}componentDidCatch(e,s){console.error("[home-tiles] tile crashed:",e,s.componentStack)}render(){return this.state.hasError?i.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-4 text-center",children:[i.jsx("span",{className:"flex size-8 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:i.jsx(pt,{size:16})}),i.jsx("p",{className:"text-sm font-medium text-foreground",children:"This tile crashed"}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:this.state.message??"Something went wrong rendering this tile."})]}):this.props.children}}function ai(t){const e=$.c(72),{tiles:s,isEditMode:r,renderTile:n,onMove:l,onResize:o,onRemove:c}=t,a=ge(),d=M.useRef(null),[m,u]=M.useState(null),[f,x]=M.useState(null);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={activationConstraint:{distance:4}},e[0]=b):b=e[0];const p=Oe(re(Pe,b),re(Re)),h=s.reduce(ci,0),g=r?Math.max(h+2,4):Math.max(h,1);let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const A=d.current?.getBoundingClientRect();return A?{cellWidth:A.width/G,cellHeight:X}:null},e[1]=y):y=e[1];const j=y;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=A=>{u(String(A.active.id)),x(j())},e[2]=v):v=e[2];const w=v;let N;e[3]!==f||e[4]!==l||e[5]!==s?(N=A=>{const F=String(A.active.id),P=f??j();if(u(null),x(null),!P||P.cellWidth<=0)return;const z=s.find(q=>q.id===F);if(!z)return;const H=Math.round(A.delta.x/P.cellWidth),B=Math.round(A.delta.y/P.cellHeight);H===0&&B===0||l(F,{x:z.x+H,y:z.y+B})},e[3]=f,e[4]=l,e[5]=s,e[6]=N):N=e[6];const S=N;if(a){let A;if(e[7]!==n||e[8]!==s){let P;e[10]!==n?(P=z=>i.jsx("div",{className:"bg-card card-shadow rounded-2xl overflow-hidden",style:{minHeight:X},children:i.jsx(fe,{children:n(z)})},z.id),e[10]=n,e[11]=P):P=e[11],A=s.map(P),e[7]=n,e[8]=s,e[9]=A}else A=e[9];let F;return e[12]!==A?(F=i.jsx("div",{className:"flex flex-col gap-3 px-4 pb-8",children:A}),e[12]=A,e[13]=F):F=e[13],F}let C,_,T,I,E,k,L,U,O;if(e[14]!==m||e[15]!==f||e[16]!==r||e[17]!==S||e[18]!==c||e[19]!==o||e[20]!==n||e[21]!==p||e[22]!==s||e[23]!==g){const A=m?s.find(Z=>Z.id===m):null;_=De,U=p,O=w,T=S;const F=g*X,P=r?X*4:X;let z;e[33]!==F||e[34]!==P?(z={height:F,minHeight:P},e[33]=F,e[34]=P,e[35]=z):z=e[35];let H;e[36]!==r||e[37]!==s||e[38]!==g?(H=r&&i.jsx(di,{rows:g,tiles:s}),e[36]=r,e[37]=s,e[38]=g,e[39]=H):H=e[39];let B;if(e[40]!==m||e[41]!==r||e[42]!==c||e[43]!==o||e[44]!==n||e[45]!==s){let Z;e[47]!==m||e[48]!==r||e[49]!==c||e[50]!==o||e[51]!==n?(Z=se=>i.jsx(ui,{tile:se,isEditMode:r,isDragging:m===se.id,onResize:o,onRemove:c,children:n(se)},se.id),e[47]=m,e[48]=r,e[49]=c,e[50]=o,e[51]=n,e[52]=Z):Z=e[52],B=s.map(Z),e[40]=m,e[41]=r,e[42]=c,e[43]=o,e[44]=n,e[45]=s,e[46]=B}else B=e[46];e[53]!==z||e[54]!==H||e[55]!==B?(I=i.jsxs("div",{ref:d,className:"relative w-full",style:z,children:[H,B]}),e[53]=z,e[54]=H,e[55]=B,e[56]=I):I=e[56],C=Ut,E=null;const q=A&&f?A.w*f.cellWidth-Te:void 0,ae=A&&f?A.h*f.cellHeight-Te:void 0;e[57]!==q||e[58]!==ae?(k={width:q,height:ae},e[57]=q,e[58]=ae,e[59]=k):k=e[59],L=A&&i.jsx("div",{className:"bg-card card-shadow rounded-2xl shadow-2xl ring-2 ring-primary/40 h-full overflow-hidden opacity-95",children:i.jsx(fe,{children:n(A)})}),e[14]=m,e[15]=f,e[16]=r,e[17]=S,e[18]=c,e[19]=o,e[20]=n,e[21]=p,e[22]=s,e[23]=g,e[24]=C,e[25]=_,e[26]=T,e[27]=I,e[28]=E,e[29]=k,e[30]=L,e[31]=U,e[32]=O}else C=e[24],_=e[25],T=e[26],I=e[27],E=e[28],k=e[29],L=e[30],U=e[31],O=e[32];let R;e[60]!==C||e[61]!==E||e[62]!==k||e[63]!==L?(R=i.jsx(C,{dropAnimation:E,style:k,children:L}),e[60]=C,e[61]=E,e[62]=k,e[63]=L,e[64]=R):R=e[64];let Q;return e[65]!==_||e[66]!==T||e[67]!==I||e[68]!==R||e[69]!==U||e[70]!==O?(Q=i.jsxs(_,{sensors:U,onDragStart:O,onDragEnd:T,children:[I,R]}),e[65]=_,e[66]=T,e[67]=I,e[68]=R,e[69]=U,e[70]=O,e[71]=Q):Q=e[71],Q}function ci(t,e){return Math.max(t,e.y+e.h)}function di(t){const e=$.c(7),{rows:s,tiles:r}=t;let n;e[0]!==r?(n=(a,d)=>r.some(m=>a>=m.x&&a<m.x+m.w&&d>=m.y&&d<m.y+m.h),e[0]=r,e[1]=n):n=e[1];const l=n;let o;if(e[2]!==l||e[3]!==s){o=[];for(let a=0;a<s;a++)for(let d=0;d<G;d++)l(d,a)||o.push({x:d,y:a});e[2]=l,e[3]=s,e[4]=o}else o=e[4];let c;return e[5]!==o?(c=i.jsx("div",{className:"absolute inset-0 pointer-events-none",children:o.map(mi)}),e[5]=o,e[6]=c):c=e[6],c}function mi(t){return i.jsx("div",{className:"absolute p-1",style:{left:`${t.x/G*100}%`,top:t.y*X,width:`${1/G*100}%`,height:X},children:i.jsx("div",{className:"h-full w-full rounded-2xl border border-dashed border-border/60"})},`${t.x}-${t.y}`)}function ui(t){const e=$.c(31),{tile:s,isEditMode:r,isDragging:n,onResize:l,onRemove:o,children:c}=t,a=!r;let d;e[0]!==a||e[1]!==s.id?(d={id:s.id,disabled:a},e[0]=a,e[1]=s.id,e[2]=d):d=e[2];const{setNodeRef:m,attributes:u,listeners:f,isDragging:x}=Ft(d),b=`${s.x/G*100}%`,p=`${s.w/G*100}%`,h=s.y*X,g=s.h*X,y=x||n,j=!y&&"transition-[left,top,width,height,opacity] duration-200 ease-out",v=y&&"opacity-30";let w;e[3]!==j||e[4]!==v?(w=K("absolute p-1 will-change-[left,top,width,height,opacity]",j,v),e[3]=j,e[4]=v,e[5]=w):w=e[5];let N;e[6]!==g||e[7]!==b||e[8]!==h||e[9]!==p?(N={left:b,top:h,width:p,height:g},e[6]=g,e[7]=b,e[8]=h,e[9]=p,e[10]=N):N=e[10];const S=r&&"outline outline-1 outline-transparent hover:outline-primary/40";let C;e[11]!==S?(C=K("relative h-full bg-card card-shadow rounded-2xl overflow-hidden",S),e[11]=S,e[12]=C):C=e[12];let _;e[13]!==u||e[14]!==r||e[15]!==f||e[16]!==o||e[17]!==l||e[18]!==s?(_=r&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",...u,...f,className:"absolute top-2 left-2 z-10 flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted cursor-grab active:cursor-grabbing","aria-label":"Drag tile",children:i.jsx(Fe,{size:16})}),i.jsx("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1",children:i.jsx(fi,{tile:s,onResize:l,onRemove:o})})]}),e[13]=u,e[14]=r,e[15]=f,e[16]=o,e[17]=l,e[18]=s,e[19]=_):_=e[19];let T;e[20]!==c?(T=i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(fe,{children:c})}),e[20]=c,e[21]=T):T=e[21];let I;e[22]!==T||e[23]!==C||e[24]!==_?(I=i.jsxs("div",{className:C,children:[_,T]}),e[22]=T,e[23]=C,e[24]=_,e[25]=I):I=e[25];let E;return e[26]!==m||e[27]!==I||e[28]!==w||e[29]!==N?(E=i.jsx("div",{ref:m,className:w,style:N,children:I}),e[26]=m,e[27]=I,e[28]=w,e[29]=N,e[30]=E):E=e[30],E}function fi(t){const e=$.c(43),{tile:s,onResize:r,onRemove:n}=t,l=s.minW??1,o=s.minH??1;let c,a,d,m,u,f,x;if(e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==s.h||e[4]!==s.id||e[5]!==s.w){let v;e[13]!==o||e[14]!==l?(v=_=>{const T=ie[_];return T.w>=l&&T.h>=o},e[13]=o,e[14]=l,e[15]=v):v=e[15];const w=Ee.filter(v);let N;e[16]!==s.h||e[17]!==s.w?(N=(()=>{for(const T of Ee){const I=ie[T];if(I.w===s.w&&I.h===s.h)return T}return null})(),e[16]=s.h,e[17]=s.w,e[18]=N):N=e[18];const S=N;a=us,e[19]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(fs,{asChild:!0,children:i.jsx("button",{type:"button",className:"flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Tile options",children:i.jsx(Tt,{size:16})})}),e[19]=x):x=e[19],c=hs,d="end",m="w-44",e[20]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(ps,{children:"Size"}),e[20]=u):u=e[20];let C;e[21]!==S||e[22]!==r||e[23]!==s.id?(C=_=>{const T=ie[_];return i.jsxs(Ne,{onSelect:()=>r(s.id,T),className:"flex items-center justify-between",children:[i.jsx("span",{children:oi[_]}),i.jsx("span",{className:"text-xs text-muted-foreground",children:S===_?"✓":`${T.w}×${T.h}`})]},_)},e[21]=S,e[22]=r,e[23]=s.id,e[24]=C):C=e[24],f=w.map(C),e[0]=o,e[1]=l,e[2]=r,e[3]=s.h,e[4]=s.id,e[5]=s.w,e[6]=c,e[7]=a,e[8]=d,e[9]=m,e[10]=u,e[11]=f,e[12]=x}else c=e[6],a=e[7],d=e[8],m=e[9],u=e[10],f=e[11],x=e[12];let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(xs,{}),e[25]=b):b=e[25];let p;e[26]!==n||e[27]!==s.id?(p=()=>n(s.id),e[26]=n,e[27]=s.id,e[28]=p):p=e[28];let h;e[29]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(gs,{size:14,className:"mr-2"}),e[29]=h):h=e[29];let g;e[30]!==p?(g=i.jsxs(Ne,{onSelect:p,className:"text-destructive focus:text-destructive",children:[h,"Remove tile"]}),e[30]=p,e[31]=g):g=e[31];let y;e[32]!==c||e[33]!==d||e[34]!==m||e[35]!==u||e[36]!==f||e[37]!==g?(y=i.jsxs(c,{align:d,className:m,children:[u,f,b,g]}),e[32]=c,e[33]=d,e[34]=m,e[35]=u,e[36]=f,e[37]=g,e[38]=y):y=e[38];let j;return e[39]!==a||e[40]!==y||e[41]!==x?(j=i.jsxs(a,{children:[x,y]}),e[39]=a,e[40]=y,e[41]=x,e[42]=j):j=e[42],j}function hi(t,e,s){return t.some(r=>e>=r.x&&e<r.x+r.w&&s>=r.y&&s<r.y+r.h)}function he(t,e,s){for(let r=0;r<100;r++)for(let n=0;n<=G-e;n++){let l=!0;for(let o=0;o<s&&l;o++)for(let c=0;c<e&&l;c++)hi(t,n+c,r+o)&&(l=!1);if(l)return{x:n,y:r}}return{x:0,y:0}}function ce(t,e,s={w:1,h:1}){const r=Math.max(s.w,Math.min(G,t)),n=Math.max(s.h,Math.min(6,e));return{w:r,h:n}}function de(t,e,s){const r=Math.max(0,Math.min(G-s,t)),n=Math.max(0,e);return{x:r,y:n}}function pi(t,e,s){const r=t.find(a=>a.id===e);if(!r)return t;const n=t.filter(a=>a.id!==e),l=n.find(a=>s.x>=a.x&&s.x<a.x+a.w&&s.y>=a.y&&s.y<a.y+a.h);if(l&&l.w===r.w&&l.h===r.h)return t.map(a=>a.id===e?{...a,x:l.x,y:l.y}:a.id===l.id?{...a,x:r.x,y:r.y}:a);const c=[{...r,x:s.x,y:s.y}];for(const a of n){const d=he(c,a.w,a.h);c.push({...a,x:d.x,y:d.y})}return c}function xi(t){const e=$.c(35),{layout:s,isLayoutLoading:r,commitLayout:n}=Ye();let l;e[0]!==s.hidden?(l=new Set(s.hidden),e[0]=s.hidden,e[1]=l):l=e[1];const o=l;let c,a;if(e[2]!==t||e[3]!==o||e[4]!==s.tiles){a=[];let y;e[7]!==o?(y=v=>v.pinned||!o.has(v.id),e[7]=o,e[8]=y):y=e[8];const j=t.filter(y);c=new Map;for(const v of t)v.minSize&&c.set(v.id,v.minSize);for(const v of j){const w=s.tiles[v.id];if(!w)continue;const N=c.get(v.id),{w:S,h:C}=ce(w.w,w.h,N),{x:_,y:T}=de(w.x,w.y,S);a.push({id:v.id,x:_,y:T,w:S,h:C,minW:N?.w,minH:N?.h})}for(const v of j){if(a.some(T=>T.id===v.id))continue;const w=v.defaultSize??li,N=c.get(v.id),{w:S,h:C}=ce(w.w,w.h,N),_=he(a,S,C);a.push({id:v.id,x:_.x,y:_.y,w:S,h:C,minW:N?.w,minH:N?.h})}e[2]=t,e[3]=o,e[4]=s.tiles,e[5]=c,e[6]=a}else c=e[5],a=e[6];let d;e[9]!==t?(d=new Set(t.map(gi)),e[9]=t,e[10]=d):d=e[10];const m=d;let u;e[11]!==m||e[12]!==n?(u=(y,j)=>{const v={};for(const w of y)v[w.id]={x:w.x,y:w.y,w:w.w,h:w.h};n({version:J,tiles:v,hidden:j.filter(w=>m.has(w))})},e[11]=m,e[12]=n,e[13]=u):u=e[13];const f=u;let x;e[14]!==a?(x={visible:a},e[14]=a,e[15]=x):x=e[15];let b;e[16]!==f||e[17]!==s||e[18]!==a?(b=(y,j)=>{const v=a.find(S=>S.id===y);if(!v)return;const w=de(j.x,j.y,v.w);if(w.x===v.x&&w.y===v.y)return;const N=pi(a,y,w);f(N,s.hidden)},e[16]=f,e[17]=s,e[18]=a,e[19]=b):b=e[19];let p;e[20]!==f||e[21]!==s||e[22]!==c||e[23]!==a?(p=(y,j)=>{const v=a.find(I=>I.id===y);if(!v)return;const w=c.get(y),{w:N,h:S}=ce(j.w,j.h,w);if(N===v.w&&S===v.h)return;const C={...v,w:N,h:S,x:de(v.x,v.y,N).x},_=a.filter(I=>I.id!==y),T=[C];for(const I of _){const E=he(T,I.w,I.h);T.push({...I,x:E.x,y:E.y})}f(T,s.hidden)},e[20]=f,e[21]=s,e[22]=c,e[23]=a,e[24]=p):p=e[24];let h;e[25]!==f||e[26]!==s||e[27]!==a?(h=y=>{const j=a.filter(v=>v.id!==y);f(j,Array.from(new Set([...s.hidden,y])))},e[25]=f,e[26]=s,e[27]=a,e[28]=h):h=e[28];let g;return e[29]!==r||e[30]!==x||e[31]!==b||e[32]!==p||e[33]!==h?(g={snapshot:x,isLoading:r,moveTile:b,resizeTile:p,hideTile:h},e[29]=r,e[30]=x,e[31]=b,e[32]=p,e[33]=h,e[34]=g):g=e[34],g}function gi(t){return t.id}const bi={w:2,h:4},yi={w:1,h:2},vi={w:1,h:1};function ji(t){return`prompt:${t.agentId}:${t.promptName||"blank"}`}function wi(t){return`tile:${t.agentId}:${t.resourceUri}`}function Ni(t){return t.promptName?t.agentName:t.description}function Si(t){return{name:t.promptName,title:t.title,description:t.description,arguments:t.arguments,_meta:t._meta}}function ve(t){const e=$.c(10);let s;e[0]!==t?(s={agentId:t},e[0]=t,e[1]=s):s=e[1];const{start:r,startBlank:n,dialog:l,starting:o}=ri(s);let c;e[2]!==r||e[3]!==n?(c=m=>{if(!m.promptName){n();return}r(Si(m))},e[2]=r,e[3]=n,e[4]=c):c=e[4];const a=c;let d;return e[5]!==l||e[6]!==a||e[7]!==n||e[8]!==o?(d={open:a,startBlank:n,dialog:l,starting:o},e[5]=l,e[6]=a,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function _i(t){const e=$.c(32),{entry:s,isEditMode:r}=t,{open:n,dialog:l,starting:o}=ve(s.agentId);let c;e[0]!==s||e[1]!==n?(c=()=>n(s),e[0]=s,e[1]=n,e[2]=c):c=e[2];const a=o||r,d=!r&&"cursor-pointer transition-colors hover:bg-accent/40",m=r&&"cursor-default pl-12",u=o&&"opacity-60";let f;e[3]!==d||e[4]!==m||e[5]!==u?(f=K("group/tile relative flex h-full w-full items-center gap-3 px-4 py-3 text-left bg-card",d,m,u),e[3]=d,e[4]=m,e[5]=u,e[6]=f):f=e[6];let x;e[7]!==s.agentIcon||e[8]!==s.agentName?(x=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[7]=s.agentIcon,e[8]=s.agentName,e[9]=x):x=e[9];let b;e[10]!==s.title?(b=i.jsx("div",{className:"line-clamp-2 text-sm font-medium text-foreground leading-snug",children:s.title}),e[10]=s.title,e[11]=b):b=e[11];let p;e[12]!==s?(p=Ni(s),e[12]=s,e[13]=p):p=e[13];let h;e[14]!==p?(h=i.jsx("div",{className:"truncate text-xs text-muted-foreground mt-0.5",children:p}),e[14]=p,e[15]=h):h=e[15];let g;e[16]!==h||e[17]!==b?(g=i.jsxs("div",{className:"min-w-0 flex-1",children:[b,h]}),e[16]=h,e[17]=b,e[18]=g):g=e[18];let y;e[19]!==r?(y=!r&&i.jsx(as,{size:16,className:"shrink-0 text-muted-foreground opacity-0 -translate-x-1 transition-all duration-200 group-hover/tile:opacity-100 group-hover/tile:translate-x-0","aria-hidden":!0}),e[19]=r,e[20]=y):y=e[20];let j;e[21]!==o||e[22]!==c||e[23]!==g||e[24]!==y||e[25]!==a||e[26]!==f||e[27]!==x?(j=i.jsxs("button",{type:"button",onClick:c,disabled:a,"aria-busy":o,className:f,children:[x,g,y]}),e[21]=o,e[22]=c,e[23]=g,e[24]=y,e[25]=a,e[26]=f,e[27]=x,e[28]=j):j=e[28];let v;return e[29]!==l||e[30]!==j?(v=i.jsxs(i.Fragment,{children:[j,l]}),e[29]=l,e[30]=j,e[31]=v):v=e[31],v}function Ci(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"mt-4 grid w-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:3},Ti)}),t[0]=e):e=t[0],e}function Ti(t,e){return i.jsxs("div",{className:"flex w-full items-center gap-3 rounded-2xl bg-card card-shadow px-3 py-2.5",children:[i.jsx(D,{className:"size-10 rounded-xl"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(D,{className:"h-3 w-2/3"}),i.jsx(D,{className:"h-2.5 w-1/3"})]})]},`chip-skeleton-${e}`)}function Ei(t){const e=$.c(49),{tile:s,prompts:r,isEditMode:n,tileWidth:l}=t,{org:o}=V(),{open:c,startBlank:a,dialog:d,starting:m}=ve(s.agentId);let u,f,x,b,p;if(e[0]!==n||e[1]!==c||e[2]!==o.id||e[3]!==o.slug||e[4]!==r||e[5]!==a||e[6]!==m||e[7]!==s||e[8]!==l){const y=r.filter(Ii);b="flex h-full w-full flex-col gap-3 p-3";let j;e[14]!==a?(j=()=>{a()},e[14]=a,e[15]=j):j=e[15];const v=m||n,w=n&&"pl-10 pr-10";let N;e[16]!==w?(N=K("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",w),e[16]=w,e[17]=N):N=e[17];let S;e[18]!==s.agentIcon||e[19]!==s.agentName?(S=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[18]=s.agentIcon,e[19]=s.agentName,e[20]=S):S=e[20];let C;e[21]!==s.agentName?(C=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[21]=s.agentName,e[22]=C):C=e[22];const _=n?"Drag to rearrange":"Open chat";let T;e[23]!==_?(T=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:_}),e[23]=_,e[24]=T):T=e[24];let I;e[25]!==C||e[26]!==T?(I=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[C,T]}),e[25]=C,e[26]=T,e[27]=I):I=e[27],e[28]!==m||e[29]!==S||e[30]!==I||e[31]!==j||e[32]!==v||e[33]!==N?(p=i.jsxs("button",{type:"button",onClick:j,disabled:v,"aria-busy":m,className:N,children:[S,I]}),e[28]=m,e[29]=S,e[30]=I,e[31]=j,e[32]=v,e[33]=N,e[34]=p):p=e[34],u="flex min-h-0 flex-1 gap-3 overflow-hidden";let E;e[35]===Symbol.for("react.memo_cache_sentinel")?(E=i.jsx($i,{}),e[35]=E):E=e[35],e[36]!==o.id||e[37]!==o.slug||e[38]!==s?(f=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden rounded-lg border border-border",children:i.jsx(M.Suspense,{fallback:E,children:i.jsx(ki,{tile:s,orgId:o.id,orgSlug:o.slug})})}),e[36]=o.id,e[37]=o.slug,e[38]=s,e[39]=f):f=e[39],x=y.length>0&&!n&&l>=2&&i.jsx("div",{className:"flex w-44 shrink-0 flex-col gap-2 overflow-hidden",children:y.map(k=>i.jsx("button",{type:"button",onClick:()=>c(k),disabled:m,className:"shrink-0 rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:k.title})},k.promptName))}),e[0]=n,e[1]=c,e[2]=o.id,e[3]=o.slug,e[4]=r,e[5]=a,e[6]=m,e[7]=s,e[8]=l,e[9]=u,e[10]=f,e[11]=x,e[12]=b,e[13]=p}else u=e[9],f=e[10],x=e[11],b=e[12],p=e[13];let h;e[40]!==u||e[41]!==f||e[42]!==x?(h=i.jsxs("div",{className:u,children:[f,x]}),e[40]=u,e[41]=f,e[42]=x,e[43]=h):h=e[43];let g;return e[44]!==d||e[45]!==b||e[46]!==p||e[47]!==h?(g=i.jsxs("div",{className:b,children:[p,h,d]}),e[44]=d,e[45]=b,e[46]=p,e[47]=h,e[48]=g):g=e[48],g}function Ii(t){return!!t.promptName}function ki(t){const e=$.c(12),{tile:s,orgId:r,orgSlug:n}=t;let l;e[0]!==r||e[1]!==n||e[2]!==s.connectionId?(l={connectionId:s.connectionId,orgId:r,orgSlug:n},e[0]=r,e[1]=n,e[2]=s.connectionId,e[3]=l):l=e[3];const o=ee(l),c=s.minHeight??200,a=s.maxHeight??4e3;let d;return e[4]!==o||e[5]!==r||e[6]!==n||e[7]!==c||e[8]!==a||e[9]!==s.connectionId||e[10]!==s.resourceUri?(d=i.jsx(ts,{resourceURI:s.resourceUri,orgId:r,orgSlug:n,connectionId:s.connectionId,client:o,displayMode:"fullscreen",minHeight:c,maxHeight:a,className:"h-full"}),e[4]=o,e[5]=r,e[6]=n,e[7]=c,e[8]=a,e[9]=s.connectionId,e[10]=s.resourceUri,e[11]=d):d=e[11],d}function $i(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex h-full w-full flex-col gap-2 p-4",children:[i.jsx(D,{className:"h-3 w-2/3"}),i.jsx(D,{className:"h-3 w-1/2"}),i.jsx(D,{className:"mt-1 h-full w-full rounded-md"})]}),t[0]=e):e=t[0],e}function Ai(t){const e=$.c(14),{icon:s,name:r}=t;let n;e[0]!==s||e[1]!==r?(n=i.jsx(Y,{icon:s,name:r,size:"sm+"}),e[0]=s,e[1]=r,e[2]=n):n=e[2];let l;e[3]!==r?(l=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:r}),e[3]=r,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Loading tile…"}),e[5]=o):o=e[5];let c;e[6]!==l?(c=i.jsxs("div",{className:"min-w-0 flex-1",children:[l,o]}),e[6]=l,e[7]=c):c=e[7];let a;e[8]!==n||e[9]!==c?(a=i.jsxs("div",{className:"flex items-center gap-2.5",children:[n,c]}),e[8]=n,e[9]=c,e[10]=a):a=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsxs("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[i.jsx(D,{className:"h-3 w-3/4"}),i.jsx(D,{className:"h-3 w-1/2"}),i.jsx(D,{className:"h-3 w-2/3"})]}),e[11]=d):d=e[11];let m;return e[12]!==a?(m=i.jsxs("div",{className:"flex h-full w-full flex-col gap-3 p-5 opacity-60",children:[a,d]}),e[12]=a,e[13]=m):m=e[13],m}function Mi(t){const e=$.c(33),{tile:s,prompts:r,isEditMode:n}=t,{open:l,startBlank:o,dialog:c,starting:a}=ve(s.agentId);let d,m,u;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==o||e[4]!==a||e[5]!==s.agentIcon||e[6]!==s.agentName){const x=r.filter(Li);d="flex h-full w-full flex-col gap-3 p-4";let b;e[10]!==o?(b=()=>{o()},e[10]=o,e[11]=b):b=e[11];const p=a||n,h=n&&"pl-10 pr-10";let g;e[12]!==h?(g=K("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",h),e[12]=h,e[13]=g):g=e[13];let y;e[14]!==s.agentIcon||e[15]!==s.agentName?(y=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[14]=s.agentIcon,e[15]=s.agentName,e[16]=y):y=e[16];let j;e[17]!==s.agentName?(j=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[17]=s.agentName,e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"UI unavailable — open chat"}),e[19]=v):v=e[19];let w;e[20]!==j?(w=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[j,v]}),e[20]=j,e[21]=w):w=e[21],e[22]!==w||e[23]!==b||e[24]!==p||e[25]!==g||e[26]!==y?(m=i.jsxs("button",{type:"button",onClick:b,disabled:p,className:g,children:[y,w]}),e[22]=w,e[23]=b,e[24]=p,e[25]=g,e[26]=y,e[27]=m):m=e[27],u=x.length>0&&!n&&i.jsx("div",{className:"grid grid-cols-1 gap-2 overflow-hidden sm:grid-cols-2",children:x.map(N=>i.jsx("button",{type:"button",onClick:()=>!n&&l(N),disabled:a,className:"rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:N.title})},N.promptName))}),e[0]=n,e[1]=l,e[2]=r,e[3]=o,e[4]=a,e[5]=s.agentIcon,e[6]=s.agentName,e[7]=d,e[8]=m,e[9]=u}else d=e[7],m=e[8],u=e[9];let f;return e[28]!==c||e[29]!==d||e[30]!==m||e[31]!==u?(f=i.jsxs("div",{className:d,children:[m,u,c]}),e[28]=c,e[29]=d,e[30]=m,e[31]=u,e[32]=f):f=e[32],f}function Li(t){return!!t.promptName}function et(t){const e=$.c(36),{isEditMode:s}=t,{org:r}=V(),{isLoading:n,prompts:l,tiles:o}=ye(r.slug),c=He()?.ids??[];let a;e[0]!==c?(a=new Set(c),e[0]=c,e[1]=a):a=e[1];const d=a,m=Be();let u;e[2]!==o?(u=new Set(o.map(Di)),e[2]=o,e[3]=u):u=e[3];const f=u;let x;if(e[4]!==l){x=new Map;for(const E of l){const k=x.get(E.agentId);k?k.push(E):x.set(E.agentId,[E])}e[4]=l,e[5]=x}else x=e[5];let b;if(e[6]!==l||e[7]!==f||e[8]!==o){let E;e[10]!==f?(E=L=>!f.has(L.agentId),e[10]=f,e[11]=E):E=e[11];const k=l.filter(E);b=[...o.map(Pi),...k.map(Ri)],e[6]=l,e[7]=f,e[8]=o,e[9]=b}else b=e[9];const p=b;let h;e[12]!==p?(h=new Map(p.map(Oi)),e[12]=p,e[13]=h):h=e[13];const g=h;let y;e[14]!==p||e[15]!==d?(y=p.map(E=>({id:E.id,defaultSize:E.kind==="tile"?bi:vi,minSize:E.kind==="tile"?yi:void 0,pinned:d.has(E.data.agentId)})),e[14]=p,e[15]=d,e[16]=y):y=e[16];const j=xi(y);let v;e[17]!==m?(v=E=>{m.apply(k=>k.filter(L=>L!==E)).catch(zi)},e[17]=m,e[18]=v):v=e[18];const w=v;let N;e[19]!==g||e[20]!==j||e[21]!==d||e[22]!==w?(N=E=>{const k=g.get(E);k&&d.has(k.data.agentId)?w(k.data.agentId):j.hideTile(E)},e[19]=g,e[20]=j,e[21]=d,e[22]=w,e[23]=N):N=e[23];const S=N;let C;e[24]!==g||e[25]!==s||e[26]!==x?(C=E=>{const k=g.get(E.id);if(!k)return null;if(k.kind==="tile"){const L=x.get(k.data.agentId)??[];return i.jsx(xt,{fallback:i.jsx(Mi,{tile:k.data,prompts:L,isEditMode:s}),children:i.jsx(M.Suspense,{fallback:i.jsx(Ai,{icon:k.data.agentIcon,name:k.data.agentName}),children:i.jsx(Ei,{tile:k.data,prompts:L,isEditMode:s,tileWidth:E.w})})})}return i.jsx(_i,{entry:k.data,isEditMode:s})},e[24]=g,e[25]=s,e[26]=x,e[27]=C):C=e[27];const _=C;if(n||j.isLoading){let E;return e[28]===Symbol.for("react.memo_cache_sentinel")?(E=i.jsx(Ci,{}),e[28]=E):E=e[28],E}if(j.snapshot.visible.length===0&&!s)return null;let I;return e[29]!==s||e[30]!==j.moveTile||e[31]!==j.resizeTile||e[32]!==j.snapshot.visible||e[33]!==S||e[34]!==_?(I=i.jsx("div",{className:"mt-4 flex w-full max-w-7xl flex-col gap-4",children:i.jsx(ai,{tiles:j.snapshot.visible,isEditMode:s,renderTile:_,onMove:j.moveTile,onResize:j.resizeTile,onRemove:S})}),e[29]=s,e[30]=j.moveTile,e[31]=j.resizeTile,e[32]=j.snapshot.visible,e[33]=S,e[34]=_,e[35]=I):I=e[35],I}function zi(){return W.error("Couldn't remove from home — please try again.")}function Oi(t){return[t.id,t]}function Ri(t){return{kind:"prompt",id:ji(t),data:t}}function Pi(t){return{kind:"tile",id:wi(t),data:t}}function Di(t){return t.agentId}function Hi(t){const e=$.c(2),{prompts:s,tiles:r}=ye(t),n=r.length>0||s.length>0;let l;return e[0]!==n?(l={hasVisibleTiles:n},e[0]=n,e[1]=l):l=e[1],l}const Ie=420,ke=305;function tt(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/bg-top-left.svg",alt:"",className:"absolute top-0 left-0 h-auto select-none opacity-80 dark:hidden",style:{width:Ie}}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("img",{src:"/home/bg-top-left-dark.svg",alt:"",className:"absolute top-0 left-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Ie}}),t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("img",{src:"/home/bg-bottom-right.svg",alt:"",className:"absolute bottom-0 right-0 h-auto select-none opacity-80 dark:hidden",style:{width:ke}}),t[2]=r):r=t[2];let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e,s,r,i.jsx("img",{src:"/home/bg-bottom-right-dark.svg",alt:"",className:"absolute bottom-0 right-0 hidden h-auto select-none opacity-80 dark:block",style:{width:ke}})]}),t[3]=n):n=t[3],n}function $e(){const t=$.c(33),{data:e}=gt.useSession(),{org:s}=V(),r=ge(),n=At(),{selectedVirtualMcp:l}=Mt();let o;t[0]!==s.id?(o=yt(s.id),t[0]=s.id,t[1]=o):o=t[1];const a=l??o;let d;t[2]!==s.slug?(d=qt(s.slug),t[2]=s.slug,t[3]=d):d=t[3],le(d);let m;t[4]!==s.id||t[5]!==s.slug?(m={connectionId:Le,orgId:s.id,orgSlug:s.slug},t[4]=s.id,t[5]=s.slug,t[6]=m):m=t[6];const u=ee(m);let f;t[7]!==s.id||t[8]!==u?(f=bs(u,s.id),t[7]=s.id,t[8]=u,t[9]=f):f=t[9];let x;t[10]!==s.id||t[11]!==u?(x=Qt(u,s.id),t[10]=s.id,t[11]=u,t[12]=x):x=t[12];let b;t[13]!==a.id||t[14]!==s.id||t[15]!==u?(b=wt(s.id,a.id,u),t[13]=a.id,t[14]=s.id,t[15]=u,t[16]=b):b=t[16];let p;t[17]!==f||t[18]!==x||t[19]!==b?(p={queries:[f,x,b]},t[17]=f,t[18]=x,t[19]=b,t[20]=p):p=t[20],Ss(p);const h=ys(),g=Nt(a.id),{hasDecoKey:y,isZeroBalance:j,isInitialFreeCredit:v,balanceDollars:w,hasOnlyDecoProvider:N}=It(),{hasVisibleTiles:S}=Hi(s.slug),C=kt(g?.metadata);if(h.length===0&&!(C&&$t(n))){let R;return t[21]===Symbol.for("react.memo_cache_sentinel")?(R=i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"min-h-full flex items-center justify-center px-4 py-10",children:i.jsx(Lt,{})})}),t[21]=R):R=t[21],R}let T;t[22]!==e?.user?.name?(T=e?.user?.name?.split(" ")[0]||"there",t[22]=e?.user?.name,t[23]=T):T=t[23];const I=T,E=y&&v&&w!=null,k=y&&j&&N;let L;t[24]!==w||t[25]!==E||t[26]!==k?(L=E?i.jsx(ne.CreditsEyebrow,{balanceDollars:w}):k?i.jsx(ne.NoCreditsEyebrow,{}):null,t[24]=w,t[25]=E,t[26]=k,t[27]=L):L=t[27];const U=L;let O;return t[28]!==U||t[29]!==S||t[30]!==r||t[31]!==I?(O=i.jsx(ni,{children:r?i.jsx(Bi,{eyebrow:U,userName:I}):i.jsx(Ui,{eyebrow:U,userName:I,hasVisibleTiles:S})}),t[28]=U,t[29]=S,t[30]=r,t[31]=I,t[32]=O):O=t[32],O}function Bi(t){const e=$.c(12),{eyebrow:s,userName:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(tt,{}),e[0]=n):n=e[0];let l;e[1]!==s?(l=s&&i.jsx("div",{className:"mb-4",children:s}),e[1]=s,e[2]=l):l=e[2];let o;e[3]!==r?(o=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",r,"?"]}),e[3]=r,e[4]=o):o=e[4];let c;e[5]!==l||e[6]!==o?(c=i.jsxs("div",{className:"relative flex flex-col items-center justify-center w-full pt-28 pb-8 px-4",children:[l,o]}),e[5]=l,e[6]=o,e[7]=c):c=e[7];let a;e[8]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative w-full flex flex-col gap-4 pb-8 px-4",children:i.jsx(ne.Input,{showConnectionsBanner:!0})}),e[8]=a):a=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("div",{className:"relative w-full px-4 pb-8",children:i.jsx(et,{isEditMode:!1})}),e[9]=d):d=e[9];let m;return e[10]!==c?(m=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center overflow-y-auto",children:[n,c,a,d]}),e[10]=c,e[11]=m):m=e[11],m}function Ui(t){const e=$.c(32),{eyebrow:s,userName:r,hasVisibleTiles:n}=t,{isEditMode:l,enter:o,save:c,cancel:a,hasChanges:d}=Ye(),[m,u]=M.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[0]=f):f=e[0];let x;e[1]!==a||e[2]!==o||e[3]!==d||e[4]!==l||e[5]!==c?(x=i.jsx(vs.Right,{children:i.jsx(Fi,{isEditMode:l,hasChanges:d,onEnter:o,onSave:c,onCancel:a,onAddTile:f})}),e[1]=a,e[2]=o,e[3]=d,e[4]=l,e[5]=c,e[6]=x):x=e[6];let b;e[7]!==m?(b=i.jsx(_s,{open:m,onOpenChange:u}),e[7]=m,e[8]=b):b=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(tt,{}),e[9]=p):p=e[9];const h=n||l?"pt-32":"flex-1 justify-center";let g;e[10]!==h?(g=K("relative flex flex-col items-center px-10 pb-4",h),e[10]=h,e[11]=g):g=e[11];let y;e[12]!==s?(y=s&&i.jsx("div",{className:"mb-4",children:s}),e[12]=s,e[13]=y):y=e[13];let j;e[14]!==r?(j=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",r,"?"]}),e[14]=r,e[15]=j):j=e[15];let v;e[16]!==y||e[17]!==j?(v=i.jsxs("div",{className:"text-center mb-10",children:[y,j]}),e[16]=y,e[17]=j,e[18]=v):v=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=i.jsxs("div",{className:"relative w-full",children:[i.jsx(Qi,{}),i.jsx(ne.Input,{showConnectionsBanner:!0})]}),e[19]=w):w=e[19];let N;e[20]!==v?(N=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[v,w]}),e[20]=v,e[21]=N):N=e[21];let S;e[22]!==l?(S=i.jsx("div",{className:"relative w-full mt-10 mx-auto max-w-[1280px] px-2 pb-16",children:i.jsx(et,{isEditMode:l})}),e[22]=l,e[23]=S):S=e[23];let C;e[24]!==N||e[25]!==S||e[26]!==g?(C=i.jsxs("div",{className:"flex-1 relative flex flex-col min-h-0",children:[p,i.jsx("div",{className:"flex-1 relative flex flex-col overflow-y-auto",children:i.jsxs("div",{className:g,children:[N,S]})})]}),e[24]=N,e[25]=S,e[26]=g,e[27]=C):C=e[27];let _;return e[28]!==C||e[29]!==x||e[30]!==b?(_=i.jsxs(i.Fragment,{children:[x,b,C]}),e[28]=C,e[29]=x,e[30]=b,e[31]=_):_=e[31],_}function Fi(t){const e=$.c(17),{isEditMode:s,hasChanges:r,onEnter:n,onSave:l,onCancel:o,onAddTile:c}=t;if(s){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(be,{size:14}),e[0]=m):m=e[0];let u;e[1]!==c?(u=i.jsxs("button",{type:"button",onClick:c,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Add a tile from any agent",children:[m,"Add tile"]}),e[1]=c,e[2]=u):u=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(ze,{size:14}),e[3]=f):f=e[3];let x;e[4]!==o?(x=i.jsxs(we,{size:"sm",variant:"ghost",onClick:o,className:"gap-1.5 h-7 text-xs",children:[f,"Cancel"]}),e[4]=o,e[5]=x):x=e[5];const b=!r;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(St,{size:14}),e[6]=p):p=e[6];let h;e[7]!==l||e[8]!==b?(h=i.jsxs(we,{size:"sm",onClick:l,disabled:b,className:"gap-1.5 h-7 text-xs",children:[p,"Save"]}),e[7]=l,e[8]=b,e[9]=h):h=e[9];let g;return e[10]!==u||e[11]!==x||e[12]!==h?(g=i.jsxs(i.Fragment,{children:[u,x,h]}),e[10]=u,e[11]=x,e[12]=h,e[13]=g):g=e[13],g}let a;e[14]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Et,{size:14}),e[14]=a):a=e[14];let d;return e[15]!==n?(d=i.jsxs("button",{type:"button",onClick:n,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Customize your home",children:[a,"Customize"]}),e[15]=n,e[16]=d):d=e[16],d}function Qi(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/capybara.png",alt:"","aria-hidden":!0,className:"pointer-events-none absolute -top-16 right-6 z-20 h-20 w-auto select-none"}),t[0]=e):e=t[0],e}function Zr(){const t=$.c(2);if(ge()){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx($e,{})}),t[0]=r):r=t[0],r}let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 pb-1 pr-1 pl-0 pt-0",children:i.jsx("div",{className:"h-full p-0.5 pt-0.25",children:i.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx($e,{})})})}),t[1]=s):s=t[1],s}export{Zr as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as k,j as o,p as T,r as N,O as D}from"./index-BfzqpoYd.js";import{u as z,S as E,a as I,b as L}from"./sidebar-B3S1MC-b.js";import{T as M,a as O,b as A,u as P}from"./tooltip-CC_mfaKY.js";import{S as $,a as W,b as B}from"./shell-route-loading-DQ0B9hX1.js";import{u as X,C as H}from"./chat-context-BIie9ysT.js";import{T as F}from"./tab-id-CjkvF5Bz.js";import{i as q}from"./Monitor01-BNXW6pu5.js";import{v as G,C as K}from"./connect-desktop-dialog-BeLm4wl6.js";import{T as Y,a as b}from"./toolbar-BIjePcgn.js";import{S as U,M as J}from"./shell-controls-DyDfxDen.js";import"./LayoutLeft-6fPyjOVd.js";import"./sheet-y2Nja_Ue.js";import"./X-DCWlm9Ta.js";import"./useRouterState-xsU2zFoM.js";import"./ZoomOut-CCPaeWry.js";import"./skeleton-thGJKlMg.js";import"./popover-B1xAxEac.js";import"./drawer-lSnonzW3.js";import"./SearchMd-z6b-QOmX.js";import"./Star01-q6EhXttt.js";import"./Plus-gXoAw_mX.js";import"./use-mcp-client-Brxiewn2.js";import"./use-virtual-mcp-DDTG_-f6.js";import"./use-collections-vRlJo8MD.js";import"./use-create-virtual-mcp-C88u5wPn.js";import"./use-navigate-to-agent-BRFls8tQ.js";import"./github-repo-picker-Dlio4Q6_.js";import"./use-connection-MP_sOdrQ.js";import"./dialog-nXKceTRB.js";import"./RefreshCcw01-DlKjMM-5.js";import"./collection-search-Bryj5VYk.js";import"./checkbox-DFFY_m2B.js";import"./Check-CSixRgqh.js";import"./agent-icon-Lc1AgwlE.js";import"./AlertCircle-B-p2hhbf.js";import"./Tool01-DXWYgeBe.js";import"./SwitchHorizontal01-__hAuhZa.js";import"./XCircle-CEKwTNMD.js";import"./ArrowUpRight-Bq-dJGgn.js";import"./ZapSquare-DSdwG_FE.js";import"./Users03-D5pU3_ql.js";import"./CheckCircle-CqLcOI7o.js";import"./ChevronDown-BptXi8Ef.js";import"./ChevronLeft-Bq6F--2K.js";import"./ChevronRight-CtziSifX.js";import"./ChevronUp-DChs66VU.js";import"./DotsVertical-DQ3UGDDE.js";import"./Container-DIwdobum.js";import"./Eye-DepFjUJE.js";import"./Globe01-BayTDYGC.js";import"./FilterLines-CIJgiiLT.js";import"./Palette-siqkt4cQ.js";import"./HardDrive-OwnJRrIS.js";import"./Stars02-DJ4Y5TfK.js";import"./Key01-CR8zfCdU.js";import"./LinkExternal01-B2YZgRTN.js";import"./Sun-CeFpMHQU.js";import"./Play-CBt0NeLA.js";import"./Settings02-C7YqxsZL.js";import"./Shield01-BT66FEMI.js";import"./Stars01-DcMeK1n0.js";import"./Trash01-B91-1KNk.js";import"./Upload01-CcwGyBRP.js";import"./User01-JR_76gHl.js";import"./Users01-BM2QLqUJ.js";import"./XClose-DhQ5V0ST.js";import"./Zap-BLBAeivN.js";import"./use-mcp-tools-DFeiBffX.js";import"./extract-connection-data-DxtHEsy3.js";import"./generate-id-DvX29Me7.js";import"./collections-B-UBhIxv.js";import"./shell-layout-D8qm1N5L.js";import"./avatar-3vQWE5Hu.js";import"./required-auth-layout-3IQyeREK.js";import"./use-organization-settings-DjvlRnDe.js";import"./use-org-sso-BWWAvGBF.js";import"./alert-dialog-DJLxSS_E.js";import"./form-BM4RuTjX.js";import"./label-zIig0cjv.js";import"./input-BGQcwAaL.js";import"./spinner-j70e5pPL.js";import"./index-DOW4VN4f.js";import"./sortable.esm-DYE94iJD.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-Dug8PvM2.js";import"./use-registry-connections-BQfixYFV.js";import"./useInfiniteQuery-BEouccKd.js";import"./infiniteQueryObserver-CvEVG_TM.js";import"./card-CeH_PUFE.js";import"./integration-icon-B-zr5uGs.js";import"./collection-tabs-Y3w8w2D4.js";import"./badge-DF6gVmsi.js";import"./select-DpYu937I.js";import"./textarea-Bo_ElpPh.js";import"./connection-form-helpers-Ce4ZXQGG.js";import"./use-infinite-scroll-BYw2UY-G.js";import"./useSuspenseInfiniteQuery-wDDb-pw7.js";import"./use-ai-providers-D2jZ5H5p.js";import"./command-KyGHPzm4.js";import"./index-CnLAq3ph.js";import"./use-org-auth-client-IT7XMFB9.js";import"./hover-card-DASEEDYA.js";import"./task-status-CgfEdw1R.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./decopilot-sse-pool-vfZK3kan.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function no(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{no as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e3 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e4 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e5 as Nt,e6 as es,o as Ys,v as Zs,e7 as en,e8 as tn}from"./index-RoHcRkq0.js";import{D as sn,F as nn,B as on}from"./index-BFIoANt_.js";import{h as De,i as rn,u as ae}from"./constants-DDZG6Edw.js";import{a as ts}from"./use-virtual-mcp-wf8itLFJ.js";import{M as Oe}from"./monaco-editor-BleU3J2F.js";import{b as ln,R as zt,a as cn}from"./resizable-tvU32_PL.js";import{B as le}from"./badge-Cosh8Jv6.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-DzGY5lz9.js";import{S as et}from"./spinner-CCf2Lbex.js";import{V as an}from"./view-mode-toggle-PpUBwSzB.js";import{ai as un,o as dn,i as fn,z as ss,aj as mn,a3 as pn,u as xn,ak as ns,a9 as hn,N as os,al as gn,am as bn,a5 as ft,an as jn}from"./agent-icon-atw8dEpB.js";import{i as rs}from"./Play-zcNTCzY3.js";import{b as Sn,a as yn,V as Ge}from"./layout-B9kVRgC4.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-CLHWv9z-.js";import{u as wn,a as vn}from"./use-connection-BKakpvkk.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-DXY52I1e.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-CvJmXij7.js";import"./index-3Euwx3bh.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-DjlF9Nhh.js";import{S as Fn}from"./index-DaTDomcZ.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-DyNloM84.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-jK5-EocK.js";import{s as Un}from"./Plus-BVt3gf6N.js";import{b as ps}from"./Tool01-D6Ixmgxm.js";import{i as Fe}from"./Check-Rzhysg8v.js";import{s as _t}from"./XClose-dfaecXcF.js";import{I as Ct}from"./integration-icon-BOg4uSLi.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-y8ERtqeD.js";import"./index-nS3rTKOQ.js";import{i as xs}from"./X-Dzpu-bw3.js";import{u as hs,a as Gn}from"./use-collections-DxWiIX9G.js";import{E as gs}from"./empty-state-CZ6jnWLa.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-DsRHjNfg.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
1
|
+
import{e3 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e4 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e5 as Nt,e6 as es,o as Ys,v as Zs,e7 as en,e8 as tn}from"./index-BfzqpoYd.js";import{D as sn,F as nn,B as on}from"./index-D4BxVbG6.js";import{h as De,i as rn,u as ae}from"./use-mcp-client-Brxiewn2.js";import{a as ts}from"./use-virtual-mcp-DDTG_-f6.js";import{M as Oe}from"./monaco-editor-DQviDtyP.js";import{b as ln,R as zt,a as cn}from"./resizable-Cx-Y9zvP.js";import{B as le}from"./badge-DF6gVmsi.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-DpYu937I.js";import{S as et}from"./spinner-j70e5pPL.js";import{V as an}from"./view-mode-toggle-BN8FgH0K.js";import{ai as un,o as dn,i as fn,z as ss,aj as mn,a3 as pn,u as xn,ak as ns,a9 as hn,N as os,al as gn,am as bn,a5 as ft,an as jn}from"./agent-icon-Lc1AgwlE.js";import{i as rs}from"./Play-CBt0NeLA.js";import{b as Sn,a as yn,V as Ge}from"./layout-VuI1aPBj.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-CC_mfaKY.js";import{u as wn,a as vn}from"./use-connection-MP_sOdrQ.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-DFeiBffX.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-nXKceTRB.js";import"./index-uO0JijnU.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-BYy84ztj.js";import{S as Fn}from"./index-1xoY7YJX.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-DASEEDYA.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-DpfpR4kx.js";import{s as Un}from"./Plus-gXoAw_mX.js";import{b as ps}from"./Tool01-DXWYgeBe.js";import{i as Fe}from"./Check-CSixRgqh.js";import{s as _t}from"./XClose-DhQ5V0ST.js";import{I as Ct}from"./integration-icon-B-zr5uGs.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-CsQ2TTIf.js";import"./index-DOW4VN4f.js";import{i as xs}from"./X-DCWlm9Ta.js";import{u as hs,a as Gn}from"./use-collections-vRlJo8MD.js";import{E as gs}from"./empty-state-CY7XUbo0.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-BGQcwAaL.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
2
2
|
${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
|
|
3
3
|
`:""} ${u}${f}: ${n(d)};`}).join(`
|
|
4
4
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,g as p,j as s,l as u,N as a}from"./index-
|
|
1
|
+
import{e as c,g as p,j as s,l as u,N as a}from"./index-BfzqpoYd.js";import{a as x}from"./use-capability-aJI8msnV.js";import{C as j}from"./capability-load-error-Dn3qy9VI.js";function v(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:g}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(g){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bC as _}from"./index-
|
|
1
|
+
import{bC as _}from"./index-BfzqpoYd.js";var S={exports:{}},r={};var $;function C(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function I(){return v||(v=1,S.exports=C()),S.exports}var g=I();const h=_(g);export{h as R,g as r};
|
package/dist/client/assets/{infiniteQueryObserver-GkUb2zKT.js → infiniteQueryObserver-CvEVG_TM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{av as g,dC as d,dD as v}from"./index-
|
|
1
|
+
import{av as g,dC as d,dD as v}from"./index-BfzqpoYd.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:u,isError:c,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",f=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as s,c as a,j as d}from"./index-
|
|
1
|
+
import{e as s,c as a,j as d}from"./index-BfzqpoYd.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as A,j as h,r as z,c as _}from"./index-
|
|
1
|
+
import{e as A,j as h,r as z,c as _}from"./index-BfzqpoYd.js";import{n as L}from"./Container-DIwdobum.js";import{A as k}from"./agent-icon-Lc1AgwlE.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as r,j as i,bw as p}from"./index-
|
|
1
|
+
import{e as n,c as r,j as i,bw as p}from"./index-BfzqpoYd.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,r as i,c as A,j as a,aU as V}from"./index-
|
|
1
|
+
import{e as C,r as i,c as A,j as a,aU as V}from"./index-BfzqpoYd.js";import{P as E}from"./index-CVPVNlMM.js";const H=i.createContext(null);function q(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const z=D;function B(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{B as V,z as a,q as b};
|