decocms 4.224.0 → 4.225.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-DavubZK8.js → AlertCircle-5AuOprU7.js} +1 -1
- package/dist/client/assets/{AreaChart-Jlg8FL-Y.js → AreaChart-Wk8ICNqw.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DQ3idEt_.js → ArrowLeft-DIhI9G2z.js} +1 -1
- package/dist/client/assets/{ArrowUp-DAW7ubga.js → ArrowUp-scxa_5To.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DA59PdAB.js → ArrowUpRight-BA9oV4xr.js} +1 -1
- package/dist/client/assets/{Check-B--Gin3d.js → Check-CNtTpSWJ.js} +1 -1
- package/dist/client/assets/{CheckCircle-DS3Ua9xs.js → CheckCircle-BKrA_F18.js} +1 -1
- package/dist/client/assets/{ChevronDown-DheA-cV2.js → ChevronDown-VKLIqYvn.js} +1 -1
- package/dist/client/assets/{ChevronRight-hVMksRIi.js → ChevronRight-Ib5ZfYb_.js} +1 -1
- package/dist/client/assets/{ChevronUp-CZni8u1X.js → ChevronUp-CZ15FCHi.js} +1 -1
- package/dist/client/assets/{Copy01-B25fl0go.js → Copy01-B9F7Zuvt.js} +1 -1
- package/dist/client/assets/{CpuChip01-BaAOv01U.js → CpuChip01-CC_hutb3.js} +1 -1
- package/dist/client/assets/{CreditCard01-BkeE0ONF.js → CreditCard01-JWNc7rZ4.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cdmei-H3.js → DotsVertical-Csv-ib_3.js} +1 -1
- package/dist/client/assets/{Eye-CZJ5u40M.js → Eye-DCS27XV-.js} +1 -1
- package/dist/client/assets/{FilterLines-BEBq5J-I.js → FilterLines-CaiEb8JB.js} +1 -1
- package/dist/client/assets/{Globe01-NDI4b-UX.js → Globe01-Drqg6KUJ.js} +1 -1
- package/dist/client/assets/{Globe04-D71gfaN9.js → Globe04-meEdEGKy.js} +1 -1
- package/dist/client/assets/{HardDrive-BWGEXjRM.js → HardDrive-BKuMgSaU.js} +1 -1
- package/dist/client/assets/{Key01-BjgVVl7g.js → Key01-bGzxjJsu.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CWMv-UoM.js → LayoutLeft-DfvgAkRL.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CpphPkZ1.js → LinkExternal01-D1EqUtA_.js} +1 -1
- package/dist/client/assets/{LogOut01-JU3myzms.js → LogOut01-DXzte6_O.js} +1 -1
- package/dist/client/assets/{Monitor01-Bnl3331y.js → Monitor01-CQoDfUFU.js} +1 -1
- package/dist/client/assets/{Palette-BWyI7FsH.js → Palette-CtCaB4wK.js} +1 -1
- package/dist/client/assets/{Play-Iancy4iV.js → Play-CGg7hiGZ.js} +1 -1
- package/dist/client/assets/{Plus-DUDN-5vq.js → Plus-DWqthFh2.js} +1 -1
- package/dist/client/assets/{SearchLg-C1G8muB9.js → SearchLg-CGKdc4IN.js} +1 -1
- package/dist/client/assets/{SearchMd-CDXTsX8U.js → SearchMd-B7y19WYM.js} +1 -1
- package/dist/client/assets/{Settings02-Btqlou-a.js → Settings02-eKxKQ3Po.js} +1 -1
- package/dist/client/assets/{Share07-Er8CctEq.js → Share07-BEfDgBq8.js} +1 -1
- package/dist/client/assets/{Shield01-BgWyQcJD.js → Shield01-DKKz-hs5.js} +1 -1
- package/dist/client/assets/{Star01--PfaKw_L.js → Star01-0IOrf7-Y.js} +1 -1
- package/dist/client/assets/{Stars01-DFHCPMyQ.js → Stars01-B8nkzQNK.js} +1 -1
- package/dist/client/assets/{Stars02-D2RhCra_.js → Stars02-Bh_xyyc7.js} +1 -1
- package/dist/client/assets/{Sun-o1Pig8_n.js → Sun-Cm_45XM8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Cz3c8HI4.js → SwitchHorizontal01-xPyfL_HZ.js} +1 -1
- package/dist/client/assets/{Tool01-CuP6Q18E.js → Tool01-BoCUU2dg.js} +1 -1
- package/dist/client/assets/{Tool02-DUxdVP3j.js → Tool02-Uewp-NcQ.js} +1 -1
- package/dist/client/assets/{Trash01-CuRx-C0C.js → Trash01-UIf_VcVI.js} +1 -1
- package/dist/client/assets/{TrendUp01-C9u3eEk-.js → TrendUp01-Bm0kytjN.js} +1 -1
- package/dist/client/assets/{Upload01-428xVmSe.js → Upload01-B6U9bIgM.js} +1 -1
- package/dist/client/assets/{User01-CHnNSmWZ.js → User01-CwuUyWsv.js} +1 -1
- package/dist/client/assets/{Users01-DoHuWiUf.js → Users01-BqPX7MJ3.js} +1 -1
- package/dist/client/assets/{Users03-Bp4tp_CV.js → Users03-RyOA80qQ.js} +1 -1
- package/dist/client/assets/{X-DLeHa8v1.js → X-CkC51HaZ.js} +1 -1
- package/dist/client/assets/{XCircle-qfFmQGhn.js → XCircle-BA5CyIfy.js} +1 -1
- package/dist/client/assets/{XClose-brUKLM8K.js → XClose-D1vn_d4K.js} +1 -1
- package/dist/client/assets/{YAxis-CcMaLw8Q.js → YAxis-B8lSIMfw.js} +1 -1
- package/dist/client/assets/{Zap-CsfR49fv.js → Zap-CrKr3-54.js} +1 -1
- package/dist/client/assets/{ZapSquare-pzdsbNjR.js → ZapSquare-Dr5iClJn.js} +1 -1
- package/dist/client/assets/{access-gate-ChZ8CI9N.js → access-gate-uaU0YsVl.js} +1 -1
- package/dist/client/assets/{agent-capabilities-cXfbMfjV.js → agent-capabilities-C4tLW0Za.js} +1 -1
- package/dist/client/assets/agent-icon-Dp75Aip8.js +1 -0
- package/dist/client/assets/{agents-list-CbnXFJcv.js → agents-list-7ppbx13E.js} +1 -1
- package/dist/client/assets/ai-providers-3A3ylJWr.js +1 -0
- package/dist/client/assets/{alert-CCqmJTAB.js → alert-DVDFTVaN.js} +1 -1
- package/dist/client/assets/{alert-dialog-BciaXcl7.js → alert-dialog-BY-JdMxs.js} +2 -2
- package/dist/client/assets/{api-keys-gaAn48P5.js → api-keys-CUws3Xz1.js} +1 -1
- package/dist/client/assets/app-editor-BENo2A2e.js +1 -0
- package/dist/client/assets/{auth-D7if_NTM.js → auth-BYSDCwQO.js} +1 -1
- package/dist/client/assets/{auth-catchall-WIH7mvdU.js → auth-catchall-xMpQfXCL.js} +1 -1
- package/dist/client/assets/{auth-entry-DA12zGf_.js → auth-entry-BqmmWe8a.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BWV-I98F.js → auth-split-layout-BMynArQL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CBYhtuMB.js → authenticate-and-persist-oauth-CFQCYd0Y.js} +1 -1
- package/dist/client/assets/{automation-list-row-yWfc_HiC.js → automation-list-row-9X-aLdwM.js} +1 -1
- package/dist/client/assets/{automation-runs-Clp6Ixps.js → automation-runs-m1km5UUs.js} +1 -1
- package/dist/client/assets/{automations-O2V384a_.js → automations-DrRIAHdy.js} +1 -1
- package/dist/client/assets/{avatar-CVDW1Cdw.js → avatar-CBy9Y411.js} +1 -1
- package/dist/client/assets/{badge-DBpG4cr6.js → badge-BPTJs8tR.js} +1 -1
- package/dist/client/assets/{billing-BNmHkRot.js → billing-Ciy8R0wF.js} +1 -1
- package/dist/client/assets/{block-document-C1yEXc73.js → block-document-B_2mnlgv.js} +1 -1
- package/dist/client/assets/brand-context-CCt6FCkW.js +1 -0
- package/dist/client/assets/{buckets-ixtH0gp6.js → buckets-Doi-4RMR.js} +1 -1
- package/dist/client/assets/bulk-category-panel-Cdoln1ld.js +1 -0
- package/dist/client/assets/{capability-load-error-B4S9wFqg.js → capability-load-error-BEe-Cycg.js} +1 -1
- package/dist/client/assets/{card-B-SCi-5c.js → card-DZBvhYCi.js} +1 -1
- package/dist/client/assets/{cards-CXJjHBOM.js → cards-Dp1UPuqF.js} +1 -1
- package/dist/client/assets/category-editor-DvMA1zvH.js +1 -0
- package/dist/client/assets/{chart-DrdHAsMw.js → chart-DMTOf1UY.js} +1 -1
- package/dist/client/assets/{chat-context-CQzgjo0A.js → chat-context-BV5yYkZ7.js} +1 -1
- package/dist/client/assets/{checkbox-CGc5n5wx.js → checkbox-C0Pqr57R.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DPLTX1zP.js → cli-auth-success-BMZYPagJ.js} +1 -1
- package/dist/client/assets/collection-detail-cSCGqn_X.js +1 -0
- package/dist/client/assets/{collection-display-button-DdrhbzF4.js → collection-display-button-cRfJyYLg.js} +1 -1
- package/dist/client/assets/{collection-search-CLBROL0q.js → collection-search-BnD64bOg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CrwPL292.js → collection-table-wrapper-C55tsWoK.js} +1 -1
- package/dist/client/assets/{collection-tabs-BIeQNnqZ.js → collection-tabs-C4NU_x7h.js} +1 -1
- package/dist/client/assets/{command-tJqeGhYX.js → command-D-MKa5w0.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DJAp8Om2.js → commerce-onboarding-BKq9fsCK.js} +1 -1
- package/dist/client/assets/{connect-8iDPFBq3.js → connect-CdepUNYo.js} +1 -1
- package/dist/client/assets/{connection-card-BDvGK-9X.js → connection-card-C2I8RNJB.js} +1 -1
- package/dist/client/assets/connection-detail-CuOK2Fb2.js +1 -0
- package/dist/client/assets/connection-form-helpers-BtZAsOVk.js +1 -0
- package/dist/client/assets/connection-tfujEzUI.js +1 -0
- package/dist/client/assets/connections-Bv4AIFQS.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-DQnoPwAa.js → decopilot-sse-pool-CVEldHqx.js} +1 -1
- package/dist/client/assets/{dialog-vAb5ojPZ.js → dialog-B-v3BB31.js} +1 -1
- package/dist/client/assets/{domain-settings-DX17pgLD.js → domain-settings-Bs6NJ4a5.js} +1 -1
- package/dist/client/assets/{drawer-FG6q2eyf.js → drawer-c-6aHaq_.js} +1 -1
- package/dist/client/assets/{dropdown-menu-f55YAcIa.js → dropdown-menu-DrAjHS6Q.js} +1 -1
- package/dist/client/assets/{empty-state-DZu-Cdq6.js → empty-state-Cr5XYcaP.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DLAkwCdG.js → extract-connection-data-Dl7Bm5LW.js} +1 -1
- package/dist/client/assets/file-explorer-D0RiIkTG.js +2 -0
- package/dist/client/assets/{file-type-icon-CrR9v93S.js → file-type-icon-CSps8N-1.js} +1 -1
- package/dist/client/assets/{form-D_ovDLVb.js → form-bcyFNKFV.js} +1 -1
- package/dist/client/assets/general-BZZ-oENe.js +1 -0
- package/dist/client/assets/{github-repo-picker-Ch6poWNH.js → github-repo-picker-CY6tqV9m.js} +1 -1
- package/dist/client/assets/{hooks-VEThfl3S.js → hooks-BuIdZSnH.js} +2 -2
- package/dist/client/assets/{index-uqwqiepi.js → index-B74UiVT7.js} +10 -10
- package/dist/client/assets/{index-BvLfuNpP.js → index-BotuzhGa.js} +1 -1
- package/dist/client/assets/index-BxiH41R6.css +1 -0
- package/dist/client/assets/{index-CyxKOCc8.js → index-CN0AZ1sX.js} +1 -1
- package/dist/client/assets/{index-Bv6y9FKb.js → index-CbwdUE29.js} +1 -1
- package/dist/client/assets/index-DE39gzO0.js +1 -0
- package/dist/client/assets/index-DkFgk-2h.js +1 -0
- package/dist/client/assets/{index-B2g-sXqU.js → index-DsqiSRe2.js} +50 -50
- package/dist/client/assets/{index-BPyC6Ytg.js → index-DstjG4U8.js} +1 -1
- package/dist/client/assets/{index-BZ4X_NXd.js → index-p4clXeAp.js} +1 -1
- package/dist/client/assets/{index-B_c7oNDG.js → index-pIywkKbR.js} +1 -1
- package/dist/client/assets/{index-redirect-BriS78FO.js → index-redirect-DaTO-OAH.js} +1 -1
- package/dist/client/assets/{infra-billing-QOpGVOVK.js → infra-billing-BM5zof0a.js} +1 -1
- package/dist/client/assets/{input-XduY1XNT.js → input-6EkTK3Tc.js} +1 -1
- package/dist/client/assets/{integration-icon-ByzXVFR-.js → integration-icon-C1_ZTKK2.js} +1 -1
- package/dist/client/assets/invite-member-dialog-CA4DNVyu.js +1 -0
- package/dist/client/assets/{label-DOIVLygZ.js → label-Bsd2B4PY.js} +1 -1
- package/dist/client/assets/{layout-Cu3UAPe9.js → layout-B0vTn6LW.js} +1 -1
- package/dist/client/assets/{login-nR0DRIyD.js → login-Bqq8U3Fl.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CXr-2OSm.js → mcp-oauth-Bdsl2jCl.js} +1 -1
- package/dist/client/assets/{members-DRE6rQ3n.js → members-B-y6Mefp.js} +1 -1
- package/dist/client/assets/{monaco-editor-CYdWUk96.js → monaco-editor-DjPLulfl.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-vefEO7OF.js → monitoring-stats-row-D0_0f-Jn.js} +1 -1
- package/dist/client/assets/{multi-select-Bsu17hUt.js → multi-select-swcvnxii.js} +1 -1
- package/dist/client/assets/{oauth-callback-BSaqkh46.js → oauth-callback-Chj4-NjA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CKEDUt82.js → oauth-callback-ai-provider-DbaBWvmg.js} +1 -1
- package/dist/client/assets/{onboarding-CNGbZe4N.js → onboarding-Dzz5Sz4p.js} +1 -1
- package/dist/client/assets/{org-layout-C0JBqoy_.js → org-layout-DHzm5KjW.js} +1 -1
- package/dist/client/assets/{organization-choice-DAb6Mmoa.js → organization-choice-Cv6Rg16k.js} +1 -1
- package/dist/client/assets/{orgs-Cattl2vT.js → orgs-9-abrRFC.js} +1 -1
- package/dist/client/assets/{page-seo-form-CyawXj5Y.js → page-seo-form-olO1_wZC.js} +1 -1
- package/dist/client/assets/{popover-BkS1Yyta.js → popover-Cp8O0BOf.js} +1 -1
- package/dist/client/assets/post-editor-C8UPswVv.js +1 -0
- package/dist/client/assets/{primitives-CR-X-1M4.js → primitives-CoVe93B5.js} +1 -1
- package/dist/client/assets/profile-BdjX7-yt.js +1 -0
- package/dist/client/assets/project-app-view-Cqkt9pYy.js +1 -0
- package/dist/client/assets/record-editor-DiMIhczP.js +1 -0
- package/dist/client/assets/redirect-editor-DuC_v7pU.js +1 -0
- package/dist/client/assets/registry-CEpV99KC.js +2 -0
- package/dist/client/assets/{registry-layout-CAghKyUJ.js → registry-layout-BFo-Jfp8.js} +1 -1
- package/dist/client/assets/{reports-BL7w8TX5.js → reports-DZSu76CC.js} +1 -1
- package/dist/client/assets/{require-capability-CiP-3I0X.js → require-capability-pE8FFSc1.js} +1 -1
- package/dist/client/assets/{required-auth-layout-zzpCbRWf.js → required-auth-layout-CUwfUQfP.js} +1 -1
- package/dist/client/assets/{reset-password-DbZPEWDe.js → reset-password-aabhOrwV.js} +1 -1
- package/dist/client/assets/roles-CIp-Mt2C.js +1 -0
- package/dist/client/assets/{search-input-BLP4SxYf.js → search-input-CfneSsqI.js} +1 -1
- package/dist/client/assets/{secrets-B_HxDzhb.js → secrets-Dj9uhFgd.js} +1 -1
- package/dist/client/assets/{sections-editor-DsVWL71B.js → sections-editor-CbgLVKJM.js} +1 -1
- package/dist/client/assets/{select-ByeQyeGq.js → select-DPSOJbeT.js} +1 -1
- package/dist/client/assets/{select-model-C2bjnCee.js → select-model-K1AqyLKg.js} +2 -2
- package/dist/client/assets/self-tool-result-C3AISunK.js +1 -0
- package/dist/client/assets/seo-editor-Cvg8eGI2.js +1 -0
- package/dist/client/assets/{settings-layout-B80ySTFA.js → settings-layout-a-ncq85p.js} +1 -1
- package/dist/client/assets/{settings-section-B66exDES.js → settings-section-DDdgVdbU.js} +1 -1
- package/dist/client/assets/{shell-controls-C3yLFYj5.js → shell-controls-CAisEqeZ.js} +1 -1
- package/dist/client/assets/{shell-layout-7P2c1TpY.js → shell-layout-DpCXcjt8.js} +1 -1
- package/dist/client/assets/sidebar-L8FjXZIc.js +1 -0
- package/dist/client/assets/{skeleton-C6VdGs8N.js → skeleton-BBy0A3ce.js} +1 -1
- package/dist/client/assets/{spinner-73VcJqpz.js → spinner-BIB0WEVJ.js} +1 -1
- package/dist/client/assets/{sso-B3SNQ_Um.js → sso-axnsZkw3.js} +1 -1
- package/dist/client/assets/{store-D5kw9O9L.js → store-BGfSTyW6.js} +1 -1
- package/dist/client/assets/store-registry-me-8Jk68.js +2 -0
- package/dist/client/assets/{studio-tools-BqnkL26S.js → studio-tools-BkqbGYdG.js} +1 -1
- package/dist/client/assets/{switch-ZCGs1GMu.js → switch-CyGKWatf.js} +1 -1
- package/dist/client/assets/{synced-repos-qtGvPA0d.js → synced-repos-Caji8gl1.js} +1 -1
- package/dist/client/assets/{tab-id-uw5y2JDe.js → tab-id-Cxsf-OOg.js} +1 -1
- package/dist/client/assets/{table-CpRht-qZ.js → table-BO_ehL6A.js} +1 -1
- package/dist/client/assets/{tabs-Bd7BH5eI.js → tabs-49mtpBLy.js} +1 -1
- package/dist/client/assets/{textarea-DCefcfFm.js → textarea-DhnMR43g.js} +1 -1
- package/dist/client/assets/{toggle-group-COpYloXX.js → toggle-group-Bk96Uca0.js} +1 -1
- package/dist/client/assets/{toolbar-B1Xt4usS.js → toolbar-BIqUAnt7.js} +1 -1
- package/dist/client/assets/{tooltip-Cw-jjRXl.js → tooltip-BDRXOJPI.js} +1 -1
- package/dist/client/assets/{track-BLZrZp4e.js → track-BLwAphOX.js} +1 -1
- package/dist/client/assets/{types-BK8rkT7j.js → types-BYXfM1o_.js} +1 -1
- package/dist/client/assets/{use-ai-providers-AFHOz3RT.js → use-ai-providers-9bbw_acr.js} +1 -1
- package/dist/client/assets/{use-api-keys-DERRR9ue.js → use-api-keys-JccvZvG-.js} +1 -1
- package/dist/client/assets/{use-automations-B6SZf0zK.js → use-automations-C1gMdSGl.js} +1 -1
- package/dist/client/assets/{use-autosave-l6QqGd6g.js → use-autosave-uIsoUtc_.js} +1 -1
- package/dist/client/assets/{use-capability-ie6Vlr9z.js → use-capability-C9LvQ7JY.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Ct5h2lIY.js → use-clock-tick-CMxADp_K.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-DzVyi8nS.js +1 -0
- package/dist/client/assets/{use-connection-B1SqKG8L.js → use-connection-WokxLMwl.js} +1 -1
- package/dist/client/assets/{use-copy-Cp-dWuyB.js → use-copy-B97j_jee.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CXTWzS_B.js → use-create-virtual-mcp-DVv52QFd.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BwfaGsxd.js → use-debounced-autosave-yJceD8xK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CCDm_vdr.js → use-debounced-value-BX1Yu_M8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B48ZQbw9.js → use-decopilot-events-BZ79GmEu.js} +1 -1
- package/dist/client/assets/{use-delete-connection-pQMjlm7N.js → use-delete-connection-C8HhNUpT.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dcnbl1Jw.js → use-deployment-admin-CbmjlFHk.js} +1 -1
- package/dist/client/assets/{use-file-configs-Ce3aiMZR.js → use-file-configs-DGF6IHz5.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-tbosqiZ3.js → use-infinite-scroll-D1A6hzS4.js} +1 -1
- package/dist/client/assets/{use-infra-billing-BI_m8P1T.js → use-infra-billing-BgKAIrHp.js} +1 -1
- package/dist/client/assets/{use-join-requests-DhDPtaF5.js → use-join-requests-D_92-Y71.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B7z15LR5.js → use-mcp-client-C8UvUf9Y.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-mNhWR7cv.js → use-mcp-tools-DWhPtLw4.js} +1 -1
- package/dist/client/assets/{use-members-7UKobPWt.js → use-members-BW7jM_g-.js} +1 -1
- package/dist/client/assets/{use-mobile-Do1CSOcp.js → use-mobile-67MpdCeO.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D-QYTWaV.js → use-navigate-to-agent-CdL5qb4F.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CevbRQmh.js → use-open-billing-url-OBCPp1Ht.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-COBKG34J.js → use-org-auth-client-Cn32f5PT.js} +1 -1
- package/dist/client/assets/{use-org-sso-BRqgyoLr.js → use-org-sso-DGC7R3Ds.js} +1 -1
- package/dist/client/assets/{use-organization-roles-tL-ZhS_z.js → use-organization-roles-DigLbP-o.js} +1 -1
- package/dist/client/assets/use-organization-settings-BJx4sf85.js +1 -0
- package/dist/client/assets/{use-registry-connections-BOmUzNNu.js → use-registry-connections-Cbc1pl9q.js} +1 -1
- package/dist/client/assets/{use-secrets-3Vs29rU_.js → use-secrets-B-OEN9Nk.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-0CmdLslP.js → use-section-preview-base-Cj_8IHR1.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DyizQHci.js → use-status-sounds-DQ8w2Xh3.js} +1 -1
- package/dist/client/assets/{use-tags-Dn5HSzKL.js → use-tags-t5KU17Gl.js} +1 -1
- package/dist/client/assets/{use-view-mode-cINy8xBU.js → use-view-mode-CqDRE-KT.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqYmn6eJ.js → use-virtual-mcp-B7UA8ChX.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DhzVnrLv.js +1 -0
- package/dist/client/assets/{useRouterState-l3i333Jr.js → useRouterState-BMGmXwBQ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BtrMhual.js +1 -0
- package/dist/client/assets/{users-CpyQuHoP.js → users-CQ9BJ1gB.js} +1 -1
- package/dist/client/assets/variant-calendar-Ctpp33UY.js +1 -0
- package/dist/client/assets/{view-mode-toggle-C-qepPc2.js → view-mode-toggle-BrntiHNN.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +27 -27
- package/dist/server/server.js +8 -8
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-1XcP5pZj.js +0 -1
- package/dist/client/assets/ai-providers-B2Xo1zPp.js +0 -1
- package/dist/client/assets/app-editor-BFy663JJ.js +0 -1
- package/dist/client/assets/brand-context-BFmyY-to.js +0 -1
- package/dist/client/assets/bulk-category-panel-CHKMCLiB.js +0 -1
- package/dist/client/assets/category-editor-C0HBSEew.js +0 -1
- package/dist/client/assets/collection-detail-dhQQ4j2m.js +0 -1
- package/dist/client/assets/connection-Kd0lsosP.js +0 -1
- package/dist/client/assets/connection-detail-DHeuRyPO.js +0 -1
- package/dist/client/assets/connection-form-helpers-PWl_yK2y.js +0 -1
- package/dist/client/assets/connections-bHTUptTy.js +0 -1
- package/dist/client/assets/file-explorer-BtRaYkNJ.js +0 -2
- package/dist/client/assets/general-Dl4ceEjk.js +0 -1
- package/dist/client/assets/index-BAPpF2bh.js +0 -1
- package/dist/client/assets/index-Dncm6IaE.css +0 -1
- package/dist/client/assets/index-Hefr2Pid.js +0 -1
- package/dist/client/assets/invite-member-dialog-Bq6uIFZZ.js +0 -1
- package/dist/client/assets/post-editor-BFLmo-KU.js +0 -1
- package/dist/client/assets/profile-D8ZCnpLe.js +0 -1
- package/dist/client/assets/project-app-view-MGlgKdZV.js +0 -1
- package/dist/client/assets/record-editor-BmhqTeeJ.js +0 -1
- package/dist/client/assets/redirect-editor-CFuV9fQJ.js +0 -1
- package/dist/client/assets/registry-BQm-7sZV.js +0 -2
- package/dist/client/assets/roles-NlPsx_3W.js +0 -1
- package/dist/client/assets/self-tool-result-Czy7YZgm.js +0 -1
- package/dist/client/assets/seo-editor-BXNqFyr8.js +0 -1
- package/dist/client/assets/sidebar-crcSxCdk.js +0 -1
- package/dist/client/assets/store-registry-rIlX8Wj3.js +0 -2
- package/dist/client/assets/use-deco-credits-CCP_MrG6.js +0 -1
- package/dist/client/assets/use-organization-settings-BDsPJvBC.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dwh9KQC6.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BJ6zsf6T.js +0 -1
- package/dist/client/assets/variant-calendar-COh_IjeJ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,b as B,j as t,y as Vt,B as te,r as V,aS as Rt,d as nt,s as Ht,m as K,a as re,t as H,w as Ut,k as De,p as E,F as oe,f as st,u as ot,L as Kt,D as qt,a1 as Gt,a2 as Xt,I as Qt,G as Wt,K as it,o as Yt,n as Jt}from"./index-uqwqiepi.js";import{i as Zt}from"./ChevronRight-hVMksRIi.js";import{i as en}from"./X-DLeHa8v1.js";import{aF as tn,Q as nn,A as gt,g as sn,an as on}from"./agent-icon-1XcP5pZj.js";import{t as ht}from"./ChevronDown-DheA-cV2.js";import{T as Ce,a as ye,c as Ne}from"./tooltip-Cw-jjRXl.js";import{u as pt,d as xt,c as jt}from"./sidebar-crcSxCdk.js";import{a as at,i as an,f as ln,S as cn,u as rn}from"./use-mcp-client-B7z15LR5.js";import{a as dn,u as un}from"./use-virtual-mcp-DqYmn6eJ.js";import{a as Le,b as vt,P as bt}from"./popover-BkS1Yyta.js";import{i as Ee}from"./Check-B--Gin3d.js";import{s as we}from"./Plus-DUDN-5vq.js";import{i as Ct}from"./SearchMd-CDXTsX8U.js";import{s as yt}from"./XClose-brUKLM8K.js";import{C as mn}from"./self-tool-result-Czy7YZgm.js";import{T as Nt}from"./toolbar-B1Xt4usS.js";import{S as fn}from"./skeleton-C6VdGs8N.js";import{D as wt,a as _t,b as St,c as gn,g as hn,e as pn,f as xn}from"./drawer-FG6q2eyf.js";import{u as kt}from"./use-mobile-Do1CSOcp.js";import{a as jn,G as vn}from"./github-repo-picker-Ch6poWNH.js";import{g as bn,b as Cn,a as Dt}from"./hooks-VEThfl3S.js";import{u as yn,g as Nn,a as wn,b as _n}from"./use-navigate-to-agent-D-QYTWaV.js";import{a as Sn,c as It}from"./agent-capabilities-cXfbMfjV.js";import{u as At}from"./shell-layout-7P2c1TpY.js";import{f as kn}from"./reusable-new-chat-CouMjkYR.js";import{C as Dn}from"./collection-search-CLBROL0q.js";import{g as In,a as An,b as Pn,e as Tn}from"./extract-connection-data-DLAkwCdG.js";import{u as Pt,a as Tt,g as zn,C as Ye}from"./connection-card-BDvGK-9X.js";import{e as zt,d as Ot,a as Mt,b as $t,h as On,c as Mn}from"./dialog-vAb5ojPZ.js";import{d as W,a as Y,e as J,b as Z,c as ee,F as dt}from"./form-D_ovDLVb.js";import{I as ce}from"./input-XduY1XNT.js";import{S as $n,a as Fn,b as Bn,c as Ln,d as ke}from"./select-ByeQyeGq.js";import{T as En}from"./textarea-DCefcfFm.js";import{b as Ft}from"./use-connection-B1SqKG8L.js";import{n as Be,i as Je}from"./Tool02-DUxdVP3j.js";import{s as Ze}from"./Star01--PfaKw_L.js";import{c as Vn,i as $e,a as ut,E as Rn,p as Hn,b as Un,d as Kn}from"./connection-form-helpers-PWl_yK2y.js";import{a as et}from"./authenticate-and-persist-oauth-CBYhtuMB.js";import{g as qn}from"./connection-slug-eyAPH6o3.js";import{C as Gn}from"./collection-tabs-BIeQNnqZ.js";import{u as mt}from"./use-infinite-scroll-tbosqiZ3.js";import{B as Fe}from"./badge-DBpG4cr6.js";import{u as Xn}from"./useSuspenseInfiniteQuery-BJ6zsf6T.js";import{g as Ve}from"./metadata-dUsYcpuu.js";import{u as Qn}from"./studio-tools-BqnkL26S.js";import{u as Wn}from"./use-ai-providers-AFHOz3RT.js";const Yn="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Jn(){const n=z.c(13),e=B();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let o;n[1]!==e?(o=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=o):o=n[2];let a;n[3]!==o?(a=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",o,"”"]}),n[3]=o,n[4]=a):a=n[4];let i;n[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:Yn,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=i):i=n[5];let c;n[6]!==e?(c=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=c):c=n[7];let r;n[8]!==c?(r=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[i,t.jsx("span",{className:"text-base font-medium",children:c})]}),n[8]=c,n[9]=r):r=n[9];let l;return n[10]!==a||n[11]!==r?(l=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,a,r]}),n[10]=a,n[11]=r,n[12]=l):l=n[12],l}function Zn(){const n=z.c(19),e=B();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let o;n[2]!==s?(o={Icon:tn,label:s},n[2]=s,n[3]=o):o=n[3];let a;n[4]!==e?(a=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=a):a=n[5];let i;n[6]!==a?(i={Icon:Vt,label:a},n[6]=a,n[7]=i):i=n[7];let c;n[8]!==e?(c=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=c):c=n[9];let r;n[10]!==c?(r={Icon:nn,label:c},n[10]=c,n[11]=r):r=n[11];let l;n[12]!==o||n[13]!==i||n[14]!==r?(l=[o,i,r],n[12]=o,n[13]=i,n[14]=r,n[15]=l):l=n[15];const u=l;let m;n[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=m):m=n[16];let f;return n[17]!==u?(f=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:u.map(es)})]}),n[17]=u,n[18]=f):f=n[18],f}function es(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function To(n){const e=z.c(22),{siteHost:s,footer:o,onClose:a,children:i}=n,c=B(),r=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let l;e[0]!==a||e[1]!==c?(l=a&&t.jsx("button",{type:"button",onClick:a,"aria-label":c("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(en,{size:18})}),e[0]=a,e[1]=c,e[2]=l):l=e[2];let u,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=u,e[4]=m):(u=e[3],m=e[4]);let f;e[5]!==r||e[6]!==s?(f=s&&t.jsxs(t.Fragment,{children:[t.jsx(Zt,{size:16,className:"shrink-0 text-foreground/25"}),r&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:r,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=r,e[6]=s,e[7]=f):f=e[7];let d;e[8]!==f?(d=t.jsxs("div",{className:"flex items-center gap-2",children:[u,m,f]}),e[8]=f,e[9]=d):d=e[9];let h;e[10]!==o?(h=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:o}),e[10]=o,e[11]=h):h=e[11];let C;e[12]!==i||e[13]!==d||e[14]!==h?(C=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[d,i,h]}),e[12]=i,e[13]=d,e[14]=h,e[15]=C):C=e[15];let p,g;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),g=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=p,e[17]=g):(p=e[16],g=e[17]);let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[p,g,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(Jn,{}),t.jsx("div",{className:"flex-1"}),t.jsx(Zn,{})]})]}),e[18]=j):j=e[18];let v;return e[19]!==l||e[20]!==C?(v=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[l,C,j]}),e[19]=l,e[20]=C,e[21]=v):v=e[21],v}function zo(n){const e=z.c(5),{ready:s,pending:o,label:a,onClick:i,children:c}=n,r=o||!s,l=s&&!o?c:null;let u;return e[0]!==a||e[1]!==i||e[2]!==r||e[3]!==l?(u=t.jsxs(te,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:i,disabled:r,children:[a,l]}),e[0]=a,e[1]=i,e[2]=r,e[3]=l,e[4]=u):u=e[4],u}function Bt(){const n=V.useContext(Rt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(a=>a.status==="pending"&&new Date(a.expiresAt)>new Date),refetch:()=>s?.()}}function ts(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function lt(n){const e=z.c(13),{org:s,size:o}=n,a=o===void 0?"sm":o,i=a==="xs"?"size-5":"size-6",c=a==="xs"?"text-[9px]":"text-xs";let r;e[0]!==i?(r=K(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==s.logo||e[3]!==s.name?(l=s.logo?void 0:ts(s.name),e[2]=s.logo,e[3]=s.name,e[4]=l):l=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==c?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:K("font-semibold leading-none",c),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=c,e[8]=u):u=e[8];let m;return e[9]!==r||e[10]!==l||e[11]!==u?(m=t.jsx("div",{className:r,style:l,children:u}),e[9]=r,e[10]=l,e[11]=u,e[12]=m):m=e[12],m}function ns({invitation:n,onChanged:e}){const s=B(),[o,a]=V.useState(!1),i=n.organizationName??s("header.orgSwitcher.unknownOrganization"),c=async()=>{a(!0);try{const u=await re.organization.acceptInvitation({invitationId:n.id});if(u.error){H.error(u.error.message),a(!1);return}}catch{H.error(s("header.orgSwitcher.failedToAcceptInvitation")),a(!1);return}H.success(s("header.orgSwitcher.joined",{name:i})),Ut();let l;try{l=(await re.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=l?`/${l}`:"/"},r=async()=>{a(!0);try{const l=await re.organization.rejectInvitation({invitationId:n.id});if(l.error){H.error(l.error.message),a(!1);return}H.success(s("header.orgSwitcher.invitationDeclined")),a(!1),e()}catch{H.error(s("header.orgSwitcher.failedToDeclineInvitation")),a(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(lt,{org:{name:i},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:i}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(te,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:c,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(te,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:r,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:t.jsx(yt,{size:14})})]})]})}function ss(n){const e=z.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:a}=n,i=B(),{data:c}=Ht(),{invitations:r,refetch:l}=Bt();let u;e[0]!==s?(u=(I,A)=>I.slug===s?-1:A.slug===s?1:I.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...c??[]].sort(u),[f,d]=V.useState(""),h=f.toLowerCase(),C=h?m.filter(I=>I.name.toLowerCase().includes(h)||I.slug.toLowerCase().includes(h)):m;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Ct,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=p):p=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=I=>d(I.target.value),e[3]=g):g=e[3];let j;e[4]!==f?(j=I=>I.key==="Escape"&&f&&d(""),e[4]=f,e[5]=j):j=e[5];let v;e[6]!==i?(v=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=v):v=e[7];let b;e[8]!==f||e[9]!==j||e[10]!==v?(b=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:f,onChange:g,onKeyDown:j,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=f,e[9]=j,e[10]=v,e[11]=b):b=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(we,{size:16}),e[12]=w):w=e[12];let S;e[13]!==a?(S=t.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:w}),e[13]=a,e[14]=S):S=e[14];let D;e[15]!==b||e[16]!==S?(D=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[p,b,S]}),e[15]=b,e[16]=S,e[17]=D):D=e[17];const O="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let x;e[18]!==r||e[19]!==f||e[20]!==l?(x=!f&&r.map(I=>t.jsx(ns,{invitation:I,onChanged:l},I.id)),e[18]=r,e[19]=f,e[20]=l,e[21]=x):x=e[21];const k=C.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:f?i("header.orgSwitcher.noOrganizationsMatch",{query:f}):i("header.orgSwitcher.noOrganizationsAvailable")});let T;e[22]!==o||e[23]!==s?(T=I=>t.jsxs("button",{type:"button",onClick:()=>o(I.slug),className:K("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",I.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(lt,{org:I,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.slug})]}),I.slug===s&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},I.id),e[22]=o,e[23]=s,e[24]=T):T=e[24];const N=C.map(T);let y;e[25]!==x||e[26]!==k||e[27]!==N?(y=t.jsxs("div",{className:O,children:[x,k,N]}),e[25]=x,e[26]=k,e[27]=N,e[28]=y):y=e[28];let P;return e[29]!==y||e[30]!==D?(P=t.jsxs(t.Fragment,{children:[D,y]}),e[29]=y,e[30]=D,e[31]=P):P=e[31],P}function os(n){const e=z.c(22),{trigger:s,orgParam:o,align:a,side:i}=n,c=a===void 0?"start":a,r=i===void 0?"bottom":i,l=nt(),[u,m]=V.useState(!1),[f,d]=V.useState(!1);let h;e[0]!==s?(h=t.jsx(Le,{asChild:!0,children:s}),e[0]=s,e[1]=h):h=e[1];const C=String(u);let p;e[2]!==l?(p=D=>{m(!1),l({to:"/$org",params:{org:D}})},e[2]=l,e[3]=p):p=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{m(!1),d(!0)},e[4]=g):g=e[4];let j;e[5]!==o||e[6]!==C||e[7]!==p?(j=t.jsx(ss,{orgParam:o,onSelectOrg:p,onCreateOrg:g},C),e[5]=o,e[6]=C,e[7]=p,e[8]=j):j=e[8];let v;e[9]!==c||e[10]!==r||e[11]!==j?(v=t.jsx(vt,{side:r,align:c,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:as,onCloseAutoFocus:is,children:j}),e[9]=c,e[10]=r,e[11]=j,e[12]=v):v=e[12];let b;e[13]!==u||e[14]!==h||e[15]!==v?(b=t.jsxs(bt,{open:u,onOpenChange:m,children:[h,v]}),e[13]=u,e[14]=h,e[15]=v,e[16]=b):b=e[16];let w;e[17]!==f?(w=t.jsx(mn,{open:f,onOpenChange:d}),e[17]=f,e[18]=w):w=e[18];let S;return e[19]!==w||e[20]!==b?(S=t.jsxs(t.Fragment,{children:[b,w]}),e[19]=w,e[20]=b,e[21]=S):S=e[21],S}function is(n){return n.preventDefault()}function as(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function ls(n){const e=z.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:c,isSearching:r,disabled:l}=n,u=a===void 0?"Search...":a;let m;e[0]!==c?(m=K("shrink-0 w-full border-b border-border h-12",c),e[0]=c,e[1]=m):m=e[1];const f=l?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==f?(d=K("flex items-center gap-2.5 h-12 px-4",f),e[2]=f,e[3]=d):d=e[3];let h;e[4]!==r?(h=r?t.jsx(De,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(Ct,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=r,e[5]=h):h=e[5];let C;e[6]!==o?(C=v=>o(v.target.value),e[6]=o,e[7]=C):C=e[7];let p;e[8]!==l||e[9]!==i||e[10]!==u||e[11]!==C||e[12]!==s?(p=t.jsx("input",{type:"text",value:s,onChange:C,onKeyDown:i,placeholder:u,disabled:l,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=l,e[9]=i,e[10]=u,e[11]=C,e[12]=s,e[13]=p):p=e[13];let g;e[14]!==d||e[15]!==h||e[16]!==p?(g=t.jsxs("label",{className:d,children:[h,p]}),e[14]=d,e[15]=h,e[16]=p,e[17]=g):g=e[17];let j;return e[18]!==m||e[19]!==g?(j=t.jsx("div",{className:m,children:g}),e[18]=m,e[19]=g,e[20]=j):j=e[20],j}function cs(n,e,s){if(!s)return null;const o=bn(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function rs(n){const e=z.c(6),{value:s,onChange:o}=n,a=B();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let c;return e[2]!==o||e[3]!==i||e[4]!==s?(c=t.jsx(ls,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=c):c=e[5],c}function ds(){const n=z.c(4),e=B();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function us(n){const e=z.c(10),{org:s,onClose:o}=n,a=B();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let c;e[2]!==o?(c=()=>o(),e[2]=o,e[3]=c):c=e[3];let r;e[4]!==a?(r=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=r):r=e[5];let l;return e[6]!==i||e[7]!==c||e[8]!==r?(l=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Kt,{to:"/$org/settings/agents",params:i,onClick:c,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:r})}),e[6]=i,e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function ms(){const n=z.c(4),e=B();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Lt,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function fs(n){const e=z.c(11),{onImportFromGithub:s}=n,o=B();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(vn,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let c;e[3]!==s||e[4]!==i?(c=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,i]}),e[3]=s,e[4]=i,e[5]=c):c=e[5];let r;e[6]!==o?(r=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=r):r=e[7];let l;return e[8]!==c||e[9]!==r?(l=t.jsx(Lt,{action:c,children:r}),e[8]=c,e[9]=r,e[10]=l):l=e[10],l}function gs(n){const e=z.c(11),{setOpen:s,emptyCtaClass:o}=n,a=B();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==o?(c=K(o),e[2]=o,e[3]=c):c=e[3];let r;e[4]!==s?(r=()=>{E("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=r):r=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{className:"size-4"}),e[6]=l):l=e[6];let u;return e[7]!==i||e[8]!==c||e[9]!==r?(u=t.jsx(Nt,{"aria-label":i,className:c,onClick:r,children:l}),e[7]=i,e[8]=c,e[9]=r,e[10]=u):u=e[10],u}function hs(n){const e=z.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=B();let c;e[0]!==o||e[1]!==i?(c=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=c):c=e[2];let r;e[3]!==a?(r=K(a),e[3]=a,e[4]=r):r=e[4];let l;e[5]!==s?(l=()=>{E("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=l):l=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let f;e[10]!==m?(f=t.jsx("span",{children:m}),e[10]=m,e[11]=f):f=e[11];let d;return e[12]!==c||e[13]!==r||e[14]!==l||e[15]!==f?(d=t.jsx(xt,{children:t.jsxs(jt,{tooltip:c,className:r,onClick:l,children:[u,f]})}),e[12]=c,e[13]=r,e[14]=l,e[15]=f,e[16]=d):d=e[16],d}function ps(){const n=z.c(4),e=B();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(St,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function xs(n){const e=z.c(8),{emptyCtaClass:s}=n,o=B();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=K(s),e[2]=s,e[3]=i):i=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{className:"size-4"}),e[4]=c):c=e[4];let r;return e[5]!==a||e[6]!==i?(r=t.jsx(Nt,{"aria-label":a,className:i,children:c}),e[5]=a,e[6]=i,e[7]=r):r=e[7],r}function js(n){const e=z.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=B();let c;e[0]!==o||e[1]!==i?(c=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=c):c=e[2];let r;e[3]!==a?(r=K(a),e[3]=a,e[4]=r):r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(we,{}),e[5]=l):l=e[5];let u;e[6]!==i?(u=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let f;e[10]!==c||e[11]!==r||e[12]!==m?(f=t.jsx(Le,{asChild:!0,children:t.jsxs(jt,{tooltip:c,className:r,children:[l,m]})}),e[10]=c,e[11]=r,e[12]=m,e[13]=f):f=e[13];let d;e[14]!==f||e[15]!==s?(d=s(f),e[14]=f,e[15]=s,e[16]=d):d=e[16];let h;return e[17]!==d?(h=t.jsx(xt,{children:d}),e[17]=d,e[18]=h):h=e[18],h}function vs(n){const e=z.c(9),{children:s}=n,o=B();let a;e[0]!==s?(a=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==i?(c=t.jsx(ye,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=c):c=e[5];let r;return e[6]!==a||e[7]!==c?(r=t.jsxs(Ne,{defaultOpen:!0,delayDuration:0,children:[a,c]}),e[6]=a,e[7]=c,e[8]=r):r=e[8],r}function bs(n){const e=nt(),{create:s}=Cn(),{locator:o}=oe(),a=st({strict:!1}),i=ot({strict:!1});return async c=>{const r=crypto.randomUUID(),l=c===i.virtualmcpid?cs(n,o,a.taskId??""):null;try{await s({id:r,virtual_mcp_id:c,...l?{branch:l}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:r},search:{virtualmcpid:c}})}}function tt(n){const e=z.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let c;e[0]!==i?(c=K("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=c):c=e[1];let r;e[2]!==s.icon||e[3]!==s.title?(r=t.jsx(gt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=r):r=e[4];let l;e[5]!==s.title?(l=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=l):l=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==l||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,u]}),e[9]=l,e[10]=u,e[11]=m):m=e[11];let f;e[12]!==o?(f=o&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=f):f=e[13];let d;return e[14]!==a||e[15]!==c||e[16]!==r||e[17]!==m||e[18]!==f?(d=t.jsxs("button",{type:"button",onClick:a,className:c,children:[r,m,f]}),e[14]=a,e[15]=c,e[16]=r,e[17]=m,e[18]=f,e[19]=d):d=e[19],d}function Lt(n){const e=z.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=i):i=e[4],i}function Cs(n){const e=z.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[c,r]=V.useState(""),l=dn(),u=l??[],{org:m}=oe(),{data:f}=re.useSession(),d=f?.user?.id??"anon",h=Nn(l),C=wn(),p=bs(m.slug),g=Sn(l),j=c.toLowerCase(),v=u.filter(_s).filter(F=>!g.has(F.id)).filter(ws).filter(F=>!c||F.title.toLowerCase().includes(j)),b=v.filter(Ns),w=v.filter(ys),S=at(m.id),D=!c||S.title.toLowerCase().includes(j),O=!!(o&&D);let x;e[0]!==s||e[1]!==o?(x=()=>{o?.(null),s(),r("")},e[0]=s,e[1]=o,e[2]=x):x=e[2];const k=x,T=F=>{if(o){o(F.id),s(),r("");return}_n({orgId:m.id,userId:d},F.id,h),C(),s(),r(""),p(F.id)},N="flex flex-col max-h-[min(640px,80dvh)]";let y;e[3]!==c?(y=t.jsx(rs,{value:c,onChange:r}),e[3]=c,e[4]=y):y=e[4];const P="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",I=o&&D&&S&&t.jsx(tt,{agent:S,selected:!a||a===S.id,onClick:k}),A=(b.length>0||!c)&&t.jsx(fs,{onImportFromGithub:i}),M=b.map(F=>t.jsx(tt,{agent:F,selected:o?a===F.id:void 0,onClick:()=>T(F)},F.id)),R=w.length>0&&t.jsx(ms,{}),X=w.map(F=>t.jsx(tt,{agent:F,selected:o?a===F.id:void 0,onClick:()=>T(F)},F.id));let L;e[5]!==O||e[6]!==c||e[7]!==v.length?(L=v.length===0&&!O&&c&&t.jsx(ds,{}),e[5]=O,e[6]=c,e[7]=v.length,e[8]=L):L=e[8];let ne;e[9]!==L||e[10]!==I||e[11]!==A||e[12]!==M||e[13]!==R||e[14]!==X?(ne=t.jsxs("div",{className:P,children:[I,A,M,R,X,L]}),e[9]=L,e[10]=I,e[11]=A,e[12]=M,e[13]=R,e[14]=X,e[15]=ne):ne=e[15];let q;e[16]!==s||e[17]!==m?(q=t.jsx(us,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=q):q=e[18];let de;return e[19]!==ne||e[20]!==q||e[21]!==y?(de=t.jsxs("div",{className:N,children:[y,ne,q]}),e[19]=ne,e[20]=q,e[21]=y,e[22]=de):de=e[22],de}function ys(n){return!It(n.metadata)}function Ns(n){return It(n.metadata)}function ws(n){return!ln(n.id)}function _s(n){return!an(n.id)}function Ss(n){const e=z.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:a,onSelectAgent:i,selectedAgentId:c,side:r,align:l}=s,u=o===void 0?!1:o,m=r===void 0?"right":r,f=l===void 0?"start":l,[d,h]=V.useState(!1),[C,p]=V.useState(!1),g=kt(),{setOpenMobile:j}=pt(),v=yn(),b=v?"border border-border":void 0;let w;e[2]!==v?(w=A=>v?t.jsx(vs,{children:A}):A,e[2]=v,e[3]=w):w=e[3];const S=w;let D;e[4]!==g||e[5]!==j?(D=()=>{h(!1),g&&j(!1)},e[4]=g,e[5]=j,e[6]=D):D=e[6];const O=D;let x;e[7]!==O?(x=()=>{O(),p(!0)},e[7]=O,e[8]=x):x=e[8];const k=x;let T;e[9]!==O||e[10]!==k||e[11]!==i||e[12]!==d||e[13]!==c?(T=d&&t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(fn,{className:"h-4 w-24"})}),children:t.jsx(Cs,{onClose:O,onSelectAgent:i,selectedAgentId:c,onImportFromGithub:k})}),e[9]=O,e[10]=k,e[11]=i,e[12]=d,e[13]=c,e[14]=T):T=e[14];const N=T;let y;e[15]!==f||e[16]!==u||e[17]!==b||e[18]!==v||e[19]!==g||e[20]!==d||e[21]!==N||e[22]!==m||e[23]!==a||e[24]!==S?(y=g?t.jsxs(t.Fragment,{children:[a?t.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:a}):u?S(t.jsx(gs,{setOpen:h,emptyCtaClass:b})):t.jsx(hs,{setOpen:h,highlightEmpty:v,emptyCtaClass:b}),t.jsx(wt,{open:d,onOpenChange:h,direction:"bottom",children:t.jsxs(_t,{className:"max-h-[85dvh] p-0",children:[t.jsx(ps,{}),N]})})]}):t.jsxs(bt,{open:d,onOpenChange:A=>{A&&!d&&E("agent_browser_opened",{surface:"desktop_popover"}),h(A)},children:[a?t.jsx(Le,{asChild:!0,children:a}):u?S(t.jsx(Le,{asChild:!0,children:t.jsx(xs,{emptyCtaClass:b})})):t.jsx(js,{wrapEmptyHint:S,highlightEmpty:v,emptyCtaClass:b}),t.jsx(vt,{className:"w-[380px] p-0 overflow-hidden",side:m,align:f,children:N})]}),e[15]=f,e[16]=u,e[17]=b,e[18]=v,e[19]=g,e[20]=d,e[21]=N,e[22]=m,e[23]=a,e[24]=S,e[25]=y):y=e[25];let P;e[26]!==C?(P=t.jsx(jn,{open:C,onOpenChange:p,mode:"agent"}),e[26]=C,e[27]=P):P=e[27];let I;return e[28]!==P||e[29]!==y?(I=t.jsxs(t.Fragment,{children:[y,P]}),e[28]=P,e[29]=y,e[30]=I):I=e[30],I}const ks="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ds(n){const e=z.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,c=B(),r=un(s)??o??null;let l,u,m,f,d;e[0]!==r?.title||e[1]!==a||e[2]!==c?(d=r?.title??c("header.shellBreadcrumb.superAgentDefaultName"),f="flex min-w-0 items-center gap-0",l="button",u=a,m=c("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=r?.title,e[1]=a,e[2]=c,e[3]=l,e[4]=u,e[5]=m,e[6]=f,e[7]=d):(l=e[3],u=e[4],m=e[5],f=e[6],d=e[7]);const h=r?.icon??null;let C;e[8]!==h||e[9]!==d?(C=t.jsx(gt,{icon:h,name:d,size:"xs"}),e[8]=h,e[9]=d,e[10]=C):C=e[10];let p;e[11]!==l||e[12]!==u||e[13]!==m||e[14]!==C?(p=t.jsx("button",{type:l,onClick:u,"aria-label":m,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:C}),e[11]=l,e[12]=u,e[13]=m,e[14]=C,e[15]=p):p=e[15];let g;e[16]!==d?(g=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=g):g=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let v;e[19]!==g?(v=t.jsxs("button",{type:"button",className:ks,children:[g,j]}),e[19]=g,e[20]=v):v=e[20];let b;e[21]!==s||e[22]!==i||e[23]!==v?(b=t.jsx(Ss,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:v}),e[21]=s,e[22]=i,e[23]=v,e[24]=b):b=e[24];let w;return e[25]!==b||e[26]!==f||e[27]!==p?(w=t.jsxs("div",{className:f,children:[p,b]}),e[25]=b,e[26]=f,e[27]=p,e[28]=w):w=e[28],w}function Oo(n){const e=z.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,a=B(),{org:i}=oe(),{state:c,isMobile:r}=pt(),l=Bt().invitations.length>0,u=c==="collapsed"||r;let m;e[2]!==l||e[3]!==i.name||e[4]!==a?(m=l?a("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:i.name}):a("header.shellBreadcrumb.switchOrganization",{name:i.name}),e[2]=l,e[3]=i.name,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==i?(f=t.jsx(lt,{org:i,size:"sm"}),e[6]=i,e[7]=f):f=e[7];let d;e[8]!==l||e[9]!==u?(d=l&&t.jsx("span",{className:K("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=l,e[9]=u,e[10]=d):d=e[10];let h;e[11]!==f||e[12]!==d?(h=t.jsxs("span",{className:"relative inline-flex",children:[f,d]}),e[11]=f,e[12]=d,e[13]=h):h=e[13];let C;e[14]!==i.name||e[15]!==o?(C=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[14]=i.name,e[15]=o,e[16]=C):C=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=p):p=e[17];let g;e[18]!==m||e[19]!==h||e[20]!==C?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[h,C,p]})}),e[18]=m,e[19]=h,e[20]=C,e[21]=g):g=e[21];let j;e[22]!==i.slug||e[23]!==g?(j=t.jsx(os,{orgParam:i.slug,trigger:g}),e[22]=i.slug,e[23]=g,e[24]=j):j=e[24];let v;e[25]!==i.name?(v=t.jsx(ye,{side:"bottom",children:i.name}),e[25]=i.name,e[26]=v):v=e[26];let b;return e[27]!==v||e[28]!==j?(b=t.jsxs(Ne,{children:[j,v]}),e[27]=v,e[28]=j,e[29]=b):b=e[29],b}function Mo(n){const e=z.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=oe();let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[2]=i):i=e[2];const c=st(i);let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[3]=r):r=e[3];const l=ot(r),{threads:u}=Dt(),{data:m}=re.useSession(),{setTaskId:f,createNewTask:d}=At();let h;e[4]!==a.id?(h=at(a.id),e[4]=a.id,e[5]=h):h=e[5];const C=h,p=C.id,g=c.taskId?l.virtualmcpid??p:p;let j;e[6]!==d||e[7]!==p||e[8]!==o||e[9]!==m?.user?.id||e[10]!==f||e[11]!==u?(j=O=>{const x=O??p,k=kn(u,x,m?.user?.id);k?f(k.id,x):d(x),o?.()},e[6]=d,e[7]=p,e[8]=o,e[9]=m?.user?.id,e[10]=f,e[11]=u,e[12]=j):j=e[12];const v=j;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=b):b=e[13];const w=g===p?C:void 0;let S;e[14]!==g||e[15]!==v?(S=()=>v(g),e[14]=g,e[15]=v,e[16]=S):S=e[16];let D;return e[17]!==g||e[18]!==v||e[19]!==w||e[20]!==S?(D=t.jsx(V.Suspense,{fallback:b,children:t.jsx(Ds,{agentId:g,fallback:w,onOpenHome:S,onPick:v})}),e[17]=g,e[18]=v,e[19]=w,e[20]=S,e[21]=D):D=e[21],D}function $o(){const n=z.c(24),e=B(),{org:s}=oe();let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},n[0]=o):o=n[0];const a=st(o);let i;n[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},n[1]=i):i=n[1];const c=ot(i),{threads:r}=Dt(),{createNewTask:l}=At();let u;n[2]!==s.id?(u=at(s.id),n[2]=s.id,n[3]=u):u=n[3];const m=u.id,f=a.taskId?c.virtualmcpid??m:m;let d;n[4]!==a.taskId||n[5]!==r?(d=(a.taskId?r.find(D=>D.id===a.taskId)?.branch:null)??null,n[4]=a.taskId,n[5]=r,n[6]=d):d=n[6];const h=d;let C;n[7]!==f||n[8]!==l||n[9]!==h?(C=()=>{l(f,h)},n[7]=f,n[8]=l,n[9]=h,n[10]=C):C=n[10];const p=C;let g;n[11]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[11]=e,n[12]=g):g=n[12];let j;n[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(sn,{size:16}),n[13]=j):j=n[13];let v;n[14]!==p||n[15]!==g?(v=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:p,"aria-label":g,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:j})}),n[14]=p,n[15]=g,n[16]=v):v=n[16];let b;n[17]!==e?(b=e("sidebar.taskGroupsList.newChat"),n[17]=e,n[18]=b):b=n[18];let w;n[19]!==b?(w=t.jsx(ye,{side:"bottom",children:b}),n[19]=b,n[20]=w):w=n[20];let S;return n[21]!==v||n[22]!==w?(S=t.jsxs(Ne,{children:[v,w]}),n[21]=v,n[22]=w,n[23]=S):S=n[23],S}function Is({open:n,onOpenChange:e,onCreated:s}){const o=B(),{org:a}=oe(),{data:i}=re.useSession(),{stdioEnabled:c}=qt(),r=kt(),l=Ft(),u=Pt(),f=Tt(u,"").items,d=Gt({resolver:Xt(Vn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),h=d.watch("ui_type"),C=d.watch("connection_url"),p=d.watch("npx_package"),g=$e({uiType:h,connectionUrl:C??"",npxPackage:p??""})??ut({uiType:h,connectionUrl:C??"",registryItems:f}),j=x=>{const k=x.trim();if(!k)return;const T=!!d.formState.dirtyFields.title,N=!!d.formState.dirtyFields.description,y=!!d.formState.dirtyFields.env_vars,P=A=>{if(A&&(!T&&!d.getValues("title").trim()&&A.title&&d.setValue("title",A.title,{shouldDirty:!1}),!N&&!(d.getValues("description")??"").trim()&&A.description&&d.setValue("description",A.description,{shouldDirty:!1}),!y&&A.envVarKeys?.length)){const M=d.getValues("env_vars")??[],R=new Set(M.map(L=>L.key)),X=A.envVarKeys.filter(L=>!R.has(L));X.length>0&&d.setValue("env_vars",[...M,...X.map(L=>({key:L,value:""}))],{shouldDirty:!0})}},I=Hn(k);if(I&&c){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",I.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),P($e({uiType:"NPX",npxPackage:I.packageName}));return}if(k.startsWith("http://")||k.startsWith("https://")){const A=h==="HTTP"||h==="SSE"||h==="Websocket"?h:"HTTP";d.setValue("ui_type",A,{shouldDirty:!0}),d.setValue("connection_url",k,{shouldDirty:!0}),P($e({uiType:A,connectionUrl:k})??ut({uiType:A,connectionUrl:k,registryItems:f}));return}h==="NPX"&&P($e({uiType:"NPX",npxPackage:k}))},v=x=>{x||d.reset(),e(x)},b=async x=>{let k,T=null,N=null,y=null;x.ui_type==="NPX"?(k="STDIO",T="",y=Un(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(k="STDIO",T="",y=Kn(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(k=x.ui_type,T=x.connection_url||"",N=x.connection_token||null);const P=In("conn");try{await l.create.mutateAsync({id:P,title:x.title,description:x.description||null,connection_type:k,connection_url:T,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:y,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(P)}catch{H.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},w=o("connections.createConnectionDialog.title"),S=o("connections.createConnectionDialog.description"),D=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),O=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(W,{control:d.control,name:"ui_type",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs($n,{value:x.value,onValueChange:x.onChange,children:[t.jsx(Z,{children:t.jsx(Fn,{children:t.jsx(Bn,{})})}),t.jsxs(Ln,{children:[t.jsx(ke,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(ke,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(ke,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),c&&t.jsxs(t.Fragment,{children:[t.jsx(ke,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(ke,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(on,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),h==="NPX"&&t.jsx(W,{control:d.control,name:"npx_package",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...x,value:x.value??"",onPaste:k=>{const T=k.clipboardData.getData("text");T&&(k.preventDefault(),d.setValue("npx_package",T.trim(),{shouldDirty:!0}),j(T))},onBlur:k=>{j(k.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),h==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(W,{control:d.control,name:"stdio_command",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"stdio_args",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...x,value:x.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...x,value:x.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(h==="NPX"||h==="STDIO")&&t.jsx(W,{control:d.control,name:"env_vars",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(Z,{children:t.jsx(Rn,{value:x.value??[],onChange:x.onChange})}),t.jsx(ee,{})]})}),h!=="NPX"&&h!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(W,{control:d.control,name:"connection_url",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...x,value:x.value??"",onPaste:k=>{const T=k.clipboardData.getData("text");T&&(k.preventDefault(),d.setValue("connection_url",T.trim(),{shouldDirty:!0}),j(T))},onBlur:k=>{j(k.target.value),x.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"connection_token",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:g?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(Z,{children:t.jsx(ce,{type:"password",placeholder:g?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...x,value:x.value??""})}),g?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(W,{control:d.control,name:"title",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ce,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...x})}),t.jsx(ee,{})]})}),t.jsx(W,{control:d.control,name:"description",render:({field:x})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(Z,{children:t.jsx(En,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...x,value:x.value??""})}),t.jsx(ee,{})]})})]});return r?t.jsx(wt,{open:n,onOpenChange:v,children:t.jsxs(_t,{className:"max-h-[90vh]",children:[t.jsx(gn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(St,{children:w}),t.jsx(hn,{className:"mt-1",children:S})]}),t.jsx(pn,{asChild:!0,children:t.jsx(te,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(yt,{size:16})})})]})}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(b),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:O}),t.jsx(xn,{children:t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:D})})]})})]})}):t.jsx(zt,{open:n,onOpenChange:v,children:t.jsxs(Ot,{className:"sm:max-w-[525px]",children:[t.jsxs(Mt,{children:[t.jsx($t,{children:w}),t.jsx(On,{children:S})]}),t.jsx(dt,{...d,children:t.jsxs("form",{onSubmit:d.handleSubmit(b),children:[t.jsx("div",{className:"py-4",children:O}),t.jsxs(Mn,{children:[t.jsx(te,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(te,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:D})]})]})})]})})}function As(n){const e=z.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:c,onConnectAndAdd:r,connectingItemId:l,search:u,onCreateConnection:m,onBrowseNavigate:f,defaultTab:d}=n,h=s===void 0?"add":s,C=d===void 0?"connected":d,p=B(),{org:g}=oe(),j=V.useDeferredValue(u),v=u!==j;let b;e[0]!==j?(b=j.trim().toLowerCase(),e[0]=j,e[1]=b):b=e[1];const w=b;let S;e[2]!==C?(S=_=>_??C,e[2]=C,e[3]=S):S=e[3];const[D,O]=Qt(Wt.connectionsTab(g.slug)+(C==="all"?":home-modal":":agent-modal"),S);let x;e[4]!==D||e[5]!==O?(x=_=>{_!==D&&E("connections_dialog_tab_changed",{to_tab:_}),O(_)},e[4]=D,e[5]=O,e[6]=x):x=e[6];const k=x;let T;e[7]!==g.id||e[8]!==g.slug?(T={connectionId:cn,orgId:g.id,orgSlug:g.slug},e[7]=g.id,e[8]=g.slug,e[9]=T):T=e[9];const N=rn(T),y=j?.trim().split(/\s+/).filter(Boolean)??[],P=y.length>0?{operator:"or",conditions:y.flatMap(Bs)}:void 0,I={...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(I),{data:M,fetchNextPage:R,hasNextPage:X,isFetchingNextPage:L}=Xn({queryKey:it.collectionListInfinite(N,g.id,"","CONNECTIONS",A),queryFn:async _=>{const{pageParam:$}=_,se=$===void 0?0:$;return(await N.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:$s,staleTime:3e4}),ne=M?.pages.flatMap(Ms)??[],q=zn(ne),de=new Set(ne.filter(Os).map(zs)),F=Pt(),ie=Tt(F,j),Re=mt(ie.loadMore,ie.hasMore,ie.isLoadingMore),He=mt(R,X??!1,L),G=D==="all"||!!w,ct=G?ie.items.filter(_=>{const $=An(_);if($&&de.has($))return!1;if(!w)return!0;const se=Ve(_._meta),ae=[_.title,_.description,_.name,_.server?.title,_.server?.description,_.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return y.some(Q=>ae.includes(Q.toLowerCase()))}):[],_e=ct.filter(Ts),Se=ct.filter(Ps);let Ie;e[10]!==a?(Ie=_=>_.some($=>a.has($.id)),e[10]=a,e[11]=Ie):Ie=e[11];const Ue=Ie;let Ae;e[12]!==a||e[13]!==o||e[14]!==l||e[15]!==Ue||e[16]!==h||e[17]!==i||e[18]!==f||e[19]!==c||e[20]!==p?(Ae=(_,$,se,ae,Q)=>{const Me=Ue(Q),be=Q.find(le=>!a.has(le.id)),U=Q[0];if(h==="browse"){const le=qn(U);return t.jsx(Ye,{connection:{title:$,icon:se,description:Q.length>1?`${Q.length} instances`:ae??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Fe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",p("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{E("connection_browse_clicked",{app_name:U.app_name??null,connection_id:U.id,instances_count:Q.length}),f?.(le)}},_)}return t.jsx(Ye,{connection:{title:$,icon:se,description:ae},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Me&&t.jsxs(Fe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",p("virtualMcp.connectionDialogContent.added")]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:le=>{le.stopPropagation(),be?(E("connection_add_clicked",{action:"use_existing",app_name:U.app_name??null,connection_id:be.id}),o&&E("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:U.app_name??null,mode:"existing"}),i(be.id)):(E("connection_add_clicked",{action:"clone",app_name:U.app_name??null,base_connection_id:U.id}),c(U))},children:p("virtualMcp.connectionDialogContent.add")})]})},_)},e[12]=a,e[13]=o,e[14]=l,e[15]=Ue,e[16]=h,e[17]=i,e[18]=f,e[19]=c,e[20]=p,e[21]=Ae):Ae=e[21];const Pe=Ae;let Te;e[22]!==l||e[23]!==h||e[24]!==r||e[25]!==p?(Te=_=>{const $=Ve(_._meta),se=$?.friendlyName||$?.friendly_name||_.server?.title||_.title||_.server?.name||_.name||_.id||"",ae=_.server?.description||_.description||null,Q=_.server?.icons?.[0]?.src||Pn(_.server?.repository)||null,Me=$?.official===!0,be=$?.verified===!0,U=$?.owner==="deco";return t.jsx(Ye,{connection:{title:se,description:ae,icon:Q},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[U&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:p("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByDeco")})]}),!U&&Me&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Fe,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!U&&!Me&&be&&t.jsxs(Ne,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Fe,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:p("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(te,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:le=>{le.stopPropagation(),E("connection_add_clicked",{action:"connect_new",registry_item_id:_.id,app_name:$?.friendlyName||_.server?.name||_.name||null}),r(_)},children:l===_.id?t.jsx(De,{size:14,className:"animate-spin"}):p(h==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${_.id}`)},e[22]=l,e[23]=h,e[24]=r,e[25]=p,e[26]=Te):Te=e[26];const rt=Te;let ue;e[27]!==D||e[28]!==k||e[29]!==m||e[30]!==w||e[31]!==p?(ue=!w&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(Gn,{tabs:[{id:"all",label:p("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:p("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:D,onTabChange:_=>k(_)}),t.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{E("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),p("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=D,e[28]=k,e[29]=m,e[30]=w,e[31]=p,e[32]=ue):ue=e[32];const Ke=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ke?(me=K("flex-1 overflow-auto p-5 transition-opacity duration-150",Ke),e[33]=Ke,e[34]=me):me=e[34];const Et="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ze;e[35]!==Pe?(ze=_=>{if(_.type==="group")return Pe(_.key,_.title,_.icon,null,_.connections);const $=_.connection;return Pe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Pe,e[36]=ze):ze=e[36];const qe=q.map(ze);let fe;e[37]!==He?(fe=t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[37]=He,e[38]=fe):fe=e[38];let ge;e[39]!==L?(ge=L&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(De,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=L,e[40]=ge):ge=e[40];const Ge=G&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(Je,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Xe=G&&_e.map(rt),Qe=G&&Se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:p("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=G&&Se.map(rt);let he;e[41]!==Re||e[42]!==F||e[43]!==G?(he=G&&F.length>0&&t.jsx("div",{ref:Re,className:"col-span-full h-1"}),e[41]=Re,e[42]=F,e[43]=G,e[44]=he):he=e[44];let pe;e[45]!==ie.isLoadingMore||e[46]!==G?(pe=G&&ie.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(De,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=ie.isLoadingMore,e[46]=G,e[47]=pe):pe=e[47];let xe;e[48]!==qe||e[49]!==fe||e[50]!==ge||e[51]!==Ge||e[52]!==Xe||e[53]!==Qe||e[54]!==We||e[55]!==he||e[56]!==pe?(xe=t.jsxs("div",{className:Et,children:[qe,fe,ge,Ge,Xe,Qe,We,he,pe]}),e[48]=qe,e[49]=fe,e[50]=ge,e[51]=Ge,e[52]=Xe,e[53]=Qe,e[54]=We,e[55]=he,e[56]=pe,e[57]=xe):xe=e[57];let je;e[58]!==D||e[59]!==q.length||e[60]!==Se||e[61]!==u||e[62]!==p||e[63]!==_e?(je=q.length===0&&_e.length===0&&Se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?p("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):p(D==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=D,e[59]=q.length,e[60]=Se,e[61]=u,e[62]=p,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let Oe;return e[69]!==ue||e[70]!==ve?(Oe=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=Oe):Oe=e[71],Oe}function Ps(n){return!n.verified&&!Ve(n._meta)?.verified&&!n.meta?.verified}function Ts(n){return n.verified||Ve(n._meta)?.verified||n.meta?.verified}function zs(n){return n.app_name}function Os(n){return n.app_name}function Ms(n){return n?.items??[]}function $s(n,e){if(n?.hasMore)return e.reduce(Fs,0)}function Fs(n,e){return n+(e?.items?.length??0)}function Bs(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Fo({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=B(),c=a.mode??"add",r="agentId"in a?a.agentId:void 0,l="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,u="onAdd"in a&&a.onAdd?a.onAdd:N=>{},m=(N,y,P)=>{r&&E("agent_connection_attached",{agent_id:r,connection_id:N,app_name:y,mode:P})},[f,d]=V.useState(null),[h,C]=V.useState(o),[p,g]=V.useState(!1),{org:j}=oe(),{data:v}=re.useSession(),b=Ft(),w=Yt(),S=nt(),D=N=>{e(!1),S({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:N}})},O=()=>{w.invalidateQueries({predicate:N=>{const y=N.queryKey;return y[1]===j.id&&y[3]==="collection"&&y[4]==="CONNECTIONS"}})},x=async(N,y)=>{E("connection_oauth_succeeded",{connection_id:N,flow:y});const P=new URL(`/api/${j.slug}/mcp/${N}`,window.location.origin);await w.invalidateQueries({queryKey:it.isMCPAuthenticated(P.href,null)}),O()},k=async N=>{d(N.app_name??N.id);try{const P=`${N.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await b.create.mutateAsync({title:P,description:N.description??null,connection_type:N.connection_type,connection_url:N.connection_url??null,connection_token:null,icon:N.icon??null,app_name:N.app_name??null,app_id:N.app_id??null,connection_headers:N.connection_headers??null})).id,M=await et({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:R=>b.update.mutateAsync({id:A,data:{connection_token:R}}).then(()=>{})});if(M.ran&&!M.ok){E("connection_oauth_failed",{connection_id:A,flow:"clone",error:M.error??"no_token"}),H.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:M.error??"no token received"})),await b.delete.mutateAsync(A);return}M.ran&&await x(A,"clone"),m(A,N.app_name??null,"clone"),u(A)}catch(y){console.error("Failed to add connection:",y),H.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},T=async N=>{if(!(!j||!v?.user?.id)){d(N.id);try{const y=Tn(N,j.id,v.user.id,{remoteIndex:0}),P=y.connection_type==="STDIO",I=!!y.connection_url,A=P&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!A){H.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:M}=await b.create.mutateAsync(y),R=await et({connectionId:M,orgId:j.id,orgSlug:j.slug,persistFallback:X=>b.update.mutateAsync({id:M,data:{connection_token:X}}).then(()=>{})});if(R.ran&&!R.ok){E("connection_oauth_failed",{connection_id:M,flow:"connect_new",error:R.error??"no_token"}),H.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:R.error??"no token received"})}),m(M,y.app_name??null,"new"),u(M);return}R.ran?(await x(M,"connect_new"),H.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):H.success(i("virtualMcp.addConnectionDialog.connected")),m(M,y.app_name??null,"new"),u(M)}catch(y){console.error("Failed to connect:",y),H.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return t.jsxs(zt,{open:n,onOpenChange:e,children:[t.jsxs(Ot,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Mt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx($t,{className:"text-base font-semibold",children:i(c==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Dn,{value:h,onChange:C,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(De,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(As,{mode:c,agentId:r,addedConnectionIds:l,onAdd:u,onCloneAndAdd:k,onConnectAndAdd:T,connectingItemId:f,search:h,onCreateConnection:()=>g(!0),onBrowseNavigate:D,defaultTab:s})})]}),t.jsx(Is,{open:p,onOpenChange:g,onCreated:async N=>{g(!1);const y=await et({connectionId:N,orgId:j.id,orgSlug:j.slug,persistFallback:P=>b.update.mutateAsync({id:N,data:{connection_token:P}}).then(()=>{})});if(y.ran&&!y.ok){E("connection_oauth_failed",{connection_id:N,flow:"custom_create",error:y.error??"no_token"}),H.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:y.error??"no token received"})}),m(N,null,"custom"),u(N),e(!1);return}y.ran&&await x(N,"custom_create"),m(N,null,"custom"),u(N),e(!1)}})]})}const ft=new Map;function Bo(){const{org:n}=oe(),e=Qn(),s=Wn(),o=s.find(g=>g.providerId==="deco"),{data:a,isLoading:i,refetch:c,isFetching:r}=Jt({queryKey:it.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=a?.balanceCents??null,u=l!=null?l/100:null,m=V.useRef(new Map);if(l!=null){const g=ft.get(n.id);m.current.get(n.id)&&g!=null&&l>g&&E("credits_topped_up_detected",{organization_id:n.id,delta_cents:l-g,previous_balance_cents:g,new_balance_cents:l}),ft.set(n.id,l),m.current.set(n.id,!0)}const f=!!o,d=l!=null&&l>0,h=l!=null&&l===0,C=l!=null&&l===200,p=s.length>0&&s.every(g=>g.providerId==="deco");return{hasDecoKey:f,decoKeyId:o?.id??null,balanceCents:l,balanceDollars:u,hasCredits:d,isZeroBalance:h,isInitialFreeCredit:C,hasOnlyDecoProvider:p,isLoading:i,isFetching:r,refetch:c}}export{Mo as A,To as C,$o as N,Oo as O,zo as a,Fo as b,os as c,lt as d,Bo as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as c,$ as r,_ as I,a3 as k,a4 as m,a0 as E,ba as C,c as u,F as A,n as O,K as y,o as x,e as $,r as Q}from"./index-uqwqiepi.js";import{W as q}from"./use-mcp-client-B7z15LR5.js";import{c as G,u as U}from"./studio-tools-BqnkL26S.js";c({title:r(),url:r(),icon:r()});c({registries:k(r(),c({enabled:m()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:I(r()).describe("List of MCP app_name or app_id values to hide from the store.")});const g=c({keyId:r(),modelId:r(),title:r().optional()}).nullable();E(["fast","smart","thinking","image","web_search","deep_research"]);E(["fast","smart","thinking"]);const ne=c({tiers:c({fast:g,smart:g,thinking:g,image:g,web_search:g,deep_research:g})});c({tiers:c({fast:g.optional(),smart:g.optional(),thinking:g.optional()})});c({ids:I(r()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});c({demo_mode:m().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:m().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),qa_agent_enabled:m().optional().describe("Run the QA Agent on a task's pull request once it's In Review — it verifies the task actually solved the problem (exercises the feature, not just the diff)."),code_reviewer_enabled:m().optional().describe("Run the Code Reviewer on a task's pull request once it's In Review — it reviews the code using the repo's stack-appropriate review skills."),auto_merge:m().optional().describe("When every enabled reviewer (QA Agent / Code Reviewer) approves a task's pull request, merge it automatically instead of leaving the merge to a human. If the merge is blocked by a conflict with the base branch, hand the PR back to the Super Agent to resolve the conflict (check out the branch, merge the base, push) so it can then merge."),cheap_reviewer_model:m().optional().describe("Run the QA Agent and Code Reviewer on a cheaper model than the Super Agent. A review reads a diff and reaches a verdict; it does not need the model that wrote the code. Off by default — turning it on trades some review depth for cost."),auto_assign_report_tasks_to_super_agent:m().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned.")});const M=new Set(["qa_agent_enabled","code_reviewer_enabled"]);function L(e,t){const n=e?.[t];return M.has(t)?n!==!1:n===!0}c({id:r().describe("Brand context ID"),name:r().describe("Company name"),domain:r().describe("Company domain (e.g. example.com)"),overview:r().describe("Company overview / description"),logo:r().nullable().optional().describe("Logo URL"),favicon:r().nullable().optional().describe("Favicon URL"),ogImage:r().nullable().optional().describe("OG image URL"),fonts:c({heading:r().optional().describe("Font family for headings"),body:r().optional().describe("Font family for body text"),code:r().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:c({primary:r().optional().describe("Primary brand color (hex)"),secondary:r().optional().describe("Secondary brand color (hex)"),accent:r().optional().describe("Accent / highlight color (hex)"),background:r().optional().describe("Background color (hex)"),foreground:r().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:I(k(r(),C())).nullable().optional().describe("Brand images"),metadata:k(r(),C()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:r().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:m().optional().describe("Whether this is the default brand for the organization")});const D={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null,flags:null,main_agent_id:null},F={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(e,t){return{queryKey:y.organizationSettings(t),queryFn:async()=>{try{return await G(e,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...D,organizationId:t}}},staleTime:6e4}}function h(e){const t=u.c(6),{org:n}=A();let a;t[0]!==n.id||t[1]!==n.slug?(a=P(n.slug,n.id),t[0]=n.id,t[1]=n.slug,t[2]=a):a=t[2];const o=e;let s;return t[3]!==a||t[4]!==o?(s={...a,select:o},t[3]=a,t[4]=o,t[5]=s):s=t[5],O(s)}function ae(e,t){const n=u.c(3);let a;n[0]!==e||n[1]!==t?(a=P(t,e),n[0]=e,n[1]=t,n[2]=a):a=n[2];const{data:o}=O(a);return o??null}function p(){const e=u.c(9),{org:t}=A(),n=U(),a=x();let o;e[0]!==t||e[1]!==n?(o=async l=>{const d=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t.id,...l});if(!d)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return d},e[0]=t,e[1]=n,e[2]=o):o=e[2];let s;e[3]!==t||e[4]!==a?(s=l=>{a.setQueryData(y.organizationSettings(t.id),d=>({...d??D,...l}))},e[3]=t,e[4]=a,e[5]=s):s=e[5];let i;return e[6]!==o||e[7]!==s?(i={mutationFn:o,onSuccess:s},e[6]=o,e[7]=s,e[8]=i):i=e[8],$(i)}function K(e){return e?.tiers?{tiers:{fast:e.tiers.fast??null,smart:e.tiers.smart??null,thinking:e.tiers.thinking??null,image:e.tiers.image??null,web_search:e.tiers.web_search??null,deep_research:e.tiers.deep_research??null}}:F}function oe(){const{data:e}=h(W);return e??F}function W(e){return K(e.simple_mode)}function se(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({simple_mode:s},i),a=(s,i)=>t.mutateAsync({simple_mode:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function ie(){return j("reports_only")}function j(e){const t=u.c(5);let n;t[0]!==e?(n=s=>L(s.flags,e),t[0]=e,t[1]=n):n=t[1];const{data:a}=h(n);let o;return t[2]!==a||t[3]!==e?(o=a??M.has(e),t[2]=a,t[3]=e,t[4]=o):o=t[4],o}function re(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i,l)=>t.mutate({flags:{[s]:i}},l),a=(s,i,l)=>t.mutateAsync({flags:{[s]:i}},l),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function B(){const{data:e}=h(Y);return e??null}function Y(e){return e.registry_config}function le(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({registry_config:s},i),a=(s,i)=>t.mutateAsync({registry_config:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function ce(){const{data:e}=h(Z);return e??null}function Z(e){return e.default_home_agents}function H(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({default_home_agents:s},i),a=(s,i)=>t.mutateAsync({default_home_agents:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function ue(){const e=u.c(14),{org:t}=A(),n=H(),a=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Promise.resolve(),e[0]=o):o=e[0];const s=Q.useRef(o);let i;e[1]!==t.id?(i=y.organizationSettings(t.id),e[1]=t.id,e[2]=i):i=e[2];const l=i;let d;e[3]!==l||e[4]!==a?(d=()=>a.getQueryData(l)?.default_home_agents?.ids??[],e[3]=l,e[4]=a,e[5]=d):d=e[5];const S=d;let b;e[6]!==l||e[7]!==t.slug||e[8]!==a||e[9]!==n?(b=z=>{const R=s.current.then(async()=>{const T=a.getQueryData(l),v=z(T?.default_home_agents?.ids??[]);if(v!==null){a.setQueryData(l,f=>f&&{...f,default_home_agents:{ids:v}});try{await n.mutateAsync({ids:v}),await a.refetchQueries({queryKey:y.homeNextActions(t.slug),type:"active"})}catch(f){const N=f;throw a.setQueryData(l,T),N}}});return s.current=R.catch(J),R},e[6]=l,e[7]=t.slug,e[8]=a,e[9]=n,e[10]=b):b=e[10];const w=b;let _;return e[11]!==w||e[12]!==S?(_={currentIds:S,apply:w},e[11]=w,e[12]=S,e[13]=_):_=e[13],_}function J(){}function de(){const e=u.c(3),{data:t,isPending:n}=h(V),a=t??null;let o;return e[0]!==n||e[1]!==a?(o={mainAgentId:a,isPending:n},e[0]=n,e[1]=a,e[2]=o):o=e[2],o}function V(e){return e.main_agent_id??null}function me(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({main_agent_id:s},i),a=(s,i)=>t.mutateAsync({main_agent_id:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function ge(){const e=u.c(5),{org:t}=A(),n=B();let a;e[0]!==t.id?(a=q.REGISTRY(t.id),e[0]=t.id,e[1]=a):a=e[1];const o=a;let s;return e[2]!==o||e[3]!==n?(s=i=>{if(!n)return i===o;const l=n.registries[i];return l?l.enabled:i===o},e[2]=o,e[3]=n,e[4]=s):s=e[4],s}export{ne as S,ie as a,oe as b,ce as c,ue as d,de as e,ge as f,ae as g,me as h,re as i,se as j,B as k,le as l,j as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-tbosqiZ3.js";import{e6 as i}from"./index-uqwqiepi.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-tbosqiZ3.js";import{e6 as u,b3 as n}from"./index-uqwqiepi.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-uqwqiepi.js";import{u as vt,a7 as dt,f as yt}from"./agent-icon-1XcP5pZj.js";import{i as Tt}from"./ChevronRight-hVMksRIi.js";import{L as jt}from"./label-DOIVLygZ.js";import{B as pt}from"./automation-runs-Clp6Ixps.js";import{S as Nt}from"./switch-ZCGs1GMu.js";import{T as wt,c as kt,a as Mt}from"./tooltip-Cw-jjRXl.js";import{V as _t}from"./view-mode-toggle-C-qepPc2.js";import"./AlertCircle-DavubZK8.js";import"./Tool01-CuP6Q18E.js";import"./ArrowUp-DAW7ubga.js";import"./ArrowLeft-DQ3idEt_.js";import"./Tool02-DUxdVP3j.js";import"./XCircle-qfFmQGhn.js";import"./ArrowUpRight-DA59PdAB.js";import"./TrendUp01-C9u3eEk-.js";import"./ZapSquare-pzdsbNjR.js";import"./Users03-Bp4tp_CV.js";import"./CheckCircle-DS3Ua9xs.js";import"./Check-B--Gin3d.js";import"./ChevronDown-DheA-cV2.js";import"./ChevronUp-CZni8u1X.js";import"./DotsVertical-Cdmei-H3.js";import"./Stars02-D2RhCra_.js";import"./Copy01-B25fl0go.js";import"./CpuChip01-BaAOv01U.js";import"./CreditCard01-BkeE0ONF.js";import"./Globe01-NDI4b-UX.js";import"./Settings02-Btqlou-a.js";import"./Eye-CZJ5u40M.js";import"./FilterLines-BEBq5J-I.js";import"./Share07-Er8CctEq.js";import"./Star01--PfaKw_L.js";import"./Globe04-D71gfaN9.js";import"./SwitchHorizontal01-Cz3c8HI4.js";import"./HardDrive-BWGEXjRM.js";import"./Key01-BjgVVl7g.js";import"./LayoutLeft-CWMv-UoM.js";import"./LinkExternal01-CpphPkZ1.js";import"./LogOut01-JU3myzms.js";import"./Monitor01-Bnl3331y.js";import"./Sun-o1Pig8_n.js";import"./Palette-BWyI7FsH.js";import"./Play-Iancy4iV.js";import"./Plus-DUDN-5vq.js";import"./SearchLg-C1G8muB9.js";import"./SearchMd-CDXTsX8U.js";import"./Shield01-BgWyQcJD.js";import"./Stars01-DFHCPMyQ.js";import"./Trash01-CuRx-C0C.js";import"./Upload01-428xVmSe.js";import"./User01-CHnNSmWZ.js";import"./Users01-DoHuWiUf.js";import"./XClose-brUKLM8K.js";import"./X-DLeHa8v1.js";import"./Zap-CsfR49fv.js";import"./select-ByeQyeGq.js";import"./useInfiniteQuery-Dwh9KQC6.js";import"./use-infinite-scroll-tbosqiZ3.js";import"./use-connection-B1SqKG8L.js";import"./use-mcp-client-B7z15LR5.js";import"./auth-D7if_NTM.js";import"./use-virtual-mcp-DqYmn6eJ.js";import"./card-B-SCi-5c.js";import"./sidebar-crcSxCdk.js";import"./use-mobile-Do1CSOcp.js";import"./table-CpRht-qZ.js";import"./empty-state-DZu-Cdq6.js";import"./use-members-7UKobPWt.js";import"./use-org-auth-client-COBKG34J.js";import"./use-clock-tick-Ct5h2lIY.js";import"./use-automations-B6SZf0zK.js";import"./studio-tools-BqnkL26S.js";import"./useSuspenseInfiniteQuery-BJ6zsf6T.js";import"./avatar-CVDW1Cdw.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Cp-dWuyB.js";import"./dialog-vAb5ojPZ.js";import"./tab-id-uw5y2JDe.js";import"./hooks-VEThfl3S.js";import"./decopilot-sse-pool-DQnoPwAa.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CQzgjo0A.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-AFHOz3RT.js";import"./use-decopilot-events-B48ZQbw9.js";import"./use-organization-settings-BDsPJvBC.js";import"./monaco-editor-CYdWUk96.js";import"./spinner-73VcJqpz.js";import"./types-BK8rkT7j.js";import"./shell-layout-7P2c1TpY.js";import"./required-auth-layout-zzpCbRWf.js";import"./use-org-sso-BRqgyoLr.js";import"./integration-icon-ByzXVFR-.js";import"./use-navigate-to-agent-D-QYTWaV.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DrdHAsMw.js";import"./index-CyxKOCc8.js";import"./form-D_ovDLVb.js";import"./input-XduY1XNT.js";import"./file-type-icon-CrR9v93S.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function ft(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)ft(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function Wt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+Wt(e)}function zt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Ut(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(f=>f<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Yt(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Yt(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function or(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const p=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:W,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==N||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,z]}),t[59]=N,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=zt(n),x=B(new Date);o=pt,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Ut(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((p,y)=>{const T=p.getMonth()===n.getMonth(),w=p.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),w=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:p,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,W)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=f(new Date(R)),V=f(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},W))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{or as VariantCalendar};
|