decocms 4.562.0 → 4.563.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BMgOinVw.js → AlertCircle-2LbzMVC9.js} +1 -1
- package/dist/client/assets/{AreaChart-BcZi16Vr.js → AreaChart-qBz2MFzD.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BJMjlG4g.js → ArrowLeft-BeuQwyHa.js} +1 -1
- package/dist/client/assets/{ArrowUp-DcJMRdNb.js → ArrowUp-DmxAfWhF.js} +1 -1
- package/dist/client/assets/{CartesianChart-C8LrSJIS.js → CartesianChart-BSwxZ1ZU.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CUR_9ZiJ.js → CategoricalChart-DVdTZlRq.js} +1 -1
- package/dist/client/assets/{CheckCircle-By2z0uOx.js → CheckCircle-BzNTGMCW.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BTg7xsL3.js → ChevronSelectorVertical-XdbRnSsi.js} +1 -1
- package/dist/client/assets/{ChevronUp-BCfBdjs4.js → ChevronUp-aYmfXYet.js} +1 -1
- package/dist/client/assets/{CreditCard01-kxqKIkVq.js → CreditCard01-yFcUZGe-.js} +1 -1
- package/dist/client/assets/{Globe04-ri2PR4JW.js → Globe04-RPMmcIuy.js} +1 -1
- package/dist/client/assets/{Key01-By4BziN_.js → Key01-jvDltRrN.js} +1 -1
- package/dist/client/assets/{LinkBroken01-znJYLaVP.js → LinkBroken01-Jybptj_M.js} +1 -1
- package/dist/client/assets/{Minus-Biy1YWEX.js → Minus-BqtyYKKc.js} +1 -1
- package/dist/client/assets/{Monitor01-DcAryzmn.js → Monitor01-As0zpJLy.js} +1 -1
- package/dist/client/assets/{Play-BkYxzt1r.js → Play-CdlorRHF.js} +1 -1
- package/dist/client/assets/{Plus-BhRQRaas.js → Plus-CzoopYlU.js} +1 -1
- package/dist/client/assets/ReferenceLine-CJng4Q0_.js +1 -0
- package/dist/client/assets/{SearchMd-DqnvtcaB.js → SearchMd-By2dNUiw.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DYcJDT4V.js → ShoppingBag01-DhegylE0.js} +1 -1
- package/dist/client/assets/{Sun-tnCpymBL.js → Sun-Hd0LHTxB.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D2vRhNhF.js → SwitchHorizontal01-Czrqzt6f.js} +1 -1
- package/dist/client/assets/{Tool01-B8q2F7hW.js → Tool01-D38zOT0h.js} +1 -1
- package/dist/client/assets/{Tooltip-B6aZIxiB.js → Tooltip-Dxjn-_yM.js} +1 -1
- package/dist/client/assets/{Trash01-Ccl1EX2p.js → Trash01-BxSWir9J.js} +1 -1
- package/dist/client/assets/{Upload01-DOAyGyLP.js → Upload01-C8sapTWh.js} +1 -1
- package/dist/client/assets/{UserSquare-Cbfe91aH.js → UserSquare-CEg-eLCw.js} +1 -1
- package/dist/client/assets/{Users01-C1OYrFY1.js → Users01-CMreTMtq.js} +1 -1
- package/dist/client/assets/{XClose-p8-Q8v8l.js → XClose-DGifUqyQ.js} +1 -1
- package/dist/client/assets/{Zap-DyRXLCnm.js → Zap-BLaVFWQx.js} +1 -1
- package/dist/client/assets/{access-gate-BAXdhF61.js → access-gate-BJSZ7nU5.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-I3R6bOX6.js → add-connection-dialog-Dpu5ecJP.js} +1 -1
- package/dist/client/assets/agent-app-CHKycGm0.js +1 -0
- package/dist/client/assets/agent-assets-7nArEuts.js +1 -0
- package/dist/client/assets/{agent-automation-TykMN0zp.js → agent-automation-Dq1UMpQM.js} +3 -3
- package/dist/client/assets/{agent-automations-axy_S6Px.js → agent-automations-DF3vcb3-.js} +1 -1
- package/dist/client/assets/agent-calendar-CsvxRBRw.js +1 -0
- package/dist/client/assets/agent-capabilities-CaXbVMop.js +1 -0
- package/dist/client/assets/{agent-connect-sources-YnQ0oiMQ.js → agent-connect-sources-84FLUgzX.js} +1 -1
- package/dist/client/assets/agent-deck-DEx4qeYv.js +1 -0
- package/dist/client/assets/agent-e2e-CfTkWgUa.js +1 -0
- package/dist/client/assets/agent-experiments-BMy2QOPP.js +1 -0
- package/dist/client/assets/agent-file-C7mhhKFK.js +1 -0
- package/dist/client/assets/agent-hosting-BmtgVBqV.js +1 -0
- package/dist/client/assets/{agent-icon-FkFyvRCX.js → agent-icon-U2nlXoBG.js} +1 -1
- package/dist/client/assets/agent-library-DIxeSWXa.js +1 -0
- package/dist/client/assets/agent-library-file-DQB6i5_0.js +1 -0
- package/dist/client/assets/agent-overview-D8ZTdoEM.js +1 -0
- package/dist/client/assets/agent-releases-DOPovy0S.js +2 -0
- package/dist/client/assets/agent-settings-x3yUV6x9.js +1 -0
- package/dist/client/assets/{agent-site-editor-iOr_R9Ca.js → agent-site-editor-Pg_WHlnv.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-DDscaXHP.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CBj6Azpl.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Doqukvwz.js +1 -0
- package/dist/client/assets/agent-view-CvpQlU18.js +1 -0
- package/dist/client/assets/{agent-view-guard-CTg_3K6Q.js → agent-view-guard-BFnkZyhp.js} +1 -1
- package/dist/client/assets/{ai-providers-SquUsRRR.js → ai-providers-tFJSU00y.js} +1 -1
- package/dist/client/assets/{alert-BcGEYE9G.js → alert-B52lXsYB.js} +1 -1
- package/dist/client/assets/{analytics-sections-C3xfRdmO.js → analytics-sections-DgZGw207.js} +1 -1
- package/dist/client/assets/api-keys-BEFmsf3L.js +1 -0
- package/dist/client/assets/{api-keys-6xNcEC8t.js → api-keys-Bc1E8umo.js} +1 -1
- package/dist/client/assets/app-editor-a13s_yZZ.js +1 -0
- package/dist/client/assets/{asset-utils-Bq_dJbYP.js → asset-utils-DxOK6Cj3.js} +1 -1
- package/dist/client/assets/{auth-BsX6ur7b.js → auth-D991fBKg.js} +1 -1
- package/dist/client/assets/{auth-catchall-BwwwkN3O.js → auth-catchall-CO4eQSBG.js} +1 -1
- package/dist/client/assets/{auth-entry-D3WJl0FC.js → auth-entry-IOobChfY.js} +1 -1
- package/dist/client/assets/{auth-split-layout-J4KMjvhP.js → auth-split-layout-Dn_4EroD.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cu0VrSF5.js → authenticate-and-persist-oauth-CM3iiCDW.js} +1 -1
- package/dist/client/assets/{automation-list-row-QpXtin0Q.js → automation-list-row-sEGCpgiC.js} +1 -1
- package/dist/client/assets/{automation-runs-aImufYAH.js → automation-runs-DnhCJL7r.js} +1 -1
- package/dist/client/assets/{automations-DLgpPcdB.js → automations-BopJHgke.js} +1 -1
- package/dist/client/assets/{autosend-ce5-FRC2.js → autosend-D6GGYoeu.js} +1 -1
- package/dist/client/assets/{badge-2xhZ-r-l.js → badge-C9w1KAGQ.js} +1 -1
- package/dist/client/assets/{block-document-DI7cHMPV.js → block-document-ExA3sDvi.js} +2 -2
- package/dist/client/assets/{blocks-preview-workspace-context-DbUsPnrw.js → blocks-preview-workspace-context-Gbv7_zq8.js} +1 -1
- package/dist/client/assets/blocks-tab-states-oXZbJa9b.js +1 -0
- package/dist/client/assets/{blog-schema-CHW5Pxv_.js → blog-schema-4OEvCOpU.js} +1 -1
- package/dist/client/assets/{buckets-BDCTPQpG.js → buckets-DsGf5D8D.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-5IZRp812.js → build-improve-prompt-doc-BpZBupFA.js} +1 -1
- package/dist/client/assets/{calendar-D-rfd7JY.js → calendar-ahGH-Iwe.js} +1 -1
- package/dist/client/assets/{capability-load-error-BKCZfLTa.js → capability-load-error-BG7LprlO.js} +1 -1
- package/dist/client/assets/category-editor-Ctbp0oQy.js +1 -0
- package/dist/client/assets/{chart-wyCy3WJz.js → chart-DnblhNHq.js} +1 -1
- package/dist/client/assets/{chat-context-GsXpI-Rk.js → chat-context-CCj5lauv.js} +2 -2
- package/dist/client/assets/{chat-draft-CnA31cek.js → chat-draft-BtMWyLm7.js} +1 -1
- package/dist/client/assets/{checkbox-LWvsDQWZ.js → checkbox-DB14k3TQ.js} +1 -1
- package/dist/client/assets/{choose-editor-oX8cTiL9.js → choose-editor-D4zx1UJt.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Dal5M4-w.js → cli-auth-success-DeaH4VUx.js} +1 -1
- package/dist/client/assets/{client-icons-BUnl0ZXy.js → client-icons-C4W9Kqhd.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CcuLaEnU.js +1 -0
- package/dist/client/assets/cms-store-drafts-BumH78UY.js +1 -0
- package/dist/client/assets/{collapsible-DwneXnWl.js → collapsible-BPEhSNLz.js} +1 -1
- package/dist/client/assets/{collection-detail-DWuKEvHr.js → collection-detail-ralZDDkv.js} +1 -1
- package/dist/client/assets/{collection-display-button-BcvxnzA7.js → collection-display-button-CigTGx80.js} +1 -1
- package/dist/client/assets/{collection-search-BXhJDy4i.js → collection-search-D_oD-yY0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CsjezWAk.js → collection-table-wrapper-C2dK4p_4.js} +1 -1
- package/dist/client/assets/{collection-tabs-R5zZyWuQ.js → collection-tabs-SAUXvS4g.js} +1 -1
- package/dist/client/assets/{combobox-M_E9pRSg.js → combobox-hVgdYGtQ.js} +1 -1
- package/dist/client/assets/{command-D1ggU7uN.js → command-DiccrIM8.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-5tiqlnPW.js → companion-mcps-section-BUEyDlWy.js} +1 -1
- package/dist/client/assets/{config-BwOe4khb.js → config-DgUlbPLE.js} +1 -1
- package/dist/client/assets/{connect-CZDT3prT.js → connect-DhpQ_i5Y.js} +3 -3
- package/dist/client/assets/{connect-layout-BlfzEMXx.js → connect-layout-Dgb_j_Nn.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-Bu2QM8b1.js → connect-source-dialog-Dga8Dh15.js} +1 -1
- package/dist/client/assets/{connection-BWg4pBgr.js → connection-DF20RpK_.js} +1 -1
- package/dist/client/assets/{connection-card-D8rA98h7.js → connection-card-DeCnJCAi.js} +1 -1
- package/dist/client/assets/{connection-detail-DSD-1Pdd.js → connection-detail-Dn5XmXHk.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CTdld_FZ.js → connection-form-helpers-B4MG2Fy2.js} +1 -1
- package/dist/client/assets/{connection-slug-xnxqKZgT.js → connection-slug-tS8GnOSc.js} +1 -1
- package/dist/client/assets/{connections-CZPMCaga.js → connections-DREB4U2P.js} +1 -1
- package/dist/client/assets/{content-tab-B2fyj6Jh.js → content-tab-kF-GtTU9.js} +8 -8
- package/dist/client/assets/context-Gpy7m9cw.js +1 -0
- package/dist/client/assets/{context-menu-DPGth7tq.js → context-menu-vUs3I8Wh.js} +1 -1
- package/dist/client/assets/{context-shell-tkTYv2bR.js → context-shell-vU2YMH1K.js} +3 -3
- package/dist/client/assets/{core.esm-DnEwZVMw.js → core.esm-CWyzckxm.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-UgMN3Pp1.js → create-organization-dialog-qsB5dfrW.js} +1 -1
- package/dist/client/assets/device-hint-DMMaEP-p.js +1 -0
- package/dist/client/assets/{discover-Cpqi_nZO.js → discover-DN-I6i-O.js} +1 -1
- package/dist/client/assets/{domain-settings-DJSixqz2.js → domain-settings-FZeIPnhT.js} +1 -1
- package/dist/client/assets/{drawer-BnPszJPZ.js → drawer-CMTReHxa.js} +1 -1
- package/dist/client/assets/{editor-zE4VnGLI.js → editor-C6CE2FNQ.js} +1 -1
- package/dist/client/assets/{editor-classes-BnzpZOY5.js → editor-classes-DbMPYB4Z.js} +1 -1
- package/dist/client/assets/{empty-state-BFLQtSFV.js → empty-state-DF9St1T6.js} +1 -1
- package/dist/client/assets/{empty-state-DLrHPsXZ.js → empty-state-ovRL7NEK.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-BXlwzycK.js +1 -0
- package/dist/client/assets/{extract-connection-data-KiTWYSx4.js → extract-connection-data-Q1k0ncm3.js} +1 -1
- package/dist/client/assets/{feature-gate-C27q-aIj.js → feature-gate-DKF86Lcy.js} +1 -1
- package/dist/client/assets/{feature-paywall-CJwXTzME.js → feature-paywall-BoU9TII8.js} +1 -1
- package/dist/client/assets/{feedback-zQMybfa1.js → feedback-f3MT17uD.js} +1 -1
- package/dist/client/assets/{file-explorer-C_MMeMcX.js → file-explorer-DmvPCizi.js} +2 -2
- package/dist/client/assets/{file-preview-F9XVmctL.js → file-preview-aD0sVwV5.js} +1 -1
- package/dist/client/assets/{file-share-button-A6RgU4RK.js → file-share-button-agT85qGG.js} +2 -2
- package/dist/client/assets/{file-type-icon-DoyEf2kQ.js → file-type-icon-CflTIvHJ.js} +1 -1
- package/dist/client/assets/{folder-icon-CsH9NIDq.js → folder-icon-BKhbsJwX.js} +1 -1
- package/dist/client/assets/{form-cx1UDyF2.js → form-B_3ZthF3.js} +1 -1
- package/dist/client/assets/{general-YmXk3hPt.js → general-BdjsCK2j.js} +1 -1
- package/dist/client/assets/{github-icon-DNe7j1PY.js → github-icon-M-2WiP3Y.js} +1 -1
- package/dist/client/assets/home-dTYjLEfm.js +1 -0
- package/dist/client/assets/{home-overview-CFwm7iMO.js → home-overview-BAVfF6qS.js} +1 -1
- package/dist/client/assets/hosted-reconcile-B3o4dv7j.js +1 -0
- package/dist/client/assets/{icon-button-CmFwjZ_m.js → icon-button-DQuPTgIB.js} +1 -1
- package/dist/client/assets/{index-BmYeIRlv.js → index-0kopV6YP.js} +2 -2
- package/dist/client/assets/{index-DM3inxPC.js → index-2bmOBUEF.js} +1 -1
- package/dist/client/assets/{index-C9A_N0M0.js → index-BM0DSfBG.js} +1 -1
- package/dist/client/assets/{index-DGn-FPge.js → index-BZX-7ipZ.js} +45 -45
- package/dist/client/assets/index-BlTJ0I-U.js +4 -0
- package/dist/client/assets/{index-BCXxtUlh.js → index-BvJNHE6H.js} +6 -6
- package/dist/client/assets/{index-ffdfMTh-.js → index-C2-s3ia2.js} +1 -1
- package/dist/client/assets/{index-CN8uFy5p.js → index-C81DBcO6.js} +1 -1
- package/dist/client/assets/{index-DisXhcWe.js → index-Cjc_aSrk.js} +1 -1
- package/dist/client/assets/{index-B5lnCLuB.js → index-D7Mi9FGh.js} +1 -1
- package/dist/client/assets/{index-qMWmRmW0.js → index-DHMhIfTt.js} +1 -1
- package/dist/client/assets/{index-WwIqmvy-.js → index-DT3lYd1R.js} +1 -1
- package/dist/client/assets/{index-hZylT09v.js → index-DzmcFP3y.js} +1 -1
- package/dist/client/assets/index-SmuiYnIl.css +1 -0
- package/dist/client/assets/{index-DuD6FLZ3.js → index-cmF_qGuq.js} +1 -1
- package/dist/client/assets/{index-CmGLs6T5.js → index-iezPx7cK.js} +1 -1
- package/dist/client/assets/index-mtR249ru.js +1 -0
- package/dist/client/assets/{index-redirect-eX7nEWSl.js → index-redirect-ay83YA5a.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B_P9W4Zx.js → infiniteQueryObserver-CQGSlzKO.js} +1 -1
- package/dist/client/assets/{infra-billing-BatrrG1f.js → infra-billing-DUjivW_p.js} +1 -1
- package/dist/client/assets/{input-BEManHLB.js → input-3OyhKW_c.js} +1 -1
- package/dist/client/assets/input-CcFFY__7.js +17 -0
- package/dist/client/assets/{integration-icon-BHx1ytyX.js → integration-icon-Btk7lWbK.js} +1 -1
- package/dist/client/assets/{jira-icon-DQhFl4az.js → jira-icon-TeK8CaRV.js} +1 -1
- package/dist/client/assets/{label-CHRzCbuP.js → label-BGCn7A0y.js} +1 -1
- package/dist/client/assets/{layout-CvFeIpHB.js → layout-XVKa9Y6f.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B-RkQsR1.js → legacy-agents-deep-DksTbOzF.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-f_YEwDUU.js → legacy-main-redirect-8kA2UC85.js} +1 -1
- package/dist/client/assets/library-O1-Gs4qz.js +1 -0
- package/dist/client/assets/{library-tab-DrpEkybg.js → library-tab-DJKD7rUC.js} +3 -3
- package/dist/client/assets/{login-DtH52R3F.js → login-CH5yud2M.js} +1 -1
- package/dist/client/assets/{markdown-C7Kie5ev.js → markdown-B6eeRWQb.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CO8LOFxq.js → mcp-app-renderer-DwuRGgZk.js} +1 -1
- package/dist/client/assets/{mcp-oauth-iB4K_uoY.js → mcp-oauth-BvqIKSqR.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C-mc4e6m.js → mcp-oauth-Bz1Lo9Pk.js} +1 -1
- package/dist/client/assets/{members-yfLvIIIT.js → members-FYjquUkN.js} +1 -1
- package/dist/client/assets/{memory-aeBofHaH.js → memory-CoUl94G3.js} +1 -1
- package/dist/client/assets/{mock-board-B5SFWfb2.js → mock-board-DvOE8ZQh.js} +4 -4
- package/dist/client/assets/{monaco-editor-BRY87vsh.js → monaco-editor-vUgphdkE.js} +1 -1
- package/dist/client/assets/monitoring-UUQquQf7.js +2 -0
- package/dist/client/assets/{monitoring-stats-row-DZcqSbnv.js → monitoring-stats-row-BY92i-Bt.js} +1 -1
- package/dist/client/assets/{multi-select-C-iHSsuJ.js → multi-select-9ieJQPsD.js} +1 -1
- package/dist/client/assets/mustache-CgF6ozKS.js +4 -0
- package/dist/client/assets/named-rule-view-CdhLqAy7.js +1 -0
- package/dist/client/assets/{new-project-dialog-UvI58my0.js → new-project-dialog-EK9WMEhp.js} +1 -1
- package/dist/client/assets/{oauth-callback-Bg-Twulk.js → oauth-callback-Cuv6PAYs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CuXrUeR4.js → oauth-callback-ai-provider-BGc97raN.js} +1 -1
- package/dist/client/assets/{oauth-consent-BdD4CLIL.js → oauth-consent-fGbsmdGY.js} +1 -1
- package/dist/client/assets/{onboarding-DAlZ_ijb.js → onboarding-DF5AGUdi.js} +1 -1
- package/dist/client/assets/openai-conversation-CMIme_Ur.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-uJohOkF6.js → optimistic-project-sidebar-views-mQ0HUqGi.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BIbj8jXM.js → order-monitor-day-BPx4Aihv.js} +1 -1
- package/dist/client/assets/{organization-choice-9Sf7qdAX.js → organization-choice-KNGQur5O.js} +1 -1
- package/dist/client/assets/{orgs-DuQRavym.js → orgs-C5Zlwg3I.js} +1 -1
- package/dist/client/assets/{own-accounts-section-n50adHNX.js → own-accounts-section-C_F0-lzr.js} +1 -1
- package/dist/client/assets/{pair-1hov1KDD.js → pair-C5KKQk8r.js} +7 -7
- package/dist/client/assets/{parse-sections-BNf6_EjY.js → parse-sections-DE2O_vev.js} +7 -7
- package/dist/client/assets/{plan-Dq5q5bsx.js → plan-DdvgvWt2.js} +1 -1
- package/dist/client/assets/{plan-ladder-DJg9yABt.js → plan-ladder-BQ0gcfdF.js} +1 -1
- package/dist/client/assets/{plan-usage-card-D4SynKK4.js → plan-usage-card-8-3zMqsW.js} +2 -2
- package/dist/client/assets/{popover-CE0A3Qit.js → popover-CkuSZicN.js} +1 -1
- package/dist/client/assets/post-calendar-DVrcXuZq.js +1 -0
- package/dist/client/assets/{post-editor-CeOdXCzo.js → post-editor-CG6NXsGN.js} +2 -2
- package/dist/client/assets/{preview-content-CyH9JuG-.js → preview-content-xRBU7B3O.js} +1 -1
- package/dist/client/assets/{preview-dialog-FVFjchHr.js → preview-dialog-D36kXBk6.js} +1 -1
- package/dist/client/assets/{preview-panel-eL-KdUlb.js → preview-panel-Cp7F1lqp.js} +1 -1
- package/dist/client/assets/preview-tab-Dn0RGnhj.js +551 -0
- package/dist/client/assets/{product-picker-dialog-oaL2Geio.js → product-picker-dialog-C2KLekZA.js} +1 -1
- package/dist/client/assets/{profile-DhXoBixo.js → profile-BfDfzRPA.js} +1 -1
- package/dist/client/assets/project-app-view-DVhAuH9N.js +1 -0
- package/dist/client/assets/project-apps-D47w7eJj.js +1 -0
- package/dist/client/assets/{project-icon-reyc_nNY.js → project-icon-ofE-LDok.js} +1 -1
- package/dist/client/assets/{project-index-CeS8PQv7.js → project-index-PpuyCKHe.js} +1 -1
- package/dist/client/assets/project-reports-BuJS86vH.js +1 -0
- package/dist/client/assets/project-sidebar-views-Dew_3OKS.js +1 -0
- package/dist/client/assets/project-tasks-CZtVWSYo.js +1 -0
- package/dist/client/assets/{projects-QRnnQxmB.js → projects-Be7d593_.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B2R3HC7E.js → projects-empty-state-DpmH0sch.js} +1 -1
- package/dist/client/assets/{prompts-Cp6YboL1.js → prompts-ClmMS_OK.js} +1 -1
- package/dist/client/assets/record-editor-OoLxSu9R.js +1 -0
- package/dist/client/assets/redirect-editor-W9B4A_h8.js +1 -0
- package/dist/client/assets/{reports-BtW4mY0K.js → reports-DCsJlho1.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CtEi6opy.js → reports-onboarding-CMTzWUTp.js} +1 -1
- package/dist/client/assets/reports-s2E9cwFc.js +1 -0
- package/dist/client/assets/{reports-tab-DhrTVeTc.js → reports-tab-BKnG1JmX.js} +2 -2
- package/dist/client/assets/repositories-Dj2kaTIN.js +1 -0
- package/dist/client/assets/{repositories-CGGnfQiR.js → repositories-KlUH4dUR.js} +1 -1
- package/dist/client/assets/{repository-binding-DHN5ihZA.js → repository-binding-CqOunspI.js} +1 -1
- package/dist/client/assets/{repository-picker-BVa6TfGc.js → repository-picker-DNdEQtlZ.js} +1 -1
- package/dist/client/assets/{require-capability-CVoJcu7H.js → require-capability-RYn3iksk.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BQmhUScr.js → required-auth-layout-Dfyc4Zas.js} +1 -1
- package/dist/client/assets/{reset-password-BLOlZYb5.js → reset-password-CTGJ7V-t.js} +1 -1
- package/dist/client/assets/{resizable-CdFCM71r.js → resizable-BCGqPRic.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-BnqDq-fY.js +1 -0
- package/dist/client/assets/{review-settings-Deyxg2o8.js → review-settings-DvoYyrmi.js} +1 -1
- package/dist/client/assets/{role-color-DfmSCdD1.js → role-color-cUMHSMVi.js} +1 -1
- package/dist/client/assets/{roles-DGxZsr14.js → roles-x3B4vLKU.js} +1 -1
- package/dist/client/assets/route-PbputQp9.js +1 -0
- package/dist/client/assets/route-h-Fc_oVe.js +1 -0
- package/dist/client/assets/route-wINBwrny.js +1 -0
- package/dist/client/assets/sandbox-lifecycle-context-CXwLCWvJ.js +1 -0
- package/dist/client/assets/{schema-C2e4bOOh.js → schema-C1bLOk3P.js} +1 -1
- package/dist/client/assets/{schema-77LyfVRl.js → schema-DHLwjAWR.js} +1 -1
- package/dist/client/assets/{scroll-area-DOPuQKg_.js → scroll-area-rELMi4e6.js} +1 -1
- package/dist/client/assets/{search-input-Bo9D0b2l.js → search-input-Crult1Qo.js} +1 -1
- package/dist/client/assets/{search-toggle-D227Ek9d.js → search-toggle-DzMf9QP4.js} +1 -1
- package/dist/client/assets/{secret-picker-ChOT2LaB.js → secret-picker-CimF9dsx.js} +1 -1
- package/dist/client/assets/{secrets-TvEnuoeS.js → secrets-CZCnF6s4.js} +1 -1
- package/dist/client/assets/section-array-field-C3Tpx16b.js +1 -0
- package/dist/client/assets/{sections-tdmo3LjO.js → sections-346PcP2T.js} +1 -1
- package/dist/client/assets/sections-editor-DwV32_3f.js +1 -0
- package/dist/client/assets/{select-Di2sLm_-.js → select-CwDmbwEv.js} +1 -1
- package/dist/client/assets/{select-model-Do4joh93.js → select-model-B1ocDBwF.js} +1 -1
- package/dist/client/assets/seo-editor-D1gGpMMF.js +1 -0
- package/dist/client/assets/{separator-Bu1wQRuA.js → separator-C05SxAdn.js} +1 -1
- package/dist/client/assets/settings-tab-BImv5HgS.js +1 -0
- package/dist/client/assets/{sheet-pl7zdRHn.js → sheet-BYgfxL9i.js} +1 -1
- package/dist/client/assets/{shell-layout-DzQA4K-b.js → shell-layout-BvJfyzsq.js} +1 -1
- package/dist/client/assets/site-draft-actions-CgeV78uL.js +3 -0
- package/dist/client/assets/site-draft-view-Dkq2XweK.js +1 -0
- package/dist/client/assets/site-editor-B9ARkCiN.js +1 -0
- package/dist/client/assets/site-editor-toast-D83gMpdg.js +1 -0
- package/dist/client/assets/{skills-Bh5rPXC6.js → skills-OVV2oEwU.js} +1 -1
- package/dist/client/assets/{slider-CwE675ao.js → slider-Ipy9G5jv.js} +1 -1
- package/dist/client/assets/{sortable.esm-CIP-w8Te.js → sortable.esm-DgwAq-fn.js} +1 -1
- package/dist/client/assets/{sso-DpryG3cU.js → sso-C9cutlah.js} +1 -1
- package/dist/client/assets/{suggestion-Dr321Cmr.js → suggestion-Dwy6qysF.js} +1 -1
- package/dist/client/assets/{switch-D-6AqAnT.js → switch-BLkpF22m.js} +1 -1
- package/dist/client/assets/{synced-repos-CwCJZfKG.js → synced-repos-orJHnVxs.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CMWJQvgX.js → tab-icon-glyph-Co1M723I.js} +1 -1
- package/dist/client/assets/{table-DpJo1vAx.js → table-DPFxRA7S.js} +1 -1
- package/dist/client/assets/{tabs-DNziA2dZ.js → tabs--wmPR0cZ.js} +1 -1
- package/dist/client/assets/{task-board-BuKyXp11.js → task-board-DJtwkz3O.js} +1 -1
- package/dist/client/assets/{task-route-DlvmNWcQ.js → task-route-vCMrJPp9.js} +1 -1
- package/dist/client/assets/{task-status-B4eBo5Md.js → task-status-msgu5x2s.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-C-zvSFMs.js → taskboard-analytics-5nxg7YXN.js} +1 -1
- package/dist/client/assets/{tasks-BHN9oqEC.js → tasks-DpWVcTLT.js} +1 -1
- package/dist/client/assets/tasks-hbXv3hSd.js +1 -0
- package/dist/client/assets/{textarea-HAezEU3R.js → textarea-D5OF_Tld.js} +1 -1
- package/dist/client/assets/{thread-analytics-DWnZrs9k.js → thread-analytics-CVsji2MZ.js} +1 -1
- package/dist/client/assets/{thread-intent-C084ju5m.js → thread-intent-DIce2mks.js} +2 -2
- package/dist/client/assets/{thread-route-C-GRt_yL.js → thread-route-CGqDFJ1K.js} +1 -1
- package/dist/client/assets/{thread-route-Dt42HUQv.js → thread-route-CP2TR6nw.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Ck1Bv0_3.js → thread-sheet-body-Cba15kJF.js} +1 -1
- package/dist/client/assets/{time-range-picker-CS9tika7.js → time-range-picker-OdWLHy9U.js} +1 -1
- package/dist/client/assets/{toggle-group-CFojpTQB.js → toggle-group-DbLOGwe7.js} +1 -1
- package/dist/client/assets/{tool-namespace-Fc2c0QC4.js → tool-namespace-BQhkJpu9.js} +1 -1
- package/dist/client/assets/{tool-set-selector-B8ePlhyl.js → tool-set-selector-BmAnaEsw.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-GjI5vOKF.js → toolbar-icon-button-BzIcnxXk.js} +1 -1
- package/dist/client/assets/{tooltip-BojzNY2M.js → tooltip--uPFG1gb.js} +1 -1
- package/dist/client/assets/{tooltipContext-m-9QMOrS.js → tooltipContext-C8ArdkXW.js} +1 -1
- package/dist/client/assets/{track-Bclp3q8c.js → track-Bb4064-s.js} +1 -1
- package/dist/client/assets/{types-CdXMwNZg.js → types-EjHtXl5u.js} +1 -1
- package/dist/client/assets/{url-slug-BkV5QJiU.js → url-slug-rCJqhuIp.js} +1 -1
- package/dist/client/assets/{usage-stats-B39QZ3Cn.js → usage-stats-DaOtdhEm.js} +2 -2
- package/dist/client/assets/{use-ai-providers-hjEpjXQ2.js → use-ai-providers-C5rCFpU_.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-vuCkiknA.js → use-apply-named-rule-zZmpVvRd.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BaG9i0zc.js +1 -0
- package/dist/client/assets/{use-automations-DJWCjg8T.js → use-automations-CI7vvUzE.js} +1 -1
- package/dist/client/assets/{use-autosave-DzjuxKy7.js → use-autosave-DUBcsRSH.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-CXrKL60y.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DGf4-J1Z.js → use-chat-layout-state-CZaSk8YF.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-JZTNoXFa.js → use-cms-publish-actions-BV2nwL3g.js} +5 -5
- package/dist/client/assets/{use-connect-companion-DZPybU6m.js → use-connect-companion-DC6UOpxV.js} +1 -1
- package/dist/client/assets/{use-connection-BonBiP4H.js → use-connection-BEb786wf.js} +1 -1
- package/dist/client/assets/{use-content-sync-C-LYfyy7.js → use-content-sync-CtHfpBJp.js} +1 -1
- package/dist/client/assets/{use-copy-1IxNCkh9.js → use-copy-DccRTYvG.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-KQxxLRHa.js → use-date-fns-locale-DD1YxYKP.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Eo1C-w5U.js → use-debounced-autosave-clO2CzWE.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CzxhSP8l.js → use-debounced-value-CJpdUTvG.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CEMj3JGY.js → use-deco-credits-DtE2LNZs.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CTD6ZdaA.js → use-decopilot-events-DxBT3zOC.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CKqCkN-k.js → use-delete-connection-COvFjvtJ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BCIDPeyj.js → use-deployment-admin-BSEuekHe.js} +1 -1
- package/dist/client/assets/{use-entitlements-DxVD_uCH.js → use-entitlements-CWXMyUT0.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-BCmBxVQg.js +1 -0
- package/dist/client/assets/{use-file-configs-D87qhE2e.js → use-file-configs-DsyBYIJw.js} +1 -1
- package/dist/client/assets/{use-id-selection-FN7gA0OQ.js → use-id-selection-6CmUdc1s.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DglRSmH4.js → use-inbox-feed-okLCp4Pp.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4LyFv3hi.js → use-infinite-scroll-4e7tB3Vz.js} +1 -1
- package/dist/client/assets/{use-join-requests-czJryNA9.js → use-join-requests-muPMmn0O.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-BcP_qZl8.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-D_TqnxnH.js +1 -0
- package/dist/client/assets/{use-mcp-client-BeYM-3mp.js → use-mcp-client-CrdyqnFt.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-IjFHP0w8.js → use-mcp-prompts-C3SHzM_d.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bi0gClZp.js → use-mcp-tools-DQIJMlw-.js} +1 -1
- package/dist/client/assets/{use-mobile-D6y1UaCv.js → use-mobile-BDWitdax.js} +1 -1
- package/dist/client/assets/use-move-blocks-B48xFUbp.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-DP0a6y9z.js → use-navigate-to-agent-C3sX18jI.js} +1 -1
- package/dist/client/assets/{use-org-fs-CfPaWD_N.js → use-org-fs-BRERSVus.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-TOw0XlBk.js → use-org-repo-syncs-BFFdo3jR.js} +1 -1
- package/dist/client/assets/{use-org-sso-BK0CtdSD.js → use-org-sso-BHDTii7j.js} +1 -1
- package/dist/client/assets/{use-organization-settings--v2ov5jL.js → use-organization-settings-DPCrcu8e.js} +1 -1
- package/dist/client/assets/{use-project-scope-BJA0ds2S.js → use-project-scope-k7OaKjIm.js} +1 -1
- package/dist/client/assets/{use-recent-apps--67lnzqC.js → use-recent-apps-Buo9cWvj.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-81WxcUY9.js → use-reports-diagnostic-B1lbI319.js} +1 -1
- package/dist/client/assets/use-sandbox-events-BRJYKM54.js +2 -0
- package/dist/client/assets/{use-secrets-DEeK7thW.js → use-secrets-DlNiP0j4.js} +1 -1
- package/dist/client/assets/use-section-preview-base-CL9U3MEc.js +1 -0
- package/dist/client/assets/use-sidebar-collapsed-ByMTBVZc.js +1 -0
- package/dist/client/assets/{use-tags-DEr2TlgW.js → use-tags-CcJayzHf.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DxH9-ih7.js → use-task-board-analytics-0-6_3j_2.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BZToXVGj.js → use-task-board-events-CzDIUBok.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B2japofE.js → use-task-board-item-prs-DbHC-4Ry.js} +1 -1
- package/dist/client/assets/{use-task-board-items-Puwxrpek.js → use-task-board-items-COxHF7_K.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-C5iC-R_g.js → use-task-board-prompts-CKi9j8wF.js} +1 -1
- package/dist/client/assets/{use-task-metadata-jDPe6d5C.js → use-task-metadata-BxcNhivS.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DnX9RgWT.js → use-thread-outputs-lMVF4bT2.js} +1 -1
- package/dist/client/assets/use-voice-input-DsJxHyTh.js +1 -0
- package/dist/client/assets/useInfiniteQuery-B313haH3.js +1 -0
- package/dist/client/assets/{useQueries-BbqzFtkh.js → useQueries-BO8pZ9q-.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-07GrICuv.js +1 -0
- package/dist/client/assets/{users-DFMP_wOE.js → users-DCPPe9Uo.js} +1 -1
- package/dist/client/assets/{utils-BU-nucb-.js → utils-D0xixM8q.js} +3 -3
- package/dist/client/assets/{variant-calendar-DKhL8Mk2.js → variant-calendar-C5r0ak32.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CgElSjwL.js → variant-matcher-override-QQd3tA7f.js} +1 -1
- package/dist/client/assets/{view-header-i70JKW9C.js → view-header-BPAnt0vh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CsY6ukOa.js → virtual-mcp-Dzr3mFmO.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-D3b7K3Uo.js → watch-sse-pool-j0K-nQ0i.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +464 -464
- package/package.json +1 -1
- package/dist/client/assets/ReferenceLine-DfxOOnGv.js +0 -1
- package/dist/client/assets/agent-app-Djt3nisA.js +0 -1
- package/dist/client/assets/agent-assets-BytEk-0l.js +0 -1
- package/dist/client/assets/agent-calendar-BaUCHDte.js +0 -1
- package/dist/client/assets/agent-capabilities-DUEnZmC-.js +0 -1
- package/dist/client/assets/agent-deck-BZptRfb2.js +0 -1
- package/dist/client/assets/agent-e2e-CN8oCbtP.js +0 -1
- package/dist/client/assets/agent-file-C58LYJBC.js +0 -1
- package/dist/client/assets/agent-hosting-C-Xgv5CR.js +0 -1
- package/dist/client/assets/agent-library-CxsAEqgy.js +0 -1
- package/dist/client/assets/agent-library-file-BfEsr2cm.js +0 -1
- package/dist/client/assets/agent-overview-yBV3P4Kd.js +0 -1
- package/dist/client/assets/agent-releases-DXvHySgn.js +0 -2
- package/dist/client/assets/agent-settings-C7JVa4hp.js +0 -1
- package/dist/client/assets/agent-site-editor-code-0Rkb_Rlf.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CKdTDsIv.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DY2uCsMf.js +0 -1
- package/dist/client/assets/agent-view-CMZiQIOU.js +0 -1
- package/dist/client/assets/api-keys-DzWt-NPK.js +0 -1
- package/dist/client/assets/app-editor-CoHcQkjL.js +0 -1
- package/dist/client/assets/blocks-tab-states-Oy4QesXy.js +0 -1
- package/dist/client/assets/category-editor-BuIyetQS.js +0 -1
- package/dist/client/assets/cms-settings-editor-T8KTji6O.js +0 -1
- package/dist/client/assets/cms-store-drafts-49wrBNXT.js +0 -1
- package/dist/client/assets/context-CUmhz6yH.js +0 -1
- package/dist/client/assets/device-hint-DHQmntIa.js +0 -1
- package/dist/client/assets/home-DgapTseA.js +0 -1
- package/dist/client/assets/hosted-reconcile-BJXH2g7a.js +0 -1
- package/dist/client/assets/index-CxEOaGFH.js +0 -2
- package/dist/client/assets/index-D5uF1VH5.js +0 -4
- package/dist/client/assets/index-ug7KC70Z.css +0 -1
- package/dist/client/assets/input-Di6BJ4Zo.js +0 -17
- package/dist/client/assets/library-DQMyWPTm.js +0 -1
- package/dist/client/assets/monitoring-WRX4s2Md.js +0 -2
- package/dist/client/assets/mustache-WHgo2S29.js +0 -4
- package/dist/client/assets/named-rule-view-ChTlMWf5.js +0 -1
- package/dist/client/assets/openai-conversation-DChbcEJV.js +0 -3
- package/dist/client/assets/post-calendar-EtCAYSiT.js +0 -1
- package/dist/client/assets/preview-tab-Cuhy4gb6.js +0 -551
- package/dist/client/assets/project-app-view-CFDNRbPF.js +0 -1
- package/dist/client/assets/project-apps-B-5TAX2o.js +0 -1
- package/dist/client/assets/project-reports-DxSY0pyo.js +0 -1
- package/dist/client/assets/project-sidebar-views-DYKp64W4.js +0 -1
- package/dist/client/assets/project-tasks-joh7axEQ.js +0 -1
- package/dist/client/assets/record-editor-DzEJNlA8.js +0 -1
- package/dist/client/assets/redirect-editor-Bf8VmZQx.js +0 -1
- package/dist/client/assets/reports-5kgLKYGo.js +0 -1
- package/dist/client/assets/repositories-D0xZPdow.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DJ5Ncrbw.js +0 -1
- package/dist/client/assets/route-C6jiJ2GR.js +0 -1
- package/dist/client/assets/route-Cf6qLb88.js +0 -1
- package/dist/client/assets/route-Dq3q8mSL.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-Dp2Dt1TA.js +0 -1
- package/dist/client/assets/sections-editor-C7sTzFTf.js +0 -1
- package/dist/client/assets/seo-editor-BK7SzGFy.js +0 -1
- package/dist/client/assets/settings-tab-B2_rrm2f.js +0 -1
- package/dist/client/assets/site-draft-view-Ca1ao55E.js +0 -3
- package/dist/client/assets/site-editor-DR8x2KPW.js +0 -1
- package/dist/client/assets/site-editor-toast-BUVxT4JG.js +0 -1
- package/dist/client/assets/tasks-DqD-0E5O.js +0 -1
- package/dist/client/assets/use-ask-in-chat-oQGHyTZE.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-o_WDZuY-.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BeQ-NkWh.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-_QM-6kc-.js +0 -1
- package/dist/client/assets/use-move-blocks-DItjAQsv.js +0 -1
- package/dist/client/assets/use-section-preview-base-BO-qsUKf.js +0 -1
- package/dist/client/assets/use-sidebar-collapsed-DuLHdlSz.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CCkoNUSG.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CDBL11js.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a5 as d,e as g,ak as m,K as I,q as O}from"./index-
|
|
1
|
+
import{c as u,a5 as d,e as g,ak as m,K as I,q as O}from"./index-BZX-7ipZ.js";import{u as $}from"./useInfiniteQuery-B313haH3.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function v(e){const t=e.split("/");return t[t.length-1]??e}function _(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,v as b,F as c,S as e,_ as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as v,cb as $,cc as W,cd as H,ce as D,cf as y,cg as V,ch as x,ci as L,cj as j,ck as q,cl as N,cm as B,cn as Z,co as F}from"./index-DGn-FPge.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{ca as v,cb as $,cc as W,cd as H,ce as D,cf as y,cg as V,ch as x,ci as L,cj as j,ck as q,cl as N,cm as B,cn as Z,co as F}from"./index-BZX-7ipZ.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-BZX-7ipZ.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{a3 as Ue,a as $,a4 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as qe}from"./index-DGn-FPge.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=Ue(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(qe,{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 Qe(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,Qe as a};
|
|
1
|
+
import{a3 as Ue,a as $,a4 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as qe}from"./index-BZX-7ipZ.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=Ue(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(qe,{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 Qe(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,Qe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,m as p,j as f}from"./index-
|
|
1
|
+
import{c as g,m as p,j as f}from"./index-BZX-7ipZ.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-BvqIKSqR.js";import{i as p}from"./mcp-oauth-Bz1Lo9Pk.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-QpXtin0Q.js → automation-list-row-sEGCpgiC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,bj as me,aL as ue,aM as de,aN as fe}from"./index-
|
|
1
|
+
import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,bj as me,aL as ue,aM as de,aN as fe}from"./index-BZX-7ipZ.js";import{B as ge}from"./badge-C9w1KAGQ.js";import{A as xe,S as pe}from"./agent-icon-U2nlXoBG.js";import{a as he}from"./SwitchHorizontal01-Czrqzt6f.js";import{s as je}from"./Trash01-BxSWir9J.js";import{i as _e}from"./Zap-BLaVFWQx.js";import{b as we}from"./repository-binding-CqOunspI.js";import{a as ve}from"./use-automations-CI7vvUzE.js";function ze(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=U(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=we(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const V=F;let K;e[3]!==n?(K=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=K):K=e[4];const X=K,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 _;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(_=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]=_):_=e[32];let w;e[33]!==j||e[34]!==_?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,_]}),e[33]=j,e[34]=_,e[35]=w):w=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 O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=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]=O):O=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(je,{size:16}),e[39]=$,e[40]=I):($=e[39],I=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:[O,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:$,children:[I,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 N;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==D||e[52]!==f||e[53]!==g?(N=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,w,D]}),e[48]=X,e[49]=n,e[50]=w,e[51]=D,e[52]=f,e[53]=g,e[54]=N):N=e[54];let R;e[55]!==i?(R=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=R):R=e[56];let k;e[57]!==R?(k=t.jsx(oe,{children:R}),e[57]=R,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]!==V||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:V,disabled:W,variant:"destructive",children:z}),e[73]=V,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 E;e[83]!==r||e[84]!==S?(E=t.jsx(fe,{open:r,onOpenChange:J,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let H;return e[86]!==N||e[87]!==E?(H=t.jsxs(t.Fragment,{children:[N,E]}),e[86]=N,e[87]=E,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.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(_e,{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 Y,b as X,a5 as lt,T as it,ak as rt,fd as ct,K as tt,j as s,m as ut,i as mt,gw as dt}from"./index-DGn-FPge.js";import{u as ft}from"./useInfiniteQuery-CCkoNUSG.js";import{u as xt}from"./use-connection-BonBiP4H.js";import{u as pt}from"./use-mcp-client-BeYM-3mp.js";import{a as gt}from"./repository-binding-DHN5ihZA.js";import{b as ht,a as Rt}from"./sheet-pl7zdRHn.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-DpJo1vAx.js";import{E as et}from"./empty-state-BFLQtSFV.js";import{u as bt}from"./use-id-selection-FN7gA0OQ.js";import{u as St}from"./use-infinite-scroll-4LyFv3hi.js";import{g as vt}from"./task-status-B4eBo5Md.js";import{e as wt}from"./use-automations-DJWCjg8T.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-Ck1Bv0_3.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=wt(r,c),a=o?.runs,l=o?.usage;let k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const w=k;let C;t[2]!==e||t[3]!==l?(C=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=C):C=t[4];const h=C;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":w;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const k=l;let w,C,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const _=vt(r.status),$=_.icon;C=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=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:r.title})}),t[19]=r.title,t[20]=h):h=t[20],w=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=w,t[9]=C,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else w=t[8],C=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==w||t[29]!==v||t[30]!==j?(i=s.jsx(w,{className:j,children:v}),t[28]=w,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,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 M;return t[47]!==C||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(C,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=C,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const k=pt(l),w=rt(),C=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==w||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await w.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=w,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(_t),g=i.map(Pt),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==w||t[23]!==g?(I=async()=>await w.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=w,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let L;t[35]!==r||t[36]!==e?(L=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=L):L=t[37];let A;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==_?(A=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{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:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=_,t[45]=A):A=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==C||t[52]!==h||t[53]!==k||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(Ct,{thread:V,client:k,locator:a,connections:C,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=C,t[52]=h,t[53]=k,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==L||t[69]!==A||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,A,H,F]}),t[68]=L,t[69]=A,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
|
|
1
|
+
import{c as Y,b as X,a5 as lt,T as it,ak as rt,fa as ct,K as tt,j as s,m as ut,i as mt,gw as dt}from"./index-BZX-7ipZ.js";import{u as ft}from"./useInfiniteQuery-B313haH3.js";import{u as xt}from"./use-connection-BEb786wf.js";import{u as pt}from"./use-mcp-client-CrdyqnFt.js";import{a as gt}from"./repository-binding-CqOunspI.js";import{b as ht,a as Rt}from"./sheet-BYgfxL9i.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-DPFxRA7S.js";import{E as et}from"./empty-state-DF9St1T6.js";import{u as bt}from"./use-id-selection-6CmUdc1s.js";import{u as St}from"./use-infinite-scroll-4e7tB3Vz.js";import{g as vt}from"./task-status-msgu5x2s.js";import{e as wt}from"./use-automations-CI7vvUzE.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-Cba15kJF.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=wt(r,c),a=o?.runs,l=o?.usage;let k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const w=k;let C;t[2]!==e||t[3]!==l?(C=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=C):C=t[4];const h=C;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":w;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const k=l;let w,C,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const _=vt(r.status),$=_.icon;C=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=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:r.title})}),t[19]=r.title,t[20]=h):h=t[20],w=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=w,t[9]=C,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else w=t[8],C=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==w||t[29]!==v||t[30]!==j?(i=s.jsx(w,{className:j,children:v}),t[28]=w,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,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 M;return t[47]!==C||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(C,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=C,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const k=pt(l),w=rt(),C=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==w||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await w.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=w,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(_t),g=i.map(Pt),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==w||t[23]!==g?(I=async()=>await w.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=w,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let L;t[35]!==r||t[36]!==e?(L=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=L):L=t[37];let A;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==_?(A=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{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:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=_,t[45]=A):A=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==C||t[52]!==h||t[53]!==k||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(Ct,{thread:V,client:k,locator:a,connections:C,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=C,t[52]=h,t[53]=k,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==L||t[69]!==A||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,A,H,F]}),t[68]=L,t[69]=A,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a5 as D,d as M,r as q,n as d,B as V,ha as F,E as S}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a5 as D,d as M,r as q,n as d,B as V,ha as F,E as S}from"./index-BZX-7ipZ.js";import{s as G}from"./Plus-CzoopYlU.js";import{i as b}from"./Zap-BLaVFWQx.js";import{S as H}from"./search-input-Crult1Qo.js";import{E as T}from"./empty-state-DF9St1T6.js";import{u as J}from"./use-automations-CI7vvUzE.js";import{u as K}from"./use-navigate-to-agent-C3sX18jI.js";import{A as O}from"./automation-list-row-sEGCpgiC.js";import{a as Q}from"./repository-binding-CqOunspI.js";import{R as U}from"./require-capability-RYn3iksk.js";import"./SearchMd-By2dNUiw.js";import"./use-mcp-client-CrdyqnFt.js";import"./auth-D991fBKg.js";import"./thread-intent-DIce2mks.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-j0K-nQ0i.js";import"./task-board-DJtwkz3O.js";import"./schema-C1bLOk3P.js";import"./badge-C9w1KAGQ.js";import"./agent-icon-U2nlXoBG.js";import"./AlertCircle-2LbzMVC9.js";import"./Tool01-D38zOT0h.js";import"./ArrowUp-DmxAfWhF.js";import"./ArrowLeft-BeuQwyHa.js";import"./LinkBroken01-Jybptj_M.js";import"./ShoppingBag01-DhegylE0.js";import"./Globe04-RPMmcIuy.js";import"./CheckCircle-BzNTGMCW.js";import"./ChevronUp-aYmfXYet.js";import"./ChevronSelectorVertical-XdbRnSsi.js";import"./UserSquare-CEg-eLCw.js";import"./CreditCard01-yFcUZGe-.js";import"./SwitchHorizontal01-Czrqzt6f.js";import"./Key01-jvDltRrN.js";import"./Minus-BqtyYKKc.js";import"./Monitor01-As0zpJLy.js";import"./Sun-Hd0LHTxB.js";import"./Play-CdlorRHF.js";import"./Trash01-BxSWir9J.js";import"./Upload01-C8sapTWh.js";import"./Users01-CMreTMtq.js";import"./XClose-DGifUqyQ.js";import"./access-gate-BJSZ7nU5.js";import"./capability-load-error-BG7LprlO.js";function W(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),N=g.filter(s=>{if(!h||s.name.toLowerCase().includes(h))return!0;if(s.virtual_mcp_id){const l=A.get(s.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(s,l)=>{const R=l&&A.has(l)?l:F(c.id);S("automations_list_row_clicked",{automation_id:s,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${s}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{S("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,w=d;let i;t[3]!==o?(i=o("settings.automations.pageTitle"),t[3]=o,t[4]=i):i=t[4];let r;t[5]!==i?(r=e.jsx(d.Title,{children:i}),t[5]=i,t[6]=r):r=t[6];const C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,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(b,{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(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):N.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{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:N.map(s=>e.jsx(O,{automation:s,showAgent:!0,onClick:()=>B(s.id,s.virtual_mcp_id)},s.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.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 X(t){return[t.id,t]}function Ft(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{Ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,f as A,u as w,da as E,d as V,l as I,db as T,dc as N,at as k}from"./index-
|
|
1
|
+
import{c as g,f as A,u as w,da as E,d as V,l as I,db as T,dc as N,at as k}from"./index-BZX-7ipZ.js";import{b as O}from"./thread-route-CP2TR6nw.js";import{u as P}from"./use-project-scope-k7OaKjIm.js";function D(e){const t=e.destination==="agent",n={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(n):n,mainpanel:void 0}}function R(){const e=g.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:L},e[0]=t):t=e[0],I(t)}function L(e){for(let t=e.matches.length-1;t>=0;t--){const n=e.matches[t]?.staticData;if(n?.mainView||n?.siteEditorView)return{mainView:n.mainView,siteEditorView:n.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function Y(){const e=g.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=A(t);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[1]=r):r=e[1];const a=w(r),o={file:"file"in a&&typeof a.file=="string"?a.file:void 0,key:"key"in a&&typeof a.key=="string"?a.key:void 0,path:"path"in a&&typeof a.path=="string"?a.path:void 0},{mainView:s,siteEditorView:i}=R();return E({mainView:s,siteEditorView:i,params:n,search:o})}function C(){const e=g.c(11),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const r=A(n),a=O(),o=P(),s=r.org??"";let i;e[1]!==t||e[2]!==s||e[3]!==a||e[4]!==o?(i=(d,c)=>{const v=T(d),h=c?.virtualmcpid!==void 0||o!==null?"project":"organization",S=v.kind==="org-destination"||v.kind==="project-destination"&&h==="organization",_=b=>D({previous:b,destination:S?"organization":"agent",update:c?.search});N(t,{org:s,agentId:c?.virtualmcpid??a,tabId:d,destinationScope:h,taskKey:c?.taskKey,search:_,replace:c?.replace??!0})},e[1]=t,e[2]=s,e[3]=a,e[4]=o,e[5]=i):i=e[5];const f=i;let u;e[6]!==t?(u=d=>t({to:".",search:M,replace:d?.replace??!0}),e[6]=t,e[7]=u):u=e[7];const p=u;let l;return e[8]!==p||e[9]!==f?(l={openPanel:f,closePanel:p},e[8]=p,e[9]=f,e[10]=l):l=e[10],l}function M(e){return{...e,mainpanel:!1,sidepanel:!0}}const j=1e4,F="true",y=2;function m(e,t){return k.chatAutosend(e,t)}function U(e){return e==="pending"||e==="sending"}function x(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let r=0;n.status==="sending"?r=n.retryAt===void 0?1:y:n.retryAt!==void 0&&(r=1);const a=n.attempt===void 0?r:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!U(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof a!="number"||!Number.isInteger(a)||a<0||a>y?null:{...t,attempt:a}}function G(e,t,n,r,a=Date.now()){const o={message:r,createdAt:a,status:"pending",attempt:0};return e.setItem(m(t,n),JSON.stringify(o)),o}function K(e,t,n){const r=m(t,n),a=x(e.getItem(r));return a||(e.removeItem(r),null)}function Q(e,t,n,r=Date.now()){const a=m(t,n),o=K(e,t,n);if(!o||o.status!=="pending")return null;if(o.attempt>=y)return e.removeItem(a),null;const s=o.retryAt??o.createdAt;if(r-s>=j)return e.removeItem(a),null;const i={...o,status:"sending",attempt:o.attempt+1};return e.setItem(a,JSON.stringify(i)),{message:i.message,createdAt:i.createdAt,attempt:i.attempt}}function X(e,t,n){e.removeItem(m(t,n))}export{F as A,C as a,X as b,Q as c,D as r,Y as u,G as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,m as u,j as l,cs as c,ct as p}from"./index-
|
|
1
|
+
import{c as b,m as u,j as l,cs as c,ct as p}from"./index-BZX-7ipZ.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=u(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=l.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};
|