decocms 4.500.5 → 4.500.7
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-B7OXPrvi.js → ActiveShapeUtils-DHLjYBHG.js} +1 -1
- package/dist/client/assets/{AlertCircle-DWGeVbRZ.js → AlertCircle-BILwGqjV.js} +1 -1
- package/dist/client/assets/{AreaChart-EU8uhxm4.js → AreaChart-MBaQ2sXA.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DKZiHtC9.js → ArrowLeft-DlRqrbst.js} +1 -1
- package/dist/client/assets/{ArrowUp-BmS2ipPe.js → ArrowUp-CFc2wNu3.js} +1 -1
- package/dist/client/assets/{BarChart-C5BexF1_.js → BarChart-ip63zVKP.js} +1 -1
- package/dist/client/assets/{Building02-CmZEvaAI.js → Building02-QB_UI3sB.js} +1 -1
- package/dist/client/assets/{CategoricalChart-N0xPZGNf.js → CategoricalChart-CD4E_XC5.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cxvlb0-w.js → CheckCircle-CG1RvCMD.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cz_mr8Ub.js → ChevronSelectorVertical-23OZgHQl.js} +1 -1
- package/dist/client/assets/{ChevronUp-BXbTXhXZ.js → ChevronUp-BrMcnDd0.js} +1 -1
- package/dist/client/assets/{Copy01-Daz7AFYE.js → Copy01-QpufVNbj.js} +1 -1
- package/dist/client/assets/{CreditCard01-BFLArPt1.js → CreditCard01-W1zS1W7o.js} +1 -1
- package/dist/client/assets/{DotsVertical-B5WoSbKn.js → DotsVertical-E-CAHxZx.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-QrHgjTMs.js → ErrorBarContext-DoXCMhKl.js} +1 -1
- package/dist/client/assets/{Globe04-CHujm8Rh.js → Globe04-C2IFbCwJ.js} +1 -1
- package/dist/client/assets/{Image01-6k6QI1dX.js → Image01-D8Dg78Ju.js} +1 -1
- package/dist/client/assets/{Key01-BCUfWyre.js → Key01-CCpcNn9J.js} +1 -1
- package/dist/client/assets/{Link01-B2ZUVqeX.js → Link01-Dw-VkUVV.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Shxg1MDA.js → LinkBroken01-BBYM52IU.js} +1 -1
- package/dist/client/assets/{Monitor01-C6hS1MDr.js → Monitor01-596xyLh3.js} +1 -1
- package/dist/client/assets/{Play-C5HXiIgy.js → Play-CIe1tupB.js} +1 -1
- package/dist/client/assets/{Plus-BGNNWymV.js → Plus-DTyq8wfJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CMyj3n9E.js → SearchMd-DnZ_sK_U.js} +1 -1
- package/dist/client/assets/{Sector-BIfxElqq.js → Sector-iSjEHRg-.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DhBZJiPR.js → ShoppingBag01-Brrt7Bh6.js} +1 -1
- package/dist/client/assets/{Sun-BZz5Ay79.js → Sun-BmhcFIJl.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CDaKlB_n.js → SwitchHorizontal01-B5sfCWHV.js} +1 -1
- package/dist/client/assets/{Tool01-CIRW7kd4.js → Tool01-BSpg9N8Q.js} +1 -1
- package/dist/client/assets/{Trash01-BJZRU-Yu.js → Trash01-uPItCfKQ.js} +1 -1
- package/dist/client/assets/{Upload01-CdF0U1Ox.js → Upload01-ClSeM0gf.js} +1 -1
- package/dist/client/assets/{User01-Swj6Wyaw.js → User01-DabbLHAZ.js} +1 -1
- package/dist/client/assets/{UserSquare--AVOLLKT.js → UserSquare-BXjBRbTF.js} +1 -1
- package/dist/client/assets/{Users01-BguvMR-H.js → Users01-Dt36FENA.js} +1 -1
- package/dist/client/assets/{XAxis-CVekAfnj.js → XAxis-BQtU7n4v.js} +1 -1
- package/dist/client/assets/{XClose-CxTFVFLs.js → XClose-BMDlg-34.js} +1 -1
- package/dist/client/assets/{ZoomOut-C7vMH9KG.js → ZoomOut-Bnst3wtU.js} +1 -1
- package/dist/client/assets/{access-gate-BifQwyWv.js → access-gate-BnarIuC9.js} +1 -1
- package/dist/client/assets/add-connection-dialog-BB_zBu7s.js +1 -0
- package/dist/client/assets/agent-analytics-DJ6OqUua.js +2 -0
- package/dist/client/assets/agent-app-6ZZFFR6d.js +1 -0
- package/dist/client/assets/agent-assets-BHKSbhmH.js +1 -0
- package/dist/client/assets/{agent-automation-o2OSd9jI.js → agent-automation-BEmy5bSr.js} +1 -1
- package/dist/client/assets/{agent-automations-CSVjvgdr.js → agent-automations-p8P_f3PC.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BZpypWKp.js → agent-connect-sources-DHxXXvzx.js} +1 -1
- package/dist/client/assets/agent-deck-kxbwQZGK.js +1 -0
- package/dist/client/assets/agent-e2e-BPE2bY36.js +1 -0
- package/dist/client/assets/agent-experiments-ChC-SJXX.js +1 -0
- package/dist/client/assets/agent-file-BFxmR6QX.js +1 -0
- package/dist/client/assets/agent-hosting-BV7C2pVl.js +1 -0
- package/dist/client/assets/{agent-icon-CvfPq7BK.js → agent-icon-BdZdLCky.js} +1 -1
- package/dist/client/assets/agent-library-dgFnuWrg.js +1 -0
- package/dist/client/assets/agent-library-file-LGRVpT_Z.js +1 -0
- package/dist/client/assets/agent-monitor-CbF33zT0.js +1 -0
- package/dist/client/assets/{agent-overview-CsT5BzSM.js → agent-overview-CiiRxzYe.js} +1 -1
- package/dist/client/assets/agent-settings-CFC23BeV.js +1 -0
- package/dist/client/assets/{agent-site-editor-DekWNKPY.js → agent-site-editor-Dq16bHz8.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-B3URMZgm.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CKfeDMKr.js → agent-site-editor-content-CbMNndHb.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-Oi61j7xj.js → agent-site-editor-preview-Dy_HN_0a.js} +3 -3
- package/dist/client/assets/agent-view-AaYNRrLl.js +1 -0
- package/dist/client/assets/{agent-view-guard-DF_nEERP.js → agent-view-guard-CShYlKBB.js} +1 -1
- package/dist/client/assets/{agents-list-LRAFnay6.js → agents-list-qSpN3sGU.js} +1 -1
- package/dist/client/assets/{ai-providers-BgUnArjx.js → ai-providers-DwrXOrzh.js} +1 -1
- package/dist/client/assets/{alert-Ds8Pbd5J.js → alert-Tk2m0Iz_.js} +1 -1
- package/dist/client/assets/{alert-dialog-BoGCVrZa.js → alert-dialog-By0HRTrM.js} +1 -1
- package/dist/client/assets/{analytics-sections-BOYksc63.js → analytics-sections-BjYHHt7V.js} +1 -1
- package/dist/client/assets/api-keys-CvurWoww.js +1 -0
- package/dist/client/assets/{api-keys-uNOKnF25.js → api-keys-DaMqNdv1.js} +1 -1
- package/dist/client/assets/app-editor-Dtvslmpt.js +1 -0
- package/dist/client/assets/{asset-utils-C0JplDix.js → asset-utils-Cne_zeGQ.js} +1 -1
- package/dist/client/assets/{auth-CtdecWhn.js → auth-CTn9OsYL.js} +1 -1
- package/dist/client/assets/{auth-catchall-CGU8Tb_2.js → auth-catchall-CMbAfThb.js} +1 -1
- package/dist/client/assets/{auth-entry-DIyt51AK.js → auth-entry-CcnG-745.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CXs4JEXj.js → auth-split-layout--aU7QLNo.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cs8htcLH.js → authenticate-and-persist-oauth-bcqFV5Ih.js} +1 -1
- package/dist/client/assets/{automation-list-row-BtyEuPas.js → automation-list-row-3u6JAmgN.js} +1 -1
- package/dist/client/assets/{automation-runs-fZgz2Hqj.js → automation-runs-Cy2qWf8T.js} +1 -1
- package/dist/client/assets/{automations-n2079ZKl.js → automations-B06cv6_Q.js} +1 -1
- package/dist/client/assets/{autosend-Bed_2rHW.js → autosend-Cr5TlS-x.js} +1 -1
- package/dist/client/assets/{avatar-BWSDv40I.js → avatar-DNs314ny.js} +1 -1
- package/dist/client/assets/{badge-BZ6ZWtlL.js → badge-BDMYkxf_.js} +1 -1
- package/dist/client/assets/{block-document-C_IW_573.js → block-document-BkfPgGlg.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CyLjsfnh.js → blocks-preview-workspace-context-D5JWaTS4.js} +1 -1
- package/dist/client/assets/{blog-schema-DTGd3Oxs.js → blog-schema-Qz918NIm.js} +1 -1
- package/dist/client/assets/{board-analytics-BypUwbOK.js → board-analytics-B8AHF8AB.js} +1 -1
- package/dist/client/assets/{buckets-DBWKw8M4.js → buckets-CUa7QjX3.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-ClJ1Tfl6.js → build-improve-prompt-doc-l6jHAadC.js} +1 -1
- package/dist/client/assets/{calendar-CUQ5339S.js → calendar-9HE_r4Hw.js} +1 -1
- package/dist/client/assets/{capability-load-error-BglSkYA0.js → capability-load-error-DVDKy7cm.js} +1 -1
- package/dist/client/assets/category-editor-w7_HM15g.js +1 -0
- package/dist/client/assets/{chart-DmxPBeeD.js → chart-n7qVLeZu.js} +1 -1
- package/dist/client/assets/{chat-context-CQm-6egv.js → chat-context-DszOftwV.js} +5 -5
- package/dist/client/assets/{chat-draft-CLRrKKYW.js → chat-draft-Bi-CpEK_.js} +1 -1
- package/dist/client/assets/{checkbox-cJ0fZWJo.js → checkbox-jukyyas4.js} +1 -1
- package/dist/client/assets/{choose-editor-Cc1TcbHd.js → choose-editor-BpukaXWx.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-DgYG3gXQ.js → claim-phase-copy-gKkPnPW4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DhKKsoxy.js → cli-auth-success-ZwkiiHM_.js} +1 -1
- package/dist/client/assets/{client-icons-BGVAhs-F.js → client-icons-CI6qGlDq.js} +1 -1
- package/dist/client/assets/{collapsible-Di8zO8dv.js → collapsible-CSMgVqT4.js} +1 -1
- package/dist/client/assets/collection-detail-D7Eq0q0A.js +1 -0
- package/dist/client/assets/{collection-display-button-Bxb7HpiP.js → collection-display-button-DfzaspAg.js} +1 -1
- package/dist/client/assets/{collection-search-BqrF-OSq.js → collection-search-q0ogFMFh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CkgGqLXV.js → collection-table-wrapper-Dnaf2KFs.js} +1 -1
- package/dist/client/assets/{collection-tabs-B9w_j2Q-.js → collection-tabs-CYgVG041.js} +1 -1
- package/dist/client/assets/{column-rules-CDlfxJ7f.js → column-rules-BDs9HTxP.js} +1 -1
- package/dist/client/assets/{combobox-C7W7K3yr.js → combobox-BTfHieW4.js} +1 -1
- package/dist/client/assets/{command-psdI3Avp.js → command-DFd1c5Z5.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cx2dp9En.js → companion-mcps-section-4lkaw_O0.js} +1 -1
- package/dist/client/assets/{config-BuMB0HyT.js → config-CtmGoERx.js} +1 -1
- package/dist/client/assets/{connect-vKaaPSQ-.js → connect-CmDZNw9R.js} +1 -1
- package/dist/client/assets/{connect-layout-BAsVrzyq.js → connect-layout-CC9olkOl.js} +1 -1
- package/dist/client/assets/{connection-DsYXyfMO.js → connection-DSkv8Cg1.js} +1 -1
- package/dist/client/assets/{connection-card-KKabYrZM.js → connection-card-C7Yq5GHs.js} +1 -1
- package/dist/client/assets/connection-detail-DVH9ilyh.js +1 -0
- package/dist/client/assets/connection-form-helpers-BsU6F-s_.js +1 -0
- package/dist/client/assets/connections-BMBv6B3A.js +1 -0
- package/dist/client/assets/context-B_2GuX3F.js +1 -0
- package/dist/client/assets/{context-menu-CcSwK895.js → context-menu-CYa4PKRJ.js} +1 -1
- package/dist/client/assets/{core.esm-BBQ2k6X-.js → core.esm-lZvNzlYc.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-ryb_Yr7s.js → create-organization-dialog-D-9YlOhY.js} +1 -1
- package/dist/client/assets/{daily-pulse-R_HfqfjY.js → daily-pulse-CSM9zceR.js} +1 -1
- package/dist/client/assets/{device-hint-yLpMwsWD.js → device-hint-DPN31B5L.js} +1 -1
- package/dist/client/assets/{discover-DBy_h90B.js → discover-DvrfCZMt.js} +1 -1
- package/dist/client/assets/{domain-settings-DahhbaOZ.js → domain-settings-BDouaDKh.js} +1 -1
- package/dist/client/assets/{drawer-Z6WGmFEd.js → drawer-UzGeZrmC.js} +1 -1
- package/dist/client/assets/{editor-ZVt04ZDu.js → editor-KeKsFC14.js} +1 -1
- package/dist/client/assets/{empty-state-BIpjMV0P.js → empty-state-CvDYWxOG.js} +1 -1
- package/dist/client/assets/{empty-state-C38COFK9.js → empty-state-DdJZ_leg.js} +1 -1
- package/dist/client/assets/{extract-connection-data-R_HCwhv9.js → extract-connection-data-CJhjAx3s.js} +1 -1
- package/dist/client/assets/{feature-gate-BBs-YK_1.js → feature-gate-D5KGpIQ3.js} +1 -1
- package/dist/client/assets/{feature-paywall-K9l_m1PM.js → feature-paywall-nTUHasXJ.js} +1 -1
- package/dist/client/assets/{file-explorer-B4mkdePV.js → file-explorer-CcZkMQK3.js} +1 -1
- package/dist/client/assets/{file-preview-CbjoA-y-.js → file-preview-Ct2165jc.js} +1 -1
- package/dist/client/assets/{file-share-button-3fAFZqo4.js → file-share-button-DnzCcmZ2.js} +1 -1
- package/dist/client/assets/{file-type-icon-DQJBqcjt.js → file-type-icon-C-_1hLql.js} +1 -1
- package/dist/client/assets/flat-project-Dhd407Mb.js +1 -0
- package/dist/client/assets/{folder-icon-C0bBbW6a.js → folder-icon-CksigScx.js} +1 -1
- package/dist/client/assets/{form-C0Gw14kB.js → form-D6DHFxsw.js} +1 -1
- package/dist/client/assets/{general-CAvBksuG.js → general-CeTNWbSz.js} +1 -1
- package/dist/client/assets/home-B3luwcfX.js +1 -0
- package/dist/client/assets/{icon-button-DJ3FH_vW.js → icon-button-d9uOvdxM.js} +1 -1
- package/dist/client/assets/{index-o_6CQvLG.js → index-B0rouRMk.js} +1 -1
- package/dist/client/assets/{index-CIf_Fy0-.js → index-B5IA1qMq.js} +1 -1
- package/dist/client/assets/{index-DLA0mZnP.js → index-BGz-w6Gg.js} +1 -1
- package/dist/client/assets/{index-Y3iKbmDC.js → index-COV2t6Wc.js} +1 -1
- package/dist/client/assets/{index-yN6Vji_x.js → index-Cw6J2Hl5.js} +3 -3
- package/dist/client/assets/{index-CpSJczgV.js → index-DCmQGiOV.js} +1 -1
- package/dist/client/assets/{index-BYsz2IG8.js → index-DHd9v6HB.js} +1 -1
- package/dist/client/assets/{index-zHK7QZ16.js → index-Dhdyv2s0.js} +1 -1
- package/dist/client/assets/{index-Csd6BEC_.js → index-DyaBZBxm.js} +1 -1
- package/dist/client/assets/{index-oBLJEYM1.js → index-JuyO8Sz3.js} +1 -1
- package/dist/client/assets/index-MZuRM-ap.js +26 -0
- package/dist/client/assets/{index-CL22V9cU.js → index-bl_DQ3mH.js} +2 -2
- package/dist/client/assets/{index-redirect-D-avw8NV.js → index-redirect-CdLcLUA4.js} +1 -1
- package/dist/client/assets/{index-aYlc7W7n.js → index-zYf8hP69.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CkQRrcdR.js → infiniteQueryObserver-rUCOtzeA.js} +1 -1
- package/dist/client/assets/{infra-billing-DYbiV_uv.js → infra-billing-CNFpdYUt.js} +1 -1
- package/dist/client/assets/{input-qyM35152.js → input-B6YAOx07.js} +3 -3
- package/dist/client/assets/{input-CFfgp0Tw.js → input-C1msyAUz.js} +1 -1
- package/dist/client/assets/{integration-icon-DO5tWS-C.js → integration-icon-DogZfPWq.js} +1 -1
- package/dist/client/assets/{jira-icon-CLirt27c.js → jira-icon-Bkx-ixmo.js} +1 -1
- package/dist/client/assets/{label-CMx6o6z4.js → label-Bqj_xjz9.js} +1 -1
- package/dist/client/assets/{layout-BOmiV94e.js → layout-z7Pz7phr.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CNCjp9-J.js → legacy-agents-deep-fygb-JNd.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-B7q15OBR.js → legacy-main-redirect-BKIEGtd4.js} +1 -1
- package/dist/client/assets/library-BgLLAz_1.js +1 -0
- package/dist/client/assets/{library-tab-BNFZabUZ.js → library-tab-0FXiesZx.js} +1 -1
- package/dist/client/assets/{login-Emu6BYEQ.js → login-B4wTb5ls.js} +1 -1
- package/dist/client/assets/{markdown-BpBIe-s5.js → markdown-5DzLzA6E.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-ucNfuWrt.js → mcp-app-renderer-DuGbCe-D.js} +1 -1
- package/dist/client/assets/{mcp-oauth-tUb5Ku4P.js → mcp-oauth-D_oaXY6E.js} +1 -1
- package/dist/client/assets/{mcp-oauth-HEDfQLbt.js → mcp-oauth-tCidCN-u.js} +1 -1
- package/dist/client/assets/{members-5DGaxXGU.js → members-CDM-83p9.js} +1 -1
- package/dist/client/assets/{memory-BU6JoH4_.js → memory-0faJ-8hP.js} +1 -1
- package/dist/client/assets/{mini-report-page-BnvillTw.js → mini-report-page-CrKZ4okq.js} +1 -1
- package/dist/client/assets/{mock-board-CL5PjuNr.js → mock-board-N392Vku2.js} +1 -1
- package/dist/client/assets/{monaco-editor-CQ53ujnX.js → monaco-editor-2Ci5R71u.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CeE5cdl8.js → monitoring-stats-row-BbxkYAB2.js} +1 -1
- package/dist/client/assets/{multi-select-Bb_75Kq_.js → multi-select-CNHwKIXn.js} +1 -1
- package/dist/client/assets/{mustache-CQikKf57.js → mustache-B7TZyK91.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CIdD-M5h.js → new-project-dialog-C5lJfUJ3.js} +1 -1
- package/dist/client/assets/{oauth-callback-D5OtWQot.js → oauth-callback-DGtqmz9D.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mYrYVnqt.js → oauth-callback-ai-provider-Bhuh08e8.js} +1 -1
- package/dist/client/assets/{onboarding-s-Aq6pC0.js → onboarding-D55kfuiq.js} +1 -1
- package/dist/client/assets/openai-conversation-C4Qt6S-l.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DfaNoant.js → optimistic-project-sidebar-views-CoZosNmn.js} +1 -1
- package/dist/client/assets/{organization-choice-DUpINEOM.js → organization-choice-CUxHZSL3.js} +1 -1
- package/dist/client/assets/{orgs-NyCttTtW.js → orgs-CPCdS87I.js} +1 -1
- package/dist/client/assets/{page-seo-form-BcwaLsu1.js → page-seo-form-DdXyS1MG.js} +1 -1
- package/dist/client/assets/{pair-C-wmghxs.js → pair-DjM6V7aG.js} +1 -1
- package/dist/client/assets/{plan-ladder-Dz96Ryba.js → plan-ladder-gwROOTzi.js} +1 -1
- package/dist/client/assets/{popover-BJjSe4oX.js → popover-MLSOZysn.js} +1 -1
- package/dist/client/assets/post-calendar-Dr7XWigd.js +1 -0
- package/dist/client/assets/{post-editor-DUzLhnjz.js → post-editor-CKCVg_my.js} +2 -2
- package/dist/client/assets/{preview-content-DLzimxeU.js → preview-content-Cuq13S1x.js} +1 -1
- package/dist/client/assets/{preview-dialog-feNNzmyD.js → preview-dialog-CP7wwQxY.js} +1 -1
- package/dist/client/assets/{preview-panel-CYRzCG9l.js → preview-panel-DFRYD57I.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-DCoADulv.js → product-picker-dialog-DuFOtAE-.js} +1 -1
- package/dist/client/assets/{profile-C4WMC8IX.js → profile-E9E7lNqo.js} +1 -1
- package/dist/client/assets/{project-app-view-CLP8CgRj.js → project-app-view-CqnnpjCc.js} +1 -1
- package/dist/client/assets/{project-feed-o8j1clyL.js → project-feed-DI26nV5j.js} +1 -1
- package/dist/client/assets/{project-icon-DyrKdiRe.js → project-icon-DsUbDdQC.js} +1 -1
- package/dist/client/assets/project-reports-UVwSbHHJ.js +1 -0
- package/dist/client/assets/project-tasks-DuMsfpY5.js +1 -0
- package/dist/client/assets/{projects-DEh_o8C9.js → projects-CdLu99l3.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cdl4kOQ1.js → projects-empty-state-CO-mNXLv.js} +1 -1
- package/dist/client/assets/{prompts-Bc9FLvmN.js → prompts-CGIibyOn.js} +1 -1
- package/dist/client/assets/record-editor-ceYt0p4C.js +1 -0
- package/dist/client/assets/redirect-editor-Ca575ToY.js +1 -0
- package/dist/client/assets/{reports-oNZDdjI5.js → reports-CKJQ8Zdg.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DetN93z1.js → reports-onboarding-UAs51Fs-.js} +1 -1
- package/dist/client/assets/{reports-tab-ChGluXDr.js → reports-tab-D-UL6Cu0.js} +2 -2
- package/dist/client/assets/reports-y_yDpDn4.js +1 -0
- package/dist/client/assets/{repositories-CiOfBaLB.js → repositories-8LjwXVAZ.js} +1 -1
- package/dist/client/assets/{repository-binding-BGLfNZVf.js → repository-binding-BTsmo_dA.js} +1 -1
- package/dist/client/assets/{repository-import-picker-CglAAV-N.js → repository-import-picker-D5xDiyD_.js} +1 -1
- package/dist/client/assets/{repository-picker-Cn86nava.js → repository-picker-DExxlkis.js} +1 -1
- package/dist/client/assets/{require-capability-DvSGwHTo.js → require-capability-DJr1iBd_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-YTpcWMST.js → required-auth-layout-Dzef4Ao1.js} +1 -1
- package/dist/client/assets/{reset-password-oN8mFGBD.js → reset-password-CWozFngH.js} +1 -1
- package/dist/client/assets/{resizable-BGEY0EFD.js → resizable-UTJFKDGm.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-voZLivWv.js → resolve-tab-icon-DqCiaIA7.js} +1 -1
- package/dist/client/assets/{review-settings-DetXY7FI.js → review-settings-THwrc5M3.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CI2Op3JZ.js → rich-text-link-control-CNQ92nZ4.js} +1 -1
- package/dist/client/assets/{roles-DUajMmJL.js → roles-D_wIHL0X.js} +1 -1
- package/dist/client/assets/route-CfEJDbbT.js +1 -0
- package/dist/client/assets/{route-DJLRE8ic.js → route-DD4978oF.js} +1 -1
- package/dist/client/assets/route-e2YuR4Xl.js +1 -0
- package/dist/client/assets/{runnable-block-editor-4vBz623-.js → runnable-block-editor-fWbFWGvz.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-C_3fMqSf.js → sandbox-lifecycle-context-C25F7mSK.js} +1 -1
- package/dist/client/assets/schema-BKM3gR2B.js +1 -0
- package/dist/client/assets/{schema-DAiRf49Q.js → schema-kVE-1hbs.js} +1 -1
- package/dist/client/assets/{scroll-area-D8pwM87R.js → scroll-area-1S72VGW0.js} +1 -1
- package/dist/client/assets/{search-input-BADdEzRB.js → search-input-pTAwOtCG.js} +1 -1
- package/dist/client/assets/{search-toggle-BXsTAhJH.js → search-toggle-DAU6nVmU.js} +1 -1
- package/dist/client/assets/{secret-picker-DYQ3Y0hB.js → secret-picker-CDYFp1fc.js} +1 -1
- package/dist/client/assets/{secrets-DkldztQE.js → secrets-B0srIKJq.js} +1 -1
- package/dist/client/assets/{sections-editor-C-qAs9t3.js → sections-editor-B5MFR1yl.js} +2 -2
- package/dist/client/assets/{select-DoctMyOC.js → select-WviNHwZD.js} +1 -1
- package/dist/client/assets/{select-model-Coln0RuO.js → select-model-cTObTD6V.js} +1 -1
- package/dist/client/assets/seo-editor-DCKDCOQr.js +1 -0
- package/dist/client/assets/{separator-B4WfBd40.js → separator-DHqK6uc1.js} +1 -1
- package/dist/client/assets/{settings-tab-DFn-ybRc.js → settings-tab-fdKZYnq9.js} +1 -1
- package/dist/client/assets/{sheet-B6SnxCii.js → sheet-CZiDNUQZ.js} +1 -1
- package/dist/client/assets/{shell-layout-_gLI3g1W.js → shell-layout-Bk6uPKMe.js} +1 -1
- package/dist/client/assets/{skills-gj8cVLsz.js → skills-Bhf5PJUl.js} +1 -1
- package/dist/client/assets/{slider-DN1_RJ5Y.js → slider-gvEbcdOp.js} +1 -1
- package/dist/client/assets/{sortable.esm-39sGMg0A.js → sortable.esm-h3AYG-u7.js} +1 -1
- package/dist/client/assets/{sso-CMGxfocU.js → sso-B6q4MTEL.js} +1 -1
- package/dist/client/assets/{suggestion-DPIiudVw.js → suggestion-C591DFAx.js} +1 -1
- package/dist/client/assets/{switch-CXuIYT9e.js → switch-CUK4V52q.js} +1 -1
- package/dist/client/assets/{symbol-CTW82RbO.js → symbol-BQaHJ_MF.js} +1 -1
- package/dist/client/assets/{synced-repos-DAtDW7FL.js → synced-repos-BbxE1rvi.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BkQvbqzH.js → tab-icon-glyph-D8Um0oDf.js} +1 -1
- package/dist/client/assets/{table-1p2TxQNp.js → table-Dsl6wBVe.js} +1 -1
- package/dist/client/assets/{tabs-CpwN-luG.js → tabs-BXhvcQgN.js} +1 -1
- package/dist/client/assets/{task-board-BR1DvBwF.js → task-board-kbcRVMI1.js} +1 -1
- package/dist/client/assets/{task-route-C_DvpiOV.js → task-route-BPrIj9mX.js} +1 -1
- package/dist/client/assets/{task-status-edWeKF1d.js → task-status-codqNsI7.js} +1 -1
- package/dist/client/assets/taskboard-analytics-xeHAgwnO.js +1 -0
- package/dist/client/assets/tasks-Ba-oyyIK.js +1 -0
- package/dist/client/assets/{tasks-0Nq-zOga.js → tasks-J75byAMf.js} +1 -1
- package/dist/client/assets/{textarea-BfwTTa-d.js → textarea-DvoMwt1e.js} +1 -1
- package/dist/client/assets/{thread-analytics-CopoUn-p.js → thread-analytics-C0BM4p9K.js} +1 -1
- package/dist/client/assets/{thread-button-D0jo5h0y.js → thread-button-DKjUerzt.js} +1 -1
- package/dist/client/assets/{thread-intent-CgK6_lx2.js → thread-intent-CG-CCDLs.js} +1 -1
- package/dist/client/assets/{thread-route-CgdmmioO.js → thread-route-CR0TIP8s.js} +1 -1
- package/dist/client/assets/{thread-route-B6Fc_RFE.js → thread-route-DvTW6luy.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BK4lUe-W.js → thread-sheet-body-BAmHmw0m.js} +1 -1
- package/dist/client/assets/{time-range-picker-_BVYixos.js → time-range-picker-CPMdzMas.js} +1 -1
- package/dist/client/assets/{toggle-group-DLHDaWVo.js → toggle-group-Q9SREgL7.js} +1 -1
- package/dist/client/assets/{tool-namespace-BPLgX6r-.js → tool-namespace-uRsPbj-p.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-C_OqF99U.js → toolbar-icon-button-Djr5zvaV.js} +1 -1
- package/dist/client/assets/{tooltip-Dz-qpzYY.js → tooltip-COqLwkid.js} +1 -1
- package/dist/client/assets/{tooltipContext-C5rFwURT.js → tooltipContext-DDD6cP5q.js} +1 -1
- package/dist/client/assets/{track-D8_YlvuV.js → track-DG4JP_WA.js} +1 -1
- package/dist/client/assets/{types-C-bGWQ4N.js → types-C5SQt0XZ.js} +1 -1
- package/dist/client/assets/{url-slug-DnJTGqgD.js → url-slug-CUhgOgGc.js} +1 -1
- package/dist/client/assets/{usage-stats-Dskh866S.js → usage-stats-CAukzrpg.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BAXvzpWI.js → use-ai-providers-IjG3zzka.js} +1 -1
- package/dist/client/assets/{use-automations-jtpzDfwI.js → use-automations-Dt8Ypk0g.js} +1 -1
- package/dist/client/assets/{use-autosave-SKFoSjPt.js → use-autosave-CiBl7wSO.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CA9xW2qA.js → use-chat-layout-state-CVkPEEUs.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-BYokh2PZ.js → use-chat-navigation-DLnmXNT9.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D_sbvWIH.js → use-clock-tick-zaL95TTy.js} +1 -1
- package/dist/client/assets/{use-connect-companion-5bDO4jQu.js → use-connect-companion-CRI0nNcp.js} +1 -1
- package/dist/client/assets/{use-connection-BIx1BUIM.js → use-connection-gMb_8zEe.js} +1 -1
- package/dist/client/assets/{use-copy-Da7eNVy9.js → use-copy-2j0k06rN.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ejJy1cdv.js → use-create-virtual-mcp-Bz6TE2Qz.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CaWCAmJI.js → use-date-fns-locale-BPq8VLDt.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DugSqk23.js → use-debounced-autosave-CMA_1eXM.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DpRvXYf_.js → use-debounced-value-Dju-tMu1.js} +1 -1
- package/dist/client/assets/{use-deco-credits-rm4q7hjq.js → use-deco-credits-BtvhFk4m.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DzS1GTJA.js → use-decopilot-events-D8zpT0sX.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CveANzdS.js → use-delete-connection-BXDiC_mk.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dtf1f6in.js → use-deployment-admin-CXT7CFHy.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-DnwLT6n2.js → use-ensure-project-folder-CqaPdVz-.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-gddbB98r.js → use-fast-preview-draft-url-DlLnA8PJ.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cs5X6vH_.js → use-file-configs-BSnoYr1R.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DzEoSjmb.js → use-infinite-scroll-CtScOz_h.js} +1 -1
- package/dist/client/assets/{use-join-requests-BFtEcuZ5.js → use-join-requests-CccLwL3-.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-D3i-CtUA.js → use-main-panel-tabs-O3Jy3Qh8.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DBZY5zBR.js → use-mcp-auth-status-Is2pR00q.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dii6HKbn.js → use-mcp-client-DuTNn1dc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BrfI-bT0.js → use-mcp-prompts-3vLSpQqZ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DvCI3rin.js → use-mcp-tools-CA6Ri5UK.js} +1 -1
- package/dist/client/assets/{use-members-Clb4I0WG.js → use-members-BqWTpMNp.js} +1 -1
- package/dist/client/assets/{use-mobile-H9hGbUdK.js → use-mobile-Di3PCVWm.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C_Bk-WTy.js → use-navigate-to-agent-Cu9cZhs8.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-D9sV9o2T.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CsVJpAR8.js → use-open-billing-url-sjDwQSEM.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CGnpmIwt.js → use-org-auth-client-DIUzAE5u.js} +1 -1
- package/dist/client/assets/{use-org-fs-090kBeGb.js → use-org-fs-DOu4nQSr.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CXYmF8vW.js → use-org-repo-syncs-BhJEcVcm.js} +1 -1
- package/dist/client/assets/{use-org-sso-D0pRb0h2.js → use-org-sso-B57pfGVG.js} +1 -1
- package/dist/client/assets/{use-organization-roles-2XHDK9nW.js → use-organization-roles-DDnFx_jd.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BCnCWSM4.js → use-organization-settings-BOGRgJjV.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CzmyA3PY.js → use-panel-navigate-c5H4a21L.js} +1 -1
- package/dist/client/assets/{use-project-scope-0DIp_prZ.js → use-project-scope-A4YCdR4N.js} +1 -1
- package/dist/client/assets/{use-releases-CA_rM0y-.js → use-releases-BmeSCMgM.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Nc7WKzHO.js → use-reports-diagnostic-Dw_QzpEb.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CUG13fIj.js → use-sandbox-events-hhwp2IWJ.js} +1 -1
- package/dist/client/assets/{use-secrets-CAgjCyZi.js → use-secrets-BwPjhWC0.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-nZ_rR067.js → use-section-preview-base-B7bjCuOw.js} +1 -1
- package/dist/client/assets/{use-tags-Cx_sTi85.js → use-tags-Ce3D-sM7.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-HMQ395Ct.js → use-task-board-analytics-BR7NSR26.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BIxyvwMu.js → use-task-board-events-BBlz-cBe.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-C-ZolRBO.js → use-task-board-item-prs-BzAFAQp8.js} +1 -1
- package/dist/client/assets/{use-task-board-items-fJTXcazL.js → use-task-board-items-DTbT7rEp.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BGRg9gqV.js → use-task-metadata-CBQ5Muu5.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CNHU0H7W.js → use-thread-analytics-CeuE3odS.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BdDJ85ic.js → use-thread-outputs-c6b1HaAz.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DeMEFTdd.js +1 -0
- package/dist/client/assets/{useQueries-SbEnc9zP.js → useQueries-BliyNTtT.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CUkGf5w6.js +1 -0
- package/dist/client/assets/{users-DAar6oNb.js → users-CsvLtEUJ.js} +1 -1
- package/dist/client/assets/{utils-B82E0qSP.js → utils-DHYRJNUn.js} +1 -1
- package/dist/client/assets/variant-calendar-CKqGYdH4.js +1 -0
- package/dist/client/assets/{variant-matcher-override-CUEPR4IO.js → variant-matcher-override-uklREcGs.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-0buE2kLD.js → view-mode-toggle-B55pxnK_.js} +1 -1
- package/dist/client/assets/{virtual-mcp-IOrpgzuz.js → virtual-mcp-DFjD0qBz.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BFh4zrHL.js → watch-sse-pool-B66Eygyb.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/add-connection-dialog-C99-KIxD.js +0 -1
- package/dist/client/assets/agent-analytics-DezOg4iq.js +0 -2
- package/dist/client/assets/agent-app-OwJ0X9iQ.js +0 -1
- package/dist/client/assets/agent-assets-DtBwQzpc.js +0 -1
- package/dist/client/assets/agent-deck-CVQI0IJ8.js +0 -1
- package/dist/client/assets/agent-e2e-Cf-7o5JH.js +0 -1
- package/dist/client/assets/agent-experiments-BjOexOgL.js +0 -1
- package/dist/client/assets/agent-file-CVJUPUB9.js +0 -1
- package/dist/client/assets/agent-hosting-DJ5loXp1.js +0 -1
- package/dist/client/assets/agent-library-DMvAbH9s.js +0 -1
- package/dist/client/assets/agent-library-file-B-EjZyU3.js +0 -1
- package/dist/client/assets/agent-monitor-CwvDQf-0.js +0 -1
- package/dist/client/assets/agent-settings-S4roascd.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DsF3btqi.js +0 -2
- package/dist/client/assets/agent-view-DNsQvn8c.js +0 -1
- package/dist/client/assets/api-keys-BFo2F8un.js +0 -1
- package/dist/client/assets/app-editor-CLedpfSA.js +0 -1
- package/dist/client/assets/category-editor-Dh4k-2za.js +0 -1
- package/dist/client/assets/collection-detail-BVfokcci.js +0 -1
- package/dist/client/assets/connection-detail-Cx1TsCEV.js +0 -1
- package/dist/client/assets/connection-form-helpers-D5AT-OBk.js +0 -1
- package/dist/client/assets/connections-DEMu2UYi.js +0 -1
- package/dist/client/assets/context-B4AjxGVI.js +0 -1
- package/dist/client/assets/flat-project-C0OkliLB.js +0 -1
- package/dist/client/assets/home-DNlj1vDz.js +0 -1
- package/dist/client/assets/index-DC6iJbGF.js +0 -26
- package/dist/client/assets/library-DUvGua8d.js +0 -1
- package/dist/client/assets/openai-conversation-D0sRUrnM.js +0 -3
- package/dist/client/assets/post-calendar-Dd7Rx0Y2.js +0 -1
- package/dist/client/assets/project-reports-5Kg7yDsr.js +0 -1
- package/dist/client/assets/project-tasks-C93fh75m.js +0 -1
- package/dist/client/assets/record-editor-B_D1bdnj.js +0 -1
- package/dist/client/assets/redirect-editor-CwqE3fJt.js +0 -1
- package/dist/client/assets/reports-Bmm0luQ2.js +0 -1
- package/dist/client/assets/route-Frsbu1bb.js +0 -1
- package/dist/client/assets/route-JSQmVwkK.js +0 -1
- package/dist/client/assets/seo-editor-AS6vQaHK.js +0 -1
- package/dist/client/assets/taskboard-analytics-BKAHiV-A.js +0 -1
- package/dist/client/assets/tasks-CbEmZqW6.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-ZHXdwaTL.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DhuK1n82.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DmpJFLm-.js +0 -1
- package/dist/client/assets/variant-calendar-C_pGmhST.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as X,a5 as Ze,o as We,a2 as ie,K as ae,t as fe,a0 as be,a1 as Ce,aD as ut,aE as dt,r as S,b as we,m as ft,aa as pt,e as ht,ao as mt,j as oe,d as gt,J as yt,u as St,a as vt,F as Tt,ec as kt,ed as Mt,y as xt}from"./index-
|
|
1
|
+
import{c as X,a5 as Ze,o as We,a2 as ie,K as ae,t as fe,a0 as be,a1 as Ce,aD as ut,aE as dt,r as S,b as we,m as ft,aa as pt,e as ht,ao as mt,j as oe,d as gt,J as yt,u as St,a as vt,F as Tt,ec as kt,ed as Mt,y as xt}from"./index-bl_DQ3mH.js";import{a as bt}from"./use-panel-navigate-c5H4a21L.js";import{A as Ct,c as It,a as wt,w as Pt}from"./autosend-Cr5TlS-x.js";import{S as Et,a as Rt,j as _t,c as $t,w as Ke,k as He}from"./thread-intent-CG-CCDLs.js";import{u as At}from"./use-mcp-client-DuTNn1dc.js";import{c as Dt,i as Ot}from"./repository-binding-BTsmo_dA.js";import{b as Lt,d as Nt}from"./use-decopilot-events-D8zpT0sX.js";import{u as et,p as jt,a as xe,i as qt,b as Ft}from"./use-ai-providers-IjG3zzka.js";import{a as Qt,u as tt}from"./use-chat-navigation-DLnmXNT9.js";import{o as Ut,b as Bt}from"./location-BjlyegC2.js";import{d as Wt,a as Ge,b as st}from"./use-organization-settings-BOGRgJjV.js";const Vt={openrouter:t=>{const e=t?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function nt(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(Vt)){const s=e(t.providerMetadata);if(s!==null)return s}return 0}function Kt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Ht(t,e){if(!e)return t;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,n=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+nt(e),cacheReadTokens:t.cacheReadTokens+s,cacheWriteTokens:t.cacheWriteTokens+n}}function cn(t){const e=Math.max(t.inputTokens,t.cacheReadTokens+t.cacheWriteTokens);return e>0?t.cacheReadTokens/e:0}function ln(t){return t.reduce((e,s)=>Ht(e,s.metadata?.usage),Kt())}function Gt(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(n=>n.type==="tool-user_ask"&&n.state==="input-available"||n.state==="approval-requested")?"requires_action":"completed":"failed"}function Xt(t){return t.thread?.harness_id!=null?{}:{branch:t.globals.branch??null}}const Yt=new Set(["decopilot","claude-code","codex"]);function Jt(t){return t!=null&&!Yt.has(t)}function zt(t){const e=X.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const n=Ze(s),a=Qt()?.path??null;let r;if(e[1]!==n?.params.appSlug||e[2]!==n?.params.collectionName||e[3]!==n?.params.itemId||e[4]!==a||e[5]!==t){if(r=[],t&&r.push(`### Selected Agent
|
|
2
2
|
- ID: ${t}`),a){let i;e[7]!==a?(i=Ut(a),e[7]=a,e[8]=i):i=e[8];const d=i;let f;e[9]!==a?(f=Bt(a),e[9]=a,e[10]=f):f=e[10],r.push(`### Currently Open File
|
|
3
3
|
The user has this file open in the Library and is most likely referring to it:
|
|
4
4
|
- Name: ${f}
|
|
@@ -28,12 +28,12 @@ ${o.text}`}):"blob"in o&&o.blob&&o.mimeType&&s.push({type:"file",url:`data:${o.m
|
|
|
28
28
|
`;else if(a.type==="text"&&"text"in a&&typeof a.text=="string")s+=a.text;else if(a.type==="mention"&&a.attrs){const r=a.attrs.char??"/",o=`${r}${a.attrs.name}`;if(a.attrs.kind==="task"){const i=a.attrs.metadata,d=i?.title??a.attrs.name??"",f=i?.context?.trim()||[d,i?.description?.trim()].filter(Boolean).join(`
|
|
29
29
|
|
|
30
30
|
`);f&&e.push({type:"text",text:f});return}if(s+=o,r==="@"){const i=a.attrs.metadata;i&&typeof i=="object"&&!Array.isArray(i)&&"agentId"in i?e.push({type:"text",text:`[DELEGATE TO AGENT: ${i.title??a.attrs.name} (agent_id: ${i.agentId})]
|
|
31
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Ye(i,o))}else if(a.attrs.kind==="skill"){const i=a.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...ls(i,o))}else{const i=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...us(i,o)):Array.isArray(i)&&e.push(...Ye(i,o))}}else if(a.type==="file"&&a.attrs){const r=a.attrs,o=`[file:://${encodeURIComponent(r.name)}]`;s+=o,e.push(...cs(r,o))}if("content"in a&&Array.isArray(a.content))for(const r of a.content)n(r)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function fn(t){const e=at(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function pn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function fs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function hn(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function ps(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function hs(t,e){return t.filter(s=>s.messageId!==e)}const re=new Map,ms=200;function gs(t){if(re.size<ms||re.has(t))return;const e=re.keys().next().value;if(e!==void 0){re.delete(e),De.delete(e);for(const s of ye.keys())s.startsWith(`${e}:`)&&ye.delete(s)}}const
|
|
32
|
-
`);if(!se){Te(l);return}new TextEncoder().encode(se).length>Ls||ve(V=>Object.keys(V).length>=Ns&&!(l in V)?V:{...V,[l]:se})},Te=l=>{ve(Me=>{const{[l]:_e,...se}=Me;return se})},[pe,ke]=S.useState(void 0),he=S.useRef(pe);he.current=pe;const
|
|
31
|
+
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&e.push(...Ye(i,o))}else if(a.attrs.kind==="skill"){const i=a.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&e.push(...ls(i,o))}else{const i=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?e.push(...us(i,o)):Array.isArray(i)&&e.push(...Ye(i,o))}}else if(a.type==="file"&&a.attrs){const r=a.attrs,o=`[file:://${encodeURIComponent(r.name)}]`;s+=o,e.push(...cs(r,o))}if("content"in a&&Array.isArray(a.content))for(const r of a.content)n(r)}};return n(t),s.trim()&&e.unshift({type:"text",text:s.trim()}),e}function fn(t){const e=at(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function pn(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function fs(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function hn(t){return t.filter(e=>e.status==="queued").sort((e,s)=>e.enqueuedAt-s.enqueuedAt)}function ps(t,e){return t.some(s=>s.messageId===e.messageId)?t:[...t,e]}function hs(t,e){return t.filter(s=>s.messageId!==e)}const re=new Map,ms=200,De=new Map;function gs(t){if(re.size<ms||re.has(t))return;const e=re.keys().next().value;if(e!==void 0){re.delete(e),Oe.delete(e),De.delete(e);for(const s of ye.keys())s.startsWith(`${e}:`)&&ye.delete(s)}}const Oe=new Set;function ys(t){Oe.add(t)}function Ss(t){return Oe.has(t)}function vs(t){Oe.delete(t)}function Pe(t){const e=re.get(t);if(e)return re.delete(t),re.set(t,e),e;gs(t);const s=new Et([]);return re.set(t,s),s}function rt(t,e){Pe(t).update(s=>ps(s,e))}function Be(t,e){Pe(t).update(s=>hs(s,e))}function Ts(t,e){Pe(t).set(e)}const ye=new Map;function ks(t,e){ye.set(`${t}:${e.id}`,e)}function Ms(t,e){const s=`${t}:${e}`,n=ye.get(s);return ye.delete(s),n}function Ue(t,e){ye.delete(`${t}:${e}`)}async function ne(t,e){const s=(De.get(e)??0)+1;De.set(e,s);try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const a=await n.json();if(De.get(e)!==s)return;Ts(e,a.items??[])}catch{}}const xs="data-live-message";function bs(t){if(typeof t!="object"||t===null)return null;const{type:e,data:s}=t;if(e!==xs)return null;const n=s?.messageId;return typeof n=="string"&&n.length>0?n:null}function Je(t){return t.role==="user"&&!!t.metadata?.liveRunId}function Cs(t,e){return{...t,metadata:{...t.metadata,liveRunId:e}}}function mn(t,e){const s=new Set;for(const o of t)if(o.role==="assistant")for(const i of o.parts){const d=bs(i);d&&s.add(d)}const n=new Map,a=[],r=[];for(const o of t)Je(o)&&s.has(o.id)?n.set(o.id,o):Je(o)&&e?a.push(o):r.push(o);return{visible:r,read:n,pending:a}}const Is=S.createContext({read:new Map,pending:[]});function gn(){return S.useContext(Is)}function yn(t){const e=X.c(2);let s;e[0]!==t?(s=Pe(t),e[0]=t,e[1]=s):s=e[1];const n=s;return S.useSyncExternalStore(n.subscribe,n.get,n.get)}function ws(){const{org:t}=ie(),e=we();return{enqueue:rt,refresh:s=>ne(t.slug,s),cancel:async(s,n)=>{const a=`thread-run:${s}:${n}`;Be(s,n);try{const r=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(s)}/cancel/${encodeURIComponent(a)}`,{method:"POST",credentials:"include"});if(!r.ok&&r.status!==404)throw new Error(`Cancel failed: ${r.status}`);return!0}catch{return fe.error(e("chat.queueTray.cancelFailed")),!1}finally{await ne(t.slug,s)}}}}function $e(t,e){return t.find(s=>s!=null&&e.has(s.keyId))??null}function Ps(t,e,s){const n=a=>$e([a],s);return{tiers:{fast:$e([e.tiers.fast,t.tiers.fast],s),smart:$e([e.tiers.smart,t.tiers.smart],s),thinking:$e([e.tiers.thinking,t.tiers.thinking],s),image:n(t.tiers.image),web_search:n(t.tiers.web_search),deep_research:n(t.tiers.deep_research)}}}const Ie={tiers:{}};function Es(){const t=X.c(7),{org:e}=ie();let s;t[0]!==e.id?(s=ae.userModelPreferences(e.id),t[0]=e.id,t[1]=s):s=t[1];let n;t[2]!==e.slug?(n=async()=>{const r=await mt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return r?.tiers?r:Ie},t[2]=e.slug,t[3]=n):n=t[3];let a;return t[4]!==s||t[5]!==n?(a={queryKey:s,queryFn:n,staleTime:6e4},t[4]=s,t[5]=n,t[6]=a):a=t[6],ft(a)}function Rs(){return Es().data??Ie}function Sn(){const t=X.c(19),{org:e}=ie(),s=pt(),n=We();let a;t[0]!==e.id?(a=ae.userModelPreferences(e.id),t[0]=e.id,t[1]=a):a=t[1];const r=a;let o;t[2]!==r||t[3]!==n||t[4]!==s?(o=async _=>{const p=n.getQueryData(r)??Ie;return await s.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=r,t[3]=n,t[4]=s,t[5]=o):o=t[5];let i,d,f,x;t[6]!==r||t[7]!==n?(i=_=>{const{tier:p,slot:C}=_,F=n.getQueryData(r),L=F??Ie;return n.setQueryData(r,{tiers:{...L.tiers,[p]:C}}),{prev:F}},d=(_,p,C)=>{n.setQueryData(r,C?.prev??Ie)},f=_=>{n.setQueryData(r,_)},x=()=>{n.isMutating({mutationKey:r})===1&&n.invalidateQueries({queryKey:r})},t[6]=r,t[7]=n,t[8]=i,t[9]=d,t[10]=f,t[11]=x):(i=t[8],d=t[9],f=t[10],x=t[11]);let E;return t[12]!==r||t[13]!==o||t[14]!==i||t[15]!==d||t[16]!==f||t[17]!==x?(E={mutationKey:r,mutationFn:o,onMutate:i,onError:d,onSuccess:f,onSettled:x},t[12]=r,t[13]=o,t[14]=i,t[15]=d,t[16]=f,t[17]=x,t[18]=E):E=t[18],ht(E)}function _s(){const t=X.c(4),e=Wt(),s=Rs(),n=et();let a;return t[0]!==n||t[1]!==e||t[2]!==s?(a=Ps(e,s,new Set(n.map($s))),t[0]=n,t[1]=e,t[2]=s,t[3]=a):a=t[3],a}function $s(t){return t.id}function de(t,e,s,n){if(!t)return null;const a=e.find(o=>o.id===t.keyId);if(!a)return null;const r=s.find(o=>o.modelId===t.modelId);return r?{...r,keyId:t.keyId}:{modelId:t.modelId,title:n??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function As(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Ds(t,e,s,n){if(!s||n.length===0)return null;const a=e.find(d=>d.id===s);if(!a)return null;const r=jt([a],{[s]:n}),o=t==="fast"?r.chat.fast:t==="thinking"?r.chat.thinking:r.chat.smart;if(!o)return null;const i=n.find(d=>d.modelId===o.modelId);return i?{...i,keyId:s}:null}const ze=new Set,G=new Set;function ge(t){return S.useSyncExternalStore(t.subscribe,t.get,t.get)}function Os(t){return t.kind==="loading"?"ready":t.kind}function ot(t){return t&&typeof t=="object"&&"type"in t?{tiptapDoc:t}:t}const Ls=1e4,Ns=10,Ee=S.createContext(null),Le=S.createContext(null),Ve=S.createContext(null),it=S.createContext(null);function vn(t){const e=X.c(2),{children:s}=t;let n;return e[0]!==s?(n=oe.jsx(Ee.Provider,{value:null,children:oe.jsx(Le.Provider,{value:null,children:s})}),e[0]=s,e[1]=n):n=e[1],n}function js({children:t}){const{locator:e}=ie(),{virtualMcpId:s}=tt(),[n,a]=be(Ce.chatSelectedImageModel(e),null),[r,o]=be(Ce.chatSelectedWebSearchModel(e),null),[i,d]=be(Ce.chatSelectedDeepResearchModel(e),null),[f,x]=S.useState(null),[E,_]=S.useState("default"),p=_s(),[C,F]=be(Ce.chatSimpleModeTier(e),null),L=As(C),k=et(),I=p.tiers[L],Q=k.some(l=>l.id===I?.keyId)?I?.keyId:void 0,w=f&&k.some(l=>l.id===f)?f:Q??k[0]?.id??null,{models:N,isLoading:ce}=xe(w??void 0),{models:Y}=xe(Q),$=k.some(l=>l.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:j}=xe($),Z=k.some(l=>l.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:le}=xe(Z),A=k.some(l=>l.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:B}=xe(A),U=de(I,k,Y,I?.title)??Ds(L,k,w,N),J=ce,W=N.filter(l=>l.capabilities?.includes("image")),z=de(n,k,W),ee=de(p.tiers.image,k,j,p.tiers.image?.title)??z??W[0]??null,q=N.filter(qt),u=de(r,k,q),T=q.find(l=>l.modelId==="perplexity/sonar")??q[0]??null,v=de(p.tiers.web_search,k,le,p.tiers.web_search?.title)??u??T,R=N.filter(Ft),te=de(i,k,R),Ne=R.find(l=>l.modelId==="perplexity/deep-research")??R.find(l=>l.asyncResearch===!0)??R[0]??null,je=de(p.tiers.deep_research,k,B,p.tiers.deep_research?.title)??te??Ne,D=Dt(s),Re=Ot().find(l=>l.id===s),Se=D??Re??{id:s,title:"",description:null,icon:null},[qe,ve]=S.useState({}),Fe=(l,Me)=>{const _e=[];for(const V of Me.content??[])V.type==="text"&&V.text?.trim()&&_e.push(V.text.trim());const se=_e.join(`
|
|
32
|
+
`);if(!se){Te(l);return}new TextEncoder().encode(se).length>Ls||ve(V=>Object.keys(V).length>=Ns&&!(l in V)?V:{...V,[l]:se})},Te=l=>{ve(Me=>{const{[l]:_e,...se}=Me;return se})},[pe,ke]=S.useState(void 0),he=S.useRef(pe);he.current=pe;const Qe={selectedModel:U,setModel:()=>{},credentialId:w,setCredentialId:x,allModelsConnections:k,isModelsLoading:J,selectedVirtualMcp:Se,imageModel:ee,setImageModel:l=>{a(l?.keyId?{keyId:l.keyId,modelId:l.modelId}:null)},webSearchModel:v,setWebSearchModel:l=>{o(l?.keyId?{keyId:l.keyId,modelId:l.modelId}:null)},deepResearchModel:je,setDeepResearchModel:l=>{d(l?.keyId?{keyId:l.keyId,modelId:l.modelId}:null)},chatMode:E,setChatMode:_,appContexts:qe,setAppContext:Fe,clearAppContext:Te,tiptapDoc:pe,setTiptapDoc:ke,tiptapDocRef:he,resetInteraction:()=>{},simpleModeTier:L,setSimpleModeTier:l=>F(l)};return oe.jsx(Ve.Provider,{value:Qe,children:t})}function Tn(t){const e=X.c(41),{virtualMcpId:s,task:n,children:a}=t,{locator:r}=ie(),{data:o}=vt.useSession(),i=o?.user??null,{taskId:d,virtualMcpId:f,navigateToTask:x}=tt(),[E]=Tt(),{markTaskRead:_}=es(),p=$t(),C=d,F=f,L=zt(F);let k;e[0]!==_||e[1]!==x?(k=(T,v)=>{_(T),x(T,{virtualMcpId:v?.virtualMcpId,autosend:v?.autosend})},e[0]=_,e[1]=x,e[2]=k):k=e[2];const I=k,Q=C!==null&&n?.id===C?n:null,w=Q?.harness_id??null,N=Q?.branch??null,ce=w!=null,Y=N,j=st()?null:Y;let Z;e[3]!==j||e[4]!==r||e[5]!==I||e[6]!==p||e[7]!==s?(Z=T=>{const v=crypto.randomUUID(),R=T?.branch??j;return Ke(sessionStorage,r,v,{...T?.runtime?{runtime:T.runtime}:{},...R?{branch:R}:{}}),p.create({id:v,virtual_mcp_id:s,...R?{branch:R}:{},...T?.runtime?{runtime:T.runtime}:{}}).then(()=>{He(sessionStorage,r,v),I(v)}).catch(()=>{I(v)}),v},e[3]=j,e[4]=r,e[5]=I,e[6]=p,e[7]=s,e[8]=Z):Z=e[8];const le=Z;let A;e[9]!==j||e[10]!==r||e[11]!==I||e[12]!==p||e[13]!==s?(A=T=>{const v=crypto.randomUUID(),R=T.virtualMcpId??s,te=R===s?j:null;Pt(sessionStorage,r,v,T.message),te&&Ke(sessionStorage,r,v,{branch:te}),p.create({id:v,virtual_mcp_id:R,...te?{branch:te}:{}}).then(()=>{He(sessionStorage,r,v),I(v,{virtualMcpId:T.virtualMcpId,autosend:!0})}).catch(()=>{I(v,{virtualMcpId:T.virtualMcpId,autosend:!0})})},e[9]=j,e[10]=r,e[11]=I,e[12]=p,e[13]=s,e[14]=A):A=e[14];const B=A;let U;e[15]!==C||e[16]!==p?(U=T=>{C&&p.setBranch(C,T)},e[15]=C,e[16]=p,e[17]=U):U=e[17];let J;e[18]!==Q||e[19]!==le||e[20]!==B||e[21]!==Y||e[22]!==C||e[23]!==F||e[24]!==ce||e[25]!==N||e[26]!==w||e[27]!==I||e[28]!==U?(J={virtualMcpId:F,taskId:C,openTask:I,createTask:le,createTaskWithMessage:B,activeTask:Q,isThreadLocked:ce,lockedHarness:w,lockedBranch:N,currentBranch:Y,setCurrentTaskBranch:U},e[18]=Q,e[19]=le,e[20]=B,e[21]=Y,e[22]=C,e[23]=F,e[24]=ce,e[25]=N,e[26]=w,e[27]=I,e[28]=U,e[29]=J):J=e[29];const W=J;let z;e[30]!==L||e[31]!==E||e[32]!==x||e[33]!==i?(z={user:i,contextPrompt:L,preferences:E,rawNavigateToTask:x},e[30]=L,e[31]=E,e[32]=x,e[33]=i,e[34]=z):z=e[34];const ee=z;let q;e[35]!==a||e[36]!==ee?(q=oe.jsx(js,{children:oe.jsx(it.Provider,{value:ee,children:a})}),e[35]=a,e[36]=ee,e[37]=q):q=e[37];let u;return e[38]!==q||e[39]!==W?(u=oe.jsx(Le.Provider,{value:W,children:q}),e[38]=q,e[39]=W,e[40]=u):u=e[40],u}const qs=[],Fs=Promise.resolve();function kn(t){const e=X.c(5),{children:s}=t,{createTaskWithMessage:n}=ct();let a;e[0]!==n?(a={ready:Fs,messages:qs,status:"ready",sendMessage:async i=>{n({message:ot(i)})},editQueuedMessage:Gs,stop:Hs,submit:Ks,removeLocalMessage:Vs,isSendInFlight:Ws,error:null,clearError:Bs,finishReason:null,runStatusStage:null,clearFinishReason:Us,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:Qs},e[0]=n,e[1]=a):a=e[1];const r=a;let o;return e[2]!==s||e[3]!==r?(o=oe.jsx(Ee.Provider,{value:r,children:s}),e[2]=s,e[3]=r,e[4]=o):o=e[4],o}async function Qs(){}function Us(){}function Bs(){}function Ws(){return!1}function Vs(){}async function Ks(){}function Hs(){}async function Gs(){return!1}function Mn({taskId:t,children:e}){const s=we(),n=Ge("voice_mode"),a=st(),r=Ge("chat_harness_codex"),{virtualMcpId:o,activeTask:i,currentBranch:d}=ct(),f=Jt(i?.harness_id),x=s("chat.input.codingAgentUnavailable");ze.has(t)||(ze.add(t),xt("chat_opened",{thread_id:t}));const{imageModel:E,webSearchModel:_,deepResearchModel:p,chatMode:C,setChatMode:F,appContexts:L,setTiptapDoc:k,simpleModeTier:I}=Xs(),Q=S.useContext(it);if(!Q)throw new Error(s("chat.chatContext.activeTaskProviderMissingContext"));const{user:w,contextPrompt:N,preferences:ce,rawNavigateToTask:Y}=Q,{org:$,locator:j}=ie(),Z=ws(),[le,A]=S.useState(null),B=()=>{A(new Error(x))},U=Zt(),J=We(),W=Rt(),z=gt(),{openPanel:ee}=bt(),q=At({connectionId:yt,orgId:$.id,orgSlug:$.slug}),u=_t($.slug,t,{client:q}),T=ge(u.messages),v=ge(u.status),R=ge(u.finishReason),te=ge(u.runStatusStage),Ne=ge(u.hasMoreOlder),je=ge(u.isFetchingOlder),D=S.useRef({onToolCall:U,queryClient:J,rawNavigateToTask:Y,taskId:t,manager:W,navigate:z,openPanel:ee,orgId:$.id,orgSlug:$.slug,virtualMcpId:o,currentBranch:d});D.current={onToolCall:U,queryClient:J,rawNavigateToTask:Y,taskId:t,manager:W,navigate:z,openPanel:ee,orgId:$.id,orgSlug:$.slug,virtualMcpId:o,currentBranch:d};const Re=()=>{const c=D.current;Ss(c.taskId)&&(async()=>(await ne(c.orgSlug,c.taskId),await u.reconcileFromServer()&&Pe(c.taskId).get().length===0&&vs(c.taskId)))()};Lt({orgSlug:$.slug,taskId:t,onTaskStatus:c=>{const g=D.current,P=c.data.message_id;if(c.data.status==="in_progress"&&P){Be(g.taskId,P);const M=Ms(g.taskId,P);M&&u.applyLocalMessage(M),ne(g.orgSlug,g.taskId)}Re()},onReconnect:Re}),S.useEffect(()=>{const c={onData:h=>{if(h.type==="data-thread-title"){const y=h.data;if(!y?.title)return;const b=D.current;if(!b.taskId)return;b.manager.patchThread({id:b.taskId,title:y.title,updated_at:new Date().toISOString()});return}if(h.type==="data-deck-updated"){const y=h.data;if(!y?.path)return;const b=y.path,m=D.current;m.queryClient.invalidateQueries({queryKey:ae.orgFsStat(m.orgId,"home",b)}),m.queryClient.invalidateQueries({queryKey:ae.orgFsRecent(m.orgId)}),m.openPanel(kt(b));return}if(h.type==="data-open-preview"){const y=h.data,b=D.current,m=b.taskId;if(m){const O=b.manager.threads.get().find(ue=>ue.id===m);b.manager.patchThread({id:m,...y?.branch?{branch:y.branch}:{},metadata:{...O?.metadata??{},...y?.repository?{repository:y.repository}:{},...y?.sandboxMap?{sandboxMap:y.sandboxMap}:{}}})}b.openPanel("site-editor");return}},onFinish:(h,y,b)=>{const m=D.current;Nt(m.queryClient,m.orgId,nt(h.metadata?.usage)),m.queryClient.invalidateQueries({queryKey:ae.aiPlanEntitlements(m.orgId),refetchType:"none"}),m.taskId&&ne(m.orgSlug,m.taskId),m.taskId&&m.manager.patchThread({id:m.taskId,status:Gt(b,h.parts),updated_at:new Date().toISOString()});const O=h.parts?.some(me=>{const K=me;return(K.type==="tool-bash"||K.type==="tool-write")&&K.state==="output-available"});if(m.taskId&&O){const me=ae.threadOutputs(m.taskId);for(const K of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{m.queryClient.invalidateQueries({queryKey:me})},K)}m.queryClient.invalidateQueries({queryKey:ae.homeNextActions(m.orgSlug)});const ue=h.metadata?.thread_id;ue&&ue!==m.taskId&&m.rawNavigateToTask(ue)},onError:h=>{A(h),console.error("[chat] Error",h)},onToolCall:h=>{const y=D.current,b=h.toolCall.toolName==="preview_navigate"&&rs.safeParse(h.toolCall.input);b&&b.success&&y.currentBranch&&(is(ss(y.orgSlug,y.virtualMcpId,y.currentBranch),b.data.path),y.openPanel("site-editor")),y.onToolCall(h)}};u.observer=c,ne(D.current.orgSlug,D.current.taskId);const g=h=>h==="submitted"||h==="streaming";let P=g(u.status.get().kind);const M=u.status.subscribe(()=>{const h=g(u.status.get().kind);if(h===P)return;P=h;const y=D.current;ne(y.orgSlug,y.taskId)});return()=>{u.observer===c&&(u.observer=null),M()}},[u]);const Se=v.kind==="submitted"||v.kind==="streaming",qe=T.length===0,ve=T.at(-1),Fe=!Se&&ve?.role==="assistant"&&ve.parts.some(c=>"state"in c&&c.state==="approval-requested"),Te=i,pe=(Te?.status==="in_progress"||Te?.status==="expired")&&v.kind==="ready"&&T.length>0;async function ke(c,g=!1,P){const M=t,h=o;if(f)return B(),G.delete(M),!1;const y=Object.entries(L),b=y.length>0?y.map(([K,H])=>`### App Context: ${K}
|
|
33
33
|
${H}`).join(`
|
|
34
34
|
|
|
35
35
|
`):"",m=[N,b].filter(Boolean).join(`
|
|
36
36
|
|
|
37
|
-
`);let O=C;O==="gen-image"&&!E&&(O="default"),O==="web-search"&&!_&&(O="default"),O==="deep-research"&&!p&&(O="default"),(O==="web-search"||O==="deep-research")&&F("default");const ue=Xt({thread:i?{harness_id:i.harness_id??null,branch:i.branch??null}:null,globals:{branch:d}});i?.harness_id||W.patchThread({id:M,harness_id:a?r?"codex":"claude-code":"decopilot",updated_at:new Date().toISOString()});const me={...g||n?{voiceMode:g}:{},...g&&P?{voiceTranscript:P}:{},tier:I,mode:O,toolApprovalLevel:ce.toolApprovalLevel??Mt(),system:m||void 0,agent:{id:h},thread_id:M,...ue};try{if(Se||pe){let K=!0;try{ks(M,c);const H=await u.enqueue(c,me);if(H.kind==="live")return
|
|
37
|
+
`);let O=C;O==="gen-image"&&!E&&(O="default"),O==="web-search"&&!_&&(O="default"),O==="deep-research"&&!p&&(O="default"),(O==="web-search"||O==="deep-research")&&F("default");const ue=Xt({thread:i?{harness_id:i.harness_id??null,branch:i.branch??null}:null,globals:{branch:d}});i?.harness_id||W.patchThread({id:M,harness_id:a?r?"codex":"claude-code":"decopilot",updated_at:new Date().toISOString()});const me={...g||n?{voiceMode:g}:{},...g&&P?{voiceTranscript:P}:{},tier:I,mode:O,toolApprovalLevel:ce.toolApprovalLevel??Mt(),system:m||void 0,agent:{id:h},thread_id:M,...ue};try{if(Se||pe){let K=!0;try{ks(M,c);const H=await u.enqueue(c,me);if(H.kind==="live")return Ue(M,c.id),u.applyLocalMessage(Cs(c,H.liveRunId)),!0;rt(M,{workflowId:`thread-run:${M}:${c.id}`,messageId:c.id,text:fs(c.parts),hasAttachments:c.parts.some(lt=>lt.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),ys(M)}catch(H){K=!1,Ue(M,c.id),Be(M,c.id),A(H instanceof Error?H:new Error(String(H))),fe.error(H instanceof Error?H.message:s("chat.chatContext.failedToQueueMessage"))}return ne($.slug,M),K}return await u.submit({kind:"message",message:c},me),!0}finally{G.delete(M)}}async function he(c){const g=c.parts??at(c.tiptapDoc);if(g.length===0||G.has(t))return;G.add(t),A(null),k(void 0);const P={tiptapDoc:c.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:w?.image??void 0,name:w?.name??"you"}},M={id:crypto.randomUUID(),role:"user",parts:g,metadata:P};await ke(M)}async function Qe(c,g){if(f)return B(),!1;if(G.has(t))return fe.info(s("chat.chatContext.stillSendingPreviousMessage")),!1;if(G.add(t),!await Z.cancel(t,c))return G.delete(t),fe.error(s("chat.chatContext.couldNotRemoveOriginalMessage")),!1;Ue(t,c),u.removeLocalMessage(c);const M={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:g}],metadata:{created_at:new Date().toISOString(),user:{avatar:w?.image??void 0,name:w?.name??"you"}}};try{return await ke(M)}catch(h){return fe.error(h instanceof Error?h.message:s("chat.chatContext.failedToSendEditedMessage")),!1}}const l=async()=>{u.stop();try{const c=await fetch(`/api/${$.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(c.status===404)return;if(!c.ok){const g=await c.json().catch(()=>({}));throw new Error(g.message??s("chat.chatContext.cancelFailedStatus",{status:c.status}))}}catch(c){const g=c instanceof Error?c.message:s("chat.chatContext.failedToCancel");fe.error(g),console.error("[chat] cancelRun",c)}},Me=c=>he(ot(c)),se=St({strict:!1}).autosend===Ct;S.useEffect(()=>{if(!se||v.kind==="loading"||T.length>0||f)return;const c=It(sessionStorage,j,t);c&&he(c.message).then(()=>{wt(sessionStorage,j,t)})},[se,v.kind,T.length,f,j,t,he]);const V={ready:u.ready,voiceContext:n?[N,...Object.entries(L).map(([c,g])=>`${c}: ${g}`)].filter(Boolean).join(`
|
|
38
38
|
|
|
39
|
-
`):void 0,sendVoiceMessage:async(c,g,P)=>G.has(t)?!1:(G.add(t),A(null),ke({id:c,role:"user",parts:[{type:"text",text:g}],metadata:{created_at:new Date().toISOString(),user:{name:w?.name??"you",avatar:w?.image??void 0}}},!0,P)),messages:T,status:Os(v),sendMessage:Me,editQueuedMessage:
|
|
39
|
+
`):void 0,sendVoiceMessage:async(c,g,P)=>G.has(t)?!1:(G.add(t),A(null),ke({id:c,role:"user",parts:[{type:"text",text:g}],metadata:{created_at:new Date().toISOString(),user:{name:w?.name??"you",avatar:w?.image??void 0}}},!0,P)),messages:T,status:Os(v),sendMessage:Me,editQueuedMessage:Qe,stop:()=>{if(f){B();return}l()},submit:async(c,g)=>{if(f){B();return}if(c.kind==="toolOutput"&&(i?.harness_id==="claude-code"||i?.harness_id==="codex")){const{response:P}=c.output??{};await u.submit({kind:"message",message:{id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:typeof P=="string"?P:JSON.stringify(c.output)}],metadata:{created_at:new Date().toISOString(),user:{avatar:w?.image??void 0,name:w?.name??"you"},toolOutput:{toolCallId:c.toolCallId,output:c.output}}}},g);return}await u.submit(c,g)},removeLocalMessage:c=>u.removeLocalMessage(c),isSendInFlight:()=>G.has(t),error:le,clearError:()=>A(null),finishReason:R,runStatusStage:te,clearFinishReason:()=>u.finishReason.set(null),isStreaming:Se,isChatEmpty:qe,isWaitingForApprovals:Fe??!1,isRunInProgress:pe,hasMoreOlder:Ne,isFetchingOlder:je,fetchOlderMessages:u.fetchOlderMessages.bind(u)};return oe.jsx(Ee.Provider,{value:V,children:e})}function xn(){const t=we(),e=S.useContext(Ee);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function bn(){return S.useContext(Ee)}function ct(){const t=we(),e=S.useContext(Le);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function Xs(){const t=we(),e=S.useContext(Ve);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function Cn(){return S.useContext(Ve)}function In(){return S.useContext(Le)}export{Mn as A,gn as B,js as C,vn as D,bs as E,xs as F,Ht as G,Kt as H,cn as I,Is as L,kn as T,xn as a,ct as b,Xs as c,ln as d,bn as e,dn as f,at as g,Tn as h,yn as i,pn as j,hn as k,ss as l,ws as m,Ue as n,$e as o,mn as p,Es as q,un as r,Jt as s,fn as t,In as u,Sn as v,as as w,_s as x,Cn as y,nt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as l}from"./index-
|
|
1
|
+
import{a1 as l}from"./index-bl_DQ3mH.js";const y="[SUBSCRIPTION_REQUIRED]";function h(t){return t?.message.startsWith(y)?t.message.includes("used its free task executions")?"trial_exhausted":t.message.includes("used its monthly task executions")?"monthly_exhausted":t.message.includes("reached its execution limit")?"runs_exhausted":null:null}function d(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const _="__home__";function a(t,e){return l.chatDraft(t,e)}function m(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function x(t,e,n,r,s){const u=a(e,n);if(d(r)){t.removeItem(u);return}const c={tiptapDoc:r,updatedAt:Date.now()},o=JSON.stringify(c);try{t.setItem(u,o)}catch(i){if(p(i)){const f=new TextEncoder().encode(o).byteLength;s?.onQuotaExceeded?.({docSizeBytes:f});return}throw i}}function R(t,e,n){const r=a(e,n),s=t.getItem(r),u=m(s);return s!==null&&u===null&&t.removeItem(r),u}function D(t,e,n){t.removeItem(a(e,n))}function p(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}export{_ as H,D as c,d as i,R as r,h as s,x as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,ea as l,eb as b,ah as m}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,ea as l,eb as b,ah as m}from"./index-bl_DQ3mH.js";function p(o){const e=n.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(l,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{p as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,j as i,u as w,b as S,d as v,B as N,N as C,Y as K,m as $,K as T,h as I}from"./index-
|
|
1
|
+
import{c as y,j as i,u as w,b as S,d as v,B as N,N as C,Y as K,m as $,K as T,h as I}from"./index-bl_DQ3mH.js";import{A as F}from"./agent-icon-BdZdLCky.js";import{R as P}from"./required-auth-layout-Dzef4Ao1.js";import"./AlertCircle-BILwGqjV.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./LinkBroken01-BBYM52IU.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronUp-BrMcnDd0.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./UserSquare-BXjBRbTF.js";import"./Copy01-QpufVNbj.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Image01-D8Dg78Ju.js";import"./Globe04-C2IFbCwJ.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./Key01-CCpcNn9J.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Play-CIe1tupB.js";import"./Plus-DTyq8wfJ.js";import"./SearchMd-DnZ_sK_U.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./XClose-BMDlg-34.js";async function _(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function R(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function k(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=i.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:i.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function A(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(I,{className:"size-6 text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let s;return t[3]!==r?(s=i.jsxs(b,{children:[l,i.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=s):s=t[4],s}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:s}=t,n=S(),m=v();let d;e[0]!==n||e[1]!==l?(d=n(l),e[0]=n,e[1]=l,e[2]=d):d=e[2];let u;e[3]!==d?(u=i.jsx("h1",{className:"text-lg font-medium text-foreground",children:d}),e[3]=d,e[4]=u):u=e[4];let f;e[5]!==r||e[6]!==n?(f=n(r),e[5]=r,e[6]=n,e[7]=f):f=e[7];let a;e[8]!==f?(a=i.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[8]=f,e[9]=a):a=e[9];let c;e[10]!==u||e[11]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-2",children:[u,a]}),e[10]=u,e[11]=a,e[12]=c):c=e[12];let p;e[13]!==s||e[14]!==n?(p=s?i.jsx(N,{variant:"outline",onClick:s,children:n("chooseEditor.retry")}):null,e[13]=s,e[14]=n,e[15]=p):p=e[15];let o;e[16]!==m?(o=()=>m({to:"/"}),e[16]=m,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=i.jsx(N,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==p||e[24]!==j?(x=i.jsxs("div",{className:"flex items-center gap-2",children:[p,j]}),e[23]=p,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==c?(h=i.jsxs(b,{children:[c,x]}),e[26]=x,e[27]=c,e[28]=h):h=e[28],h}function q(t){const e=y.c(6),{orgSlug:l,projectId:r,pageSearch:s}=t;let n;e[0]!==l||e[1]!==r?(n={org:l,agentId:r},e[0]=l,e[1]=r,e[2]=n):n=e[2];let m;return e[3]!==s||e[4]!==n?(m=i.jsx(C,{to:K.siteEditorContent,params:n,search:s,replace:!0}),e[3]=s,e[4]=n,e[5]=m):m=e[5],m}function L(t){const e=y.c(26),{matches:l,pageSearch:r}=t,s=S(),n=v();let m;e[0]!==n||e[1]!==r?(m=x=>{n({to:K.siteEditorContent,params:{org:x.orgSlug,agentId:x.project.id},search:r})},e[0]=n,e[1]=r,e[2]=m):m=e[2];const d=m;let u;e[3]!==s?(u=s("chooseEditor.chooser.title"),e[3]=s,e[4]=u):u=e[4];let f;e[5]!==u?(f=i.jsx("h1",{className:"text-lg font-medium text-foreground",children:u}),e[5]=u,e[6]=f):f=e[6];let a;e[7]!==s?(a=s("chooseEditor.chooser.subtitle"),e[7]=s,e[8]=a):a=e[8];let c;e[9]!==a?(c=i.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[9]=a,e[10]=c):c=e[10];let p;e[11]!==f||e[12]!==c?(p=i.jsxs("div",{className:"flex flex-col gap-2",children:[f,c]}),e[11]=f,e[12]=c,e[13]=p):p=e[13];let o;if(e[14]!==l||e[15]!==d||e[16]!==s){let x;e[18]!==d||e[19]!==s?(x=h=>i.jsxs("button",{type:"button",onClick:()=>d(h),"aria-label":s("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[i.jsx(F,{icon:h.project.icon,name:h.project.title,size:"sm"}),i.jsxs("div",{className:"flex min-w-0 flex-col",children:[i.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),i.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=d,e[19]=s,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=d,e[16]=s,e[17]=o}else o=e[17];let g;e[21]!==o?(g=i.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==p||e[24]!==g?(j=i.jsxs(b,{children:[p,g]}),e[23]=p,e[24]=g,e[25]=j):j=e[25],j}function z(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=w(e);let r,s,n,m;t[1]!==l?(s=l.site?.trim()??"",r=k(l),m=$,n=T.editorResolve(s),t[1]=l,t[2]=r,t[3]=s,t[4]=n,t[5]=m):(r=t[2],s=t[3],n=t[4],m=t[5]);let d;t[6]!==s?(d=()=>_(s),t[6]=s,t[7]=d):d=t[7];const u=s.length>0;let f;t[8]!==n||t[9]!==d||t[10]!==u?(f={queryKey:n,queryFn:d,enabled:u,staleTime:1/0,retry:B},t[8]=n,t[9]=d,t[10]=u,t[11]=f):f=t[11];const a=m(f);if(!s){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(a.isError){let o;return t[13]!==a?(o=R(a.error)?i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):i.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>a.refetch()}),t[13]=a,t[14]=o):o=t[14],o}if(!a.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(A,{}),t[15]=o):o=t[15],o}const{matches:c}=a.data;if(c.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(c.length===1&&c[0]){let o;return t[17]!==c[0].orgSlug||t[18]!==c[0].project.id||t[19]!==r?(o=i.jsx(q,{orgSlug:c[0].orgSlug,projectId:c[0].project.id,pageSearch:r}),t[17]=c[0].orgSlug,t[18]=c[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let p;return t[21]!==c||t[22]!==r?(p=i.jsx(L,{matches:c,pageSearch:r}),t[21]=c,t[22]=r,t[23]=p):p=t[23],p}function B(t,e){return!R(e)&&t<2}function Ee(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(P,{children:i.jsx(z,{})}),t[0]=e):e=t[0],e}export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as qe,a0 as Tt,a1 as bt,K as ge,m as St}from"./index-CL22V9cU.js";import{s as xe}from"./thread-intent-CgK6_lx2.js";function Tn(e){const t=qe.c(12);let n;t[0]!==e?(n=bt.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[i,o]=Tt(r,null);let c;t[2]!==i||t[3]!==e?(c=e?xe(i):null,t[2]=i,t[3]=e,t[4]=c):c=t[4];const l=c;let u,T;t[5]!==o?(u=P=>o(xe(P)),T=()=>o(null),t[5]=o,t[6]=u,t[7]=T):(u=t[6],T=t[7]);let R;return t[8]!==u||t[9]!==T||t[10]!==l?(R={url:l,setUrl:u,clear:T},t[8]=u,t[9]=T,t[10]=l,t[11]=R):R=t[11],R}class Rt extends Error{constructor(t,n,r=[]){super(n),this.blocks=t,this.fields=r,this.name="BlockConflictError"}blocks;fields}function ve(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Et(e,t,n){return["decofile-write",e,t,n]}function bn(e,t,n){return{id:Et(e,t,n).join(":")}}function me(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function kt(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Ot(e,t,n){e.setQueryData(ge.decofileDraft(ve(t)),n)}function Sn(e,t){return e.getQueryData(ge.decofileDraft(ve(t)))??null}async function Rn(e,t){return(await fetch(me(e),{cache:"no-store",headers:{"if-none-match":`"${t}"`}}).catch(()=>null))?.status===200}function En(e){const t=qe.c(4);let n;t[0]!==e?(n=ge.decofileDraft(e?ve(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:Pt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:i}=St(r);return i??null}async function Pt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function kn(e,t){const n=await fetch(me(t),{cache:"no-store"});if(!n.ok){const i=new Error(`Failed to fetch decofile: ${n.status}`);throw i.status=n.status,i}const r=await n.json();return r.token&&Ot(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function On(e,t){const n=await fetch(me(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const i=await n.json().catch(()=>({}));throw i.code==="block-conflict"?new Rt(i.blocks??[],i.error??"Block changed"):new Error(i.error??`Save failed (${n.status})`)}if(!n.ok)return kt(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function wt(e){return e.replace(/\/+$/,"")||"/"}function Pn(e){return e.trim().replace(/^\/+|\/+$/g,"")}function $t(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function wn(e){const t=e.trim();return t?$t(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const he=/:([A-Za-z0-9_-]+)|\*/g;function $n(e){const t=[];for(const n of e.matchAll(he)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function ze(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function Mn(e){e=ze(e);const t=[];let n=0;for(const r of e.matchAll(he))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function jn(e,t){return ze(e).replace(he,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function Fe(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function Ln(e){return e.includes("@")}function We(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function Vn(e,t){if(e===t)return!0;const n=We(e);return n?t===n||We(t)===n:!1}function J(e,t){const n=e.manifest?.blocks??{};for(const[r,i]of Object.entries(n))if(t in i)return r;return null}function Bn(e,t){return J(e,t)!==null}function _e(e,t){const n=J(e,t);return n!==null&&n.includes("sections")}function Mt(e,t){const n=J(e,t);return n!==null&&n.includes("apps")}function jt(e,t){const n=J(e,t);return n!==null&&n.includes("matchers")}function ee(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function Ae(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Cn="oklch(0.7278 0.151 289)",Lt="website/matchers/always.ts",Ge="website/matchers/never.ts",te="website/flags/multivariate.ts",Y="website/flags/multivariate/section.ts";function Te(){return{__resolveType:Lt}}function F(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const Vt=12,Bt=8,le=32,Ct=40,Dt="__SECTION_REF__";function fe(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function Ye(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const It="VideoWidget";function x(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function be(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Se(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Xe(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function Re(e,t){const n=t.manifest?.blocks??{};for(const l of Object.values(n))if(l[e])return l[e];const r=be(e)??Se(e);if(r){for(const l of Xe(r.vendor,r.app))for(const u of Object.values(n))if(u[l])return u[l]}const i=Qe(e);for(const l of Object.values(n))if(l[i])return l[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Ze(e,t){if(Mt(e,t))return!0;const n=be(t)??Se(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Xe(n.vendor,n.app).some(c=>c in r))return!0;const i=Qe(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function Ut(e){return e==="site/apps/site.ts"?!1:be(e)!==null||Se(e)!==null}function Je(e,t){return et(t,{resolveType:e})}function Dn(e,t){return et(t,{ref:e})}function et(e,t){const n=e.schema??{},r="resolveType"in t?Re(t.resolveType,e):{},i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const f=s.split("/").pop()??"",v=i[f];return v||(f===Dt?o.sections??{}:{})};let l;typeof r.$ref=="string"?l=c(r.$ref):Object.keys(r).length>0?l=r:l=n;const u=s=>typeof s.$ref=="string"?c(s.$ref):s,T=s=>{const v=u(s).properties?.type;if(v){if(typeof v.const=="string")return v.const;if(typeof v.default=="string")return v.default;if(Array.isArray(v.enum)&&typeof v.enum[0]=="string")return v.enum[0]}},R=(s,f)=>{const v=u(s);return typeof v.title=="string"&&!v.title.startsWith("#")?v.title:f},P=(s,f=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const v=s.$ref.split("/").pop()??"";return!v||f.has(v)?s:P(c(s.$ref),new Set([...f,v]))},H=s=>{const f=s.properties?.__resolveType?.enum;return Array.isArray(f)&&typeof f[0]=="string"?f[0]:void 0},Oe=s=>H(s)!==void 0,Pe=(s,f=new Set)=>{if(typeof s.$ref!="string")return[];const v=s.$ref.split("/").pop()??"";if(!v||f.has(v))return[];const a=c(s.$ref),k=a.anyOf??a.oneOf;if(!Array.isArray(k))return[];const E=new Set([...f,v]);return k.flatMap(O=>Oe(O)?[O]:Pe(O,E))},M=s=>{const f=s.hide;return f===!0||f==="true"},we=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),G=(s,f=new Set,v=0)=>{if(v>Vt)return{};if(typeof s.$ref=="string"){const k=s.$ref.split("/").pop()??"";return f.has(k)?{}:G(c(s.$ref),new Set([...f,k]),v+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...x(a.__required),...x(s.required)]);for(const k of["allOf","anyOf","oneOf"]){const E=s[k];if(Array.isArray(E))for(const O of E){const L=x(a.__required),I=G(O,f,v+1);a={...a,...I};const w=k==="allOf"?[...L,...x(I.__required)]:L;w.length>0?a.__required=w:delete a.__required}}return a},j=(s,f=0,v=new Set)=>{let a=s,k;if(typeof s.$ref=="string"){a=c(s.$ref);const S=s.$ref.split("/").pop()??"";k=S,S===It&&!a.format&&(a={...a,format:"video-uri"})}a=P(a);const E=k!==void 0&&v.has(k),O=k!==void 0?new Set([...v,k]):v,L=(S,y,_,m=!0)=>!E&&(!m||_<=Ct)&&y<Bt?j(S,y,O):void 0;let I;{const S=a.anyOf??a.oneOf;if(Array.isArray(S)){const y=S.filter(m=>!(m.type==="null"||m.type===null)),_=m=>{if(typeof m.const=="string"||typeof m.const=="number")return m.const;if(Array.isArray(m.enum)&&m.enum.length===1&&(typeof m.enum[0]=="string"||typeof m.enum[0]=="number"))return m.enum[0]};y.length>0&&y.every(m=>_(m)!==void 0)&&(I=y.map(m=>_(m)))}}let w,N,Le=!1;if(a.type)w=Array.isArray(a.type)?String(a.type.find(S=>S!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const y=(a.anyOf??a.oneOf).filter(_=>!(_.type==="null"||_.type===null));if(y.length===0)w="null";else if(y.length===1){const _=y[0];N=_,w=_.type?Array.isArray(_.type)?String(_.type[0]):String(_.type):typeof _.$ref=="string"?"object":"string"}else{if(I){const p=d=>typeof s[d]=="string"?s[d]:typeof a[d]=="string"?a[d]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:I,format:p("format"),options:p("options")}}const _=y.filter(Oe),m=y.map(p=>P(p)).find(fe),se=y.filter(p=>!fe(P(p))).every(p=>typeof p.$ref=="string"||_.includes(p)),ht=_.some(p=>{const d=p.properties?.__resolveType?.enum;return Array.isArray(d)&&d[0]===te}),Be=()=>{const p=new Map;for(const b of[..._,...y.filter(h=>!_.includes(h)).flatMap(h=>Pe(h))]){const h=H(b);h&&!p.has(h)&&p.set(h,b)}const d=[...p].map(([b,h])=>({resolveType:b,title:typeof h.title=="string"?h.title:F(b),description:typeof h.description=="string"?h.description:void 0,schema:L(h,f+1,p.size)})),g=[];for(const b of y){if(_.includes(b)||typeof b.$ref!="string")continue;const h=c(b.$ref);let C;const ae=h.properties?.__resolveType;if(Array.isArray(ae?.enum)&&typeof ae.enum[0]=="string"&&(C=ae.enum[0]),!C&&Array.isArray(h.allOf))for(const At of h.allOf){const ce=At.properties?.__resolveType?.enum;if(Array.isArray(ce)&&typeof ce[0]=="string"){C=ce[0];break}}C&&g.push({resolveType:C,title:typeof h.title=="string"&&!h.title.startsWith("#")?h.title:F(C),description:typeof h.description=="string"?h.description:void 0,schema:L(h,f+1,y.length)})}const A=new Set(d.map(b=>b.resolveType)),$=[...d,...g.filter(b=>!A.has(b.resolveType))],V=y.filter(b=>!_.includes(b)),B=V.length===1&&!E?j(V[0],f+1,O):void 0;return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:$,plainSchema:B,hidden:M(a)||M(s)?!0:void 0}};if(m){if(!Ye(m,c)&&y.length>1&&se){const d=j(m,f+1,O),g=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:d.title,A=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:d.description;return{...d,type:"array",title:g,description:A,loaderRef:_.length>0?{...Be(),title:g,description:A}:void 0}}if(ht){const d=j(m,f+1,O);return{...d,type:"array",title:typeof a.title=="string"?a.title:d.title,description:typeof a.description=="string"?a.description:d.description}}}if(_.length>0)return Be();const Ce=p=>{const d=u(p);if(typeof d.title=="string"&&Fe(d.title))return!0;const g=d.properties?.__resolveType?.enum;if(Array.isArray(g)&&typeof g[0]=="string")return!0;if(Array.isArray(d.allOf))for(const A of d.allOf){const $=A.properties?.__resolveType?.enum;if(Array.isArray($)&&typeof $[0]=="string")return!0}return!1},De=y.map(p=>T(p));if(y.length>1&&De.every(p=>typeof p=="string")&&!y.some(Ce)){const p=y.map((d,g)=>{const A=u(d),$=De[g];return{resolveType:$,title:R(d,$),description:typeof A.description=="string"?A.description:void 0,discriminatorValue:$,schema:L(A,f+1,y.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:p,hidden:M(a)||M(s)?!0:void 0}}const Ie=p=>{if(Ce(p))return!1;const d=u(p);return d.type==="object"||!!d.properties},_t=p=>{const d=P(p);return fe(d)?!Ye(d,c):!1},Ue=f<le&&y.every(p=>Ie(p)||_t(p))&&y.some(Ie);if(y.every(p=>typeof p.$ref=="string")&&!Ue){const p=[];for(const d of y){const g=c(d.$ref);let A,$;if(typeof g.title=="string"){const B=Fe(g.title);B&&(A=B.blockId,$=B.blockId)}if(!A&&Array.isArray(g.allOf))for(const B of g.allOf){const C=((B.properties??{}).__resolveType??{}).enum;if(Array.isArray(C)&&typeof C[0]=="string"){A=C[0];break}}if(!A){const b=g.properties?.__resolveType?.enum;Array.isArray(b)&&typeof b[0]=="string"&&(A=b[0])}A||(A=d.$ref.split("/").pop()??"");const V=A.includes("/")?void 0:T(d);!V&&!A.includes("/")||p.push({resolveType:V??A,title:$??(typeof g.title=="string"&&!g.title.startsWith("#")?g.title:F(A)),description:typeof g.description=="string"?g.description:void 0,discriminatorValue:V,schema:L(g,f+1,y.length)})}return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:p,hidden:M(a)||M(s)?!0:void 0}}if(Ue){const p=g=>{if(typeof g.const=="string"||typeof g.const=="number"||typeof g.const=="boolean")return g.const;if(Array.isArray(g.enum)&&g.enum.length===1&&(typeof g.enum[0]=="string"||typeof g.enum[0]=="number"||typeof g.enum[0]=="boolean"))return g.enum[0]},d=y.map((g,A)=>{const $=u(g).properties??{},V={};for(const[B,b]of Object.entries($)){const h=p(b);h!==void 0&&(V[B]=h)}return{title:R(g,`Option ${A+1}`),schema:j(g,f+1),discriminators:Object.keys(V).length?V:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:d,hidden:M(a)||M(s)?!0:void 0}}w="object"}}else a.allOf?(w="object",Le=we(a.title)):typeof s.$ref=="string"&&(w="object");let ie,Ve;if(f<le&&!E){const S=G(a),y=x(S.__required);y.length>0&&(Ve=y);const _=Object.entries(S).filter(([m])=>!m.startsWith("__")&&m!=="@type");if(_.length>0){ie={};for(const[m,se]of _)ie[m]=j(se,f+1,O)}}let oe;if((w==="array"||a.type==="array")&&f<le&&!E){const S=a.items;if(S){oe=j(S,f+1,O);const y=u(S);typeof y.title=="string"&&y.title.includes("{{")&&(oe.titleBy=y.title)}}const U=S=>{const y=N?.[S];return typeof y=="string"?y:void 0},mt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(N&&"default"in N)return N.default};return{type:w??"string",title:typeof s.title=="string"?s.title:!Le&&typeof a.title=="string"?a.title:U("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:U("description"),default:mt(),enum:Array.isArray(a.enum)?a.enum:I??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:U("format"),properties:ie,required:Ve,items:oe,recursiveRef:E&&typeof s.$ref=="string"&&(w==="object"||w==="array"||a.type==="array")?s.$ref:void 0,hidden:M(a)||M(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:U("titleBy"),image:typeof a.image=="string"?a.image:U("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:U("options")}};if("ref"in t)return j({$ref:t.ref});const $e=l.properties??{},vt=Object.keys($e).every(s=>s.startsWith("__"));if(Array.isArray(l.allOf)&&l.allOf.length===1&&vt){const s=$e.__resolveType,f=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const v of l.allOf){const a=P(v);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const E=j(a,0);if(E.type==="inline-union"&&E.inlineUnionBranches){const O=we(E.title);return{...E,title:O?void 0:E.title,inlineUnionBranches:f?E.inlineUnionBranches.map(L=>({...L,discriminators:{...L.discriminators??{},__resolveType:f}})):E.inlineUnionBranches}}}}const Me=G(l),re={};for(const[s,f]of Object.entries(Me))s.startsWith("__")||s==="@type"||(re[s]=j(f,0));if(Object.keys(re).length===0)return null;const je=x(Me.__required);return{type:"object",title:typeof l.title=="string"?l.title:void 0,properties:re,required:je.length>0?je:void 0}}function In(e,t){const n=t.schema??{},r=Re(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(T=>!T.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const u=c.__resolveType;return!!u&&Array.isArray(u.enum)&&u.enum[0]===e}function Un(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function Ee(e,t){const n=t.schema??{},r=Re(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,l=o.logo,u=o,T=P=>P===!0||P==="true",R=T(u.hide)||T(u.ignore)||T(u.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof l=="string"?l:void 0,hidden:R||void 0}}const xt=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],He="website/sections/Rendering/Lazy.tsx";function D(e){return xt.some(t=>e.endsWith(t))}const tt=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],nt=new Set(tt),Ft=tt[0],Wt=new Set(["site/sections/Theme/Theme.tsx"]);function ne(e){return!!(Wt.has(e)||D(e)||e.toLowerCase().includes("preview"))}function Yt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(nt.has(r))return r;return Ft}function ue(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return ue(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...ue(n));return t}return[]}function Ht(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(ne(o))continue;const c=Ee(o,e);n.push({resolveType:o,title:c.title??F(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function xn(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))ne(o)||n.has(o)||n.set(o,{resolveType:o,title:F(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function rt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Y)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const i of r){const o=i?.value;if(!o)continue;let c=o.__resolveType;if(typeof c=="string"&&D(c)&&(c=o.section?.__resolveType??c),typeof c=="string"&&_e(e,c))return c}return n}function Nt(e,t){return rt(e,t)!==t.__resolveType}function it(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||Ae(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||nt.has(c)||typeof o.path=="string"||ne(c)||!(_e(e,c)||c===Y&&Nt(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Kt(e,t){const n=ee(t.resolveType),r=n?{}:Ee(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||F(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Fn(e,t){const n=Yt(e),r=Je(n,e),i=ue(r?.properties?.sections),o=new Map,c=l=>{if(!ne(l.resolveType)){if(ee(l.resolveType)){Ae(l.resolveType)||o.set(l.resolveType,l);return}_e(e,l.resolveType)&&(o.has(l.resolveType)||o.set(l.resolveType,l))}};for(const l of Ht(e))c(l);for(const l of i)c(Kt(e,l));for(const l of it(e,t))c(l);return[...o.values()].sort((l,u)=>l.title.localeCompare(u.title))}function Wn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const ke="website/loaders/redirect.ts",Yn=new Set([ke,"website/loaders/redirects.ts"]),Hn={temporary:307,permanent:301},Ne=e=>typeof e=="string"?e:"",qt=e=>e==="permanent"?"permanent":"temporary";function ot(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:Ne(t.from),to:Ne(t.to),type:qt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function zt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;if(i.__resolveType!==ke)continue;const{from:o,to:c,type:l,discardQueryParameters:u}=ot(i);t.push({key:n,from:o,to:c,type:l,discardQueryParameters:u})}return t}function Nn(e){return ot(e)}function Kn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:ke}}function Gt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const Qt=1e3;function qn(e,t){const n=Gt(t);for(let r=0;r<Qt;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}function Xt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function zn(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(l=>l.key===n);if(o)return o;const c=e.find(l=>l.key.endsWith(`-${n}`));if(c)return c}if(i){const o=Ke(e,i);if(o)return o}if(r){const o=Ke(e,r);if(o)return o}return null}function Ke(e,t,n){const r=wt;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}const st=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),q="site",at="site/apps/site.ts";function pe(e,t){return e===q?!0:t.__resolveType===at}function Gn(e,t){return e?Jt(e).length>0||zt(e).length>0?!0:t?nn(e,t).length>0||en(e,t)?!0:tn(e,t).length>0:!1:!1}function Zt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!st.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Xt(e),path:n.path}}function Jt(e){const t=[];for(const[n,r]of Object.entries(e)){const i=Zt(n,r);i&&t.push(i)}return t}function ct(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ye(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?Ee(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function en(e,t){const n=e[q];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(pe(q,r)||Ze(t,i)))return{key:q,name:ye(q,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!pe(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:at;return{key:r,name:ye(r,o,t),resolveType:c}}return null}function tn(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(st.has(c)||typeof o.path!="string"&&(pe(r,o)||!Ze(t,c)&&!Ut(c)||n.push({key:r,name:ye(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function nn(e,t){return it(t,e).map(n=>{const r=e[n.resolveType],i=rt(t,r);return{key:n.resolveType,name:n.description??ct(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const rn=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function on(e){return e.includes("matchers")||e.includes("Match")}function lt(e,t){const n=e.__resolveType;return typeof n!="string"||!n||rn.has(n)?!1:t?jt(t,n):on(n)}function Qn(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||!ee(r)||Ae(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;lt(o,e)&&n.push({blockKey:r,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((r,i)=>(r.name??r.blockKey).localeCompare(i.name??i.blockKey))}function z(e,t,n){if(!e)return!1;const r=e.__resolveType;if(typeof r!="string"||!ee(r)||!Object.hasOwn(t,r))return!1;const i=t[r];return!i||typeof i!="object"||Array.isArray(i)?!1:lt(i,n)}function Xn(e,t,n){return z(e,t,n)?e?.__resolveType??null:null}function ft(e,t,n){if(!e)return null;const r=e.__resolveType??"";if(!r)return null;if(z(e,t,n)){const c=t[r]??{},l=c.__resolveType??r,{__resolveType:u,name:T,...R}=c;return{resolveType:l,data:R,blockKey:r}}const{__resolveType:i,...o}=e;return{resolveType:r,data:o}}function sn(e,t,n){const r=ft(e,t,n);return r?{__resolveType:r.resolveType,...r.data}:{__resolveType:""}}function Zn(e,t,n){if(e)return z(e,t,n)?sn(e,t,n):e}function an(e,t,n,r){if(!e)return"Default";if(z(e,t,r)){const i=e.__resolveType??"",o=t[i];return ct(i,o)}return n(e)}function Jn(e,t,n){return{__resolveType:e,...t,name:n}}function er(e){return{__resolveType:e}}function tr(e,t,n){const r=ft(e,t,n);return r?{resolveType:r.resolveType,formValue:r.data}:{resolveType:"",formValue:{}}}function nr(e,t){const n={__resolveType:e};if(!e||!t)return n;const r=Je(e,t),i=r?.type==="inline-union"?r.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function ut(e){const t=e.__resolveType??"";return D(t)?e.section??e:e}function Z(e){const i=(D(e.__resolveType??"")?e.section:e)?.variants?.[0];return i?.rule?.__resolveType!==Ge?null:i?.value??null}function rr(e){const t=ut(e);return{__resolveType:Y,variants:[{value:t,rule:{__resolveType:Ge}}]}}function ir(e){const t=e.__resolveType??"";if(!t)return null;if(D(t))return e.section??null;const n=Z(e);return n?D(n.__resolveType??"")?n:{__resolveType:He,section:ut(n)}:{__resolveType:He,section:e}}function Q(e){const t=e.__resolveType??"";if(!t)return null;if(D(t)){const n=e.section,r=n?.__resolveType??"";return!r||!n?null:{resolveType:r,data:n}}return{resolveType:t,data:e}}function or(e){const t=Z(e);if(t)return Q(t);if(D(e.__resolveType??"")){const r=e.section;if(!r)return null;const i=Z(r);return Q(i||r)}return Q(e)}function sr(e){return Z(e)}const cn=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function pt(e){if(!e)return!1;const t=e.__resolveType??"";return t===""?Object.keys(e).length===0:cn.includes(t)||t.includes("always")}function ln(e){const t=e.variants??[];if(t.length===0)return-1;const n=t.findIndex(r=>pt(r.rule));return n!==-1?n:t.length-1}function ar(e,t,n){const r=n.variants??[];if(r.length===0)return null;const i=ln(n),o=r[i]?.value;if(!o)return null;const c=structuredClone(o);return t.isLazy?{...e,section:c}:c}function yt(e,t){return t.isMultivariate?t.isLazy?e.section??null:e:null}function cr(e,t){return Array.isArray(e.variants)?e.variants.map((n,r)=>({label:t(n.rule)||`Variant ${r+1}`,value:n.value??{},rule:n.rule})):[]}function lr(e,t){const n=e.__resolveType??"";if(!n)return null;if(D(n)){const r=e.section??e,i=r.__resolveType??n;if(!i.includes("/")&&i in t){const o=t[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...r},resolveType:i}}if(!n.includes("/")&&n in t){const r=t[n]??{};return{data:{...r},resolveType:r.__resolveType??n}}return{data:{...e},resolveType:n}}function fn(e,t){const n=e.__resolveType??"";return D(n)?{...e,section:t}:t}function un(e,t,n){return t.isLazy?{...e,section:n}:n}function fr(e,t,n){const r=[...e.variants??[]],i=r[t];if(!i)return e;const o=i.value??{};return r[t]={...i,value:fn(o,n)},{...e,variants:r}}function ur(e,t,n){const r=[...e.variants??[]];return r[t]?(r[t]={...r[t],rule:n},{...e,variants:r}):e}function pr(e,t){const n=[...e.variants??[]],r=n[t];return r?(n.splice(t+1,0,structuredClone(r)),{...e,variants:n}):e}function yr(e,t,n){const r=[...e.variants??[]];if(t===n||t<0||n<0||t>=r.length||n>=r.length)return e;const[i]=r.splice(t,1);return i?(r.splice(n,0,i),{...e,variants:r}):e}function dr(e,t){const n=[...e.variants??[]];return n.length<=1?null:(n.splice(t,1),{...e,variants:n})}function de(e){return{rule:Te(),value:structuredClone(e)}}function dt(e,t){return{...t,__resolveType:Y,variants:e}}function gr(e){return e.isHidden!==!0&&e.isSavedBlock!==!0}function pn(e,t){if(t.isHidden)return null;if(t.isMultivariate){const r=yt(e,t)?.variants??[],i=r[r.length-1]?.value;return i?structuredClone(i):null}if(t.isLazy){const n=e.section;return n?structuredClone(n):null}return structuredClone(e)}function yn(e,t,n){if(t.isMultivariate||t.isHidden)return null;const r=pn(e,t);if(!r)return null;const i=dt([de(r),de(r)]);return t.isLazy?{...e,section:i}:i}function vr(e,t,n){if(t.isHidden||t.isSavedBlock)return null;if(t.isMultivariate){const i=yt(e,t);if(!i)return null;const o=i.variants??[],c=o[o.length-1]?.value;if(!c)return null;const l=dt([...o,de(c)],i);return{section:un(e,t,l),newVariantIndex:o.length}}const r=yn(e,t);return r?{section:r,newVariantIndex:1}:null}function dn(e){return e.anyOfRefs?.some(t=>t.resolveType!==te?!1:t.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function mr(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===Y&&Array.isArray(t.variants)}function gt(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.__resolveType===te}function hr(e){if(!gt(e))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=t[0]?.value;return Array.isArray(n)?n:null}function _r(e,t){if(!gt(e))return t;const n=structuredClone(e),r=[...n.variants??[]];return r.length===0?r.push({rule:Te(),value:t}):r[0]={...r[0],value:t},{...n,variants:r}}function Ar(e,t){const r=e[t]?.sections;if(!r||Array.isArray(r))return 1;const i=r;return Array.isArray(i.variants)?i.variants.length:1}function Tr(e,t,n){const i=e[t]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const c=o[n];return Array.isArray(c?.value)?c.value:[]}}return[]}function br(e,t,n){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const r=e;if(Array.isArray(r.variants)){const i=r.variants,o=i.map(u=>an(u.rule,t,n)),c=o.reduce((u,T)=>(u[T]=(u[T]??0)+1,u),{}),l={};return i.map((u,T)=>{const R=o[T]??`Variant ${T+1}`,P=c[R]??1;let H=R;return P>1&&(l[R]=(l[R]??0)+1,H=`${R} ${l[R]}`),{label:H||`Variant ${T+1}`,sections:Array.isArray(u.value)?u.value:[],rule:u.rule}})}}return[]}function K(e){return{rule:Te(),value:e}}function W(e,t){return{...t,__resolveType:te,variants:e}}function Sr(e,t){const n=structuredClone(t);if(Array.isArray(e))return W([K(e),K(n)]);if(e&&typeof e=="object"){const r=e;return Array.isArray(r.variants)?W([...r.variants,K(n)],r):null}return W([K([]),K(n)])}function Rr(e){const t=e.variants;return Array.isArray(t)?t.length-1:1}function Er(e,t){const n=e[t];if(!n)return null;const r=[...e];return r.splice(t+1,0,structuredClone(n)),r}function kr(e,t){if(t.length===0)return W([],e);if(t.length===1){const n=t[0],r=n?.rule;if(!pt(r))return W(t,e);if(Array.isArray(n?.value))return n.value}return W(t,e)}function gn(e,t,n){const r=[];for(const[o,c]of Object.entries(e))o!==t&&r.push(c);const i=new Set;for(;r.length>0;){const o=r.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const c of o)r.push(c);continue}n(o);for(const c of Object.values(o))r.push(c)}}}function Or(e,t,n){if(!t)return 0;let r=0;return gn(e,t,i=>{i.__resolveType===t&&z(i,e,n)&&r++}),r}function X(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===Y}function vn(e){if(e.type==="block-ref"&&e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));if(e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));const t=e.properties?.__resolveType;return t?.type==="block-ref"&&t.anyOfRefs?.length?t.anyOfRefs.some(n=>X(n.resolveType)):!1}function Pr(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(t=>X(t.resolveType))}function wr(e,t){if(t==="global"||t==="sections"||dn(e))return!0;const n=e.type==="array"?e.items:void 0;return n?vn(n):!1}const $r={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{Fe as $,Ot as A,kt as B,$r as C,Ft as D,zn as E,zt as F,Cn as G,xn as H,en as I,Ar as J,Sr as K,qn as L,Kn as M,Ge as N,Sn as O,Rn as P,kn as Q,Hn as R,at as S,ee as T,te as U,Y as V,F as W,Rt as X,Yn as Y,Ae as Z,Vn as _,Xt as a,We as a0,Ln as a1,Lt as a2,dn as a3,Dn as a4,Bn as a5,wr as a6,Qn as a7,sn as a8,er as a9,vr as aA,Rr as aB,yr as aC,un as aD,ar as aE,dr as aF,pr as aG,ur as aH,ir as aI,sr as aJ,rr as aK,kr as aL,Or as aM,fr as aN,ln as aO,Er as aP,Wn as aQ,Nn as aR,Zn as aa,ue as ab,br as ac,Pr as ad,Fn as ae,Te as af,pt as ag,an as ah,Xn as ai,tr as aj,z as ak,Jn as al,nr as am,mr as an,gt as ao,hr as ap,_r as aq,In as ar,Un as as,En as at,or as au,gr as av,yt as aw,cr as ax,lr as ay,ft as az,X as b,D as c,Pn as d,$n as e,jn as f,ct as g,Gn as h,pe as i,Jt as j,nn as k,Ke as l,Tr as m,wt as n,Yt as o,Zt as p,Et as q,Je as r,Mn as s,Ee as t,Tn as u,wn as v,Ut as w,ye as x,bn as y,On as z};
|
|
1
|
+
import{c as qe,a0 as Tt,a1 as bt,K as ge,m as St}from"./index-bl_DQ3mH.js";import{s as xe}from"./thread-intent-CG-CCDLs.js";function Tn(e){const t=qe.c(12);let n;t[0]!==e?(n=bt.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[i,o]=Tt(r,null);let c;t[2]!==i||t[3]!==e?(c=e?xe(i):null,t[2]=i,t[3]=e,t[4]=c):c=t[4];const l=c;let u,T;t[5]!==o?(u=P=>o(xe(P)),T=()=>o(null),t[5]=o,t[6]=u,t[7]=T):(u=t[6],T=t[7]);let R;return t[8]!==u||t[9]!==T||t[10]!==l?(R={url:l,setUrl:u,clear:T},t[8]=u,t[9]=T,t[10]=l,t[11]=R):R=t[11],R}class Rt extends Error{constructor(t,n,r=[]){super(n),this.blocks=t,this.fields=r,this.name="BlockConflictError"}blocks;fields}function ve(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Et(e,t,n){return["decofile-write",e,t,n]}function bn(e,t,n){return{id:Et(e,t,n).join(":")}}function me(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function kt(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Ot(e,t,n){e.setQueryData(ge.decofileDraft(ve(t)),n)}function Sn(e,t){return e.getQueryData(ge.decofileDraft(ve(t)))??null}async function Rn(e,t){return(await fetch(me(e),{cache:"no-store",headers:{"if-none-match":`"${t}"`}}).catch(()=>null))?.status===200}function En(e){const t=qe.c(4);let n;t[0]!==e?(n=ge.decofileDraft(e?ve(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:Pt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:i}=St(r);return i??null}async function Pt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function kn(e,t){const n=await fetch(me(t),{cache:"no-store"});if(!n.ok){const i=new Error(`Failed to fetch decofile: ${n.status}`);throw i.status=n.status,i}const r=await n.json();return r.token&&Ot(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function On(e,t){const n=await fetch(me(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const i=await n.json().catch(()=>({}));throw i.code==="block-conflict"?new Rt(i.blocks??[],i.error??"Block changed"):new Error(i.error??`Save failed (${n.status})`)}if(!n.ok)return kt(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function wt(e){return e.replace(/\/+$/,"")||"/"}function Pn(e){return e.trim().replace(/^\/+|\/+$/g,"")}function $t(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function wn(e){const t=e.trim();return t?$t(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const he=/:([A-Za-z0-9_-]+)|\*/g;function $n(e){const t=[];for(const n of e.matchAll(he)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function ze(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function Mn(e){e=ze(e);const t=[];let n=0;for(const r of e.matchAll(he))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function jn(e,t){return ze(e).replace(he,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function Fe(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function Ln(e){return e.includes("@")}function We(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function Vn(e,t){if(e===t)return!0;const n=We(e);return n?t===n||We(t)===n:!1}function J(e,t){const n=e.manifest?.blocks??{};for(const[r,i]of Object.entries(n))if(t in i)return r;return null}function Bn(e,t){return J(e,t)!==null}function _e(e,t){const n=J(e,t);return n!==null&&n.includes("sections")}function Mt(e,t){const n=J(e,t);return n!==null&&n.includes("apps")}function jt(e,t){const n=J(e,t);return n!==null&&n.includes("matchers")}function ee(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function Ae(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Cn="oklch(0.7278 0.151 289)",Lt="website/matchers/always.ts",Ge="website/matchers/never.ts",te="website/flags/multivariate.ts",Y="website/flags/multivariate/section.ts";function Te(){return{__resolveType:Lt}}function F(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const Vt=12,Bt=8,le=32,Ct=40,Dt="__SECTION_REF__";function fe(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function Ye(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const It="VideoWidget";function x(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function be(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Se(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Xe(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function Re(e,t){const n=t.manifest?.blocks??{};for(const l of Object.values(n))if(l[e])return l[e];const r=be(e)??Se(e);if(r){for(const l of Xe(r.vendor,r.app))for(const u of Object.values(n))if(u[l])return u[l]}const i=Qe(e);for(const l of Object.values(n))if(l[i])return l[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Ze(e,t){if(Mt(e,t))return!0;const n=be(t)??Se(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Xe(n.vendor,n.app).some(c=>c in r))return!0;const i=Qe(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function Ut(e){return e==="site/apps/site.ts"?!1:be(e)!==null||Se(e)!==null}function Je(e,t){return et(t,{resolveType:e})}function Dn(e,t){return et(t,{ref:e})}function et(e,t){const n=e.schema??{},r="resolveType"in t?Re(t.resolveType,e):{},i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const f=s.split("/").pop()??"",v=i[f];return v||(f===Dt?o.sections??{}:{})};let l;typeof r.$ref=="string"?l=c(r.$ref):Object.keys(r).length>0?l=r:l=n;const u=s=>typeof s.$ref=="string"?c(s.$ref):s,T=s=>{const v=u(s).properties?.type;if(v){if(typeof v.const=="string")return v.const;if(typeof v.default=="string")return v.default;if(Array.isArray(v.enum)&&typeof v.enum[0]=="string")return v.enum[0]}},R=(s,f)=>{const v=u(s);return typeof v.title=="string"&&!v.title.startsWith("#")?v.title:f},P=(s,f=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const v=s.$ref.split("/").pop()??"";return!v||f.has(v)?s:P(c(s.$ref),new Set([...f,v]))},H=s=>{const f=s.properties?.__resolveType?.enum;return Array.isArray(f)&&typeof f[0]=="string"?f[0]:void 0},Oe=s=>H(s)!==void 0,Pe=(s,f=new Set)=>{if(typeof s.$ref!="string")return[];const v=s.$ref.split("/").pop()??"";if(!v||f.has(v))return[];const a=c(s.$ref),k=a.anyOf??a.oneOf;if(!Array.isArray(k))return[];const E=new Set([...f,v]);return k.flatMap(O=>Oe(O)?[O]:Pe(O,E))},M=s=>{const f=s.hide;return f===!0||f==="true"},we=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),G=(s,f=new Set,v=0)=>{if(v>Vt)return{};if(typeof s.$ref=="string"){const k=s.$ref.split("/").pop()??"";return f.has(k)?{}:G(c(s.$ref),new Set([...f,k]),v+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...x(a.__required),...x(s.required)]);for(const k of["allOf","anyOf","oneOf"]){const E=s[k];if(Array.isArray(E))for(const O of E){const L=x(a.__required),I=G(O,f,v+1);a={...a,...I};const w=k==="allOf"?[...L,...x(I.__required)]:L;w.length>0?a.__required=w:delete a.__required}}return a},j=(s,f=0,v=new Set)=>{let a=s,k;if(typeof s.$ref=="string"){a=c(s.$ref);const S=s.$ref.split("/").pop()??"";k=S,S===It&&!a.format&&(a={...a,format:"video-uri"})}a=P(a);const E=k!==void 0&&v.has(k),O=k!==void 0?new Set([...v,k]):v,L=(S,y,_,m=!0)=>!E&&(!m||_<=Ct)&&y<Bt?j(S,y,O):void 0;let I;{const S=a.anyOf??a.oneOf;if(Array.isArray(S)){const y=S.filter(m=>!(m.type==="null"||m.type===null)),_=m=>{if(typeof m.const=="string"||typeof m.const=="number")return m.const;if(Array.isArray(m.enum)&&m.enum.length===1&&(typeof m.enum[0]=="string"||typeof m.enum[0]=="number"))return m.enum[0]};y.length>0&&y.every(m=>_(m)!==void 0)&&(I=y.map(m=>_(m)))}}let w,N,Le=!1;if(a.type)w=Array.isArray(a.type)?String(a.type.find(S=>S!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const y=(a.anyOf??a.oneOf).filter(_=>!(_.type==="null"||_.type===null));if(y.length===0)w="null";else if(y.length===1){const _=y[0];N=_,w=_.type?Array.isArray(_.type)?String(_.type[0]):String(_.type):typeof _.$ref=="string"?"object":"string"}else{if(I){const p=d=>typeof s[d]=="string"?s[d]:typeof a[d]=="string"?a[d]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:I,format:p("format"),options:p("options")}}const _=y.filter(Oe),m=y.map(p=>P(p)).find(fe),se=y.filter(p=>!fe(P(p))).every(p=>typeof p.$ref=="string"||_.includes(p)),ht=_.some(p=>{const d=p.properties?.__resolveType?.enum;return Array.isArray(d)&&d[0]===te}),Be=()=>{const p=new Map;for(const b of[..._,...y.filter(h=>!_.includes(h)).flatMap(h=>Pe(h))]){const h=H(b);h&&!p.has(h)&&p.set(h,b)}const d=[...p].map(([b,h])=>({resolveType:b,title:typeof h.title=="string"?h.title:F(b),description:typeof h.description=="string"?h.description:void 0,schema:L(h,f+1,p.size)})),g=[];for(const b of y){if(_.includes(b)||typeof b.$ref!="string")continue;const h=c(b.$ref);let C;const ae=h.properties?.__resolveType;if(Array.isArray(ae?.enum)&&typeof ae.enum[0]=="string"&&(C=ae.enum[0]),!C&&Array.isArray(h.allOf))for(const At of h.allOf){const ce=At.properties?.__resolveType?.enum;if(Array.isArray(ce)&&typeof ce[0]=="string"){C=ce[0];break}}C&&g.push({resolveType:C,title:typeof h.title=="string"&&!h.title.startsWith("#")?h.title:F(C),description:typeof h.description=="string"?h.description:void 0,schema:L(h,f+1,y.length)})}const A=new Set(d.map(b=>b.resolveType)),$=[...d,...g.filter(b=>!A.has(b.resolveType))],V=y.filter(b=>!_.includes(b)),B=V.length===1&&!E?j(V[0],f+1,O):void 0;return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:$,plainSchema:B,hidden:M(a)||M(s)?!0:void 0}};if(m){if(!Ye(m,c)&&y.length>1&&se){const d=j(m,f+1,O),g=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:d.title,A=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:d.description;return{...d,type:"array",title:g,description:A,loaderRef:_.length>0?{...Be(),title:g,description:A}:void 0}}if(ht){const d=j(m,f+1,O);return{...d,type:"array",title:typeof a.title=="string"?a.title:d.title,description:typeof a.description=="string"?a.description:d.description}}}if(_.length>0)return Be();const Ce=p=>{const d=u(p);if(typeof d.title=="string"&&Fe(d.title))return!0;const g=d.properties?.__resolveType?.enum;if(Array.isArray(g)&&typeof g[0]=="string")return!0;if(Array.isArray(d.allOf))for(const A of d.allOf){const $=A.properties?.__resolveType?.enum;if(Array.isArray($)&&typeof $[0]=="string")return!0}return!1},De=y.map(p=>T(p));if(y.length>1&&De.every(p=>typeof p=="string")&&!y.some(Ce)){const p=y.map((d,g)=>{const A=u(d),$=De[g];return{resolveType:$,title:R(d,$),description:typeof A.description=="string"?A.description:void 0,discriminatorValue:$,schema:L(A,f+1,y.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:p,hidden:M(a)||M(s)?!0:void 0}}const Ie=p=>{if(Ce(p))return!1;const d=u(p);return d.type==="object"||!!d.properties},_t=p=>{const d=P(p);return fe(d)?!Ye(d,c):!1},Ue=f<le&&y.every(p=>Ie(p)||_t(p))&&y.some(Ie);if(y.every(p=>typeof p.$ref=="string")&&!Ue){const p=[];for(const d of y){const g=c(d.$ref);let A,$;if(typeof g.title=="string"){const B=Fe(g.title);B&&(A=B.blockId,$=B.blockId)}if(!A&&Array.isArray(g.allOf))for(const B of g.allOf){const C=((B.properties??{}).__resolveType??{}).enum;if(Array.isArray(C)&&typeof C[0]=="string"){A=C[0];break}}if(!A){const b=g.properties?.__resolveType?.enum;Array.isArray(b)&&typeof b[0]=="string"&&(A=b[0])}A||(A=d.$ref.split("/").pop()??"");const V=A.includes("/")?void 0:T(d);!V&&!A.includes("/")||p.push({resolveType:V??A,title:$??(typeof g.title=="string"&&!g.title.startsWith("#")?g.title:F(A)),description:typeof g.description=="string"?g.description:void 0,discriminatorValue:V,schema:L(g,f+1,y.length)})}return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:p,hidden:M(a)||M(s)?!0:void 0}}if(Ue){const p=g=>{if(typeof g.const=="string"||typeof g.const=="number"||typeof g.const=="boolean")return g.const;if(Array.isArray(g.enum)&&g.enum.length===1&&(typeof g.enum[0]=="string"||typeof g.enum[0]=="number"||typeof g.enum[0]=="boolean"))return g.enum[0]},d=y.map((g,A)=>{const $=u(g).properties??{},V={};for(const[B,b]of Object.entries($)){const h=p(b);h!==void 0&&(V[B]=h)}return{title:R(g,`Option ${A+1}`),schema:j(g,f+1),discriminators:Object.keys(V).length?V:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:d,hidden:M(a)||M(s)?!0:void 0}}w="object"}}else a.allOf?(w="object",Le=we(a.title)):typeof s.$ref=="string"&&(w="object");let ie,Ve;if(f<le&&!E){const S=G(a),y=x(S.__required);y.length>0&&(Ve=y);const _=Object.entries(S).filter(([m])=>!m.startsWith("__")&&m!=="@type");if(_.length>0){ie={};for(const[m,se]of _)ie[m]=j(se,f+1,O)}}let oe;if((w==="array"||a.type==="array")&&f<le&&!E){const S=a.items;if(S){oe=j(S,f+1,O);const y=u(S);typeof y.title=="string"&&y.title.includes("{{")&&(oe.titleBy=y.title)}}const U=S=>{const y=N?.[S];return typeof y=="string"?y:void 0},mt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(N&&"default"in N)return N.default};return{type:w??"string",title:typeof s.title=="string"?s.title:!Le&&typeof a.title=="string"?a.title:U("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:U("description"),default:mt(),enum:Array.isArray(a.enum)?a.enum:I??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:U("format"),properties:ie,required:Ve,items:oe,recursiveRef:E&&typeof s.$ref=="string"&&(w==="object"||w==="array"||a.type==="array")?s.$ref:void 0,hidden:M(a)||M(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:U("titleBy"),image:typeof a.image=="string"?a.image:U("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:U("options")}};if("ref"in t)return j({$ref:t.ref});const $e=l.properties??{},vt=Object.keys($e).every(s=>s.startsWith("__"));if(Array.isArray(l.allOf)&&l.allOf.length===1&&vt){const s=$e.__resolveType,f=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const v of l.allOf){const a=P(v);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const E=j(a,0);if(E.type==="inline-union"&&E.inlineUnionBranches){const O=we(E.title);return{...E,title:O?void 0:E.title,inlineUnionBranches:f?E.inlineUnionBranches.map(L=>({...L,discriminators:{...L.discriminators??{},__resolveType:f}})):E.inlineUnionBranches}}}}const Me=G(l),re={};for(const[s,f]of Object.entries(Me))s.startsWith("__")||s==="@type"||(re[s]=j(f,0));if(Object.keys(re).length===0)return null;const je=x(Me.__required);return{type:"object",title:typeof l.title=="string"?l.title:void 0,properties:re,required:je.length>0?je:void 0}}function In(e,t){const n=t.schema??{},r=Re(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(T=>!T.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const u=c.__resolveType;return!!u&&Array.isArray(u.enum)&&u.enum[0]===e}function Un(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function Ee(e,t){const n=t.schema??{},r=Re(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,l=o.logo,u=o,T=P=>P===!0||P==="true",R=T(u.hide)||T(u.ignore)||T(u.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof l=="string"?l:void 0,hidden:R||void 0}}const xt=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],He="website/sections/Rendering/Lazy.tsx";function D(e){return xt.some(t=>e.endsWith(t))}const tt=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],nt=new Set(tt),Ft=tt[0],Wt=new Set(["site/sections/Theme/Theme.tsx"]);function ne(e){return!!(Wt.has(e)||D(e)||e.toLowerCase().includes("preview"))}function Yt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(nt.has(r))return r;return Ft}function ue(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return ue(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...ue(n));return t}return[]}function Ht(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(ne(o))continue;const c=Ee(o,e);n.push({resolveType:o,title:c.title??F(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function xn(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))ne(o)||n.has(o)||n.set(o,{resolveType:o,title:F(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function rt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Y)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const i of r){const o=i?.value;if(!o)continue;let c=o.__resolveType;if(typeof c=="string"&&D(c)&&(c=o.section?.__resolveType??c),typeof c=="string"&&_e(e,c))return c}return n}function Nt(e,t){return rt(e,t)!==t.__resolveType}function it(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||Ae(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||nt.has(c)||typeof o.path=="string"||ne(c)||!(_e(e,c)||c===Y&&Nt(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Kt(e,t){const n=ee(t.resolveType),r=n?{}:Ee(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||F(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Fn(e,t){const n=Yt(e),r=Je(n,e),i=ue(r?.properties?.sections),o=new Map,c=l=>{if(!ne(l.resolveType)){if(ee(l.resolveType)){Ae(l.resolveType)||o.set(l.resolveType,l);return}_e(e,l.resolveType)&&(o.has(l.resolveType)||o.set(l.resolveType,l))}};for(const l of Ht(e))c(l);for(const l of i)c(Kt(e,l));for(const l of it(e,t))c(l);return[...o.values()].sort((l,u)=>l.title.localeCompare(u.title))}function Wn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const ke="website/loaders/redirect.ts",Yn=new Set([ke,"website/loaders/redirects.ts"]),Hn={temporary:307,permanent:301},Ne=e=>typeof e=="string"?e:"",qt=e=>e==="permanent"?"permanent":"temporary";function ot(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:Ne(t.from),to:Ne(t.to),type:qt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function zt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;if(i.__resolveType!==ke)continue;const{from:o,to:c,type:l,discardQueryParameters:u}=ot(i);t.push({key:n,from:o,to:c,type:l,discardQueryParameters:u})}return t}function Nn(e){return ot(e)}function Kn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:ke}}function Gt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const Qt=1e3;function qn(e,t){const n=Gt(t);for(let r=0;r<Qt;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}function Xt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function zn(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(l=>l.key===n);if(o)return o;const c=e.find(l=>l.key.endsWith(`-${n}`));if(c)return c}if(i){const o=Ke(e,i);if(o)return o}if(r){const o=Ke(e,r);if(o)return o}return null}function Ke(e,t,n){const r=wt;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}const st=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),q="site",at="site/apps/site.ts";function pe(e,t){return e===q?!0:t.__resolveType===at}function Gn(e,t){return e?Jt(e).length>0||zt(e).length>0?!0:t?nn(e,t).length>0||en(e,t)?!0:tn(e,t).length>0:!1:!1}function Zt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!st.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Xt(e),path:n.path}}function Jt(e){const t=[];for(const[n,r]of Object.entries(e)){const i=Zt(n,r);i&&t.push(i)}return t}function ct(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ye(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?Ee(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function en(e,t){const n=e[q];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(pe(q,r)||Ze(t,i)))return{key:q,name:ye(q,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!pe(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:at;return{key:r,name:ye(r,o,t),resolveType:c}}return null}function tn(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(st.has(c)||typeof o.path!="string"&&(pe(r,o)||!Ze(t,c)&&!Ut(c)||n.push({key:r,name:ye(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function nn(e,t){return it(t,e).map(n=>{const r=e[n.resolveType],i=rt(t,r);return{key:n.resolveType,name:n.description??ct(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const rn=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function on(e){return e.includes("matchers")||e.includes("Match")}function lt(e,t){const n=e.__resolveType;return typeof n!="string"||!n||rn.has(n)?!1:t?jt(t,n):on(n)}function Qn(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||!ee(r)||Ae(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;lt(o,e)&&n.push({blockKey:r,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((r,i)=>(r.name??r.blockKey).localeCompare(i.name??i.blockKey))}function z(e,t,n){if(!e)return!1;const r=e.__resolveType;if(typeof r!="string"||!ee(r)||!Object.hasOwn(t,r))return!1;const i=t[r];return!i||typeof i!="object"||Array.isArray(i)?!1:lt(i,n)}function Xn(e,t,n){return z(e,t,n)?e?.__resolveType??null:null}function ft(e,t,n){if(!e)return null;const r=e.__resolveType??"";if(!r)return null;if(z(e,t,n)){const c=t[r]??{},l=c.__resolveType??r,{__resolveType:u,name:T,...R}=c;return{resolveType:l,data:R,blockKey:r}}const{__resolveType:i,...o}=e;return{resolveType:r,data:o}}function sn(e,t,n){const r=ft(e,t,n);return r?{__resolveType:r.resolveType,...r.data}:{__resolveType:""}}function Zn(e,t,n){if(e)return z(e,t,n)?sn(e,t,n):e}function an(e,t,n,r){if(!e)return"Default";if(z(e,t,r)){const i=e.__resolveType??"",o=t[i];return ct(i,o)}return n(e)}function Jn(e,t,n){return{__resolveType:e,...t,name:n}}function er(e){return{__resolveType:e}}function tr(e,t,n){const r=ft(e,t,n);return r?{resolveType:r.resolveType,formValue:r.data}:{resolveType:"",formValue:{}}}function nr(e,t){const n={__resolveType:e};if(!e||!t)return n;const r=Je(e,t),i=r?.type==="inline-union"?r.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function ut(e){const t=e.__resolveType??"";return D(t)?e.section??e:e}function Z(e){const i=(D(e.__resolveType??"")?e.section:e)?.variants?.[0];return i?.rule?.__resolveType!==Ge?null:i?.value??null}function rr(e){const t=ut(e);return{__resolveType:Y,variants:[{value:t,rule:{__resolveType:Ge}}]}}function ir(e){const t=e.__resolveType??"";if(!t)return null;if(D(t))return e.section??null;const n=Z(e);return n?D(n.__resolveType??"")?n:{__resolveType:He,section:ut(n)}:{__resolveType:He,section:e}}function Q(e){const t=e.__resolveType??"";if(!t)return null;if(D(t)){const n=e.section,r=n?.__resolveType??"";return!r||!n?null:{resolveType:r,data:n}}return{resolveType:t,data:e}}function or(e){const t=Z(e);if(t)return Q(t);if(D(e.__resolveType??"")){const r=e.section;if(!r)return null;const i=Z(r);return Q(i||r)}return Q(e)}function sr(e){return Z(e)}const cn=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function pt(e){if(!e)return!1;const t=e.__resolveType??"";return t===""?Object.keys(e).length===0:cn.includes(t)||t.includes("always")}function ln(e){const t=e.variants??[];if(t.length===0)return-1;const n=t.findIndex(r=>pt(r.rule));return n!==-1?n:t.length-1}function ar(e,t,n){const r=n.variants??[];if(r.length===0)return null;const i=ln(n),o=r[i]?.value;if(!o)return null;const c=structuredClone(o);return t.isLazy?{...e,section:c}:c}function yt(e,t){return t.isMultivariate?t.isLazy?e.section??null:e:null}function cr(e,t){return Array.isArray(e.variants)?e.variants.map((n,r)=>({label:t(n.rule)||`Variant ${r+1}`,value:n.value??{},rule:n.rule})):[]}function lr(e,t){const n=e.__resolveType??"";if(!n)return null;if(D(n)){const r=e.section??e,i=r.__resolveType??n;if(!i.includes("/")&&i in t){const o=t[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...r},resolveType:i}}if(!n.includes("/")&&n in t){const r=t[n]??{};return{data:{...r},resolveType:r.__resolveType??n}}return{data:{...e},resolveType:n}}function fn(e,t){const n=e.__resolveType??"";return D(n)?{...e,section:t}:t}function un(e,t,n){return t.isLazy?{...e,section:n}:n}function fr(e,t,n){const r=[...e.variants??[]],i=r[t];if(!i)return e;const o=i.value??{};return r[t]={...i,value:fn(o,n)},{...e,variants:r}}function ur(e,t,n){const r=[...e.variants??[]];return r[t]?(r[t]={...r[t],rule:n},{...e,variants:r}):e}function pr(e,t){const n=[...e.variants??[]],r=n[t];return r?(n.splice(t+1,0,structuredClone(r)),{...e,variants:n}):e}function yr(e,t,n){const r=[...e.variants??[]];if(t===n||t<0||n<0||t>=r.length||n>=r.length)return e;const[i]=r.splice(t,1);return i?(r.splice(n,0,i),{...e,variants:r}):e}function dr(e,t){const n=[...e.variants??[]];return n.length<=1?null:(n.splice(t,1),{...e,variants:n})}function de(e){return{rule:Te(),value:structuredClone(e)}}function dt(e,t){return{...t,__resolveType:Y,variants:e}}function gr(e){return e.isHidden!==!0&&e.isSavedBlock!==!0}function pn(e,t){if(t.isHidden)return null;if(t.isMultivariate){const r=yt(e,t)?.variants??[],i=r[r.length-1]?.value;return i?structuredClone(i):null}if(t.isLazy){const n=e.section;return n?structuredClone(n):null}return structuredClone(e)}function yn(e,t,n){if(t.isMultivariate||t.isHidden)return null;const r=pn(e,t);if(!r)return null;const i=dt([de(r),de(r)]);return t.isLazy?{...e,section:i}:i}function vr(e,t,n){if(t.isHidden||t.isSavedBlock)return null;if(t.isMultivariate){const i=yt(e,t);if(!i)return null;const o=i.variants??[],c=o[o.length-1]?.value;if(!c)return null;const l=dt([...o,de(c)],i);return{section:un(e,t,l),newVariantIndex:o.length}}const r=yn(e,t);return r?{section:r,newVariantIndex:1}:null}function dn(e){return e.anyOfRefs?.some(t=>t.resolveType!==te?!1:t.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function mr(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===Y&&Array.isArray(t.variants)}function gt(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.__resolveType===te}function hr(e){if(!gt(e))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=t[0]?.value;return Array.isArray(n)?n:null}function _r(e,t){if(!gt(e))return t;const n=structuredClone(e),r=[...n.variants??[]];return r.length===0?r.push({rule:Te(),value:t}):r[0]={...r[0],value:t},{...n,variants:r}}function Ar(e,t){const r=e[t]?.sections;if(!r||Array.isArray(r))return 1;const i=r;return Array.isArray(i.variants)?i.variants.length:1}function Tr(e,t,n){const i=e[t]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const c=o[n];return Array.isArray(c?.value)?c.value:[]}}return[]}function br(e,t,n){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const r=e;if(Array.isArray(r.variants)){const i=r.variants,o=i.map(u=>an(u.rule,t,n)),c=o.reduce((u,T)=>(u[T]=(u[T]??0)+1,u),{}),l={};return i.map((u,T)=>{const R=o[T]??`Variant ${T+1}`,P=c[R]??1;let H=R;return P>1&&(l[R]=(l[R]??0)+1,H=`${R} ${l[R]}`),{label:H||`Variant ${T+1}`,sections:Array.isArray(u.value)?u.value:[],rule:u.rule}})}}return[]}function K(e){return{rule:Te(),value:e}}function W(e,t){return{...t,__resolveType:te,variants:e}}function Sr(e,t){const n=structuredClone(t);if(Array.isArray(e))return W([K(e),K(n)]);if(e&&typeof e=="object"){const r=e;return Array.isArray(r.variants)?W([...r.variants,K(n)],r):null}return W([K([]),K(n)])}function Rr(e){const t=e.variants;return Array.isArray(t)?t.length-1:1}function Er(e,t){const n=e[t];if(!n)return null;const r=[...e];return r.splice(t+1,0,structuredClone(n)),r}function kr(e,t){if(t.length===0)return W([],e);if(t.length===1){const n=t[0],r=n?.rule;if(!pt(r))return W(t,e);if(Array.isArray(n?.value))return n.value}return W(t,e)}function gn(e,t,n){const r=[];for(const[o,c]of Object.entries(e))o!==t&&r.push(c);const i=new Set;for(;r.length>0;){const o=r.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const c of o)r.push(c);continue}n(o);for(const c of Object.values(o))r.push(c)}}}function Or(e,t,n){if(!t)return 0;let r=0;return gn(e,t,i=>{i.__resolveType===t&&z(i,e,n)&&r++}),r}function X(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===Y}function vn(e){if(e.type==="block-ref"&&e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));if(e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));const t=e.properties?.__resolveType;return t?.type==="block-ref"&&t.anyOfRefs?.length?t.anyOfRefs.some(n=>X(n.resolveType)):!1}function Pr(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(t=>X(t.resolveType))}function wr(e,t){if(t==="global"||t==="sections"||dn(e))return!0;const n=e.type==="array"?e.items:void 0;return n?vn(n):!1}const $r={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{Fe as $,Ot as A,kt as B,$r as C,Ft as D,zn as E,zt as F,Cn as G,xn as H,en as I,Ar as J,Sr as K,qn as L,Kn as M,Ge as N,Sn as O,Rn as P,kn as Q,Hn as R,at as S,ee as T,te as U,Y as V,F as W,Rt as X,Yn as Y,Ae as Z,Vn as _,Xt as a,We as a0,Ln as a1,Lt as a2,dn as a3,Dn as a4,Bn as a5,wr as a6,Qn as a7,sn as a8,er as a9,vr as aA,Rr as aB,yr as aC,un as aD,ar as aE,dr as aF,pr as aG,ur as aH,ir as aI,sr as aJ,rr as aK,kr as aL,Or as aM,fr as aN,ln as aO,Er as aP,Wn as aQ,Nn as aR,Zn as aa,ue as ab,br as ac,Pr as ad,Fn as ae,Te as af,pt as ag,an as ah,Xn as ai,tr as aj,z as ak,Jn as al,nr as am,mr as an,gt as ao,hr as ap,_r as aq,In as ar,Un as as,En as at,or as au,gr as av,yt as aw,cr as ax,lr as ay,ft as az,X as b,D as c,Pn as d,$n as e,jn as f,ct as g,Gn as h,pe as i,Jt as j,nn as k,Ke as l,Tr as m,wt as n,Yt as o,Zt as p,Et as q,Je as r,Mn as s,Ee as t,Tn as u,wn as v,Ut as w,ye as x,bn as y,On as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-bl_DQ3mH.js";import{A as u}from"./auth-split-layout--aU7QLNo.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,j as n}from"./index-
|
|
1
|
+
import{c as l,j as n}from"./index-bl_DQ3mH.js";function a(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function d(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}function h(c){const e=l.c(3),{size:s}=c,t=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"}),e[0]=o):o=e[0];let i;return e[1]!==t?(i=n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,fill:"currentColor","aria-hidden":"true",children:o}),e[1]=t,e[2]=i):i=e[2],i}export{a as C,h as a,d as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,bv as T,j as r,bA as x,bx as $,bB as S,dl as D,by as M,bC as L,bN as k,c as g,l as B}from"./index-
|
|
1
|
+
import{r as a,bv as T,j as r,bA as x,bx as $,bB as S,dl as D,by as M,bC as L,bN as k,c as g,l as B}from"./index-bl_DQ3mH.js";var f="Collapsible",[F]=k(f),[G,v]=F(f),w=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,open:n,defaultOpen:s,disabled:l,onOpenChange:c,...b}=o,[p,d]=T({prop:n,defaultProp:s??!1,onChange:c,caller:f});return r.jsx(G,{scope:t,disabled:l,contentId:$(),open:p,onOpenToggle:a.useCallback(()=>d(C=>!C),[d]),children:r.jsx(x.div,{"data-state":h(p),"data-disabled":l?"":void 0,...b,ref:e})})});w.displayName=f;var A="CollapsibleTrigger",I=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,...n}=o,s=v(A,t);return r.jsx(x.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":h(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:S(o.onClick,s.onOpenToggle)})});I.displayName=A;var R="CollapsibleContent",O=a.forwardRef((o,e)=>{const{forceMount:t,...n}=o,s=v(R,o.__scopeCollapsible);return r.jsx(D,{present:t||s.open,children:({present:l})=>r.jsx(q,{...n,ref:e,present:l})})});O.displayName=R;var q=a.forwardRef((o,e)=>{const{__scopeCollapsible:t,present:n,children:s,...l}=o,c=v(R,t),[b,p]=a.useState(n),d=a.useRef(null),C=M(e,d),N=a.useRef(0),y=N.current,P=a.useRef(0),E=P.current,m=c.open||b,j=a.useRef(m),u=a.useRef(void 0);return a.useEffect(()=>{const i=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(i)},[]),L(()=>{const i=d.current;if(i){u.current=u.current||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName},i.style.transitionDuration="0s",i.style.animationName="none";const _=i.getBoundingClientRect();N.current=_.height,P.current=_.width,j.current||(i.style.transitionDuration=u.current.transitionDuration,i.style.animationName=u.current.animationName),p(n)}},[c.open,n]),r.jsx(x.div,{"data-state":h(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!m,...l,ref:C,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...o.style},children:m&&s})});function h(o){return o?"open":"closed"}var H=w;function J(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(H,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=n):n=e[3],n}function K(o){const e=g.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let n;return e[2]!==t?(n=r.jsx(I,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=n):n=e[3],n}function Q(o){const e=g.c(8);let t,n;e[0]!==o?({className:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s;e[3]!==t?(s=B("overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down motion-reduce:animate-none",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==n||e[6]!==s?(l=r.jsx(O,{"data-slot":"collapsible-content",className:s,...n}),e[5]=n,e[6]=s,e[7]=l):l=e[7],l}export{K as C,Q as a,J as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E,j as t,B as K,h as Z,aD as Xe,aE as re,b as W,H as Ee,r as A,a2 as fe,dd as Ze,dc as Oe,aC as et,n as Re,I as pe,l as G,bs as tt,at as st,u as ot,L as se,t as lt,f as he,c2 as Me}from"./index-bl_DQ3mH.js";import{E as Fe}from"./empty-state-CvDYWxOG.js";import{u as ge}from"./use-mcp-client-DuTNn1dc.js";import{F as ae,a as nt,b as ce,d as de}from"./form-D6DHFxsw.js";import{T as xe}from"./textarea-DvoMwt1e.js";import{D as je,O as it,M as rt}from"./index-MZuRM-ap.js";import{aB as at,aa as ct,by as dt,M as mt,S as ut,T as pt,aV as xt,K as ye}from"./agent-icon-BdZdLCky.js";import{M as ft}from"./mcp-app-renderer-DuGbCe-D.js";import{g as ht,M as we}from"./types-C5SQt0XZ.js";import{a as gt,b as jt,A as bt}from"./alert-Tk2m0Iz_.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-WviNHwZD.js";import{c as Nt,b as Pe,T as ke,a as De}from"./tooltip-COqLwkid.js";import{i as vt}from"./AlertCircle-BILwGqjV.js";import{a as St}from"./Copy01-QpufVNbj.js";import{i as yt}from"./Play-CIe1tupB.js";import{g as wt}from"./connection-slug-CITJ0kGN.js";import{u as Ct,T as It}from"./use-mcp-auth-status-Is2pR00q.js";import{a as ze,u as Be}from"./use-connection-gMb_8zEe.js";import{u as Tt}from"./use-mcp-tools-CA6Ri5UK.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-DogZfPWq.js";import{e as Pt,y as kt}from"./chat-context-DszOftwV.js";import{a as Dt}from"./shell-layout-Bk6uPKMe.js";import{M as At}from"./monaco-editor-2Ci5R71u.js";import{E as Et}from"./empty-state-DdJZ_leg.js";import{n as Ot}from"./LinkBroken01-BBYM52IU.js";import"./auth-CTn9OsYL.js";import"./label-Bqj_xjz9.js";import"./Key01-CCpcNn9J.js";import"./extract-connection-data-CJhjAx3s.js";import"./metadata-D72DunRR.js";import"./connection-DSkv8Cg1.js";import"./url-slug-CUhgOgGc.js";import"./Plus-DTyq8wfJ.js";import"./index-B0rouRMk.js";import"./index-BGz-w6Gg.js";import"./index-BdQq_4o_.js";import"./index-Dhdyv2s0.js";import"./popover-MLSOZysn.js";import"./repository-binding-BTsmo_dA.js";import"./SearchMd-DnZ_sK_U.js";import"./use-mobile-Di3PCVWm.js";import"./use-create-virtual-mcp-Bz6TE2Qz.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./thread-intent-CG-CCDLs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B66Eygyb.js";import"./task-board-kbcRVMI1.js";import"./schema-kVE-1hbs.js";import"./slugify-CEUa2lfQ.js";import"./schema-BKM3gR2B.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronUp-BrMcnDd0.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./UserSquare-BXjBRbTF.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Image01-D8Dg78Ju.js";import"./Globe04-C2IFbCwJ.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./XClose-BMDlg-34.js";import"./index-B5IA1qMq.js";import"./badge-BDMYkxf_.js";import"./mcp-oauth-tCidCN-u.js";import"./use-panel-navigate-c5H4a21L.js";import"./thread-route-CR0TIP8s.js";import"./use-project-scope-A4YCdR4N.js";import"./autosend-Cr5TlS-x.js";import"./use-decopilot-events-D8zpT0sX.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BOGRgJjV.js";import"./avatar-DNs314ny.js";import"./use-clock-tick-zaL95TTy.js";import"./command-DFd1c5Z5.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./repository-import-picker-D5xDiyD_.js";import"./repository-picker-DExxlkis.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./collection-search-q0ogFMFh.js";import"./use-debounced-value-Dju-tMu1.js";import"./required-auth-layout-Dzef4Ao1.js";import"./use-org-sso-B57pfGVG.js";import"./editor-KeKsFC14.js";function Rt(s){const e=E.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==o||e[3]!==r?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=h):h=e[4];let u;e[5]!==i?(u=i?t.jsx(Z,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(g=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=g):g=e[11];let p;return e[12]!==h||e[13]!==g?(p=t.jsxs(t.Fragment,{children:[h,g]}),e[12]=h,e[13]=g,e[14]=p):p=e[14],p}Xe({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Mt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Ft(s){const e=E.c(43),{form:n}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let g;e[22]!==u?(g=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=g):g=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=C=>{const{field:b}=C;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let v;e[30]!==n.control||e[31]!==N?(v=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=v):v=e[32];let y;e[33]!==g||e[34]!==j||e[35]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-2",children:[g,j,v]}),e[33]=g,e[34]=j,e[35]=v,e[36]=y):y=e[36];let w;e[37]!==y||e[38]!==h?(w=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,y]}),e[37]=y,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(nt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(s){const e=E.c(42),{providerId:n,promptId:o}=s,l=W(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ze(n,"PROMPT",o,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let g;e[6]!==u?(g={values:u},e[6]=u,e[7]=g):g=e[7];const p=et(g);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let v;e[11]!==x.update||e[12]!==p||e[13]!==o?(v=p.handleSubmit(async I=>{const T=await x.update.mutateAsync({id:o,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});p.reset({title:T.title,description:T.description??null,body:ue(T)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=v):v=e[14];const y=v;if(!r){let I;e[15]!==l?(I=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=I):I=e[16];let T;e[17]!==l?(T=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=T):T=e[18];let R;return e[19]!==I||e[20]!==T?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:I,description:T})}),e[19]=I,e[20]=T,e[21]=R):R=e[21],R}let w;e[22]!==y?(w=()=>{y()},e[22]=y,e[23]=w):w=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==h||e[26]!==N||e[27]!==w?(P=t.jsx(Rt,{onSave:w,onUndo:N,isDirty:p.formState.isDirty,isSaving:h}),e[24]=p.formState.isDirty,e[25]=h,e[26]=N,e[27]=w,e[28]=P):P=e[28];let C;e[29]!==r.title||e[30]!==P?(C=t.jsx(Re.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=C):C=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let k;e[34]!==b||e[35]!==C?(k=t.jsxs(t.Fragment,{children:[C,b]}),e[34]=b,e[35]=C,e[36]=k):k=e[36];let D;e[37]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(Ft,{form:p})}),e[37]=p,e[38]=D):D=e[38];let O;return e[39]!==k||e[40]!==D?(O=t.jsxs(je,{children:[k,D]}),e[39]=k,e[40]=D,e[41]=O):O=e[41],O}function Bt(s){const e=E.c(10),{itemId:n}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Mt(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Y(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=E.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=G("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=E.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=G("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=E.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=W();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(h=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=W(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,f=sessionStorage.getItem(m);if(!f)return null;sessionStorage.removeItem(m);try{return JSON.parse(f)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[f,$]of Object.entries(a))$!==null&&typeof $=="object"?m[f]=JSON.stringify($,null,2):m[f]=$;return m})(),[d,r]=A.useState(c??{}),[x,h]=A.useState(a?JSON.stringify(a,null,2):"{}"),[u,g]=A.useState(null),[p,j]=A.useState(null),[N,v]=A.useState(null),[y,w]=A.useState(null),[P,C]=A.useState(!1),[b,k]=A.useState(null),{org:D}=fe(),O=ze(e),I=Pt(),T=kt(),{openSidePanel:R}=Dt(),U=`${e}:${s}`,F=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),_=Tt({client:F}),S=_.data?.tools?.find(m=>m.name===s),M=ht(S?._meta),V=m=>{if(!I)return;const f=$t(m.content);f.content.length>0&&(R(),I.sendMessage({tiptapDoc:f}))},[z,B]=A.useState("json"),[q,Q]=A.useState(!1);M&&!q&&(B("ui"),Q(!0));const J=S?.inputSchema?.properties,be=J?Object.keys(J):[],X=be.length>0,ee={};if(X&&S?.inputSchema?.properties)for(const m of be)ee[m]=S.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{C(!0),w(null),g(null),j(null),v(null),k(null);const m=performance.now();try{if(!F)throw new Error("MCP client is not available");const f=X?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();X&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof f[L]=="string")try{f[L]=JSON.parse(f[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof f[L]=="string"&&f[L]!==""){const Se=Number(f[L]);Number.isNaN(Se)||(f[L]=Se)}});const $=await F.callTool({name:s,arguments:f}),te=$.structuredContent??$,Qe=performance.now(),Ye=Math.round(Qe-m);g(te),j($),v(f);const Ge=JSON.stringify(te),ve=new TextEncoder().encode(Ge).length;k({duration:`${Ye}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(f){const $=f instanceof Error?f.message:String(f);w($||"Unknown error occurred");const te=performance.now();k({duration:`${Math.round(te-m)}ms`})}finally{C(!1)}},ie=(m,f)=>{r($=>({...$,[m]:f}))},Ve=()=>{g(null),j(null),v(null),w(null),k(null)},qe=S?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:D.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:wt(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:l("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:X&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,f])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:f.type})]}),f.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:f.description}),f.type==="object"||f.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):f.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:$=>ie(m,$==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!X?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>h(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),We=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),M&&t.jsx(Nt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(De,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(De,{children:l("details.tool.jsonView")})]})]})})]})]}),y&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(gt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vt,{className:"h-4 w-4"}),t.jsx(jt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(bt,{className:"text-xs text-destructive",children:y})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:M&&z==="ui"&&F?t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Z,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:M,toolInfo:S?{tool:S}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:F,onMessage:V,onUpdateModelContext:m=>T?.setAppContext(U,m),onTeardown:()=>T?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Re.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(Z,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),We]})})]})})}function Jt(s){const e=E.c(21),{itemId:n,siblings:o,onBack:l}=s,i=W(),[a,c]=A.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(p=>p.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!ze(r||void 0)||!r){let p;e[3]!==i?(p=i("details.tool.connectionNotFound"),e[3]=i,e[4]=p):p=e[4];let j;e[5]!==p?(j=t.jsx("h3",{className:"text-lg font-semibold",children:p}),e[5]=p,e[6]=j):j=e[6];let N;e[7]!==i?(N=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=N):N=e[8];let v;e[9]!==N?(v=t.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[9]=N,e[10]=v):v=e[10];let y;return e[11]!==j||e[12]!==v?(y=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[j,v]})}),e[11]=j,e[12]=v,e[13]=y):y=e[13],y}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{className:"size-8 text-muted-foreground"})}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=p=>A.startTransition(()=>c(p)),e[15]=u):u=e[15];let g;return e[16]!==r||e[17]!==l||e[18]!==o||e[19]!==n?(g=t.jsx(A.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:u,onBack:l})}),e[16]=r,e[17]=l,e[18]=o,e[19]=n,e[20]=g):g=e[20],g}const Vt={prompt:Bt};function qt(){const s=E.c(9),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=E.c(52),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,g=u?.id??"",p=g||"no-connection",j=g??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const v=ge(N),y=Oe(p,i,v);let w;s[9]!==y||s[10]!==a?(w=async J=>{a&&await y.update.mutateAsync({id:a,data:J})},s[9]=y,s[10]=a,s[11]=w):w=s[11];const P=w;let C;s[12]!==i?(C=i?.toLowerCase(),s[12]=i,s[13]=C):C=s[13];const b=C,k=b&&Vt[b];let D;s[14]!==i?(D=Kt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let I;s[16]!==r.slug?(I=t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=I):I=s[17];let T;s[18]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(le,{}),s[18]=T):T=s[18];let R;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(R=u&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(_e,{children:O})}),s[24]=O,s[25]=U):U=s[25];let F;s[26]!==R||s[27]!==U||s[28]!==I?(F=t.jsx(Le,{children:t.jsxs(Ue,{children:[I,T,R,U]})}),s[26]=R,s[27]=U,s[28]=I,s[29]=F):F=s[29];const _=F;if(k){let J;return s[30]!==k||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(k,{itemId:a,onBack:d,onUpdate:P}),s[30]=k,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let S;s[35]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=S):S=s[35];let M;s[36]!==l?(M=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=M):M=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let z;s[40]!==l?(z=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=z):z=s[41];let B;s[42]!==d||s[43]!==z?(B={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=B):B=s[44];let q;s[45]!==M||s[46]!==V||s[47]!==B?(q=t.jsx(Et,{icon:S,title:M,description:V,buttonProps:B}),s[45]=M,s[46]=V,s[47]=B,s[48]=q):q=s[48];let Q;return s[49]!==_||s[50]!==q?(Q=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=Q):Q=s[51],Q}function Qt(){const s=E.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function Vo(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{Vo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,b as S,j as s,U as z,ah as A,l as V,T as $,B as E,V as F,X as _}from"./index-
|
|
1
|
+
import{c as R,b as S,j as s,U as z,ah as A,l as V,T as $,B as E,V as F,X as _}from"./index-bl_DQ3mH.js";import{i as L,n as O}from"./ArrowUp-CFc2wNu3.js";import{a as P,i as Y,c as I}from"./SwitchHorizontal01-B5sfCWHV.js";import{T as K,a as U,c as W,b as X}from"./tooltip-COqLwkid.js";import{V as q}from"./view-mode-toggle-B55pxnK_.js";import{B as G}from"./badge-BDMYkxf_.js";const M=[];function ie(t){const e=R.c(35),{viewMode:i,onViewModeChange:h,sortKey:k,sortDirection:g,onSort:j,sortOptions:B,filters:D}=t,b=B===void 0?M:B,o=D===void 0?M:D,l=S();let v;e[0]!==o?(v=o.filter(J),e[0]=o,e[1]=v):v=e[1];const N=v.length;let r;e[2]!==l?(r=l("collections.collectionDisplayButton.displayAndFilters"),e[2]=l,e[3]=r):r=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(P,{size:16}),e[4]=w):w=e[4];let n;e[5]!==N?(n=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[5]=N,e[6]=n):n=e[6];let a;e[7]!==r||e[8]!==n?(a=s.jsx(K,{asChild:!0,children:s.jsx($,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative","aria-label":r,children:[w,n]})})}),e[7]=r,e[8]=n,e[9]=a):a=e[9];let c;e[10]!==l?(c=l("collections.collectionDisplayButton.displayAndFilters"),e[10]=l,e[11]=c):c=e[11];let d;e[12]!==c?(d=s.jsx(U,{children:c}),e[12]=c,e[13]=d):d=e[13];let x;e[14]!==a||e[15]!==d?(x=s.jsx(W,{children:s.jsxs(X,{children:[a,d]})}),e[14]=a,e[15]=d,e[16]=x):x=e[16];let p;e[17]!==h||e[18]!==i?(p=h&&i&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:i,onValueChange:h,fullWidth:!0,options:[{value:"table",icon:s.jsx(Y,{})},{value:"cards",icon:s.jsx(I,{})}]})}),e[17]=h,e[18]=i,e[19]=p):p=e[19];let m;e[20]!==j||e[21]!==g||e[22]!==k||e[23]!==b||e[24]!==l?(m=b.length>0&&j&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l("collections.collectionDisplayButton.sortBy")}),b.map(C=>{const T=k===C.id;return s.jsx(z,{onClick:()=>j(C.id),className:V("h-8 px-2 py-0 cursor-pointer",T&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[T&&s.jsx(A,{size:16,className:"text-foreground shrink-0"}),!T&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:C.label}),T&&g&&(g==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},C.id)})]}),e[20]=j,e[21]=g,e[22]=k,e[23]=b,e[24]=l,e[25]=m):m=e[25];let u;e[26]!==o?(u=o.map(H),e[26]=o,e[27]=u):u=e[27];let f;e[28]!==p||e[29]!==m||e[30]!==u?(f=s.jsxs(F,{align:"end",className:"w-[200px] p-0 gap-0",children:[p,m,u]}),e[28]=p,e[29]=m,e[30]=u,e[31]=f):f=e[31];let y;return e[32]!==x||e[33]!==f?(y=s.jsxs(_,{children:[x,f]}),e[32]=x,e[33]=f,e[34]=y):y=e[34],y}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const i=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:V("h-8 px-2 py-0 cursor-pointer",i&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&s.jsx(A,{size:16,className:"text-foreground shrink-0"}),!i&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{ie as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,h as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,h as w}from"./index-bl_DQ3mH.js";import{i as C}from"./SearchMd-DnZ_sK_U.js";function y(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,h=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const p=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==p?(s=b("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{className:"size-4 text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==h||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:h,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=h,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{y as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as n,l as y,b as D}from"./index-
|
|
1
|
+
import{c as S,j as n,l as y,b as D}from"./index-bl_DQ3mH.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-Dsl6wBVe.js";import{i as W,n as z}from"./ArrowUp-CFc2wNu3.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
|