decocms 4.333.0 → 4.333.1
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-2FuWzu9s.js → AlertCircle-BTFy6BAW.js} +1 -1
- package/dist/client/assets/{AreaChart-DqWmfGLg.js → AreaChart-DSs8q5hW.js} +1 -1
- package/dist/client/assets/{ArrowLeft-bEYr2bR3.js → ArrowLeft-BFcs8--9.js} +1 -1
- package/dist/client/assets/{ArrowUp-C0OLvfKW.js → ArrowUp-B4MJgvoo.js} +1 -1
- package/dist/client/assets/{Check-DO2G0jss.js → Check-DwjDJM-e.js} +1 -1
- package/dist/client/assets/{CheckCircle-CREsdSKg.js → CheckCircle-yz9oH-hl.js} +1 -1
- package/dist/client/assets/{ChevronRight-Bv78hiSn.js → ChevronRight-DYEas-7w.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BatxgMnG.js → ChevronSelectorVertical-CYA4row8.js} +1 -1
- package/dist/client/assets/{ChevronUp-B1bYzfKy.js → ChevronUp-BJVPazTv.js} +1 -1
- package/dist/client/assets/{Copy01-BVsrdQDQ.js → Copy01-B-BJTFHA.js} +1 -1
- package/dist/client/assets/{CreditCard01-DP0wQ8GO.js → CreditCard01-DUaRmbQT.js} +1 -1
- package/dist/client/assets/{DotsVertical-BxE6Qzx1.js → DotsVertical-BnLAk1HF.js} +1 -1
- package/dist/client/assets/{Download01-CUMAA0wr.js → Download01-BeFD8RLb.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DE6P55td.js → ErrorBarContext-B1DKdQyC.js} +1 -1
- package/dist/client/assets/{Eye-DacU84Gw.js → Eye-CGydtoCl.js} +1 -1
- package/dist/client/assets/{GitBranch01-BK3Rys-e.js → GitBranch01-B488OLBu.js} +1 -1
- package/dist/client/assets/{Globe01-B2UXGddW.js → Globe01-DU-TjG2G.js} +1 -1
- package/dist/client/assets/{HardDrive-0G1VW3K_.js → HardDrive-QkBXYJpL.js} +1 -1
- package/dist/client/assets/{Image01-BZdSR7N7.js → Image01-BCVknkBI.js} +1 -1
- package/dist/client/assets/{Key01-CBG1tvdV.js → Key01-DKp7pFxH.js} +1 -1
- package/dist/client/assets/{Link01-CicSmnCv.js → Link01-DmmpktbQ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CC4fQBHh.js → LinkExternal01-D9h2hMLG.js} +1 -1
- package/dist/client/assets/{Monitor01-BAdUHwVK.js → Monitor01-4ygKdvkY.js} +1 -1
- package/dist/client/assets/{Package-CSZRR87z.js → Package-CtUTNDbn.js} +1 -1
- package/dist/client/assets/{Palette-C3xnXk2T.js → Palette-CuyACpQT.js} +1 -1
- package/dist/client/assets/{Play-B4QvGpVJ.js → Play-DmtHRxIa.js} +1 -1
- package/dist/client/assets/{Plus-DrOn8oV5.js → Plus-BwfD_uGX.js} +1 -1
- package/dist/client/assets/{SearchMd-DI6yFOGz.js → SearchMd-OYMERvDp.js} +1 -1
- package/dist/client/assets/{Sector-0HC2UpFx.js → Sector-Cxd5Vqw1.js} +1 -1
- package/dist/client/assets/{Settings02-Czgtan09.js → Settings02-DHdkIaEO.js} +1 -1
- package/dist/client/assets/{Share07-DN3UDc19.js → Share07-DWyqd3EW.js} +1 -1
- package/dist/client/assets/{Shield01-c_3a3WNn.js → Shield01-PuBIgAYu.js} +1 -1
- package/dist/client/assets/{Stars01-nKGUl2lZ.js → Stars01-C0xoIEKM.js} +1 -1
- package/dist/client/assets/{Sun-DAdiOosy.js → Sun-vpvyjwcu.js} +1 -1
- package/dist/client/assets/{Tool01-Dx1CrkEi.js → Tool01-bT3k5A80.js} +1 -1
- package/dist/client/assets/{Tool02-B0lv3CeD.js → Tool02-DjVjeZBe.js} +1 -1
- package/dist/client/assets/{Trash01-RqfCMp0d.js → Trash01-DSQfDFOn.js} +1 -1
- package/dist/client/assets/{TrendUp01-BKuD9eGz.js → TrendUp01-Bud-Q_uE.js} +1 -1
- package/dist/client/assets/{Upload01-LAHHIMcG.js → Upload01-4ExYT2oZ.js} +1 -1
- package/dist/client/assets/{User01-BIt7pxYR.js → User01-ByrqWXwf.js} +1 -1
- package/dist/client/assets/{UserSquare-k-QIrJit.js → UserSquare-CSuypI3s.js} +1 -1
- package/dist/client/assets/{Users01-nLS7SKJc.js → Users01-Dbi5hk9T.js} +1 -1
- package/dist/client/assets/{Users03-9JHuDSS-.js → Users03-DbJ2AwbA.js} +1 -1
- package/dist/client/assets/{XCircle-BuC0-e8L.js → XCircle-BKk3e_Pa.js} +1 -1
- package/dist/client/assets/{XClose-B2pafOkr.js → XClose-ukOa_f_u.js} +1 -1
- package/dist/client/assets/{Zap-BGwq72gO.js → Zap-Rks6fV0P.js} +1 -1
- package/dist/client/assets/{ZoomOut-RZ3cdsdc.js → ZoomOut-BzikjErF.js} +1 -1
- package/dist/client/assets/{access-gate-Dh_uO_AA.js → access-gate-f2VYxUVW.js} +1 -1
- package/dist/client/assets/{agent-icon-CeqQgaQ2.js → agent-icon-4L9UdHrZ.js} +1 -1
- package/dist/client/assets/{agents-list-B_18T-Ct.js → agents-list-8XcVzC0a.js} +1 -1
- package/dist/client/assets/{ai-providers-BH1gVY1q.js → ai-providers-CmW2bDvE.js} +1 -1
- package/dist/client/assets/{alert-BBJiCGV0.js → alert-DOZ50Qdr.js} +1 -1
- package/dist/client/assets/{alert-dialog-DnVDqV37.js → alert-dialog-CNWHKEKH.js} +1 -1
- package/dist/client/assets/{analytics-tab-B0hdw7_q.js → analytics-tab-DhfgwWZN.js} +1 -1
- package/dist/client/assets/api-keys-Bl6B3w6F.js +1 -0
- package/dist/client/assets/{api-keys-BFejC-ww.js → api-keys-CZVvqUk3.js} +1 -1
- package/dist/client/assets/app-editor-DjjwL1v8.js +1 -0
- package/dist/client/assets/{auth-catchall-C2A1Oyxs.js → auth-catchall-B_cY4w7Q.js} +1 -1
- package/dist/client/assets/{auth-entry-BxbrFRjB.js → auth-entry-CslryGGp.js} +1 -1
- package/dist/client/assets/{auth-Cin2PpHG.js → auth-qDUFPtfK.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CMW0JC0F.js → auth-split-layout-zIPjfmlI.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CKwK5h3D.js → authenticate-and-persist-oauth-Daei89hL.js} +1 -1
- package/dist/client/assets/{automation-list-row-DBcwSKtS.js → automation-list-row-Dzx6wCBX.js} +1 -1
- package/dist/client/assets/{automation-runs-DOtw1COE.js → automation-runs-D7GlyHC6.js} +1 -1
- package/dist/client/assets/{automations-Brt_5VVG.js → automations-CJZQ-sJv.js} +1 -1
- package/dist/client/assets/{autosend-CLdZNctb.js → autosend-LylwcR5t.js} +1 -1
- package/dist/client/assets/{avatar-z3ILXpzW.js → avatar-CrEMeFKK.js} +1 -1
- package/dist/client/assets/{badge-DFPgIJ4U.js → badge-BNvTAGyB.js} +1 -1
- package/dist/client/assets/{block-document-HtkECyHA.js → block-document-DHwj6mHK.js} +1 -1
- package/dist/client/assets/{breadcrumb-QlRZdmdY.js → breadcrumb-DcTQk8wd.js} +1 -1
- package/dist/client/assets/{buckets-qd4HGBcA.js → buckets-EIjTBTJi.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-lpjG-Yxt.js → bulk-category-panel-CVxDOey1.js} +1 -1
- package/dist/client/assets/{capability-load-error-CwNgra0T.js → capability-load-error-D3JcMIIZ.js} +1 -1
- package/dist/client/assets/{cards-DMmb6eSJ.js → cards-EdAkV2cQ.js} +1 -1
- package/dist/client/assets/{category-editor-CbiAPKcu.js → category-editor-DDVjfAV5.js} +1 -1
- package/dist/client/assets/{cdn-tab-CzJrHB9E.js → cdn-tab-BacYnkrL.js} +1 -1
- package/dist/client/assets/{chart-DRGIkpsa.js → chart-CnL2iB1c.js} +1 -1
- package/dist/client/assets/{chat-context-CXikYHMp.js → chat-context-bHFZIJkS.js} +1 -1
- package/dist/client/assets/{checkbox-Be9sxpsE.js → checkbox-D-Q26Ekb.js} +1 -1
- package/dist/client/assets/{choose-editor-DC6TyRub.js → choose-editor-MVFUACVx.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BtdwlOns.js → cli-auth-success-BqbAQ7U8.js} +1 -1
- package/dist/client/assets/{client-icons-DenKCMqi.js → client-icons-BBY74FzQ.js} +1 -1
- package/dist/client/assets/{collection-detail-oDNreBoa.js → collection-detail-Du-XoszR.js} +1 -1
- package/dist/client/assets/{collection-display-button-BNBveIEy.js → collection-display-button-BdVWJHTi.js} +1 -1
- package/dist/client/assets/{collection-search-BLQqv6oz.js → collection-search-Cvc-x2kO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-TzuRU8wZ.js → collection-table-wrapper-DG1e9CNr.js} +1 -1
- package/dist/client/assets/{collection-tabs-C-GF3jZK.js → collection-tabs-Ds4GfwrJ.js} +1 -1
- package/dist/client/assets/{command-C1UcSHzR.js → command-Cnkz9b5I.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CClweQe8.js → commerce-onboarding-CWyzcAv3.js} +1 -1
- package/dist/client/assets/{connect-D6oiU5zY.js → connect-DapCvVwu.js} +1 -1
- package/dist/client/assets/{connect-layout-CagKi4cL.js → connect-layout-J3BwhODa.js} +1 -1
- package/dist/client/assets/{connection-DP3fnttm.js → connection-Bd7s7-M5.js} +1 -1
- package/dist/client/assets/{connection-card-D-1ZHQJG.js → connection-card-B-eJ6L9X.js} +1 -1
- package/dist/client/assets/{connection-detail-DhTBp4nP.js → connection-detail-BC_TwmdR.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BrNiOhNX.js → connection-form-helpers-CEeoAidC.js} +1 -1
- package/dist/client/assets/connections-37gbKaLU.js +1 -0
- package/dist/client/assets/{create-organization-dialog-nn7H7xMI.js → create-organization-dialog-B-BpfNrw.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Bq1HTx_2.js → decopilot-sse-pool-B_LcTJNO.js} +1 -1
- package/dist/client/assets/{dialog-C4A7JbKT.js → dialog-CH-0rO0D.js} +1 -1
- package/dist/client/assets/{domain-settings-1oNg1FY4.js → domain-settings-Cuj44Cqa.js} +1 -1
- package/dist/client/assets/{drawer-DuzitAud.js → drawer-CGk2HWB4.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bm13rBvn.js → dropdown-menu-D5fHrVh2.js} +1 -1
- package/dist/client/assets/{e2e-tab-CXt4jXpZ.js → e2e-tab-DQTHSDSM.js} +1 -1
- package/dist/client/assets/{editor-Dg1pfr-y.js → editor-BZLAQS2F.js} +1 -1
- package/dist/client/assets/{empty-state-CCF0e0P7.js → empty-state-BmNPLbpc.js} +1 -1
- package/dist/client/assets/{empty-state-Xrw9o0Wi.js → empty-state-Cz_Vrj2h.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C-5_Ef0W.js → extract-connection-data-9CnRjsL7.js} +1 -1
- package/dist/client/assets/{file-explorer-CxQg_bm-.js → file-explorer-CA8kCzXW.js} +1 -1
- package/dist/client/assets/{file-type-icon-D778Yc-E.js → file-type-icon-CxKRWPrC.js} +1 -1
- package/dist/client/assets/{folder-icon-sfjIxqMa.js → folder-icon-WgiVurrr.js} +1 -1
- package/dist/client/assets/{form-v6gNMqlC.js → form-BZnL3JbV.js} +1 -1
- package/dist/client/assets/{general-BdJHr5HO.js → general-ylVfpyeS.js} +1 -1
- package/dist/client/assets/{github-icon-D163QBtr.js → github-icon-D1HTxLVV.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BAINOCSo.js → github-repo-picker-DWgD3Ont.js} +1 -1
- package/dist/client/assets/{hooks-BRS-lpOQ.js → hooks-DU7Lnk4h.js} +1 -1
- package/dist/client/assets/{hosting-tab-DHqvL2WK.js → hosting-tab-Il_9SZH1.js} +1 -1
- package/dist/client/assets/{index-CnhVveo_.js → index-B2V_cELZ.js} +1 -1
- package/dist/client/assets/{index-DazxVKwe.js → index-BHhIm7ma.js} +4 -4
- package/dist/client/assets/{index-Db-ch7uB.js → index-BLGIODXV.js} +33 -33
- package/dist/client/assets/{index-DG3bk3jm.js → index-Bgjy4VL9.js} +1 -1
- package/dist/client/assets/{index-DyK8c7oG.js → index-Bq7Yyy_W.js} +1 -1
- package/dist/client/assets/{index-BrMSRwXm.js → index-BukSeAl0.js} +1 -1
- package/dist/client/assets/{index-DG37qRJ0.js → index-Cb75tE4e.js} +1 -1
- package/dist/client/assets/{index-CyxaLTj8.js → index-CoZzVb9L.js} +1 -1
- package/dist/client/assets/{index-BwpoDNrO.js → index-Ctv5km7_.js} +1 -1
- package/dist/client/assets/{index-aoadXfsL.js → index-ngeOqo_9.js} +1 -1
- package/dist/client/assets/{index-redirect-B61MK54i.js → index-redirect-DGzmzmCo.js} +1 -1
- package/dist/client/assets/{infra-billing-DhWNBYp3.js → infra-billing-C9LpIybA.js} +1 -1
- package/dist/client/assets/{input-C3oT2T2R.js → input-CNvHCeDs.js} +1 -1
- package/dist/client/assets/{integration-icon-BvHA8yrC.js → integration-icon-CH8e3gVK.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C7m2ZLIv.js → invite-member-dialog-BifrraOw.js} +1 -1
- package/dist/client/assets/{label-BV8TINqQ.js → label-PBaYRRki.js} +1 -1
- package/dist/client/assets/{layout-C7mYjzIJ.js → layout-syCLZWd-.js} +1 -1
- package/dist/client/assets/{login-Cu68lZ6w.js → login-BUtaqiIl.js} +1 -1
- package/dist/client/assets/{markdown-Czzq3Ki5.js → markdown-z-gnRvvL.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CTtLXB1w.js → mcp-app-renderer-CRMlxj39.js} +1 -1
- package/dist/client/assets/{mcp-oauth-nqHbSGLu.js → mcp-oauth-D0Lae-jo.js} +1 -1
- package/dist/client/assets/{members-CRX0M1OS.js → members-BzTONOwn.js} +1 -1
- package/dist/client/assets/{monaco-editor-B7wFx4ao.js → monaco-editor-3xHcN_JH.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CuyaZMeg.js → monitoring-stats-row-EkzT5h5-.js} +1 -1
- package/dist/client/assets/{multi-select-CNJJBFfx.js → multi-select-BpQiHKo4.js} +1 -1
- package/dist/client/assets/{oauth-callback-DdXr-Wl3.js → oauth-callback-CiTO-oBN.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D8PF-zok.js → oauth-callback-ai-provider-BTYMf6vG.js} +1 -1
- package/dist/client/assets/{onboarding-C4EJcJxA.js → onboarding-DpP3li2K.js} +1 -1
- package/dist/client/assets/{org-layout-CvwiNwyn.js → org-layout-PpVzP9Y2.js} +1 -1
- package/dist/client/assets/{organization-choice-DBcWQoMX.js → organization-choice-BEwurRMd.js} +1 -1
- package/dist/client/assets/{orgs-C5G7ludj.js → orgs-BLqU6zd8.js} +1 -1
- package/dist/client/assets/{page-seo-form-4vQHdUwb.js → page-seo-form-D7vAQb5-.js} +1 -1
- package/dist/client/assets/{popover-BTarHHWz.js → popover-B7Yd7fqk.js} +1 -1
- package/dist/client/assets/{post-calendar-AMmQ7yOS.js → post-calendar-BsHr4FVw.js} +1 -1
- package/dist/client/assets/{post-editor-CT5qUtFr.js → post-editor-BFrcSI2t.js} +1 -1
- package/dist/client/assets/{primitives-iRTw_HYp.js → primitives-CS6lJ5h3.js} +1 -1
- package/dist/client/assets/{profile-QiNBnh4i.js → profile-DNe6fIOM.js} +1 -1
- package/dist/client/assets/{project-app-view-dVJoqrF8.js → project-app-view-BPELaq7t.js} +1 -1
- package/dist/client/assets/{project-icon-ChHoI4AV.js → project-icon-D7I6A3_J.js} +1 -1
- package/dist/client/assets/{prompts-QNHDL0I7.js → prompts-C1RPZ82w.js} +1 -1
- package/dist/client/assets/record-editor-BNOGxoEg.js +1 -0
- package/dist/client/assets/redirect-editor-rngbGY5p.js +1 -0
- package/dist/client/assets/registry-D1LNW7pm.js +2 -0
- package/dist/client/assets/{registry-layout-BLet8Gm_.js → registry-layout-D6IVakv4.js} +1 -1
- package/dist/client/assets/{reports-DGxpWGGa.js → reports-C1UvSzxb.js} +1 -1
- package/dist/client/assets/{require-capability-B0LGS60G.js → require-capability-B80Yv7le.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Ds-2VKin.js → required-auth-layout-CZUnmZTh.js} +1 -1
- package/dist/client/assets/{reset-password-BjYr3zCE.js → reset-password-C7F_Yocf.js} +1 -1
- package/dist/client/assets/{review-settings-msTKQtzY.js → review-settings-BVKaC_S6.js} +1 -1
- package/dist/client/assets/{roles-saYEHcq9.js → roles-CNrNhe10.js} +1 -1
- package/dist/client/assets/{schema-BdixUI5x.js → schema-i1vhtuiw.js} +1 -1
- package/dist/client/assets/{scroll-area-BTDW6Kpe.js → scroll-area-ewoQOcUe.js} +1 -1
- package/dist/client/assets/{search-input-Bha9g1ol.js → search-input-DaEiOtLU.js} +1 -1
- package/dist/client/assets/{secrets-CJibFD8d.js → secrets-eYjaEu1z.js} +1 -1
- package/dist/client/assets/{sections-editor-CvcabjZ9.js → sections-editor-BPjMLfz0.js} +1 -1
- package/dist/client/assets/{select-CPJFmsFk.js → select-N7ZeidNI.js} +1 -1
- package/dist/client/assets/{select-model-BA7yLQah.js → select-model-g5mfrvhI.js} +1 -1
- package/dist/client/assets/{self-tool-result-ZsPCadd5.js → self-tool-result-DZ92b_i5.js} +1 -1
- package/dist/client/assets/{seo-editor-BCLf2nIO.js → seo-editor-CFXqnb9O.js} +1 -1
- package/dist/client/assets/settings-layout-Ct4eIpaZ.js +1 -0
- package/dist/client/assets/{settings-sidebar-BKDmkN3_.js → settings-sidebar-zIWdEoeS.js} +1 -1
- package/dist/client/assets/{shell-controls-ZYXTm6Q4.js → shell-controls-BwSAKg0R.js} +1 -1
- package/dist/client/assets/{shell-layout-PnOuEYkY.js → shell-layout-i77p36_F.js} +1 -1
- package/dist/client/assets/{skill-preview-DyU0zyX5.js → skill-preview-C2LzCwY6.js} +1 -1
- package/dist/client/assets/{skills-M3pECs6x.js → skills-DOYEfzT9.js} +1 -1
- package/dist/client/assets/{sso-TfPKp_lW.js → sso-Cy_zS9m2.js} +1 -1
- package/dist/client/assets/{store-BQb9iY3W.js → store-BJvgDnnk.js} +1 -1
- package/dist/client/assets/store-registry-i1uqeqzC.js +2 -0
- package/dist/client/assets/{switch-DU5OTPcA.js → switch-BDvVFwZc.js} +1 -1
- package/dist/client/assets/{synced-repos-CnAvxq_V.js → synced-repos-Dj4rk85W.js} +1 -1
- package/dist/client/assets/{table-CUukdb8a.js → table-UAWDjAZv.js} +1 -1
- package/dist/client/assets/{tabs-YjhTxcqb.js → tabs-BcGd4rfc.js} +1 -1
- package/dist/client/assets/{task-board-DSpc5SOF.js → task-board-CGOlen4V.js} +1 -1
- package/dist/client/assets/{task-route-6vOiSdMp.js → task-route-DCzx2AsP.js} +1 -1
- package/dist/client/assets/{tasks-Nh8oSpyO.js → tasks-CdIUQJjc.js} +1 -1
- package/dist/client/assets/{textarea-DxtFO5Xe.js → textarea-BQnZi6Mk.js} +1 -1
- package/dist/client/assets/{thread-intent-BDrjbl6-.js → thread-intent-BEowo4Lh.js} +1 -1
- package/dist/client/assets/{thread-route-BUNvSnEK.js → thread-route-7_0yPXBi.js} +1 -1
- package/dist/client/assets/{toggle-group-B9czzvVd.js → toggle-group-DMBT7ISL.js} +1 -1
- package/dist/client/assets/{toolbar-06p7ly9Z.js → toolbar-D67qKm6Z.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-WHBCotUZ.js → toolbar-icon-button-BC0i6BCW.js} +1 -1
- package/dist/client/assets/{track-CFXpByla.js → track-CrXTf8e1.js} +1 -1
- package/dist/client/assets/{types-B1m98EcZ.js → types-DelYfmpK.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B7EnH7M_.js → use-ai-providers-4I4ltuBS.js} +1 -1
- package/dist/client/assets/{use-automations-CXY_sVpH.js → use-automations-DKPRSbzO.js} +1 -1
- package/dist/client/assets/{use-autosave-BST5I2Nq.js → use-autosave-D6f-rMFX.js} +1 -1
- package/dist/client/assets/{use-connection-DXl8cmGz.js → use-connection-CQKO8y6-.js} +1 -1
- package/dist/client/assets/{use-copy-BtZx-t7s.js → use-copy-eESDyX8j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CtELxVJX.js → use-create-virtual-mcp-CbTJUHL5.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CLVR-fXs.js → use-debounced-autosave-DjdjKsh4.js} +1 -1
- package/dist/client/assets/{use-debounced-value-yXAfzgUS.js → use-debounced-value-cslL_Hm7.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-HTHUEjlx.js → use-decopilot-events-BTZniLNe.js} +1 -1
- package/dist/client/assets/{use-delete-connection-ZUQz-oNS.js → use-delete-connection-oJOo-Hse.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CS6loZGy.js → use-deployment-admin-BtvwykxQ.js} +1 -1
- package/dist/client/assets/{use-destination-route-a_NNhc7l.js → use-destination-route-DsqQwnx_.js} +1 -1
- package/dist/client/assets/{use-file-configs-C_jcMgto.js → use-file-configs-xLONZ3FN.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CEi39WnQ.js → use-infinite-scroll-DtKOCBow.js} +1 -1
- package/dist/client/assets/{use-join-requests-DZ_Gxbow.js → use-join-requests--e9FBTWa.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-87U3nGRQ.js → use-mcp-auth-status-r1JszsrV.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dwzvsljf.js → use-mcp-client-COsTAu0Z.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Cc-vI409.js → use-mcp-prompts-6zzWtc8W.js} +1 -1
- package/dist/client/assets/{use-members-vAOdn4Ha.js → use-members-j-NCdySC.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-suis0hX4.js → use-navigate-to-agent-BP_Y2M5A.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dl1mSn-W.js → use-org-auth-client-B2t1sLB6.js} +1 -1
- package/dist/client/assets/{use-org-notice-CWs0mQlj.js → use-org-notice-D-n1tSdk.js} +1 -1
- package/dist/client/assets/{use-org-sso-vFWNFLoQ.js → use-org-sso-BmWo5zsO.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DCY0jOBn.js → use-organization-roles-EUKb-rJf.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Qht8toqP.js → use-organization-settings-BsIJjAld.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-oUGHyCkk.js → use-panel-navigate-D5cy0uKE.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CrAxz7eP.js → use-registry-connections-DSuA8Kly.js} +1 -1
- package/dist/client/assets/{use-secrets-Y_TsKLf6.js → use-secrets-DRXCbLBF.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-B1qbmqRo.js → use-section-preview-base-CWwMJYkC.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Bp0LSQod.js → use-status-sounds-DzjHc2GT.js} +1 -1
- package/dist/client/assets/{use-tags-DdBMF6f_.js → use-tags-B9Y9DMtO.js} +1 -1
- package/dist/client/assets/{use-view-mode-BP1No8cH.js → use-view-mode-BLMqtyeU.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DktU_5Et.js → use-virtual-mcp-q0kRTctd.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DCkmSmSx.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CPPqBcZd.js +1 -0
- package/dist/client/assets/{users-ryfjgZZO.js → users-D7a7B9QB.js} +1 -1
- package/dist/client/assets/{variant-calendar-DNnRe9iD.js → variant-calendar-D6Y4I8eV.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-ulwnNUOV.js → view-mode-toggle-BT1BtAOg.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/api-keys-DCEkSBys.js +0 -1
- package/dist/client/assets/app-editor-DeQCkg-r.js +0 -1
- package/dist/client/assets/connections-hQc_vhuj.js +0 -1
- package/dist/client/assets/record-editor-BE8CwnrX.js +0 -1
- package/dist/client/assets/redirect-editor-oD5TPCEW.js +0 -1
- package/dist/client/assets/registry-SfNZ_9EA.js +0 -2
- package/dist/client/assets/settings-layout-Ddg2FzYZ.js +0 -1
- package/dist/client/assets/store-registry-1XvU9Ib9.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CfdptQxT.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DeCbRiVI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-BHhIm7ma.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-
|
|
1
|
+
import{c as m,G as x,K as y,m as I,n as R,e as P,r as A,j as g}from"./index-BHhIm7ma.js";import{s as D}from"./Eye-CGydtoCl.js";function nt(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function S(s,t,e,n){const r=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(t)}/${e}${r?`?${r}`:""}`}async function F(s,t,e){const n=await fetch(s,t);if(n.ok||e?.allow404&&n.status===404)return n;let r="";try{r=(await n.json()).error??""}catch{}throw new Error(r||`HTTP ${n.status}`)}function rt(s,t){const e=m.c(15),{org:n}=x();let r;e[0]!==n.id||e[1]!==t||e[2]!==s?(r=y.orgFsList(n.id,s,t),e[0]=n.id,e[1]=t,e[2]=s,e[3]=r):r=e[3];let i;e[4]!==n.id||e[5]!==s?(i=(c,l)=>l?.queryKey[1]===n.id&&l.queryKey[2]===s?c:void 0,e[4]=n.id,e[5]=s,e[6]=i):i=e[6];let a;e[7]!==n.slug||e[8]!==t||e[9]!==s?(a=async()=>(await(await F(S(n.slug,s,"list",{path:t}))).json()).entries.toSorted(M),e[7]=n.slug,e[8]=t,e[9]=s,e[10]=a):a=e[10];let o;return e[11]!==r||e[12]!==i||e[13]!==a?(o={queryKey:r,placeholderData:i,queryFn:a},e[11]=r,e[12]=i,e[13]=a,e[14]=o):o=e[14],I(o)}function M(s,t){return s.kind!==t.kind?s.kind==="dir"?-1:1:s.path.localeCompare(t.path)}async function B(s,t,e){const n=await F(S(s,t,"stat",{path:e}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function it(s,t,e){const n=m.c(15),{org:r}=x();let i;n[0]!==r.id||n[1]!==t||n[2]!==s?(i=y.orgFsStat(r.id,s??"",t),n[0]=r.id,n[1]=t,n[2]=s,n[3]=i):i=n[3];const a=s!==null;let o;n[4]!==e?(o=e?.refetchIntervalWhenAbsent?d=>d.state.data?!1:e.refetchIntervalWhenAbsent??!1:void 0,n[4]=e,n[5]=o):o=n[5];let c;n[6]!==r.slug||n[7]!==t||n[8]!==s?(c=()=>B(r.slug,s??"",t),n[6]=r.slug,n[7]=t,n[8]=s,n[9]=c):c=n[9];let l;return n[10]!==i||n[11]!==a||n[12]!==o||n[13]!==c?(l={queryKey:i,enabled:a,refetchInterval:o,queryFn:c},n[10]=i,n[11]=a,n[12]=o,n[13]=c,n[14]=l):l=n[14],I(l)}function ot(s){const t=m.c(9),{org:e}=x();let n;t[0]!==e.id||t[1]!==s?(n=y.orgFsUsage(e.id,s),t[0]=e.id,t[1]=s,t[2]=n):n=t[2];let r;t[3]!==e.slug||t[4]!==s?(r=async()=>await(await F(S(e.slug,s,"usage"))).json(),t[3]=e.slug,t[4]=s,t[5]=r):r=t[5];let i;return t[6]!==n||t[7]!==r?(i={queryKey:n,queryFn:r},t[6]=n,t[7]=r,t[8]=i):i=t[8],I(i)}function at(s,t){const e=m.c(9),n=s===void 0?60:s,{org:r}=x();let i;e[0]!==r.id?(i=y.orgFsRecent(r.id),e[0]=r.id,e[1]=i):i=e[1];const a=t?.enabled;let o;e[2]!==n||e[3]!==r.slug?(o=async()=>(await(await F(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${n}`)).json()).entries,e[2]=n,e[3]=r.slug,e[4]=o):o=e[4];let c;return e[5]!==i||e[6]!==a||e[7]!==o?(c={queryKey:i,enabled:a,queryFn:o},e[5]=i,e[6]=a,e[7]=o,e[8]=c):c=e[8],I(c)}const Q=50;function lt(s,t){const e=m.c(16),{org:n}=x();let r;e[0]!==n.id||e[1]!==s||e[2]!==t?.prefix||e[3]!==t?.volume?(r=y.orgFsSearch(n.id,s,t?.volume??"",t?.prefix??""),e[0]=n.id,e[1]=s,e[2]=t?.prefix,e[3]=t?.volume,e[4]=r):r=e[4];const i=s.length>0;let a;e[5]!==n.id?(a=(l,d)=>d?.queryKey[1]===n.id?l:void 0,e[5]=n.id,e[6]=a):a=e[6];let o;e[7]!==n.slug||e[8]!==s||e[9]!==t?(o=async()=>{const l=new URLSearchParams({q:s,limit:String(Q)});return t&&(l.set("volume",t.volume),t.prefix&&l.set("prefix",t.prefix)),(await(await F(`/api/${encodeURIComponent(n.slug)}/fs/search?${l}`)).json()).entries},e[7]=n.slug,e[8]=s,e[9]=t,e[10]=o):o=e[10];let c;return e[11]!==r||e[12]!==i||e[13]!==a||e[14]!==o?(c={queryKey:r,enabled:i,placeholderData:a,queryFn:o},e[11]=r,e[12]=i,e[13]=a,e[14]=o,e[15]=c):c=e[15],I(c)}function ct(s){const t=m.c(8),{org:e}=x();let n;t[0]!==e.id?(n=y.orgFsSkills(e.id),t[0]=e.id,t[1]=n):n=t[1];const r=s?.enabled;let i;t[2]!==e.slug?(i=async()=>{const o=await F(`/api/${encodeURIComponent(e.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(N)},t[2]=e.slug,t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a={queryKey:n,enabled:r,queryFn:i},t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],I(a)}function N(s){return{volume:s.volume,path:s.path}}async function W(s){const t=await F(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:e}=await t.json();return e}function ft(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.slashSkills(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=()=>W(t.slug),s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,queryFn:n,staleTime:6e4},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}async function H(s,t,e){return(await F(S(s,t,"read",{path:e}))).text()}function dt(s,t){const e=m.c(8);let n;e[0]!==s?(n=y.fileText(s),e[0]=s,e[1]=n):n=e[1];const r=t?.enabled!==!1&&s!=="";let i;e[2]!==s?(i=async()=>{const o=await fetch(s,{credentials:"include"});return o.ok?await o.text():null},e[2]=s,e[3]=i):i=e[3];let a;return e[4]!==n||e[5]!==r||e[6]!==i?(a={queryKey:n,enabled:r,staleTime:6e4,retry:!1,queryFn:i},e[4]=n,e[5]=r,e[6]=i,e[7]=a):a=e[7],I(a)}const X=new Set(["md","mdx","markdown","txt","text"]),G=25,V=64*1024,z=256*1024,Y=4;function J(s){const t=s.lastIndexOf(".");return t===-1?!1:X.has(s.slice(t+1).toLowerCase())}async function ut(s,t,e){const n=e?`${e}/`:"",r=f=>f.startsWith(n)?f.slice(n.length):f,i=[],a=[],o=[{path:e,depth:0}];for(;o.length>0;){const f=o.shift();if(!f)break;let h;try{h=(await(await F(S(s,t,"list",{path:f.path}))).json()).entries}catch{continue}for(const u of[...h].sort((b,w)=>b.path.localeCompare(w.path))){if(u.kind==="dir"){f.depth<Y&&o.push({path:u.path,depth:f.depth+1});continue}J(u.path)&&u.size<=V&&i.length<G?i.push(u.path):a.push(r(u.path))}}const c=await Promise.all(i.map(f=>H(s,t,f).catch(()=>null))),l=[];let d=0;return i.forEach((f,h)=>{const u=c[h];if(u==null||d+u.length>z){a.push(r(f));return}d+=u.length,l.push({relPath:r(f),content:u})}),l.sort((f,h)=>f.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:f.relPath.localeCompare(h.relPath)),a.sort(),{files:l,omittedPaths:a}}function ht(){const s=m.c(7),{org:t}=x();let e;s[0]!==t.id?(e=y.orgFsPublicSets(t.id),s[0]=t.id,s[1]=e):e=s[1];let n;s[2]!==t.slug?(n=async()=>(await(await F(`/api/${encodeURIComponent(t.slug)}/fs/public-sets`)).json()).sets,s[2]=t.slug,s[3]=n):n=s[3];let r;return s[4]!==e||s[5]!==n?(r={queryKey:e,staleTime:3e5,queryFn:n},s[4]=e,s[5]=n,s[6]=r):r=s[6],I(r)}function gt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e.slug||t[1]!==s?(n=r=>S(e.slug,s,"read",{path:r}),t[0]=e.slug,t[1]=s,t[2]=n):n=t[2],n}function yt(){const s=m.c(2),{org:t}=x();let e;return s[0]!==t.slug?(e=(n,r)=>S(t.slug,n,"read",{path:r}),s[0]=t.slug,s[1]=e):e=s[1],e}function pt(s){const t=m.c(3),{org:e}=x();let n;return t[0]!==e||t[1]!==s?(n={mutationFn:async r=>(await(await F(S(e.slug,s,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},t[0]=e,t[1]=s,t[2]=n):n=t[2],P(n)}function Ft(s){const t=m.c(18),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==s?(r=async l=>(await(await F(S(e.slug,s,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,t[0]=e,t[1]=s,t[2]=r):r=t[2];let i;t[3]!==e||t[4]!==n||t[5]!==s?(i=async l=>{const d=y.orgFsStat(e.id,s,l.path);await n.cancelQueries({queryKey:d});const f=n.getQueryData(d),h=l.mode!=="private";return n.setQueryData(d,u=>u&&{...u,readPublic:h,effectivePublic:h,shareMode:l.mode}),{key:d,previous:f}},t[3]=e,t[4]=n,t[5]=s,t[6]=i):i=t[6];let a;t[7]!==n?(a=(l,d,f)=>{f&&n.setQueryData(f.key,f.previous)},t[7]=n,t[8]=a):a=t[8];let o;t[9]!==e||t[10]!==n||t[11]!==s?(o=(l,d,f)=>{n.invalidateQueries({queryKey:y.orgFsStat(e.id,s,f.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[9]=e,t[10]=n,t[11]=s,t[12]=o):o=t[12];let c;return t[13]!==r||t[14]!==i||t[15]!==a||t[16]!==o?(c={mutationFn:r,onMutate:i,onError:a,onSettled:o},t[13]=r,t[14]=i,t[15]=a,t[16]=o,t[17]=c):c=t[17],P(c)}function mt(s){const t=m.c(33),{org:e}=x(),n=R();let r;t[0]!==e||t[1]!==n||t[2]!==s?(r=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(e.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(e.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e.id)})},t[0]=e,t[1]=n,t[2]=s,t[3]=r):r=t[3];const i=r;let a;t[4]!==e||t[5]!==s?(a=async p=>{const C=(await Promise.allSettled(p.files.map(j=>{const q=p.dir?`${p.dir}/${j.name}`:j.name;return F(S(e.slug,s,"file",{path:q}),{method:"PUT",headers:{"content-type":j.type||"application/octet-stream"},body:j})}))).find(Z);if(C)throw C.reason},t[4]=e,t[5]=s,t[6]=a):a=t[6];let o;t[7]!==i||t[8]!==a?(o={mutationFn:a,onSettled:i},t[7]=i,t[8]=a,t[9]=o):o=t[9];const c=P(o);let l;t[10]!==e||t[11]!==s?(l=async p=>{await F(S(e.slug,s,"dir",{path:p}),{method:"POST"})},t[10]=e,t[11]=s,t[12]=l):l=t[12];let d;t[13]!==i||t[14]!==l?(d={mutationFn:l,onSuccess:i},t[13]=i,t[14]=l,t[15]=d):d=t[15];const f=P(d);let h;t[16]!==e||t[17]!==s?(h=async p=>{await F(S(e.slug,s,"file",{path:p}),{method:"DELETE"})},t[16]=e,t[17]=s,t[18]=h):h=t[18];let u;t[19]!==i||t[20]!==h?(u={mutationFn:h,onSuccess:i},t[19]=i,t[20]=h,t[21]=u):u=t[21];const b=P(u);let w;t[22]!==e||t[23]!==s?(w=async p=>{await F(S(e.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)})},t[22]=e,t[23]=s,t[24]=w):w=t[24];let k;t[25]!==i||t[26]!==w?(k={mutationFn:w,onSuccess:i},t[25]=i,t[26]=w,t[27]=k):k=t[27];const T=P(k);let $;return t[28]!==f||t[29]!==T||t[30]!==b||t[31]!==c?($={upload:c,mkdir:f,remove:b,move:T},t[28]=f,t[29]=T,t[30]=b,t[31]=c,t[32]=$):$=t[32],$}function Z(s){return s.status==="rejected"}function v(s){const t={};for(const e of s.split(`
|
|
2
2
|
`)){const n=e.match(/^([A-Za-z][\w-]*):\s*(.*)$/);n?.[1]&&n[2]!==void 0&&(t[n[1].toLowerCase()]=n[2].trim())}return t}function U(s){for(const t of s.split(/\n\s*\n/)){const e=t.trim();if(!(!e||e.startsWith("#")))return e.replace(/\n/g," ")}return null}function wt(s){const t=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!t||t[1]===void 0)return{name:null,description:U(s),body:s};const e=v(t[1]),n=s.slice(t[0].length);return{name:e.name||null,description:e.description||U(n),body:n}}const tt={default:{backFrom:"#4D87DF",backTo:"#296FE8",frontFrom:"#72B6FA",frontTo:"#5BB1EF",stripe:"#84CDFB",glyph:"#014AC9"},system:{backFrom:"#8A94A6",backTo:"#6B7687",frontFrom:"#B6BEC9",frontTo:"#A3ADBA",stripe:"#D5DBE3",glyph:"#3D4757"}};function St(s){const t=m.c(46);let e,n,r,i;t[0]!==s?({glyph:e,readOnly:r,tone:i,...n}=s,t[0]=s,t[1]=e,t[2]=n,t[3]=r,t[4]=i):(e=t[1],n=t[2],r=t[3],i=t[4]);const o=tt[i===void 0?"default":i],c=A.useId(),l=`${c}-back`,d=`${c}-front`,f=`url(#${l})`;let h;t[5]!==f?(h=g.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:f}),t[5]=f,t[6]=h):h=t[6];const u=`url(#${d})`;let b;t[7]!==u?(b=g.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),t[7]=u,t[8]=b):b=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),t[9]=w):w=t[9];let k,T;t[10]!==o.stripe?(k=g.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:o.stripe}),T=g.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:o.stripe}),t[10]=o.stripe,t[11]=k,t[12]=T):(k=t[11],T=t[12]);let $;t[13]!==e||t[14]!==o.glyph?($=e&&g.jsx(e,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:o.glyph,opacity:.55}}),t[13]=e,t[14]=o.glyph,t[15]=$):$=t[15];let p;t[16]!==r?(p=r&&g.jsxs(g.Fragment,{children:[g.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),g.jsx(D,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),t[16]=r,t[17]=p):p=t[17];let K;t[18]!==o.backFrom?(K=g.jsx("stop",{offset:"0.3",stopColor:o.backFrom}),t[18]=o.backFrom,t[19]=K):K=t[19];let C;t[20]!==o.backTo?(C=g.jsx("stop",{offset:"1",stopColor:o.backTo}),t[20]=o.backTo,t[21]=C):C=t[21];let j;t[22]!==l||t[23]!==K||t[24]!==C?(j=g.jsxs("linearGradient",{id:l,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[K,C]}),t[22]=l,t[23]=K,t[24]=C,t[25]=j):j=t[25];let q;t[26]!==o.frontFrom?(q=g.jsx("stop",{stopColor:o.frontFrom}),t[26]=o.frontFrom,t[27]=q):q=t[27];let O;t[28]!==o.frontTo?(O=g.jsx("stop",{offset:"1",stopColor:o.frontTo}),t[28]=o.frontTo,t[29]=O):O=t[29];let L;t[30]!==d||t[31]!==q||t[32]!==O?(L=g.jsxs("radialGradient",{id:d,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[q,O]}),t[30]=d,t[31]=q,t[32]=O,t[33]=L):L=t[33];let E;t[34]!==j||t[35]!==L?(E=g.jsxs("defs",{children:[j,L]}),t[34]=j,t[35]=L,t[36]=E):E=t[36];let _;return t[37]!==n||t[38]!==p||t[39]!==E||t[40]!==h||t[41]!==b||t[42]!==k||t[43]!==T||t[44]!==$?(_=g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[h,b,w,k,T,$,p,E]}),t[37]=n,t[38]=p,t[39]=E,t[40]=h,t[41]=b,t[42]=k,t[43]=T,t[44]=$,t[45]=_):_=t[45],_}export{St as F,W as a,yt as b,at as c,ct as d,gt as e,ut as f,pt as g,nt as h,Ft as i,it as j,dt as k,rt as l,lt as m,ht as n,ot as o,wt as p,ft as q,B as r,mt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f9 as C,c as f,j as c,as as j,r as d,l as p,ca as b,fa as v,fb as h}from"./index-
|
|
1
|
+
import{f9 as C,c as f,j as c,as as j,r as d,l as p,ca as b,fa as v,fb as h}from"./index-BHhIm7ma.js";import{L as N}from"./label-PBaYRRki.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ae as re,ag as X,b as U,G as ie,n as le,aq as ce,ar as ge,e as ne,o as W,t as G,K as ee,j as i,dp as se,dq as oe,dr as M,as as de,c as Y,r as J,a7 as me,M as te,cP as ue,cQ as fe,w as pe,B as he,P as $,ds as xe}from"./index-
|
|
1
|
+
import{ae as re,ag as X,b as U,G as ie,n as le,aq as ce,ar as ge,e as ne,o as W,t as G,K as ee,j as i,dp as se,dq as oe,dr as M,as as de,c as Y,r as J,a7 as me,M as te,cP as ue,cQ as fe,w as pe,B as he,P as $,ds as xe}from"./index-BHhIm7ma.js";import{u as je}from"./use-org-auth-client-B2t1sLB6.js";import{u as ze}from"./use-debounced-autosave-DjdjKsh4.js";import{A as Se}from"./avatar-CrEMeFKK.js";import{I as ae}from"./input-CNvHCeDs.js";import{C as ve}from"./review-settings-BVKaC_S6.js";import{D as Oe}from"./domain-settings-Cuj44Cqa.js";import{c as be,d as ye,b as Ce,f as _e,g as Ae,e as De,a as Fe,A as we}from"./alert-dialog-CNWHKEKH.js";import{R as Ne}from"./require-capability-B80Yv7le.js";import"./User01-ByrqWXwf.js";import"./switch-BDvVFwZc.js";import"./UserSquare-CSuypI3s.js";import"./GitBranch01-B488OLBu.js";import"./use-organization-settings-BsIJjAld.js";import"./constants-BRGHAWVM.js";import"./schema-i1vhtuiw.js";import"./task-board-CGOlen4V.js";import"./badge-BNvTAGyB.js";import"./select-N7ZeidNI.js";import"./Check-DwjDJM-e.js";import"./ChevronUp-BJVPazTv.js";import"./access-gate-f2VYxUVW.js";import"./capability-load-error-D3JcMIIZ.js";const Te=re({name:X().min(1,"Name is required").max(255,"Name is too long"),logo:X().optional()});function Ee(e){const t=Y.c(17),{value:n,onChange:g,name:r,disabled:l}=e,d=U(),m=J.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const h=a;let s;t[1]!==g||t[2]!==d?(s=Z=>{const z=Z.target.files?.[0];if(!z)return;if(z.size>2097152){G.error(d("settings.organizationForm.imageTooLarge"));return}const p=new FileReader;p.onerror=()=>G.error(d("settings.organizationForm.failedToReadImage")),p.onloadend=()=>{p.result&&g(p.result),m.current&&(m.current.value="")},p.readAsDataURL(z)},t[1]=g,t[2]=d,t[3]=s):s=t[3];const c=s;let o;t[4]!==d?(o=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=o):o=t[5];let u;t[6]!==l||t[7]!==c?(u=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:c,className:"hidden",disabled:l}),t[6]=l,t[7]=c,t[8]=u):u=t[8];const x=n||void 0,j=r??"?";let f;t[9]!==x||t[10]!==j?(f=i.jsx(Se,{url:x,fallback:j,shape:"square",size:"base"}),t[9]=x,t[10]=j,t[11]=f):f=t[11];let S;return t[12]!==l||t[13]!==o||t[14]!==u||t[15]!==f?(S=i.jsxs("button",{type:"button",onClick:h,disabled:l,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":o,children:[u,f]}),t[12]=l,t[13]=o,t[14]=u,t[15]=f,t[16]=S):S=t[16],S}function Pe(){const e=U(),{org:t}=ie(),n=je(),g=le(),r=ce({resolver:ge(Te),values:{name:t.name??"",logo:t.logo??""}}),l=ne({mutationFn:async s=>{const c={name:s.name};s.logo&&(c.logo=s.logo);const o=await n.organization.update({data:c});if(o?.error)throw new Error(o.error.message||e("settings.organizationForm.failedToUpdateOrg"));return o},onSuccess:(s,c)=>{W("organization_settings_updated",{organization_id:t.id,fields:Object.keys(c)}),g.invalidateQueries({queryKey:ee.organizations()}),g.invalidateQueries({queryKey:ee.activeOrganization(t.slug)}),G.success(e("settings.organizationForm.updateSuccess"))},onError:(s,c)=>{W("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(c),error:s instanceof Error?s.message:String(s)}),G.error(s instanceof Error?s.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:d,flush:m}=ze({save:async()=>{const s=r.control._formState.dirtyFields;if(Object.keys(s).length===0||!await r.trigger())return;const o=r.getValues(),u=r.control._defaultValues;r.reset(o,{keepValues:!0});try{await l.mutateAsync(o)}catch{r.reset(u,{keepValues:!0})}}}),a=r.formState.errors,h=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(oe,{children:[i.jsx(M,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(Ee,{value:r.watch("logo"),onChange:s=>{r.setValue("logo",s??"",{shouldDirty:!0}),m()},name:r.watch("name")})}),i.jsx(M,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(de,{control:r.control,name:"name",render:({field:s})=>i.jsx(ae,{id:"org-name",...s,onChange:c=>{s.onChange(c),d()},onBlur:()=>{s.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(M,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[h&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:h}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(a.name||a.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[a.name&&i.jsx("p",{className:"text-xs text-destructive",children:a.name.message}),a.logo&&i.jsx("p",{className:"text-xs text-destructive",children:a.logo.message})]})]})})}function Le(){const e=Y.c(86),t=U(),{org:n}=ie(),[g,r]=J.useState(!1),[l,d]=J.useState(""),m=me();let a;e[0]!==n.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:n.id})},e[0]=n.id,e[1]=m,e[2]=a):a=e[2];let h;e[3]!==n.id||e[4]!==n.slug||e[5]!==t?(h=()=>{W("organization_deleted",{organization_id:n.id}),localStorage.getItem(te.lastOrgSlug())===n.slug&&localStorage.removeItem(te.lastOrgSlug()),ue()?.org===n.slug&&fe(),pe(),G.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=n.id,e[4]=n.slug,e[5]=t,e[6]=h):h=e[6];let s;e[7]!==t?(s=v=>{G.error(v instanceof Error?v.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=s):s=e[8];let c;e[9]!==a||e[10]!==h||e[11]!==s?(c={mutationFn:a,onSuccess:h,onError:s},e[9]=a,e[10]=h,e[11]=s,e[12]=c):c=e[12];const o=ne(c);let u;e[13]!==t?(u=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=u):u=e[14];let x;e[15]!==t?(x=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=x):x=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let f;e[19]!==t?(f=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=f):f=e[20];let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=()=>r(!0),e[21]=S):S=e[21];const Z=o.isPending;let z;e[22]!==t?(z=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=z):z=e[23];let p;e[24]!==o.isPending||e[25]!==z?(p=i.jsx(he,{variant:"destructive",size:"sm",onClick:S,disabled:Z,children:z}),e[24]=o.isPending,e[25]=z,e[26]=p):p=e[26];let O;e[27]!==p||e[28]!==j||e[29]!==f?(O=i.jsx(oe,{className:"border-destructive/40",children:i.jsx(M,{title:j,description:f,action:p})}),e[27]=p,e[28]=j,e[29]=f,e[30]=O):O=e[30];let b;e[31]!==O||e[32]!==u||e[33]!==x?(b=i.jsx(se,{title:u,description:x,children:O}),e[31]=O,e[32]=u,e[33]=x,e[34]=b):b=e[34];let K;e[35]===Symbol.for("react.memo_cache_sentinel")?(K=v=>{r(v),v||d("")},e[35]=K):K=e[35];let y;e[36]!==t?(y=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=y):y=e[37];let C;e[38]!==y?(C=i.jsx(be,{children:y}),e[38]=y,e[39]=C):C=e[39];let _;e[40]!==n.name||e[41]!==t?(_=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:n.name}),e[40]=n.name,e[41]=t,e[42]=_):_=e[42];let A;e[43]!==_?(A=i.jsx("p",{children:_}),e[43]=_,e[44]=A):A=e[44];let D;e[45]!==n.name||e[46]!==t?(D=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:n.name}),e[45]=n.name,e[46]=t,e[47]=D):D=e[47];let F;e[48]!==D?(F=i.jsx("p",{className:"mt-3 mb-1.5",children:D}),e[48]=D,e[49]=F):F=e[49];let Q;e[50]===Symbol.for("react.memo_cache_sentinel")?(Q=v=>d(v.target.value),e[50]=Q):Q=e[50];let w;e[51]!==l||e[52]!==n.name?(w=i.jsx(ae,{value:l,onChange:Q,placeholder:n.name,autoFocus:!0}),e[51]=l,e[52]=n.name,e[53]=w):w=e[53];let N;e[54]!==A||e[55]!==F||e[56]!==w?(N=i.jsx(ye,{asChild:!0,children:i.jsxs("div",{children:[A,F,w]})}),e[54]=A,e[55]=F,e[56]=w,e[57]=N):N=e[57];let T;e[58]!==C||e[59]!==N?(T=i.jsxs(Ce,{children:[C,N]}),e[58]=C,e[59]=N,e[60]=T):T=e[60];let E;e[61]!==t?(E=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=E):E=e[62];let P;e[63]!==E?(P=i.jsx(_e,{children:E}),e[63]=E,e[64]=P):P=e[64];let L;e[65]!==o?(L=()=>o.mutate(),e[65]=o,e[66]=L):L=e[66];const H=l!==n.name||o.isPending;let k;e[67]!==o.isPending||e[68]!==t?(k=o.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=o.isPending,e[68]=t,e[69]=k):k=e[69];let R;e[70]!==L||e[71]!==H||e[72]!==k?(R=i.jsx(Ae,{onClick:L,disabled:H,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:k}),e[70]=L,e[71]=H,e[72]=k,e[73]=R):R=e[73];let q;e[74]!==P||e[75]!==R?(q=i.jsxs(De,{children:[P,R]}),e[74]=P,e[75]=R,e[76]=q):q=e[76];let I;e[77]!==T||e[78]!==q?(I=i.jsxs(Fe,{children:[T,q]}),e[77]=T,e[78]=q,e[79]=I):I=e[79];let B;e[80]!==g||e[81]!==I?(B=i.jsx(we,{open:g,onOpenChange:K,children:I}),e[80]=g,e[81]=I,e[82]=B):B=e[82];let V;return e[83]!==b||e[84]!==B?(V=i.jsxs(i.Fragment,{children:[b,B]}),e[83]=b,e[84]=B,e[85]=V):V=e[85],V}function ke(){const e=Y.c(10),t=U();let n;e[0]!==t?(n=t("settings.orgGeneral.organization"),e[0]=t,e[1]=n):n=e[1];let g;e[2]!==n?(g=i.jsx($.Title,{children:n}),e[2]=n,e[3]=g):g=e[3];let r,l,d,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Pe,{}),l=i.jsx(ve,{}),d=i.jsx(Oe,{}),m=i.jsx(Le,{}),e[4]=r,e[5]=l,e[6]=d,e[7]=m):(r=e[4],l=e[5],d=e[6],m=e[7]);let a;return e[8]!==g?(a=i.jsx($,{children:i.jsx($.Content,{children:i.jsx($.Body,{children:i.jsxs(xe,{children:[g,r,l,d,m]})})})}),e[8]=g,e[9]=a):a=e[9],a}function at(){const e=Y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(Ne,{capability:"org:manage",area:"general settings",children:i.jsx(ke,{})}),e[0]=t):t=e[0],t}export{at as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as o}from"./index-
|
|
1
|
+
import{c as n,j as o}from"./index-BHhIm7ma.js";function a(r){const e=n.c(4),{size:t,className:c}=r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=s):s=e[0];let i;return e[1]!==c||e[2]!==t?(i=o.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c,children:s}),e[1]=c,e[2]=t,e[3]=i):i=e[3],i}export{a as G};
|
package/dist/client/assets/{github-repo-picker-BAINOCSo.js → github-repo-picker-DWgD3Ont.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Z,G as de,a as ye,n as me,r as D,aR as le,b as ee,j as t,h as X,e as ge,t as te,ff as Ne,K as se,m as ke,l as ae,B as re,x as ve,z as Ce}from"./index-DazxVKwe.js";import{c as Re,d as we,b as Pe,D as Se}from"./dialog-C4A7JbKT.js";import{C as Ie}from"./collection-search-BLQqv6oz.js";import{u as Te}from"./use-debounced-value-yXAfzgUS.js";import{b as he,u as _e}from"./use-connection-DXl8cmGz.js";import{u as ne}from"./use-mcp-client-Dwzvsljf.js";import{W as Ee,S as pe}from"./constants-BRGHAWVM.js";import{a as be}from"./authenticate-and-persist-oauth-CKwK5h3D.js";import{i as ue}from"./ArrowLeft-bEYr2bR3.js";import{n as Ae}from"./LinkExternal01-CC4fQBHh.js";import{n as ze}from"./Share07-DN3UDc19.js";import{t as Le,u as Ge}from"./use-navigate-to-agent-suis0hX4.js";import{e as Fe}from"./extract-connection-data-C-5_Ef0W.js";import{G as M}from"./github-icon-D163QBtr.js";import{b as Oe,p as fe,f as Ue,G as xe}from"./provision-repo-scoped-github-connection-WQFARyHG.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ee.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=ne(c);let s;i[6]!==C?(s={name:C},i[6]=C,i[7]=s):s=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==s||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:He},i[8]=o,i[9]=s,i[10]=u,i[11]=k):k=i[11],Le(k)}function He(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function $e(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=D.useState("idle"),[o,s]=D.useState(null),[u,k]=D.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=D.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),s(null);const l=Fe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){s(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function dt(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,s=ee();let u;e[0]!==o||e[1]!==s||e[2]!==y?(u=y??s(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=s,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=D.useState(null);let f;e[4]!==k?(f=t.jsx(Re,{className:"sr-only",children:t.jsx(we,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(M,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(D.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Se,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),s=me(),u=Ge(),[k,v]=D.useState(null),P=_e({slug:"mcp-github"}),f=Oe(P),d=$e({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=ne({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=ne({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(n,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(n,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:T}}}}),le(s,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async n=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:n.owner,repo:n.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:n.owner,repo:n.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"site-editor"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:n,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:n,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!n||!I){if(le(s,o.id),Ne(s,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(s.setQueryData(se.collectionItem(p,o.id,"","VIRTUAL_MCP",n),{item:I}),le(s,o.id),j(n,b),y){y({virtualMcpId:n,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),u(n)},onError:(n,b)=>{console.error("GitHub import failed:",n);const N=n instanceof Error?n.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(n=>t.jsxs("button",{type:"button",onClick:()=>v(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(M,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):m?i?t.jsx(Ve,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:n=>x.mutate(n),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,s=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=se.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>Ue(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ke(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Qe)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==s?(g=h=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==s?(h=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{className:"size-3.5"}):t.jsx(M,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let F;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(F=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=F):F=e[43];let U;return e[44]!==A||e[45]!==F||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,F]}),e[44]=A,e[45]=F,e[46]=S,e[47]=U):U=e[47],U}const n=l.data;if(!n)return null;if(n.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==s?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=s,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let F;e[64]!==G?(F=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=F):F=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(Ae,{size:14}),e[68]=ie):ie=e[68];let $;e[69]!==U?($=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=$):$=e[70];let q;e[71]!==l?(q=()=>{l.refetch()},e[71]=l,e[72]=q):q=e[72];const je=l.isFetching;let B;e[73]!==l.isFetching?(B=l.isFetching&&t.jsx(X,{className:"size-3.5"}),e[73]=l.isFetching,e[74]=B):B=e[74];let Q;e[75]!==s?(Q=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=Q):Q=e[76];let V;e[77]!==l.isFetching||e[78]!==q||e[79]!==B||e[80]!==Q?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[B,Q]}),e[77]=l.isFetching,e[78]=q,e[79]=B,e[80]=Q,e[81]=V):V=e[81];let K;e[82]!==$||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[$,V]}),e[82]=$,e[83]=V,e[84]=K):K=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let J;e[87]!==W?(J=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=J):J=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==F||e[92]!==K||e[93]!==J?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,F,K,J]}),e[89]=z,e[90]=L,e[91]=F,e[92]=K,e[93]=J,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==s?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=s,e[101]=b):b=e[101];let N;if(e[102]!==n.installations||e[103]!==r||e[104]!==s){let h;e[106]!==r||e[107]!==s?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=s,e[108]=h):h=e[108],N=n.installations.map(h),e[102]=n.installations,e[103]=r,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let O;return e[120]!==I||e[121]!==_||e[122]!==b?(O=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=O):O=e[123],O}function Qe(){}function Ve(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,s=ee(),[u,k]=D.useState(""),v=Te(u,300),P=D.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Ie,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Ke,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let n;return e[20]!==m||e[21]!==x?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=n):n=e[22],n}function Ke(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:s}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=ne(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=se.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:n}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=ve(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let n;e[17]!==x?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=n):n=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==n||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,b]}),e[22]=n,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==s||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==s||e[31]!==o||e[32]!==u?(x=n=>t.jsxs("button",{type:"button",onClick:()=>o(n),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(M,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:n.name}),n.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(Ce,{size:10}):t.jsx(ze,{size:10}),n.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=s,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let O;e[13]!==r?(O=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=O):O=e[14];let h;e[15]!==y||e[16]!==O?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:O}),e[15]=y,e[16]=O,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{className:"size-3 text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let n;e[45]!==l||e[46]!==j?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=n):n=e[47];let b;return e[48]!==n||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,n]}),e[48]=n,e[49]=f,e[50]=b):b=e[50],b}export{dt as G,$e as a,De as u};
|
|
1
|
+
import{c as Z,G as de,a as ye,n as me,r as D,aR as le,b as ee,j as t,h as X,e as ge,t as te,ff as Ne,K as se,m as ke,l as ae,B as re,x as ve,z as Ce}from"./index-BHhIm7ma.js";import{c as Re,d as we,b as Pe,D as Se}from"./dialog-CH-0rO0D.js";import{C as Ie}from"./collection-search-Cvc-x2kO.js";import{u as Te}from"./use-debounced-value-cslL_Hm7.js";import{b as he,u as _e}from"./use-connection-CQKO8y6-.js";import{u as ne}from"./use-mcp-client-COsTAu0Z.js";import{W as Ee,S as pe}from"./constants-BRGHAWVM.js";import{a as be}from"./authenticate-and-persist-oauth-Daei89hL.js";import{i as ue}from"./ArrowLeft-BFcs8--9.js";import{n as Ae}from"./LinkExternal01-D9h2hMLG.js";import{n as ze}from"./Share07-DWyqd3EW.js";import{t as Le,u as Ge}from"./use-navigate-to-agent-BP_Y2M5A.js";import{e as Fe}from"./extract-connection-data-9CnRjsL7.js";import{G as M}from"./github-icon-D1HTxLVV.js";import{b as Oe,p as fe,f as Ue,G as xe}from"./provision-repo-scoped-github-connection-WQFARyHG.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ee.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=ne(c);let s;i[6]!==C?(s={name:C},i[6]=C,i[7]=s):s=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==s||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:He},i[8]=o,i[9]=s,i[10]=u,i[11]=k):k=i[11],Le(k)}function He(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function $e(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=D.useState("idle"),[o,s]=D.useState(null),[u,k]=D.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=D.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),s(null);const l=Fe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){s(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),s(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function dt(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,s=ee();let u;e[0]!==o||e[1]!==s||e[2]!==y?(u=y??s(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=s,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=D.useState(null);let f;e[4]!==k?(f=t.jsx(Re,{className:"sr-only",children:t.jsx(we,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(M,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(D.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Se,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),s=me(),u=Ge(),[k,v]=D.useState(null),P=_e({slug:"mcp-github"}),f=Oe(P),d=$e({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=ne({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=ne({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(n,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(n,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:T}}}}),le(s,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async n=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:n.owner,repo:n.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:n.owner,repo:n.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"site-editor"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:n,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:n,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!n||!I){if(le(s,o.id),Ne(s,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(s.setQueryData(se.collectionItem(p,o.id,"","VIRTUAL_MCP",n),{item:I}),le(s,o.id),j(n,b),y){y({virtualMcpId:n,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),u(n)},onError:(n,b)=>{console.error("GitHub import failed:",n);const N=n instanceof Error?n.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:c("common.githubRepoPicker.selectConnection")})}),f.map(n=>t.jsxs("button",{type:"button",onClick:()=>v(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(M,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):m?i?t.jsx(Ve,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:n=>x.mutate(n),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,s=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=ne(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=se.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>Ue(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ke(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Qe)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:se.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==s?(g=h=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==s?(h=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{className:"size-3.5"}):t.jsx(M,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let F;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(F=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=F):F=e[43];let U;return e[44]!==A||e[45]!==F||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,F]}),e[44]=A,e[45]=F,e[46]=S,e[47]=U):U=e[47],U}const n=l.data;if(!n)return null;if(n.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==s?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=s,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let F;e[64]!==G?(F=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=F):F=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(Ae,{size:14}),e[68]=ie):ie=e[68];let $;e[69]!==U?($=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=$):$=e[70];let q;e[71]!==l?(q=()=>{l.refetch()},e[71]=l,e[72]=q):q=e[72];const je=l.isFetching;let B;e[73]!==l.isFetching?(B=l.isFetching&&t.jsx(X,{className:"size-3.5"}),e[73]=l.isFetching,e[74]=B):B=e[74];let Q;e[75]!==s?(Q=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=Q):Q=e[76];let V;e[77]!==l.isFetching||e[78]!==q||e[79]!==B||e[80]!==Q?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[B,Q]}),e[77]=l.isFetching,e[78]=q,e[79]=B,e[80]=Q,e[81]=V):V=e[81];let K;e[82]!==$||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[$,V]}),e[82]=$,e[83]=V,e[84]=K):K=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let J;e[87]!==W?(J=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=J):J=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==F||e[92]!==K||e[93]!==J?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,F,K,J]}),e[89]=z,e[90]=L,e[91]=F,e[92]=K,e[93]=J,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==s?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=s,e[101]=b):b=e[101];let N;if(e[102]!==n.installations||e[103]!==r||e[104]!==s){let h;e[106]!==r||e[107]!==s?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=s,e[108]=h):h=e[108],N=n.installations.map(h),e[102]=n.installations,e[103]=r,e[104]=s,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let O;return e[120]!==I||e[121]!==_||e[122]!==b?(O=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=O):O=e[123],O}function Qe(){}function Ve(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,s=ee(),[u,k]=D.useState(""),v=Te(u,300),P=D.useDeferredValue(v),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Ie,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{className:"size-4.5 text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Ke,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let n;return e[20]!==m||e[21]!==x?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=n):n=e[22],n}function Ke(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:s}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=ne(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=se.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:n}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=ve(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let n;e[17]!==x?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=n):n=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==n||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,b]}),e[22]=n,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==s||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==s||e[31]!==o||e[32]!==u?(x=n=>t.jsxs("button",{type:"button",onClick:()=>o(n),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(M,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:n.name}),n.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(Ce,{size:10}):t.jsx(ze,{size:10}),n.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=s,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let O;e[13]!==r?(O=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=O):O=e[14];let h;e[15]!==y||e[16]!==O?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:O}),e[15]=y,e[16]=O,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[o,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(X,{className:"size-3 text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let n;e[45]!==l||e[46]!==j?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=n):n=e[47];let b;return e[48]!==n||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,n]}),e[48]=n,e[49]=f,e[50]=b):b=e[50],b}export{dt as G,$e as a,De as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eH as It,eI as Et,ce as R,ag as c,eJ as de,cj as Je,eK as Tt,cd as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eL as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-
|
|
1
|
+
import{eH as It,eI as Et,ce as R,ag as c,eJ as de,cj as Je,eK as Tt,cd as wt,am as Mt,ah as O,ak as W,af as oe,ae as S,aj as m,ao as U,an as At,eL as I,ai as Ot,t as ge,r as J,c as Ee,G as Ct,j as Rt}from"./index-BHhIm7ma.js";import{u as Nt}from"./use-mcp-client-COsTAu0Z.js";import{S as xt}from"./constants-BRGHAWVM.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-B_LcTJNO.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));class L{constructor(e){this.value=e}value;subs=new Set;get=()=>this.value;set=e=>{Object.is(e,this.value)||(this.value=e,this.subs.forEach(a=>a()))};update=e=>{this.set(e(this.value))};subscribe=e=>(this.subs.add(e),()=>{this.subs.delete(e)})}var We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=V(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(V):V(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(V)),t.allOf!=null&&(t.allOf=t.allOf.map(V)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(V));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=V(e[a]);return t}function V(t){return typeof t=="boolean"?t:Te(t)}var Wt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Qt(t)}}var Qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(n=>n.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(n=>n.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|