decocms 4.535.2 → 4.535.3
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/{ActiveShapeUtils-CDR5cIv8.js → ActiveShapeUtils-n1VzBM05.js} +1 -1
- package/dist/client/assets/{AlertCircle-aFc0Y1Nw.js → AlertCircle-h4wkFXhr.js} +1 -1
- package/dist/client/assets/{AreaChart-BL8RHB4F.js → AreaChart-DD6ElqDk.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B4V3HvD7.js → ArrowLeft-DGdRhjvP.js} +1 -1
- package/dist/client/assets/{ArrowUp-CUOoY7to.js → ArrowUp-CQpR4KTR.js} +1 -1
- package/dist/client/assets/{BarChart-DppWoOXo.js → BarChart-Di3cGWMb.js} +1 -1
- package/dist/client/assets/{Building02-BFbAAk3B.js → Building02-CpaJ_8nf.js} +1 -1
- package/dist/client/assets/{CartesianChart-HyaGpa-j.js → CartesianChart-m7D0ek0A.js} +1 -1
- package/dist/client/assets/{CategoricalChart-D8XWTNa8.js → CategoricalChart-DOyNxqsY.js} +1 -1
- package/dist/client/assets/{CheckCircle-DlVRpmKe.js → CheckCircle-BtjeVSI0.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-sTFwDpoF.js → ChevronSelectorVertical-CSeVJ5Wr.js} +1 -1
- package/dist/client/assets/{ChevronUp-BVvI38XG.js → ChevronUp-B_A-Aj1q.js} +1 -1
- package/dist/client/assets/{Copy01-CzScZaHL.js → Copy01-Dmv8RATM.js} +1 -1
- package/dist/client/assets/{CreditCard01-BLVhUw2n.js → CreditCard01-C2WG-40P.js} +1 -1
- package/dist/client/assets/{DotsVertical-ziuRVDr4.js → DotsVertical-V6LcLL3o.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-BFtSbKQs.js → ErrorBarContext-CxMDhOaI.js} +1 -1
- package/dist/client/assets/{Globe04-BAxLQ7vf.js → Globe04-DIXMg7de.js} +1 -1
- package/dist/client/assets/{Image01-DFj2MHb1.js → Image01-Be1Fmo7b.js} +1 -1
- package/dist/client/assets/{Key01-DmX6-6Ny.js → Key01-B4ypjFEb.js} +1 -1
- package/dist/client/assets/{Link01-CvodJNHb.js → Link01-BFhJluLv.js} +1 -1
- package/dist/client/assets/{LinkBroken01-TPUim_Vo.js → LinkBroken01-ByhYGCmE.js} +1 -1
- package/dist/client/assets/{Minus-CQxkpLoY.js → Minus-WbHh7z_4.js} +1 -1
- package/dist/client/assets/{Monitor01-DH_D-idP.js → Monitor01-PpsDf0ug.js} +1 -1
- package/dist/client/assets/{Play-Dudpy-ba.js → Play-CVvTSMMO.js} +1 -1
- package/dist/client/assets/{Plus-Dzr9ESX-.js → Plus-KFhoznQ0.js} +1 -1
- package/dist/client/assets/{ReferenceLine-p1sZnjAx.js → ReferenceLine-B78PpcLg.js} +1 -1
- package/dist/client/assets/{SearchMd-oixIfKAh.js → SearchMd-CvSxd4Re.js} +1 -1
- package/dist/client/assets/{Sector-DCEgkV4d.js → Sector-D1mbVTe2.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-D06WkjOb.js → ShoppingBag01-DcvDPkmY.js} +1 -1
- package/dist/client/assets/{Sun-F5GrVV08.js → Sun-DNxRxT-Q.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BmzvIjLC.js → SwitchHorizontal01-B0wuTS4D.js} +1 -1
- package/dist/client/assets/{Tool01-nplovCkN.js → Tool01-BNfLt_2s.js} +1 -1
- package/dist/client/assets/{Trash01-DERnYCWh.js → Trash01-CXmmcxbt.js} +1 -1
- package/dist/client/assets/{Upload01-HMv8LaZ3.js → Upload01-WhzmZATn.js} +1 -1
- package/dist/client/assets/{UserSquare-De6W8qV_.js → UserSquare-DGd5-FO6.js} +1 -1
- package/dist/client/assets/{Users01-mOjjkbyN.js → Users01-Dt3KhwkI.js} +1 -1
- package/dist/client/assets/{XClose-DlDfGuQd.js → XClose-CB-WGW7l.js} +1 -1
- package/dist/client/assets/{ZoomOut-CZi_Jv_H.js → ZoomOut-B5qWceNj.js} +1 -1
- package/dist/client/assets/{access-gate-DGPKhcsY.js → access-gate-BJQUokDS.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-C9RqnWwO.js → add-connection-dialog-Cs4OeDHH.js} +1 -1
- package/dist/client/assets/{agent-analytics-CROGNJfS.js → agent-analytics-DFZMXpjH.js} +1 -1
- package/dist/client/assets/agent-app-BsZV6cJx.js +1 -0
- package/dist/client/assets/{agent-assets-CWrYk2AT.js → agent-assets-CPRDkXpu.js} +1 -1
- package/dist/client/assets/{agent-automation-CEFnsh9H.js → agent-automation-D5gWWNBf.js} +1 -1
- package/dist/client/assets/{agent-automations-BRRH5z6Q.js → agent-automations-CtPP7ZPK.js} +1 -1
- package/dist/client/assets/{agent-calendar-unCP6cj4.js → agent-calendar-CcUfM1d1.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-cy9SdEPd.js → agent-connect-sources-CO_cfeoL.js} +1 -1
- package/dist/client/assets/agent-deck-wjO8UpQF.js +1 -0
- package/dist/client/assets/{agent-e2e-BMHAEtXr.js → agent-e2e-BLPErqxM.js} +1 -1
- package/dist/client/assets/agent-experiments-CWNwZjRU.js +1 -0
- package/dist/client/assets/{agent-file-D7jOR2vn.js → agent-file-BxVBU84L.js} +1 -1
- package/dist/client/assets/{agent-hosting-BdcvUt1Z.js → agent-hosting-D45W6Kt5.js} +1 -1
- package/dist/client/assets/{agent-icon-C913Kovt.js → agent-icon-Gi86Du82.js} +1 -1
- package/dist/client/assets/agent-library-DRij_Rpi.js +1 -0
- package/dist/client/assets/agent-library-file-CDc-K0cK.js +1 -0
- package/dist/client/assets/agent-monitor-Bz-_nJlV.js +1 -0
- package/dist/client/assets/{agent-overview-kwoxJFjY.js → agent-overview-j0wNLqo3.js} +1 -1
- package/dist/client/assets/{agent-releases-CPLYJ7fX.js → agent-releases-DiQXWWGl.js} +1 -1
- package/dist/client/assets/agent-settings-CjUEm83I.js +1 -0
- package/dist/client/assets/{agent-site-editor-DxP5Tv05.js → agent-site-editor-DRrJph4v.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DMoRTBgU.js +2 -0
- package/dist/client/assets/agent-site-editor-content-k52U0wO-.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CBeqgRYS.js +1 -0
- package/dist/client/assets/agent-view-D1-wq3ac.js +1 -0
- package/dist/client/assets/{agent-view-guard-DY0RncTb.js → agent-view-guard-C9Wo0EMO.js} +1 -1
- package/dist/client/assets/{agents-list-_02CAkxo.js → agents-list-wSORz8Ft.js} +1 -1
- package/dist/client/assets/{ai-providers-BEtASlEP.js → ai-providers-CTIBAIi4.js} +1 -1
- package/dist/client/assets/{alert-DolJ0mtF.js → alert-D6qfcDvw.js} +1 -1
- package/dist/client/assets/{analytics-sections-aPLCnG0n.js → analytics-sections-Kd65He2p.js} +1 -1
- package/dist/client/assets/api-keys-Bd33Iv-1.js +1 -0
- package/dist/client/assets/{api-keys-C-oGSQow.js → api-keys-DJryMyS5.js} +1 -1
- package/dist/client/assets/{app-editor-CzLzFjz9.js → app-editor-B9QN2jVa.js} +1 -1
- package/dist/client/assets/{asset-utils-Cs0TaxGO.js → asset-utils-9rp-zFxh.js} +1 -1
- package/dist/client/assets/{auth-CXFweNuJ.js → auth-CDPlghAl.js} +1 -1
- package/dist/client/assets/{auth-catchall-BcSYLnny.js → auth-catchall-Csvu20GH.js} +1 -1
- package/dist/client/assets/{auth-entry-CjMK5wkm.js → auth-entry-BMjSVUw0.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CGVHfETk.js → auth-split-layout-Bs0cz5_W.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Crrqkmel.js → authenticate-and-persist-oauth-CC1hNWWz.js} +1 -1
- package/dist/client/assets/{automation-list-row-D3g_Qled.js → automation-list-row-DBQTYlA5.js} +1 -1
- package/dist/client/assets/{automation-runs-yqTjFa6O.js → automation-runs-B5Implwg.js} +1 -1
- package/dist/client/assets/{automations-C8XhM2nB.js → automations-CFGb4yWp.js} +1 -1
- package/dist/client/assets/{autosend-5Z9iw8Hd.js → autosend-Dstae6k-.js} +1 -1
- package/dist/client/assets/{badge-DLDc3XJd.js → badge-CvD-8veb.js} +1 -1
- package/dist/client/assets/{block-document-rz8xjEkN.js → block-document-Wu0ejoXd.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BUMxeUbc.js → blocks-preview-workspace-context-Bl5CeNpc.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-D2UCyrKm.js → blocks-tab-states-O-q70O3p.js} +1 -1
- package/dist/client/assets/{blog-schema-C-syUPc3.js → blog-schema-CM4a1ID4.js} +1 -1
- package/dist/client/assets/{buckets-BweoMRPz.js → buckets-DPXuLJrq.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-C_00Ntgw.js → build-improve-prompt-doc-DGsm_Lg7.js} +1 -1
- package/dist/client/assets/{calendar-DSV2yxAL.js → calendar-DDUWaDfo.js} +1 -1
- package/dist/client/assets/{capability-load-error-BlGNDQeB.js → capability-load-error-BlK9-D5s.js} +1 -1
- package/dist/client/assets/{category-editor-BLQ2J7r-.js → category-editor-OHNAUZUV.js} +1 -1
- package/dist/client/assets/{cdn-tab-DATR-aDN.js → cdn-tab-BWtZXPGO.js} +1 -1
- package/dist/client/assets/{chart-DYjkqppp.js → chart-lZZmRcYx.js} +1 -1
- package/dist/client/assets/{chat-context-GGH0Jpcf.js → chat-context-CETfJ--k.js} +1 -1
- package/dist/client/assets/{chat-draft-ChfzWruH.js → chat-draft-BAiAlPNq.js} +1 -1
- package/dist/client/assets/{checkbox-BfWTtpoP.js → checkbox-B-L_Hv2a.js} +1 -1
- package/dist/client/assets/{choose-editor-lbT9LhdC.js → choose-editor-BwLbl5sE.js} +1 -1
- package/dist/client/assets/{cli-auth-success-ug2N-fRu.js → cli-auth-success-Be5k2ucC.js} +1 -1
- package/dist/client/assets/{client-icons-C18vKow0.js → client-icons-DGbc1dee.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-CG6ALtkC.js → cms-settings-editor-CBRbPuXj.js} +1 -1
- package/dist/client/assets/{collapsible-DTN-w8y8.js → collapsible-Btdtpd74.js} +1 -1
- package/dist/client/assets/{collection-detail-Bnji1pRn.js → collection-detail-0HxRVU-X.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cw4GiE2o.js → collection-display-button-OG-0LtqL.js} +1 -1
- package/dist/client/assets/{collection-search-S4_KAabw.js → collection-search--OROxVAW.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bg5iKC19.js → collection-table-wrapper-DVxOlUuW.js} +1 -1
- package/dist/client/assets/{collection-tabs-BU5DI0lq.js → collection-tabs-Dyq0PXvI.js} +1 -1
- package/dist/client/assets/{column-rules-DQ4UMcN2.js → column-rules-DeCg3bZn.js} +1 -1
- package/dist/client/assets/{combobox-KhjLDHQs.js → combobox-DCNA_-xC.js} +1 -1
- package/dist/client/assets/{command-DFIvuSq5.js → command-CbG6zwJ2.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CJ_wS_fT.js → companion-mcps-section-2jAqn94v.js} +1 -1
- package/dist/client/assets/{config-Dr5npodX.js → config-CYAB0FqO.js} +1 -1
- package/dist/client/assets/{connect-Dah7Dhl-.js → connect-Cz8zt4PD.js} +1 -1
- package/dist/client/assets/{connect-layout-CZfsMXOt.js → connect-layout-BjTL0b9A.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CKxXP_zU.js → connect-source-dialog-BJPO0z0Q.js} +1 -1
- package/dist/client/assets/{connection-0N2uS0ke.js → connection-D_8ypzRk.js} +1 -1
- package/dist/client/assets/{connection-card-DfaT2fCD.js → connection-card-CJdAQmxn.js} +1 -1
- package/dist/client/assets/{connection-detail-CmaMsduM.js → connection-detail-DByZObPF.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-35vnRZcc.js → connection-form-helpers-CKiCxI-f.js} +1 -1
- package/dist/client/assets/{connections-bXRHoA0h.js → connections-BPnkZ6mQ.js} +1 -1
- package/dist/client/assets/{content-tab-lSMuf5uE.js → content-tab-reeT4Bt9.js} +3 -3
- package/dist/client/assets/{context-DWxxHLnq.js → context-BdQHB9wq.js} +1 -1
- package/dist/client/assets/{context-menu-DI57E_45.js → context-menu-DoJbdaSe.js} +1 -1
- package/dist/client/assets/{context-shell-BUlm53_e.js → context-shell-CgIpVPLL.js} +3 -3
- package/dist/client/assets/{core.esm-DYPHfGaf.js → core.esm-AfeRxO-w.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BkQWIOJt.js → create-organization-dialog-DM0dy4s0.js} +1 -1
- package/dist/client/assets/{daily-pulse--VzwcpAb.js → daily-pulse-B6Gf6s3c.js} +1 -1
- package/dist/client/assets/{discover-D2ZRw-3f.js → discover-DgZGl284.js} +1 -1
- package/dist/client/assets/{domain-settings-WVIWrWox.js → domain-settings-C9wx0hG7.js} +1 -1
- package/dist/client/assets/{drawer-CnH1-BoJ.js → drawer-BOVgzwg0.js} +1 -1
- package/dist/client/assets/{editor-DLmhZNkh.js → editor-BLSFnmQy.js} +1 -1
- package/dist/client/assets/{editor-classes-CMebXIkX.js → editor-classes-Bd-gnegN.js} +1 -1
- package/dist/client/assets/{empty-state-36Ylmm4X.js → empty-state-DG9L5-rf.js} +1 -1
- package/dist/client/assets/{empty-state-I9kFofDC.js → empty-state-GaDVm-bY.js} +1 -1
- package/dist/client/assets/{experiments-tab-BH-x7FBh.js → experiments-tab-0kAAmsC6.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DAGLTFvi.js → experiments-tab-choice-DiAvzr3L.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C9beUc6X.js → extract-connection-data-CN7Oc8k6.js} +1 -1
- package/dist/client/assets/{feature-gate-D09aRdX3.js → feature-gate-DYaXFeF2.js} +1 -1
- package/dist/client/assets/{feature-paywall-iuBIIyMp.js → feature-paywall-BwSHmJmG.js} +1 -1
- package/dist/client/assets/{file-explorer-BeEwI_HK.js → file-explorer-LD02-wRi.js} +1 -1
- package/dist/client/assets/{file-preview-ttwbSA1O.js → file-preview-BsruxpEx.js} +1 -1
- package/dist/client/assets/{file-share-button-COlLgw2F.js → file-share-button-Bgve0_0J.js} +1 -1
- package/dist/client/assets/{file-type-icon-ClMPkSrR.js → file-type-icon-C5VkeAku.js} +1 -1
- package/dist/client/assets/{folder-icon-DMml5pRP.js → folder-icon-CtjFr6N1.js} +1 -1
- package/dist/client/assets/{form-DvzVBqg8.js → form-BYCoF-C0.js} +1 -1
- package/dist/client/assets/{general-D2VAe21I.js → general-DRoKs1jZ.js} +1 -1
- package/dist/client/assets/{held-block-view-D7jbi8bj.js → held-block-view-CQVEFAFc.js} +3 -3
- package/dist/client/assets/{home-DvxRrAK9.js → home-D_WXf-lC.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-Da_GNG6A.js → hosted-publish-feedback-ladpFgtZ.js} +1 -1
- package/dist/client/assets/{icon-button-CmulQtFx.js → icon-button-DXFu6_qN.js} +1 -1
- package/dist/client/assets/{index-DQT_QlGM.js → index-2k4Je6Et.js} +1 -1
- package/dist/client/assets/{index-DImkUUlk.js → index-B4NX9asp.js} +1 -1
- package/dist/client/assets/{index-DYw-89RA.js → index-BA39BNRP.js} +1 -1
- package/dist/client/assets/{index-Ddd2dpQ0.js → index-BFntUKtR.js} +1 -1
- package/dist/client/assets/{index-CDTSSa2D.js → index-Bg0i3R97.js} +1 -1
- package/dist/client/assets/{index-pv8xOEWG.js → index-BjUZX2ed.js} +1 -1
- package/dist/client/assets/{index-B8VmK5No.js → index-C2cHKfrA.js} +1 -1
- package/dist/client/assets/{index-Du2sXJ45.js → index-C2fnFEyw.js} +1 -1
- package/dist/client/assets/{index-DYjVfKMe.js → index-CAbTaO3R.js} +1 -1
- package/dist/client/assets/{index-xGHoAbQb.js → index-COtQaCJe.js} +1 -1
- package/dist/client/assets/{index-BqYuwhzI.js → index-CbfC7nyd.js} +1 -1
- package/dist/client/assets/{index-1BK0D9QN.js → index-Cta6Sod1.js} +1 -1
- package/dist/client/assets/{index-BCruqzN-.js → index-D0TDiTs1.js} +1 -1
- package/dist/client/assets/{index-CougWaQw.js → index-DiDSraos.js} +3 -3
- package/dist/client/assets/{index-D0iHpnFf.js → index-LcU9Ln9y.js} +1 -1
- package/dist/client/assets/{index-redirect-YPx9D3Ou.js → index-redirect-BoFIsqHu.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Bum778rO.js → infiniteQueryObserver-C9S7qfpp.js} +1 -1
- package/dist/client/assets/{infra-billing-DnPhVgoU.js → infra-billing-Bz3akSkB.js} +1 -1
- package/dist/client/assets/{input-C6J6sFLk.js → input-5HYnFL6P.js} +1 -1
- package/dist/client/assets/{input-2GI01ZHq.js → input-Ct3i1uvm.js} +3 -3
- package/dist/client/assets/{integration-icon-BK5HEqOt.js → integration-icon-D-d6wE5Q.js} +1 -1
- package/dist/client/assets/{jira-icon-BkUCCogz.js → jira-icon-BP69kSW0.js} +1 -1
- package/dist/client/assets/{label-D2QweUS5.js → label-CLMhoWGB.js} +1 -1
- package/dist/client/assets/{layout-Cr4l3Lue.js → layout-Db_HIO6c.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CcppWhib.js → legacy-agents-deep-QJMpVjX1.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-t_ZXNxMx.js → legacy-main-redirect-D1emBtrc.js} +1 -1
- package/dist/client/assets/library-Cz5z21NF.js +1 -0
- package/dist/client/assets/{login-B_VmFE6F.js → login-h2cTYqbC.js} +1 -1
- package/dist/client/assets/{markdown-By-zKv4N.js → markdown-CpM4GomI.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CJcE7Me0.js → mcp-app-renderer-CTdZmGxc.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BRI2WRQ6.js → mcp-oauth-CnvlrfOO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CoELXu3p.js → mcp-oauth-Cr2ILRkC.js} +1 -1
- package/dist/client/assets/{members-T_CQxUsW.js → members-CjLahSa-.js} +1 -1
- package/dist/client/assets/{memory-D0T_EYk4.js → memory-DY8VVQ5w.js} +1 -1
- package/dist/client/assets/{mini-report-page--Xdlp0CV.js → mini-report-page-DE0--HlE.js} +1 -1
- package/dist/client/assets/{mock-board-PvVuj1dB.js → mock-board-9qvoLk7s.js} +3 -3
- package/dist/client/assets/{monaco-editor-k5U1VNJf.js → monaco-editor-6fA5o8_7.js} +1 -1
- package/dist/client/assets/{monitoring-C6IV1Ojn.js → monitoring-BF9A-9dY.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C8LKku6g.js → monitoring-stats-row-HtWZhf6N.js} +1 -1
- package/dist/client/assets/{multi-select-C8iX426C.js → multi-select-CRk4m031.js} +1 -1
- package/dist/client/assets/{mustache-B7NskePo.js → mustache-DyofnPOW.js} +1 -1
- package/dist/client/assets/{named-rule-uses-BGSr5H7c.js → named-rule-uses-CJ502rYn.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CAZxn86Q.js → new-project-dialog-BPePXtuz.js} +1 -1
- package/dist/client/assets/{oauth-callback-CzVBfeY-.js → oauth-callback-DyAOLKYm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-H_n-VMM6.js → oauth-callback-ai-provider-ePIUDanP.js} +1 -1
- package/dist/client/assets/{onboarding-1yY4wRC-.js → onboarding-pKm1fDey.js} +1 -1
- package/dist/client/assets/{openai-conversation-DiQuN7mY.js → openai-conversation-Ci2RosNi.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BBn4-VIq.js → optimistic-project-sidebar-views-CS8GDAKi.js} +1 -1
- package/dist/client/assets/{order-monitor-day-C3zOdDaG.js → order-monitor-day-BSlXhom-.js} +1 -1
- package/dist/client/assets/{organization-choice-CostWr9b.js → organization-choice-CPAfCImv.js} +1 -1
- package/dist/client/assets/{orgs-BIqrgGAH.js → orgs-D2kf-m_g.js} +1 -1
- package/dist/client/assets/{page-seo-form-x6CXAts2.js → page-seo-form-mA_jZRuV.js} +1 -1
- package/dist/client/assets/{pair-CODVJhQX.js → pair-BpdbeXdz.js} +1 -1
- package/dist/client/assets/{parse-sections-BcFrejWa.js → parse-sections-ClDRD1Rl.js} +1 -1
- package/dist/client/assets/{plan-C8moa1WK.js → plan-LrlX4DkJ.js} +1 -1
- package/dist/client/assets/{plan-ladder-ChGHzzYA.js → plan-ladder-Bh7odW1p.js} +1 -1
- package/dist/client/assets/{popover-D5HVj9db.js → popover-Bh0CcADC.js} +1 -1
- package/dist/client/assets/{post-calendar-B0tGkIHO.js → post-calendar-DuCa7gqX.js} +1 -1
- package/dist/client/assets/{post-editor-DV7Ks-kx.js → post-editor-DUCkVVMw.js} +1 -1
- package/dist/client/assets/{preview-content-ecbjHQqb.js → preview-content-DjMi2ntg.js} +1 -1
- package/dist/client/assets/{preview-dialog-DWH4sJhV.js → preview-dialog-C_JCrHoZ.js} +1 -1
- package/dist/client/assets/{preview-panel-TQJj_Tr2.js → preview-panel-DMmzZpGB.js} +1 -1
- package/dist/client/assets/{preview-tab-Bgfnz_1n.js → preview-tab-Buu2lHdF.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-DcP5zUi0.js → product-picker-dialog-9RxWSZaq.js} +1 -1
- package/dist/client/assets/{profile-CRMrBGKf.js → profile-BCbf2i1y.js} +1 -1
- package/dist/client/assets/{project-app-view-C7eutFBD.js → project-app-view-DVXf09pt.js} +1 -1
- package/dist/client/assets/{project-apps-lzR9_nfV.js → project-apps-Bv1Kv3jv.js} +1 -1
- package/dist/client/assets/{project-feed-B41ozbdF.js → project-feed-BBtYk5Yh.js} +1 -1
- package/dist/client/assets/{project-icon-XWJRcwiR.js → project-icon-C550MbiA.js} +1 -1
- package/dist/client/assets/project-reports-CVmpK6j7.js +1 -0
- package/dist/client/assets/project-tasks-BfltA2fK.js +1 -0
- package/dist/client/assets/{projects-DwIDU5EZ.js → projects-BRbphxF7.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DlyF6ybK.js → projects-empty-state-v63zSPt1.js} +1 -1
- package/dist/client/assets/{prompts-DyL_KC7K.js → prompts-CMpInuvL.js} +1 -1
- package/dist/client/assets/record-editor-CHCXoZ-6.js +1 -0
- package/dist/client/assets/{redirect-editor-BumyaG9e.js → redirect-editor-fRzJcNGc.js} +1 -1
- package/dist/client/assets/{releases-api-CsshXgEO.js → releases-api-F9-sDLet.js} +1 -1
- package/dist/client/assets/{reports-Bicq8ChL.js → reports-BuKA41ZR.js} +1 -1
- package/dist/client/assets/reports-muYxH4C5.js +1 -0
- package/dist/client/assets/{reports-onboarding-DjTvQuyJ.js → reports-onboarding-DwaKBMlH.js} +1 -1
- package/dist/client/assets/{reports-tab-7GXK_THd.js → reports-tab-DFjJeUkM.js} +2 -2
- package/dist/client/assets/repositories-BCLCgdaJ.js +1 -0
- package/dist/client/assets/{repositories-Chp8gK_G.js → repositories-DWx1MQSP.js} +1 -1
- package/dist/client/assets/{repository-binding-CnII80N0.js → repository-binding-D-pLrjbz.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BiuLIYSL.js → repository-import-picker-UrmRABf_.js} +1 -1
- package/dist/client/assets/{repository-picker-Dvi0iUFa.js → repository-picker-BBLpYCoK.js} +1 -1
- package/dist/client/assets/{require-capability-0qwMYW9s.js → require-capability-CwwCPV2d.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CbfxWhtd.js → required-auth-layout-DNk7GKXj.js} +1 -1
- package/dist/client/assets/{reset-password-U7rq9VmP.js → reset-password-CtT0FT-_.js} +1 -1
- package/dist/client/assets/{resizable-B9g11DZi.js → resizable-CrFKqTu0.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CLgWMK6w.js → resolve-tab-icon-hbO6hJ_0.js} +1 -1
- package/dist/client/assets/{review-settings-CSXc3oR2.js → review-settings-BJHUY4EV.js} +1 -1
- package/dist/client/assets/{roles-DqGCOkFu.js → roles-DKrwBipQ.js} +1 -1
- package/dist/client/assets/{route-TOXekdWb.js → route-DBkJNRIA.js} +1 -1
- package/dist/client/assets/{route-Cp26L3_c.js → route-DPp_Lep-.js} +1 -1
- package/dist/client/assets/route-hpx2bMJl.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BMFa8YZs.js → sandbox-lifecycle-context-Dkb3fO5w.js} +1 -1
- package/dist/client/assets/{schema-C4WMcmzI.js → schema-BEeVaLW6.js} +1 -1
- package/dist/client/assets/{schema-pEB8KJ_m.js → schema-DBHYkibP.js} +1 -1
- package/dist/client/assets/{scroll-area-DY12-cVO.js → scroll-area-DSUJ7lVD.js} +1 -1
- package/dist/client/assets/{search-input-bh1ZrQSN.js → search-input-QtKEZVD-.js} +1 -1
- package/dist/client/assets/{search-toggle-ZozNFCUP.js → search-toggle-Da11nBmc.js} +1 -1
- package/dist/client/assets/{secret-picker-DZfzvpJH.js → secret-picker-DJO55Hb6.js} +1 -1
- package/dist/client/assets/{secrets-DuxeqUhq.js → secrets-8eS3DOcb.js} +1 -1
- package/dist/client/assets/{section-array-field-C4TQplJL.js → section-array-field-WFlX5tgY.js} +1 -1
- package/dist/client/assets/{sections-Dz-3FzhS.js → sections-D8KpNRcH.js} +1 -1
- package/dist/client/assets/{sections-editor-CGdhD_Ae.js → sections-editor-7q1l9Pdz.js} +1 -1
- package/dist/client/assets/{select-model-D5fRAnFh.js → select-model-jRW9e3BX.js} +1 -1
- package/dist/client/assets/{select-Dyumr-dT.js → select-wwxrlqJJ.js} +1 -1
- package/dist/client/assets/{seo-editor-B_jYz7Iq.js → seo-editor-CkGOR4rd.js} +1 -1
- package/dist/client/assets/{separator-DrU4DMEu.js → separator-BV-bYhcR.js} +1 -1
- package/dist/client/assets/settings-tab-DfhqcViU.js +1 -0
- package/dist/client/assets/{sheet-CXIHwdnE.js → sheet-C7tL5BrZ.js} +1 -1
- package/dist/client/assets/{shell-layout-DM2ZRo1F.js → shell-layout-B5SK3GdR.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BnH3Iq2R.js → site-draft-actions-DNWQ-W1Y.js} +1 -1
- package/dist/client/assets/{site-draft-view-_ukrDc34.js → site-draft-view-C-QPK5Cc.js} +2 -2
- package/dist/client/assets/site-editor-jGKm5SGy.js +1 -0
- package/dist/client/assets/{site-editor-toast-C5nnCy5g.js → site-editor-toast-Wsn6Gm_t.js} +1 -1
- package/dist/client/assets/{skills-CWXH49l2.js → skills-BBaiGQmq.js} +1 -1
- package/dist/client/assets/{slider-D1vLXzvC.js → slider-846maMGM.js} +1 -1
- package/dist/client/assets/{sortable.esm-DdE--Pu3.js → sortable.esm-DuE9W2k7.js} +1 -1
- package/dist/client/assets/{sso-Cri4W727.js → sso-C44qfgJm.js} +1 -1
- package/dist/client/assets/{suggestion-Bh_FXVoZ.js → suggestion-DWGDGsQJ.js} +1 -1
- package/dist/client/assets/{switch-D3ZMBgst.js → switch-BwIq17J0.js} +1 -1
- package/dist/client/assets/{symbol-Dxj5NLAb.js → symbol-Y9WKjy4g.js} +1 -1
- package/dist/client/assets/{synced-repos-2ntvpkTr.js → synced-repos-IgpBiB0G.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DX_tgWo2.js → tab-icon-glyph-DO2yJW4L.js} +1 -1
- package/dist/client/assets/{table-CCEXPT5h.js → table-Dbp73Ur6.js} +1 -1
- package/dist/client/assets/{tabs-DvKB0Wsw.js → tabs-BQl_mHQf.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-BB9CqLgr.js → task-assignee-avatar-D29zUk62.js} +1 -1
- package/dist/client/assets/{task-board-CAwfWvJZ.js → task-board-BlfouCEs.js} +1 -1
- package/dist/client/assets/{task-route-CC3-1h7p.js → task-route-C8v3HFXu.js} +1 -1
- package/dist/client/assets/{task-status-Bqrc3FTa.js → task-status-azo13dYz.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CLwJCEH7.js → taskboard-analytics-BxbRnc4J.js} +1 -1
- package/dist/client/assets/tasks-Chz9dKsS.js +1 -0
- package/dist/client/assets/{tasks-BibyZVQl.js → tasks-DHS1Ow53.js} +1 -1
- package/dist/client/assets/{textarea-DUia9RkA.js → textarea-Si70fD_O.js} +1 -1
- package/dist/client/assets/{thread-analytics-D72n8VzJ.js → thread-analytics-DriU2alE.js} +1 -1
- package/dist/client/assets/{thread-intent-2lfYBt3n.js → thread-intent-BNI3DDiE.js} +1 -1
- package/dist/client/assets/{thread-route-rW4ajyKq.js → thread-route-Coc7t_3y.js} +1 -1
- package/dist/client/assets/{thread-route-DDAbB8Ku.js → thread-route-UX0SIEsR.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-C7E4Yyd8.js → thread-sheet-body--SLK6Fex.js} +1 -1
- package/dist/client/assets/{time-range-picker-xU8-msdF.js → time-range-picker-CNA8Af1j.js} +1 -1
- package/dist/client/assets/{toggle-group-Dv6s-3ES.js → toggle-group-D4XBy8-Z.js} +1 -1
- package/dist/client/assets/{tool-namespace-BOiBuXM-.js → tool-namespace-Dk-uJsrr.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CDcHhA1t.js → toolbar-icon-button-B6mWK_3l.js} +1 -1
- package/dist/client/assets/{tooltip-DIuN4DIg.js → tooltip-Da50YT6z.js} +1 -1
- package/dist/client/assets/{tooltipContext-DUaVg-61.js → tooltipContext-BqUsQzxk.js} +1 -1
- package/dist/client/assets/{track-CBxuiTSO.js → track-CNZXshw-.js} +1 -1
- package/dist/client/assets/{types-Dl-hn7PZ.js → types-CLli24Zj.js} +1 -1
- package/dist/client/assets/{url-slug-D9xrBukJ.js → url-slug-xIeJs7SS.js} +1 -1
- package/dist/client/assets/{usage-stats-wB5KA7-v.js → usage-stats-0gdPWOUr.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DKabXXld.js → use-ai-providers-DBkNT_8Y.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-ChTeSA7m.js → use-apply-named-rule-CfhbwzEJ.js} +1 -1
- package/dist/client/assets/{use-automations-CXDSC7z8.js → use-automations-njHVPQkF.js} +1 -1
- package/dist/client/assets/{use-autosave-DAmf6_7n.js → use-autosave-DpwR1jVJ.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CZOY4AOv.js → use-chat-layout-state-KqpZGztP.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BHoYlCCT.js → use-clock-tick-B0lOqPgS.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-03oPd-2q.js → use-cms-publish-actions-KlXS_wmT.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BpR9mqxM.js → use-connect-companion-CYoUD1bB.js} +1 -1
- package/dist/client/assets/{use-connection-CcrF7v5F.js → use-connection-BuzgLCJz.js} +1 -1
- package/dist/client/assets/{use-copy-AP38NyPo.js → use-copy-BcbQxaeq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D_NcyZtx.js → use-create-virtual-mcp-CHhePHII.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DuBvmVa0.js → use-date-fns-locale-CP_IUKpR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DEVo_C-J.js → use-debounced-autosave-BZuAGtKk.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DqClep0S.js → use-debounced-value-RygWFGN8.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CRR7Vt7Z.js → use-deco-credits-qTd1SfTx.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D8_8cAbK.js → use-decopilot-events-CkMNkN-E.js} +1 -1
- package/dist/client/assets/{use-delete-connection-s7i8wWyy.js → use-delete-connection-BIJYMBTL.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BgZgODZv.js → use-deployment-admin-DC5i0Cgy.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BnvZfNzT.js → use-fast-preview-draft-url-ZX29Mm-5.js} +1 -1
- package/dist/client/assets/{use-file-configs-DxHyOtM5.js → use-file-configs-D4vQEbMK.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BxQOoz_I.js → use-inbox-feed-CBtwciCB.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CPX1G9gZ.js → use-infinite-scroll-COH3LYJE.js} +1 -1
- package/dist/client/assets/{use-join-requests-CNRb0Ul7.js → use-join-requests-CLOYBM8d.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CPeAZW-Y.js → use-main-panel-tabs-hhnZvhUN.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DFNf_NTt.js → use-mcp-auth-status-CO1cpSxp.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D0NTKORm.js → use-mcp-client-9wJ5q4xy.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BjeRnCFI.js → use-mcp-prompts-Dv5OREO0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BnP9a_TP.js → use-mcp-tools-BYzkhKvC.js} +1 -1
- package/dist/client/assets/{use-mobile-D0NbGq8r.js → use-mobile-BikxJdu-.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BYuqgj9i.js → use-move-blocks-BkJIHaQD.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-gCcx6GwS.js → use-navigate-to-agent-dHFFqa7r.js} +1 -1
- package/dist/client/assets/{use-org-fs-BKmJqW_A.js → use-org-fs-Cmp1_AMe.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DPvFoTIs.js → use-org-repo-syncs-DusofZyp.js} +1 -1
- package/dist/client/assets/{use-org-sso-BVIo9GTp.js → use-org-sso-DrA6dEvB.js} +1 -1
- package/dist/client/assets/{use-organization-roles-E4VSJswv.js → use-organization-roles-DIhNfUf-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D06a1Czd.js → use-organization-settings-DFdAH18X.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-jx-DL83P.js → use-panel-navigate-C3PX7uIN.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CH9zsUtE.js → use-project-native-view-presence-jYSv_2GE.js} +1 -1
- package/dist/client/assets/{use-project-scope-CXMfs_YY.js → use-project-scope-MURKBB_F.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C2tQS1dh.js → use-recent-apps-vKYlAJ2a.js} +1 -1
- package/dist/client/assets/{use-releases-DR4CWHLU.js → use-releases-BHq1VGSD.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Dcgrh62f.js → use-reports-diagnostic-S3kMtK5n.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-B2TjVShJ.js → use-sandbox-events-CnzKe_lc.js} +1 -1
- package/dist/client/assets/{use-secrets-Cj4Pb8n_.js → use-secrets-BFtfHzoD.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CMn_-GMJ.js → use-section-preview-base-iF8R8vcU.js} +1 -1
- package/dist/client/assets/{use-session-runtime-D37re8YG.js → use-session-runtime-HoFUNhSi.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-1C51orRq.js → use-sidebar-collapsed-QQE2FX90.js} +1 -1
- package/dist/client/assets/{use-tags-Dzz1pxzl.js → use-tags-DiDxuaiw.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CnPUJQU5.js → use-task-board-analytics-Bgubkw2X.js} +1 -1
- package/dist/client/assets/{use-task-board-events-Bh7I4I55.js → use-task-board-events-CFizTHjL.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-kYArJi5f.js → use-task-board-item-prs-D_-z54nO.js} +1 -1
- package/dist/client/assets/{use-task-metadata-akm3m5_0.js → use-task-metadata-QnTEihUH.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-D0Kil6CI.js → use-thread-analytics-BW8G_SbR.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-vmQ-h3eH.js → use-thread-outputs-BXMQXTev.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CeZt9pAf.js +1 -0
- package/dist/client/assets/{useQueries-Up-l-Sx4.js → useQueries-CS9ArIgG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Ck-eVxVS.js +1 -0
- package/dist/client/assets/{users-DwA5MImr.js → users-CTFl4-d1.js} +1 -1
- package/dist/client/assets/{utils-BzqPVjaH.js → utils-Dji9f8cm.js} +1 -1
- package/dist/client/assets/{variant-calendar-CMbDFqB-.js → variant-calendar-D57_b4SY.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BUXhyVXI.js → variant-matcher-override-C3Jn5f75.js} +1 -1
- package/dist/client/assets/{view-header-Doh3SPsq.js → view-header-C3d6Mj7S.js} +1 -1
- package/dist/client/assets/{virtual-mcp-qbpJijf8.js → virtual-mcp-DMjNpKe2.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BNmRTmhu.js → watch-sse-pool-BCf_PrVU.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-app-C1OFoRGi.js +0 -1
- package/dist/client/assets/agent-deck-Sy8TVYhz.js +0 -1
- package/dist/client/assets/agent-experiments-DMgQhnRj.js +0 -1
- package/dist/client/assets/agent-library-CLaRD7JQ.js +0 -1
- package/dist/client/assets/agent-library-file-B_5KyXLb.js +0 -1
- package/dist/client/assets/agent-monitor-D0cusHE9.js +0 -1
- package/dist/client/assets/agent-settings-DqjWQ7jf.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CPcf7mfM.js +0 -2
- package/dist/client/assets/agent-site-editor-content-D6GJeBph.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DmxZmuOD.js +0 -1
- package/dist/client/assets/agent-view-CMmwezGN.js +0 -1
- package/dist/client/assets/api-keys-B5eVeqeH.js +0 -1
- package/dist/client/assets/library-DfBKwPIn.js +0 -1
- package/dist/client/assets/project-reports-DbsgDRgN.js +0 -1
- package/dist/client/assets/project-tasks-Dt5b0v4c.js +0 -1
- package/dist/client/assets/record-editor-BxDR8aF-.js +0 -1
- package/dist/client/assets/reports-PDZyl9Ix.js +0 -1
- package/dist/client/assets/repositories-BJ6u7iAl.js +0 -1
- package/dist/client/assets/route-CZs_kwOp.js +0 -1
- package/dist/client/assets/settings-tab-BMTHV3QM.js +0 -1
- package/dist/client/assets/site-editor-DL2SKa3C.js +0 -1
- package/dist/client/assets/tasks-7lymgCoP.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Bij8QMI7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CEQRCLvL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-CougWaQw.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
1
|
+
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-DiDSraos.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-DiDSraos.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,a3 as Ne,r as b,e as ae,C as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-CougWaQw.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
1
|
+
import{a as $,a3 as Ne,r as b,e as ae,C as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-DiDSraos.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-DiDSraos.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./mcp-oauth-
|
|
1
|
+
import{a as u}from"./mcp-oauth-CnvlrfOO.js";import{i as p}from"./mcp-oauth-Cr2ILRkC.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-D3g_Qled.js → automation-list-row-DBQTYlA5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,b as U,r as ee,l as G,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-
|
|
1
|
+
import{c as J,b as U,r as ee,l as G,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-DiDSraos.js";import{B as ge}from"./badge-CvD-8veb.js";import{A as xe,V as pe}from"./agent-icon-Gi86Du82.js";import{i as he}from"./DotsVertical-V6LcLL3o.js";import{s as je}from"./Trash01-CXmmcxbt.js";import{i as we}from"./ZoomOut-B5qWceNj.js";import{c as _e}from"./repository-binding-D-pLrjbz.js";import{a as ve}from"./use-automations-njHVPQkF.js";function ze(c){const e=J.c(89),{automation:s,showAgent:o,onClick:n}=c,i=U(),{remove:a}=ve(),[r,H]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let E;e[0]!==s.id||e[1]!==a?(E=()=>{a.mutate(s.id),H(!1)},e[0]=s.id,e[1]=a,e[2]=E):E=e[2];const Q=E;let F;e[3]!==n?(F=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=F):F=e[4];const X=F,Y=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==Y?(u=G("inline-block size-2 rounded-full shrink-0",Y),e[5]=Y,e[6]=u):u=e[6];const Z=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Z?(d=i(Z),e[7]=i,e[8]=Z,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(xe,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let w;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(w=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=w):w=e[32];let _;e[33]!==j||e[34]!==w?(_=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,w]}),e[33]=j,e[34]=w,e[35]=_):_=e[35];const q=s.system_key&&"invisible";let v;e[36]!==q?(v=G("shrink-0",q),e[36]=q,e[37]=v):v=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=$):$=e[38];let K,V;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),H(!0)},V=t.jsx(je,{size:16}),e[39]=K,e[40]=V):(K=e[39],V=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[$,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:K,children:[V,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let R;e[48]!==X||e[49]!==n||e[50]!==_||e[51]!==D||e[52]!==f||e[53]!==g?(R=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,_,D]}),e[48]=X,e[49]=n,e[50]=_,e[51]=D,e[52]=f,e[53]=g,e[54]=R):R=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(oe,{children:N}),e[57]=N,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==Q||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:Q,disabled:W,variant:"destructive",children:z}),e[73]=Q,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let O;e[83]!==r||e[84]!==S?(O=t.jsx(fe,{open:r,onOpenChange:H,children:S}),e[83]=r,e[84]=S,e[85]=O):O=e[85];let I;return e[86]!==R||e[87]!==O?(I=t.jsxs(t.Fragment,{children:[R,O]}),e[86]=R,e[87]=O,e[88]=I):I=e[88],I}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=J.c(8),{triggerCount:s,nextRunAt:o}=c,n=U();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:o?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(we,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ze as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-CougWaQw.js";import{u as xt}from"./useInfiniteQuery-Bij8QMI7.js";import{u as pt}from"./use-connection-CcrF7v5F.js";import{u as gt}from"./use-mcp-client-D0NTKORm.js";import{b as ht}from"./repository-binding-CnII80N0.js";import{b as Rt,a as jt}from"./sheet-CXIHwdnE.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-CCEXPT5h.js";import{E as et}from"./empty-state-I9kFofDC.js";import{u as St}from"./use-infinite-scroll-CPX1G9gZ.js";import{g as vt}from"./task-status-Bqrc3FTa.js";import{e as Ct}from"./use-automations-CXDSC7z8.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-C7E4Yyd8.js";function wt(c){const t=V.c(15),[i,r]=ot.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
1
|
+
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-DiDSraos.js";import{u as xt}from"./useInfiniteQuery-CeZt9pAf.js";import{u as pt}from"./use-connection-BuzgLCJz.js";import{u as gt}from"./use-mcp-client-9wJ5q4xy.js";import{b as ht}from"./repository-binding-D-pLrjbz.js";import{b as Rt,a as jt}from"./sheet-C7tL5BrZ.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-Dbp73Ur6.js";import{E as et}from"./empty-state-GaDVm-bY.js";import{u as St}from"./use-infinite-scroll-COH3LYJE.js";import{g as vt}from"./task-status-azo13dYz.js";import{e as Ct}from"./use-automations-njHVPQkF.js";import{T as It,f as at,a as nt}from"./thread-sheet-body--SLK6Fex.js";function wt(c){const t=V.c(15),[i,r]=ot.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-DiDSraos.js";import{s as F}from"./Plus-KFhoznQ0.js";import{i as S}from"./ZoomOut-B5qWceNj.js";import{S as G}from"./search-input-QtKEZVD-.js";import{E as T}from"./empty-state-GaDVm-bY.js";import{u as H}from"./use-automations-njHVPQkF.js";import{u as J}from"./use-navigate-to-agent-dHFFqa7r.js";import{A as K}from"./automation-list-row-DBQTYlA5.js";import{b as O}from"./repository-binding-D-pLrjbz.js";import{R as Q}from"./require-capability-CwwCPV2d.js";import"./SearchMd-CvSxd4Re.js";import"./use-mcp-client-9wJ5q4xy.js";import"./auth-CDPlghAl.js";import"./thread-intent-BNI3DDiE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BCf_PrVU.js";import"./task-board-BlfouCEs.js";import"./schema-DBHYkibP.js";import"./slugify-CEUa2lfQ.js";import"./badge-CvD-8veb.js";import"./agent-icon-Gi86Du82.js";import"./AlertCircle-h4wkFXhr.js";import"./Tool01-BNfLt_2s.js";import"./ArrowUp-CQpR4KTR.js";import"./ArrowLeft-DGdRhjvP.js";import"./LinkBroken01-ByhYGCmE.js";import"./ShoppingBag01-DcvDPkmY.js";import"./Building02-CpaJ_8nf.js";import"./CheckCircle-BtjeVSI0.js";import"./ChevronUp-B_A-Aj1q.js";import"./ChevronSelectorVertical-CSeVJ5Wr.js";import"./UserSquare-DGd5-FO6.js";import"./Copy01-Dmv8RATM.js";import"./CreditCard01-C2WG-40P.js";import"./DotsVertical-V6LcLL3o.js";import"./Image01-Be1Fmo7b.js";import"./Globe04-DIXMg7de.js";import"./SwitchHorizontal01-B0wuTS4D.js";import"./Key01-B4ypjFEb.js";import"./Link01-BFhJluLv.js";import"./Minus-WbHh7z_4.js";import"./Monitor01-PpsDf0ug.js";import"./Sun-DNxRxT-Q.js";import"./Play-CVvTSMMO.js";import"./Trash01-CXmmcxbt.js";import"./Upload01-WhzmZATn.js";import"./Users01-Dt3KhwkI.js";import"./XClose-CB-WGW7l.js";import"./access-gate-BJQUokDS.js";import"./capability-load-error-BlK9-D5s.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=H(void 0),g=y===void 0?[]:y,E=O(),P=J(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(W)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=A.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&A.has(l)?l:X(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,v=d,C=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(G,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(F,{size:14}),o("settings.automations.browseAgentsButton")]})})}):b.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:b.map(i=>e.jsx(K,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==C.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(C.Container,{children:[n,_]}),t[10]=C.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Qt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{az as d}from"./index-
|
|
1
|
+
import{az as d}from"./index-DiDSraos.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l,j as u,cr as c,cs as p}from"./index-
|
|
1
|
+
import{c as b,l,j as u,cr as c,cs as p}from"./index-DiDSraos.js";const v=p("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=l(v({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=u.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
|