decocms 4.523.2 → 4.524.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-BiggFcjT.js → ActiveShapeUtils-Bp4fmUBo.js} +1 -1
- package/dist/client/assets/{AlertCircle-DuL_FFHx.js → AlertCircle-Bq5T03B8.js} +1 -1
- package/dist/client/assets/{AreaChart-CwzHmgIC.js → AreaChart-CCyND0Jp.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D94SnK45.js → ArrowLeft-Bwi_Jr7f.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dn7IgtbA.js → ArrowUp-CzX0fTk7.js} +1 -1
- package/dist/client/assets/{BarChart-cNHCiDCi.js → BarChart-wLDzzyOQ.js} +1 -1
- package/dist/client/assets/{Building02-BmRvdezs.js → Building02-A_MT9tNO.js} +1 -1
- package/dist/client/assets/{CartesianChart-iNB7Klro.js → CartesianChart-B0qX_dpC.js} +1 -1
- package/dist/client/assets/{CategoricalChart-C1fCYXI1.js → CategoricalChart-BDZ_2Tmn.js} +1 -1
- package/dist/client/assets/{CheckCircle-BCzuQhZn.js → CheckCircle-BE1i_X4b.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CxqUMZg6.js → ChevronSelectorVertical-DNrt0MHW.js} +1 -1
- package/dist/client/assets/{ChevronUp-DWUYL4oz.js → ChevronUp-RlBkcpdd.js} +1 -1
- package/dist/client/assets/{Copy01-B5Qm_DvO.js → Copy01-B9x501ud.js} +1 -1
- package/dist/client/assets/{CreditCard01-8EhoJBRm.js → CreditCard01-Bu_qRR36.js} +1 -1
- package/dist/client/assets/{DotsVertical-BmVaGWAg.js → DotsVertical-D9231JAc.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-7FUCCj8N.js → ErrorBarContext-PGp8cmoe.js} +1 -1
- package/dist/client/assets/{Globe04-KfEeo3Pn.js → Globe04-DQlP6Nhr.js} +1 -1
- package/dist/client/assets/{Image01-KdUybmWt.js → Image01-ClayPF_a.js} +1 -1
- package/dist/client/assets/{Key01-6z52NoNj.js → Key01-CxKYO-oQ.js} +1 -1
- package/dist/client/assets/{Link01-oKshySD_.js → Link01-B7BHRxIW.js} +1 -1
- package/dist/client/assets/{LinkBroken01-edPm2SIJ.js → LinkBroken01-XqJUgSE7.js} +1 -1
- package/dist/client/assets/{Minus-BvqQFZHP.js → Minus-Bh6ogRng.js} +1 -1
- package/dist/client/assets/{Monitor01-DZmeiH6p.js → Monitor01-BpzvJnXA.js} +1 -1
- package/dist/client/assets/{Play-3WH9Ikap.js → Play-w4omVTRa.js} +1 -1
- package/dist/client/assets/{Plus-D3sv1Vc5.js → Plus-CcJNnBya.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D2o1nZW0.js → ReferenceLine-CI6ZmeJ0.js} +1 -1
- package/dist/client/assets/{SearchMd-DzFzOALq.js → SearchMd-5lGv5a5H.js} +1 -1
- package/dist/client/assets/{Sector-DlWxPN8J.js → Sector-gkUUnvA4.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B1nTczbE.js → ShoppingBag01-C82UeRR9.js} +1 -1
- package/dist/client/assets/{Sun-D5qn9wPg.js → Sun-IvvKZ51n.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DQQsmdwN.js → SwitchHorizontal01-B1MoYKPo.js} +1 -1
- package/dist/client/assets/{Tool01-Bhj-QHDu.js → Tool01-BvlRH5Ln.js} +1 -1
- package/dist/client/assets/{Trash01-DT07olaT.js → Trash01-C9E8l_mI.js} +1 -1
- package/dist/client/assets/{Upload01-BocTk920.js → Upload01-mlw10ZK-.js} +1 -1
- package/dist/client/assets/{UserSquare-zP4-JvXz.js → UserSquare-DwNuAluZ.js} +1 -1
- package/dist/client/assets/{Users01-DfLHZjoX.js → Users01-DcHPIKgH.js} +1 -1
- package/dist/client/assets/{XClose-1FEelrZ4.js → XClose-BBReaSBA.js} +1 -1
- package/dist/client/assets/{ZoomOut-DH4NDKgS.js → ZoomOut-CnbxUNSo.js} +1 -1
- package/dist/client/assets/access-gate-BNOWXoYR.js +1 -0
- package/dist/client/assets/{add-connection-dialog-B9X2bENr.js → add-connection-dialog-CEj8kbGq.js} +1 -1
- package/dist/client/assets/agent-analytics-DcqQcnI_.js +1 -0
- package/dist/client/assets/agent-app-BWM9EEcJ.js +1 -0
- package/dist/client/assets/agent-assets-CppO2yKd.js +1 -0
- package/dist/client/assets/agent-automation-BtSTyUKu.js +20 -0
- package/dist/client/assets/agent-automations-Bf-0_57T.js +1 -0
- package/dist/client/assets/agent-calendar-Bp6Y1tPy.js +1 -0
- package/dist/client/assets/agent-connect-sources-C_0x6Udu.js +1 -0
- package/dist/client/assets/agent-deck-BOaej8yV.js +1 -0
- package/dist/client/assets/agent-e2e-DokyQFgS.js +1 -0
- package/dist/client/assets/agent-experiments-7O17P9sC.js +1 -0
- package/dist/client/assets/agent-file-B5Z-mSXW.js +1 -0
- package/dist/client/assets/agent-hosting-v3_GHpmO.js +1 -0
- package/dist/client/assets/agent-icon-KvVT3fA8.js +1 -0
- package/dist/client/assets/agent-library-B3W6CGJl.js +1 -0
- package/dist/client/assets/agent-library-file-CHgoG2j3.js +1 -0
- package/dist/client/assets/agent-monitor-C9pMT5KA.js +1 -0
- package/dist/client/assets/agent-overview-9FhsI0nk.js +1 -0
- package/dist/client/assets/agent-releases-CRh6y5DW.js +2 -0
- package/dist/client/assets/agent-settings-CfNarIdW.js +1 -0
- package/dist/client/assets/{agent-site-editor-Ccqk13sk.js → agent-site-editor-BALtgla6.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-D6BBbIl8.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DAMOp9X5.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-B0IbykqU.js +1 -0
- package/dist/client/assets/agent-view-B5q0EqmS.js +1 -0
- package/dist/client/assets/{agent-view-guard-BQQDslge.js → agent-view-guard-bPXLqLsK.js} +1 -1
- package/dist/client/assets/agents-list-DrT_0gVh.js +1 -0
- package/dist/client/assets/{ai-providers-DZoJeRvf.js → ai-providers-DorJXBZe.js} +2 -2
- package/dist/client/assets/{alert-SHlQi_f5.js → alert-DEw5BVAh.js} +1 -1
- package/dist/client/assets/analytics-sections-g9foqwY5.js +1 -0
- package/dist/client/assets/analytics-tab-D5KshkAH.js +2 -0
- package/dist/client/assets/api-keys-B-qwgNok.js +1 -0
- package/dist/client/assets/api-keys-CIPiPSYY.js +1 -0
- package/dist/client/assets/app-editor-ChUXEXt-.js +1 -0
- package/dist/client/assets/{asset-utils-B48ApnSg.js → asset-utils-DRJP317P.js} +1 -1
- package/dist/client/assets/{auth--QyNLTbP.js → auth-Dqt9menC.js} +1 -1
- package/dist/client/assets/{auth-catchall-9FBGni3X.js → auth-catchall-B5Em8iaq.js} +1 -1
- package/dist/client/assets/{auth-entry-Bb0XRefn.js → auth-entry-CNtzQsix.js} +1 -1
- package/dist/client/assets/{auth-split-layout-aJ5w9glJ.js → auth-split-layout-BoWG-no5.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D2Ooe96m.js → authenticate-and-persist-oauth-BziZaG_M.js} +1 -1
- package/dist/client/assets/automation-list-row-BRtPLrxX.js +1 -0
- package/dist/client/assets/automation-runs-C0-BhIZn.js +1 -0
- package/dist/client/assets/automations-CXOQ5gKM.js +1 -0
- package/dist/client/assets/{autosend-CUttN5XY.js → autosend-BRUzWk70.js} +1 -1
- package/dist/client/assets/{badge-DVaine1x.js → badge-Ckz5LqgP.js} +1 -1
- package/dist/client/assets/{block-document-Dsg6Fb4A.js → block-document-BPaZQC5L.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-DrgIe1RS.js → blocks-preview-workspace-context-C-uj3YG0.js} +1 -1
- package/dist/client/assets/blocks-tab-states-BcxrQPOR.js +1 -0
- package/dist/client/assets/blog-schema-Du7ILh7Q.js +1 -0
- package/dist/client/assets/buckets-CKZYh6Ij.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-DJhZN8lj.js +2 -0
- package/dist/client/assets/{calendar-CpwMOIuL.js → calendar-DkZz5VlH.js} +1 -1
- package/dist/client/assets/campaigns-view-Dc88Zs16.js +1 -0
- package/dist/client/assets/{capability-load-error-DvFhO1Pk.js → capability-load-error-CRB9otZt.js} +1 -1
- package/dist/client/assets/category-editor-CSPe0t_-.js +1 -0
- package/dist/client/assets/{cdn-tab-9Pvplnml.js → cdn-tab-KPAxnC3T.js} +1 -1
- package/dist/client/assets/{chart-DMJIFNic.js → chart-Bp6om7lj.js} +1 -1
- package/dist/client/assets/{chat-context-DwIrrO5r.js → chat-context-CIOqAIIy.js} +7 -7
- package/dist/client/assets/{chat-draft-stAhUvyw.js → chat-draft-OR83_S8w.js} +1 -1
- package/dist/client/assets/{checkbox-aTYJ3HOV.js → checkbox-BQ7Ebuar.js} +1 -1
- package/dist/client/assets/choose-editor-CspgtGFS.js +1 -0
- package/dist/client/assets/{cli-auth-success-CuJJaXpQ.js → cli-auth-success-CGyir_iF.js} +1 -1
- package/dist/client/assets/{client-icons-Du3qqcxN.js → client-icons-BOMFh2QS.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DbU_3ksB.js +1 -0
- package/dist/client/assets/{collapsible-Btd20NT7.js → collapsible-BB8_usPT.js} +1 -1
- package/dist/client/assets/collection-detail-H-UqYky8.js +1 -0
- package/dist/client/assets/collection-display-button-CulG1s8m.js +1 -0
- package/dist/client/assets/{collection-search-C3Qx3Y9p.js → collection-search-Cf4li4kg.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BzK9w_p-.js → collection-table-wrapper-DnZHa5Lt.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5iCdwPv.js → collection-tabs-x8ccQUAC.js} +1 -1
- package/dist/client/assets/{column-rules-UU8JLygo.js → column-rules-C_DWUbCh.js} +2 -2
- package/dist/client/assets/{combobox-PWtcP6b2.js → combobox-BZoZToki.js} +1 -1
- package/dist/client/assets/{command-Dqne3j1N.js → command-MmMDew8i.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-kvftD547.js → companion-mcps-section-By8_AO07.js} +1 -1
- package/dist/client/assets/{config-CJdQI2Ik.js → config-DBn3iCC3.js} +1 -1
- package/dist/client/assets/{connect-CaOmDTIh.js → connect-DbK_vN0J.js} +3 -3
- package/dist/client/assets/{connect-layout-Dx_3veD9.js → connect-layout-9tsE00M7.js} +1 -1
- package/dist/client/assets/connect-source-dialog-DqWilbbC.js +1 -0
- package/dist/client/assets/{connection-DJp1XqBL.js → connection-QGwhnKZn.js} +1 -1
- package/dist/client/assets/{connection-card-CwHoa3H_.js → connection-card-DEMVrMsW.js} +1 -1
- package/dist/client/assets/connection-detail-4PyaBO0_.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BThulWcJ.js → connection-form-helpers-DCRY9s0M.js} +1 -1
- package/dist/client/assets/connections-CpcdB3jc.js +1 -0
- package/dist/client/assets/content-tab-YME7HMCb.js +22 -0
- package/dist/client/assets/{context-menu-Bsyqk_Km.js → context-menu-Cpvztbef.js} +1 -1
- package/dist/client/assets/context-oSwYvz9P.js +1 -0
- package/dist/client/assets/{context-shell-DFZc3RTT.js → context-shell-BVBpRdKB.js} +5 -5
- package/dist/client/assets/{core.esm-BRS9Ks9b.js → core.esm-B2cbbV3O.js} +1 -1
- package/dist/client/assets/create-organization-dialog-NLldLLor.js +1 -0
- package/dist/client/assets/{daily-pulse-BqDvmnPn.js → daily-pulse-ClSeB_Ta.js} +1 -1
- package/dist/client/assets/discover-DmBynuR0.js +1 -0
- package/dist/client/assets/{domain-settings-jCTqOxdl.js → domain-settings-Cu3Pj63v.js} +1 -1
- package/dist/client/assets/{drawer-DePU4o02.js → drawer-GssD8cb3.js} +1 -1
- package/dist/client/assets/{editor-wUI_HNkS.js → editor-BTovmEAS.js} +1 -1
- package/dist/client/assets/{editor-classes-B3UoGQQP.js → editor-classes-CcPgajKG.js} +1 -1
- package/dist/client/assets/{empty-state-cJTBr2cU.js → empty-state-D86P1Giw.js} +1 -1
- package/dist/client/assets/{empty-state-W9_vBymb.js → empty-state-DLNzdrwg.js} +1 -1
- package/dist/client/assets/experiments-tab-CjpJzYQ9.js +1 -0
- package/dist/client/assets/experiments-tab-choice-pVOiMOWe.js +1 -0
- package/dist/client/assets/{extract-connection-data-DFv9Bgl-.js → extract-connection-data-DwkOg2rJ.js} +1 -1
- package/dist/client/assets/{feature-gate-B4srxCCI.js → feature-gate-BIwsQPiQ.js} +1 -1
- package/dist/client/assets/{feature-paywall-CnDJ3rvy.js → feature-paywall-DpVlsq5a.js} +1 -1
- package/dist/client/assets/file-explorer-B9Wz0lPl.js +2 -0
- package/dist/client/assets/{file-preview-bA4ayYHL.js → file-preview-CX5xfaHR.js} +1 -1
- package/dist/client/assets/{file-share-button-BLIlQQod.js → file-share-button-Cx66riM5.js} +2 -2
- package/dist/client/assets/{file-type-icon-DTTBg-Cp.js → file-type-icon-tAeiI9_2.js} +1 -1
- package/dist/client/assets/{folder-icon-I00h66JN.js → folder-icon-C25vLo5g.js} +2 -2
- package/dist/client/assets/{form-KgHP-Hpi.js → form-CKF06Eu0.js} +1 -1
- package/dist/client/assets/general-CA7uhFzP.js +1 -0
- package/dist/client/assets/held-block-view-CU5t1B8c.js +20 -0
- package/dist/client/assets/home-BuPVKVzx.js +1 -0
- package/dist/client/assets/{icon-button-uPrtYnSE.js → icon-button-5JlhYc9R.js} +1 -1
- package/dist/client/assets/{index-Cbee4-AB.js → index-AY0yzUAx.js} +3 -3
- package/dist/client/assets/{index-XCP5r1I_.js → index-B0Hb2bUK.js} +1 -1
- package/dist/client/assets/{index-BfC50J0F.js → index-B8bCJ3Gm.js} +1 -1
- package/dist/client/assets/{index-BX1aT4SZ.js → index-BLRFIWph.js} +6 -6
- package/dist/client/assets/index-BerfNxBu.js +1 -0
- package/dist/client/assets/{index-D4ru75Fc.js → index-Bz0XRw1e.js} +1 -1
- package/dist/client/assets/index-C4tYnNih.js +253 -0
- package/dist/client/assets/{index-CDrRsU-I.js → index-CDfG-oXn.js} +1 -1
- package/dist/client/assets/{index-CvNALbEH.js → index-CJ8-jtJ3.js} +2 -2
- package/dist/client/assets/{index-DKUcI8bc.js → index-CMXP-HlZ.js} +1 -1
- package/dist/client/assets/index-CieIETkx.js +4 -0
- package/dist/client/assets/{index-DL_9Zurb.js → index-D8kI0oe2.js} +1 -1
- package/dist/client/assets/{index-WWkbzoL4.js → index-DG_Aoo8H.js} +1 -1
- package/dist/client/assets/{index-DqOQgVM6.js → index-DMcUJv3F.js} +1 -1
- package/dist/client/assets/{index-DdXWXy9i.js → index-DQ4MCRAi.js} +9 -9
- package/dist/client/assets/{index-redirect-BQkqIeGD.js → index-redirect-DSkhUiz1.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-6MK6GS3o.js → infiniteQueryObserver-CyNcT3qz.js} +1 -1
- package/dist/client/assets/{infra-billing-3yuTy4Pj.js → infra-billing-OmwhvZsy.js} +1 -1
- package/dist/client/assets/{input-BY2tBiEb.js → input-C0IBlV9i.js} +7 -7
- package/dist/client/assets/{input-BUcDagSA.js → input-Drj3v1Rm.js} +1 -1
- package/dist/client/assets/{integration-icon-BwzO3Wq9.js → integration-icon-wG7mou98.js} +1 -1
- package/dist/client/assets/{jira-icon-g2GVH5bw.js → jira-icon-Ct9neMH3.js} +1 -1
- package/dist/client/assets/{label-CG_DMVpg.js → label-Kngegn1Y.js} +1 -1
- package/dist/client/assets/{layout-CsbDSI6l.js → layout-D1PXm8wr.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-CqqR00U7.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-CS4Abpwd.js → legacy-main-redirect-j5rWQTR7.js} +1 -1
- package/dist/client/assets/library-BB_eexuL.js +1 -0
- package/dist/client/assets/{login-DW5wI5H0.js → login-dCZC1OIS.js} +1 -1
- package/dist/client/assets/{markdown-D5ryQAkZ.js → markdown-C-J5-sTt.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BYcHi_da.js → mcp-app-renderer-vHEVQIZL.js} +2 -2
- package/dist/client/assets/{mcp-oauth-Bn5p4oSU.js → mcp-oauth-5QMuPFQa.js} +1 -1
- package/dist/client/assets/{mcp-oauth-4UvGlLYO.js → mcp-oauth-CnB7EPe0.js} +1 -1
- package/dist/client/assets/members-D62Ns7xb.js +1 -0
- package/dist/client/assets/{memory-FU3t5-1z.js → memory-BRnI6IWM.js} +2 -2
- package/dist/client/assets/{mini-report-page-BBST8cjq.js → mini-report-page-RV5HcY13.js} +1 -1
- package/dist/client/assets/{mock-board-igDH_YVZ.js → mock-board-C5ljPU5m.js} +5 -5
- package/dist/client/assets/{monaco-editor-eDEJF7LD.js → monaco-editor-CG1RPml4.js} +2 -2
- package/dist/client/assets/monitoring-kGWQYp7Z.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-D5LuoYp3.js → monitoring-stats-row-BpfaRq5_.js} +1 -1
- package/dist/client/assets/{multi-select-DYiX5KEM.js → multi-select-D79TIC6v.js} +1 -1
- package/dist/client/assets/mustache-BdHuXtQC.js +4 -0
- package/dist/client/assets/{named-rule-uses-BrQiTKM3.js → named-rule-uses-DDsPTKwP.js} +1 -1
- package/dist/client/assets/named-rule-view-CelDjugE.js +1 -0
- package/dist/client/assets/{new-project-dialog-B9qWs4Pr.js → new-project-dialog-DQPlctqf.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dtw5ILTB.js → oauth-callback-ah6cR8xQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BSRRr6Yq.js → oauth-callback-ai-provider-C5jhPG9E.js} +1 -1
- package/dist/client/assets/onboarding-BPgxXbEy.js +1 -0
- package/dist/client/assets/openai-conversation-COLqoqqY.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-CU6JI5UK.js → optimistic-project-sidebar-views-BXm7Dv06.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D7HisKzI.js → order-monitor-day-DzTTlxAw.js} +1 -1
- package/dist/client/assets/organization-choice-CMYQUq77.js +1 -0
- package/dist/client/assets/orgs-Cb-j6SHO.js +1 -0
- package/dist/client/assets/page-seo-form-CCa1Xirx.js +1 -0
- package/dist/client/assets/{pair-9h1O_BO7.js → pair-CRFLUGB-.js} +8 -8
- package/dist/client/assets/parse-sections-CBOr5TcU.js +1 -0
- package/dist/client/assets/plan-CZiCKWsL.js +1 -0
- package/dist/client/assets/{plan-ladder-Dz8bCoAd.js → plan-ladder-Clu_D1dM.js} +1 -1
- package/dist/client/assets/{popover-Cdz7pgAQ.js → popover-7hw0_Cgu.js} +1 -1
- package/dist/client/assets/post-calendar-oSfCtk_Z.js +1 -0
- package/dist/client/assets/post-editor-DqdLoENq.js +2 -0
- package/dist/client/assets/{preview-content-BNxnqe7O.js → preview-content-tpqwn9DV.js} +1 -1
- package/dist/client/assets/{preview-dialog-tDLXXdPQ.js → preview-dialog-DDUA3zbn.js} +1 -1
- package/dist/client/assets/{preview-panel-D04CDEWQ.js → preview-panel-B7KDfk34.js} +1 -1
- package/dist/client/assets/preview-tab-CwHbL-uL.js +551 -0
- package/dist/client/assets/{product-picker-dialog-B9YEPxMK.js → product-picker-dialog-q_j-OMur.js} +1 -1
- package/dist/client/assets/profile--UpTdMEW.js +1 -0
- package/dist/client/assets/project-app-view-BDtUwetx.js +1 -0
- package/dist/client/assets/{project-apps-nQXtEtz0.js → project-apps-M24hPHW2.js} +1 -1
- package/dist/client/assets/project-feed-Dm5w30sM.js +1 -0
- package/dist/client/assets/{project-icon-BqAOVSaG.js → project-icon-BlULUcrw.js} +1 -1
- package/dist/client/assets/project-reports-BXESPzCU.js +1 -0
- package/dist/client/assets/project-tasks-CRajXa6Z.js +1 -0
- package/dist/client/assets/projects-C9fr3jni.js +1 -0
- package/dist/client/assets/{projects-empty-state-dd0PXzD2.js → projects-empty-state-DRas-7X9.js} +1 -1
- package/dist/client/assets/{prompts-C-zf2EeW.js → prompts-CiGgpCOz.js} +1 -1
- package/dist/client/assets/record-editor-Dw_A1nYV.js +1 -0
- package/dist/client/assets/redirect-editor-DbPiIIKk.js +1 -0
- package/dist/client/assets/releases-api-DA_Oz9WG.js +1 -0
- package/dist/client/assets/{reports-Dvk3psp8.js → reports-Czva0tSD.js} +1 -1
- package/dist/client/assets/reports-I3thcjRj.js +1 -0
- package/dist/client/assets/reports-onboarding-BsOWdPaY.js +1 -0
- package/dist/client/assets/reports-tab-C2STfD1k.js +2 -0
- package/dist/client/assets/repositories-B5BeE82u.js +1 -0
- package/dist/client/assets/repositories-Dp2o7kK8.js +1 -0
- package/dist/client/assets/repository-binding-C7GXruB1.js +1 -0
- package/dist/client/assets/{repository-import-picker-B0yxPI2j.js → repository-import-picker-BIFRKH2H.js} +1 -1
- package/dist/client/assets/repository-picker-D6fEwnOk.js +1 -0
- package/dist/client/assets/{require-capability-BFyuzPqV.js → require-capability-DSeRbn1u.js} +1 -1
- package/dist/client/assets/{required-auth-layout--9OrAOrr.js → required-auth-layout-D4yn4VOg.js} +1 -1
- package/dist/client/assets/{reset-password-C3K9ZZ2t.js → reset-password-CLlk4Qyg.js} +1 -1
- package/dist/client/assets/{resizable-BqY6-uYR.js → resizable-B3zVq59U.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-H3Wty7u7.js → resolve-tab-icon-NGCKQk4u.js} +1 -1
- package/dist/client/assets/review-settings-ChOJMpqj.js +1 -0
- package/dist/client/assets/roles-034YEIy0.js +1 -0
- package/dist/client/assets/route-B9sbaFmI.js +1 -0
- package/dist/client/assets/route-D3_kGiYP.js +1 -0
- package/dist/client/assets/route-DixoE7S2.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CXn37zMt.js → sandbox-lifecycle-context-DS1zxfZb.js} +1 -1
- package/dist/client/assets/{schema-D2gJoNK3.js → schema-DIZqRcY2.js} +1 -1
- package/dist/client/assets/{schema-D5kxh02n.js → schema-DXQBt-Da.js} +1 -1
- package/dist/client/assets/{scroll-area-DvfamsPF.js → scroll-area-BYOXOcFm.js} +1 -1
- package/dist/client/assets/search-input-CM9T7koR.js +1 -0
- package/dist/client/assets/{search-toggle-CdGIHwQK.js → search-toggle-BA_oiAdj.js} +1 -1
- package/dist/client/assets/secret-picker-D2Cr-oRZ.js +1 -0
- package/dist/client/assets/secrets-BRbaixQo.js +1 -0
- package/dist/client/assets/section-array-field-TQFJqwVV.js +1 -0
- package/dist/client/assets/{sections-p-TiUqOZ.js → sections-05hBo9NL.js} +1 -1
- package/dist/client/assets/sections-editor-BR_A8Bqr.js +1 -0
- package/dist/client/assets/{select-DAagAjcm.js → select-BZ2tKCpr.js} +1 -1
- package/dist/client/assets/{select-model-DMBmIlHh.js → select-model-DskJe0jJ.js} +1 -1
- package/dist/client/assets/seo-editor-DWsRiK1b.js +1 -0
- package/dist/client/assets/{separator-Caw0JVLD.js → separator-DdBbm1xl.js} +1 -1
- package/dist/client/assets/settings-tab-5QV5D7iT.js +1 -0
- package/dist/client/assets/{sheet-BHsKOUfF.js → sheet-DYw2VD7L.js} +1 -1
- package/dist/client/assets/shell-layout-DQPoLlFW.js +1 -0
- package/dist/client/assets/site-draft-actions-dD4jyBUz.js +12 -0
- package/dist/client/assets/site-draft-view-Ds5aQAqU.js +2 -0
- package/dist/client/assets/site-editor-D8vmphjE.js +1 -0
- package/dist/client/assets/site-editor-toast-gO0geSY6.js +1 -0
- package/dist/client/assets/skills-BG0VOLIN.js +1 -0
- package/dist/client/assets/{slider-D9yxsjlo.js → slider-ApiojjsY.js} +1 -1
- package/dist/client/assets/{sortable.esm-B7h1ef6s.js → sortable.esm-DPfgkRcd.js} +1 -1
- package/dist/client/assets/sso-CfSDpa9Z.js +1 -0
- package/dist/client/assets/{suggestion-CMN-fEG6.js → suggestion-DTo0Z5su.js} +2 -2
- package/dist/client/assets/{switch-DpD3lo_J.js → switch-B3v6apDN.js} +1 -1
- package/dist/client/assets/{symbol-Hd-wRYbC.js → symbol-pDh9bf5z.js} +1 -1
- package/dist/client/assets/synced-repos-oiGV5Ihu.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-XxQjDugr.js → tab-icon-glyph-BzFDI553.js} +1 -1
- package/dist/client/assets/{table-Cc4crfQ0.js → table-CANIhtsr.js} +1 -1
- package/dist/client/assets/{tabs-BpLvUwhr.js → tabs-B5O9VNwn.js} +1 -1
- package/dist/client/assets/task-assignee-avatar-BOAf_3H_.js +1 -0
- package/dist/client/assets/{task-board-M_bY8eys.js → task-board-CBBaN9ua.js} +1 -1
- package/dist/client/assets/{task-route-Cz8IMljw.js → task-route-1lojPQeZ.js} +1 -1
- package/dist/client/assets/{task-status-D4WkmdQN.js → task-status-DM1NBqlc.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DK79qp1-.js +1 -0
- package/dist/client/assets/tasks--LaoDxg8.js +1 -0
- package/dist/client/assets/tasks-Czi5B_ZB.js +4 -0
- package/dist/client/assets/{textarea--yDYOLyf.js → textarea-CAZh8Kr5.js} +1 -1
- package/dist/client/assets/thread-analytics-K9PkKnHr.js +1 -0
- package/dist/client/assets/{thread-intent-DSZI851P.js → thread-intent-B9ceQWmI.js} +6 -6
- package/dist/client/assets/{thread-route-BLXCdzrT.js → thread-route-_-Jo9yAq.js} +1 -1
- package/dist/client/assets/thread-route-gmMlW4oz.js +1 -0
- package/dist/client/assets/thread-sheet-body-ClyiLZhS.js +1 -0
- package/dist/client/assets/{time-range-picker-C3BbzoOH.js → time-range-picker-m7OMfbU0.js} +1 -1
- package/dist/client/assets/toggle-group-8XrNtMoS.js +1 -0
- package/dist/client/assets/{tool-namespace-CzQWuXDV.js → tool-namespace-cn6zTT0m.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-7gQeG_XH.js → toolbar-icon-button-fBm5AosV.js} +1 -1
- package/dist/client/assets/{tooltip-rhtdmPcj.js → tooltip-B1eS9Khq.js} +1 -1
- package/dist/client/assets/{tooltipContext-Db2Lu1qi.js → tooltipContext-DMiC5t9-.js} +1 -1
- package/dist/client/assets/track-BcscPlt3.js +1 -0
- package/dist/client/assets/{types-s41XNAq6.js → types-C_LaIhQe.js} +9 -9
- package/dist/client/assets/{url-slug-DQ6KErQd.js → url-slug-BEmF9qH1.js} +1 -1
- package/dist/client/assets/{usage-stats-DBiTgJdn.js → usage-stats-DtO_zGwF.js} +7 -7
- package/dist/client/assets/{use-ai-providers-DeyDa8Td.js → use-ai-providers-C315xBlf.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-9ihG8ELj.js +1 -0
- package/dist/client/assets/{use-automations-CAga8LHD.js → use-automations-BpSvam4M.js} +1 -1
- package/dist/client/assets/use-autosave-CRCl3eTr.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-P4eOAh0Q.js → use-chat-layout-state-ByIICjWr.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DKd3Khi0.js → use-clock-tick-QAJndZ00.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CXaOPPYN.js → use-connect-companion-rEYy0Kcd.js} +1 -1
- package/dist/client/assets/use-connection-CBlLT-Gl.js +1 -0
- package/dist/client/assets/{use-content-sync-D83lTU1r.js → use-content-sync-TKItZ8SP.js} +1 -1
- package/dist/client/assets/{use-copy-D2ar5QXj.js → use-copy-C9NYM8DB.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5_jirS7.js → use-create-virtual-mcp-DFsMYI92.js} +1 -1
- package/dist/client/assets/use-date-fns-locale-bL-I5mOj.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-QgHKWEfB.js → use-debounced-autosave-DfJudaYl.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CNkh6EY5.js → use-debounced-value-DOPKXMfX.js} +1 -1
- package/dist/client/assets/use-deco-credits-DL_DG4I5.js +1 -0
- package/dist/client/assets/{use-decopilot-events-DGj-wEwB.js → use-decopilot-events-4yDcDH2I.js} +1 -1
- package/dist/client/assets/use-delete-connection-3ef0jZgj.js +1 -0
- package/dist/client/assets/{use-deployment-admin-CR9n1OEp.js → use-deployment-admin-C2GaZpz9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DKL4b1dE.js → use-fast-preview-draft-url-CN-8cYCq.js} +1 -1
- package/dist/client/assets/{use-file-configs-D3Cv6-L2.js → use-file-configs-Dfr8whNN.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CVakZcHF.js → use-inbox-feed-UXhkZ9eS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DcjLDU4h.js → use-infinite-scroll-WEv8wBk9.js} +1 -1
- package/dist/client/assets/use-join-requests-Bf1nx4BW.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-CnvhH3AB.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DX7pkWco.js → use-mcp-auth-status-Dxn8Kcei.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BYbk6jXo.js → use-mcp-client-BkBWhGyj.js} +10 -10
- package/dist/client/assets/{use-mcp-prompts-B78UkAZ_.js → use-mcp-prompts-DWjSk3XQ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-COs5QQOc.js → use-mcp-tools-Cq-ES3mk.js} +1 -1
- package/dist/client/assets/{use-mobile-19frZVl2.js → use-mobile-BADuLdb7.js} +1 -1
- package/dist/client/assets/use-move-blocks-Ds_0OJ4H.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Bh4JZJoL.js → use-navigate-to-agent-B3bMlZK-.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CUDKmO6U.js → use-open-billing-url-Dfpg8Tio.js} +1 -1
- package/dist/client/assets/{use-org-fs-BFFpcHJy.js → use-org-fs-Dt6mQNyr.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C29Ouwht.js → use-org-repo-syncs-D2j2_BKY.js} +1 -1
- package/dist/client/assets/{use-org-sso-BlWFmoCA.js → use-org-sso-CWvWEDQk.js} +1 -1
- package/dist/client/assets/use-organization-roles-DsjUZx1i.js +1 -0
- package/dist/client/assets/{use-organization-settings-XPH6XBPi.js → use-organization-settings-DBQ6GIch.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BKTq-N_H.js → use-panel-navigate-DZO4-0o6.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-aJpFnShz.js → use-project-native-view-presence-Y3Sopx8q.js} +1 -1
- package/dist/client/assets/{use-project-scope-hi480z1p.js → use-project-scope-CKNjz3VB.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DII4SRHf.js → use-recent-apps-TrfPEwKE.js} +1 -1
- package/dist/client/assets/{use-releases-GaRydy_l.js → use-releases-DSFeRsP3.js} +1 -1
- package/dist/client/assets/use-reports-diagnostic-YBAEN0Wc.js +1 -0
- package/dist/client/assets/{use-sandbox-events-CsNrKmda.js → use-sandbox-events-C6ionJ0p.js} +2 -2
- package/dist/client/assets/{use-secrets-DJcOfixK.js → use-secrets-xwuuJgHg.js} +1 -1
- package/dist/client/assets/use-section-preview-base-BdMX2uY9.js +1 -0
- package/dist/client/assets/use-session-runtime-CtTWKH1c.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-8USbBI0-.js → use-sidebar-collapsed-DXyrU3VA.js} +1 -1
- package/dist/client/assets/{use-tags-DvW8yrHX.js → use-tags-CwZHa3pE.js} +1 -1
- package/dist/client/assets/use-task-board-analytics-BzPvlYE9.js +1 -0
- package/dist/client/assets/{use-task-board-events-De3JY1Pe.js → use-task-board-events-qI_skUMm.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CXzTAmMM.js → use-task-board-item-prs-CiXpN6jW.js} +1 -1
- package/dist/client/assets/{use-task-metadata-9cyD8qGI.js → use-task-metadata-E8aNM85o.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DltmG-kv.js → use-thread-analytics-DKupwFaR.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BKCBvLqB.js → use-thread-outputs-Di1RSISN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CtWUiDbh.js +1 -0
- package/dist/client/assets/useQueries-BOzKsoXi.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Diw12fEI.js +1 -0
- package/dist/client/assets/users-Cup6bGNw.js +1 -0
- package/dist/client/assets/{utils-BnP8cv1B.js → utils-wTX1Gyo-.js} +1 -1
- package/dist/client/assets/variant-calendar-Doi5lHFb.js +1 -0
- package/dist/client/assets/variant-matcher-override-LGFgaSJn.js +1 -0
- package/dist/client/assets/{virtual-mcp-B8cZ7VfA.js → virtual-mcp-DO56RLOP.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DYaS1vyu.js → watch-sse-pool-BBTCM7MS.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +713 -713
- package/package.json +2 -2
- package/dist/client/assets/User01-BqHvPhUP.js +0 -1
- package/dist/client/assets/access-gate-DyUtzmE9.js +0 -1
- package/dist/client/assets/agent-analytics-vIfEsYvC.js +0 -1
- package/dist/client/assets/agent-app-BrsqSpps.js +0 -1
- package/dist/client/assets/agent-assets-Cmwamjo6.js +0 -1
- package/dist/client/assets/agent-automation-DTP-nUve.js +0 -20
- package/dist/client/assets/agent-automations-DMzq_O24.js +0 -1
- package/dist/client/assets/agent-calendar-XJ6NXM0R.js +0 -1
- package/dist/client/assets/agent-connect-sources-BcRlDvxt.js +0 -1
- package/dist/client/assets/agent-deck-DDf8uIAO.js +0 -1
- package/dist/client/assets/agent-e2e-C9yo2VIy.js +0 -1
- package/dist/client/assets/agent-experiments-CBXMu_zo.js +0 -1
- package/dist/client/assets/agent-file-NVbz9x8-.js +0 -1
- package/dist/client/assets/agent-hosting--zgA3Vth.js +0 -1
- package/dist/client/assets/agent-icon-B_vqhfDt.js +0 -1
- package/dist/client/assets/agent-library-DnuSkP9c.js +0 -1
- package/dist/client/assets/agent-library-file-BvLizRc3.js +0 -1
- package/dist/client/assets/agent-monitor-rNkT_MKe.js +0 -1
- package/dist/client/assets/agent-overview-5SBfPz9h.js +0 -1
- package/dist/client/assets/agent-releases-Ln3sIMtS.js +0 -2
- package/dist/client/assets/agent-settings-D6bOK1ga.js +0 -1
- package/dist/client/assets/agent-site-editor-code-0Vxgov65.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CoS3vIfM.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-7txrWBOo.js +0 -1
- package/dist/client/assets/agent-view-C8DZj3zZ.js +0 -1
- package/dist/client/assets/agents-list-CUtOSk6b.js +0 -1
- package/dist/client/assets/alert-dialog-Bjihy8X7.js +0 -7
- package/dist/client/assets/analytics-sections-B_qn34eY.js +0 -1
- package/dist/client/assets/analytics-tab-DluP6EHx.js +0 -2
- package/dist/client/assets/api-keys-B5pbeuIW.js +0 -1
- package/dist/client/assets/api-keys-DRbQ6j-D.js +0 -1
- package/dist/client/assets/app-editor-l5QnxgXk.js +0 -1
- package/dist/client/assets/automation-list-row-DfibF1_j.js +0 -1
- package/dist/client/assets/automation-runs-CzCUPkiw.js +0 -1
- package/dist/client/assets/automations-CEr5Md2h.js +0 -1
- package/dist/client/assets/avatar-C5-kxiV_.js +0 -1
- package/dist/client/assets/blocks-tab-states-DSvvcfKU.js +0 -1
- package/dist/client/assets/blog-schema-7PNm5SA8.js +0 -1
- package/dist/client/assets/buckets-B99EVfxO.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Dx-5MdwQ.js +0 -2
- package/dist/client/assets/campaigns-view-_4Aj2Qex.js +0 -1
- package/dist/client/assets/category-editor-Bz5Ohuf6.js +0 -1
- package/dist/client/assets/choose-editor-BpBHfKld.js +0 -1
- package/dist/client/assets/cms-settings-editor-DgOpqRn9.js +0 -1
- package/dist/client/assets/collection-detail-B4JsebMy.js +0 -1
- package/dist/client/assets/collection-display-button-BFEeUD4b.js +0 -1
- package/dist/client/assets/connect-source-dialog-BucnBQV1.js +0 -1
- package/dist/client/assets/connection-detail-BUrc4tQa.js +0 -1
- package/dist/client/assets/connections-UgNbDD55.js +0 -1
- package/dist/client/assets/content-tab-BzJzqdaq.js +0 -22
- package/dist/client/assets/context-BQ17H5cY.js +0 -1
- package/dist/client/assets/create-organization-dialog-4e3oT20D.js +0 -1
- package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
- package/dist/client/assets/discover-Du9d6I7b.js +0 -1
- package/dist/client/assets/experiments-tab-BGSl9C7j.js +0 -1
- package/dist/client/assets/experiments-tab-choice-C5L5-OKs.js +0 -1
- package/dist/client/assets/file-explorer-CSFyTcCU.js +0 -2
- package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
- package/dist/client/assets/general-DDniHgaA.js +0 -1
- package/dist/client/assets/home-BRa0QePQ.js +0 -1
- package/dist/client/assets/index-BSPqDg2b.js +0 -243
- package/dist/client/assets/index-BV9YjMM8.js +0 -4
- package/dist/client/assets/index-CoCFpkNq.js +0 -1
- package/dist/client/assets/legacy-agents-deep-D4dQPRbz.js +0 -1
- package/dist/client/assets/library-CvZRvu0t.js +0 -1
- package/dist/client/assets/members-DV5nm69j.js +0 -1
- package/dist/client/assets/monitoring-L8Ph-qIO.js +0 -1
- package/dist/client/assets/mustache-DcAMNVPe.js +0 -4
- package/dist/client/assets/named-rule-view-DPJVdujZ.js +0 -1
- package/dist/client/assets/onboarding-CJ1-Q27q.js +0 -1
- package/dist/client/assets/openai-conversation-rJmL2Chq.js +0 -3
- package/dist/client/assets/organization-choice-B3HKKRFg.js +0 -1
- package/dist/client/assets/orgs-BGahARMX.js +0 -1
- package/dist/client/assets/page-seo-form-BiLzLwOU.js +0 -1
- package/dist/client/assets/parse-sections-DS7cH63b.js +0 -1
- package/dist/client/assets/plan-TS8UDjIx.js +0 -1
- package/dist/client/assets/post-calendar-BVj47Msq.js +0 -1
- package/dist/client/assets/post-editor-C7Epq6Gf.js +0 -2
- package/dist/client/assets/preview-tab-CstRd2P8.js +0 -551
- package/dist/client/assets/profile-HCYVLr3x.js +0 -1
- package/dist/client/assets/project-app-view-CsgTKaq6.js +0 -1
- package/dist/client/assets/project-feed-CSKm059T.js +0 -1
- package/dist/client/assets/project-reports-N6Np5HVd.js +0 -1
- package/dist/client/assets/project-tasks-hQ8mdw3x.js +0 -1
- package/dist/client/assets/projects-BR95BuCh.js +0 -1
- package/dist/client/assets/record-editor-gFz45d56.js +0 -1
- package/dist/client/assets/redirect-editor-DPpKBLYS.js +0 -1
- package/dist/client/assets/releases-api-CSVCy8ox.js +0 -1
- package/dist/client/assets/reports-BVHdd1DX.js +0 -1
- package/dist/client/assets/reports-onboarding-UQrdSX_1.js +0 -1
- package/dist/client/assets/reports-tab-ppUXZsCY.js +0 -2
- package/dist/client/assets/repositories-5RxDBg9o.js +0 -1
- package/dist/client/assets/repositories-DZ7Jj2ky.js +0 -1
- package/dist/client/assets/repository-binding-BPraGDH6.js +0 -1
- package/dist/client/assets/repository-picker-C8ArkEMp.js +0 -1
- package/dist/client/assets/review-settings-CdVHPED2.js +0 -1
- package/dist/client/assets/roles-OamyC7La.js +0 -1
- package/dist/client/assets/route-C9Fxdgiw.js +0 -1
- package/dist/client/assets/route-CwPF8ORe.js +0 -1
- package/dist/client/assets/route-u0GAyBX0.js +0 -1
- package/dist/client/assets/runnable-block-editor-Bp72FsGX.js +0 -20
- package/dist/client/assets/search-input-5CsF8kzc.js +0 -1
- package/dist/client/assets/secret-ciphertext-DjJJ47rv.js +0 -1
- package/dist/client/assets/secret-picker-BO4uK8to.js +0 -1
- package/dist/client/assets/secrets-D1oNMOlx.js +0 -1
- package/dist/client/assets/sections-editor-DR2QTs_8.js +0 -4
- package/dist/client/assets/seo-editor-_CrgKo3u.js +0 -1
- package/dist/client/assets/settings-tab-CXub7dpW.js +0 -1
- package/dist/client/assets/shell-layout-CnFOD7IR.js +0 -1
- package/dist/client/assets/site-draft-actions-DahX0dKS.js +0 -12
- package/dist/client/assets/site-draft-view-D6OUnR3H.js +0 -2
- package/dist/client/assets/site-editor-FcBrQD_V.js +0 -1
- package/dist/client/assets/site-editor-toast-CrL8-myE.js +0 -1
- package/dist/client/assets/skills-dBhtb1Gn.js +0 -1
- package/dist/client/assets/sso-K3rjig-T.js +0 -1
- package/dist/client/assets/synced-repos-Dnzg3gpT.js +0 -1
- package/dist/client/assets/task-assignee-avatar-ZgHLf6ou.js +0 -1
- package/dist/client/assets/taskboard-analytics-BkUf4gRJ.js +0 -1
- package/dist/client/assets/tasks-CAS-CTER.js +0 -4
- package/dist/client/assets/tasks-qaZFyecx.js +0 -1
- package/dist/client/assets/thread-analytics-DUGo9IpI.js +0 -1
- package/dist/client/assets/thread-route-GuSmOAXN.js +0 -1
- package/dist/client/assets/thread-sheet-body-BFLCqyyQ.js +0 -1
- package/dist/client/assets/toggle-group-6nw88m-B.js +0 -1
- package/dist/client/assets/track-CZFERlEy.js +0 -1
- package/dist/client/assets/use-apply-named-rule-CTNrtoG8.js +0 -1
- package/dist/client/assets/use-autosave-BhBt5LM5.js +0 -1
- package/dist/client/assets/use-connection-CjozY_rG.js +0 -1
- package/dist/client/assets/use-date-fns-locale-QW50a7Gw.js +0 -1
- package/dist/client/assets/use-deco-credits-B57v3A_1.js +0 -1
- package/dist/client/assets/use-delete-connection-C8eU1V0w.js +0 -1
- package/dist/client/assets/use-join-requests-Cbj3PHUb.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CO8s8ZiU.js +0 -1
- package/dist/client/assets/use-members-Dyl3oSqD.js +0 -1
- package/dist/client/assets/use-move-blocks-DJK_Y1io.js +0 -1
- package/dist/client/assets/use-org-auth-client-Dw_o5R0I.js +0 -1
- package/dist/client/assets/use-organization-roles-DaU1N-it.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-BCaZjPYS.js +0 -1
- package/dist/client/assets/use-section-preview-base-BqthfvXx.js +0 -1
- package/dist/client/assets/use-session-runtime-GSil35TM.js +0 -1
- package/dist/client/assets/use-task-board-analytics-CzI79mN4.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BMw5-0ES.js +0 -1
- package/dist/client/assets/useQueries-MmC9BfTO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BzZNrnpe.js +0 -1
- package/dist/client/assets/users-DwCtEgjJ.js +0 -1
- package/dist/client/assets/variant-calendar-2sbluJx7.js +0 -1
- package/dist/client/assets/variant-matcher-override-BuVYz4je.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P,o as Y,m as U,K as m,dX as Ze,aG as At,aH as $t,r as M,a as Lt,aw as ue,a2 as Mt,au as Ut,dG as Ft,dY as Ee,t as ee,j as H}from"./index-BSPqDg2b.js";import{u as et}from"./use-session-runtime-GSil35TM.js";import{M as jt,j as Bt,i as de,s as Le}from"./thread-intent-DSZI851P.js";import{u as ke,b as Qt}from"./experiments-tab-choice-C5L5-OKs.js";import{b as re}from"./sandbox-url-D3mC8qhT.js";import{s as Vt}from"./utils-BnP8cv1B.js";import{a as Ht}from"./repository-binding-BPraGDH6.js";import{u as Gt}from"./chat-context-DwIrrO5r.js";import{i as Jt,u as Wt}from"./use-sandbox-events-CsNrKmda.js";import{a as Yt}from"./sandbox-git-api-CH_-QFpD.js";import{e as Kt}from"./backoff-CrEUbyZT.js";const p={MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,NotFound:-32001,Conflict:-32002,InvalidBlock:-32003,ReadOnly:-32005,Unsupported:-32006,LimitExceeded:-32007,Unavailable:-32008,Unauthorized:-32010};class T extends Error{code;data;constructor(t,n,o){super(n),this.name="ContentProtocolError",this.code=t,this.data=o}toJSON(){return this.data===void 0?{code:this.code,message:this.message}:{code:this.code,message:this.message,data:this.data}}static from(t){return new T(t.code,t.message,t.data)}}const q="deco-content",fe={major:1},tt=1;async function qt(e){let t=new Uint8Array(await e.arrayBuffer());if(t[0]===31&&t[1]===139){const n=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));t=new Uint8Array(await new Response(n).arrayBuffer())}return JSON.parse(new TextDecoder().decode(t))}const he={major:fe.major,minor:tt},nt=`the endpoint speaks an older ${q} than this client needs (${he.major}.${he.minor} or newer): update @decocms/blocks in the site (8.2.0 or newer) and start deco serve again`;function X(e,t,n){const o={reason:t,required:{...he}};if(n){o.actual={protocol:n.protocol,major:n.version?.major,minor:n.version?.minor};const r=n.server;typeof r?.name=="string"&&typeof r.version=="string"&&(o.server={name:r.name,version:r.version})}return new T(p.Unsupported,e,o)}function ot(e){const t=e??{},{protocol:n,version:o}=t;if(n!==q)throw X(`the endpoint speaks ${JSON.stringify(n)}, not ${q}`,"protocol",t);if(o?.major!==fe.major)throw X(`the endpoint speaks ${q} ${String(o?.major)}.x; this client speaks ${fe.major}.x`,"major",t);if(typeof o.minor!="number"||o.minor<tt)throw X(nt,"outdated",t);return e}function Me(e,t){return t.code===p.MethodNotFound&&e.startsWith("changes.")?X(nt,"outdated"):T.from(t)}function Ce(e){const t=e.fetch??(s=>fetch(s));let n=1;async function o(s){const i={"content-type":"application/json",accept:"application/json",...e.headers},a=await t(new Request(e.endpoint,{method:"POST",headers:i,body:JSON.stringify(s)}));let c;try{c=await qt(a)}catch{throw new T(p.Unavailable,`the endpoint answered HTTP ${a.status} without a JSON-RPC body`)}if(!a.ok||!Array.isArray(c)&&c?.id===null){const l=c?.error;throw l?T.from(l):new T(p.Unavailable,`the endpoint answered HTTP ${a.status}`)}return c}const r=async(s,i)=>{const a=n++,c=await o({jsonrpc:"2.0",id:a,method:s,params:i??{}});if(c.error)throw Me(s,c.error);return c.result};return{call:r,describe:async()=>ot(await r("describe")),schemaGet:s=>r("schema.get",s),blocksList:s=>r("blocks.list",s),blocksApply:s=>r("blocks.apply",s),changesList:s=>r("changes.list",s),changesGet:s=>r("changes.get",s),changesDiscard:s=>r("changes.discard",s),async batch(s){const i=s.map(()=>n++),a=await o(s.map((l,d)=>({jsonrpc:"2.0",id:i[d],method:l.method,params:l.params??{}}))),c=new Map(a.map(l=>[l.id,l]));return i.map((l,d)=>{const u=c.get(l);return u?u.error?{ok:!1,error:Me(s[d].method,u.error)}:{ok:!0,result:u.result}:{ok:!1,error:new T(p.InternalError,"no response for this call")}})}}}const ge=".json";[...Array.from({length:9},(e,t)=>`COM${t+1}`),...Array.from({length:9},(e,t)=>`LPT${t+1}`)];new TextEncoder;function zt(e){return`${encodeURIComponent(e)}${ge}`}function rt(e){return e.endsWith(ge)?e.slice(0,-ge.length):e}function $o(e){const t=rt(e);try{return decodeURIComponent(t)}catch{return t}}function Xt(e){let t=rt(e),n=0;for(;t.includes("%");){let o;try{o=decodeURIComponent(t)}catch{break}if(o===t)break;t=o,n++}return{name:t,passes:n}}function Lo(e){return Xt(zt(e)).name}const Ue=20,Fe=5,je=500;function Ie(e){return e instanceof T?e.code===p.MethodNotFound?!0:e.code===p.Unsupported&&e.data?.reason==="outdated":!1}function me(e,t){return t.notModified?e?{...e,base:t.base}:null:{revision:t.revision,base:t.base,changes:t.changes}}async function Zt(e,t,n){const o=m.contentChanges(n),r=e.getQueryData(o),s=await t.changesList(r?{ifNoneMatch:r.revision}:{}),i=me(r,s);if(i)return i;const a=await t.changesList({});return me(void 0,a)}async function en(e,t){const n=[];for(let s=0;s<t.length;s+=Ue)n.push(t.slice(s,s+Ue));const o=Object.create(null),r=[];for(let s=0;s<n.length;s+=Fe){const i=await e.batch(n.slice(s,s+Fe).map(a=>({method:"changes.get",params:{names:a}})));for(const a of i){if(!a.ok)throw a.error;const c=a.result;Object.assign(o,c.entries),r.push(...c.diagnostics)}}return{entries:o,diagnostics:r}}async function Mo(e,t){let n={revision:"",versions:{}};for(let o=0;o<t.length;o+=je){const r=t.slice(o,o+je),s=await e.changesDiscard({names:r.map(i=>i.name),ifMatch:Object.fromEntries(r.map(i=>[i.name,i.version]))});n={revision:s.revision,versions:{...n.versions,...s.versions}}}return n}function Uo(e){return e instanceof T&&e.code===p.Conflict}function st(e){return e?.kind==="protocol"?e:null}function Fo(e,t,n){const o=P.c(14);let r;o[0]!==n?(r={},o[0]=n,o[1]=r):r=o[1];const s=r,i=Y();let a;o[2]!==e?(a=st(e),o[2]=e,o[3]=a):a=o[3];const c=a,l=!!c&&!!t&&s.enabled!==!1;let d;o[4]!==t?(d=m.contentChanges(t??""),o[4]=t,o[5]=d):d=o[5];let u;o[6]!==t||o[7]!==l||o[8]!==c||o[9]!==i?(u=l?()=>Zt(i,c.client,t):Ze,o[6]=t,o[7]=l,o[8]=c,o[9]=i,o[10]=u):u=o[10];let f;return o[11]!==d||o[12]!==u?(f={queryKey:d,queryFn:u,staleTime:0},o[11]=d,o[12]=u,o[13]=f):f=o[13],U(f)}function jo(e,t,n){const o=P.c(14);let r;o[0]!==e?(r=st(e),o[0]=e,o[1]=r):r=o[1];const s=r;let i;o[2]!==n?(i=n?Object.keys(n.changes):[],o[2]=n,o[3]=i):i=o[3];const a=i,c=!!s&&!!t&&!!n&&a.length>0;let l;o[4]!==t||o[5]!==n?.revision?(l=m.contentChangeSides(t??"",n?.revision??""),o[4]=t,o[5]=n?.revision,o[6]=l):l=o[6];let d;o[7]!==c||o[8]!==a||o[9]!==s?(d=c?()=>en(s.client,a):Ze,o[7]=c,o[8]=a,o[9]=s,o[10]=d):d=o[10];let u;return o[11]!==l||o[12]!==d?(u={queryKey:l,queryFn:d,staleTime:Number.POSITIVE_INFINITY},o[11]=l,o[12]=d,o[13]=u):u=o[13],U(u)}function it(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const n=t.hostname.toLowerCase();return n==="127.0.0.1"||n==="[::1]"||n==="localhost"}catch{return!1}}function te(e){try{const t=new URL(e);return(t.hostname==="127.0.0.1"||t.hostname==="[::1]")&&(t.hostname="localhost"),t.href}catch{return e}}const at=At({endpoint:$t().max(2048).refine(e=>it(e)&&new URL(e).pathname==="/rpc").transform(te)});function Bo(e){const t=new URLSearchParams(e.replace(/^#/,"")),n=at.safeParse({endpoint:t.get("endpoint")??""});return n.success?n.data:null}function ct(e){const t=at.safeParse(e);return t.success?t.data:null}const lt="studio:deco-serve-last";function Qo(e){try{localStorage.setItem(lt,JSON.stringify(e))}catch{}}function Vo(){try{const e=localStorage.getItem(lt);return e?ct(JSON.parse(e)):null}catch{return null}}function Ho(e){try{return new URL(te(e)).host}catch{return e}}function tn(e,t=1e4){return Math.min(1e3*2**Math.max(0,e-1),t)}const nn="http://localhost:4545/rpc",Go="npx @decocms/blocks serve",Jo="npx @decocms/blocks schema";class Oe extends Error{constructor(t="the endpoint isn't deco serve"){super(t),this.name="NotDecoServeError"}}function on(e){if(e instanceof Oe)return{reason:"not-deco-serve"};if(!(e instanceof T))return{reason:"not-answering"};switch(e.code){case p.Unauthorized:case p.MethodNotFound:return{reason:"outdated"};case p.Unsupported:return Ie(e)?{reason:"outdated"}:{reason:"version-mismatch"};case p.Unavailable:return/^the endpoint answered HTTP/.test(e.message)?{reason:"not-deco-serve"}:{reason:"error",detail:e.message};default:return{reason:"error",detail:e.message}}}function Wo(e,t){if(e)return[te(e.endpoint)];const n=[t?.endpoint,nn].filter(o=>!!o).map(te);return[...new Set(n)]}const ut=M.createContext(null);function rn(e){const t=P.c(27),n=M.useContext(ut),o=ke(n?null:e),{data:r}=Lt.useSession(),s=r?.user?.id??"",i=!!e&&!!s;let a;t[0]!==i||t[1]!==s||t[2]!==e?(a=i?ue.decoServeConnection(s,e):null,t[0]=i,t[1]=s,t[2]=e,t[3]=a):a=t[3];const[c,l]=Qe(a);let d;t[4]!==i||t[5]!==s||t[6]!==e?(d=i?ue.decoServeEndpoint(s,e):null,t[4]=i,t[5]=s,t[6]=e,t[7]=d):d=t[7];const[u,f]=Qe(d);if(n)return n;let g;t[8]!==c||t[9]!==i?(g=i?ct(c):null,t[8]=c,t[9]=i,t[10]=g):g=t[10];const b=g,k=!!b;let w;t[11]!==o||t[12]!==k?(w=sn(o,k),t[11]=o,t[12]=k,t[13]=w):w=t[13];const{applies:D,undecided:R}=w,x=D?b:null,_=i&&o==="v8"&&typeof u=="string"?u:null;let I;t[14]!==f||t[15]!==l||t[16]!==i?(I=E=>{i&&(l(E),f(E.endpoint))},t[14]=f,t[15]=l,t[16]=i,t[17]=I):I=t[17];let y;t[18]!==l||t[19]!==i?(y=()=>{i&&l(null)},t[18]=l,t[19]=i,t[20]=y):y=t[20];let S;return t[21]!==x||t[22]!==_||t[23]!==I||t[24]!==y||t[25]!==R?(S={connection:x,undecided:R,lastEndpoint:_,set:I,clear:y},t[21]=x,t[22]=_,t[23]=I,t[24]=y,t[25]=R,t[26]=S):S=t[26],S}function sn(e,t){return t?e==="loading"?{applies:!1,undecided:!0}:{applies:e==="v8"||e==="error",undecided:!1}:{applies:!1,undecided:!1}}function Be(e){try{const t=localStorage.getItem(e);return t===null?null:JSON.parse(t)}catch{return null}}function Qe(e){const t=P.c(17),n=Y(),o=e??"";let r;t[0]!==o?(r=["localStorage",o],t[0]=o,t[1]=r):r=t[1];const s=r;let i,a;t[2]!==e?(i=()=>e?Be(e):null,a=()=>e?Be(e):null,t[2]=e,t[3]=i,t[4]=a):(i=t[3],a=t[4]);const c=!!e;let l;t[5]!==s||t[6]!==i||t[7]!==a||t[8]!==c?(l={queryKey:s,queryFn:i,initialData:a,enabled:c,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[5]=s,t[6]=i,t[7]=a,t[8]=c,t[9]=l):l=t[9];const{data:d}=U(l);let u;t[10]!==e||t[11]!==n||t[12]!==s?(u=k=>{if(e){try{k===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(k))}catch{}n.setQueryData(s,k)}},t[10]=e,t[11]=n,t[12]=s,t[13]=u):u=t[13];const f=u,g=e?d??null:null;let b;return t[14]!==f||t[15]!==g?(b=[g,f],t[14]=f,t[15]=g,t[16]=b):b=t[16],b}function Yo(e){return e.kind==="protocol"||e.kind==="unavailable"}function Ko(e){const t=e.hasOrg?e.orgFlag:!1,{backend:n}=e;return n==="protocol"||n==="unavailable"?!0:n==="pending"?t===!0?!0:void 0:t}function qo(e,t,n){return t!=="github"||n!=="v8"?!1:e.kind==="pending"?!0:e.kind==="unavailable"&&e.siteNotOwned?!1:(e.kind==="protocol"||e.kind==="unavailable")&&e.source==="github"}function zo(e){if(e.kind!=="protocol"||e.source!=="local")return null;const t=e.describe.preview?.url;return t&&it(t)?t:null}function Xo(e,t){return e.kind!=="protocol"||e.source!=="local"||!e.describe.assets||!t?null:new URL(t.endpoint).origin}function dt(e){return e.hasServeConnection?"local":e.runtime==="sandbox"?"sandbox":"github"}function an(e){if(!e.hasProject)return"legacy";const t=dt(e);if(t==="local")return"protocol-local";if(e.serveConnectionUndecided)return"pending";if(t==="sandbox"){const o=e.sandboxSite;return o==="v8"?"protocol-sandbox":o==="v7"?"legacy":o==="error"?e.markedV8?"retrying-sandbox":"legacy":"pending"}if(e.mainSchema==="loading")return"pending";if(e.mainSchema==="error")return"retrying-github";if(e.mainSchema==="v7")return"legacy";const n=e.githubSite;return n==="v8"?"protocol-github":n==="not-owned"?"site-not-owned-github":n==="error"?"unavailable-github":n==="v7"?"legacy":"pending"}function cn(e){return{github:e.mode==="github"&&e.mainSchema==="v8",sandbox:e.mode==="sandbox"&&e.workingTreeReady}}function Ve(e){return e.isError||e.errorUpdateCount>0}function ln(e,t,n){if(!t||n.size===0)return e;const o={...e};for(const r of n)Object.hasOwn(t,r)?o[r]=t[r]:delete o[r];return o}function un(e){if(!e||typeof e!="object")return[];const t=e,n=[];return typeof t.blockKey=="string"&&n.push(t.blockKey),t.writes&&typeof t.writes=="object"&&n.push(...Object.keys(t.writes)),Array.isArray(t.deletes)&&n.push(...t.deletes.filter(o=>typeof o=="string")),n}function se(e){return{[jt]:e}}class Te extends Error{status=409;constructor(){super("main's schema changed")}}async function _e(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code===Bt}function Ne(e,t,n){e.resetQueries({predicate:o=>{const r=o.queryKey;return r[1]!==t||r[2]!==n?!1:r[0]===m.mainSchemaV8(t,n)[0]||r[0]===m.contentBackend()[0]&&r[4]==="github"}})}function ft(e,t,n){return e.getQueryData(m.mainSchemaV8(t,n))}const ht="__noSchema";function dn(){return{manifest:{blocks:{}},schema:{definitions:{},root:{}},[ht]:!0}}function Zo(e){return!!e&&e[ht]===!0}function gt(e){if(!e.ok)return e.error.code===p.NotFound;const t=e.result;return t.notModified===!1&&t.schema===null}function fn(e,t){return(typeof t.name=="string"?t.name.trim():"")||e}const hn=(e,t)=>e.label.localeCompare(t.label)||e.key.localeCompare(t.key);function er(e){const t=new Map;for(const[n,o]of Object.entries(e)){const r=o&&typeof o=="object"&&!Array.isArray(o)?o:{},s=typeof r.__resolveType=="string"?r.__resolveType:null,i=t.get(s)??[];i.push({key:n,label:fn(n,r)}),t.set(s,i)}return[...t.entries()].map(([n,o])=>({resolveType:n,blocks:o.sort(hn)})).sort((n,o)=>n.resolveType===null?1:o.resolveType===null?-1:He(n.resolveType).localeCompare(He(o.resolveType))||n.resolveType.localeCompare(o.resolveType))}function He(e){return(e.split("/").filter(Boolean).at(-1)??e).replace(/\.(tsx?|jsx?)$/,"")||e}function Ge(e,t,n){if(t.length===0)return n;const[o,...r]=t;if(Array.isArray(e)&&typeof o=="number"){const s=e.slice();return s[o]=Ge(e[o],r,n),s}if(e&&typeof e=="object"&&typeof o=="string"){const s=e,i={};for(const a of Object.keys(s))i[a]=a===o?Ge(s[a],r,n):s[a];return i}return e}function tr(e){if(e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}class Je extends Error{}class We extends Error{}const mt="site-not-owned";async function gn(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code==="site_not_owned"}async function mn(e,t=r=>fetch(r),n,o){const r=Ce({endpoint:e,fetch:async s=>{const i=new Request(s);for(const[c,l]of Object.entries(se("v8")))i.headers.set(c,l);const a=await t(i);if(await gn(a))throw new We;if(await _e(a))throw n?.(),new Te;return a}});try{const s=await Re(r,de(o)?{schema:o}:void 0);return s.v8Schema?s:null}catch(s){if(s instanceof We)return mt;throw s}}const De=5e3;function vn(e){return new URL(`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/rpc`,window.location.origin).href}function bn(e){return new URL(re(e,"rpc"),window.location.origin).href}async function Re(e,t){const[n,o]=await e.batch(t?[{method:"describe"}]:[{method:"describe"},{method:"schema.get"}]);if(!n?.ok)throw n?.error??new Error("no describe");if(n.result?.protocol!==q)throw new Oe;const s=ot(n.result);if(t)return{client:e,describe:s,hasSchema:t.schema!=null,v8Schema:de(t.schema)};if(!o)throw new Error("no schema.get");if(gt(o))return{client:e,describe:s,hasSchema:!1,v8Schema:!1};if(o.ok){const i=o.result;return{client:e,describe:s,hasSchema:!0,v8Schema:de(i?.schema)}}throw o.error}async function pn(e,t=n=>fetch(n)){const n=Ce({endpoint:e,fetch:async o=>{const r=await t(o);if(r.status===404)throw new Je;return r}});try{const o=await Re(n);return o.v8Schema?o:null}catch(o){if(o instanceof Je)return null;throw o}}function vt(e,t){const n=P.c(53),{org:o}=Mt(),{connection:r,undecided:s}=rn(e),{runtime:i}=et(e),a=M.useContext(ut),c=ke(a?null:e),l=Qt(e),d=dt({hasServeConnection:!!r,runtime:i}),u=Gt()?.taskId??null,f=Jt(Wt().lifecycle.phase),g=Y(),b=cn({mode:d,mainSchema:c,workingTreeReady:f}),k=b.github&&!!o.slug&&!!e&&!!t;let w;n[0]!==t||n[1]!==o.slug||n[2]!==g||n[3]!==e?(w=()=>mn(vn({orgSlug:o.slug,virtualMcpId:e,branch:t}),void 0,()=>Ne(g,o.slug,e),ft(g,o.slug,e)?.schema),n[0]=t,n[1]=o.slug,n[2]=g,n[3]=e,n[4]=w):w=n[4];const D=U({queryKey:m.contentBackend(o.slug,e??"",t??"","github"),queryFn:w,enabled:k,staleTime:Number.POSITIVE_INFINITY,...Ye}),R=b.sandbox&&!!o.slug&&!!e&&!!t;let x;n[5]!==t||n[6]!==o.slug||n[7]!==u||n[8]!==e?(x=async()=>pn(bn({orgSlug:o.slug,virtualMcpId:e,branch:t,threadId:u})),n[5]=t,n[6]=o.slug,n[7]=u,n[8]=e,n[9]=x):x=n[9];const _=U({queryKey:m.contentBackend(o.slug,e??"",t??"","sandbox",u??""),queryFn:x,enabled:R,staleTime:Number.POSITIVE_INFINITY,...Ye}),I=!!r;let y;n[10]!==r?.endpoint||n[11]!==o.slug||n[12]!==e?(y=m.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[10]=r?.endpoint,n[11]=o.slug,n[12]=e,n[13]=y):y=n[13];let S;n[14]!==r?(S=()=>Re(Ce({endpoint:r.endpoint})),n[14]=r,n[15]=S):S=n[15];let E;n[16]!==I||n[17]!==y||n[18]!==S?(E={queryKey:y,queryFn:S,enabled:I,staleTime:Number.POSITIVE_INFINITY,retry:Sn,retryDelay:yn,refetchInterval:wn},n[16]=I,n[17]=y,n[18]=S,n[19]=E):E=n[19];const v=U(E);let O;n[20]!==r?.endpoint||n[21]!==o.slug||n[22]!==e?(O=m.contentBackend(o.slug,e??"","local",r?.endpoint??""),n[20]=r?.endpoint,n[21]=o.slug,n[22]=e,n[23]=O):O=n[23];const $=O;let C;n[24]!==r?.endpoint||n[25]!==o.slug||n[26]!==e?(C=m.contentBackend(o.slug,e??"","local-describe",r?.endpoint??""),n[24]=r?.endpoint,n[25]=o.slug,n[26]=e,n[27]=C):C=n[27];let N;n[28]!==v.data||n[29]!==$||n[30]!==g?(N=async()=>{try{return await v.data.client.describe()}catch(h){const W=h;throw g.invalidateQueries({queryKey:$,exact:!0},{cancelRefetch:!1}),W}},n[28]=v.data,n[29]=$,n[30]=g,n[31]=N):N=n[31];const A=!!v.data&&!a;let F;n[32]!==C||n[33]!==N||n[34]!==A?(F={queryKey:C,queryFn:N,enabled:A,refetchInterval:De,retry:!1},n[32]=C,n[33]=N,n[34]=A,n[35]=F):F=n[35];const Q=U(F).data??v.data?.describe,L=an({hasProject:!!e,hasServeConnection:!!r,serveConnectionUndecided:s,runtime:i,mainSchema:c,githubSite:D.data===mt?"not-owned":D.data?"v8":D.data===null?"v7":Ve(D)?"error":"loading",sandboxSite:En({data:_.data,isError:Ve(_),workingTreeReady:f}),markedV8:l});if(L==="pending"){let h;return n[36]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"pending"},n[36]=h):h=n[36],h}if(L==="retrying-github"){let h;return n[37]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"pending",retrying:"github"},n[37]=h):h=n[37],h}if(L==="retrying-sandbox"){let h;return n[38]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"pending",retrying:"sandbox"},n[38]=h):h=n[38],h}if(L==="legacy"){let h;return n[39]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"legacy"},n[39]=h):h=n[39],h}if(L==="protocol-github"){const h=D.data;let W;return n[40]!==h?(W=ve("github",h,""),n[40]=h,n[41]=W):W=n[41],W}if(L==="site-not-owned-github"){let h;return n[42]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"unavailable",source:"github",siteNotOwned:!0},n[42]=h):h=n[42],h}if(L==="protocol-sandbox"){let h;return n[43]!==_.data?(h=ve("sandbox",_.data,":sandbox"),n[43]=_.data,n[44]=h):h=n[44],h}if(L==="unavailable-github"){let h;return n[45]===Symbol.for("react.memo_cache_sentinel")?(h={kind:"unavailable",source:"github"},n[45]=h):h=n[45],h}const J=v.error??v.failureReason,ce=r?.endpoint??"";let z;return n[46]!==Q||n[47]!==v.data||n[48]!==v.failureCount||n[49]!==v.isError||n[50]!==J||n[51]!==ce?(z=Cn({probed:v.data,isError:v.isError,failureCount:v.failureCount,failure:J,describe:Q,endpoint:ce}),n[46]=Q,n[47]=v.data,n[48]=v.failureCount,n[49]=v.isError,n[50]=J,n[51]=ce,n[52]=z):z=n[52],z}function wn(e){return e.state.status==="error"||e.state.data?.v8Schema===!1?De:!1}function yn(e){return tn(e+1)}function Sn(e,t){return!(t instanceof T)&&!(t instanceof Oe)}function En(e){return e.data!==void 0?e.data?"v8":"v7":e.workingTreeReady?e.isError?"error":"loading":"unavailable"}const kn=3;function Cn(e){if(e.probed?.hasSchema&&!e.probed.v8Schema)return{kind:"unavailable",source:"local",problem:{reason:"not-v8"}};const t=e.probed?ve("local",{...e.probed,describe:e.describe??e.probed.describe},`:serve:${e.endpoint}`):null;return e.isError||e.failureCount>0?t?.kind==="protocol"&&!e.isError&&e.failureCount<kn?t:{kind:"unavailable",source:"local",problem:on(e.failure)}:t??{kind:"pending"}}const Ye={retry:2,refetchInterval:e=>e.state.status==="error"?De:!1};function ve(e,t,n){return{kind:"protocol",source:e,client:t.client,describe:t.describe,cacheKeySuffix:n,hasSchema:t.hasSchema}}function bt(e){const t=P.c(13);let n;t[0]!==e?(n=ue.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const o=n,[r,s]=Ut(o,null),i=ke(e);let a;if(t[2]!==i||t[3]!==r||t[4]!==e){const f=e?Le(r):null;a=In({saved:f,main:i}),t[2]=i,t[3]=r,t[4]=e,t[5]=a}else a=t[5];const c=a;let l,d;t[6]!==s?(l=f=>s(Le(f)),d=()=>s(null),t[6]=s,t[7]=l,t[8]=d):(l=t[7],d=t[8]);let u;return t[9]!==c||t[10]!==l||t[11]!==d?(u={...c,setUrl:l,clear:d},t[9]=c,t[10]=l,t[11]=d,t[12]=u):u=t[12],u}function In(e){return e.saved?e.main==="v7"?{url:e.saved,undecided:!1}:e.main==="v8"?{url:null,undecided:!1}:{url:null,undecided:!0}:{url:null,undecided:!1}}function On(e,t){const n=(e??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${t}`:t}function Ke(e){let t;try{t=JSON.parse(e)}catch{return null}return typeof t!="object"||t===null||Array.isArray(t)?null:t}class xe extends Error{constructor(t,n,o=[]){super(n),this.blocks=t,this.fields=o,this.name="BlockConflictError"}blocks;fields}function Pe(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function ie(e,t,n){return["decofile-write",e,t,n]}function Tn(e,t,n){return{id:ie(e,t,n).join(":")}}function Ae(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function _n(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Nn(e,t,n){e.setQueryData(m.decofileDraft(Pe(t)),n)}function Dn(e,t){return e.getQueryData(m.decofileDraft(Pe(t)))??null}async function Rn(e,t){const n=await fetch(Ae(e),{cache:"no-store",headers:{...se("v7"),"if-none-match":`"${t}"`}}).catch(()=>null);return n?.status===200||n?.status===409}function nr(e){const t=P.c(4);let n;t[0]!==e?(n=m.decofileDraft(e?Pe(e):""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:xn,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=U(o);return r??null}async function xn(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function Pn(e,t){const n=await fetch(Ae(t),{cache:"no-store",headers:se("v7")});if(await _e(n))throw Ne(e,t.orgSlug,t.virtualMcpId),new Te;if(!n.ok){const r=new Error(`Failed to fetch decofile: ${n.status}`);throw r.status=n.status,r}const o=await n.json();return o.token&&Nn(e,t,{version:o.version,token:o.token,apiHost:o.apiHost??window.location.host}),o.decofile}async function or(e,t){const n=await fetch(Ae(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const r=await n.json().catch(()=>({}));throw r.code==="block-conflict"?new xe(r.blocks??[],r.error??"Block changed"):new Error(r.error??`Save failed (${n.status})`)}if(!n.ok)return _n(n,"Save");const o=await n.json();return{...o,apiHost:o.apiHost??window.location.host}}const pt=3e3,An=15e3,$n=2*6e4,wt={now:()=>Date.now(),setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),hidden:()=>typeof document<"u"&&document.visibilityState==="hidden"};function Ln(e){return e<$n?pt:An}function Mn(e,t=wt){const n=t.now();let o=!1,r=!1,s=null;const i=()=>{o||(s=t.setTimeout(a,Ln(t.now()-n)))},a=()=>{if(s=null,o)return;const{read:c,skip:l}=e();if(r||t.hidden()||l?.()){i();return}r=!0;let d;try{d=c()}catch{d=void 0}Promise.resolve(d).catch(()=>{}).finally(()=>{r=!1}),i()};return i(),()=>{o=!0,s!==null&&t.clearTimeout(s)}}const qe=()=>0;function Un(e,t,n=wt){const o=M.useRef(t);o.current=t;const[r]=M.useState(()=>({polling:()=>Mn(()=>o.current,n),idle:()=>()=>{}}));M.useSyncExternalStore(e?r.polling:r.idle,qe,qe)}function yt(e,t){return re(e,t)}function Fn(e,t){return re(e,"preview-fetch",{path:t})}function rr(e){return yt(e,"preview-invoke")}function sr(e){return yt(e,"catalog-invoke")}function St(e){try{const{hostname:t}=new URL(e);return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}function jn(){if(typeof document>"u")return null;const e=Array.from(document.querySelectorAll("iframe"));for(const t of e){const n=t.getAttribute("src");if(n&&St(n))return n}return null}function Bn(e,t){const n=e.previewUrl??e.getFallbackPreviewUrl?.()??jn();return n&&St(n)?new URL(t,n).toString():Fn(e,t)}function Qn(e){return Bn(e,"/.decofile")}function Vn(e){return e===400?"absent":e===404?"unavailable":e>=200&&e<300?"ok":"error"}function ze(e){return e.liveOk||e.committedAbsent?404:e.liveStatus??502}async function Hn(e,t){const n=re(e,"read"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,full:!0})}),r=Vn(o.status);if(r==="absent")return{kind:"absent"};if(r==="unavailable")return{kind:"unavailable"};if(r==="error"){const i=new Error(`Failed to read ${t}: ${o.status}`);throw i.status=o.status,i}const s=await o.json();return typeof s.content!="string"?{kind:"unavailable"}:{kind:"data",data:Vt(s.content)}}async function Gn(e,t){const n=await Hn(e,t);if(n.kind!=="data")return n;try{return{kind:"data",data:JSON.parse(n.data)}}catch{return{kind:"unavailable"}}}async function ir(e){const t=`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/meta`,n=await fetch(t,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const o=new Error(`Failed to read committed meta: ${n.status}`);throw o.status=n.status,o}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function Jn(e){return Ht(e)?.metadata?.runtime?.path??null}class Et extends Error{constructor(t){super(t instanceof Error?t.message:String(t),{cause:t}),this.name="ServeLostError"}}function ar(e){return e instanceof T&&e.code===p.Conflict}function kt(e){const t=e.data?.violations;return!Array.isArray(t)||t.length===0?e.message:t.slice(0,3).map(n=>n.message).join("; ")}function Wn(e,t,n){if(t instanceof xe)return t.message;if(n==="local")return Kn(e,t);if(t instanceof T)switch(t.code){case p.Conflict:return e("siteEditor.save.conflict");case p.ReadOnly:return e("siteEditor.save.readOnly");case p.InvalidBlock:case p.InvalidParams:return e("siteEditor.save.invalid");case p.LimitExceeded:return e("siteEditor.save.tooLarge")}return e("siteEditor.save.failed")}function Yn(e,t){if(t==="local"||e instanceof xe)return null;if(e instanceof T){const n=e.code===p.InvalidBlock||e.code===p.InvalidParams?kt(e):e.message;return n?`${e.code}: ${n}`:null}return e.message||null}function Kn(e,t){if(t instanceof Et)return e("decoServe.save.serverGone");if(t instanceof T)switch(t.code){case p.Conflict:return e("decoServe.save.conflict");case p.ReadOnly:return e("decoServe.save.readOnly");case p.InvalidBlock:case p.InvalidParams:return e("decoServe.save.invalid",{detail:kt(t)});case p.LimitExceeded:return e("decoServe.save.tooLarge")}return e("sectionsEditor.sectionsEditor.saveFailed",{error:t.message})}function qn(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function zn(e,t){const[n,o]=M.useState(e),r=M.useRef(null);return e&&!n&&o(!0),M.useEffect(()=>{if(e){r.current??=Date.now();return}if(!n)return;const s=()=>{r.current=null,o(!1)},i=qn(r.current,Date.now(),t);if(i===0){s();return}const a=setTimeout(s,i);return()=>clearTimeout(a)},[e,n,t]),n}const Xn="decocms:content-writes",be=new Set;let V;function Ct(){if(V!==void 0)return V;V=null;try{typeof BroadcastChannel=="function"&&(V=new BroadcastChannel(Xn),V.addEventListener("message",e=>{const t=e.data?.cacheKey;if(typeof t=="string")for(const n of[...be])n(t)}))}catch{V=null}return V}function Zn(e){try{Ct()?.postMessage({cacheKey:e})}catch{}}function eo(e){return Ct(),be.add(e),()=>{be.delete(e)}}const It={phase:"idle",inFlight:0,reload:{seq:0,navigates:!1},epoch:0},to=15e3,ne=new Map;function G(e,t){return`${e}/${t}`}function j(e){let t=ne.get(e);return t||(t={state:It,listeners:new Set,previews:0,timer:null,discardListeners:new Set},ne.set(e,t)),t}function B(e,t){const n=j(e);n.state={...n.state,...t};for(const o of n.listeners)o()}function ae(e){e.timer&&clearTimeout(e.timer),e.timer=null}function $e(e){return ne.get(e)?.state??It}function no(e,t){const n=j(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}function cr(e){const t=j(e);return t.previews++,()=>{t.previews--,t.previews===0&&t.state.phase==="reloading"&&(ae(t),B(e,{phase:"idle"}))}}function lr(e){const t=ne.get(e);!t||t.state.phase!=="reloading"||(ae(t),B(e,{phase:"idle"}))}function Ot(e){const t=j(e);ae(t),B(e,{phase:"saving",inFlight:t.state.inFlight+1})}function pe(e,t){const n=j(e),o=Math.max(0,n.state.inFlight-1);if(o>0){B(e,{inFlight:o});return}if(!t.ok||n.previews===0){B(e,{phase:"idle",inFlight:o});return}Tt(e,t.navigates,o)}function Tt(e,t,n=0){const o=j(e);ae(o),o.timer=setTimeout(()=>{o.timer=null,o.state.phase==="reloading"&&B(e,{phase:"idle"})},to),B(e,{phase:"reloading",inFlight:n,reload:{seq:o.state.reload.seq+1,navigates:t}})}function oo(e){return e?.kind==="protocol"&&e.source==="github"}async function we(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s,backend:i,cacheKey:a}=e,c=t.kind==="publish"||t.kind==="reapply"?n.invalidateQueries({queryKey:m.hostedReleases(o,r)}):null;if(i?.kind!=="protocol")return await c,{navigates:!1};const l=s?m.protocolDraftRead(o,r,s):null,d=l?JSON.stringify(n.getQueryData(l)??null):null,u=c?[c]:[];if(a&&t.reread&&u.push(n.invalidateQueries({queryKey:m.decofile(a)})),a&&u.push(n.invalidateQueries({queryKey:m.contentChanges(a)})),s&&i.source==="sandbox"&&u.push(n.invalidateQueries({queryKey:Yt(o,r,s)})),oo(i)&&l&&u.push(n.invalidateQueries({queryKey:l})),await Promise.all(u),t.kind!=="edit"){const b=G(o,r);B(b,{epoch:$e(b).epoch+1})}const f=l?JSON.stringify(n.getQueryData(l)??null):null,g=d!==f;return g&&await new Promise(b=>Ft.schedule(b)),{navigates:g}}async function ro(e,t){return Ot(G(e.orgSlug,e.virtualMcpId)),_t(e,t)}async function _t(e,t){const n=G(e.orgSlug,e.virtualMcpId);let o;try{o=await t.write()}catch(s){throw pe(n,{ok:!1,navigates:!1}),t.refreshOnError&&we(e,{kind:t.kind,reread:!0}).catch(()=>{}),s}e.backend?.kind==="protocol"&&e.cacheKey&&Zn(e.cacheKey);let r=!1;try{({navigates:r}=await we(e,t))}catch{}finally{pe(n,{ok:!0,navigates:r})}return o}function ur(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:r,branch:s}=e,i=G(o,r),a=new Set(t.blockKeys);for(const d of[...j(i).discardListeners])d(a);Ot(i);let c=!1;const l=()=>(c=!0,_t(e,{kind:"discard",reread:!0,write:t.write}));return s?n.getMutationCache().build(n,{mutationKey:ie(o,r,s),scope:Tn(o,r,s),mutationFn:l}).execute(void 0).catch(d=>{throw c||pe(i,{ok:!1,navigates:!1}),d}):l()}function dr(e,t,n){const o=P.c(8);let r;o[0]!==e||o[1]!==t?(r=G(e,t),o[0]=e,o[1]=t,o[2]=r):r=o[2];const s=r;let i;o[3]!==n||o[4]!==s?(i=()=>{const c=j(s).discardListeners;return c.add(n),()=>{c.delete(n)}},o[3]=n,o[4]=s,o[5]=i):i=o[5];let a;o[6]!==s?(a=[s],o[6]=s,o[7]=a):a=o[7],M.useEffect(i,a)}function so(e){const t=G(e.orgSlug,e.virtualMcpId);$e(t).inFlight>0||we(e,{kind:"external"}).then(({navigates:n})=>{const o=j(t);o.previews>0&&o.state.inFlight===0&&Tt(t,n)}).catch(()=>{})}function io(e,t){const n=P.c(7);let o;n[0]!==e||n[1]!==t?(o=G(e,t),n[0]=e,n[1]=t,n[2]=o):o=n[2];const r=o;let s;n[3]!==r?(s=l=>no(r,l),n[3]=r,n[4]=s):s=n[4];const i=s;let a;n[5]!==r?(a=()=>$e(r),n[5]=r,n[6]=a):a=n[6];const c=a;return M.useSyncExternalStore(i,c,c)}const ao=500;function fr(e,t){const{phase:n}=io(e,t);return zn(n!=="idle",ao)}function co(e){const t=new Error(`${e} unavailable (content server unreachable)`);return t.status=502,t}function lo(e,t){return m.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,`protocol${t.cacheKeySuffix}`,"")}function hr(e,t,n){const o=e.getQueryData(m.contentVersions(t));if(!o)return;if(Object.hasOwn(o,n))return o[n];const r=e.getQueryData(m.decofile(t));return r&&Object.hasOwn(r,n)?void 0:null}function Nt(e,t,n){Ee(e),e.setQueryData(m.contentVersions(t),o=>{const r={...o};for(const[s,i]of Object.entries(n))i===null?delete r[s]:r[s]=i;return r})}function uo(e,t){const n=e.getMutationCache().findAll({mutationKey:ie(t.orgSlug,t.virtualMcpId,t.branch),status:"pending"});return new Set(n.flatMap(o=>un(o.state.variables)))}function ye(e,t){e.resetQueries({queryKey:m.contentBackend(t.orgSlug,t.virtualMcpId,"local")})}async function oe(e,t,n,o){try{return await o()}catch(r){const s=!(r instanceof T);throw t.source==="local"&&s?(ye(e,n),new Et(r)):(t.source==="local"&&Ie(r)&&ye(e,n),r)}}const Z=new Map;function Dt(e,t,n,o){const r=Z.get(o);if(r)return r;const s=Rt(e,t,n,o,!0);return Z.set(o,s),s.finally(()=>Z.delete(o))}const le=new Set;function fo(e,t,n){const o=P.c(8),r=Y(),s=t?.orgSlug,i=t?.virtualMcpId,a=t?.branch;let c,l;o[0]!==e||o[1]!==a||o[2]!==n||o[3]!==s||o[4]!==r||o[5]!==i?(c=()=>{if(!e||!s||!i||!a)return;const d={orgSlug:s,virtualMcpId:i,branch:a};return eo(u=>{u===n&&(le.has(n)||(le.add(n),go(r,e,d,n).catch(ho).finally(()=>le.delete(n))))})},l=[r,e,s,i,a,n],o[0]=e,o[1]=a,o[2]=n,o[3]=s,o[4]=r,o[5]=i,o[6]=c,o[7]=l):(c=o[6],l=o[7]),M.useEffect(c,l)}function ho(){}async function go(e,t,n,o){const r=Z.get(o);return r&&await r.catch(()=>{}),Dt(e,t,n,o)}async function Rt(e,t,n,o,r){Ee(e);const s=m.decofile(o),i=lo(n,t),a=m.contentRevision(o),c=m.contentVersions(o),l=e.getQueryData(s),d=e.getQueryData(c),u=e.getQueryData(i),f=e.getQueryData(a)??void 0,g=t.source==="github"&&!u?ft(e,n.orgSlug,n.virtualMcpId):void 0,b=g?.isV8&&g.schema&&g.version?g:void 0,k=u??b?.schema,w=b?{...f,schemaVersion:b.version}:f,D=r&&l&&d?w?.revision:void 0,R=r&&k?w?.schemaVersion:void 0,x=m.contentChanges(o),_=e.getQueryData(x),[I,y,S]=await oe(e,t,n,()=>t.client.batch([{method:"blocks.list",params:D?{ifNoneMatch:D}:{}},{method:"schema.get",params:R?{ifNoneMatch:R}:{}},{method:"changes.list",params:_?{ifNoneMatch:_.revision}:{}}]));if(S?.ok){const K=me(_,S.result);K&&e.setQueryData(x,K)}else S&&t.source==="local"&&Ie(S.error)&&ye(e,n);if(!I?.ok)throw I?.error??new Error("no blocks.list");if(!y)throw new Error("no schema.get");const E=I.result,v=gt(y),O=y.ok&&!v?y.result:null;if(E.notModified&&(!l||!d)||O?.notModified&&!k)return Rt(e,t,n,o,!1);const $=E.notModified?new Set:uo(e,n),C=E.notModified?l:ln(E.blocks,l,$),N=v?dn():O?O.notModified?k:O.schema:y.error,A=e.getQueryData(a)?.revision,F=A!==void 0&&A!==w?.revision;if(e.setQueryData(a,{revision:F?A:E.notModified?w?.revision:E.revision,schemaVersion:O?O.notModified?w?.schemaVersion:O.version??void 0:void 0}),e.setQueryData(s,C),!E.notModified){const K=e.getQueryData(c),Q={...E.versions};for(const L of $){const J=K?.[L];J!==void 0?Q[L]=J:delete Q[L]}e.setQueryData(c,Q)}return N instanceof T||e.setQueryData(i,N),!F&&!E.notModified&&l&&w?.revision&&E.revision!==w.revision&&so({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o}),{blocks:C,meta:N}}async function gr(e,t,n,o,r,s){return ro({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o},{kind:"edit",write:async()=>{const i=await oe(e,t,n,()=>t.client.blocksApply({set:r.set,delete:r.delete,...s?{ifMatch:s}:{}}));Ee(e),e.setQueryData(m.contentRevision(o),c=>({...c,revision:i.revision}));const a=i.versions??{};return Nt(e,o,a),{revision:i.revision,versions:a}}})}async function mr(e,t,n,o,r){await e.invalidateQueries({queryKey:m.decofile(o)});let s;try{const a=(await oe(e,t,n,()=>t.client.changesGet({names:[r]}))).entries[r];if(a&&a.after===null&&a.version!==null)return;s={value:a?.after??null,version:a?.version??null}}catch{const i=await oe(e,t,n,()=>t.client.blocksList({}));if(i.notModified)return;s={value:i.blocks[r]??null,version:i.versions[r]??null}}e.setQueryData(m.decofile(o),i=>{const a={...i};return s.value===null?delete a[r]:a[r]=s.value,a}),Nt(e,o,{[r]:s.version})}function mo(e){const t=P.c(15),n=Y();let o;t[0]!==e?.branch||t[1]!==e?.orgSlug||t[2]!==e?.virtualMcpId?(o=m.protocolDraftRead(e?.orgSlug??"",e?.virtualMcpId??"",e?.branch??""),t[0]=e?.branch,t[1]=e?.orgSlug,t[2]=e?.virtualMcpId,t[3]=o):o=t[3];let r;t[4]!==e||t[5]!==n?(r=async()=>{const g=await fetch(`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`,{cache:"no-store",headers:se("v8")});if(await _e(g))throw Ne(n,e.orgSlug,e.virtualMcpId),new Te;if(!g.ok)throw new Error(`draft pointer read failed: ${g.status}`);return await g.json()},t[4]=e,t[5]=n,t[6]=r):r=t[6];const s=!!e;let i;t[7]!==o||t[8]!==r||t[9]!==s?(i={queryKey:o,queryFn:r,enabled:s,staleTime:Number.POSITIVE_INFINITY},t[7]=o,t[8]=r,t[9]=s,t[10]=i):i=t[10];const{data:a,isPending:c,isError:l}=U(i),d=!!e&&c&&!l;if(!e||!a?.draft||!a.version){let g;return t[11]!==d?(g={pointer:null,pending:d},t[11]=d,t[12]=g):g=t[12],g}const u=`${a.draft}@${a.version}`;let f;return t[13]!==u?(f={pointer:u,pending:!1},t[13]=u,t[14]=f):f=t[14],f}function vr(e){return mo(e).pointer}function br(e){const t=P.c(4);let n;t[0]!==e?(n=m.contentRevision(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:vo,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:r}=U(o);return r?.revision}async function vo(){throw new Error("content revisions are set by reads and writes")}function Xe(e){const t=`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`;return e.protocolSuffix?`${t}${e.protocolSuffix}`:e.localPreviewUrl?`${t}:local:${e.localPreviewUrl}`:t}function bo(e,t){const n=P.c(6),{url:o}=bt(e?.virtualMcpId),r=vt(e?.virtualMcpId,e?.branch);if(!e)return"";let s;return n[0]!==r.cacheKeySuffix||n[1]!==r.kind||n[2]!==o||n[3]!==t?.tunnel||n[4]!==e?(s=r.kind==="protocol"?Xe({...e,protocolSuffix:r.cacheKeySuffix}):Xe({...e,localPreviewUrl:t?.tunnel===!1?null:o}),n[0]=r.cacheKeySuffix,n[1]=r.kind,n[2]=o,n[3]=t?.tunnel,n[4]=e,n[5]=s):s=n[5],s}function pr(e,t){const n=P.c(39),{url:o,undecided:r}=bt(e?.virtualMcpId),s=!!o,i=vt(e?.virtualMcpId,e?.branch),a=i.kind==="protocol"?i:null,c=bo(e),l=t?.fetchEnabled??!0,d=Jn(e?.virtualMcpId),u=et(e?.virtualMcpId).runtime==="cms",f=Y();let g;n[0]!==c?(g=m.decofile(c),n[0]=c,n[1]=g):g=n[1];const b=g;fo(a,a&&e?e:null,c);let k;n[2]!==e||n[3]!==f||n[4]!==b?(k=()=>{if(!e||f.isMutating({mutationKey:ie(e.orgSlug,e.virtualMcpId,e.branch)})>0)return!0;const v=f.getQueryState(b);return v?.fetchStatus==="fetching"||Date.now()-(v?.dataUpdatedAt??0)<pt/2},n[2]=e,n[3]=f,n[4]=b,n[5]=k):k=n[5];let w;n[6]!==u||n[7]!==s||n[8]!==e||n[9]!==a||n[10]!==f||n[11]!==b?(w=async()=>{if(e){if(!a&&u&&!s){const v=Dn(f,e)?.version;if(v&&!await Rn(e,v))return}await f.refetchQueries({queryKey:b,exact:!0},{cancelRefetch:!1})}},n[6]=u,n[7]=s,n[8]=e,n[9]=a,n[10]=f,n[11]=b,n[12]=w):w=n[12];let D;n[13]!==k||n[14]!==w?(D={skip:k,read:w},n[13]=k,n[14]=w,n[15]=D):D=n[15],Un(!!t?.pollWhile&&!!e,D);let R;n[16]!==i.kind||n[17]!==u||n[18]!==l||n[19]!==c||n[20]!==s||n[21]!==o||n[22]!==d||n[23]!==e||n[24]!==a||n[25]!==f?(R=async()=>{if(a)return(await Dt(f,a,e,c)).blocks;if(i.kind==="unavailable")throw co("decofile");if(s){const C=await fetch(new URL("/.decofile",o).toString(),{cache:"no-store"}).catch(yo),N=C?.ok?Ke(await C.text()):null;if(N)return N;const A=new Error("decofile unavailable (local tunnel unreachable)");throw A.status=502,A}if(u)return Pn(f,e);const v=()=>Gn(e,On(d,".deco/blocks.gen.json"));if(l){const C=await fetch(Qn(e),{cache:"no-store"}).catch(wo);if(C?.ok){const F=Ke(await C.text());if(F)return F}const N=await v();if(N.kind==="data")return N.data;const A=new Error(`Failed to fetch decofile: ${C?.status??"network error"}`);throw A.status=ze({liveOk:!!C?.ok,liveStatus:C?.status,committedAbsent:N.kind==="absent"}),A}const O=await v();if(O.kind==="data")return O.data;const $=new Error("decofile unavailable (preview down, no committed snapshot)");throw $.status=ze({liveOk:!1,committedAbsent:O.kind==="absent"}),$},n[16]=i.kind,n[17]=u,n[18]=l,n[19]=c,n[20]=s,n[21]=o,n[22]=d,n[23]=e,n[24]=a,n[25]=f,n[26]=R):R=n[26];const x=!!e&&i.kind!=="pending"&&!r,_=a?0:3e4,I=a?.describe.pollIntervalMs,y=a?"always":void 0;let S;n[27]!==u||n[28]!==s||n[29]!==a?(S=(v,O)=>{if(a||u||s)return v<3;const $=O.status;return $!==502&&$!==404&&v<2},n[27]=u,n[28]=s,n[29]=a,n[30]=S):S=n[30];let E;return n[31]!==b||n[32]!==R||n[33]!==x||n[34]!==_||n[35]!==I||n[36]!==y||n[37]!==S?(E={queryKey:b,queryFn:R,enabled:x,staleTime:_,refetchInterval:I,refetchIntervalInBackground:!1,refetchOnWindowFocus:y,retry:S,retryDelay:po},n[31]=b,n[32]=R,n[33]=x,n[34]=_,n[35]=I,n[36]=y,n[37]=S,n[38]=E):E=n[38],U(E)}function po(e){return Kt(5e3,1e3,e,2,0)}function wo(){return null}function yo(){return null}const So="site-editor-save",Eo={id:So,description:void 0,action:void 0,cancel:void 0},wr="site-editor-undo",Se="site-editor-publish";function ko(e){const t=P.c(7),{label:n,detail:o}=e;let r;t[0]!==n?(r=H.jsx("summary",{className:"cursor-pointer select-none text-muted-foreground",children:n}),t[0]=n,t[1]=r):r=t[1];let s;t[2]!==o?(s=H.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-muted-foreground",children:o}),t[2]=o,t[3]=s):s=t[3];let i;return t[4]!==r||t[5]!==s?(i=H.jsxs("details",{className:"mt-1 text-xs",children:[r,s]}),t[4]=r,t[5]=s,t[6]=i):i=t[6],i}function xt(e,t){return t?H.jsx(ko,{label:e("siteEditor.details"),detail:t}):void 0}function yr(e,t,n){ee.error(Wn(e,t,n),{...Eo,description:xt(e,Yn(t,n))})}const Pt={action:void 0,duration:void 0};function Sr(e,t){ee.success(t?e("siteEditor.publish.publishedOn",{host:t}):e("siteEditor.publish.published"),{...Pt,id:Se,description:void 0})}function Er(e,{headline:t,body:n,detail:o,retry:r,pending:s,tone:i="error"}){const a=xt(e,o??null);ee[i](t,{id:Se,description:n&&a?H.jsxs(H.Fragment,{children:[H.jsx("p",{children:n}),a]}):n??a,action:r?{label:e("siteEditor.tryAgain"),onClick:c=>{c.preventDefault(),ee.loading(s??e("thread.publishPopover.publishing"),{...Pt,id:Se,description:void 0}),r()}}:void 0,duration:r?Number.POSITIVE_INFINITY:void 0})}function kr(e){return e instanceof Error?e.message||null:e==null?null:String(e)}export{Xo as $,cr as A,io as B,lr as C,bo as D,br as E,Tn as F,ie as G,ro as H,Hn as I,_n as J,xe as K,ar as L,gr as M,mr as N,yr as O,Nn as P,or as Q,dr as R,Go as S,ut as T,Ko as U,er as V,He as W,Ge as X,tr as Y,Jo as Z,Bn as _,Wo as a,nn as a0,xt as a1,kr as a2,Lo as a3,$o as a4,zt as a5,Ne as a6,Sr as a7,ur as a8,Mo as a9,Uo as aa,Ie as ab,jo as ac,lo as ad,Zt as ae,ko as af,Fo as ag,Dt as ah,co as ai,ir as aj,Gn as ak,nr as al,vr as am,se as an,Er as ao,Se as ap,Pt as aq,wr as ar,Eo as as,uo as at,hr as au,go as av,T as aw,p as ax,sr as ay,rn as b,bt as c,tn as d,Ho as e,on as f,Re as g,Ce as h,it as i,rr as j,Fn as k,pr as l,Yo as m,Zo as n,Jn as o,Bo as p,On as q,Vo as r,Qo as s,dt as t,vt as u,zo as v,fr as w,qo as x,mo as y,G as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as te,a2 as se,o as ae,r as T,aa as ce,j as t,B as U,n as $,b2 as de,a3 as me,t as D,az as ue,c as ie,l as pe,X as ge,T as fe,V as he,U as xe,K as Q,f1 as je}from"./index-BSPqDg2b.js";import{i as ke}from"./DotsVertical-BmVaGWAg.js";import{i as le,a as ve}from"./ZoomOut-DH4NDKgS.js";import{s as ye}from"./Trash01-DT07olaT.js";import{i as Se}from"./Upload01-BocTk920.js";import{S as be}from"./search-input-5CsF8kzc.js";import{S as we}from"./search-toggle-CdGIHwQK.js";import{f as Ce,e as De,b as Ne,A as Pe,a as Ae,d as Ee,c as Te,g as Me}from"./alert-dialog-Bjihy8X7.js";import{E as Y}from"./empty-state-cJTBr2cU.js";import{C as Oe}from"./collection-tabs-D5iCdwPv.js";import{p as Ie,S as ze,F as Fe}from"./folder-icon-I00h66JN.js";import{h as Re,i as $e,r as _e}from"./use-org-fs-BFFpcHJy.js";import{S as Le,H as J,f as Be}from"./location-V0VwTJTt.js";import"./SearchMd-DzFzOALq.js";import"./icon-button-uPrtYnSE.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./badge-DVaine1x.js";import"./markdown-D5ryQAkZ.js";import"./use-copy-D2ar5QXj.js";import"./Copy01-B5Qm_DvO.js";import"./use-mobile-19frZVl2.js";import"./use-panel-navigate-BKTq-N_H.js";import"./thread-route-BLXCdzrT.js";import"./use-project-scope-hi480z1p.js";import"./repository-binding-BPraGDH6.js";import"./use-mcp-client-BYbk6jXo.js";import"./auth--QyNLTbP.js";import"./file-preview-bA4ayYHL.js";import"./utils-BnP8cv1B.js";import"./Image01-KdUybmWt.js";import"./editor-wUI_HNkS.js";import"./file-type-icon-DTTBg-Cp.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";const Z=200,Ke=new Set(["node_modules","__pycache__"]);function q(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function He(s){return q(s).split("/").every(e=>!e.startsWith(".")&&!Ke.has(e))}function Qe(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ue(s,e){const l=new Map;for(const r of s){const c=q(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function qe(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function Ge(s,e){const l=Ie(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,disableModelInvocation:l.disableModelInvocation,source:"home",volume:J,path:r,sandboxPath:`${Le}/${J}/${r}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:le}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?ue:ve}}function Xe(s){const e=ie.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=te(),{org:m}=se();let S;e[0]!==l.source||e[1]!==m.name?(S=re(l.source,m.name),e[0]=l.source,e[1]=m.name,e[2]=S):S=e[2];const{label:M,glyph:O}=S;let I;e[3]!==l?(I=B(l),e[3]=l,e[4]=I):I=e[4];const F=I,z=r?"opacity-60":"hover:bg-accent";let u;e[5]!==z?(u=pe("relative transition-colors group overflow-hidden flex flex-col h-full",z),e[5]=z,e[6]=u):u=e[6];let f;e[7]!==l.name||e[8]!==c||e[9]!==r?(f=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=f):f=e[10];const b=F?"default":"system",N=!F;let w;e[11]!==O||e[12]!==b||e[13]!==N?(w=t.jsx(Fe,{glyph:O,tone:b,readOnly:N,className:"size-8 shrink-0"}),e[11]=O,e[12]=b,e[13]=N,e[14]=w):w=e[14];let h;e[15]!==a||e[16]!==o?(h=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ge,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",children:t.jsx(ke,{size:16})})}),t.jsx(he,{align:"end",children:t.jsxs(xe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ye,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=h):h=e[17];let x;e[18]!==w||e[19]!==h?(x=t.jsxs("div",{className:"flex items-start justify-between",children:[w,h]}),e[18]=w,e[19]=h,e[20]=x):x=e[20];let j;e[21]!==l.name?(j=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=j):j=e[22];let C;e[23]!==l.description||e[24]!==o?(C=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=C):C=e[25];let k;e[26]!==C?(k=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:C}),e[26]=C,e[27]=k):k=e[27];let d;e[28]!==j||e[29]!==k?(d=t.jsxs("div",{className:"flex flex-col gap-1",children:[j,k]}),e[28]=j,e[29]=k,e[30]=d):d=e[30];let v;e[31]!==x||e[32]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,d]}),e[31]=x,e[32]=d,e[33]=v):v=e[33];let p;e[34]!==M||e[35]!==r||e[36]!==o?(p=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=p):p=e[37];let y;e[38]!==p?(y=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:p})})}),e[38]=p,e[39]=y):y=e[39];let g;e[40]!==v||e[41]!==y?(g=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,y]}),e[40]=v,e[41]=y,e[42]=g):g=e[42];let P;return e[43]!==r||e[44]!==g||e[45]!==u||e[46]!==f?(P=t.jsxs(je,{size:"flush","aria-busy":r,className:u,children:[f,g]}),e[43]=r,e[44]=g,e[45]=u,e[46]=f,e[47]=P):P=e[47],P}function ee(s){const e=ie.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Et(){const s=te(),{org:e}=se(),l=Re(),{remove:r,upload:c}=$e("home"),a=ae(),o=T.useRef(null),[m,S]=T.useState(""),M=ce(),[O,I]=T.useState(L),[F,z]=T.useState(!1),[u,f]=T.useState(null),[b,N]=T.useState(null),[w,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:Q.slashSkills(e.id)}),a.invalidateQueries({queryKey:Q.orgFsSkills(e.id)})},j=i=>a.setQueryData(Q.slashSkills(e.id),n=>i(n??[]));async function C(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const A=n[0]?.webkitRelativePath??"";if(!A){D.error(s("settings.skills.importNeedsFolder"));return}const H=A.split("/")[0]??"",_=n.filter(He),X=_.find(E=>q(E)==="SKILL.md");if(!X){D.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>Z){D.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(Z)}));return}const R=Qe(H),W=`skills/${R}`;let V=!1;z(!0);try{if(await _e(e.slug,"home",W)){D.error(s("settings.skills.importSlugTaken",{slug:R}));return}V=!0;const E=Ge(R,await X.text());j(oe=>[E,...oe]),h(E.id),await qe(Ue(_,R),c.mutateAsync),D.success(s("settings.skills.importSuccess",{name:R}))}catch(E){V&&await r.mutateAsync(W).catch(()=>{}),D.error(E instanceof Error?E.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=m.toLowerCase(),d=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),p=new Map;for(const i of d)p.set(i.source,(p.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:d.length},...[...v].map(i=>({id:i,label:re(i,e.name).label,count:p.get(i)??0}))],g=v.has(O)?O:L,P=g===L?d:d.filter(i=>i.source===g),K=i=>f(Be(i.volume,i.path)),ne=async()=>{if(!b)return;const{id:i,path:n}=b;N(null),j(A=>A.filter(H=>H.id!==i));try{await r.mutateAsync(n),D.success(s("settings.skills.deleteSuccess"))}catch(A){D.error(A instanceof Error?A.message:s("settings.skills.deleteError"))}finally{x()}},G=t.jsxs(U,{size:"sm",disabled:F,onClick:()=>o.current?.click(),children:[t.jsx(Se,{size:14}),s(F?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs($,{children:[t.jsx($.Content,{children:t.jsx($.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[M?t.jsx($.Actions,{secondary:t.jsx(we,{value:m,onChange:S,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:G}):t.jsx($.Title,{actions:G,children:s("settings.skills.pageTitle")}),t.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3 empty:hidden",children:!M&&t.jsx(be,{value:m,onChange:S,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(S(""),i.target.blur())}})}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{C(i.target.files)}}),y.length>2&&t.jsx(Oe,{placement:"page",tabs:y,activeTab:g,onTabChange:I}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(i,n)=>t.jsx(de,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(me,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(U,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):P.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:s(m?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:m?s("settings.skills.noResultsDescription",{search:m}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:P.map(i=>{const n=i.id===w;return t.jsx(Xe,{entry:i,pending:n,onOpen:()=>K(i),onDelete:B(i)&&!n?()=>N(i):void 0},i.id)})})})]})})}),u&&t.jsx(ze,{skillPath:u,onClose:()=>f(null)},u),t.jsx(Ce,{open:b!==null,onOpenChange:i=>!i&&N(null),children:t.jsxs(De,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(Ae,{children:s("settings.skills.deleteDialogDescription",{name:b?.name??""})})]}),t.jsxs(Ee,{children:[t.jsx(Te,{children:s("settings.skills.cancel")}),t.jsx(Me,{onClick:ne,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Et as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as B,a2 as L,r as v,j as e,n as x,fN as z,ex as b,ey as E,ez as a,gd as D,B as u,I as d,y as C,t as c,c as k}from"./index-BSPqDg2b.js";import{D as T}from"./domain-settings-jCTqOxdl.js";import{f as O,e as R,b as F,A as q,d as M,c as U,g as $}from"./alert-dialog-Bjihy8X7.js";import{S as H}from"./switch-DpD3lo_J.js";import{a as G,b as J,c as K,d as Q}from"./use-org-sso-BlWFmoCA.js";import{s as V}from"./Trash01-DT07olaT.js";import{R as W}from"./require-capability-BFyuzPqV.js";import"./badge-DVaine1x.js";import"./select-DAagAjcm.js";import"./index-BdQq_4o_.js";import"./index-XCP5r1I_.js";import"./ChevronUp-DWUYL4oz.js";import"./access-gate-DyUtzmE9.js";import"./capability-load-error-DvFhO1Pk.js";function X(){const s=B(),{org:o}=L(),{data:h,isLoading:I}=G(o.id,o.slug),f=J(o.id,o.slug),S=K(o.id,o.slug),y=Q(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[g,p]=v.useState(!1),[P,j]=v.useState(!1),m=h?.configured&&h.config,n=h?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await f.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},A=async t=>{try{await y.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(z,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx(T,{}),I?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!g&&e.jsx(b,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:A,disabled:y.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(V,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||g)&&e.jsx(b,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(E,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(d,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(d,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:g&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(d,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(d,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(d,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(d,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[g&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:f.isPending,size:"sm",children:f.isPending?s("settings.orgSso.savingButton"):s(g?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(O,{open:P,onOpenChange:j,children:e.jsxs(R,{children:[e.jsx(F,{children:e.jsx(q,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(M,{children:[e.jsx(U,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx($,{onClick:w,disabled:S.isPending,variant:"destructive",children:s("settings.orgSso.removeButton")})]})]})})]})}function me(){const s=k.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(W,{capability:"org:manage",area:"security",children:e.jsx(X,{})}),s[0]=o):o=s[0],o}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ee,j as s,g7 as he,b as pe,r as oe,B as Z,ey as fe,az as ge,l as xe,ez as je,t as re,b2 as Re,v as Se,aN as ve,s as be,I as De,w as Ce,q as _e,D as Pe}from"./index-BSPqDg2b.js";import{s as ue}from"./Plus-D3sv1Vc5.js";import{E as Ae}from"./empty-state-W9_vBymb.js";import{A as ke,a as Ne,b as ze,c as Ee,g as Ie,d as Oe,e as we,f as Te}from"./alert-dialog-Bjihy8X7.js";import{u as $e,a as Fe,R as qe}from"./repository-picker-C8ArkEMp.js";import{u as Be,b as Ge,c as He}from"./use-org-repo-syncs-C29Ouwht.js";import{e as Le}from"./format-time-Cq80KKvY.js";import{R as Ve}from"./require-capability-BFyuzPqV.js";import"./ArrowLeft-D94SnK45.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./label-CG_DMVpg.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";import"./collection-search-C3Qx3Y9p.js";import"./SearchMd-DzFzOALq.js";import"./ShoppingBag01-B1nTczbE.js";import"./avatar-C5-kxiV_.js";import"./User01-BqHvPhUP.js";import"./use-debounced-value-CNkh6EY5.js";import"./use-organization-settings-XPH6XBPi.js";import"./schema-D5kxh02n.js";import"./task-board-M_bY8eys.js";import"./differenceInSeconds-C3x8sHUj.js";import"./access-gate-DyUtzmE9.js";import"./capability-load-error-DvFhO1Pk.js";function Je(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Ke(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:Le(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Me(e){const t=ee.c(30),{config:n,onRemove:i}=e,c=pe(),m=Ke(n,c),d=$e();let r;t[0]!==n.repositoryId||t[1]!==d.data?(r=d.data?.find(D=>D.id===n.repositoryId),t[0]=n.repositoryId,t[1]=d.data,t[2]=r):r=t[2];const a=r,l=je;let p;t[3]!==a?(p=a?s.jsx(Fe,{provider:a.provider,size:16}):s.jsx(ge,{size:16}),t[3]=a,t[4]=p):p=t[4];const j=a?.path??`${n.repoOwner}/${n.repoName}`;let R;t[5]!==j?(R=s.jsx("span",{className:"truncate",children:j}),t[5]=j,t[6]=R):R=t[6];let g;t[7]!==n.ref?(g=s.jsxs("span",{className:"text-xs font-normal text-muted-foreground shrink-0",children:["@",n.ref]}),t[7]=n.ref,t[8]=g):g=t[8];let S;t[9]!==R||t[10]!==g?(S=s.jsxs("span",{className:"flex items-center gap-2",children:[R,g]}),t[9]=R,t[10]=g,t[11]=S):S=t[11];const b=xe(m.error&&"text-destructive");let v;t[12]!==n.volume||t[13]!==c?(v=c("settings.syncedRepos.rowSubtitle",{volume:n.volume}),t[12]=n.volume,t[13]=c,t[14]=v):v=t[14];let u;t[15]!==m.label||t[16]!==b||t[17]!==v?(u=s.jsxs("span",{className:b,children:[v," ·"," ",m.label]}),t[15]=m.label,t[16]=b,t[17]=v,t[18]=u):u=t[18];let y;t[19]!==c?(y=c("settings.syncedRepos.remove"),t[19]=c,t[20]=y):y=t[20];let f;t[21]!==i||t[22]!==y?(f=s.jsx(Z,{variant:"outline",size:"sm",onClick:i,children:y}),t[21]=i,t[22]=y,t[23]=f):f=t[23];let h;return t[24]!==l||t[25]!==f||t[26]!==p||t[27]!==S||t[28]!==u?(h=s.jsx(l,{icon:p,title:S,description:u,action:f}),t[24]=l,t[25]=f,t[26]=p,t[27]=S,t[28]=u,t[29]=h):h=t[29],h}function Qe(e){const t=ee.c(15),{onAdd:n}=e,i=pe();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ge,{}),t[0]=c):c=t[0];let m;t[1]!==i?(m=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=m):m=t[2];let d;t[3]!==i?(d=i("settings.syncedRepos.emptyDescription"),t[3]=i,t[4]=d):d=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ue,{size:14}),t[5]=r):r=t[5];let a;t[6]!==i?(a=i("settings.syncedRepos.addRepo"),t[6]=i,t[7]=a):a=t[7];let l;t[8]!==n||t[9]!==a?(l=s.jsxs(Z,{onClick:n,size:"sm",children:[r,a]}),t[8]=n,t[9]=a,t[10]=l):l=t[10];let p;return t[11]!==m||t[12]!==d||t[13]!==l?(p=s.jsx(fe,{children:s.jsx(Ae,{size:"inline",icon:c,title:m,description:d,children:l})}),t[11]=m,t[12]=d,t[13]=l,t[14]=p):p=t[14],p}function Ue(){const e=ee.c(102),t=pe(),n=Be(),i=Ge(),c=He(),[m,d]=oe.useState(!1),[r,a]=oe.useState(null),[l,p]=oe.useState(""),[j,R]=oe.useState(null);let g;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==l?(g=function(){!r||!l.trim()||i.mutate({repositoryId:r.id,volume:l.trim()},{onSuccess:x=>{a(null),re.success(t("settings.syncedRepos.created",{volume:x.volume}))},onError:x=>{re.error(x instanceof Error?x.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==j||e[6]!==c||e[7]!==t?(b=function(){j&&c.mutate(j.id,{onSuccess:()=>re.success(t("settings.syncedRepos.removed")),onError:x=>re.error(x instanceof Error?x.message:t("settings.syncedRepos.failed")),onSettled:()=>R(null)})},e[5]=j,e[6]=c,e[7]=t,e[8]=b):b=e[8];const v=b;if(n.isPending){let o;return e[9]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{className:"h-32 w-full"}),e[9]=o):o=e[9],o}let u;e[10]!==n.data?(u=n.data??[],e[10]=n.data,e[11]=u):u=e[11];const y=u;let f;e[12]!==y||e[13]!==t?(f=y.length===0?s.jsx(Qe,{onAdd:()=>d(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(Z,{onClick:()=>d(!0),size:"sm",children:[s.jsx(ue,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx(fe,{children:y.map(o=>s.jsx(Me,{config:o,onRemove:()=>R(o)},o.id))})]}),e[12]=y,e[13]=t,e[14]=f):f=e[14];let h;e[15]!==t?(h=t("settings.syncedRepos.pickerTitle"),e[15]=t,e[16]=h):h=e[16];let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=o=>{const{repository:x}=o;d(!1),a(x),p(Je(x.path.split("/").at(-1)??x.path))},e[17]=D):D=e[17];let C;e[18]!==m||e[19]!==h?(C=s.jsx(qe,{open:m,onOpenChange:d,title:h,onPicked:D}),e[18]=m,e[19]=h,e[20]=C):C=e[20];const ae=r!==null;let te;e[21]===Symbol.for("react.memo_cache_sentinel")?(te=o=>{o||a(null)},e[21]=te):te=e[21];let _;e[22]!==t?(_=t("settings.syncedRepos.nameDialogTitle"),e[22]=t,e[23]=_):_=e[23];let P;e[24]!==_?(P=s.jsx(Se,{children:_}),e[24]=_,e[25]=P):P=e[25];const ce=r?r.path:"";let A;e[26]!==t||e[27]!==ce?(A=t("settings.syncedRepos.nameDialogDescription",{repo:ce}),e[26]=t,e[27]=ce,e[28]=A):A=e[28];let k;e[29]!==A?(k=s.jsx(ve,{children:A}),e[29]=A,e[30]=k):k=e[30];let N;e[31]!==P||e[32]!==k?(N=s.jsxs(be,{children:[P,k]}),e[31]=P,e[32]=k,e[33]=N):N=e[33];let se;e[34]===Symbol.for("react.memo_cache_sentinel")?(se=o=>p(o.target.value),e[34]=se):se=e[34];let z;e[35]!==t?(z=t("settings.syncedRepos.namePlaceholder"),e[35]=t,e[36]=z):z=e[36];let E;e[37]!==z||e[38]!==l?(E=s.jsx(De,{value:l,onChange:se,placeholder:z,autoFocus:!0}),e[37]=z,e[38]=l,e[39]=E):E=e[39];let ie;e[40]===Symbol.for("react.memo_cache_sentinel")?(ie=()=>a(null),e[40]=ie):ie=e[40];const ye=i.isPending;let I;e[41]!==t?(I=t("settings.syncedRepos.cancel"),e[41]=t,e[42]=I):I=e[42];let O;e[43]!==i.isPending||e[44]!==I?(O=s.jsx(Z,{variant:"outline",onClick:ie,disabled:ye,children:I}),e[43]=i.isPending,e[44]=I,e[45]=O):O=e[45];let w;e[46]!==i.isPending||e[47]!==l?(w=!l.trim()||i.isPending,e[46]=i.isPending,e[47]=l,e[48]=w):w=e[48];let T;e[49]!==i.isPending||e[50]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[49]=i.isPending,e[50]=t,e[51]=T):T=e[51];let $;e[52]!==S||e[53]!==w||e[54]!==T?($=s.jsx(Z,{disabled:w,onClick:S,children:T}),e[52]=S,e[53]=w,e[54]=T,e[55]=$):$=e[55];let F;e[56]!==O||e[57]!==$?(F=s.jsxs(Ce,{children:[O,$]}),e[56]=O,e[57]=$,e[58]=F):F=e[58];let q;e[59]!==N||e[60]!==E||e[61]!==F?(q=s.jsxs(_e,{className:"sm:max-w-sm",children:[N,E,F]}),e[59]=N,e[60]=E,e[61]=F,e[62]=q):q=e[62];let B;e[63]!==q||e[64]!==ae?(B=s.jsx(Pe,{open:ae,onOpenChange:te,children:q}),e[63]=q,e[64]=ae,e[65]=B):B=e[65];const me=j!==null;let ne;e[66]===Symbol.for("react.memo_cache_sentinel")?(ne=o=>{o||R(null)},e[66]=ne):ne=e[66];const de=j?.volume??"";let G;e[67]!==t||e[68]!==de?(G=t("settings.syncedRepos.removeTitle",{volume:de}),e[67]=t,e[68]=de,e[69]=G):G=e[69];let H;e[70]!==G?(H=s.jsx(ke,{children:G}),e[70]=G,e[71]=H):H=e[71];let L;e[72]!==t?(L=t("settings.syncedRepos.removeDescription"),e[72]=t,e[73]=L):L=e[73];let V;e[74]!==L?(V=s.jsx(Ne,{children:L}),e[74]=L,e[75]=V):V=e[75];let J;e[76]!==H||e[77]!==V?(J=s.jsxs(ze,{children:[H,V]}),e[76]=H,e[77]=V,e[78]=J):J=e[78];let K;e[79]!==t?(K=t("settings.syncedRepos.cancel"),e[79]=t,e[80]=K):K=e[80];let M;e[81]!==K?(M=s.jsx(Ee,{children:K}),e[81]=K,e[82]=M):M=e[82];let Q;e[83]!==t?(Q=t("settings.syncedRepos.remove"),e[83]=t,e[84]=Q):Q=e[84];let U;e[85]!==v||e[86]!==Q?(U=s.jsx(Ie,{onClick:v,children:Q}),e[85]=v,e[86]=Q,e[87]=U):U=e[87];let W;e[88]!==M||e[89]!==U?(W=s.jsxs(Oe,{children:[M,U]}),e[88]=M,e[89]=U,e[90]=W):W=e[90];let X;e[91]!==J||e[92]!==W?(X=s.jsxs(we,{children:[J,W]}),e[91]=J,e[92]=W,e[93]=X):X=e[93];let Y;e[94]!==me||e[95]!==X?(Y=s.jsx(Te,{open:me,onOpenChange:ne,children:X}),e[94]=me,e[95]=X,e[96]=Y):Y=e[96];let le;return e[97]!==B||e[98]!==f||e[99]!==Y||e[100]!==C?(le=s.jsxs(s.Fragment,{children:[f,C,B,Y]}),e[97]=B,e[98]=f,e[99]=Y,e[100]=C,e[101]=le):le=e[101],le}function We(){const e=ee.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(he,{group:"storage",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}function bt(){const e=ee.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ve,{capability:"file-configs:manage",area:"files",children:s.jsx(We,{})}),e[0]=t):t=e[0],t}export{bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as m,l as x}from"./index-BSPqDg2b.js";import{A}from"./avatar-C5-kxiV_.js";import{S as g}from"./daily-pulse-BqDvmnPn.js";import"./core.esm-BRS9Ks9b.js";import{S as E}from"./task-board-M_bY8eys.js";function I(u){const s=f.c(10),{assigneeId:i,assignee:t,size:p,title:a,className:o}=u,c=p===void 0?20:p;if(!i)return null;let r;s[0]!==t||s[1]!==i||s[2]!==c?(r=i===E?m.jsx(g,{size:c}):t?m.jsx(A,{url:t.user?.image??void 0,fallback:t.user?.name??"?",shape:"circle",size:"xs"}):null,s[0]=t,s[1]=i,s[2]=c,s[3]=r):r=s[3];const n=r;if(!n)return null;let e;s[4]!==o?(e=x("inline-flex shrink-0",o),s[4]=o,s[5]=e):e=s[5];let l;return s[6]!==n||s[7]!==e||s[8]!==a?(l=m.jsx("span",{className:e,title:a,children:n}),s[6]=n,s[7]=e,s[8]=a,s[9]=l):l=s[9],l}export{I as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,b as G,r as B,j as s,n as Q,l as J,f as X}from"./index-BSPqDg2b.js";import{C as Z}from"./index-CDrRsU-I.js";import{C as ee}from"./collection-tabs-D5iCdwPv.js";import{A as M,a as te,b as se,u as ie}from"./use-task-board-analytics-CzI79mN4.js";import{T as ae,e as W}from"./time-range-picker-C3BbzoOH.js";import{S as oe,d as re,c as le,a as ne,b as me}from"./sheet-BHsKOUfF.js";import{S as ce,s as pe,D as de}from"./analytics-sections-B_qn34eY.js";import{f as fe}from"./task-route-Cz8IMljw.js";import{C as ge}from"./combobox-PWtcP6b2.js";import"./use-mobile-19frZVl2.js";import"./use-sidebar-collapsed-8USbBI0-.js";import"./use-chat-layout-state-P4eOAh0Q.js";import"./thread-route-BLXCdzrT.js";import"./use-panel-navigate-BKTq-N_H.js";import"./use-project-scope-hi480z1p.js";import"./repository-binding-BPraGDH6.js";import"./use-mcp-client-BYbk6jXo.js";import"./auth--QyNLTbP.js";import"./thread-intent-DSZI851P.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DYaS1vyu.js";import"./task-board-M_bY8eys.js";import"./schema-D5kxh02n.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-B_vqhfDt.js";import"./AlertCircle-DuL_FFHx.js";import"./Tool01-Bhj-QHDu.js";import"./ArrowUp-Dn7IgtbA.js";import"./ArrowLeft-D94SnK45.js";import"./LinkBroken01-edPm2SIJ.js";import"./ShoppingBag01-B1nTczbE.js";import"./ZoomOut-DH4NDKgS.js";import"./Building02-BmRvdezs.js";import"./CheckCircle-BCzuQhZn.js";import"./ChevronUp-DWUYL4oz.js";import"./ChevronSelectorVertical-CxqUMZg6.js";import"./UserSquare-zP4-JvXz.js";import"./Copy01-B5Qm_DvO.js";import"./CreditCard01-8EhoJBRm.js";import"./DotsVertical-BmVaGWAg.js";import"./Image01-KdUybmWt.js";import"./Globe04-KfEeo3Pn.js";import"./SwitchHorizontal01-DQQsmdwN.js";import"./Key01-6z52NoNj.js";import"./Link01-oKshySD_.js";import"./Minus-BvqQFZHP.js";import"./Monitor01-DZmeiH6p.js";import"./Sun-D5qn9wPg.js";import"./Play-3WH9Ikap.js";import"./Plus-D3sv1Vc5.js";import"./SearchMd-DzFzOALq.js";import"./Trash01-DT07olaT.js";import"./Upload01-BocTk920.js";import"./User01-BqHvPhUP.js";import"./Users01-DfLHZjoX.js";import"./XClose-1FEelrZ4.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./toolbar-icon-button-7gQeG_XH.js";import"./shell-layout-CnFOD7IR.js";import"./avatar-C5-kxiV_.js";import"./use-clock-tick-DKd3Khi0.js";import"./command-Dqne3j1N.js";import"./index-WWkbzoL4.js";import"./integration-icon-BwzO3Wq9.js";import"./project-icon-BqAOVSaG.js";import"./new-project-dialog-B9qWs4Pr.js";import"./label-CG_DMVpg.js";import"./repository-import-picker-B0yxPI2j.js";import"./use-navigate-to-agent-Bh4JZJoL.js";import"./repository-picker-C8ArkEMp.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";import"./collection-search-C3Qx3Y9p.js";import"./use-debounced-value-CNkh6EY5.js";import"./use-organization-settings-XPH6XBPi.js";import"./required-auth-layout--9OrAOrr.js";import"./autosend-CUttN5XY.js";import"./use-org-sso-BlWFmoCA.js";import"./resizable-BqY6-uYR.js";import"./badge-DVaine1x.js";import"./popover-Cdz7pgAQ.js";import"./scroll-area-DvfamsPF.js";import"./index-BdQq_4o_.js";import"./calendar-CpwMOIuL.js";import"./chart-DMJIFNic.js";import"./index-DqOQgVM6.js";import"./symbol-Hd-wRYbC.js";import"./CategoricalChart-C1fCYXI1.js";import"./table-Cc4crfQ0.js";import"./toggle-group-6nw88m-B.js";import"./active-indicator-CCMhAsc_.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./config-CJdQI2Ik.js";import"./core.esm-BRS9Ks9b.js";import"./BarChart-cNHCiDCi.js";import"./tooltipContext-Db2Lu1qi.js";import"./ActiveShapeUtils-BiggFcjT.js";import"./Sector-DlWxPN8J.js";import"./ErrorBarContext-7FUCCj8N.js";import"./CartesianChart-iNB7Klro.js";import"./AreaChart-CwzHmgIC.js";import"./task-key-BCHdFiOO.js";const ue={TASK_BOARD_OPERATION:"taskBoard.analytics.tabOperation",TASK_BOARD_REWORK:"taskBoard.analytics.tabRework",TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_SPRINTS:"taskBoard.analytics.tabSprints",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function F(t){const e=new Date;return{from:(W(t.from).date??e).toISOString(),to:(W(t.to).date??e).toISOString()}}function z(t){const e=q.c(6),{className:p}=t;let l;e[0]!==p?(l=J("surface flex flex-col gap-6 p-4",p),e[0]=p,e[1]=l):l=e[1];let a,d;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]}),d=s.jsx("div",{className:"h-[140px] w-full animate-pulse rounded bg-muted/60"}),e[2]=a,e[3]=d):(a=e[2],d=e[3]);let n;return e[4]!==l?(n=s.jsxs("div",{className:l,children:[a,d]}),e[4]=l,e[5]=n):n=e[5],n}function xe(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[0,1,2,3].map(he)}),t[0]=e):e=t[0];let p;return t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col gap-4","aria-busy":!0,children:[e,s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.jsx(z,{}),s.jsx(z,{})]}),s.jsx(z,{})]}),t[1]=p):p=t[1],p}function he(t){return s.jsxs("div",{className:"surface flex flex-col gap-1 p-4",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]},t)}function Se(t){const e=q.c(27),{target:p,open:l,onOpenChange:a,params:d,taskHref:n}=t,j=G(),{data:o,isLoading:i,error:y}=se(d,l?p?.drill??null:null);let u;e[0]!==o?.sections?(u=o?.sections.find(ke),e[0]=o?.sections,e[1]=u):u=e[1];const m=u,T=m?.rows.length??0,b=p?.label;let x;e[2]!==b?(x=s.jsx(oe,{children:b}),e[2]=b,e[3]=x):x=e[3];let h;e[4]!==T||e[5]!==j||e[6]!==m?(h=m?j(T===1?"taskBoard.analytics.drillCountOne":"taskBoard.analytics.drillCount",{n:String(T)}):" ",e[4]=T,e[5]=j,e[6]=m,e[7]=h):h=e[7];let f;e[8]!==h?(f=s.jsx(re,{children:h}),e[8]=h,e[9]=f):f=e[9];let g;e[10]!==x||e[11]!==f?(g=s.jsxs(le,{children:[x,f]}),e[10]=x,e[11]=f,e[12]=g):g=e[12];let k;e[13]!==y||e[14]!==i||e[15]!==n||e[16]!==m?(k=i?s.jsx("div",{className:"flex flex-col gap-2 p-2","aria-busy":!0,children:[0,1,2,3,4].map(be)}):y?s.jsx("p",{className:"p-2 text-sm text-destructive",children:y.message}):m?.kind==="table"&&s.jsx(de,{section:m,taskHref:n}),e[13]=y,e[14]=i,e[15]=n,e[16]=m,e[17]=k):k=e[17];let r;e[18]!==k?(r=s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:k}),e[18]=k,e[19]=r):r=e[19];let c;e[20]!==g||e[21]!==r?(c=s.jsxs(ne,{side:"right",size:"lg",children:[g,r]}),e[20]=g,e[21]=r,e[22]=c):c=e[22];let S;return e[23]!==a||e[24]!==l||e[25]!==c?(S=s.jsx(me,{open:l,onOpenChange:a,children:c}),e[23]=a,e[24]=l,e[25]=c,e[26]=S):S=e[26],S}function be(t){return s.jsx("div",{className:"h-11 animate-pulse rounded bg-muted"},t)}function ke(t){return t.kind==="table"}function je(t){const e=q.c(26),{tool:p,org:l,project:a,range:d,taskHref:n}=t;let j;e[0]!==l||e[1]!==a||e[2]!==d?(j={org:l,project:a,...d},e[0]=l,e[1]=a,e[2]=d,e[3]=j):j=e[3];const o=j,{data:i,isPending:y,error:u}=te(p,o),[m,T]=B.useState(null),[b,x]=B.useState(!1);if(u){let r;return e[4]!==u.message?(r=s.jsx("div",{className:"surface p-8 text-center text-sm text-destructive",children:u.message}),e[4]=u.message,e[5]=r):r=e[5],r}if(y||!i){let r;return e[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(xe,{}),e[6]=r):r=e[6],r}let h;if(e[7]!==i.range||e[8]!==i.sections||e[9]!==l||e[10]!==n){let r;e[12]!==i.range||e[13]!==l||e[14]!==n?(r=c=>s.jsx("div",{className:J("min-w-0",pe(c)==="full"&&"md:col-span-2",c.kind==="table"&&"mt-6"),children:s.jsx(ce,{section:c,threadLinks:!0,showOrg:l==="all",taskHref:n,range:i.range,onDrill:S=>{T(S),x(!0)}})},c.title),e[12]=i.range,e[13]=l,e[14]=n,e[15]=r):r=e[15],h=i.sections.map(r),e[7]=i.range,e[8]=i.sections,e[9]=l,e[10]=n,e[11]=h}else h=e[11];let f;e[16]!==h?(f=s.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:h}),e[16]=h,e[17]=f):f=e[17];let g;e[18]!==m||e[19]!==b||e[20]!==o||e[21]!==n?(g=s.jsx(Se,{target:m,open:b,onOpenChange:x,params:o,taskHref:n}),e[18]=m,e[19]=b,e[20]=o,e[21]=n,e[22]=g):g=e[22];let k;return e[23]!==f||e[24]!==g?(k=s.jsxs("div",{className:"flex flex-col gap-4",children:[f,g]}),e[23]=f,e[24]=g,e[25]=k):k=e[25],k}function Te(t){const e=q.c(64),{org:p,project:l,taskHref:a,actions:d,notice:n,showTenants:j}=t,o=G(),[i,y]=B.useState("TASK_BOARD_OPERATION");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"now-30d",to:"now"},e[0]=u):u=e[0];const[m,T]=B.useState(u);let b;e[1]!==m?(b=()=>F(m),e[1]=m,e[2]=b):b=e[2];const[x,h]=B.useState(b);let f;if(e[3]!==j||e[4]!==o){let R;e[6]!==j?(R=Y=>Y!=="TASK_BOARD_TENANTS"||j,e[6]=j,e[7]=R):R=e[7];let O;e[8]!==o?(O=Y=>({id:Y,label:o(ue[Y])}),e[8]=o,e[9]=O):O=e[9],f=M.filter(R).map(O),e[3]=j,e[4]=o,e[5]=f}else f=e[5];const g=f;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=R=>{T(R),h(F(R))},e[10]=k):k=e[10];let r;e[11]!==o?(r=o("monitoring.timeRangePicker.absoluteTimeRange"),e[11]=o,e[12]=r):r=e[12];let c;e[13]!==o?(c=o("monitoring.timeRangePicker.from"),e[13]=o,e[14]=c):c=e[14];let S;e[15]!==o?(S=o("monitoring.timeRangePicker.to"),e[15]=o,e[16]=S):S=e[16];let _;e[17]!==o?(_=o("monitoring.timeRangePicker.applyTimeRange"),e[17]=o,e[18]=_):_=e[18];let v;e[19]!==r||e[20]!==c||e[21]!==S||e[22]!==_?(v={absoluteTimeRange:r,from:c,to:S,applyTimeRange:_},e[19]=r,e[20]=c,e[21]=S,e[22]=_,e[23]=v):v=e[23];let A;e[24]!==o?(A=o("monitoring.timeRangePicker.last7Days"),e[24]=o,e[25]=A):A=e[25];let N;e[26]!==A?(N={label:A,from:"now-7d",to:"now",value:"7d"},e[26]=A,e[27]=N):N=e[27];let w;e[28]!==o?(w=o("monitoring.timeRangePicker.last30Days"),e[28]=o,e[29]=w):w=e[29];let D;e[30]!==w?(D={label:w,from:"now-30d",to:"now",value:"30d"},e[30]=w,e[31]=D):D=e[31];let C;e[32]!==o?(C=o("monitoring.timeRangePicker.last90Days"),e[32]=o,e[33]=C):C=e[33];let P;e[34]!==C?(P={label:C,from:"now-90d",to:"now",value:"90d"},e[34]=C,e[35]=P):P=e[35];let E;e[36]!==N||e[37]!==D||e[38]!==P?(E=[N,D,P],e[36]=N,e[37]=D,e[38]=P,e[39]=E):E=e[39];let K;e[40]!==m||e[41]!==E||e[42]!==v?(K=s.jsx(ae,{value:m,onChange:k,labels:v,quickRanges:E}),e[40]=m,e[41]=E,e[42]=v,e[43]=K):K=e[43];let L;e[44]!==d||e[45]!==K?(L=s.jsxs(Q.Actions,{children:[d,K]}),e[44]=d,e[45]=K,e[46]=L):L=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=R=>{const O=M.find(Y=>Y===R);O&&y(O)},e[47]=U):U=e[47];let $;e[48]!==i||e[49]!==g?($=s.jsx(ee,{placement:"page",tabs:g,activeTab:i,onTabChange:U}),e[48]=i,e[49]=g,e[50]=$):$=e[50];let I;e[51]!==p||e[52]!==l||e[53]!==x||e[54]!==i||e[55]!==a?(I=s.jsx(je,{tool:i,org:p,project:l,range:x,taskHref:a},i),e[51]=p,e[52]=l,e[53]=x,e[54]=i,e[55]=a,e[56]=I):I=e[56];let H;e[57]!==n||e[58]!==I?(H=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1200px] flex-col gap-4 px-4 pt-6 pb-10 md:px-10",children:[n,I]}),e[57]=n,e[58]=I,e[59]=H):H=e[59];let V;return e[60]!==L||e[61]!==$||e[62]!==H?(V=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:[L,$,H]}),e[60]=L,e[61]=$,e[62]=H,e[63]=V):V=e[63],V}function js(){const t=q.c(37),e=G();let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={strict:!1},t[0]=p):p=t[0];const l=X(p),a=l.org??"",d=l.agentId,n=ie(),[j,o]=B.useState(a),[i,y]=B.useState(a);a!==j&&(o(a),y(a));const u=!d&&(n.data?.isTaskBoardAdmin??!1);let m;t[1]!==e?(m=e("taskBoard.analytics.orgCurrent"),t[1]=e,t[2]=m):m=t[2];let T;t[3]!==a||t[4]!==m?(T={value:a,label:m},t[3]=a,t[4]=m,t[5]=T):T=t[5];let b;t[6]!==e?(b=e("taskBoard.analytics.orgAll"),t[6]=e,t[7]=b):b=t[7];let x;t[8]!==b?(x={value:"all",label:b},t[8]=b,t[9]=x):x=t[9];let h;if(t[10]!==n.data?.orgs||t[11]!==a||t[12]!==T||t[13]!==x){let v;t[15]!==a?(v=A=>A.slug!==a,t[15]=a,t[16]=v):v=t[16],h=[T,x,...(n.data?.orgs??[]).filter(v).map(ve)],t[10]=n.data?.orgs,t[11]=a,t[12]=T,t[13]=x,t[14]=h}else h=t[14];const f=h;let g;t[17]!==i||t[18]!==a||t[19]!==d?(g=v=>fe(a,{id:v,keySeq:null},d)+(i===a?"":`?boardOrg=${encodeURIComponent(i)}`),t[17]=i,t[18]=a,t[19]=d,t[20]=g):g=t[20];const r=i==="all"?void 0:g;let c;t[21]!==u||t[22]!==i||t[23]!==f||t[24]!==e?(c=u&&s.jsx(ge,{options:f,value:i,onChange:y,width:"w-[220px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[21]=u,t[22]=i,t[23]=f,t[24]=e,t[25]=c):c=t[25];let S;t[26]!==i||t[27]!==a||t[28]!==e?(S=i!==a&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[26]=i,t[27]=a,t[28]=e,t[29]=S):S=t[29];let _;return t[30]!==u||t[31]!==i||t[32]!==d||t[33]!==r||t[34]!==c||t[35]!==S?(_=s.jsx(Z.Content,{children:s.jsx(Te,{org:i,project:d,taskHref:r,showTenants:u,actions:c,notice:S},i)}),t[30]=u,t[31]=i,t[32]=d,t[33]=r,t[34]=c,t[35]=S,t[36]=_):_=t[36],_}function ve(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}export{js as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{c as L,b as E,r as U,j as i,b2 as re,B as V,t as J,ey as ne,ez as H,ex as fe,n as ie,fN as Re,a2 as oe,d as Ae,fz as ue,L as ge,I as le,z as xe,af as pe,l as $e}from"./index-BSPqDg2b.js";import{C as Te}from"./checkbox-aTYJ3HOV.js";import{T as je}from"./textarea--yDYOLyf.js";import{i as Le}from"./ChevronSelectorVertical-CxqUMZg6.js";import{i as ze}from"./Play-3WH9Ikap.js";import{s as Ee}from"./Plus-D3sv1Vc5.js";import{C as Ke}from"./combobox-PWtcP6b2.js";import{M as De}from"./multi-select-DYiX5KEM.js";import{d as he,c as be,b as Se,a as ye,S as ve}from"./select-DAagAjcm.js";import{S as Ne}from"./switch-DpD3lo_J.js";import{A as Fe,a as Ue,b as Be,c as Je,g as Me,d as Oe,e as Ve,f as He}from"./alert-dialog-Bjihy8X7.js";import{J as We,a as Ze,u as qe,b as ke,c as Ye,d as ce,e as Ge,f as de,g as Xe}from"./jira-icon-g2GVH5bw.js";import{R as Qe,A as et}from"./review-settings-CdVHPED2.js";import{u as tt}from"./use-debounced-value-CNkh6EY5.js";import{u as Ce,a as st}from"./use-automations-CAga8LHD.js";import{h as it}from"./task-board-M_bY8eys.js";import{b as nt,c as lt,S as at}from"./column-rules-UU8JLygo.js";import{R as rt}from"./require-capability-BFyuzPqV.js";import"./Minus-BvqQFZHP.js";import"./command-Dqne3j1N.js";import"./index-WWkbzoL4.js";import"./SearchMd-DzFzOALq.js";import"./popover-Cdz7pgAQ.js";import"./badge-DVaine1x.js";import"./ChevronUp-DWUYL4oz.js";import"./index-BdQq_4o_.js";import"./index-XCP5r1I_.js";import"./UserSquare-zP4-JvXz.js";import"./use-organization-settings-XPH6XBPi.js";import"./schema-D5kxh02n.js";import"./use-connection-CjozY_rG.js";import"./use-mcp-client-BYbk6jXo.js";import"./auth--QyNLTbP.js";import"./XClose-1FEelrZ4.js";import"./icon-button-uPrtYnSE.js";import"./tooltip-rhtdmPcj.js";import"./sheet-BHsKOUfF.js";import"./use-org-fs-BFFpcHJy.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";import"./watch-sse-pool-DYaS1vyu.js";import"./backoff-CrEUbyZT.js";import"./access-gate-DyUtzmE9.js";import"./capability-load-error-DvFhO1Pk.js";const ot=/^([A-Za-z][A-Za-z0-9_]*-\d+)$/;function ct(t){const e=t.trim();if(e==="")return null;const s=/(?:\/(?:browse|issues)\/|[?&]selectedIssue=)([A-Za-z][A-Za-z0-9_]*-\d+)/.exec(e)?.[1]??e.split(/[?#]/)[0]??"",l=ot.exec(s);return l?.[1]?l[1].toUpperCase():null}function we(t){const e=[],a=[],s=new Set;for(const l of t.split(/[\n,;]+/)){const n=l.trim();if(n==="")continue;const c=ct(n);if(!c){a.push(n);continue}s.has(c)||(s.add(c),e.push(c))}return{keys:e,invalid:a}}function _e(t){const e=t.projectName?.replace(/\s+/g," ").trim(),a=t.name.trim();return e?{primary:e,secondary:[a,t.projectKey].filter(Boolean).join(" · ")}:{primary:a,secondary:t.projectKey??""}}function dt(t){const{primary:e,secondary:a}=_e(t);return[e,a,`#${t.id}`].filter(Boolean).join(" ")}function me(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}function mt(t,e){const a=me(e).trim();if(!a)return 1;const s=me(t);return a.split(/\s+/).every(l=>s.includes(l))?1:0}function ft(){const t=L.c(17),e=E(),{data:a,isPending:s}=nt(),l=lt(),n=a?.find(ut),c=n?.prompt??"",o=n?.skills??[],[u,m]=U.useState({prompt:c,skills:o}),[f,r]=U.useState(n);f!==n&&(r(n),m({prompt:c,skills:o}));const d=u.prompt!==c||u.skills.join(`
|
|
2
|
-
`)!==o.join(`
|
|
3
|
-
`);let g;t[0]!==e?(g=e("settings.taskPrompt.title"),t[0]=e,t[1]=g):g=t[1];let j;t[2]!==e?(j=e("settings.taskPrompt.fieldLabel"),t[2]=e,t[3]=j):j=t[3];let x;t[4]!==d||t[5]!==u||t[6]!==s||t[7]!==l||t[8]!==m||t[9]!==e?(x=s?i.jsx(re,{className:"h-44 w-full"}):i.jsxs("div",{className:"flex flex-col items-start gap-3",children:[i.jsx(je,{value:u.prompt,rows:10,maxLength:it,placeholder:e("settings.taskPrompt.placeholder"),onChange:h=>m({...u,prompt:h.target.value})}),i.jsxs("div",{className:"flex w-full flex-col gap-2",children:[i.jsx("span",{className:"text-sm font-medium text-foreground",children:e("settings.taskPrompt.skillsLabel")}),i.jsx(at,{value:u.skills,onChange:h=>m({...u,skills:h})})]}),i.jsx(V,{size:"sm",disabled:!d||l.isPending,onClick:()=>l.mutate({columnKey:null,rules:u},{onSuccess:()=>J.success(e("settings.taskPrompt.saved")),onError:()=>J.error(e("settings.taskPrompt.failed"))}),children:e("settings.taskPrompt.save")})]}),t[4]=d,t[5]=u,t[6]=s,t[7]=l,t[8]=m,t[9]=e,t[10]=x):x=t[10];let p;t[11]!==j||t[12]!==x?(p=i.jsx(ne,{children:i.jsx(H,{title:j,children:x})}),t[11]=j,t[12]=x,t[13]=p):p=t[13];let b;return t[14]!==g||t[15]!==p?(b=i.jsx(fe,{title:g,children:p}),t[14]=g,t[15]=p,t[16]=b):b=t[16],b}function ut(t){return t.columnKey===null}function Q(t,e){return t instanceof Error?t.message:e}const gt="https://id.atlassian.com/manage-profile/security/api-tokens";function xt(t){const e=L.c(7),{stepKeys:a}=t,s=E();let l;if(e[0]!==a||e[1]!==s){let c;e[3]!==s?(c=o=>i.jsx("li",{children:s(o)},o),e[3]=s,e[4]=c):c=e[4],l=a.map(c),e[0]=a,e[1]=s,e[2]=l}else l=e[2];let n;return e[5]!==l?(n=i.jsx("ol",{className:"list-decimal pl-5 flex flex-col gap-1 text-xs text-muted-foreground",children:l}),e[5]=l,e[6]=n):n=e[6],n}function pt(){const t=L.c(69),e=E(),a=ce(),[s,l]=U.useState(""),[n,c]=U.useState(""),[o,u]=U.useState("");let m;t[0]!==o||t[1]!==n||t[2]!==s?(m=s.trim()!==""&&n.trim()!==""&&o.trim()!=="",t[0]=o,t[1]=n,t[2]=s,t[3]=m):m=t[3];const f=m;let r;t[4]!==e?(r=e("settings.jira.siteLabel"),t[4]=e,t[5]=r):r=t[5];let d;t[6]!==r?(d=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:r}),t[6]=r,t[7]=d):d=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=F=>l(F.target.value),t[8]=g):g=t[8];let j;t[9]!==e?(j=e("settings.jira.sitePlaceholder"),t[9]=e,t[10]=j):j=t[10];let x;t[11]!==s||t[12]!==j?(x=i.jsx(le,{value:s,onChange:g,placeholder:j,autoComplete:"off"}),t[11]=s,t[12]=j,t[13]=x):x=t[13];let p;t[14]!==d||t[15]!==x?(p=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,x]}),t[14]=d,t[15]=x,t[16]=p):p=t[16];let b;t[17]!==e?(b=e("settings.jira.emailLabel"),t[17]=e,t[18]=b):b=t[18];let h;t[19]!==b?(h=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:b}),t[19]=b,t[20]=h):h=t[20];let S;t[21]===Symbol.for("react.memo_cache_sentinel")?(S=F=>c(F.target.value),t[21]=S):S=t[21];let v;t[22]!==e?(v=e("settings.jira.emailPlaceholder"),t[22]=e,t[23]=v):v=t[23];let N;t[24]!==n||t[25]!==v?(N=i.jsx(le,{value:n,onChange:S,placeholder:v,autoComplete:"off"}),t[24]=n,t[25]=v,t[26]=N):N=t[26];let k;t[27]!==N||t[28]!==h?(k=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,N]}),t[27]=N,t[28]=h,t[29]=k):k=t[29];let C;t[30]!==e?(C=e("settings.jira.tokenLabel"),t[30]=e,t[31]=C):C=t[31];let y;t[32]!==C?(y=i.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:C}),t[32]=C,t[33]=y):y=t[33];let w;t[34]!==e?(w=e("settings.jira.createTokenLink"),t[34]=e,t[35]=w):w=t[35];let _;t[36]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(xe,{size:12}),t[36]=_):_=t[36];let I;t[37]!==w?(I=i.jsxs("a",{href:gt,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-xs text-foreground hover:underline",children:[w,_]}),t[37]=w,t[38]=I):I=t[38];let R;t[39]!==y||t[40]!==I?(R=i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[y,I]}),t[39]=y,t[40]=I,t[41]=R):R=t[41];let K;t[42]===Symbol.for("react.memo_cache_sentinel")?(K=F=>u(F.target.value),t[42]=K):K=t[42];let A;t[43]!==e?(A=e("settings.jira.tokenPlaceholder"),t[43]=e,t[44]=A):A=t[44];let $;t[45]!==o||t[46]!==A?($=i.jsx(le,{type:"password",value:o,onChange:K,placeholder:A,autoComplete:"off"}),t[45]=o,t[46]=A,t[47]=$):$=t[47];let z;t[48]!==R||t[49]!==$?(z=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[R,$]}),t[48]=R,t[49]=$,t[50]=z):z=t[50];const D=!f||a.isPending;let T;t[51]!==o||t[52]!==n||t[53]!==s||t[54]!==e||t[55]!==a?(T=()=>a.mutate({siteUrl:s.trim(),email:n.trim(),apiToken:o.trim()},{onSuccess:()=>J.success(e("settings.jira.connected")),onError:F=>J.error(Q(F,e("settings.jira.connectFailed")))}),t[51]=o,t[52]=n,t[53]=s,t[54]=e,t[55]=a,t[56]=T):T=t[56];let P;t[57]!==e||t[58]!==a.isPending?(P=a.isPending?e("settings.jira.connecting"):e("settings.jira.connect"),t[57]=e,t[58]=a.isPending,t[59]=P):P=t[59];let B;t[60]!==D||t[61]!==T||t[62]!==P?(B=i.jsx(V,{size:"sm",className:"w-fit",disabled:D,onClick:T,children:P}),t[60]=D,t[61]=T,t[62]=P,t[63]=B):B=t[63];let M;return t[64]!==k||t[65]!==z||t[66]!==B||t[67]!==p?(M=i.jsxs("div",{className:"flex flex-col gap-4 mt-3 max-w-md",children:[p,k,z,B]}),t[64]=k,t[65]=z,t[66]=B,t[67]=p,t[68]=M):M=t[68],M}function jt(t){const e=L.c(44),{integration:a}=t,s=E(),l=Ge(),[n,c]=U.useState(!1),o=a.siteUrl,u=a.email;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>c(!0),e[0]=m):m=e[0];let f;e[1]!==s?(f=s("settings.jira.disconnect"),e[1]=s,e[2]=f):f=e[2];let r;e[3]!==f?(r=i.jsx(V,{variant:"outline",size:"sm",onClick:m,children:f}),e[3]=f,e[4]=r):r=e[4];let d;e[5]!==a.email||e[6]!==a.siteUrl||e[7]!==r?(d=i.jsx(H,{title:o,description:u,action:r}),e[5]=a.email,e[6]=a.siteUrl,e[7]=r,e[8]=d):d=e[8];let g;e[9]!==s?(g=s("settings.jira.disconnectTitle"),e[9]=s,e[10]=g):g=e[10];let j;e[11]!==g?(j=i.jsx(Fe,{children:g}),e[11]=g,e[12]=j):j=e[12];let x;e[13]!==s?(x=s("settings.jira.disconnectDescription"),e[13]=s,e[14]=x):x=e[14];let p;e[15]!==x?(p=i.jsx(Ue,{children:x}),e[15]=x,e[16]=p):p=e[16];let b;e[17]!==p||e[18]!==j?(b=i.jsxs(Be,{children:[j,p]}),e[17]=p,e[18]=j,e[19]=b):b=e[19];let h;e[20]!==s?(h=s("settings.jira.cancel"),e[20]=s,e[21]=h):h=e[21];let S;e[22]!==h?(S=i.jsx(Je,{children:h}),e[22]=h,e[23]=S):S=e[23];let v;e[24]!==l||e[25]!==s?(v=()=>l.mutate(void 0,{onSuccess:()=>J.success(s("settings.jira.disconnected")),onError:I=>J.error(Q(I,s("settings.jira.saveFailed")))}),e[24]=l,e[25]=s,e[26]=v):v=e[26];let N;e[27]!==s?(N=s("settings.jira.disconnect"),e[27]=s,e[28]=N):N=e[28];let k;e[29]!==v||e[30]!==N?(k=i.jsx(Me,{onClick:v,children:N}),e[29]=v,e[30]=N,e[31]=k):k=e[31];let C;e[32]!==S||e[33]!==k?(C=i.jsxs(Oe,{children:[S,k]}),e[32]=S,e[33]=k,e[34]=C):C=e[34];let y;e[35]!==b||e[36]!==C?(y=i.jsxs(Ve,{children:[b,C]}),e[35]=b,e[36]=C,e[37]=y):y=e[37];let w;e[38]!==n||e[39]!==y?(w=i.jsx(He,{open:n,onOpenChange:c,children:y}),e[38]=n,e[39]=y,e[40]=w):w=e[40];let _;return e[41]!==w||e[42]!==d?(_=i.jsxs(i.Fragment,{children:[d,w]}),e[41]=w,e[42]=d,e[43]=_):_=e[43],_}function ht(t){const e=L.c(40),{integration:a}=t,s=E(),l=ce(),n=de(!0),[c,o]=U.useState("");let u;e[0]!==c?(u=c.trim(),e[0]=c,e[1]=u):u=e[1];const m=tt(u,300),f=de(m!=="",m);let r;if(e[2]!==n.data||e[3]!==m||e[4]!==f){const y=n.data??[],w=new Set(y.map(yt)),_=m?(f.data??[]).filter(I=>!w.has(I.id)):[];r=[...y,..._].map(St),e[2]=n.data,e[3]=m,e[4]=f,e[5]=r}else r=e[5];const d=r,g=a.boardId?d.find(y=>y.value===a.boardId)?.primary??a.boardName??a.boardId:null;let j;e[6]!==s?(j=s("settings.jira.boardLabel"),e[6]=s,e[7]=j):j=e[7];let x;e[8]!==s?(x=s("settings.jira.boardDescription"),e[8]=s,e[9]=x):x=e[9];const p=a.boardId??"";let b;e[10]!==s?(b=s("settings.jira.boardPlaceholder"),e[10]=s,e[11]=b):b=e[11];let h;e[12]!==s?(h=s("settings.jira.boardSearchPlaceholder"),e[12]=s,e[13]=h):h=e[13];let S;e[14]!==n.isPending||e[15]!==m||e[16]!==c||e[17]!==f||e[18]!==s?(S=n.isPending||c.trim()!==m||m!==""&&f.isFetching?s("settings.jira.loadingBoards"):s("settings.jira.noBoardsMatch"),e[14]=n.isPending,e[15]=m,e[16]=c,e[17]=f,e[18]=s,e[19]=S):S=e[19];let v;e[20]!==g||e[21]!==s?(v=()=>i.jsxs(V,{variant:"outline",role:"combobox",className:"w-72 justify-between font-normal",children:[i.jsx("span",{className:"truncate",children:g??s("settings.jira.boardPlaceholder")}),i.jsx(Le,{className:"opacity-50 shrink-0"})]}),e[20]=g,e[21]=s,e[22]=v):v=e[22];let N;e[23]!==d||e[24]!==a.boardId||e[25]!==s||e[26]!==l?(N=y=>{!y||y===a.boardId||l.mutate({boardId:y,boardName:d.find(w=>w.value===y)?.primary??null},{onError:w=>J.error(Q(w,s("settings.jira.saveFailed")))})},e[23]=d,e[24]=a.boardId,e[25]=s,e[26]=l,e[27]=N):N=e[27];let k;e[28]!==d||e[29]!==N||e[30]!==p||e[31]!==b||e[32]!==h||e[33]!==S||e[34]!==v?(k=i.jsx(Ke,{options:d,value:p,width:"w-72",triggerClassName:"shrink-0",placeholder:b,searchPlaceholder:h,filter:mt,onSearchChange:o,emptyMessage:S,renderTrigger:v,renderItem:bt,onChange:N}),e[28]=d,e[29]=N,e[30]=p,e[31]=b,e[32]=h,e[33]=S,e[34]=v,e[35]=k):k=e[35];let C;return e[36]!==k||e[37]!==j||e[38]!==x?(C=i.jsx(H,{title:j,description:x,action:k}),e[36]=k,e[37]=j,e[38]=x,e[39]=C):C=e[39],C}function bt(t,e){return i.jsxs("div",{className:"flex items-start gap-2 min-w-0 w-full",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate",children:t.primary}),i.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.secondary})]}),i.jsx(pe,{className:$e("mt-0.5 shrink-0",e?"opacity-100":"opacity-0")})]})}function St(t){const{primary:e,secondary:a}=_e(t);return{value:String(t.id),label:dt(t),primary:e,secondary:a}}function yt(t){return t.id}function vt(t){const e=L.c(28),{boardId:a}=t,s=E(),l=qe(a),n=ke();let c;if(l.isPending||n.isPending){let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(re,{className:"h-40 w-full"}),e[0]=r):r=e[0],c=r}else if(l.isError){let r;e[1]!==s?(r=s("settings.jira.columnsFailed"),e[1]=s,e[2]=r):r=e[2];let d;e[3]!==r?(d=i.jsx("p",{className:"text-xs text-muted-foreground",children:r}),e[3]=r,e[4]=d):d=e[4],c=d}else if((l.data??[]).length===0){let r;e[5]!==s?(r=s("settings.jira.noColumnsYet"),e[5]=s,e[6]=r):r=e[6];let d;e[7]!==r?(d=i.jsx("p",{className:"text-xs text-muted-foreground",children:r}),e[7]=r,e[8]=d):d=e[8],c=d}else{let r;if(e[9]!==n.data){r=new Map;for(const x of n.data??[])r.set(x.jiraStatus,[...r.get(x.jiraStatus)??[],x]);e[9]=n.data,e[10]=r}else r=e[10];let d,g;if(e[11]!==l.data||e[12]!==r){const x=(l.data??[]).flatMap(Nt);d="flex w-full flex-col gap-3",g=(l.data??[]).flatMap(p=>p.statuses.map(b=>i.jsx(It,{columnName:p.name,status:b,showStatus:b!==p.name||p.statuses.length>1,rules:r.get(b)??[],otherStatuses:x.filter(h=>h!==b)},`${p.name}:${b}`))),e[11]=l.data,e[12]=r,e[13]=d,e[14]=g}else d=e[13],g=e[14];let j;e[15]!==d||e[16]!==g?(j=i.jsx("div",{className:d,children:g}),e[15]=d,e[16]=g,e[17]=j):j=e[17],c=j}let o;e[18]!==s?(o=s("settings.jira.automationsLabel"),e[18]=s,e[19]=o):o=e[19];let u;e[20]!==s?(u=s("settings.jira.automationsDescription"),e[20]=s,e[21]=u):u=e[21];let m;e[22]!==c?(m=i.jsx("div",{className:"mt-3",children:c}),e[22]=c,e[23]=m):m=e[23];let f;return e[24]!==o||e[25]!==u||e[26]!==m?(f=i.jsx(H,{title:o,description:u,children:m}),e[24]=o,e[25]=u,e[26]=m,e[27]=f):f=e[27],f}function Nt(t){return t.statuses}function kt(t){const e=L.c(16),{value:a,onChange:s,disabled:l,ariaLabel:n}=t,c=E();let o;if(e[0]!==n||e[1]!==l||e[2]!==s||e[3]!==c||e[4]!==a){const{keys:u,invalid:m}=we(a);let f;e[6]!==s?(f=g=>s(g.target.value),e[6]=s,e[7]=f):f=e[7];let r;e[8]!==c?(r=c("settings.jira.issueKeysPlaceholder"),e[8]=c,e[9]=r):r=e[9];let d;e[10]!==n||e[11]!==l||e[12]!==f||e[13]!==r||e[14]!==a?(d=i.jsx(je,{value:a,rows:3,disabled:l,onChange:f,placeholder:r,"aria-label":n,className:"font-mono text-xs",spellCheck:!1}),e[10]=n,e[11]=l,e[12]=f,e[13]=r,e[14]=a,e[15]=d):d=e[15],o=i.jsxs("div",{className:"flex w-full flex-col gap-1.5",children:[d,a.trim()!==""&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[c("settings.jira.issueKeysCount",{count:String(u.length)}),m.length>0&&i.jsxs("span",{className:"text-destructive",children:[" · ",c("settings.jira.issueKeysUnreadable",{items:m.slice(0,3).join(", ")})]})]})]}),e[0]=n,e[1]=l,e[2]=s,e[3]=c,e[4]=a,e[5]=o}else o=e[5];return o}function Ct(t){const e=L.c(8),{started:a,failed:s,startedLabel:l}=t;if(a.length===0&&s.length===0)return null;let n;e[0]!==a||e[1]!==l?(n=a.length>0&&i.jsxs("p",{children:[i.jsx(pe,{size:12,className:"mr-1 inline text-success"}),l,i.jsx("span",{className:"ml-1 font-mono",children:a.join(", ")})]}),e[0]=a,e[1]=l,e[2]=n):n=e[2];let c;e[3]!==s?(c=s.map(wt),e[3]=s,e[4]=c):c=e[4];let o;return e[5]!==n||e[6]!==c?(o=i.jsxs("div",{className:"flex flex-col gap-1 rounded-lg bg-muted/40 p-2.5 text-xs",children:[n,c]}),e[5]=n,e[6]=c,e[7]=o):o=e[7],o}function wt(t){return i.jsxs("p",{className:"text-destructive",children:[i.jsx("span",{className:"font-mono",children:t.issueKey})," — ",t.error]},t.issueKey)}function Ie(t){return t.kind!=="statuses"?t.kind:`statuses:${[...new Set(t.statuses.map(a=>a.trim().toLowerCase()))].sort().join(`
|
|
4
|
-
`)}`}function _t(t){const e=L.c(17),{from:a}=t,s=E();switch(a.kind){case"any":{let l;e[0]!==s?(l=s("settings.jira.fromAny"),e[0]=s,e[1]=l):l=e[1];let n;return e[2]!==l?(n=i.jsx(i.Fragment,{children:l}),e[2]=l,e[3]=n):n=e[3],n}case"earlier":{let l;e[4]!==s?(l=s("settings.jira.fromEarlier"),e[4]=s,e[5]=l):l=e[5];let n;return e[6]!==l?(n=i.jsx(i.Fragment,{children:l}),e[6]=l,e[7]=n):n=e[7],n}case"later":{let l;e[8]!==s?(l=s("settings.jira.fromLater"),e[8]=s,e[9]=l):l=e[9];let n;return e[10]!==l?(n=i.jsx(i.Fragment,{children:l}),e[10]=l,e[11]=n):n=e[11],n}case"statuses":{let l;e[12]!==a.statuses||e[13]!==s?(l=s("settings.jira.fromStatuses",{statuses:a.statuses.join(", ")}),e[12]=a.statuses,e[13]=s,e[14]=l):l=e[14];let n;return e[15]!==l?(n=i.jsx(i.Fragment,{children:l}),e[15]=l,e[16]=n):n=e[16],n}}}function It(t){const e=L.c(32),{columnName:a,status:s,showStatus:l,rules:n,otherStatuses:c}=t,o=E(),{org:u}=oe(),m=Ae(),f=Ye(),[r,d]=U.useState(!1);let g;e[0]!==f||e[1]!==m||e[2]!==u||e[3]!==s||e[4]!==o?(g=C=>f.mutate({jiraStatus:s,from:C},{onSuccess:y=>{d(!1),m({to:"/$org/projects/$agentId/automations/$automationId",params:{org:u.slug,agentId:ue(u.id),automationId:y.automationId}})},onError:y=>J.error(Q(y,o("settings.jira.saveFailed")))}),e[0]=f,e[1]=m,e[2]=u,e[3]=s,e[4]=o,e[5]=g):g=e[5];const j=g;let x;e[6]!==a?(x=i.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[6]=a,e[7]=x):x=e[7];let p;e[8]!==l||e[9]!==s?(p=l&&i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s}),e[8]=l,e[9]=s,e[10]=p):p=e[10];let b;e[11]!==x||e[12]!==p?(b=i.jsxs("div",{className:"flex flex-col min-w-0",children:[x,p]}),e[11]=x,e[12]=p,e[13]=b):b=e[13];let h;e[14]!==r||e[15]!==o?(h=!r&&i.jsxs(V,{variant:"outline",size:"sm",className:"shrink-0",onClick:()=>d(!0),children:[i.jsx(Ee,{size:14}),o("settings.jira.addAutomation")]}),e[14]=r,e[15]=o,e[16]=h):h=e[16];let S;e[17]!==b||e[18]!==h?(S=i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b,h]}),e[17]=b,e[18]=h,e[19]=S):S=e[19];let v;e[20]!==r||e[21]!==j||e[22]!==f.isPending||e[23]!==c||e[24]!==n?(v=r&&i.jsx(At,{taken:new Set(n.map(Rt)),otherStatuses:c,pending:f.isPending,onCreate:j,onCancel:()=>d(!1)}),e[20]=r,e[21]=j,e[22]=f.isPending,e[23]=c,e[24]=n,e[25]=v):v=e[25];let N;e[26]!==n?(N=n.map(Pt),e[26]=n,e[27]=N):N=e[27];let k;return e[28]!==S||e[29]!==v||e[30]!==N?(k=i.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border p-3",children:[S,v,N]}),e[28]=S,e[29]=v,e[30]=N,e[31]=k):k=e[31],k}function Pt(t){return i.jsx(Tt,{rule:t},t.automationId)}function Rt(t){return Ie(t.from)}function At(t){const e=L.c(51),{taken:a,otherStatuses:s,pending:l,onCreate:n,onCancel:c}=t,o=E();let u;e[0]!==a?(u=["any","earlier","later","statuses"].filter(P=>P==="statuses"||!a.has(P)),e[0]=a,e[1]=u):u=e[1];const m=u,[f,r]=U.useState(m[0]??"statuses");let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[2]=d):d=e[2];const[g,j]=U.useState(d);let x,p;e[3]!==f||e[4]!==g||e[5]!==a?(x=f==="statuses"?{kind:f,statuses:g}:{kind:f},p=(f!=="statuses"||g.length>0)&&!a.has(Ie(x)),e[3]=f,e[4]=g,e[5]=a,e[6]=x,e[7]=p):(x=e[6],p=e[7]);const b=p;let h;e[8]!==o?(h=o("settings.jira.originLabel"),e[8]=o,e[9]=h):h=e[9];let S;e[10]!==h?(S=i.jsx("span",{className:"text-xs font-medium",children:h}),e[10]=h,e[11]=S):S=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=P=>r(P),e[12]=v):v=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(Se,{size:"sm",className:"w-fit min-w-56",children:i.jsx(ye,{})}),e[13]=N):N=e[13];let k;e[14]!==m||e[15]!==o?(k=i.jsx(he,{children:m.map(P=>i.jsx(be,{value:P,className:"text-xs",children:P==="any"?o("settings.jira.fromAny"):P==="earlier"?o("settings.jira.fromEarlier"):P==="later"?o("settings.jira.fromLater"):o("settings.jira.fromStatuses",{statuses:"…"})},P))}),e[14]=m,e[15]=o,e[16]=k):k=e[16];let C;e[17]!==f||e[18]!==k?(C=i.jsxs(ve,{value:f,onValueChange:v,children:[N,k]}),e[17]=f,e[18]=k,e[19]=C):C=e[19];let y;e[20]!==f||e[21]!==s||e[22]!==o?(y=f==="statuses"&&i.jsx(De,{options:s.map($t),onValueChange:j,placeholder:o("settings.jira.originStatusesPlaceholder"),className:"text-xs"}),e[20]=f,e[21]=s,e[22]=o,e[23]=y):y=e[23];let w;e[24]!==o?(w=o("settings.jira.originHelp"),e[24]=o,e[25]=w):w=e[25];let _;e[26]!==w?(_=i.jsx("p",{className:"text-xs text-muted-foreground",children:w}),e[26]=w,e[27]=_):_=e[27];let I;e[28]!==o?(I=o("settings.jira.cancelRule"),e[28]=o,e[29]=I):I=e[29];let R;e[30]!==c||e[31]!==I?(R=i.jsx(V,{variant:"ghost",size:"sm",onClick:c,children:I}),e[30]=c,e[31]=I,e[32]=R):R=e[32];const K=!b||l;let A;e[33]!==x||e[34]!==n?(A=()=>n(x),e[33]=x,e[34]=n,e[35]=A):A=e[35];let $;e[36]!==o?($=o("settings.jira.createRule"),e[36]=o,e[37]=$):$=e[37];let z;e[38]!==K||e[39]!==A||e[40]!==$?(z=i.jsx(V,{size:"sm",disabled:K,onClick:A,children:$}),e[38]=K,e[39]=A,e[40]=$,e[41]=z):z=e[41];let D;e[42]!==R||e[43]!==z?(D=i.jsxs("div",{className:"flex items-center justify-end gap-2",children:[R,z]}),e[42]=R,e[43]=z,e[44]=D):D=e[44];let T;return e[45]!==y||e[46]!==_||e[47]!==D||e[48]!==S||e[49]!==C?(T=i.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-dashed border-border p-2.5",children:[S,C,y,_,D]}),e[45]=y,e[46]=_,e[47]=D,e[48]=S,e[49]=C,e[50]=T):T=e[50],T}function $t(t){return{label:t,value:t}}function Tt(t){const e=L.c(29),{rule:a}=t,s=E(),{org:l}=oe(),n=Ce().data?.find(S=>S.id===a.automationId),{update:c}=st(),o=n?.active??a.active,u=n?.name??a.jiraStatus;let m;e[0]!==n?.virtual_mcp_id||e[1]!==l.id?(m=n?.virtual_mcp_id??ue(l.id),e[0]=n?.virtual_mcp_id,e[1]=l.id,e[2]=m):m=e[2];let f;e[3]!==l.slug||e[4]!==a.automationId||e[5]!==m?(f={org:l.slug,agentId:m,automationId:a.automationId},e[3]=l.slug,e[4]=a.automationId,e[5]=m,e[6]=f):f=e[6];let r;e[7]!==u?(r=i.jsx("span",{className:"truncate text-sm text-foreground",children:u}),e[7]=u,e[8]=r):r=e[8];let d;e[9]!==a.from?(d=i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:i.jsx(_t,{from:a.from})}),e[9]=a.from,e[10]=d):d=e[10];let g;e[11]!==f||e[12]!==r||e[13]!==d?(g=i.jsxs(ge,{to:"/$org/projects/$agentId/automations/$automationId",params:f,className:"flex min-w-0 flex-1 flex-col hover:underline",children:[r,d]}),e[11]=f,e[12]=r,e[13]=d,e[14]=g):g=e[14];const j=c.isPending;let x;e[15]!==a.automationId||e[16]!==c?(x=S=>c.mutate({id:a.automationId,active:S}),e[15]=a.automationId,e[16]=c,e[17]=x):x=e[17];let p;e[18]!==u||e[19]!==s?(p=s("settings.jira.toggleAutomation",{name:u}),e[18]=u,e[19]=s,e[20]=p):p=e[20];let b;e[21]!==o||e[22]!==x||e[23]!==p||e[24]!==c.isPending?(b=i.jsx(Ne,{checked:o,disabled:j,onCheckedChange:x,"aria-label":p}),e[21]=o,e[22]=x,e[23]=p,e[24]=c.isPending,e[25]=b):b=e[25];let h;return e[26]!==g||e[27]!==b?(h=i.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-muted/40 px-2.5 py-2",children:[g,b]}),e[26]=g,e[27]=b,e[28]=h):h=e[28],h}function Lt(){const t=L.c(77),e=E(),{org:a}=oe(),s=Xe(),l=ke(),[n,c]=U.useState(""),[o,u]=U.useState(null),[m,f]=U.useState(!1),[r,d]=U.useState(null),g=Ce().data;let j;t[0]!==l.data?(j=[...new Map((l.data??[]).map(Et)).values()],t[0]=l.data,t[1]=j):j=t[1];const x=j,p=o??x[0]?.automationId??null;let b;t[2]!==n?(b=we(n),t[2]=n,t[3]=b):b=t[3];const h=b,S=p!==null&&h.keys.length>0&&!s.isPending,v=m&&h.keys.length>1;let N;t[4]!==p||t[5]!==v||t[6]!==S||t[7]!==n||t[8]!==s||t[9]!==e?(N=()=>{!S||!p||(d(null),s.mutate({automationId:p,issueKey:n,...v?{together:!0}:{}},{onSuccess:O=>d({started:O.started.map(zt),failed:O.failed,together:v}),onError:O=>J.error(Q(O,e("settings.jira.testRunFailed")))}))},t[4]=p,t[5]=v,t[6]=S,t[7]=n,t[8]=s,t[9]=e,t[10]=N):N=t[10];const k=N;let C;t[11]!==e?(C=e("settings.jira.testRunLabel"),t[11]=e,t[12]=C):C=t[12];let y;t[13]!==e?(y=e("settings.jira.testRunDescription"),t[13]=e,t[14]=y):y=t[14];const w=s.isPending;let _;t[15]!==e?(_=e("settings.jira.testRunIssueAriaLabel"),t[15]=e,t[16]=_):_=t[16];let I;t[17]!==n||t[18]!==s.isPending||t[19]!==_?(I=i.jsx(kt,{value:n,onChange:c,disabled:w,ariaLabel:_}),t[17]=n,t[18]=s.isPending,t[19]=_,t[20]=I):I=t[20];let R;t[21]!==p||t[22]!==g||t[23]!==x||t[24]!==e?(R=x.length===0?i.jsx("p",{className:"text-xs text-muted-foreground",children:e("settings.jira.testRunNoAutomations")}):i.jsxs(ve,{value:p??void 0,onValueChange:u,children:[i.jsx(Se,{size:"sm",className:"w-fit min-w-56","aria-label":e("settings.jira.testRunAutomation"),children:i.jsx(ye,{})}),i.jsx(he,{children:x.map(O=>i.jsx(be,{value:O.automationId,className:"text-xs",children:g?.find(Pe=>Pe.id===O.automationId)?.name??O.jiraStatus},O.automationId))})]}),t[21]=p,t[22]=g,t[23]=x,t[24]=e,t[25]=R):R=t[25];let K;t[26]!==h.keys.length||t[27]!==e||t[28]!==m?(K=h.keys.length>1&&i.jsxs("label",{className:"flex w-fit cursor-pointer items-center gap-2 text-xs",children:[i.jsx(Te,{checked:m,onCheckedChange:O=>f(O===!0)}),e("settings.jira.together")]}),t[26]=h.keys.length,t[27]=e,t[28]=m,t[29]=K):K=t[29];let A;t[30]!==e?(A=e("settings.jira.testRunHelp"),t[30]=e,t[31]=A):A=t[31];let $;t[32]!==A?($=i.jsx("p",{className:"text-xs text-muted-foreground",children:A}),t[32]=A,t[33]=$):$=t[33];const z=!S;let D;t[34]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx(ze,{size:14}),t[34]=D):D=t[34];let T;t[35]!==h.keys.length||t[36]!==s.isPending||t[37]!==e?(T=s.isPending?e("settings.jira.testRunRunning"):e("settings.jira.testRun",{count:String(h.keys.length||"")}),t[35]=h.keys.length,t[36]=s.isPending,t[37]=e,t[38]=T):T=t[38];let P;t[39]!==k||t[40]!==z||t[41]!==T?(P=i.jsxs(V,{size:"sm",className:"shrink-0",disabled:z,onClick:k,children:[D,T]}),t[39]=k,t[40]=z,t[41]=T,t[42]=P):P=t[42];let B;t[43]!==$||t[44]!==P?(B=i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[$,P]}),t[43]=$,t[44]=P,t[45]=B):B=t[45];let M;t[46]!==r?.started?(M=r?.started??[],t[46]=r?.started,t[47]=M):M=t[47];let F;t[48]!==r?.failed?(F=r?.failed??[],t[48]=r?.failed,t[49]=F):F=t[49];const ae=r?.together?"settings.jira.togetherStarted":"settings.jira.testRunStarted";let W;t[50]!==e||t[51]!==ae?(W=e(ae),t[50]=e,t[51]=ae,t[52]=W):W=t[52];let Z;t[53]!==M||t[54]!==F||t[55]!==W?(Z=i.jsx(Ct,{started:M,failed:F,startedLabel:W}),t[53]=M,t[54]=F,t[55]=W,t[56]=Z):Z=t[56];let q;t[57]!==a.slug?(q={org:a.slug},t[57]=a.slug,t[58]=q):q=t[58];let ee;t[59]===Symbol.for("react.memo_cache_sentinel")?(ee={tab:"threads"},t[59]=ee):ee=t[59];let Y;t[60]!==e?(Y=e("settings.jira.testRunWatch"),t[60]=e,t[61]=Y):Y=t[61];let te;t[62]===Symbol.for("react.memo_cache_sentinel")?(te=i.jsx(xe,{size:12}),t[62]=te):te=t[62];let G;t[63]!==q||t[64]!==Y?(G=i.jsxs(ge,{to:"/$org/settings/monitor",params:q,search:ee,className:"flex w-fit items-center gap-1 text-xs text-muted-foreground underline hover:text-foreground",children:[Y,te]}),t[63]=q,t[64]=Y,t[65]=G):G=t[65];let X;t[66]!==B||t[67]!==Z||t[68]!==G||t[69]!==I||t[70]!==R||t[71]!==K?(X=i.jsxs("div",{className:"mt-3 flex w-full flex-col gap-3",children:[I,R,K,B,Z,G]}),t[66]=B,t[67]=Z,t[68]=G,t[69]=I,t[70]=R,t[71]=K,t[72]=X):X=t[72];let se;return t[73]!==X||t[74]!==C||t[75]!==y?(se=i.jsx(H,{title:C,description:y,children:X}),t[73]=X,t[74]=C,t[75]=y,t[76]=se):se=t[76],se}function zt(t){return t.issueKey}function Et(t){return[t.automationId,t]}function Kt(t){const e=L.c(16),{integration:a}=t,s=E(),l=ce();let n;e[0]!==s?(n=s("settings.jira.enabledLabel"),e[0]=s,e[1]=n):n=e[1];let c;e[2]!==s?(c=s("settings.jira.enabledDescription"),e[2]=s,e[3]=c):c=e[3];let o;e[4]!==a.boardId||e[5]!==s||e[6]!==l?(o=f=>{if(f&&!a.boardId){J.error(s("settings.jira.enableRequirements"));return}l.mutate({enabled:f},{onError:r=>J.error(Q(r,s("settings.jira.saveFailed")))})},e[4]=a.boardId,e[5]=s,e[6]=l,e[7]=o):o=e[7];let u;e[8]!==a.enabled||e[9]!==o||e[10]!==l.isPending?(u=i.jsx(Ne,{checked:a.enabled,disabled:l.isPending,onCheckedChange:o}),e[8]=a.enabled,e[9]=o,e[10]=l.isPending,e[11]=u):u=e[11];let m;return e[12]!==n||e[13]!==c||e[14]!==u?(m=i.jsx(H,{title:n,description:c,action:u}),e[12]=n,e[13]=c,e[14]=u,e[15]=m):m=e[15],m}function Dt(t){const e=L.c(24),{integration:a}=t,s=E(),l=`${window.location.origin}/api/_jira/webhook/${a.webhookSecret}`;let n;e[0]!==s?(n=s("settings.jira.webhookTitle"),e[0]=s,e[1]=n):n=e[1];let c;e[2]!==s?(c=s("settings.jira.webhookDescription"),e[2]=s,e[3]=c):c=e[3];let o;e[4]!==l?(o=i.jsx(le,{readOnly:!0,value:l,className:"font-mono text-xs"}),e[4]=l,e[5]=o):o=e[5];let u;e[6]!==s||e[7]!==l?(u=()=>{navigator.clipboard.writeText(l),J.success(s("settings.jira.webhookCopied"))},e[6]=s,e[7]=l,e[8]=u):u=e[8];let m;e[9]!==s?(m=s("settings.jira.webhookCopy"),e[9]=s,e[10]=m):m=e[10];let f;e[11]!==u||e[12]!==m?(f=i.jsx(V,{variant:"outline",size:"sm",className:"shrink-0",onClick:u,children:m}),e[11]=u,e[12]=m,e[13]=f):f=e[13];let r;e[14]!==o||e[15]!==f?(r=i.jsxs("div",{className:"flex items-center gap-2",children:[o,f]}),e[14]=o,e[15]=f,e[16]=r):r=e[16];let d;e[17]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(xt,{stepKeys:["settings.jira.webhookStep1","settings.jira.webhookStep2","settings.jira.webhookStep3","settings.jira.webhookStep4","settings.jira.webhookStep5"]}),e[17]=d):d=e[17];let g;e[18]!==r?(g=i.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[r,d]}),e[18]=r,e[19]=g):g=e[19];let j;return e[20]!==n||e[21]!==c||e[22]!==g?(j=i.jsx(H,{title:n,description:c,children:g}),e[20]=n,e[21]=c,e[22]=g,e[23]=j):j=e[23],j}function Ft(){const t=L.c(24),e=E(),a=Ze();if(a.isPending){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(ne,{children:i.jsx("div",{className:"p-4",children:i.jsx(re,{className:"h-40 w-full"})})}),t[0]=r):r=t[0],r}if(!a.data){let r;t[1]!==e?(r=e("settings.jira.connectTitle"),t[1]=e,t[2]=r):r=t[2];let d;t[3]!==e?(d=e("settings.jira.connectDescription"),t[3]=e,t[4]=d):d=t[4];let g;t[5]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(pt,{}),t[5]=g):g=t[5];let j;return t[6]!==r||t[7]!==d?(j=i.jsx(ne,{children:i.jsx(H,{title:r,description:d,children:g})}),t[6]=r,t[7]=d,t[8]=j):j=t[8],j}const s=a.data;let l,n;t[9]!==s?(l=i.jsx(jt,{integration:s}),n=i.jsx(ht,{integration:s}),t[9]=s,t[10]=l,t[11]=n):(l=t[10],n=t[11]);let c;t[12]!==s.boardId?(c=s.boardId&&i.jsx(vt,{boardId:s.boardId}),t[12]=s.boardId,t[13]=c):c=t[13];let o;t[14]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(Lt,{}),t[14]=o):o=t[14];let u,m;t[15]!==s?(u=i.jsx(Kt,{integration:s}),m=i.jsx(Dt,{integration:s}),t[15]=s,t[16]=u,t[17]=m):(u=t[16],m=t[17]);let f;return t[18]!==l||t[19]!==n||t[20]!==c||t[21]!==u||t[22]!==m?(f=i.jsxs(ne,{children:[l,n,c,o,u,m]}),t[18]=l,t[19]=n,t[20]=c,t[21]=u,t[22]=m,t[23]=f):f=t[23],f}function Ut(){const t=L.c(18),e=E();let a;t[0]!==e?(a=e("settings.nav.tasks"),t[0]=e,t[1]=a):a=t[1];let s;t[2]!==a?(s=i.jsx(ie.Title,{children:a}),t[2]=a,t[3]=s):s=t[3];let l,n,c;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(Qe,{}),n=i.jsx(ft,{}),c=i.jsx(et,{}),t[4]=l,t[5]=n,t[6]=c):(l=t[4],n=t[5],c=t[6]);let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(We,{size:18}),t[7]=o):o=t[7];let u;t[8]!==e?(u=e("settings.jira.sectionTitle"),t[8]=e,t[9]=u):u=t[9];let m;t[10]!==u?(m=i.jsxs("span",{className:"flex items-center gap-2",children:[o,u]}),t[10]=u,t[11]=m):m=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Ft,{}),t[12]=f):f=t[12];let r;t[13]!==m?(r=i.jsx(fe,{title:m,children:f}),t[13]=m,t[14]=r):r=t[14];let d;return t[15]!==s||t[16]!==r?(d=i.jsx(ie,{children:i.jsx(ie.Content,{children:i.jsx(ie.Container,{children:i.jsxs(Re,{children:[s,l,n,c,r]})})})}),t[15]=s,t[16]=r,t[17]=d):d=t[17],d}function As(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(rt,{capability:"org:manage",area:"settings",children:i.jsx(Ut,{})}),t[0]=e):e=t[0],e}export{As as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,a2 as n,j as r,K as f}from"./index-BSPqDg2b.js";import{C as d}from"./index-CDrRsU-I.js";import{m as u,P as x,T as h}from"./mock-board-igDH_YVZ.js";import{F as j}from"./feature-gate-B4srxCCI.js";import"./use-mobile-19frZVl2.js";import"./use-sidebar-collapsed-8USbBI0-.js";import"./use-chat-layout-state-P4eOAh0Q.js";import"./thread-route-BLXCdzrT.js";import"./use-panel-navigate-BKTq-N_H.js";import"./use-project-scope-hi480z1p.js";import"./repository-binding-BPraGDH6.js";import"./use-mcp-client-BYbk6jXo.js";import"./auth--QyNLTbP.js";import"./thread-intent-DSZI851P.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DYaS1vyu.js";import"./task-board-M_bY8eys.js";import"./schema-D5kxh02n.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-B_vqhfDt.js";import"./AlertCircle-DuL_FFHx.js";import"./Tool01-Bhj-QHDu.js";import"./ArrowUp-Dn7IgtbA.js";import"./ArrowLeft-D94SnK45.js";import"./LinkBroken01-edPm2SIJ.js";import"./ShoppingBag01-B1nTczbE.js";import"./ZoomOut-DH4NDKgS.js";import"./Building02-BmRvdezs.js";import"./CheckCircle-BCzuQhZn.js";import"./ChevronUp-DWUYL4oz.js";import"./ChevronSelectorVertical-CxqUMZg6.js";import"./UserSquare-zP4-JvXz.js";import"./Copy01-B5Qm_DvO.js";import"./CreditCard01-8EhoJBRm.js";import"./DotsVertical-BmVaGWAg.js";import"./Image01-KdUybmWt.js";import"./Globe04-KfEeo3Pn.js";import"./SwitchHorizontal01-DQQsmdwN.js";import"./Key01-6z52NoNj.js";import"./Link01-oKshySD_.js";import"./Minus-BvqQFZHP.js";import"./Monitor01-DZmeiH6p.js";import"./Sun-D5qn9wPg.js";import"./Play-3WH9Ikap.js";import"./Plus-D3sv1Vc5.js";import"./SearchMd-DzFzOALq.js";import"./Trash01-DT07olaT.js";import"./Upload01-BocTk920.js";import"./User01-BqHvPhUP.js";import"./Users01-DfLHZjoX.js";import"./XClose-1FEelrZ4.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./toolbar-icon-button-7gQeG_XH.js";import"./shell-layout-CnFOD7IR.js";import"./avatar-C5-kxiV_.js";import"./use-clock-tick-DKd3Khi0.js";import"./command-Dqne3j1N.js";import"./index-WWkbzoL4.js";import"./integration-icon-BwzO3Wq9.js";import"./project-icon-BqAOVSaG.js";import"./new-project-dialog-B9qWs4Pr.js";import"./label-CG_DMVpg.js";import"./repository-import-picker-B0yxPI2j.js";import"./use-navigate-to-agent-Bh4JZJoL.js";import"./repository-picker-C8ArkEMp.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";import"./collection-search-C3Qx3Y9p.js";import"./use-debounced-value-CNkh6EY5.js";import"./use-organization-settings-XPH6XBPi.js";import"./required-auth-layout--9OrAOrr.js";import"./autosend-CUttN5XY.js";import"./use-org-sso-BlWFmoCA.js";import"./sheet-BHsKOUfF.js";import"./resizable-BqY6-uYR.js";import"./core.esm-BRS9Ks9b.js";import"./sortable.esm-B7h1ef6s.js";import"./use-task-board-analytics-CzI79mN4.js";import"./combobox-PWtcP6b2.js";import"./popover-Cdz7pgAQ.js";import"./usage-stats-DBiTgJdn.js";import"./tool-namespace-CzQWuXDV.js";import"./form-KgHP-Hpi.js";import"./utils-CVEq3hMx.js";import"./markdown-D5ryQAkZ.js";import"./use-copy-D2ar5QXj.js";import"./location-V0VwTJTt.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-DGj-wEwB.js";import"./chat-context-DwIrrO5r.js";import"./use-ai-providers-DeyDa8Td.js";import"./suggestion-CMN-fEG6.js";import"./column-rules-UU8JLygo.js";import"./badge-DVaine1x.js";import"./icon-button-uPrtYnSE.js";import"./switch-DpD3lo_J.js";import"./textarea--yDYOLyf.js";import"./use-org-fs-BFFpcHJy.js";import"./use-automations-CAga8LHD.js";import"./search-toggle-CdGIHwQK.js";import"./context-menu-Bsyqk_Km.js";import"./daily-pulse-BqDvmnPn.js";import"./use-task-board-events-De3JY1Pe.js";import"./config-CJdQI2Ik.js";import"./use-members-Dyl3oSqD.js";import"./use-org-auth-client-Dw_o5R0I.js";import"./select-DAagAjcm.js";import"./index-BdQq_4o_.js";import"./task-route-Cz8IMljw.js";import"./task-key-BCHdFiOO.js";import"./task-assignee-avatar-ZgHLf6ou.js";import"./use-tags-DvW8yrHX.js";import"./calendar-CpwMOIuL.js";import"./alert-SHlQi_f5.js";import"./collapsible-Btd20NT7.js";import"./index-BX1aT4SZ.js";import"./editor-classes-B3UoGQQP.js";import"./index-DL_9Zurb.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CXzTAmMM.js";import"./use-connection-CjozY_rG.js";import"./github-repo-scope-ByTYKy_L.js";import"./thread-sheet-body-BFLCqyyQ.js";import"./useSuspenseInfiniteQuery-BzZNrnpe.js";import"./pair-9h1O_BO7.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BYcHi_da.js";import"./types-s41XNAq6.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-B78UkAZ_.js";import"./use-thread-outputs-BKCBvLqB.js";import"./file-type-icon-DTTBg-Cp.js";import"./use-infinite-scroll-DcjLDU4h.js";import"./task-status-D4WkmdQN.js";import"./use-open-billing-url-CUDKmO6U.js";import"./chat-draft-stAhUvyw.js";import"./separator-Caw0JVLD.js";import"./feature-paywall-CnDJ3rvy.js";import"./plan-ladder-Dz8bCoAd.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Zo(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Zo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,b as ee,f as ge,r as F,j as s,h as je,a2 as pe,_ as Se,J as ye}from"./index-BSPqDg2b.js";import{C as se}from"./index-CDrRsU-I.js";import{S as be}from"./analytics-sections-B_qn34eY.js";import{u as ve,a as Ne,b as Te}from"./use-thread-analytics-DltmG-kv.js";import{B as Ce}from"./badge-DVaine1x.js";import{C as _e}from"./combobox-PWtcP6b2.js";import{S as ae,b as oe,a as ne,d as ce,c as Z}from"./select-DAagAjcm.js";import{e as Ae,a as we,b as fe,T as V,d as ke,c as K}from"./table-Cc4crfQ0.js";import{T as le,a as Le,b as re,c as Ee}from"./tabs-BpLvUwhr.js";import{c as Re,S as Ie,a as $e,b as Be}from"./sheet-BHsKOUfF.js";import{T as De}from"./thread-sheet-body-BFLCqyyQ.js";import{u as Oe}from"./use-connection-CjozY_rG.js";import{u as Pe}from"./use-mcp-client-BYbk6jXo.js";import{b as He}from"./repository-binding-BPraGDH6.js";import"./use-mobile-19frZVl2.js";import"./use-sidebar-collapsed-8USbBI0-.js";import"./use-chat-layout-state-P4eOAh0Q.js";import"./thread-route-BLXCdzrT.js";import"./use-panel-navigate-BKTq-N_H.js";import"./use-project-scope-hi480z1p.js";import"./thread-intent-DSZI851P.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DYaS1vyu.js";import"./task-board-M_bY8eys.js";import"./schema-D5kxh02n.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-B_vqhfDt.js";import"./AlertCircle-DuL_FFHx.js";import"./Tool01-Bhj-QHDu.js";import"./ArrowUp-Dn7IgtbA.js";import"./ArrowLeft-D94SnK45.js";import"./LinkBroken01-edPm2SIJ.js";import"./ShoppingBag01-B1nTczbE.js";import"./ZoomOut-DH4NDKgS.js";import"./Building02-BmRvdezs.js";import"./CheckCircle-BCzuQhZn.js";import"./ChevronUp-DWUYL4oz.js";import"./ChevronSelectorVertical-CxqUMZg6.js";import"./UserSquare-zP4-JvXz.js";import"./Copy01-B5Qm_DvO.js";import"./CreditCard01-8EhoJBRm.js";import"./DotsVertical-BmVaGWAg.js";import"./Image01-KdUybmWt.js";import"./Globe04-KfEeo3Pn.js";import"./SwitchHorizontal01-DQQsmdwN.js";import"./Key01-6z52NoNj.js";import"./Link01-oKshySD_.js";import"./Minus-BvqQFZHP.js";import"./Monitor01-DZmeiH6p.js";import"./Sun-D5qn9wPg.js";import"./Play-3WH9Ikap.js";import"./Plus-D3sv1Vc5.js";import"./SearchMd-DzFzOALq.js";import"./Trash01-DT07olaT.js";import"./Upload01-BocTk920.js";import"./User01-BqHvPhUP.js";import"./Users01-DfLHZjoX.js";import"./XClose-1FEelrZ4.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./toolbar-icon-button-7gQeG_XH.js";import"./shell-layout-CnFOD7IR.js";import"./avatar-C5-kxiV_.js";import"./use-clock-tick-DKd3Khi0.js";import"./command-Dqne3j1N.js";import"./index-WWkbzoL4.js";import"./integration-icon-BwzO3Wq9.js";import"./project-icon-BqAOVSaG.js";import"./new-project-dialog-B9qWs4Pr.js";import"./label-CG_DMVpg.js";import"./repository-import-picker-B0yxPI2j.js";import"./use-navigate-to-agent-Bh4JZJoL.js";import"./repository-picker-C8ArkEMp.js";import"./useInfiniteQuery-BMw5-0ES.js";import"./infiniteQueryObserver-6MK6GS3o.js";import"./collection-search-C3Qx3Y9p.js";import"./use-debounced-value-CNkh6EY5.js";import"./use-organization-settings-XPH6XBPi.js";import"./required-auth-layout--9OrAOrr.js";import"./autosend-CUttN5XY.js";import"./use-org-sso-BlWFmoCA.js";import"./resizable-BqY6-uYR.js";import"./chart-DMJIFNic.js";import"./index-DqOQgVM6.js";import"./symbol-Hd-wRYbC.js";import"./CategoricalChart-C1fCYXI1.js";import"./toggle-group-6nw88m-B.js";import"./active-indicator-CCMhAsc_.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./config-CJdQI2Ik.js";import"./core.esm-BRS9Ks9b.js";import"./BarChart-cNHCiDCi.js";import"./tooltipContext-Db2Lu1qi.js";import"./ActiveShapeUtils-BiggFcjT.js";import"./Sector-DlWxPN8J.js";import"./ErrorBarContext-7FUCCj8N.js";import"./CartesianChart-iNB7Klro.js";import"./AreaChart-CwzHmgIC.js";import"./popover-Cdz7pgAQ.js";import"./index-BdQq_4o_.js";import"./useSuspenseInfiniteQuery-BzZNrnpe.js";import"./pair-9h1O_BO7.js";import"./collapsible-Btd20NT7.js";import"./use-copy-D2ar5QXj.js";import"./usage-stats-DBiTgJdn.js";import"./tool-namespace-CzQWuXDV.js";import"./form-KgHP-Hpi.js";import"./utils-CVEq3hMx.js";import"./markdown-D5ryQAkZ.js";import"./location-V0VwTJTt.js";import"./use-decopilot-events-DGj-wEwB.js";import"./chat-context-DwIrrO5r.js";import"./use-ai-providers-DeyDa8Td.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BYcHi_da.js";import"./types-s41XNAq6.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-mcp-prompts-B78UkAZ_.js";import"./use-thread-outputs-BKCBvLqB.js";import"./file-type-icon-DTTBg-Cp.js";import"./use-infinite-scroll-DcjLDU4h.js";import"./task-status-D4WkmdQN.js";import"./auth--QyNLTbP.js";const Ve=[1,7,30,90],Ke=["in_progress","requires_action","failed","completed"],Ue=["chat","automation","task"],X="any",me={in_progress:"thread.analytics.statusRunning",requires_action:"thread.analytics.statusWaiting",failed:"thread.analytics.statusFailed",completed:"thread.analytics.statusCompleted"},xe={chat:"thread.analytics.kindChat",automation:"thread.analytics.kindAutomation",task:"thread.analytics.kindTask"},Fe={in_progress:"default",requires_action:"warning",failed:"destructive",completed:"secondary"};function de(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-center py-12",children:s.jsx(je,{className:"size-5 text-muted-foreground"})}),t[0]=e):e=t[0],e}function he(t){const e=U.c(2),{message:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-destructive",children:l}),e[0]=l,e[1]=r):r=e[1],r}function ie(t){const e=U.c(9),{label:l,value:r}=t;let i;e[0]!==l?(i=s.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1];let m;e[2]!==r?(m=r.toLocaleString(),e[2]=r,e[3]=m):m=e[3];let o;e[4]!==m?(o=s.jsx("div",{className:"mt-1 text-2xl font-medium text-foreground tabular-nums",children:m}),e[4]=m,e[5]=o):o=e[5];let c;return e[6]!==i||e[7]!==o?(c=s.jsxs("div",{className:"rounded-lg border border-border p-4",children:[i,o]}),e[6]=i,e[7]=o,e[8]=c):c=e[8],c}function Ye(t){const e=U.c(56),{thread:l,onOpen:r}=t,i=ee(),m=l.status;let o;e[0]!==l.updatedAt?(o=new Date(l.updatedAt).toLocaleString(),e[0]=l.updatedAt,e[1]=o):o=e[1];let c;e[2]!==o?(c=s.jsx(K,{className:"whitespace-nowrap text-sm tabular-nums text-muted-foreground",children:o}),e[2]=o,e[3]=c):c=e[3];let a;e[4]!==l.orgSlug?(a=s.jsx(K,{className:"text-sm",children:l.orgSlug}),e[4]=l.orgSlug,e[5]=a):a=e[5];let u;e[6]!==r||e[7]!==l?(u=()=>r(l),e[6]=r,e[7]=l,e[8]=u):u=e[8];let n;e[9]!==i||e[10]!==l.title?(n=l.title||i("thread.analytics.untitled"),e[9]=i,e[10]=l.title,e[11]=n):n=e[11];let x;e[12]!==u||e[13]!==n?(x=s.jsx("button",{type:"button",onClick:u,className:"block max-w-full truncate text-left text-foreground underline-offset-2 hover:underline",children:n}),e[12]=u,e[13]=n,e[14]=x):x=e[14];let d;e[15]!==l.failureReason||e[16]!==l.lastError||e[17]!==l.status?(d=l.status==="failed"&&(l.lastError||l.failureReason)&&s.jsx("div",{className:"truncate text-xs text-destructive",children:l.lastError??l.failureReason}),e[15]=l.failureReason,e[16]=l.lastError,e[17]=l.status,e[18]=d):d=e[18];let h;e[19]!==x||e[20]!==d?(h=s.jsxs(K,{className:"max-w-sm text-sm",children:[x,d]}),e[19]=x,e[20]=d,e[21]=h):h=e[21];const g=xe[l.kind];let p;e[22]!==i||e[23]!==g?(p=i(g),e[22]=i,e[23]=g,e[24]=p):p=e[24];let w;e[25]!==p?(w=s.jsx(K,{className:"text-sm",children:p}),e[25]=p,e[26]=w):w=e[26];const k=Fe[m]??"outline";let j;e[27]!==m||e[28]!==i||e[29]!==l.status?(j=me[m]?i(me[m]):l.status,e[27]=m,e[28]=i,e[29]=l.status,e[30]=j):j=e[30];let T;e[31]!==k||e[32]!==j?(T=s.jsx(K,{children:s.jsx(Ce,{variant:k,children:j})}),e[31]=k,e[32]=j,e[33]=T):T=e[33];const L=l.userEmail??l.userName??"—";let S;e[34]!==L?(S=s.jsx(K,{className:"max-w-48 truncate text-sm",children:L}),e[34]=L,e[35]=S):S=e[35];let y;e[36]!==l.agent?(y=s.jsx(K,{className:"max-w-48 truncate text-sm",children:l.agent}),e[36]=l.agent,e[37]=y):y=e[37];let C;e[38]!==l.usd?(C=l.usd===null?"—":`$${l.usd.toFixed(2)}`,e[38]=l.usd,e[39]=C):C=e[39];let b;e[40]!==C?(b=s.jsx(K,{className:"text-sm tabular-nums",children:C}),e[40]=C,e[41]=b):b=e[41];let v;e[42]!==l.tokens?(v=l.tokens===null?"—":l.tokens.toLocaleString(),e[42]=l.tokens,e[43]=v):v=e[43];let N;e[44]!==v?(N=s.jsx(K,{className:"text-sm tabular-nums",children:v}),e[44]=v,e[45]=N):N=e[45];let _;return e[46]!==w||e[47]!==T||e[48]!==S||e[49]!==y||e[50]!==b||e[51]!==c||e[52]!==N||e[53]!==a||e[54]!==h?(_=s.jsxs(fe,{children:[c,a,h,w,T,S,y,b,N]}),e[46]=w,e[47]=T,e[48]=S,e[49]=y,e[50]=b,e[51]=c,e[52]=N,e[53]=a,e[54]=h,e[55]=_):_=e[55],_}function ze(t){const e=U.c(51),{org:l}=t,r=ee(),[i,m]=F.useState(X),[o,c]=F.useState(X),a=i===X?void 0:i,u=o===X?void 0:o;let n;e[0]!==l||e[1]!==a||e[2]!==u?(n={org:l,status:a,kind:u,limit:150},e[0]=l,e[1]=a,e[2]=u,e[3]=n):n=e[3];const x=n,{data:d,isLoading:h,error:g}=Ne(x,!0),[p,w]=F.useState(null);let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[4]=k):k=e[4];let j;e[5]!==r?(j=r("thread.analytics.anyStatus"),e[5]=r,e[6]=j):j=e[6];let T;e[7]!==j?(T=s.jsx(Z,{value:X,children:j}),e[7]=j,e[8]=T):T=e[8];let L;e[9]!==r?(L=Ke.map(A=>s.jsx(Z,{value:A,children:r(me[A])},A)),e[9]=r,e[10]=L):L=e[10];let S;e[11]!==T||e[12]!==L?(S=s.jsxs(ce,{children:[T,L]}),e[11]=T,e[12]=L,e[13]=S):S=e[13];let y;e[14]!==i||e[15]!==S?(y=s.jsxs(ae,{value:i,onValueChange:m,children:[k,S]}),e[14]=i,e[15]=S,e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(oe,{className:"w-[180px]",size:"sm",children:s.jsx(ne,{})}),e[17]=C):C=e[17];let b;e[18]!==r?(b=r("thread.analytics.anyKind"),e[18]=r,e[19]=b):b=e[19];let v;e[20]!==b?(v=s.jsx(Z,{value:X,children:b}),e[20]=b,e[21]=v):v=e[21];let N;e[22]!==r?(N=Ue.map(A=>s.jsx(Z,{value:A,children:r(xe[A])},A)),e[22]=r,e[23]=N):N=e[23];let _;e[24]!==v||e[25]!==N?(_=s.jsxs(ce,{children:[v,N]}),e[24]=v,e[25]=N,e[26]=_):_=e[26];let E;e[27]!==o||e[28]!==_?(E=s.jsxs(ae,{value:o,onValueChange:c,children:[C,_]}),e[27]=o,e[28]=_,e[29]=E):E=e[29];let D;e[30]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("span",{className:"size-2 rounded-full bg-success"}),e[30]=D):D=e[30];let O;e[31]!==r?(O=r("thread.analytics.liveHint"),e[31]=r,e[32]=O):O=e[32];let R;e[33]!==O?(R=s.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs text-muted-foreground",children:[D,O]}),e[33]=O,e[34]=R):R=e[34];let I;e[35]!==E||e[36]!==R||e[37]!==y?(I=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,E,R]}),e[35]=E,e[36]=R,e[37]=y,e[38]=I):I=e[38];let $;e[39]!==d||e[40]!==g||e[41]!==h||e[42]!==r?($=h?s.jsx(de,{}):g?s.jsx(he,{message:g.message}):d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[s.jsx(ie,{label:r("thread.analytics.countRunning"),value:d.counts.running}),s.jsx(ie,{label:r("thread.analytics.countWaiting"),value:d.counts.waiting}),s.jsx(ie,{label:r("thread.analytics.countFailedHour"),value:d.counts.failedLastHour})]}),d.threads.length===0?s.jsx("div",{className:"rounded-lg border border-border p-8 text-center text-sm text-muted-foreground",children:r("thread.analytics.empty")}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:s.jsxs(Ae,{children:[s.jsx(we,{children:s.jsxs(fe,{children:[s.jsx(V,{children:r("thread.analytics.colUpdated")}),s.jsx(V,{children:r("thread.analytics.colOrg")}),s.jsx(V,{children:r("thread.analytics.colChat")}),s.jsx(V,{children:r("thread.analytics.colKind")}),s.jsx(V,{children:r("thread.analytics.colStatus")}),s.jsx(V,{children:r("thread.analytics.colUser")}),s.jsx(V,{children:r("thread.analytics.colAgent")}),s.jsx(V,{children:r("thread.analytics.colCost")}),s.jsx(V,{children:r("thread.analytics.colTokens")})]})}),s.jsx(ke,{children:d.threads.map(A=>s.jsx(Ye,{thread:A,onOpen:w},A.id))})]})})]}):null,e[39]=d,e[40]=g,e[41]=h,e[42]=r,e[43]=$):$=e[43];let P;e[44]===Symbol.for("react.memo_cache_sentinel")?(P=()=>w(null),e[44]=P):P=e[44];let B;e[45]!==p?(B=s.jsx(qe,{thread:p,onClose:P}),e[45]=p,e[46]=B):B=e[46];let H;return e[47]!==I||e[48]!==$||e[49]!==B?(H=s.jsxs("div",{className:"flex flex-col gap-6 py-6",children:[I,$,B]}),e[47]=I,e[48]=$,e[49]=B,e[50]=H):H=e[50],H}function Me(t){const e=U.c(14),{thread:l}=t,{org:r,locator:i}=pe();let m;e[0]!==r.id||e[1]!==r.slug?(m={connectionId:ye,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=m):m=e[2];const o=Pe(m),c=Oe(),a=He();let u;e[3]!==l.createdAt||e[4]!==l.id||e[5]!==l.status||e[6]!==l.title?(u={id:l.id,title:l.title,status:l.status,created_at:l.createdAt},e[3]=l.createdAt,e[4]=l.id,e[5]=l.status,e[6]=l.title,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==a?(n=s.jsx(De,{thread:u,client:o,locator:i,connections:c,virtualMcps:a,members:void 0,meta:!1}),e[8]=o,e[9]=c,e[10]=i,e[11]=u,e[12]=a,e[13]=n):n=e[13],n}function qe(t){const e=U.c(12),{thread:l,onClose:r}=t,i=ee(),{project:m}=pe(),o=!!l;let c;e[0]!==r?(c=x=>!x&&r(),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==m||e[3]!==i||e[4]!==l?(a=l&&s.jsx(Se,{org:{id:l.orgId,name:l.orgSlug,slug:l.orgSlug,logo:null},project:m,children:s.jsx(F.Suspense,{fallback:s.jsx(Re,{className:"shrink-0 border-b border-border px-5 pb-5 pt-6 md:px-6",children:s.jsx(Ie,{className:"truncate text-sm leading-snug",children:l.title||i("thread.analytics.untitled")})}),children:s.jsx(Me,{thread:l})})}),e[2]=m,e[3]=i,e[4]=l,e[5]=a):a=e[5];let u;e[6]!==a?(u=s.jsx($e,{className:"flex flex-col gap-0 p-0 sm:max-w-2xl",children:a}),e[6]=a,e[7]=u):u=e[7];let n;return e[8]!==o||e[9]!==c||e[10]!==u?(n=s.jsx(Be,{open:o,onOpenChange:c,children:u}),e[8]=o,e[9]=c,e[10]=u,e[11]=n):n=e[11],n}function ue(t){const e=U.c(16),{tool:l,org:r,from:i,to:m}=t,o=ee();let c;e[0]!==i||e[1]!==r||e[2]!==m?(c={org:r,from:i,to:m},e[0]=i,e[1]=r,e[2]=m,e[3]=c):c=e[3];const{data:a,isLoading:u,error:n}=Te(l,c);if(u){let p;return e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(de,{}),e[4]=p):p=e[4],p}if(n){let p;return e[5]!==n.message?(p=s.jsx(he,{message:n.message}),e[5]=n.message,e[6]=p):p=e[6],p}if(!a)return null;let x;e[7]!==a.sections?(x=a.sections.map(Ge),e[7]=a.sections,e[8]=x):x=e[8];let d;e[9]!==o?(d=o("thread.analytics.costFootnote"),e[9]=o,e[10]=d):d=e[10];let h;e[11]!==d?(h=s.jsx("p",{className:"text-xs text-muted-foreground",children:d}),e[11]=d,e[12]=h):h=e[12];let g;return e[13]!==x||e[14]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-8 py-6",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15],g}function Ge(t){return s.jsx(be,{section:t,threadLinks:!0},t.title)}function fl(){const t=U.c(99),e=ee(),l=ge({strict:!1}).org??"",r=ve(),[i,m]=F.useState("all"),[o,c]=F.useState(7),[a,u]=F.useState("live"),[n]=F.useState(Je);let x;t[0]!==n?(x=new Date(n).toISOString(),t[0]=n,t[1]=x):x=t[1];const d=x;let h;t[2]!==o||t[3]!==n?(h=new Date(n-o*864e5).toISOString(),t[2]=o,t[3]=n,t[4]=h):h=t[4];const g=h;if(r.isLoading){let f;return t[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se.Content,{children:s.jsx(de,{})}),t[5]=f):f=t[5],f}if(!r.data?.isAdmin){let f;t[6]!==e?(f=e("thread.analytics.notAdmin"),t[6]=e,t[7]=f):f=t[7];let Q;return t[8]!==f?(Q=s.jsx(se.Content,{children:s.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:f})}),t[8]=f,t[9]=Q):Q=t[9],Q}let p;t[10]!==e?(p=e("taskBoard.analytics.orgAll"),t[10]=e,t[11]=p):p=t[11];let w;t[12]!==p?(w={value:"all",label:p},t[12]=p,t[13]=w):w=t[13];let k;t[14]!==e?(k=e("taskBoard.analytics.orgCurrent"),t[14]=e,t[15]=k):k=t[15];let j;t[16]!==l||t[17]!==k?(j={value:l,label:k},t[16]=l,t[17]=k,t[18]=j):j=t[18];let T;if(t[19]!==r.data.orgs||t[20]!==l||t[21]!==w||t[22]!==j){let f;t[24]!==l?(f=Q=>Q.slug!==l,t[24]=l,t[25]=f):f=t[25],T=[w,j,...r.data.orgs.filter(f).map(We)],t[19]=r.data.orgs,t[20]=l,t[21]=w,t[22]=j,t[23]=T}else T=t[23];const L=T;let S;t[26]!==e?(S=e("thread.analytics.title"),t[26]=e,t[27]=S):S=t[27];let y;t[28]!==S?(y=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:S}),t[28]=S,t[29]=y):y=t[29];let C;t[30]!==e?(C=e("taskBoard.analytics.orgSearch"),t[30]=e,t[31]=C):C=t[31];let b;t[32]!==e?(b=e("taskBoard.analytics.orgEmpty"),t[32]=e,t[33]=b):b=t[33];let v;t[34]!==i||t[35]!==L||t[36]!==b||t[37]!==C?(v=s.jsx(_e,{options:L,value:i,onChange:m,width:"w-[240px]",searchPlaceholder:C,emptyMessage:b}),t[34]=i,t[35]=L,t[36]=b,t[37]=C,t[38]=v):v=t[38];let N;t[39]!==o||t[40]!==e||t[41]!==a?(N=a!=="live"&&s.jsxs(ae,{value:String(o),onValueChange:f=>c(Number(f)),children:[s.jsx(oe,{className:"w-[140px]",size:"sm",children:s.jsx(ne,{})}),s.jsx(ce,{children:Ve.map(f=>s.jsx(Z,{value:String(f),children:e("taskBoard.analytics.rangeDays",{days:String(f)})},f))})]}),t[39]=o,t[40]=e,t[41]=a,t[42]=N):N=t[42];let _;t[43]!==v||t[44]!==N?(_=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[v,N]}),t[43]=v,t[44]=N,t[45]=_):_=t[45];let E;t[46]!==_||t[47]!==y?(E=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y,_]}),t[46]=_,t[47]=y,t[48]=E):E=t[48];let D;t[49]!==i||t[50]!==l||t[51]!==e?(D=i!==l&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:i==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:i})}),t[49]=i,t[50]=l,t[51]=e,t[52]=D):D=t[52];let O;t[53]===Symbol.for("react.memo_cache_sentinel")?(O=f=>u(f),t[53]=O):O=t[53];let R;t[54]!==e?(R=e("thread.analytics.tabLive"),t[54]=e,t[55]=R):R=t[55];let I;t[56]!==R?(I=s.jsx(le,{value:"live",children:R}),t[56]=R,t[57]=I):I=t[57];let $;t[58]!==e?($=e("thread.analytics.tabUsage"),t[58]=e,t[59]=$):$=t[59];let P;t[60]!==$?(P=s.jsx(le,{value:"usage",children:$}),t[60]=$,t[61]=P):P=t[61];let B;t[62]!==e?(B=e("thread.analytics.tabErrors"),t[62]=e,t[63]=B):B=t[63];let H;t[64]!==B?(H=s.jsx(le,{value:"errors",children:B}),t[64]=B,t[65]=H):H=t[65];let A;t[66]!==I||t[67]!==P||t[68]!==H?(A=s.jsxs(Le,{children:[I,P,H]}),t[66]=I,t[67]=P,t[68]=H,t[69]=A):A=t[69];let Y;t[70]!==i||t[71]!==a?(Y=a==="live"&&s.jsx(ze,{org:i}),t[70]=i,t[71]=a,t[72]=Y):Y=t[72];let z;t[73]!==Y?(z=s.jsx(re,{value:"live",children:Y}),t[73]=Y,t[74]=z):z=t[74];let M;t[75]!==g||t[76]!==i||t[77]!==a||t[78]!==d?(M=a==="usage"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_USAGE",org:i,from:g,to:d}),t[75]=g,t[76]=i,t[77]=a,t[78]=d,t[79]=M):M=t[79];let q;t[80]!==M?(q=s.jsx(re,{value:"usage",children:M}),t[80]=M,t[81]=q):q=t[81];let G;t[82]!==g||t[83]!==i||t[84]!==a||t[85]!==d?(G=a==="errors"&&s.jsx(ue,{tool:"THREAD_ANALYTICS_ERRORS",org:i,from:g,to:d}),t[82]=g,t[83]=i,t[84]=a,t[85]=d,t[86]=G):G=t[86];let W;t[87]!==G?(W=s.jsx(re,{value:"errors",children:G}),t[87]=G,t[88]=W):W=t[88];let J;t[89]!==A||t[90]!==z||t[91]!==q||t[92]!==W||t[93]!==a?(J=s.jsxs(Ee,{value:a,onValueChange:O,children:[A,z,q,W]}),t[89]=A,t[90]=z,t[91]=q,t[92]=W,t[93]=a,t[94]=J):J=t[94];let te;return t[95]!==E||t[96]!==D||t[97]!==J?(te=s.jsx(se.Content,{children:s.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 py-6 sm:px-8 sm:py-8",children:[E,D,J]})})}),t[95]=E,t[96]=D,t[97]=J,t[98]=te):te=t[98],te}function We(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}function Je(){return Date.now()}export{fl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,d as U,a2 as M,b as T,aw as k,W as E,j as e,aI as z,v as D,B as w,r as S,H as I,D as F,aJ as L,aK as A,J as K,R as B,K as H,e as O,y as b,u as W,aL as G,O as J}from"./index-BSPqDg2b.js";import{a as Q}from"./chat-context-DwIrrO5r.js";import{T as q}from"./thread-intent-DSZI851P.js";import{s as Y,n as $}from"./site-url-en5df9c-.js";import{r as V}from"./use-reports-diagnostic-BCaZjPYS.js";import{u as X}from"./use-mcp-client-BYbk6jXo.js";import{i as N}from"./LinkBroken01-edPm2SIJ.js";import{a as Z}from"./use-organization-settings-XPH6XBPi.js";import{C as tt,a as et}from"./companion-mcps-section-kvftD547.js";import{C as ot,a as rt}from"./connect-layout-Dx_3veD9.js";import{p as C}from"./self-tool-result-8OxPN9Nm.js";import"./use-panel-navigate-BKTq-N_H.js";import"./thread-route-BLXCdzrT.js";import"./use-project-scope-hi480z1p.js";import"./repository-binding-BPraGDH6.js";import"./autosend-CUttN5XY.js";import"./use-decopilot-events-DGj-wEwB.js";import"./watch-sse-pool-DYaS1vyu.js";import"./task-board-M_bY8eys.js";import"./schema-D5kxh02n.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-DeyDa8Td.js";import"./location-V0VwTJTt.js";import"./delay-CnY5UFtP.js";import"./slugify-CEUa2lfQ.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./auth--QyNLTbP.js";import"./use-connect-companion-CXaOPPYN.js";import"./integration-icon-BwzO3Wq9.js";import"./agent-icon-B_vqhfDt.js";import"./AlertCircle-DuL_FFHx.js";import"./Tool01-Bhj-QHDu.js";import"./ArrowUp-Dn7IgtbA.js";import"./ArrowLeft-D94SnK45.js";import"./ShoppingBag01-B1nTczbE.js";import"./ZoomOut-DH4NDKgS.js";import"./Building02-BmRvdezs.js";import"./CheckCircle-BCzuQhZn.js";import"./ChevronUp-DWUYL4oz.js";import"./ChevronSelectorVertical-CxqUMZg6.js";import"./UserSquare-zP4-JvXz.js";import"./Copy01-B5Qm_DvO.js";import"./CreditCard01-8EhoJBRm.js";import"./DotsVertical-BmVaGWAg.js";import"./Image01-KdUybmWt.js";import"./Globe04-KfEeo3Pn.js";import"./SwitchHorizontal01-DQQsmdwN.js";import"./Key01-6z52NoNj.js";import"./Link01-oKshySD_.js";import"./Minus-BvqQFZHP.js";import"./Monitor01-DZmeiH6p.js";import"./Sun-D5qn9wPg.js";import"./Play-3WH9Ikap.js";import"./Plus-D3sv1Vc5.js";import"./SearchMd-DzFzOALq.js";import"./Trash01-DT07olaT.js";import"./Upload01-BocTk920.js";import"./User01-BqHvPhUP.js";import"./Users01-DfLHZjoX.js";import"./XClose-1FEelrZ4.js";import"./tooltip-rhtdmPcj.js";import"./index-XCP5r1I_.js";import"./form-KgHP-Hpi.js";import"./label-CG_DMVpg.js";import"./icon-button-uPrtYnSE.js";import"./use-debounced-value-CNkh6EY5.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-MmC9BfTO.js";import"./authenticate-and-persist-oauth-D2Ooe96m.js";import"./mcp-oauth-4UvGlLYO.js";import"./mcp-oauth-Bn5p4oSU.js";import"./track-CZFERlEy.js";import"./extract-connection-data-DFv9Bgl-.js";import"./connection-DJp1XqBL.js";import"./url-slug-DQ6KErQd.js";function nt(o){const t=R.c(21),{siteUrl:a}=o,r=U(),{org:s}=M(),n=T();let l;t[0]!==r||t[1]!==s?(l=()=>{localStorage.setItem(k.sidebarOpen(),JSON.stringify(!1));const x=V(s,E.REPORTS(s.id));r({...x,search:{...x.search,sidepanel:!1}})},t[0]=r,t[1]=s,t[2]=l):l=t[2];const i=l;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=e.jsx(z,{className:"bg-black/15 backdrop-blur-sm"}),t[3]=h):h=t[3];let m;t[4]!==n?(m=n("routes.reportsOnboarding.connectModal.dialogTitle"),t[4]=n,t[5]=m):m=t[5];let c;t[6]!==m?(c=e.jsx(D,{className:"sr-only",children:m}),t[6]=m,t[7]=c):c=t[7];let f;t[8]!==i||t[9]!==n?(f=()=>e.jsxs("div",{className:"grid gap-4 p-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.reportsOnboarding.connectModal.loadError")}),e.jsxs(w,{type:"button",size:"xl",className:"w-full",onClick:i,children:[n("routes.reportsOnboarding.connectModal.continueButton"),e.jsx(N,{size:18})]})]}),t[8]=i,t[9]=n,t[10]=f):f=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_=e.jsx(tt,{}),t[11]=_):_=t[11];let u;t[12]!==i||t[13]!==a?(u=e.jsx(S.Suspense,{fallback:_,children:e.jsx(lt,{siteUrlFromUrl:a,onComplete:i})}),t[12]=i,t[13]=a,t[14]=u):u=t[14];let d;t[15]!==f||t[16]!==u?(d=e.jsx(I,{fallback:f,children:u}),t[15]=f,t[16]=u,t[17]=d):d=t[17];let y;return t[18]!==c||t[19]!==d?(y=e.jsx(F,{open:!0,children:e.jsxs(L,{children:[h,e.jsxs(A,{"data-slot":"connect-modal",onEscapeKeyDown:st,onPointerDownOutside:it,onInteractOutside:at,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-soft duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[c,d]})]})}),t[18]=c,t[19]=d,t[20]=y):y=t[20],y}function at(o){return o.preventDefault()}function it(o){return o.preventDefault()}function st(o){return o.preventDefault()}function lt({siteUrlFromUrl:o,onComplete:t}){const a=T(),{org:r}=M(),s=E.REPORTS(r.id),n=X({connectionId:K,orgId:r.id,orgSlug:r.slug}),i=B({queryKey:H.reportsConnection(r.id,s),queryFn:async()=>{const p=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return C(p)},retry:!1}).data.item,h=typeof i?.metadata?.siteUrl=="string"?i.metadata.siteUrl:void 0,m=o||h,c=Y(m),[f,_]=S.useState(!0),[u,d]=S.useState(null),y=O({mutationFn:async p=>C(await n.callTool({name:"REPORTS_SETUP",arguments:{siteUrl:p}})),retry:!1}),x=O({mutationFn:async p=>C(await n.callTool({name:"REPORTS_RUN",arguments:{siteUrl:p}})),retry:!1}),v=async()=>{d(null),b("commerce_onboarding_open_report_clicked",{domain:c??void 0,organization_id:r.id});const p=m?$(m):null;if(p?.ok)try{let g=await x.mutateAsync(p.value);if(g.triggered||(b("commerce_onboarding_run_reclaim",{domain:c??void 0,organization_id:r.id,reason:g.reason??"not_upgraded"}),await y.mutateAsync(p.value),g=await x.mutateAsync(p.value)),!g.triggered){b("commerce_onboarding_run_failed",{domain:c??void 0,organization_id:r.id,error:g.reason??"not_triggered"}),d(a("routes.reportsOnboarding.connectModal.couldNotGenerateReport"));return}}catch(g){b("commerce_onboarding_run_failed",{domain:c??void 0,organization_id:r.id,error:g instanceof Error?g.message:String(g)}),d(a("routes.reportsOnboarding.connectModal.somethingWentWrong"));return}t()},P=Z("demo_mode"),j=f||P;return e.jsx(ot,{siteHost:c,footer:e.jsxs(e.Fragment,{children:[u?e.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(rt,{ready:j,pending:x.isPending,label:x.isPending?a("routes.reportsOnboarding.connectModal.openingReport"):a("routes.reportsOnboarding.connectModal.viewDiagnostic"),onClick:()=>{v()},children:e.jsx(N,{size:18})})}),j?null:e.jsx(w,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 py-3 text-base font-medium leading-tight",disabled:x.isPending,onClick:()=>{v()},children:a("routes.reportsOnboarding.connectModal.skip")})]})]}),children:e.jsx(et,{org:r,cdConnectionId:s,siteUrl:m,onReadinessChange:_})})}function Pe(){const o=R.c(7);let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},o[0]=t):t=o[0];const a=W(t),r="connect"in a&&a.connect==="1",s="siteUrl"in a&&typeof a.siteUrl=="string"?a.siteUrl:void 0;let n;o[1]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx(G,{children:e.jsx(J,{})}),o[1]=n):n=o[1];let l;o[2]!==r||o[3]!==s?(l=r&&e.jsx(nt,{siteUrl:s}),o[2]=r,o[3]=s,o[4]=l):l=o[4];let i;return o[5]!==l?(i=e.jsx(q,{children:e.jsxs(Q,{children:[n,l]})}),o[5]=l,o[6]=i):i=o[6],i}export{Pe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eH as O,aM as U,c as P,j as r,r as G,H as ee,b as F,B as K,a2 as te,K as Q,o as se,l as ne}from"./index-BSPqDg2b.js";import{u as re}from"./useSuspenseInfiniteQuery-BzZNrnpe.js";import{S as ae,c as ie}from"./sheet-BHsKOUfF.js";import{A as le}from"./avatar-C5-kxiV_.js";import{n as oe,t as ce}from"./ChevronUp-DWUYL4oz.js";import{n as W}from"./LinkBroken01-edPm2SIJ.js";import{u as de,M as ue}from"./pair-9h1O_BO7.js";import{D as me}from"./chat-context-DwIrrO5r.js";import{I as Y}from"./integration-icon-BwzO3Wq9.js";import{b as fe}from"./use-decopilot-events-DGj-wEwB.js";import{u as ge}from"./use-infinite-scroll-DcjLDU4h.js";import{g as xe}from"./task-status-D4WkmdQN.js";const z=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],he=40;function qe(t){const s=(t.endDate.getTime()-t.startDate.getTime())/he;return z.find(i=>i.ms>=s)?.label??z[z.length-1].label}function B(t){const e=z.find(l=>l.label===t);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(t);if(!s)return 6e4;const n=parseInt(s[1],10),i=s[2];return i==="h"?n*36e5:i==="d"?n*864e5:n*6e4}function pe(t,e){const s=new Date(t);return B(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function q(t,e){const s=B(e);return new Date(Math.floor(t.getTime()/s)*s)}function be(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Oe(t){return Number.isFinite(t)?t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toLocaleString():"0"}function Ue(t){return Number.isFinite(t)?`$${t.toFixed(t<1?4:2)}`:"$0.00"}function Ge(t,e,s){const n=B(s),i=q(e.startDate,s).getTime(),l=e.endDate.getTime(),a=new Map(t.map(c=>[q(new Date(c.timestamp),s).getTime(),c])),d=[];for(let c=i;c<=l;c+=n){const m=a.get(c),h=new Date(c).toISOString();d.push({t:h,ts:c,label:pe(h,s),calls:m?.calls??0,errors:m?.errors??0,errorRate:m?.errorRate??0,avg:m?.avg??0,p50:m?.p50??0,p95:m?.p95??0,inputTokens:m?.inputTokens??0,outputTokens:m?.outputTokens??0,totalTokens:m?.totalTokens??0,costUsd:m?.costUsd??0})}return d}function Qe(t,e,s,n){const i=new Map;for(const o of t)i.set(o.toolName,(i.get(o.toolName)??0)+o[e]);const l=[...i.entries()].sort((o,u)=>u[1]-o[1]).slice(0,s).map(([o])=>o),a=new Set(l),d=new Map,c=new Map;for(const o of t){if(!a.has(o.toolName))continue;const u=o.virtualMcpId??"";d.set(u,(d.get(u)??0)+o[e]),c.set(`${u}::${o.toolName}`,{calls:o.calls,errors:o.errors,outputSize:o.outputSize})}const m=[...d.entries()].sort((o,u)=>u[1]-o[1]).slice(0,n).map(([o])=>o);let h=0;for(const o of m)for(const u of l){const g=c.get(`${o}::${u}`);g&&g[e]>h&&(h=g[e])}return{topTools:l,topAgentIds:m,cellMap:c,maxValue:h}}function We(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ye(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:be(t.avgDurationMs)}function Z(t){return(t.run_config??{}).agent?.id??(t.virtual_mcp_id||null)}function J(t,e,s,n){if(!t)return n;const i=e.find(a=>a.id===t)??s?.find(a=>a.id===t);if(i?.title)return i.title;const l=O(t);return l?U(l).title??n:t}function X(t,e,s){if(!t)return null;const n=e.find(l=>l.id===t)??s?.find(l=>l.id===t);if(n?.icon)return n.icon;const i=O(t);return i?U(i).icon??null:null}function je(t){return t?.data?.members??[]}function H(t){const e=P.c(32),{thread:s,connections:n,virtualMcps:i,nav:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const N=Z(s);d=J(N,i,n,""),c=X(N,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;e[5]!==d||e[6]!==a||e[7]!==s.title?(h=d||s.title||a("orgs.threads.untitledChat"),e[5]=d,e[6]=a,e[7]=s.title,e[8]=h):h=e[8];let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(W,{}),e[9]=o):o=e[9];let u;e[10]!==m||e[11]!==h?(u=r.jsx(Y,{icon:m,name:h,size:"sm",fallbackIcon:o,className:"shadow-edge shrink-0 rounded-md"}),e[10]=m,e[11]=h,e[12]=u):u=e[12];let g;e[13]!==a||e[14]!==s.title?(g=s.title||a("orgs.threads.untitledChat"),e[13]=a,e[14]=s.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=r.jsx(ae,{className:"text-sm leading-snug truncate",children:g}),e[16]=g,e[17]=b):b=e[17];let v;e[18]!==d?(v=d&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:d}),e[18]=d,e[19]=v):v=e[19];let p;e[20]!==b||e[21]!==v?(p=r.jsxs("div",{className:"min-w-0",children:[b,v]}),e[20]=b,e[21]=v,e[22]=p):p=e[22];let f;e[23]!==u||e[24]!==p?(f=r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u,p]}),e[23]=u,e[24]=p,e[25]=f):f=e[25];let x;e[26]!==l||e[27]!==a?(x=l&&r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onPrev,disabled:l.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.previousChat"),children:r.jsx(oe,{size:14})}),r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onNext,disabled:l.index===l.total-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.nextChat"),children:r.jsx(ce,{size:14})})]}),e[26]=l,e[27]=a,e[28]=x):x=e[28];let j;return e[29]!==x||e[30]!==f?(j=r.jsx(ie,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:r.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[f,x]})}),e[29]=x,e[30]=f,e[31]=j):j=e[31],j}function ve(t){const e=P.c(62),{thread:s,connections:n,virtualMcps:i,members:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const I=Z(s);d=J(I,i,n,""),c=X(I,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;if(e[5]!==l||e[6]!==s.created_by){const I=je(l);let R;e[8]!==s.created_by?(R=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=R):R=e[9],h=I.find(R),e[5]=l,e[6]=s.created_by,e[7]=h}else h=e[7];const o=h;let u;e[10]!==o?.user.email||e[11]!==o?.user.name||e[12]!==s.created_by?(u=o?.user.name??o?.user.email??s.created_by?.substring(0,8)??"—",e[10]=o?.user.email,e[11]=o?.user.name,e[12]=s.created_by,e[13]=u):u=e[13];const g=u,b=o?.user.image??void 0;let v;e[14]!==s.created_at?(v=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=v):v=e[15];const p=v;let f,x,j,N,C,w;if(e[16]!==a||e[17]!==s.status){const I=xe(s.status),R=I.icon;f="px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm";let L;e[24]!==a?(L=a("orgs.threads.status"),e[24]=a,e[25]=L):L=e[25],e[26]!==L?(w=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[26]=L,e[27]=w):w=e[27],N="flex items-center gap-1.5",C=r.jsx(R,{size:13,className:I.iconClassName}),x=ne("text-sm",I.labelColor),j=a(I.labelKey),e[16]=a,e[17]=s.status,e[18]=f,e[19]=x,e[20]=j,e[21]=N,e[22]=C,e[23]=w}else f=e[18],x=e[19],j=e[20],N=e[21],C=e[22],w=e[23];let T;e[28]!==x||e[29]!==j?(T=r.jsx("span",{className:x,children:j}),e[28]=x,e[29]=j,e[30]=T):T=e[30];let S;e[31]!==T||e[32]!==N||e[33]!==C?(S=r.jsxs("div",{className:N,children:[C,T]}),e[31]=T,e[32]=N,e[33]=C,e[34]=S):S=e[34];let y;e[35]!==S||e[36]!==w?(y=r.jsxs("div",{children:[w,S]}),e[35]=S,e[36]=w,e[37]=y):y=e[37];let E;e[38]!==a?(E=a("orgs.threads.date"),e[38]=a,e[39]=E):E=e[39];let _;e[40]!==E?(_=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:E}),e[40]=E,e[41]=_):_=e[41];let M;e[42]!==p?(M=r.jsx("div",{className:"text-sm text-foreground",children:p}),e[42]=p,e[43]=M):M=e[43];let D;e[44]!==_||e[45]!==M?(D=r.jsxs("div",{children:[_,M]}),e[44]=_,e[45]=M,e[46]=D):D=e[46];let $;e[47]!==a||e[48]!==s.created_by||e[49]!==b||e[50]!==g?($=s.created_by&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.user")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(le,{url:b,fallback:g,shape:"circle",size:"2xs",className:"shrink-0"}),r.jsx("span",{className:"text-sm text-foreground",children:g})]})]}),e[47]=a,e[48]=s.created_by,e[49]=b,e[50]=g,e[51]=$):$=e[51];let k;e[52]!==m||e[53]!==d||e[54]!==a?(k=d&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.agent")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:m,name:d,size:"xs",fallbackIcon:r.jsx(W,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),r.jsx("span",{className:"text-sm text-foreground",children:d})]})]}),e[52]=m,e[53]=d,e[54]=a,e[55]=k):k=e[55];let A;return e[56]!==f||e[57]!==y||e[58]!==D||e[59]!==$||e[60]!==k?(A=r.jsxs("div",{className:f,children:[y,D,$,k]}),e[56]=f,e[57]=y,e[58]=D,e[59]=$,e[60]=k,e[61]=A):A=e[61],A}const V=100;function Ne(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.noMessagesInChat"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Me(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingMore"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}const Te=400,Se=5e3;function ye(t,e,s){const n=P.c(8),i=se(),l=G.useRef(null);let a;n[0]!==e||n[1]!==i||n[2]!==s?(a=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.invalidateQueries({queryKey:Q.threadMessages(e,s)})},Te)},n[0]=e,n[1]=i,n[2]=s,n[3]=a):a=n[3];const d=a;let c;n[4]!==t||n[5]!==d||n[6]!==s?(c={orgSlug:t,taskId:s,onStep:d,onFinish:d,onReconnect:d},n[4]=t,n[5]=d,n[6]=s,n[7]=c):c=n[7],fe(c)}function _e(t){const e=P.c(36),{client:s,locator:n,thread:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,{org:h}=te();let o;e[0]!==n||e[1]!==i.id?(o=Q.threadMessages(n,i.id),e[0]=n,e[1]=i.id,e[2]=o):o=e[2];let u;e[3]!==s||e[4]!==i.id?(u=async _=>{const{pageParam:M}=_,D=M===void 0?0:M;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:i.id,limit:V,offset:D}});return $.structuredContent??$},e[3]=s,e[4]=i.id,e[5]=u):u=e[5];let g;e[6]!==o||e[7]!==u?(g={queryKey:o,queryFn:u,initialPageParam:0,getNextPageParam:Ee,staleTime:0,refetchInterval:Se},e[6]=o,e[7]=u,e[8]=g):g=e[8];const{data:b,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:f}=re(g);ye(h.slug,n,i.id);let x;e[9]!==b.pages?(x=b.pages.flatMap(Ce).filter(we),e[9]=b.pages,e[10]=x):x=e[10];const j=x,N=de(j);let C;e[11]!==v||e[12]!==p||e[13]!==f?(C=()=>{p&&!f&&v()},e[11]=v,e[12]=p,e[13]=f,e[14]=C):C=e[14];const w=ge(C,p??!1,f);let T;e[15]!==l||e[16]!==c||e[17]!==i||e[18]!==a?(T=r.jsx(H,{thread:i,connections:l,virtualMcps:a,nav:c}),e[15]=l,e[16]=c,e[17]=i,e[18]=a,e[19]=T):T=e[19];let S;e[20]!==l||e[21]!==d||e[22]!==m||e[23]!==i||e[24]!==a?(S=m&&r.jsx(ve,{thread:i,connections:l,virtualMcps:a,members:d}),e[20]=l,e[21]=d,e[22]=m,e[23]=i,e[24]=a,e[25]=S):S=e[25];let y;e[26]!==f||e[27]!==w||e[28]!==N||e[29]!==j.length||e[30]!==i.status?(y=j.length===0?r.jsx(Ne,{}):r.jsx("div",{"data-chat-scroller":!0,className:"flex-1 overflow-y-auto min-h-0",children:r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[N.map((_,M)=>r.jsx("div",{ref:M===N.length-1?w:void 0,children:r.jsx(ue,{pair:_,isLastPair:M===N.length-1,status:M===N.length-1&&i.status==="in_progress"?"streaming":"ready"})},`pair-${_.user?.id??_.assistant?.id}`)),f&&r.jsx(Me,{})]})}),e[26]=f,e[27]=w,e[28]=N,e[29]=j.length,e[30]=i.status,e[31]=y):y=e[31];let E;return e[32]!==T||e[33]!==S||e[34]!==y?(E=r.jsxs(r.Fragment,{children:[T,S,y]}),e[32]=T,e[33]=S,e[34]=y,e[35]=E):E=e[35],E}function we(t){return t.role==="user"||t.role==="assistant"}function Ce(t){return t.items??[]}function Ee(t,e){const s=t,n=e;if(!((s?.items?.length??0)<V))return n.length*V}function Ie(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.failedToLoadMessages"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingConversation"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Ze(t){const e=P.c(31),{thread:s,client:n,locator:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,h=m===void 0?!0:m;let o;e[0]!==l||e[1]!==c||e[2]!==s||e[3]!==a?(o=r.jsx(H,{thread:s,connections:l,virtualMcps:a,nav:c}),e[0]=l,e[1]=c,e[2]=s,e[3]=a,e[4]=o):o=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(Ie,{}),e[5]=u):u=e[5];let g;e[6]!==o?(g=r.jsxs(r.Fragment,{children:[o,u]}),e[6]=o,e[7]=g):g=e[7];let b;e[8]!==l||e[9]!==c||e[10]!==s||e[11]!==a?(b=r.jsx(H,{thread:s,connections:l,virtualMcps:a,nav:c}),e[8]=l,e[9]=c,e[10]=s,e[11]=a,e[12]=b):b=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx($e,{}),e[13]=v):v=e[13];let p;e[14]!==b?(p=r.jsxs(r.Fragment,{children:[b,v]}),e[14]=b,e[15]=p):p=e[15];let f;e[16]!==n||e[17]!==l||e[18]!==i||e[19]!==d||e[20]!==h||e[21]!==c||e[22]!==s||e[23]!==a?(f=r.jsx(_e,{client:n,locator:i,thread:s,connections:l,virtualMcps:a,members:d,nav:c,meta:h}),e[16]=n,e[17]=l,e[18]=i,e[19]=d,e[20]=h,e[21]=c,e[22]=s,e[23]=a,e[24]=f):f=e[24];let x;e[25]!==p||e[26]!==f?(x=r.jsx(G.Suspense,{fallback:p,children:f}),e[25]=p,e[26]=f,e[27]=x):x=e[27];let j;return e[28]!==g||e[29]!==x?(j=r.jsx(me,{children:r.jsx(ee,{fallback:g,children:x})}),e[28]=g,e[29]=x,e[30]=j):j=e[30],j}export{Ze as T,Ue as a,Ge as b,be as c,Ye as d,We as e,Oe as f,qe as g,Qe as h,je as i,Z as j,X as k,J as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as C,by as I,j as i,bD as P,bE as O,e1 as v,eo as q,bx as B,ep as H,eq as R,bQ as K,bt as L,c as w,l as y}from"./index-BSPqDg2b.js";import{A as Q,t as U}from"./active-indicator-CCMhAsc_.js";import{T as J,a as W,c as X}from"./tooltip-rhtdmPcj.js";var E="Toggle",N=C.forwardRef((o,e)=>{const{pressed:t,defaultPressed:n,onPressedChange:s,...r}=o,[a,l]=I({prop:t,onChange:s,defaultProp:n??!1,caller:E});return i.jsx(P.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":o.disabled?"":void 0,...r,ref:e,onClick:O(o.onClick,()=>{o.disabled||l(!a)})})});N.displayName=E;var m="ToggleGroup",[A]=K(m,[R]),V=R(),z=v.forwardRef((o,e)=>{const{type:t,...n}=o;if(t==="single"){const s=n;return i.jsx(Y,{...s,ref:e})}if(t==="multiple"){const s=n;return i.jsx(Z,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${m}\``)});z.displayName=m;var[S,M]=A(m),Y=v.forwardRef((o,e)=>{const{value:t,defaultValue:n,onValueChange:s=()=>{},...r}=o,[a,l]=I({prop:t,defaultProp:n??"",onChange:s,caller:m});return i.jsx(S,{scope:o.__scopeToggleGroup,type:"single",value:v.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:v.useCallback(()=>l(""),[l]),children:i.jsx(D,{...r,ref:e})})}),Z=v.forwardRef((o,e)=>{const{value:t,defaultValue:n,onValueChange:s=()=>{},...r}=o,[a,l]=I({prop:t,defaultProp:n??[],onChange:s,caller:m}),d=v.useCallback(g=>l((u=[])=>[...u,g]),[l]),c=v.useCallback(g=>l((u=[])=>u.filter(p=>p!==g)),[l]);return i.jsx(S,{scope:o.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:d,onItemDeactivate:c,children:i.jsx(D,{...r,ref:e})})});z.displayName=m;var[ee,te]=A(m),D=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,disabled:n=!1,rovingFocus:s=!0,orientation:r,dir:a,loop:l=!0,...d}=o,c=V(t),g=B(a),u={role:"group",dir:g,...d};return i.jsx(ee,{scope:t,rovingFocus:s,disabled:n,children:s?i.jsx(H,{asChild:!0,...c,orientation:r,dir:g,loop:l,children:i.jsx(P.div,{...u,ref:e})}):i.jsx(P.div,{...u,ref:e})})}),j="ToggleGroupItem",$=v.forwardRef((o,e)=>{const t=M(j,o.__scopeToggleGroup),n=te(j,o.__scopeToggleGroup),s=V(o.__scopeToggleGroup),r=t.value.includes(o.value),a=n.disabled||o.disabled,l={...o,pressed:r,disabled:a},d=v.useRef(null);return n.rovingFocus?i.jsx(q,{asChild:!0,...s,focusable:!a,active:r,ref:d,children:i.jsx(k,{...l,ref:e})}):i.jsx(k,{...l,ref:e})});$.displayName=j;var k=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,value:n,...s}=o,r=M(j,t),a={role:"radio","aria-checked":o.pressed,"aria-pressed":void 0},l=r.type==="single"?a:void 0;return i.jsx(N,{...l,...s,ref:e,onPressedChange:d=>{d?r.onItemActivate(n):r.onItemDeactivate(n)}})}),ae=z,oe=$;const ne=L("inline-flex items-center justify-center gap-2 rounded-full text-sm font-medium hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-muted data-[state=on]:hover:bg-secondary-hover data-[state=on]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-ring outline-none transition-[color,background-color,box-shadow] whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"bg-card shadow-edge hover:bg-accent hover:text-accent-foreground",segmented:"text-muted-foreground hover:bg-transparent hover:text-foreground data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-[0_1px_2px_0_#0000000d] dark:data-[state=on]:bg-accent"},size:{default:"h-8 px-3 min-w-8",sm:"h-7 px-2.5 min-w-7",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),F=C.createContext({size:"default",variant:"default"}),re=U(':scope > [data-slot="toggle-group-item"][data-state="on"]');function ue(o){const e=w.c(24);let t,n,s,r,a;e[0]!==o?({className:n,variant:a,size:r,children:t,...s}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=r,e[5]=a):(t=e[1],n=e[2],s=e[3],r=e[4],a=e[5]);const l=a==="segmented"&&s.type==="single",d=l||void 0;let c;e[6]!==n?(c=y("group/toggle-group relative flex w-fit items-center rounded-full data-[variant=segmented]:bg-muted data-[variant=segmented]:gap-0.5 data-[variant=segmented]:p-0.5 data-[variant=outline]:after:pointer-events-none data-[variant=outline]:after:absolute data-[variant=outline]:after:inset-0 data-[variant=outline]:after:rounded-full data-[variant=outline]:after:shadow-edge data-[variant=outline]:bg-card data-[variant=outline]:after:content-['']",n),e[6]=n,e[7]=c):c=e[7];let g;e[8]!==l?(g=l&&i.jsx("span",{"aria-hidden":!0,ref:re,"data-slot":"toggle-group-indicator",className:y(Q,"bg-background dark:bg-accent top-0.5 bottom-0.5 rounded-full shadow-[0_1px_2px_0_#0000000d] opacity-0 in-data-has-active:opacity-100")}),e[8]=l,e[9]=g):g=e[9];let u;e[10]!==r||e[11]!==a?(u={variant:a,size:r},e[10]=r,e[11]=a,e[12]=u):u=e[12];let p;e[13]!==t||e[14]!==u?(p=i.jsx(F.Provider,{value:u,children:t}),e[13]=t,e[14]=u,e[15]=p):p=e[15];let f;return e[16]!==s||e[17]!==r||e[18]!==d||e[19]!==c||e[20]!==g||e[21]!==p||e[22]!==a?(f=i.jsxs(ae,{"data-slot":"toggle-group","data-variant":a,"data-size":r,"data-sliding":d,className:c,...s,children:[g,p]}),e[16]=s,e[17]=r,e[18]=d,e[19]=c,e[20]=g,e[21]=p,e[22]=a,e[23]=f):f=e[23],f}function se(o){const e=w.c(4);let t;if(e[0]!==o){const{"data-state":s,...r}=o;t=r,e[0]=o,e[1]=t}else t=e[1];let n;return e[2]!==t?(n=i.jsx(oe,{...t}),e[2]=t,e[3]=n):n=e[3],n}function ce(o){const e=w.c(30);let t,n,s,r,a,l;e[0]!==o?({className:n,children:t,variant:l,size:r,tooltip:a,...s}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=s,e[4]=r,e[5]=a,e[6]=l):(t=e[1],n=e[2],s=e[3],r=e[4],a=e[5],l=e[6]);const d=C.useContext(F);let c;e[7]!==t?(c=C.isValidElement(t),e[7]=t,e[8]=c):c=e[8];const g=c,u=d.variant||l,p=d.size||r,f=g||void 0;let x;e[9]!==n||e[10]!==d.size||e[11]!==d.variant||e[12]!==r||e[13]!==l?(x=y(ne({variant:d.variant||l,size:d.size||r}),"relative z-10 min-w-0 flex-1 shrink-0 rounded-none first:rounded-l-full last:rounded-r-full focus:z-10 focus-visible:z-10 data-[icon-only]:aspect-square data-[icon-only]:px-0","data-[variant=segmented]:flex-none data-[variant=segmented]:rounded-full in-data-sliding:data-[state=on]:bg-transparent in-data-sliding:data-[state=on]:shadow-none","data-[variant=outline]:shadow-none data-[variant=outline]:border-hairline data-[variant=outline]:not-first:border-l",n),e[9]=n,e[10]=d.size,e[11]=d.variant,e[12]=r,e[13]=l,e[14]=x):x=e[14];let T;e[15]!==t||e[16]!==s||e[17]!==u||e[18]!==p||e[19]!==f||e[20]!==x||e[21]!==a?(T=i.jsx(se,{"data-slot":"toggle-group-item","data-variant":u,"data-size":p,"data-icon-only":f,"aria-label":a,className:x,...s,children:t}),e[15]=t,e[16]=s,e[17]=u,e[18]=p,e[19]=f,e[20]=x,e[21]=a,e[22]=T):T=e[22];const G=T;if(!a)return G;let h;e[23]!==G?(h=i.jsx(J,{asChild:!0,children:G}),e[23]=G,e[24]=h):h=e[24];let b;e[25]!==a?(b=i.jsx(W,{children:a}),e[25]=a,e[26]=b):b=e[26];let _;return e[27]!==h||e[28]!==b?(_=i.jsxs(X,{children:[h,b]}),e[27]=h,e[28]=b,e[29]=_):_=e[29],_}export{ce as T,ue as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as m,$ as _}from"./index-BSPqDg2b.js";const y="onepager",l="report:auth-attempt:",p=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${l}${e}`}function f(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function s(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>p?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function d(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function g(e){const t=s(e);if(t)return t;const n={attempt_id:f(),domain:e,gate_shown_at:Date.now(),...c()};return d(n),n}function R(e,t){const n={...g(e),...t};return d(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function v(e){const t=s(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e,t,n){if(m())try{_.capture(e,{...c(),...t},n)}catch{}}export{y as R,T as a,S as b,I as c,g as d,v as e,h as r,R as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,b as G,o as I,e as J,K as L,t as H}from"./index-BSPqDg2b.js";import{u as Y,D as $,F as U,G as X,M as Z,N as ee,as as T,L as te,O as ne,at as se,au as q,av as oe,aw as ae,ax as re}from"./site-editor-toast-CrL8-myE.js";import{a as ie}from"./use-move-blocks-DJK_Y1io.js";import{K as ce}from"./parse-sections-DS7cH63b.js";import{c as W}from"./blocks-tab-states-DSvvcfKU.js";function le(m,e){const s=(m.deletes??[]).filter(t=>!Object.hasOwn(m.writes,t)),a=[...Object.keys(m.writes),...s],o={},n=[];for(const t of a){const R=e(t);R===void 0?n.push(t):o[t]=R}return n.length>0?{kind:"unread",blockKeys:n}:{kind:"apply",patch:{set:m.writes,...s.length>0?{delete:s}:{}},ifMatch:o}}function ue(m){return new ae(re.Conflict,"not read yet",{entries:Object.fromEntries(m.map(e=>[e,{expected:null,actual:null}]))})}function me(m){const e=z.c(51),{orgSlug:s,virtualMcpId:a,branch:o}=m,n=G(),t=I(),R=Y(a,o),f=R.kind==="protocol"?R:null;let P;e[0]!==o||e[1]!==s||e[2]!==a?(P={orgSlug:s,virtualMcpId:a,branch:o},e[0]=o,e[1]=s,e[2]=a,e[3]=P):P=e[3];const r=$(P);let S;e[4]!==o||e[5]!==s||e[6]!==a?(S={orgSlug:s,virtualMcpId:a,branch:o},e[4]=o,e[5]=s,e[6]=a,e[7]=S):S=e[7];const d=S;let j;e[8]!==r?(j=L.decofile(r),e[8]=r,e[9]=j):j=e[9];const b=j;let v;e[10]!==o||e[11]!==s||e[12]!==a?(v=X(s,a,o),e[10]=o,e[11]=s,e[12]=a,e[13]=v):v=e[13];let g;e[14]!==o||e[15]!==s||e[16]!==a?(g=U(s,a,o),e[14]=o,e[15]=s,e[16]=a,e[17]=g):g=e[17];let E;e[18]!==r||e[19]!==d||e[20]!==f||e[21]!==t?(E=async y=>{const i=le(y,c=>Object.hasOwn(y.pinned,c)?y.pinned[c]:q(t,r,c));if(i.kind==="unread")throw ue(i.blockKeys);return Z(t,f,d,r,i.patch,i.ifMatch)},e[18]=r,e[19]=d,e[20]=f,e[21]=t,e[22]=E):E=e[22];let _;e[23]!==v||e[24]!==g||e[25]!==E?(_={mutationKey:v,scope:g,mutationFn:E},e[23]=v,e[24]=g,e[25]=E,e[26]=_):_=e[26];const O=J(_);let D;e[27]!==r||e[28]!==d||e[29]!==f||e[30]!==t||e[31]!==n?(D=async y=>{for(const i of y)await ee(t,f,d,r,i);return H.info(n("sectionsEditor.namedRules.changedMeanwhile"),{...T,description:n("sectionsEditor.namedRules.changedMeanwhileHint")}),{ok:!1,reason:"changed"}},e[27]=r,e[28]=d,e[29]=f,e[30]=t,e[31]=n,e[32]=D):D=e[32];const x=D;let M,p;if(e[33]!==r||e[34]!==x||e[35]!==O||e[36]!==d||e[37]!==f||e[38]!==t||e[39]!==b||e[40]!==n){M=async i=>{if(!f)return H.info(n("sectionsEditor.namedRules.unavailable"),{...T,description:n("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const c=ce(i.writes),C=(i.deletes??[]).filter(u=>!Object.hasOwn(c,u)),h=[...Object.keys(c),...C],w=t.getQueryData(b),K=await y(h,w);if(!K)return x(h);const l=new Map;for(const u of h)w&&Object.hasOwn(w,u)&&l.set(u,w[u]);t.setQueryData(b,u=>ie(u,{writes:c,deletes:C})),t.cancelQueries({queryKey:b});try{return await O.mutateAsync({writes:c,deletes:C,pinned:K}),{ok:!0}}catch(u){const k=u;return t.setQueryData(b,N=>{if(!N)return N;const V={...N};for(const Q of h)l.has(Q)?V[Q]=l.get(Q):delete V[Q];return V}),te(k)?x(h):(ne(n,k instanceof Error?k:new Error(String(k)),f.source),{ok:!1,reason:"failed"})}};const y=async(i,c)=>{const C=se(t,d),h={},w=[];for(const l of i){if(C.has(l))continue;const u=q(t,r,l);u===void 0?w.push(l):h[l]=u}if(w.length===0)return h;const K=await p();if(!K)return null;for(const l of w){const u=!!c&&Object.hasOwn(c,l);if(u!==Object.hasOwn(K,l)||u&&W(K[l])!==W(c[l]))return null;const k=q(t,r,l);if(k===void 0)return null;h[l]=k}return h};p=async()=>{if(!f)return null;try{return(await oe(t,f,d,r)).blocks}catch{return null}},e[33]=r,e[34]=x,e[35]=O,e[36]=d,e[37]=f,e[38]=t,e[39]=b,e[40]=n,e[41]=M,e[42]=p}else M=e[41],p=e[42];let A;e[43]!==p||e[44]!==n?(A=async y=>{const i=await p();if(!i)return H.info(n("sectionsEditor.namedRules.unavailable"),{...T,description:n("sectionsEditor.namedRules.unavailableHint")}),null;const c=y(i);return c||H.info(n("sectionsEditor.namedRules.changedMeanwhile"),{...T,description:n("sectionsEditor.namedRules.changedMeanwhileHint")}),c},e[43]=p,e[44]=n,e[45]=A):A=e[45];const F=A;let B;return e[46]!==M||e[47]!==O.isPending||e[48]!==F||e[49]!==p?(B={apply:M,reread:p,planStored:F,isPending:O.isPending},e[46]=M,e[47]=O.isPending,e[48]=F,e[49]=p,e[50]=B):B=e[50],B}export{me as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,r as l}from"./index-BSPqDg2b.js";const _=700;function D(s,a,p){const e=T.c(8),f=p?.delay??_,g=p?.isSaving??!1,[m,d]=l.useState(s),[y,A]=l.useState(s),[r,i]=l.useState(!1),t=l.useRef(null);s!==y&&(A(s),!r&&!g&&d(s));let c;e[0]!==f||e[1]!==a?(c=o=>{d(o),i(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,i(!1),a(o)},f)},e[0]=f,e[1]=a,e[2]=c):c=e[2];const S=c;let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=o=>{d(o),t.current&&clearTimeout(t.current),t.current=null,i(!1)},e[3]=n):n=e[3];const E=n;let u;return e[4]!==m||e[5]!==r||e[6]!==S?(u=[m,S,E,r],e[4]=m,e[5]=r,e[6]=S,e[7]=u):u=e[7],u}export{D as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,a2 as C,J as N,de as S,df as p,dg as A,dd as T,m as v}from"./index-BSPqDg2b.js";import{u as I,a as E}from"./use-mcp-client-BYbk6jXo.js";function _(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const l=i;let n,e,d,s;o[2]!==l?({binding:n,includeVirtual:d,slug:s,...e}=l,o[2]=l,o[3]=n,o[4]=e,o[5]=d,o[6]=s):(n=o[3],e=o[4],d=o[5],s=o[6]);let c;o[7]!==n||o[8]!==e.additionalToolArgs||o[9]!==d||o[10]!==s?(c={...e.additionalToolArgs},n!==void 0&&(c.binding=n),d!==void 0&&(c.include_virtual=d),s!==void 0&&(c.slug=s),o[7]=n,o[8]=e.additionalToolArgs,o[9]=d,o[10]=s,o[11]=c):c=o[11];let g;o[12]!==c?(g=Object.keys(c).length>0?c:void 0,o[12]=c,o[13]=g):g=o[13];let r;o[14]!==e||o[15]!==g?(r={...e,additionalToolArgs:g},o[14]=e,o[15]=g,o[16]=r):r=o[16];const O=r,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:N,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const m=I(a);return S(u.id,"CONNECTIONS",m,O)}function $(t){const o=f.c(3),{org:i}=C();let l;o[0]!==i.id||o[1]!==i.slug?(l={connectionId:N,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=l):l=o[2];const n=I(l);return A(i.id,"CONNECTIONS",t,n)}function k(t){const o=f.c(10),{org:i}=C();let l;o[0]!==i.id||o[1]!==i.slug?(l={connectionId:N,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=l):l=o[2];const n=E(l);let e;o[3]!==n||o[4]!==t||o[5]!==i.id?(e=T(i.id,"CONNECTIONS",t,n),o[3]=n,o[4]=t,o[5]=i.id,o[6]=e):e=o[6];const d=!!n&&!!t;let s;o[7]!==e||o[8]!==d?(s={...e,enabled:d},o[7]=e,o[8]=d,o[9]=s):s=o[9];const{data:c}=v(s);return c?.item??null}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:N,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const l=I(i);return p(o.id,"CONNECTIONS",l)}export{$ as a,x as b,k as c,_ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as y,c as S,d as j,b as D,e as M}from"./differenceInSeconds-C3x8sHUj.js";import{F as x}from"./index-BSPqDg2b.js";let F={};function T(){return F}function W(e){const a=y(e),t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return t.setUTCFullYear(a.getFullYear()),+e-+t}function P(e,...a){const t=S.bind(null,e||a.find(o=>typeof o=="object"));return a.map(t)}function v(e,a){const t=+y(e)-+y(a);return t<0?-1:t>0?1:t}function $(e){return S(e,Date.now())}function C(e,a,t){const[o,n]=P(t?.in,e,a),s=o.getFullYear()-n.getFullYear(),i=o.getMonth()-n.getMonth();return s*12+i}function X(e,a){const t=y(e,a?.in);return t.setHours(23,59,59,999),t}function q(e,a){const t=y(e,a?.in),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function z(e,a){const t=y(e,a?.in);return+X(t,a)==+q(t,a)}function A(e,a,t){const[o,n,s]=P(t?.in,e,e,a),i=v(n,s),r=Math.abs(C(n,s));if(r<1)return 0;n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*r);let l=v(n,s)===-i;z(o)&&r===1&&v(o,s)===1&&(l=!1);const u=i*(r-+l);return u===0?0:u}const O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},N=(e,a,t)=>{let o;const n=O[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",a.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+o:o+" ago":o};function b(e){return(a={})=>{const t=a.width?String(a.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const V={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_={date:b({formats:V,defaultWidth:"full"}),time:b({formats:Y,defaultWidth:"full"}),dateTime:b({formats:H,defaultWidth:"full"})},L={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E=(e,a,t,o)=>L[e];function m(e){return(a,t)=>{const o=t?.context?String(t.context):"standalone";let n;if(o==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,r=t?.width?String(t.width):i;n=e.formattingValues[r]||e.formattingValues[i]}else{const i=e.defaultWidth,r=t?.width?String(t.width):e.defaultWidth;n=e.values[r]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(a):a;return n[s]}}const R={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K=(e,a)=>{const t=Number(e),o=t%100;if(o>20||o<10)switch(o%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},G={ordinalNumber:K,era:m({values:R,defaultWidth:"wide"}),quarter:m({values:I,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:Q,defaultWidth:"wide"}),day:m({values:J,defaultWidth:"wide"}),dayPeriod:m({values:B,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})};function c(e){return(a,t={})=>{const o=t.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=a.match(n);if(!s)return null;const i=s[0],r=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?ee(r,w=>w.test(i)):Z(r,w=>w.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=t.valueCallback?t.valueCallback(u):u;const h=a.slice(i.length);return{value:u,rest:h}}}function Z(e,a){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&a(e[t]))return t}function ee(e,a){for(let t=0;t<e.length;t++)if(a(e[t]))return t}function k(e){return(a,t={})=>{const o=a.match(e.matchPattern);if(!o)return null;const n=o[0],s=a.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const r=a.slice(n.length);return{value:i,rest:r}}}const te=/^(\d+)(th|st|nd|rd)?/i,ae=/\d+/i,ne={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oe={any:[/^b/i,/^(a|c)/i]},re={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},se={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},de={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ue={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},me={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ce={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},le={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:k({matchPattern:te,parsePattern:ae,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),quarter:c({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),day:c({matchPatterns:ue,defaultMatchWidth:"wide",parsePatterns:me,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:ce,defaultMatchWidth:"any",parsePatterns:le,defaultParseWidth:"any"})},fe={code:"en-US",formatDistance:N,formatLong:_,formatRelative:E,localize:G,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ge(e,a,t){const o=T(),n=t?.locale??o.locale??fe,s=2520,i=v(e,a);if(isNaN(i))throw new RangeError("Invalid time value");const r=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:i}),[l,u]=P(t?.in,...i>0?[a,e]:[e,a]),h=j(u,l),w=(W(u)-W(l))/1e3,d=Math.round((h-w)/60);let g;if(d<2)return t?.includeSeconds?h<5?n.formatDistance("lessThanXSeconds",5,r):h<10?n.formatDistance("lessThanXSeconds",10,r):h<20?n.formatDistance("lessThanXSeconds",20,r):h<40?n.formatDistance("halfAMinute",0,r):h<60?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",1,r):d===0?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",d,r);if(d<45)return n.formatDistance("xMinutes",d,r);if(d<90)return n.formatDistance("aboutXHours",1,r);if(d<D){const f=Math.round(d/60);return n.formatDistance("aboutXHours",f,r)}else{if(d<s)return n.formatDistance("xDays",1,r);if(d<M){const f=Math.round(d/D);return n.formatDistance("xDays",f,r)}else if(d<M*2)return g=Math.round(d/M),n.formatDistance("aboutXMonths",g,r)}if(g=A(u,l),g<12){const f=Math.round(d/M);return n.formatDistance("xMonths",f,r)}else{const f=g%12,p=Math.trunc(g/12);return f<3?n.formatDistance("aboutXYears",p,r):f<9?n.formatDistance("overXYears",p,r):n.formatDistance("almostXYears",p+1,r)}}function Je(e,a){return ge(e,$(e),a)}const be={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},ye=(e,a,t)=>{let o;const n=be[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",String(a)),t?.addSuffix?t.comparison&&t.comparison>0?"em "+o:"há "+o:o},we={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Me={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ve={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pe={date:b({formats:we,defaultWidth:"full"}),time:b({formats:Me,defaultWidth:"full"}),dateTime:b({formats:ve,defaultWidth:"full"})},Pe={lastWeek:e=>{const a=e.getDay();return"'"+(a===0||a===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},De=(e,a,t,o)=>{const n=Pe[e];return typeof n=="function"?n(a):n},We={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Se={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ke={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},je={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},xe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Fe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Te=(e,a)=>{const t=Number(e);return a?.unit==="week"?t+"ª":t+"º"},$e={ordinalNumber:Te,era:m({values:We,defaultWidth:"wide"}),quarter:m({values:Se,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:ke,defaultWidth:"wide"}),day:m({values:je,defaultWidth:"wide"}),dayPeriod:m({values:xe,defaultWidth:"wide",formattingValues:Fe,defaultFormattingWidth:"wide"})},Ce=/^(\d+)[ºªo]?/i,Xe=/\d+/i,qe={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},ze={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Ae={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},Ne={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Ve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Ye={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},He={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},_e={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Le={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},Ee={ordinalNumber:k({matchPattern:Ce,parsePattern:Xe,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:qe,defaultMatchWidth:"wide",parsePatterns:ze,defaultParseWidth:"any"}),quarter:c({matchPatterns:Ae,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any"}),day:c({matchPatterns:Ye,defaultMatchWidth:"wide",parsePatterns:He,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:_e,defaultMatchWidth:"any",parsePatterns:Le,defaultParseWidth:"any"})},Re={code:"pt-BR",formatDistance:ye,formatLong:pe,formatRelative:De,localize:$e,match:Ee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Be(){const[e]=x();return e.language==="pt-BR"?Re:void 0}export{W as a,fe as e,Je as f,T as g,P as n,Be as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a2 as C,an as I,m as g,K,r as S,y as b}from"./index-BSPqDg2b.js";import{u as m}from"./use-ai-providers-DeyDa8Td.js";const a=new Map;function w(){const{org:t}=C(),c=I(),s=m(),o=s.find(n=>n.providerId==="deco"),{data:i,isLoading:d,refetch:l,isFetching:u}=g({queryKey:K.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await c.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),e=i?.balanceCents??null,p=e!=null?e/100:null,r=S.useRef(new Map);if(e!=null){const n=a.get(t.id);r.current.get(t.id)&&n!=null&&e>n&&b("credits_topped_up_detected",{organization_id:t.id,delta_cents:e-n,previous_balance_cents:n,new_balance_cents:e}),a.set(t.id,e),r.current.set(t.id,!0)}const y=!!o,f=e!=null&&e>0,_=e!=null&&e===0,h=e!=null&&e===200,v=s.length>0&&s.every(n=>n.providerId==="deco");return{hasDecoKey:y,decoKeyId:o?.id??null,balanceCents:e,balanceDollars:p,hasCredits:f,isZeroBalance:_,isInitialFreeCredit:h,hasOnlyDecoProvider:v,isLoading:d,isFetching:u,refetch:l}}export{w as u};
|