decocms 4.582.1 → 4.583.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DT2ZDuIl.js → AlertCircle-BfuEGc37.js} +1 -1
- package/dist/client/assets/{AreaChart-DcNurrpT.js → AreaChart-DR454FhG.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DR_MRxUB.js → ArrowLeft-Ccyza8AK.js} +1 -1
- package/dist/client/assets/ArrowRight-BfJPk4p9.js +1 -0
- package/dist/client/assets/{ArrowUp-BdtMKnAz.js → ArrowUp-Cfwuhrfj.js} +1 -1
- package/dist/client/assets/{BookOpen01-DejCO54_.js → BookOpen01-vaPiqXWZ.js} +1 -1
- package/dist/client/assets/{CartesianChart-43C3tGyF.js → CartesianChart-Vg3-F_Bi.js} +1 -1
- package/dist/client/assets/{CategoricalChart-GawOpO41.js → CategoricalChart-gtbFaKuM.js} +1 -1
- package/dist/client/assets/{CheckCircle-CM--cqi0.js → CheckCircle-WpYwhp7A.js} +1 -1
- package/dist/client/assets/ChevronDown-Kpzb5_P-.js +1 -0
- package/dist/client/assets/{ChevronSelectorVertical-BJDM_s_Z.js → ChevronSelectorVertical-DNPn4Jhl.js} +1 -1
- package/dist/client/assets/ChevronUp-CwLphDxo.js +1 -0
- package/dist/client/assets/{CreditCard01-BKZ9QJb-.js → CreditCard01-CDUEuZ6_.js} +1 -1
- package/dist/client/assets/Eye-BeTcpGN-.js +1 -0
- package/dist/client/assets/File02-D8jC2XAm.js +1 -0
- package/dist/client/assets/{Globe04-BZJYx7x5.js → Globe04-CM5K7y4B.js} +1 -1
- package/dist/client/assets/Image01-0Jwady1a.js +1 -0
- package/dist/client/assets/{Key01-CC_tghZO.js → Key01-Dqvoolzt.js} +1 -1
- package/dist/client/assets/LayoutLeft-Nn_BPz0l.js +1 -0
- package/dist/client/assets/LinkBroken01-6J7zZ1XX.js +1 -0
- package/dist/client/assets/Minimize01-Dylk6LHz.js +1 -0
- package/dist/client/assets/{Minus-Bj5yI5D8.js → Minus-BFZz-RWg.js} +1 -1
- package/dist/client/assets/{Monitor01-DeK03po-.js → Monitor01-ZIydqkip.js} +1 -1
- package/dist/client/assets/{Play-kYcUI1An.js → Play-CkrBckKV.js} +1 -1
- package/dist/client/assets/{Plus-DEeR8qC2.js → Plus-C8Idvwpa.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DbQts9AQ.js → ReferenceLine-2ZGA3m5C.js} +1 -1
- package/dist/client/assets/{SearchMd-DVpGBR2l.js → SearchMd-G9SUUXxg.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BV5nZGeU.js → ShoppingBag01-sbzM0fY9.js} +1 -1
- package/dist/client/assets/{Sun-Ba2OXmDv.js → Sun-Bvg5JrAI.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Cp1oX99F.js → SwitchHorizontal01-BbD-SqO6.js} +1 -1
- package/dist/client/assets/Tool01-DOjdBvJ6.js +1 -0
- package/dist/client/assets/{Tooltip-DNR0eew9.js → Tooltip-buu7_uLC.js} +1 -1
- package/dist/client/assets/{Trash01-CgZrkZ3U.js → Trash01-BRIjyxCC.js} +1 -1
- package/dist/client/assets/TrendUp01-DLgSqdSd.js +1 -0
- package/dist/client/assets/{Upload01-DDoiK0tv.js → Upload01-Dd-OapHB.js} +1 -1
- package/dist/client/assets/UserCheck01-DVOI9Qq6.js +1 -0
- package/dist/client/assets/{UserSquare-DEjJtCDR.js → UserSquare-CRBGeews.js} +1 -1
- package/dist/client/assets/{Users01-DVMhWmct.js → Users01-bZ_S-kH7.js} +1 -1
- package/dist/client/assets/{XClose-xYIhBL8b.js → XClose-CWGS9q3D.js} +1 -1
- package/dist/client/assets/{Zap-BsuEhLd3.js → Zap-BxaAY56U.js} +1 -1
- package/dist/client/assets/{access-gate-BYQd4796.js → access-gate-BpukTmFQ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-C86xZwTt.js → add-connection-dialog-BfsrivZp.js} +1 -1
- package/dist/client/assets/agent-app-ZmiqpLI8.js +1 -0
- package/dist/client/assets/agent-assets-CxDlSc-F.js +1 -0
- package/dist/client/assets/agent-automation-Cvq2MsBo.js +20 -0
- package/dist/client/assets/agent-automations-DqPMEPTu.js +1 -0
- package/dist/client/assets/agent-blog-CBUzxo-R.js +2 -0
- package/dist/client/assets/agent-blog-post-Bi0pzlIG.js +2 -0
- package/dist/client/assets/agent-calendar-D817wzif.js +1 -0
- package/dist/client/assets/{agent-capabilities-B40k722B.js → agent-capabilities-COfZW6Pr.js} +1 -1
- package/dist/client/assets/agent-connect-sources-DEAtqQDn.js +1 -0
- package/dist/client/assets/agent-deck-DLJ_JEHY.js +1 -0
- package/dist/client/assets/agent-e2e-B_mxpyua.js +1 -0
- package/dist/client/assets/agent-experiments-CC4vS2Ak.js +1 -0
- package/dist/client/assets/agent-file-DaY3pEIy.js +1 -0
- package/dist/client/assets/agent-hosting-CNynwqai.js +1 -0
- package/dist/client/assets/agent-icon-DE4TWlDl.js +1 -0
- package/dist/client/assets/agent-library-53yJ_N0C.js +1 -0
- package/dist/client/assets/agent-library-file-CmdRdcgJ.js +1 -0
- package/dist/client/assets/agent-overview-Bjahi54k.js +1 -0
- package/dist/client/assets/agent-releases-De-C-EMX.js +2 -0
- package/dist/client/assets/agent-settings-Bmfo6yEF.js +1 -0
- package/dist/client/assets/{agent-site-editor-CS9MMMbk.js → agent-site-editor-B5E5lU9u.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-BzQzaZAE.js +2 -0
- package/dist/client/assets/agent-site-editor-content-D03NaTwn.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-wStmeJD1.js +1 -0
- package/dist/client/assets/agent-view-Dh2W4gDj.js +1 -0
- package/dist/client/assets/agent-view-guard-25E2XJRr.js +1 -0
- package/dist/client/assets/ai-providers-E4UhWu6J.js +1 -0
- package/dist/client/assets/{alert-DFQMLwuf.js → alert-GV95Dsn9.js} +1 -1
- package/dist/client/assets/analytics-sections-C9-8NbQC.js +1 -0
- package/dist/client/assets/api-keys-BU9wHAPs.js +1 -0
- package/dist/client/assets/api-keys-C8ArQ5p_.js +1 -0
- package/dist/client/assets/app-editor-kEra9PRa.js +1 -0
- package/dist/client/assets/{asset-utils-DxQXeDgB.js → asset-utils-DWvcPbEZ.js} +1 -1
- package/dist/client/assets/{auth-catchall-ChHXwieU.js → auth-catchall-Dy37bIqg.js} +1 -1
- package/dist/client/assets/{auth-entry-BUy5eNSm.js → auth-entry-BHlmJEBv.js} +1 -1
- package/dist/client/assets/{auth-Br21RAsk.js → auth-gL3R1YGn.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DXcvh-93.js → auth-split-layout-ckQyQHcL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CTJV9ez5.js → authenticate-and-persist-oauth-C7oT67KU.js} +1 -1
- package/dist/client/assets/automation-list-row-DriFJJzl.js +1 -0
- package/dist/client/assets/{automation-runs-BluUkmKT.js → automation-runs-C37do2Pw.js} +1 -1
- package/dist/client/assets/automations-tDs_UhVP.js +1 -0
- package/dist/client/assets/{badge-C2zO_tAX.js → badge-BG-k6t3T.js} +1 -1
- package/dist/client/assets/{block-document-DTM21O-Q.js → block-document-pPtike34.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-0qX3i0Hw.js → blocks-preview-workspace-context-BBjk2tme.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BZoxOO-H.js → blocks-tab-states-GP0NCNYs.js} +1 -1
- package/dist/client/assets/{blog-preview-url-Bcn3MddY.js → blog-preview-url-CwSXxQWr.js} +1 -1
- package/dist/client/assets/blog-schema-DOB707mb.js +1 -0
- package/dist/client/assets/{blog-source-gate-DcD3mNPu.js → blog-source-gate-3rG_0gJI.js} +1 -1
- package/dist/client/assets/blog-view-gate-Be4DtolQ.js +1 -0
- package/dist/client/assets/buckets-BZrhNTRn.js +1 -0
- package/dist/client/assets/{build-improve-prompt-doc-BYTmOiJ8.js → build-improve-prompt-doc-DVbQXrhG.js} +1 -1
- package/dist/client/assets/calendar-CcuaFZRF.js +1 -0
- package/dist/client/assets/{capability-load-error-CHW06qRY.js → capability-load-error-Bcs21XUc.js} +1 -1
- package/dist/client/assets/category-editor-CnJqxifY.js +1 -0
- package/dist/client/assets/{category-tree-EQNjX_vh.js → category-tree-D2ejZxYL.js} +1 -1
- package/dist/client/assets/{chart-DP-afdSL.js → chart-B2B-jcI-.js} +1 -1
- package/dist/client/assets/chat-context-CiT7AzBS.js +43 -0
- package/dist/client/assets/{chat-draft-BnT_bTVf.js → chat-draft-BNZV2YjB.js} +1 -1
- package/dist/client/assets/{checkbox-Dn6r2X61.js → checkbox-DSC8VbDf.js} +1 -1
- package/dist/client/assets/choose-editor-uAW7DjQg.js +1 -0
- package/dist/client/assets/{cli-auth-success-BWjEoABt.js → cli-auth-success-B897Xynp.js} +1 -1
- package/dist/client/assets/cms-settings-editor-B4pAxgqZ.js +1 -0
- package/dist/client/assets/{cms-store-drafts-DC7_MPeX.js → cms-store-drafts-CtClpzKs.js} +1 -1
- package/dist/client/assets/{collapsible-waKUBV3F.js → collapsible-DrV9qsGN.js} +1 -1
- package/dist/client/assets/collection-detail-DucMHrT0.js +1 -0
- package/dist/client/assets/{collection-display-button-CpOX39FE.js → collection-display-button-BHyM7wC2.js} +1 -1
- package/dist/client/assets/{collection-search-CKJ8zcS9.js → collection-search-BbCHAL7t.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DX64SyX5.js → collection-table-wrapper-BlLHObjj.js} +1 -1
- package/dist/client/assets/{collection-tabs-DL3FYMaD.js → collection-tabs-BXeEDC1Y.js} +1 -1
- package/dist/client/assets/{combobox-CZTRaybI.js → combobox-DugO3-8Q.js} +1 -1
- package/dist/client/assets/{command-B0-oLV0k.js → command-Bo6EGcaE.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CAkQdc3e.js → companion-mcps-section-CsXLIG2Z.js} +1 -1
- package/dist/client/assets/config-CdVwRL_a.js +1 -0
- package/dist/client/assets/{client-icons-B7ckFhTB.js → connect-key--cfk-fLm.js} +1 -1
- package/dist/client/assets/{connect-layout-By1LwNsY.js → connect-layout-BPppRISp.js} +1 -1
- package/dist/client/assets/connect-lufub1FU.js +9 -0
- package/dist/client/assets/{connect-source-dialog-Clx35W2U.js → connect-source-dialog-CfsFTEbG.js} +1 -1
- package/dist/client/assets/{connection-CwOP2DkA.js → connection-BLQs5hMz.js} +1 -1
- package/dist/client/assets/{connection-card-DxEnheWw.js → connection-card-vLs08dR6.js} +1 -1
- package/dist/client/assets/connection-detail-CLkPYY1x.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DsiTws_r.js → connection-form-helpers-BSIh8Ep0.js} +1 -1
- package/dist/client/assets/connection-slug-CmPPcsjf.js +1 -0
- package/dist/client/assets/connections-C4ZbA0RY.js +1 -0
- package/dist/client/assets/{content-tab-D3gTzU_j.js → content-tab-C-pzFX10.js} +4 -4
- package/dist/client/assets/context-3bSluoDN.js +1 -0
- package/dist/client/assets/{context-menu-BAywIeQG.js → context-menu-CzIORBDb.js} +1 -1
- package/dist/client/assets/{context-shell-C8ZPCYjw.js → context-shell-3lL8N_R5.js} +4 -4
- package/dist/client/assets/{create-organization-dialog-BpL43B76.js → create-organization-dialog-k086v-9Q.js} +1 -1
- package/dist/client/assets/daily-pulse-P6H0d8QI.js +1 -0
- package/dist/client/assets/{delete-copy-UjfjjP4_.js → delete-copy-BQaedVkX.js} +1 -1
- package/dist/client/assets/{device-hint-AWxEadtg.js → device-hint-CvnqGHIy.js} +1 -1
- package/dist/client/assets/discover-qzwfuJLu.js +1 -0
- package/dist/client/assets/{domain-settings-BCvvef40.js → domain-settings-y3u2iu2W.js} +1 -1
- package/dist/client/assets/{drawer-CfOCKnhq.js → drawer-CarQd6Jb.js} +1 -1
- package/dist/client/assets/{editor-COFIs9XE.js → editor-DYk_2MJQ.js} +1 -1
- package/dist/client/assets/{editor-classes-aqVUSPbm.js → editor-classes-DVIoQu74.js} +1 -1
- package/dist/client/assets/{empty-message-CirmMDhM.js → empty-message-C90DlePv.js} +1 -1
- package/dist/client/assets/{empty-state-C7Sg1bax.js → empty-state-B67nwURy.js} +1 -1
- package/dist/client/assets/{empty-state-CFvQY7HR.js → empty-state-XAK3RjVy.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-D8ZqCESL.js +1 -0
- package/dist/client/assets/{extract-connection-data-CFxfI9gN.js → extract-connection-data-D6CjTXbp.js} +1 -1
- package/dist/client/assets/feature-gate-CCvZeJRu.js +1 -0
- package/dist/client/assets/{feature-paywall-AtUr_EOu.js → feature-paywall-DzmzZ5s3.js} +1 -1
- package/dist/client/assets/file-explorer-BqxAkXtr.js +2 -0
- package/dist/client/assets/{file-preview-PSKf9fIz.js → file-preview-C0yEEExh.js} +1 -1
- package/dist/client/assets/file-share-button-CowSSkLB.js +3 -0
- package/dist/client/assets/{file-type-icon-3Zm8W435.js → file-type-icon-CEP8k4gh.js} +1 -1
- package/dist/client/assets/folder-icon-CmtFeppJ.js +1 -0
- package/dist/client/assets/{form-BZ7xdssd.js → form-8GAe5FIZ.js} +1 -1
- package/dist/client/assets/{frame-navigation-8oPGH7NY.js → frame-navigation-BpI5RQJq.js} +1 -1
- package/dist/client/assets/gateway-client-BqPME1T5.js +1 -0
- package/dist/client/assets/general-DbhKzHt5.js +1 -0
- package/dist/client/assets/{github-icon-DH5Sm3NR.js → github-icon-BH4kK9If.js} +1 -1
- package/dist/client/assets/{held-block-view-BR-UYX4S.js → held-block-view-MI6LUwjK.js} +3 -3
- package/dist/client/assets/home-_NmLJi-9.js +1 -0
- package/dist/client/assets/home-overview-CTEEkh3w.js +1 -0
- package/dist/client/assets/{hosted-reconcile-C5UVxzTP.js → hosted-reconcile-BbIfIwl1.js} +1 -1
- package/dist/client/assets/{icon-button-BfibpDoO.js → icon-button-Dd8gTd4-.js} +1 -1
- package/dist/client/assets/index-B-OtHlgY.js +4 -0
- package/dist/client/assets/{index-BXpXjiyK.js → index-BRHz7VD8.js} +1 -1
- package/dist/client/assets/{index-dsAQGF7D.js → index-BY10zRfl.js} +1 -1
- package/dist/client/assets/index-B_-z8Lrt.js +1 -0
- package/dist/client/assets/{index-DF1Gszum.js → index-C17JTAPe.js} +2 -2
- package/dist/client/assets/{index-n1AjR0vt.js → index-CADsC-mK.js} +2 -2
- package/dist/client/assets/{index-BpLEscAk.js → index-CYjM_f4V.js} +1 -1
- package/dist/client/assets/{index-Db96seLi.js → index-CZQ-Wgjf.js} +1 -1
- package/dist/client/assets/{index-BP527m3V.js → index-CwntHk8S.js} +13 -13
- package/dist/client/assets/index-DClpdtOI.js +1 -0
- package/dist/client/assets/{index-Ds3fsbcX.js → index-DEOQXzn-.js} +1 -1
- package/dist/client/assets/{index-DZi8I8ot.js → index-DIHnNoyA.js} +1 -1
- package/dist/client/assets/{index-DoH06YKc.js → index-DPCC7KEx.js} +1 -1
- package/dist/client/assets/{index-CQ7e2YEj.js → index-Dez-6rcd.js} +1 -1
- package/dist/client/assets/index-Dkr4Q9bE.js +1 -0
- package/dist/client/assets/{index-CmzG_GaM.js → index-Do3hK3is.js} +1 -1
- package/dist/client/assets/{index-jQ2gY_fm.js → index-km18CQ4q.js} +1 -1
- package/dist/client/assets/index-pbgcO64n.css +1 -0
- package/dist/client/assets/{index-redirect-QRKsjVCi.js → index-redirect-CTR6WNPG.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BFZQsptZ.js → infiniteQueryObserver-DdeQTeaz.js} +1 -1
- package/dist/client/assets/infra-billing-tXzfTwHJ.js +1 -0
- package/dist/client/assets/input-CxFJosPu.js +17 -0
- package/dist/client/assets/{input-C1HwcZTs.js → input-DXyNd1dE.js} +1 -1
- package/dist/client/assets/{integration-icon-XUOEUOb8.js → integration-icon-BCAGJ22m.js} +1 -1
- package/dist/client/assets/item-actions-B4f3ZYnI.js +1 -0
- package/dist/client/assets/{jira-icon-B48lqxRs.js → jira-icon-B0PrtQPW.js} +1 -1
- package/dist/client/assets/{label-DSlWCd9e.js → label-BFX3DXnu.js} +1 -1
- package/dist/client/assets/{layout-QjOyVmz4.js → layout-GEd6141D.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DWeHIzCA.js → legacy-admin-welcome-dialog-CjbAHNU0.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-BRMRDtxS.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-h5ds91_H.js → legacy-main-redirect-Cpcnm12P.js} +1 -1
- package/dist/client/assets/library-GlSV21no.js +1 -0
- package/dist/client/assets/{library-tab-DI2mHZkf.js → library-tab-DiZQg1qQ.js} +2 -2
- package/dist/client/assets/{login-DgKeSKz2.js → login-DUNIcOhP.js} +1 -1
- package/dist/client/assets/{markdown-BTKw4nl8.js → markdown-sWsq0zMA.js} +5 -5
- package/dist/client/assets/{mcp-app-renderer-BT9_tzyT.js → mcp-app-renderer-DSMzeo3v.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BQRDLkqA.js → mcp-oauth-Cal4irlG.js} +1 -1
- package/dist/client/assets/{mcp-oauth-1Tp9szFm.js → mcp-oauth-DFWIYz5V.js} +1 -1
- package/dist/client/assets/members-D9DcuyAK.js +1 -0
- package/dist/client/assets/memory-DYN3365K.js +7 -0
- package/dist/client/assets/mock-board-llSJ1DSL.js +10 -0
- package/dist/client/assets/{monaco-editor-DTLNzmeB.js → monaco-editor-4_N5zBDQ.js} +1 -1
- package/dist/client/assets/{monitoring-CRmBvi8F.js → monitoring-5YgUKCBd.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-G2RBze7B.js → monitoring-stats-row-BCaHkQz9.js} +1 -1
- package/dist/client/assets/multi-select-B4K-daTY.js +1 -0
- package/dist/client/assets/{mustache-p2j_fCOZ.js → mustache-B8t03rZ4.js} +1 -1
- package/dist/client/assets/{named-rule-step-BJ5LyK07.js → named-rule-step-P0BFUtVs.js} +1 -1
- package/dist/client/assets/named-rule-view-CvRYAekO.js +1 -0
- package/dist/client/assets/new-project-dialog-DI67z-Vr.js +1 -0
- package/dist/client/assets/new-project-store-DoliA5Iq.js +1 -0
- package/dist/client/assets/{oauth-callback-Cg1KjIf_.js → oauth-callback-DtdbhW3N.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-hOquTBPU.js → oauth-callback-ai-provider-iNwVQAC1.js} +1 -1
- package/dist/client/assets/{oauth-consent-CzhJum4d.js → oauth-consent-Co0jE424.js} +1 -1
- package/dist/client/assets/{onboarding-FLu6ztJj.js → onboarding-Dn4ndntc.js} +1 -1
- package/dist/client/assets/openai-conversation-D43N7JcR.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-D6axz004.js → optimistic-project-sidebar-views-PUKP14F8.js} +1 -1
- package/dist/client/assets/order-monitor-day-fHekYy64.js +1 -0
- package/dist/client/assets/{organization-choice-dV-mJr-d.js → organization-choice-Ctd80SL2.js} +1 -1
- package/dist/client/assets/orgs-BQeWnD4l.js +1 -0
- package/dist/client/assets/own-accounts-section-CwzdBIu0.js +1 -0
- package/dist/client/assets/pair-Du2wOAPA.js +48 -0
- package/dist/client/assets/{parse-sections-Cy8SKsEh.js → parse-sections-DUEfhNb0.js} +4 -4
- package/dist/client/assets/plan-BDh0er6r.js +1 -0
- package/dist/client/assets/{plan-ladder-xVKcSuhD.js → plan-ladder-cJHOFEt_.js} +1 -1
- package/dist/client/assets/{plan-usage-card-Cxjcl-tF.js → plan-usage-card-DnCWaNBs.js} +1 -1
- package/dist/client/assets/{popover-CelLmvH8.js → popover-XZWwzjJe.js} +1 -1
- package/dist/client/assets/post-calendar-Cq2VElZ4.js +1 -0
- package/dist/client/assets/{post-editor-DkdXE0U4.js → post-editor-ChZHYnmE.js} +2 -2
- package/dist/client/assets/preview-content-Ct9U0F_F.js +1 -0
- package/dist/client/assets/{preview-dialog-BTVSDgVC.js → preview-dialog-BlN_MeAY.js} +1 -1
- package/dist/client/assets/{preview-panel-COaKD6oK.js → preview-panel-CMaIBxrS.js} +1 -1
- package/dist/client/assets/preview-tab-rp6yyGU1.js +557 -0
- package/dist/client/assets/product-picker-dialog-Cp5iroCv.js +1 -0
- package/dist/client/assets/profile-BvhSJiAV.js +1 -0
- package/dist/client/assets/project-app-view-BPtWGCfo.js +1 -0
- package/dist/client/assets/project-apps-CDSLxQ6C.js +1 -0
- package/dist/client/assets/{project-icon-TEwy-duh.js → project-icon-C_Qws_Ah.js} +1 -1
- package/dist/client/assets/{project-index-DqRiC0zN.js → project-index-dmu51Z_5.js} +1 -1
- package/dist/client/assets/project-reports-BVUPVqwF.js +1 -0
- package/dist/client/assets/project-tasks-i5QwXcB1.js +1 -0
- package/dist/client/assets/projects-9cB_xTYP.js +1 -0
- package/dist/client/assets/{projects-empty-state-OMTDG8SV.js → projects-empty-state-ZoaV8gjs.js} +1 -1
- package/dist/client/assets/{prompts-TP7YCuz6.js → prompts-DfPwtsSz.js} +1 -1
- package/dist/client/assets/record-editor-BQX3fl3B.js +1 -0
- package/dist/client/assets/redirect-editor-DmgDoBZW.js +1 -0
- package/dist/client/assets/{reports-CvxegUiQ.js → reports-B7Mq5ojT.js} +1 -1
- package/dist/client/assets/reports-Dmcxcdt8.js +1 -0
- package/dist/client/assets/reports-onboarding-DnVjGniS.js +1 -0
- package/dist/client/assets/reports-tab-D7WrLBuD.js +2 -0
- package/dist/client/assets/repositories-B6qJORdw.js +1 -0
- package/dist/client/assets/repositories-CKo-J8oc.js +1 -0
- package/dist/client/assets/{repository-binding-DGc5VhVW.js → repository-binding-Cqb4hBI0.js} +1 -1
- package/dist/client/assets/{repository-picker-DO5Hy-o-.js → repository-picker-B967M4cj.js} +1 -1
- package/dist/client/assets/{require-capability-CCGZ96D-.js → require-capability-CnRgBqvn.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DoMwdVaZ.js → required-auth-layout-DwZV69de.js} +1 -1
- package/dist/client/assets/{reset-password-B672rI1V.js → reset-password-DBlLRH7P.js} +1 -1
- package/dist/client/assets/resizable-Ddu9Pik_.js +1 -0
- package/dist/client/assets/resolve-tab-icon-C5v6XuFJ.js +1 -0
- package/dist/client/assets/{review-settings-B8FCs2a_.js → review-settings-_NtVHX9D.js} +1 -1
- package/dist/client/assets/{role-color-CPDxseg4.js → role-color-CYCY1ZHM.js} +1 -1
- package/dist/client/assets/roles-BOIysbZW.js +1 -0
- package/dist/client/assets/route-B2eUAr3E.js +1 -0
- package/dist/client/assets/route-DjNFlT9m.js +1 -0
- package/dist/client/assets/route-l3dfZAcw.js +1 -0
- package/dist/client/assets/route-page-header-x4fiBRQK.js +1 -0
- package/dist/client/assets/{sandbox-git-api-3zULVhcU.js → sandbox-git-api-CX3IYPAX.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BEzUu66E.js → sandbox-lifecycle-context-CsmYXarj.js} +1 -1
- package/dist/client/assets/save-status-DM-afM9Q.js +1 -0
- package/dist/client/assets/{schema-DIJe3qA1.js → schema-Bh0CFZUA.js} +1 -1
- package/dist/client/assets/{schema-BtzAS_P2.js → schema-CsGAsuNy.js} +1 -1
- package/dist/client/assets/{scroll-area-mVo2jhxQ.js → scroll-area-DkuLv9J_.js} +1 -1
- package/dist/client/assets/{search-input-ChnwrZA6.js → search-input-Yj0UUhbr.js} +1 -1
- package/dist/client/assets/{search-toggle-CC4Rs40x.js → search-toggle-CTqn74j5.js} +1 -1
- package/dist/client/assets/{secret-picker-CWGbJrCR.js → secret-picker-FNSDTzDT.js} +1 -1
- package/dist/client/assets/secrets-DnkJAwly.js +1 -0
- package/dist/client/assets/{section-array-field-4mOiVd7b.js → section-array-field-DbmoEjb3.js} +1 -1
- package/dist/client/assets/sections-Bk5O8laV.js +1 -0
- package/dist/client/assets/sections-editor-BYa3JqlT.js +1 -0
- package/dist/client/assets/select-DqZVtjvu.js +1 -0
- package/dist/client/assets/{select-model-BqTl5eD-.js → select-model-D_3F7ch9.js} +1 -1
- package/dist/client/assets/{seo-editor-iaqzR9NS.js → seo-editor-alLFkZ3V.js} +1 -1
- package/dist/client/assets/{separator-CwN-gidC.js → separator-DOH2DVT3.js} +1 -1
- package/dist/client/assets/session-runtime-DaEm9VzJ.js +1 -0
- package/dist/client/assets/settings-tab-Dnn9Ngte.js +1 -0
- package/dist/client/assets/{sheet-1BLiVjE3.js → sheet-B3BCtfXu.js} +1 -1
- package/dist/client/assets/shell-layout-BMy93BCc.js +1 -0
- package/dist/client/assets/{site-draft-actions-GLib44bU.js → site-draft-actions-C2zLtAMz.js} +5 -5
- package/dist/client/assets/site-draft-view-ikG8CMuB.js +1 -0
- package/dist/client/assets/site-editor-B8VlT5Kv.js +1 -0
- package/dist/client/assets/site-editor-toast-GAJZE2A0.js +1 -0
- package/dist/client/assets/skills-dIhMA0Ze.js +1 -0
- package/dist/client/assets/{slider-BKrw7nqs.js → slider-DirLi5JL.js} +1 -1
- package/dist/client/assets/{sortable.esm-CA_k0RaZ.js → sortable.esm-B3zbNG6q.js} +1 -1
- package/dist/client/assets/sso-tZNmyRgp.js +1 -0
- package/dist/client/assets/{suggestion-BdOz28RC.js → suggestion-bCd1m59t.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DExAOD4i.js → super-agent-icon-AJ6ZRe5V.js} +1 -1
- package/dist/client/assets/{switch-B60LgmjA.js → switch-BviC1co2.js} +1 -1
- package/dist/client/assets/{synced-repos-DfFbkdSN.js → synced-repos-DsEdkMaA.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-MzzsG5oc.js → tab-icon-glyph-DkjrfS6l.js} +1 -1
- package/dist/client/assets/{table-KEskYvtS.js → table-DX15DDx1.js} +1 -1
- package/dist/client/assets/{tabs-DXm_rA9S.js → tabs-BiFBpWbA.js} +1 -1
- package/dist/client/assets/task-board-DD2iUGL4.js +1 -0
- package/dist/client/assets/{core.esm-YEEWezEY.js → task-key-DP7js_2-.js} +2 -2
- package/dist/client/assets/task-route-Bfb6XWlb.js +1 -0
- package/dist/client/assets/{task-status-Bn4DeOrT.js → task-status-CBWakThc.js} +1 -1
- package/dist/client/assets/taskboard-analytics-B5XiM0gZ.js +1 -0
- package/dist/client/assets/{tasks-fWq-fqoJ.js → tasks-BPwrQv5-.js} +3 -3
- package/dist/client/assets/tasks-ip1BqsyR.js +1 -0
- package/dist/client/assets/{textarea-CRgCAK3p.js → textarea-BoSVR1xB.js} +1 -1
- package/dist/client/assets/thread-analytics-B3wSdPFK.js +1 -0
- package/dist/client/assets/thread-button-CIHD7120.js +1 -0
- package/dist/client/assets/{thread-intent-DrRX6nG0.js → thread-intent-DpzwhK2y.js} +6 -6
- package/dist/client/assets/thread-route-Bdw4g7Hg.js +1 -0
- package/dist/client/assets/thread-route-D4mea9ep.js +1 -0
- package/dist/client/assets/thread-sheet-body-C1_HCALD.js +1 -0
- package/dist/client/assets/time-range-picker-B9_5lQqT.js +1 -0
- package/dist/client/assets/{toggle-group-JYZ1PCaE.js → toggle-group-l7lV2Oqp.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DTAr1xzz.js → tool-set-selector-BQISxiF9.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B0M5XFng.js → toolbar-icon-button-CflJ2Qid.js} +1 -1
- package/dist/client/assets/{tooltip-D9qNlq6S.js → tooltip-BTd3W-2Z.js} +1 -1
- package/dist/client/assets/{tooltipContext-B94TDN-Q.js → tooltipContext-De8eALzu.js} +1 -1
- package/dist/client/assets/{track-DJVHN5Lv.js → track-BBHYiJkY.js} +1 -1
- package/dist/client/assets/{types-BfPC7vnd.js → types-C8b3acwX.js} +1 -1
- package/dist/client/assets/{url-slug-Bts08KOo.js → url-slug-gNlq1cKV.js} +1 -1
- package/dist/client/assets/{usage-stats-CK4hgSt6.js → usage-stats-Bk_1jh1-.js} +2 -2
- package/dist/client/assets/{use-ai-providers-CxZCPqVC.js → use-ai-providers-Cya2RotC.js} +1 -1
- package/dist/client/assets/use-api-keys-BdlPKuv4.js +1 -0
- package/dist/client/assets/use-apply-named-rule-CcoLpt-_.js +1 -0
- package/dist/client/assets/use-ask-in-chat-B_ARVX9A.js +1 -0
- package/dist/client/assets/{use-automations-B7d02VWl.js → use-automations-CerQ9Qaj.js} +1 -1
- package/dist/client/assets/{use-autosave-DOc72aWE.js → use-autosave-CQa7WbXM.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BedqZgtc.js +1 -0
- package/dist/client/assets/use-blog-view-9s3Vkx1q.js +1 -0
- package/dist/client/assets/use-chat-layout-state-CWt5k1nY.js +1 -0
- package/dist/client/assets/{use-cms-publish-actions-DimSJzWP.js → use-cms-publish-actions-7QluCfa8.js} +4 -4
- package/dist/client/assets/use-connect-companion-B8Oqj7MQ.js +1 -0
- package/dist/client/assets/{use-connection-CFmR-X06.js → use-connection-2s3z_IKD.js} +1 -1
- package/dist/client/assets/{use-content-sync-BEqIA-0g.js → use-content-sync-DxzP8nN9.js} +1 -1
- package/dist/client/assets/{use-copy-PziytufC.js → use-copy-sOY8Yuot.js} +1 -1
- package/dist/client/assets/use-current-view-EjRzX02x.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-BVsHKqDt.js → use-date-fns-locale-DjDbgiCF.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CU3dUlJX.js → use-debounced-autosave--lHIRoNY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DJ5YZsat.js → use-debounced-value-RJW46-1q.js} +1 -1
- package/dist/client/assets/{use-deco-credits-_9aC49vI.js → use-deco-credits-d4Nbb0l0.js} +1 -1
- package/dist/client/assets/use-decopilot-events-BGpwG8Pb.js +1 -0
- package/dist/client/assets/use-delete-block-BR5smTsV.js +1 -0
- package/dist/client/assets/{use-delete-connection-Bp9D22pQ.js → use-delete-connection-DHkW3H9t.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D8TSoW7b.js → use-deployment-admin-j92yIioi.js} +1 -1
- package/dist/client/assets/{use-entitlements-Chh3D10H.js → use-entitlements-DtyegfyM.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-B4HFa9pK.js +1 -0
- package/dist/client/assets/{use-file-configs-8VTVKs7P.js → use-file-configs-CzyibAGV.js} +1 -1
- package/dist/client/assets/{use-id-selection-LGL3_97F.js → use-id-selection-DSQKok9P.js} +1 -1
- package/dist/client/assets/use-in-settings-DLJEfljS.js +1 -0
- package/dist/client/assets/{use-inbox-feed-DjVLN02v.js → use-inbox-feed-BNnBKFlA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BBVWbqWO.js → use-infinite-scroll-D1tYrKq7.js} +1 -1
- package/dist/client/assets/{use-join-requests-4dddz-2V.js → use-join-requests-CSjMfH5p.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CllMGKzI.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-DS0pbV57.js +1 -0
- package/dist/client/assets/{use-mcp-client-CaYmuD4l.js → use-mcp-client-Cvc3WWPF.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-lHtFGIni.js → use-mcp-prompts-Ck1uv43A.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-COoBOTb8.js → use-mcp-tools-BIzewITl.js} +1 -1
- package/dist/client/assets/{use-mobile-B0YlxBUo.js → use-mobile-CG2XwDbe.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CRsMTnFT.js → use-move-blocks-Dv6zyDyx.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D9u86crS.js → use-navigate-to-agent-BFBISUMc.js} +1 -1
- package/dist/client/assets/use-never-published-D3zJmakm.js +1 -0
- package/dist/client/assets/{use-org-fs-Cv09aZqm.js → use-org-fs-BfE7L8cf.js} +1 -1
- package/dist/client/assets/use-org-notice-DghJzmC_.js +1 -0
- package/dist/client/assets/{use-org-repo-syncs-CKUvsIrW.js → use-org-repo-syncs-CU3MGWk9.js} +1 -1
- package/dist/client/assets/{use-org-sso-CBrdU305.js → use-org-sso-C8BMUr72.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BWLJTTpw.js → use-organization-settings-Ddjh427l.js} +1 -1
- package/dist/client/assets/use-panel-navigate-V2MXWXLu.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-EdJBeOw9.js +1 -0
- package/dist/client/assets/use-project-scope-COzEo5Zz.js +1 -0
- package/dist/client/assets/use-recent-apps-BpR_nbgz.js +1 -0
- package/dist/client/assets/{use-reports-diagnostic-CgjecoRR.js → use-reports-diagnostic-DYf7sFCj.js} +1 -1
- package/dist/client/assets/use-sandbox-events-cbWqZuIm.js +2 -0
- package/dist/client/assets/{use-secrets-D46GKExN.js → use-secrets-BamKWPUs.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BO578O9L.js → use-section-preview-base-Cy_X_Jjl.js} +1 -1
- package/dist/client/assets/use-sidebar-collapsed-CGkkkrTj.js +1 -0
- package/dist/client/assets/{use-tags-LwHF4ikl.js → use-tags-staoqXQp.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-TZTLLgky.js → use-task-board-analytics-C5Dsg-uV.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BW_n16vt.js → use-task-board-item-prs-DsFjq28v.js} +1 -1
- package/dist/client/assets/use-task-board-items-OgSDu-ag.js +1 -0
- package/dist/client/assets/{use-task-board-prompts-CHIblyN4.js → use-task-board-prompts-Bn4-yS6Z.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DdKhuIQ3.js → use-task-metadata-Bc8o5Sts.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DsjZa1n5.js → use-thread-outputs-Co5bznxQ.js} +1 -1
- package/dist/client/assets/use-view-draft-kind-BdwsMdex.js +1 -0
- package/dist/client/assets/use-voice-input-CwLNuWlo.js +1 -0
- package/dist/client/assets/useInfiniteQuery-BagPKS5m.js +1 -0
- package/dist/client/assets/{useQueries-B8jtB-RW.js → useQueries-BjVZ4kPO.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BUmkwIx5.js +1 -0
- package/dist/client/assets/{users-zlgoDQuW.js → users-CPRHIyd2.js} +1 -1
- package/dist/client/assets/utils-DPEBLDgi.js +4 -0
- package/dist/client/assets/variant-calendar-Dlw46bNO.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BKIrGg8S.js → variant-matcher-override-ChW3ijK5.js} +1 -1
- package/dist/client/assets/{view-header-OfKMmhb0.js → view-header-D4oknAV1.js} +1 -1
- package/dist/client/assets/virtual-mcp-nhrh3mtw.js +1 -0
- package/dist/client/assets/{watch-sse-pool-B39Ow5tK.js → watch-sse-pool-CTgVk3NA.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-DM7pn8nV.js +0 -1
- package/dist/client/assets/LinkBroken01-4l2zZef9.js +0 -1
- package/dist/client/assets/Tool01-BlUlKjGy.js +0 -1
- package/dist/client/assets/agent-app-qCE6mpox.js +0 -1
- package/dist/client/assets/agent-assets-BERkZgBg.js +0 -1
- package/dist/client/assets/agent-automation-B3znFoJv.js +0 -20
- package/dist/client/assets/agent-automations-BI5n1DEk.js +0 -1
- package/dist/client/assets/agent-blog-DFA4iTY2.js +0 -2
- package/dist/client/assets/agent-blog-post-CJzR6SRp.js +0 -2
- package/dist/client/assets/agent-calendar-DCBRCsam.js +0 -1
- package/dist/client/assets/agent-connect-sources-BvH_YwiD.js +0 -1
- package/dist/client/assets/agent-deck-C_9xRnWL.js +0 -1
- package/dist/client/assets/agent-e2e-B2FpHDAG.js +0 -1
- package/dist/client/assets/agent-experiments-BDFLMLOM.js +0 -1
- package/dist/client/assets/agent-file-CAkn0Q5x.js +0 -1
- package/dist/client/assets/agent-hosting-D0d8gHPR.js +0 -1
- package/dist/client/assets/agent-icon-CpMz1pSC.js +0 -1
- package/dist/client/assets/agent-library-Cs6jlCDK.js +0 -1
- package/dist/client/assets/agent-library-file-DV2qsJC9.js +0 -1
- package/dist/client/assets/agent-overview-IBMGymrh.js +0 -1
- package/dist/client/assets/agent-releases-k0DaB9LQ.js +0 -2
- package/dist/client/assets/agent-settings-DF71XJZP.js +0 -1
- package/dist/client/assets/agent-site-editor-code-gfgfb7xF.js +0 -2
- package/dist/client/assets/agent-site-editor-content-C07hh63_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CFg2FnqN.js +0 -1
- package/dist/client/assets/agent-view-CzQtfKwQ.js +0 -1
- package/dist/client/assets/agent-view-guard-XdI97YrW.js +0 -1
- package/dist/client/assets/ai-providers-DoacYpUR.js +0 -1
- package/dist/client/assets/analytics-sections-DNjeT1Pf.js +0 -1
- package/dist/client/assets/api-keys-Bbyyi1IV.js +0 -1
- package/dist/client/assets/api-keys-CLzhmgUv.js +0 -1
- package/dist/client/assets/app-editor-Cd7oWsvo.js +0 -1
- package/dist/client/assets/automation-list-row-COaiktOt.js +0 -1
- package/dist/client/assets/automations-BvZ8wxJr.js +0 -1
- package/dist/client/assets/blog-schema-PWQlG4FM.js +0 -1
- package/dist/client/assets/blog-view-gate-BpiHsFQi.js +0 -1
- package/dist/client/assets/buckets-r-Vn310N.js +0 -1
- package/dist/client/assets/calendar-DkvAGmxG.js +0 -1
- package/dist/client/assets/category-editor-D53-0-dG.js +0 -1
- package/dist/client/assets/chat-context-Na_9rQo_.js +0 -39
- package/dist/client/assets/choose-editor-DFYfaLQ4.js +0 -1
- package/dist/client/assets/cms-settings-editor-BLtwrg_Q.js +0 -1
- package/dist/client/assets/collection-detail-BdQUzwBw.js +0 -1
- package/dist/client/assets/config-DhSdzr_l.js +0 -1
- package/dist/client/assets/connect-DwtFEmWa.js +0 -9
- package/dist/client/assets/connection-detail-Bm5pNgz3.js +0 -1
- package/dist/client/assets/connection-slug-CqKJM07D.js +0 -1
- package/dist/client/assets/connections-8N6-U8BU.js +0 -1
- package/dist/client/assets/context-CdMMXT5s.js +0 -1
- package/dist/client/assets/discover-DhvRjqxh.js +0 -1
- package/dist/client/assets/experiments-tab-choice-Ch-KXcUZ.js +0 -1
- package/dist/client/assets/feature-gate-BsIQ70jm.js +0 -1
- package/dist/client/assets/file-explorer-DpEdUCiL.js +0 -2
- package/dist/client/assets/file-share-button-D9sAYI1R.js +0 -3
- package/dist/client/assets/folder-icon-D4-RUOt8.js +0 -1
- package/dist/client/assets/general-Bt-teqGz.js +0 -1
- package/dist/client/assets/home-CIpHO2ej.js +0 -1
- package/dist/client/assets/home-overview-9H7C1hoB.js +0 -1
- package/dist/client/assets/index-BqWale_V.css +0 -1
- package/dist/client/assets/index-DCl7HPjQ.js +0 -1
- package/dist/client/assets/index-DN9fxTzN.js +0 -1
- package/dist/client/assets/index-DuYneP0E.js +0 -1
- package/dist/client/assets/index-tLhNg31B.js +0 -4
- package/dist/client/assets/infra-billing-C3ShZZOT.js +0 -1
- package/dist/client/assets/input-GqBshPf5.js +0 -17
- package/dist/client/assets/item-actions-BfBBT1Qz.js +0 -1
- package/dist/client/assets/legacy-agents-deep-COHFWDWb.js +0 -1
- package/dist/client/assets/library-BMXElwFo.js +0 -1
- package/dist/client/assets/members-DQZtkBei.js +0 -1
- package/dist/client/assets/memory-B82F2Q7k.js +0 -7
- package/dist/client/assets/mock-board-B7BOXAS7.js +0 -10
- package/dist/client/assets/multi-select-ykLyfeEh.js +0 -1
- package/dist/client/assets/named-rule-view-BBEm0z_K.js +0 -1
- package/dist/client/assets/new-project-dialog-C3JFSI1q.js +0 -1
- package/dist/client/assets/openai-conversation-DhsFXaEr.js +0 -3
- package/dist/client/assets/order-monitor-day-CQJg9ymu.js +0 -1
- package/dist/client/assets/orgs-DafOcWKJ.js +0 -1
- package/dist/client/assets/own-accounts-section-BitxRWkd.js +0 -1
- package/dist/client/assets/pair-Dsc6GXhQ.js +0 -48
- package/dist/client/assets/plan-5t2sCqh-.js +0 -1
- package/dist/client/assets/post-calendar-DkUmj6jK.js +0 -1
- package/dist/client/assets/preview-content-Di9jV9fD.js +0 -1
- package/dist/client/assets/preview-tab-BFi8NHe-.js +0 -557
- package/dist/client/assets/product-picker-dialog-tqTphLK7.js +0 -1
- package/dist/client/assets/profile-ItK6hTrx.js +0 -1
- package/dist/client/assets/project-app-view-CMAf9Mlz.js +0 -1
- package/dist/client/assets/project-apps-ByyLejju.js +0 -1
- package/dist/client/assets/project-reports-CPvLPQcs.js +0 -1
- package/dist/client/assets/project-tasks-B88cPPXW.js +0 -1
- package/dist/client/assets/projects-FY3sblQl.js +0 -1
- package/dist/client/assets/record-editor-IJLTcCdR.js +0 -1
- package/dist/client/assets/redirect-editor-B2-M7doi.js +0 -1
- package/dist/client/assets/reports-ODcJFAP-.js +0 -1
- package/dist/client/assets/reports-onboarding-BicRsxJF.js +0 -1
- package/dist/client/assets/reports-tab-CCY5hBR2.js +0 -2
- package/dist/client/assets/repositories-C0edGPcS.js +0 -1
- package/dist/client/assets/repositories-V6vmPwSM.js +0 -1
- package/dist/client/assets/resizable-DrLaW_Jl.js +0 -1
- package/dist/client/assets/resolve-tab-icon-CfRdrLF-.js +0 -1
- package/dist/client/assets/roles-BYqU9-We.js +0 -1
- package/dist/client/assets/route-BXYvPulM.js +0 -1
- package/dist/client/assets/route-Bh9fCZXT.js +0 -1
- package/dist/client/assets/route-a1KQq-lz.js +0 -1
- package/dist/client/assets/save-status-Cx3aKwGu.js +0 -1
- package/dist/client/assets/secrets-DE59ARp-.js +0 -1
- package/dist/client/assets/sections-B1sv3rvB.js +0 -1
- package/dist/client/assets/sections-editor-sTEVWcAy.js +0 -1
- package/dist/client/assets/select-BNoZ1cwH.js +0 -1
- package/dist/client/assets/settings-tab-H1Nf96Yz.js +0 -1
- package/dist/client/assets/shell-layout-BHtZVBED.js +0 -1
- package/dist/client/assets/site-draft-view-CKK7PKoH.js +0 -1
- package/dist/client/assets/site-editor-Bl3uFRW-.js +0 -1
- package/dist/client/assets/site-editor-toast-BXRGIPuY.js +0 -1
- package/dist/client/assets/skills-Q6l6j9x7.js +0 -1
- package/dist/client/assets/sso-C4bCFgaT.js +0 -1
- package/dist/client/assets/task-board-CdhOR9bl.js +0 -1
- package/dist/client/assets/task-key-BCHdFiOO.js +0 -1
- package/dist/client/assets/task-route-DeSbQRkP.js +0 -1
- package/dist/client/assets/taskboard-analytics-CRI_d1NW.js +0 -1
- package/dist/client/assets/tasks-DGRURa32.js +0 -1
- package/dist/client/assets/thread-analytics-aoAc3KR6.js +0 -1
- package/dist/client/assets/thread-route-D404Xl1w.js +0 -1
- package/dist/client/assets/thread-route-L_F2dRjs.js +0 -1
- package/dist/client/assets/thread-sheet-body-D3DOFB6A.js +0 -1
- package/dist/client/assets/time-range-picker-DouTd8PJ.js +0 -1
- package/dist/client/assets/tool-namespace-BBpCD9sF.js +0 -1
- package/dist/client/assets/use-apply-named-rule-h1W6SPpC.js +0 -1
- package/dist/client/assets/use-ask-in-chat-D4gRql_N.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BLLvbZl2.js +0 -1
- package/dist/client/assets/use-chat-layout-state-DQhX2zdi.js +0 -1
- package/dist/client/assets/use-connect-companion-CqTyzSlz.js +0 -1
- package/dist/client/assets/use-decopilot-events-B84nN_Z6.js +0 -1
- package/dist/client/assets/use-delete-block-BbJuByhU.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-DRtzWCS3.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-Bq834oWY.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-ewp8JzH8.js +0 -1
- package/dist/client/assets/use-never-published-BRSQAhRd.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-D5R7YysD.js +0 -1
- package/dist/client/assets/use-project-scope-Dzg0nsjs.js +0 -1
- package/dist/client/assets/use-recent-apps-BKAftwoT.js +0 -1
- package/dist/client/assets/use-sandbox-events-BtXLDGZr.js +0 -2
- package/dist/client/assets/use-sidebar-collapsed-x7SsKYNl.js +0 -1
- package/dist/client/assets/use-task-board-events-U_kvLTo1.js +0 -1
- package/dist/client/assets/use-task-board-items-B66t-aAy.js +0 -1
- package/dist/client/assets/use-view-draft-kind-BtHf66Jj.js +0 -1
- package/dist/client/assets/use-voice-input-Li611DFd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CN2uIy97.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ECHIzp7d.js +0 -1
- package/dist/client/assets/utils-DONok1LX.js +0 -4
- package/dist/client/assets/variant-calendar-CjAgTw5u.js +0 -1
- package/dist/client/assets/virtual-mcp-BKUZFB3-.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,a4 as re,a as pe,ak as Pe,K as fe,i as me,b as W,r as D,m as ee,j as n,h as Ie,B as We,aS as je,aR as Me,R as vt,E as he,x as Jt,aT as es,w as ts,v as ss,D as ns,ab as as,aU as rs,ar as yt,t as is,as as ls,d as Ae,n as at,aV as os,f as Se,U as rt,l as jt,e as cs,u as Le,aW as ds,aX as us,O as St,aY as fs,aZ as ms,N as hs,a_ as ps,P as ze}from"./index-BP527m3V.js";import{i as Ye}from"./AlertCircle-DT2ZDuIl.js";import{E as xs,F as it,A as ye,G as gs,H as bs,k as vs,I as ys,J as js,K as Ss,L as kt,M as ks,n as Ts,m as Ns,o as _s}from"./agent-icon-CpMz1pSC.js";import{c as ws,u as Cs}from"./use-sidebar-collapsed-x7SsKYNl.js";import{T as _e}from"./toolbar-icon-button-B0M5XFng.js";import{C as Z,w as Ps}from"./index-DN9fxTzN.js";import{s as Tt,u as Nt}from"./use-voice-input-Li611DFd.js";import{u as $e,b as Ze,c as Ee,d as _t,e as Is,s as Ms}from"./chat-context-Na_9rQo_.js";import{u as As,s as wt}from"./use-ai-providers-CxZCPqVC.js";import{b as Ct,a as Ls,u as $s}from"./use-organization-settings-BWLJTTpw.js";import{i as Es}from"./CheckCircle-CM--cqi0.js";import{s as lt}from"./XClose-xYIhBL8b.js";import{u as Fe,a as Fs,b as Pt,g as It}from"./repository-binding-DGc5VhVW.js";import{I as Mt}from"./integration-icon-XUOEUOb8.js";import{b as Rs}from"./use-entitlements-Chh3D10H.js";import{t as Xe}from"./ChevronUp-DM7pn8nV.js";import{O as Bs}from"./pair-Dsc6GXhQ.js";import{u as Os,a as Ds}from"./use-thread-outputs-DsjZa1n5.js";import{u as zs}from"./use-deco-credits-_9aC49vI.js";import{C as Ks,u as Gs,V as Us,a as Hs}from"./input-GqBshPf5.js";import{a as Vs}from"./agent-capabilities-B40k722B.js";import{u as qs,d as At,a as Qe,b as Je,c as Lt,e as Ws,g as $t,f as Et,h as ot}from"./thread-intent-DrRX6nG0.js";import{f as Ys,b as Ft,c as Zs}from"./use-navigate-to-agent-D9u86crS.js";import{o as Xs,s as Qs,u as Js,S as en}from"./sandbox-lifecycle-context-BEzUu66E.js";import{E as Rt}from"./empty-state-CFvQY7HR.js";import{t as tn,m as sn,u as nn}from"./use-chat-layout-state-DQhX2zdi.js";import{u as an,a as rn,i as ln,n as on,b as cn}from"./cms-store-drafts-DC7_MPeX.js";import{b as ct}from"./use-blocks-v8-project-BLLvbZl2.js";import{C as dt}from"./index-DuYneP0E.js";import{a as Bt,b as Ot,P as Dt}from"./popover-CelLmvH8.js";import{T as Re,a as Be,c as Oe}from"./tooltip-D9qNlq6S.js";import{T as dn,a as un}from"./toggle-group-JYZ1PCaE.js";import{g as et,j as fn,k as mn,L as hn,s as pn}from"./shell-layout-BHtZVBED.js";import{u as zt,a as tt,r as xn,b as Kt,c as gn,d as bn}from"./thread-route-D404Xl1w.js";import{a as st,b as Gt,v as vn,i as yn,d as jn,u as Sn,c as kn}from"./use-view-draft-kind-BtHf66Jj.js";import{c as Tn,C as Nn,e as _n,b as wn,a as Cn,f as Pn}from"./command-B0-oLV0k.js";import{i as Ut}from"./Zap-BsuEhLd3.js";import{g as In,S as Mn}from"./task-status-Bn4DeOrT.js";import{u as Ht}from"./use-main-panel-tabs-Bq834oWY.js";import{T as we}from"./tab-icon-glyph-MzzsG5oc.js";import{a as An}from"./UserSquare-DEjJtCDR.js";import{b as Ln,c as Vt,S as $n,d as En}from"./select-BNoZ1cwH.js";import{S as Fn}from"./use-sandbox-events-BtXLDGZr.js";import{L as Rn}from"./project-apps-ByyLejju.js";import{L as nt,a as Bn}from"./legacy-main-redirect-h5ds91_H.js";import{u as On}from"./use-mobile-B0YlxBUo.js";import{L as Dn}from"./preview-dialog-BTVSDgVC.js";import{O as zn}from"./markdown-BTKw4nl8.js";import{B as ut}from"./blocks-preview-workspace-context-0qX3i0Hw.js";import{p as Kn}from"./virtual-mcp-BKUZFB3-.js";import"./Tool01-BlUlKjGy.js";import"./ArrowUp-BdtMKnAz.js";import"./ArrowLeft-DR_MRxUB.js";import"./LinkBroken01-4l2zZef9.js";import"./BookOpen01-DejCO54_.js";import"./Globe04-BZJYx7x5.js";import"./ChevronSelectorVertical-BJDM_s_Z.js";import"./CreditCard01-BKZ9QJb-.js";import"./SwitchHorizontal01-Cp1oX99F.js";import"./Key01-CC_tghZO.js";import"./Minus-Bj5yI5D8.js";import"./Monitor01-DeK03po-.js";import"./Sun-Ba2OXmDv.js";import"./Play-kYcUI1An.js";import"./Plus-DEeR8qC2.js";import"./SearchMd-DVpGBR2l.js";import"./ShoppingBag01-BV5nZGeU.js";import"./Trash01-CgZrkZ3U.js";import"./Upload01-DDoiK0tv.js";import"./Users01-DVMhWmct.js";import"./sheet-1BLiVjE3.js";import"./tool-namespace-BBpCD9sF.js";import"./drawer-CfOCKnhq.js";import"./collection-search-CKJ8zcS9.js";import"./use-mcp-client-CaYmuD4l.js";import"./auth-Br21RAsk.js";import"./use-mcp-prompts-lHtFGIni.js";import"./usage-stats-CK4hgSt6.js";import"./form-BZ7xdssd.js";import"./label-DSlWCd9e.js";import"./utils-CVEq3hMx.js";import"./use-copy-PziytufC.js";import"./index-DF1Gszum.js";import"./checkbox-Dn6r2X61.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./feature-paywall-AtUr_EOu.js";import"./plan-ladder-xVKcSuhD.js";import"./use-decopilot-events-B84nN_Z6.js";import"./watch-sse-pool-B39Ow5tK.js";import"./task-board-CdhOR9bl.js";import"./schema-BtzAS_P2.js";import"./backoff-CrEUbyZT.js";import"./collapsible-waKUBV3F.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BT9_tzyT.js";import"./types-BfPC7vnd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-CFmR-X06.js";import"./file-type-icon-3Zm8W435.js";import"./icon-button-BfibpDoO.js";import"./chat-draft-BnT_bTVf.js";import"./tabs-DXm_rA9S.js";import"./active-indicator-CCMhAsc_.js";import"./input-C1HwcZTs.js";import"./suggestion-BdOz28RC.js";import"./use-org-fs-Cv09aZqm.js";import"./useInfiniteQuery-CN2uIy97.js";import"./infiniteQueryObserver-BFZQsptZ.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-C86xZwTt.js";import"./extract-connection-data-CFxfI9gN.js";import"./metadata-D72DunRR.js";import"./connection-CwOP2DkA.js";import"./url-slug-Bts08KOo.js";import"./connection-card-DxEnheWw.js";import"./connection-slug-CqKJM07D.js";import"./textarea-CRgCAK3p.js";import"./schema-DIJe3qA1.js";import"./connection-form-helpers-DsiTws_r.js";import"./authenticate-and-persist-oauth-CTJV9ez5.js";import"./mcp-oauth-BQRDLkqA.js";import"./mcp-oauth-1Tp9szFm.js";import"./collection-tabs-DL3FYMaD.js";import"./badge-C2zO_tAX.js";import"./use-infinite-scroll-BBVWbqWO.js";import"./useSuspenseInfiniteQuery-ECHIzp7d.js";import"./use-task-board-events-U_kvLTo1.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./serial-task-queue-CGOeQgpr.js";import"./resizable-DrLaW_Jl.js";import"./use-project-scope-Dzg0nsjs.js";import"./index-Ds3fsbcX.js";import"./use-deployment-admin-D8TSoW7b.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-TEwy-duh.js";import"./use-debounced-value-DJ5YZsat.js";import"./new-project-dialog-C3JFSI1q.js";import"./repository-picker-DO5Hy-o-.js";import"./github-icon-DH5Sm3NR.js";import"./legacy-admin-welcome-dialog-DWeHIzCA.js";import"./required-auth-layout-DoMwdVaZ.js";import"./use-org-sso-CBrdU305.js";import"./index-CmzG_GaM.js";import"./use-mcp-tools-COoBOTb8.js";import"./resolve-tab-icon-CfRdrLF-.js";import"./use-task-metadata-DdKhuIQ3.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-D5R7YysD.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-8VTVKs7P.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-Di9jV9fD.js";import"./file-share-button-D9sAYI1R.js";import"./file-preview-PSKf9fIz.js";import"./utils-DONok1LX.js";import"./editor-COFIs9XE.js";function Gn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Un(){const t=$.c(26),e=As(),s=$e(),r=Ct(),i=Ls("chat_harness_codex"),{org:a}=re(),{data:l}=pe.useSession(),c=l?.user.id??"",u=Pe(),o=e.some(Vn);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!o;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const y=me(h);let b;t[9]!==a.id?(b=fe.githubCopilot(a.id),t[9]=a.id,t[10]=b):b=t[10];let j;t[11]!==u?(j=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=j):j=t[12];const x=r&&!i&&!o;let v;t[13]!==b||t[14]!==j||t[15]!==x?(v={queryKey:b,queryFn:j,enabled:x},t[13]=b,t[14]=j,t[15]=x,t[16]=v):v=t[16];const S=me(v);let g;t[17]!==a.id||t[18]!==c?(g=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=g):g=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const T=r&&i;let k;t[22]!==T||t[23]!==g||t[24]!==p?(k={queryKey:g,queryFn:p,enabled:T},t[22]=T,t[23]=g,t[24]=p,t[25]=k):k=t[25];const N=me(k);return r&&i&&!s?.isThreadLocked?e.some(Hn)||N.data?.connected!==!1?null:"codex-provider":Gn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:o||y.data?.connected!==!1||S.data?.connected!==!1||!!S.data?.orgShare})}function Hn(t){return Tt(t.providerId)}function Vn(t){return wt(t.providerId)}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Ke(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function qn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Wn(t){const e=$.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Yn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Yn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Zn(t){const e=$.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=W(),l=s+r+i,c=l>0?s/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==o?(f=o>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=y):y=e[10];let b;e[11]!==a||e[12]!==c?(b=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=b):b=e[13];let j;e[14]!==b?(j=n.jsxs("div",{className:"flex items-center gap-1.5",children:[y,n.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[14]=b,e[15]=j):j=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let v;e[17]!==u||e[18]!==a?(v=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=v):v=e[19];let S;e[20]!==v?(S=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:v})]}),e[20]=v,e[21]=S):S=e[21];let g;e[22]!==o||e[23]!==i||e[24]!==a?(g=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=g):g=e[25];let p;e[26]!==S||e[27]!==g||e[28]!==j?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[j,S,g]}),e[26]=S,e[27]=g,e[28]=j,e[29]=p):p=e[29];let T;return e[30]!==p||e[31]!==h?(T=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=T):T=e[32],T}function Xn(t){const e=$.c(14),{agentId:s,isError:r}=t,i=Fe(s),a=W();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const c=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==c?(o=n.jsx(Mt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=o):o=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=ee("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==o||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[o,f]}),e[11]=o,e[12]=f,e[13]=h):h=e[13],h}function Qn(t){const e=$.c(12),{isError:s}=t,r=W();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=n.jsx(Mt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=ee("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let d;return e[9]!==l||e[10]!==o?(d=n.jsxs(n.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=d):d=e[11],d}function Jn(t){const e=$.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",l=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Qn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Xn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==c||e[6]!==u?(o=n.jsx(D.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=o):o=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==l||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Ie,{className:"size-3 text-muted-foreground"}):a?n.jsx(xs,{size:12,className:"text-destructive"}):l?n.jsx(Ye,{size:12,className:"text-warning"}):n.jsx(Es,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==o||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,d,m]}),e[14]=o,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function ea(t){const e=$.c(51),{onClose:s,back:r,className:i}=t,a=W(),[l,c]=D.useState(null),{messages:u}=Ze(),{activeTask:o}=Ee(),{selectedModel:d,selectedVirtualMcp:m}=_t(),f=Is(u),h=[...u].reverse().find(fa),y=h?.metadata?.usage,b=[...u].reverse().find(ua)?.metadata?.models?.thinking,j=h?.metadata?.modelLimits?.contextWindow??(!b||b.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=y?.contextTokens??0,v=j&&j>0?(x/j*100).toFixed(1):null,S=u;let g;e[0]!==S?(g=S.filter(da).reduce(ca,0),e[0]=S,e[1]=g):g=e[1];const p=g,T=u;let k;e[2]!==T?(k=T.filter(oa).reduce(la,0),e[2]=T,e[3]=k):k=e[3];const N=k,_=Math.max(0,f.totalTokens-p-N),C=u[0],w=u.at(-1),I=C?.metadata?.created_at??o?.created_at,P=w?.metadata?.created_at??o?.updated_at,A=u.filter(ia),L=u.flatMap(aa),F=qn(b?.id??d?.modelId),B=m?.title??"Super Agent",R=Rs(),M=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:A.length},{label:a("chat.contextPanel.agentLabel"),value:B},...R?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:j?ve(j):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?ve(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:v!==null?`${v}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?ve(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?ve(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?ve(f.reasoningTokens):"0"},...R?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Ke(I)},{label:a("chat.contextPanel.lastActivityLabel"),value:Ke(P)}];if(!o&&A.length===0){let U;e[4]!==i?(U=ee("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=U):U=e[5];let se;e[6]!==a?(se=a("chat.contextPanel.title"),e[6]=a,e[7]=se):se=e[7];let ie;e[8]!==se?(ie=n.jsx("span",{className:"text-sm font-medium text-foreground",children:se}),e[8]=se,e[9]=ie):ie=e[9];let X;e[10]!==r?(X=r?n.jsx(it,{size:14,className:"text-muted-foreground"}):n.jsx(lt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=X):X=e[11];let J;e[12]!==s||e[13]!==X?(J=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:X}),e[12]=s,e[13]=X,e[14]=J):J=e[14];let le;e[15]!==ie||e[16]!==J?(le=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ie,J]}),e[15]=ie,e[16]=J,e[17]=le):le=e[17];let ae;e[18]!==a?(ae=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ae):ae=e[19];let ne;e[20]!==ae?(ne=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ae})}),e[20]=ae,e[21]=ne):ne=e[21];let oe;return e[22]!==le||e[23]!==ne||e[24]!==U?(oe=n.jsxs("div",{className:U,children:[le,ne]}),e[22]=le,e[23]=ne,e[24]=U,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=ee("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let E;e[28]!==a?(E=a("chat.contextPanel.title"),e[28]=a,e[29]=E):E=e[29];let V;e[30]!==E?(V=n.jsx("span",{className:"text-sm font-medium text-foreground",children:E}),e[30]=E,e[31]=V):V=e[31];let O;e[32]!==r?(O=r?n.jsx(it,{className:"size-3.5"}):n.jsx(lt,{className:"size-3.5"}),e[32]=r,e[33]=O):O=e[33];let z;e[34]!==s||e[35]!==O?(z=n.jsx(We,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:O}),e[34]=s,e[35]=O,e[36]=z):z=e[36];let K;e[37]!==V||e[38]!==z?(K=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[V,z]}),e[37]=V,e[38]=z,e[39]=K):K=e[39];let H;e[40]!==a?(H=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=H):H=e[41];let Y;e[42]!==H?(Y=n.jsx("span",{className:"text-xs text-muted-foreground",children:H}),e[42]=H,e[43]=Y):Y=e[43];let Q;e[44]!==N||e[45]!==_||e[46]!==p?(Q=n.jsx(Zn,{userTokens:p,assistantTokens:N,otherTokens:_}),e[44]=N,e[45]=_,e[46]=p,e[47]=Q):Q=e[47];let te;return e[48]!==Y||e[49]!==Q?(te=n.jsxs("div",{className:"flex flex-col gap-3",children:[Y,Q]}),e[48]=Y,e[49]=Q,e[50]=te):te=e[50],n.jsxs("div",{className:G,children:[K,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[L.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:L.map(na)})]}),n.jsx(Wn,{items:M}),te,A.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:A.map(U=>{const se=U.metadata?.created_at,ie=l?.id===U.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(ie?null:U),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("shrink-0 font-medium",U.role==="user"?"text-chart-1":"text-chart-2"),children:U.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:U.id})]}),se&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Ke(se)})]}),ie&&n.jsxs(n.Fragment,{children:[U.role==="assistant"&&(()=>{const X=U.metadata?._request;if(!X)return null;const J=X.systemSections??[],le=Math.max(1,...J.map(sa)),ae=J.reduce(ta,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[X.activeTools??0," / ",X.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ae/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((ne,oe)=>{const xe=ne.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,ce=ne.chars/le*100,ge=Math.round(ne.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:xe}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ge.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ce}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(U,null,2)})]})]},U.id)})})]})]})]})}function ta(t,e){return t+e.chars}function sa(t){return t.chars}function na(t,e){return n.jsx(Jn,{part:t},e)}function aa(t){return(t.parts??[]).filter(ra)}function ra(t){return t.type==="tool-subtask"}function ia(t){return t.role!=="system"}function la(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function oa(t){return t.role==="assistant"}function ca(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function da(t){return t.role==="user"}function ua(t){return t.role==="assistant"&&t.metadata?.models}function fa(t){return t.role==="assistant"&&t.metadata?.usage}function ma(t){const e=$.c(21),{onOpenContextPanel:s}=t,{org:r}=re(),{selectedVirtualMcp:i}=_t();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,o=Fe(c.id)??c,d=o.title??"Super Agent",m=o.icon??null,f=o.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let y;e[5]!==d?(y=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=y):y=e[6];let b;e[7]!==f?(b=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=b):b=e[8];let j;e[9]!==y||e[10]!==b?(j=n.jsxs("div",{className:"space-y-1.5",children:[y,b]}),e[9]=y,e[10]=b,e[11]=j):j=e[11];let x;e[12]!==h||e[13]!==j?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,j]}),e[12]=h,e[13]=j,e[14]=x):x=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Z.IceBreakers,{className:"pb-3"}),e[15]=v):v=e[15];let S;e[16]!==s?(S=n.jsxs(Z.Footer,{children:[v,n.jsx(Z.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=S):S=e[17];let g;return e[18]!==x||e[19]!==S?(g=n.jsxs(n.Fragment,{children:[x,S]}),e[18]=x,e[19]=S,e[20]=g):g=e[20],g}function ft(t){const e=$.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==l?(c=ee(l),e[0]=l,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let d;e[3]!==o?(d=ee("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Xe,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(ha)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let y;return e[13]!==c||e[14]!==f||e[15]!==h?(y=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=y):y=e[16],y}function ha(t){return n.jsx(Bs,{file:t},t.key)}function pa(){const t=$.c(13),e=$e()?.taskId??null,s=Os();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Ds(e,r),[a,l]=D.useState(!1),[c,u]=D.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ga),t[2]=o):o=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ft,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(xa),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ft,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function xa(t){return!t}function ga(t){return!t}function ba(){const t=$.c(1);D.use(Ze().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ks,{children:n.jsx(va,{})}),t[0]=e):e=t[0],e}function va(){const t=$.c(29),{active:e}=Gs(),{org:s}=re(),r=$e(),{isChatEmpty:i}=Ze(),[a,l]=D.useState("chat"),c=zs(),u=W(),o=Un(),{runtime:d}=Nt(r?.virtualMcpId);if(o!==null&&d!=="cms"){let N;return t[0]!==o||t[1]!==u?(N=n.jsx(Z,{className:"animate-in fade-in-0 duration-200",children:n.jsx(Z.Main,{className:"flex flex-col items-center",children:n.jsx(Z.EmptyState,{children:o==="codex-provider"?n.jsx(Z.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:Tt}):o==="claude-code-provider"?n.jsx(Z.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:wt}):n.jsx(Z.NoAiProviderEmptyState,{})})})}),t[0]=o,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ps(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let y;t[10]!==h?(y=h&&n.jsx(Z.CreditsEmptyState,{}),t[10]=h,t[11]=y):y=t[11];let b;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(b=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ma,{onOpenContextPanel:()=>l("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(Z.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(pa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(Z.Messages,{})})]}),n.jsx(Z.Footer,{children:n.jsx(Z.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=b):b=t[16];let j;t[17]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Us,{}),t[17]=j):j=t[17];const x=a!=="context"?!0:void 0,v=a!=="context",S=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let g;t[18]!==S?(g=ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",S),t[18]=S,t[19]=g):g=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(ea,{back:!0,onClose:()=>l("chat")}),t[20]=p):p=t[20];let T;t[21]!==x||t[22]!==v||t[23]!==g?(T=n.jsx("div",{inert:x,"aria-hidden":v,className:g,children:p}),t[21]=x,t[22]=v,t[23]=g,t[24]=T):T=t[24];let k;return t[25]!==y||t[26]!==b||t[27]!==T?(k=n.jsxs(Z,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[y,b,j,T]}),t[25]=y,t[26]=b,t[27]=T,t[28]=k):k=t[28],k}function ya(){const t=$.c(7),e=W();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Me,{children:n.jsx(ba,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(vt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ja(t){const e=$.c(10),{org:s}=re(),r=qs(),{data:i}=pe.useSession(),a=i?.user?.id,l=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==l?(u=fe.viewedThreadMetadataRefresh(s.id,l??""),e[0]=s.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&c;let d;e[3]!==r||e[4]!==l?(d=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==o||e[8]!==d?(m={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=o,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=$.c(14),{label:s,value:r,onChange:i,options:a}=t;let l;e[0]!==s?(l=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(Sa),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(o=n.jsx(un,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=o):o=e[10];let d;return e[11]!==l||e[12]!==o?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=d):d=e[13],d}function Sa(t){return n.jsxs(dn,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function ka(t){const e=$.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=W();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(gs,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==s.filtersActive||e[7]!==l||e[8]!==u?(o=n.jsx(Re,{asChild:!0,children:n.jsx(Bt,{asChild:!0,children:n.jsxs(_e,{"aria-label":l,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Be,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==o||e[15]!==m?(f=n.jsxs(Oe,{children:[o,m]}),e[14]=o,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const y=s.groupBy;let b;e[19]!==s?(b=U=>{he("tasks_panel_group_by_changed",{to_value:U}),s.setGroupBy(U)},e[19]=s,e[20]=b):b=e[20];let j;e[21]!==a?(j=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=j):j=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(bs,{size:13}),e[23]=x):x=e[23];let v;e[24]!==j?(v={value:"flat",label:j,icon:x},e[24]=j,e[25]=v):v=e[25];let S;e[26]!==a?(S=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=S):S=e[27];let g;e[28]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(vs,{size:13}),e[28]=g):g=e[28];let p;e[29]!==S?(p={value:"status",label:S,icon:g},e[29]=S,e[30]=p):p=e[30];let T;e[31]!==v||e[32]!==p?(T=[v,p],e[31]=v,e[32]=p,e[33]=T):T=e[33];let k;e[34]!==s.groupBy||e[35]!==b||e[36]!==T||e[37]!==h?(k=n.jsx(Ge,{label:h,value:y,onChange:b,options:T}),e[34]=s.groupBy,e[35]=b,e[36]=T,e[37]=h,e[38]=k):k=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=s.typeFilter;let C;e[41]!==s?(C=U=>{he("tasks_panel_filter_changed",{to_value:U}),s.setTypeFilter(U)},e[41]=s,e[42]=C):C=e[42];let w;e[43]!==a?(w=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=w):w=e[44];let I;e[45]!==w?(I={value:"all",label:w},e[45]=w,e[46]=I):I=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let A;e[49]!==P?(A={value:"manual",label:P},e[49]=P,e[50]=A):A=e[50];let L;e[51]!==a?(L=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=L):L=e[52];let F;e[53]!==L?(F={value:"automation",label:L},e[53]=L,e[54]=F):F=e[54];let B;e[55]!==I||e[56]!==A||e[57]!==F?(B=[I,A,F],e[55]=I,e[56]=A,e[57]=F,e[58]=B):B=e[58];let R;e[59]!==s.typeFilter||e[60]!==N||e[61]!==C||e[62]!==B?(R=n.jsx(Ge,{label:N,value:_,onChange:C,options:B}),e[59]=s.typeFilter,e[60]=N,e[61]=C,e[62]=B,e[63]=R):R=e[63];let M;e[64]!==a?(M=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=M):M=e[65];const G=s.showAll?"team":"mine";let E;e[66]!==s?(E=U=>s.setShowAll(U==="team"),e[66]=s,e[67]=E):E=e[67];let V;e[68]!==a?(V=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=V):V=e[69];let O;e[70]!==V?(O={value:"mine",label:V},e[70]=V,e[71]=O):O=e[71];let z;e[72]!==a?(z=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=z):z=e[73];let K;e[74]!==z?(K={value:"team",label:z},e[74]=z,e[75]=K):K=e[75];let H;e[76]!==O||e[77]!==K?(H=[O,K],e[76]=O,e[77]=K,e[78]=H):H=e[78];let Y;e[79]!==M||e[80]!==G||e[81]!==E||e[82]!==H?(Y=n.jsx(Ge,{label:M,value:G,onChange:E,options:H}),e[79]=M,e[80]=G,e[81]=E,e[82]=H,e[83]=Y):Y=e[83];let Q;e[84]!==k||e[85]!==R||e[86]!==Y?(Q=n.jsxs(Ot,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[k,R,Y]}),e[84]=k,e[85]=R,e[86]=Y,e[87]=Q):Q=e[87];let te;return e[88]!==Q||e[89]!==f?(te=n.jsxs(Dt,{children:[f,Q]}),e[88]=Q,e[89]=f,e[90]=te):te=e[90],te}function Ta(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||tn(s))}function Na(){const t=$.c(2),e=Fs()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?At(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function _a(t){const e=$.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=W();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(wa,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&n.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ut,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==c||e[7]!==u?(o=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=o):o=e[8],o}function wa(t){const e=$.c(6),{virtualMcpId:s,size:r}=t,i=Pt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const mt=["thread"];function Ca(t){const e=$.c(53),{open:s,onOpenChange:r}=t,[i,a]=D.useState(""),{org:l}=re(),{setTaskId:c}=et(),u=Pe(),o=W();let d,m,f,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(l.id,h,d,mt),e[0]=l.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let y;e[6]!==d||e[7]!==u||e[8]!==h?(y=async()=>{const M=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...mt]});return{...M,items:M.items.filter(Pa)}},e[6]=d,e[7]=u,e[8]=h,e[9]=y):y=e[9];let b;e[10]!==s||e[11]!==m||e[12]!==y?(b={queryKey:m,enabled:s,queryFn:y,staleTime:1e4},e[10]=s,e[11]=m,e[12]=y,e[13]=b):b=e[13];const{data:j,isFetching:x}=f(b);let v;e[14]!==j?.items?(v=j?.items??[],e[14]=j?.items,e[15]=v):v=e[15];const S=v;let g;e[16]!==r?(g=M=>{M||a(""),r(M)},e[16]=r,e[17]=g):g=e[17];const p=g;let T;e[18]!==p||e[19]!==c?(T=M=>{p(!1),c(M.id,M.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=T):T=e[20];const k=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let _;e[23]!==N?(_=n.jsx(Jt,{children:N}),e[23]=N,e[24]=_):_=e[24];let C;e[25]!==o?(C=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==C?(w=n.jsx(es,{children:C}),e[27]=C,e[28]=w):w=e[28];let I;e[29]!==w||e[30]!==_?(I=n.jsxs(ts,{className:"sr-only",children:[_,w]}),e[29]=w,e[30]=_,e[31]=I):I=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let A;e[34]!==i||e[35]!==P?(A=n.jsx(Cn,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=A):A=e[36];let L;e[37]!==k||e[38]!==x||e[39]!==S||e[40]!==o||e[41]!==h?(L=n.jsx(Tn,{children:x&&S.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):S.length===0?n.jsx(Nn,{children:o("tasksPanel.globalSearchDialog.noResults")}):n.jsx(_n,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:S.map(M=>M.type==="thread"?n.jsxs(wn,{value:`thread:${M.id}:${M.title}`,onSelect:()=>k(M),className:"gap-2.5",children:[n.jsx(_a,{virtualMcpId:M.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:M.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(M.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${M.id}`):null)})}),e[37]=k,e[38]=x,e[39]=S,e[40]=o,e[41]=h,e[42]=L):L=e[42];let F;e[43]!==A||e[44]!==L?(F=n.jsxs(Pn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,L]}),e[43]=A,e[44]=L,e[45]=F):F=e[45];let B;e[46]!==I||e[47]!==F?(B=n.jsxs(ss,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,F]}),e[46]=I,e[47]=F,e[48]=B):B=e[48];let R;return e[49]!==p||e[50]!==s||e[51]!==B?(R=n.jsx(ns,{open:s,onOpenChange:p,children:B}),e[49]=p,e[50]=s,e[51]=B,e[52]=R):R=e[52],R}function Pa(t){return t.type==="thread"}function Ia(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function Ma(t){return t==="ephemeral"||t.startsWith("thread:")}function qt(t){const e=$.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:c,hideStatusIdle:u,indented:o}=t,d=W(),m=In(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",y=Pt(h?void 0:s.virtual_mcp_id);let b;e[0]!==y?(b=It(y),e[0]=y,e[1]=b):b=e[1];const j=b;fn(6e4);const x=l||!!s.trigger_id,v=s.id,S="button",g=0;let p;e[2]!==i?(p=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const T=o?"-ml-4 pl-6":"pl-[9px]",k=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==T||e[5]!==k?(N=ee("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",k),e[4]=T,e[5]=k,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==y?.icon||e[10]!==y?.title?(_=c&&!h&&n.jsx(ye,{icon:y?.icon??null,name:y?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=y?.icon,e[10]=y?.title,e[11]=_):_=e[11];let C;e[12]!==x||e[13]!==d?(C=x&&n.jsx(Ut,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=C):C=e[14];let w;e[15]!==d||e[16]!==s.title?(w=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=w):w=e[17];let I;e[18]!==w?(I=n.jsx("div",{className:"text-sm text-foreground truncate",children:w}),e[18]=w,e[19]=I):I=e[19];let P;e[20]!==C||e[21]!==I?(P=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[C,I]}),e[20]=C,e[21]=I,e[22]=P):P=e[22];let A;e[23]!==r||e[24]!==j||e[25]!==s.branch||e[26]!==s.updated_at?(A=s.updated_at&&n.jsxs("div",{className:ee("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Ma(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):j?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[j.owner,"/",j.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:as(new Date(s.updated_at))})]}),e[23]=r,e[24]=j,e[25]=s.branch,e[26]=s.updated_at,e[27]=A):A=e[27];let L;e[28]!==P||e[29]!==A?(L=n.jsxs("div",{className:"flex-1 min-w-0",children:[P,A]}),e[28]=P,e[29]=A,e[30]=L):L=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",B=!u&&n.jsx("span",{className:ee("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(Ie,{className:ee("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let R;e[31]!==a||e[32]!==d?(R=a&&n.jsxs(Oe,{children:[n.jsx(Re,{asChild:!0,children:n.jsx(We,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:E=>{E.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(rs,{className:"size-3.5"})})}),n.jsx(Be,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=R):R=e[33];let M;e[34]!==B||e[35]!==R?(M=n.jsxs("div",{className:F,children:[B,R]}),e[34]=B,e[35]=R,e[36]=M):M=e[36];let G;return e[37]!==i||e[38]!==L||e[39]!==M||e[40]!==p||e[41]!==N||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":v,role:S,tabIndex:g,onClick:i,onKeyDown:p,className:N,children:[_,L,M]}),e[37]=i,e[38]=L,e[39]=M,e[40]=p,e[41]=N,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const ht=["requires_action","in_progress","failed","expired","completed"];function Aa(t){const e=new Map(ht.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return ht.map(s=>({status:s,threads:e.get(s)}))}const La="sidebar.group.expanded.";function $a(t,e){const s=$.c(3),[r,i]=yt(`${La}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Wt(t){const e=$.c(18),{onClick:s,isFetching:r,indented:i}=t,a=W();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=ee("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&n.jsx(Ie,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":l,onClick:s,disabled:r,className:u,children:[o,m]}),e[11]=r,e[12]=s,e[13]=l,e[14]=u,e[15]=o,e[16]=m,e[17]=f):f=e[17],f}function Ea(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Fa(t){return t.member==="mine"&&!t.currentUserId}const Yt=4;let Ne=0;const Ve=[];function Ra(){for(;Ne<Yt&&Ve.length>0;){const t=Ve.shift();t&&t()}}function Zt(t){return new Promise((e,s)=>{const r=()=>{Ne++,t().then(e,s).finally(()=>{Ne--,Ra()})};Ne<Yt?r():Ve.push(r)})}const De=10;function pt(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ba(t,e,s,r){let i=0;for(const a of t)Xt(a,e,s,r)&&i++;return i}function Ue(t,e,s,r){return Ba(t,e,s,r)}function Oa(t,e){return!!(t>=De||t===0&&e)}function xt(t,e){return t<e}function Da(t,e){return e===!1?!1:e===!0?!0:t}function Xt(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ce=new Map,Te=new Map;function za(t,e){return e?t>=De?!0:null:!1}function gt(t){return Ce.get(t)}function Ka(t,e){Ce.set(t,e)}function Ga(t,e,s){const r=Ce.get(t);if(r!==void 0){s(r);return}let i=Te.get(t);i||(i=Zt(e).then(a=>(Ce.set(t,a),Te.delete(t),a)).catch(()=>(Te.delete(t),Promise.reject(new Error("group probe failed")))),Te.set(t,i)),i.then(s,()=>s(!1))}function bt(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===De,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ua(t,e,s,r,i){let a=0;for(const l of t)e.has(l.id)||Xt(l,s,r,i)&&a++;return a}function Ha(t,e,s,r){const i=$.c(8),{org:a}=re(),l=Ea(a.id,t,e,s);let c;i[0]!==s?(c=Fa(s),i[0]=s,i[1]=c):c=i[1];const u=c,[o,d]=D.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=Qe(),{threads:f,hasMore:h}=Je(),y=Ue(f,t,e,s),b=Oa(y,h),j=za(y,h),x=Pe();if(o.identity===l&&o.serverHasMore===null){const k=j??gt(l);k!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:k})}!u&&o.identity===l&&o.serverHasMore===null&&j===null&>(l)===void 0&&o.probeSubscribedIdentity!==l&&(d(k=>k.identity===l?{...k,isProbing:!0,probeSubscribedIdentity:l}:k),Ga(l,async()=>{const k=pt(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",k),{totalCount:_}=bt(N),C=Ue(m.threads.get(),t,e,s);return _===void 0?!1:xt(C,_)},k=>{d(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:k})}));const S=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;d(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Ue(f,t,e,s),C=pt(t,e,_,s,De),w=await Zt(()=>x.call("COLLECTION_THREADS_LIST",C)),{items:I,hasMore:P,totalCount:A}=bt(w),L=new Set(f.map(Va)),F=Ua(I,L,t,e,s),B=_;m.mergeThreads(I),d(R=>{if(R.identity!==N)return R;let M;return A!==void 0?M=xt(B+F,A):M=I.length===0||F===0?!1:P,Ka(N,M),{...R,isFetching:!1,serverHasMore:M}})}catch(_){const C=_,w=C instanceof Error?C.message:String(C);is.error(`Could not load more tasks: ${w}`),d(I=>I.identity===N?{...I,isFetching:!1}:I)}},g=o.isFetching||o.isProbing,p=!u&&!g&&Da(b,o.serverHasMore);let T;return i[2]!==g||i[3]!==S||i[4]!==p||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:p,isFetching:g,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:S},i[2]=g,i[3]=S,i[4]=p,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function Va(t){return t.id}function qa(t){const e=$.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,{isFetching:o,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=Ha("status",s,u),[y,b]=D.useState(!1);!y&&r.length===0&&h===!0&&!o&&!d&&(b(!0),queueMicrotask(()=>{m()}));let j;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let S;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==l||e[11]!==a?(S=g=>n.jsx(qt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:c&&g.created_by===u.currentUserId?()=>l(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},g.id),e[7]=i,e[8]=c,e[9]=u,e[10]=l,e[11]=a,e[12]=S):S=e[12],j=r.map(S),e[0]=i,e[1]=c,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=j}else j=e[6];let x;e[13]!==f||e[14]!==o||e[15]!==m?(x=(f||o)&&n.jsx(Wt,{onClick:()=>{m()},isFetching:o,indented:!0}),e[13]=f,e[14]=o,e[15]=m,e[16]=x):x=e[16];let v;return e[17]!==j||e[18]!==x?(v=n.jsxs(n.Fragment,{children:[j,x]}),e[17]=j,e[18]=x,e[19]=v):v=e[19],v}function Wa(t){const e=$.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,o=W(),d=Mn[s],m=d.icon,[f,h]=$a(`status-${s}`,!1);let y;e[0]!==f||e[1]!==h?(y=function(){h(!f)},e[0]=f,e[1]=h,e[2]=y):y=e[2];const b=y;let j;e[3]!==d.labelKey||e[4]!==o?(j=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(d.labelKey)}),e[3]=d.labelKey,e[4]=o,e[5]=j):j=e[5];let x;e[6]!==b?(x=w=>{w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),b())},e[6]=b,e[7]=x):x=e[7];let v;e[8]!==m||e[9]!==d.iconClassName?(v=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=v):v=e[10];let S;e[11]!==f?(S=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Xe,{size:14}):n.jsx(ls,{size:14})}),e[11]=f,e[12]=S):S=e[12];let g;e[13]!==v||e[14]!==S?(g=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[v,S]}),e[13]=v,e[14]=S,e[15]=g):g=e[15];let p;e[16]!==d.labelKey||e[17]!==o?(p=o(d.labelKey),e[16]=d.labelKey,e[17]=o,e[18]=p):p=e[18];let T;e[19]!==p?(T=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=T):T=e[20];let k;e[21]!==r.length?(k=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=k):k=e[22];let N;e[23]!==f||e[24]!==b||e[25]!==j||e[26]!==x||e[27]!==g||e[28]!==T||e[29]!==k?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":j,onClick:b,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[g,T,k]}),e[23]=f,e[24]=b,e[25]=j,e[26]=x,e[27]=g,e[28]=T,e[29]=k,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(qa,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=l,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let C;return e[40]!==N||e[41]!==_?(C=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=C):C=e[42],C}function Ya(t){const e=$.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:c,hasMore:u,isFetchingMore:o,onLoadMore:d,filtersActive:m}=t,f=W();if(s.length===0&&!u&&!o){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ys,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let v;e[1]!==m||e[2]!==f?(v=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=v):v=e[3];let S;return e[4]!==v?(S=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:v})]}),e[4]=v,e[5]=S):S=e[5],S}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==l||e[10]!==a||e[11]!==s){let S;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==l||e[17]!==a?(S=g=>n.jsx(Wa,{status:g.status,threads:g.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:c},g.status),e[13]=i,e[14]=h,e[15]=c,e[16]=l,e[17]=a,e[18]=S):S=e[18],x=Aa(s).map(S),e[6]=i,e[7]=h,e[8]=c,e[9]=l,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let v;return e[19]!==x?(v=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=v):v=e[20],v}let y;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==l||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==l||e[32]!==a?(x=v=>n.jsx(qt,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:h&&v.created_by===c.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0},v.id),e[28]=i,e[29]=h,e[30]=c,e[31]=l,e[32]=a,e[33]=x):x=e[33],y=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=l,e[25]=a,e[26]=s,e[27]=y}else y=e[27];let b;e[34]!==u||e[35]!==o||e[36]!==d?(b=(u||o)&&n.jsx(Wt,{onClick:d,isFetching:o}),e[34]=u,e[35]=o,e[36]=d,e[37]=b):b=e[37];let j;return e[38]!==y||e[39]!==b?(j=n.jsxs(n.Fragment,{children:[y,b]}),e[38]=y,e[39]=b,e[40]=j):j=e[40],j}function Za(t){const e=$.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ya,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Xa(t){const e=$.c(68);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:l}=re();let c;e[2]!==l.id?(c=je(l.id),e[2]=l.id,e[3]=c):c=e[3];const u=c.id,o=Na(),d=Ct(),m=st(),{threads:f,hasMore:h,isFetchingMore:y,fetchNextPage:b}=Je(),j=f.filter(tr),{hide:x,setScope:v}=Lt(),S=Ae(),{setTaskId:g,createNewTask:p}=et(),T=zt(),k=tt();let N;e[4]!==k||e[5]!==f||e[6]!==T?(N=xn({routeAgentId:T,threadVirtualMcpId:f.find(q=>q.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=f,e[6]=T,e[7]=N):N=e[7];const _=N;let C;e[8]!==r?(C=()=>{r?.()},e[8]=r,e[9]=C):C=e[9];const w=C,I=[...j].sort(er),[P,A]=D.useState("all"),[L,F]=D.useState("flat"),[B,R]=yt("sidebar-threads-scope-all",!1),[M,G]=D.useState(!1),[E,V]=D.useState(!1);let O;e[10]!==G?(O=()=>{he("tasks_panel_search_opened"),V(!0),G(!0)},e[10]=G,e[11]=O):O=e[11];const z=O,K=a??null;let H;e[12]!==K||e[13]!==P?(H={type:P,member:"mine",currentUserId:K},e[12]=K,e[13]=P,e[14]=H):H=e[14];const Y=H,Q={};B||(Q.created_by="me"),v(Q);let te;e[15]!==a?(te=q=>a?q.filter(de=>de.created_by===a):[],e[15]=a,e[16]=te):te=e[16];const U=te;let se;e[17]!==P?(se=q=>P==="automation"?q.filter(Ja):P==="manual"?q.filter(Qa):q,e[17]=P,e[18]=se):se=e[18];const ie=se,X=Ta(ie(B?I:U(I)),k);let J;e[19]!==k||e[20]!==w||e[21]!==a||e[22]!==x||e[23]!==S||e[24]!==l.slug||e[25]!==g||e[26]!==X?(J=q=>{if(a&&q.created_by&&q.created_by!==a)return;const de=q.id===k;if(x(q.id),mn(q.id),!de)return;const be=Ia(X,q.id,a);w(),be?g(be.id,be.virtual_mcp_id):S({to:"/$org",params:{org:l.slug}})},e[19]=k,e[20]=w,e[21]=a,e[22]=x,e[23]=S,e[24]=l.slug,e[25]=g,e[26]=X,e[27]=J):J=e[27];const le=J;let ae;e[28]!==w||e[29]!==g?(ae=q=>{w(),g(q.id,q.virtual_mcp_id)},e[28]=w,e[29]=g,e[30]=ae):ae=e[30];const ne=ae;let oe;e[31]!==_||e[32]!==k||e[33]!==f||e[34]!==w||e[35]!==p||e[36]!==a||e[37]!==u||e[38]!==m||e[39]!==o||e[40]!==d||e[41]!==g?(oe=()=>{const q=_??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:q}),w();const de=Ys(f,q,a,o(q),{blogDrafts:m==="blog"});if(de){g(de.id,de.virtual_mcp_id,{newThread:!0});return}const be=d?null:f.find(Qt=>Qt.id===k)?.branch??null;p(q,be)},e[31]=_,e[32]=k,e[33]=f,e[34]=w,e[35]=p,e[36]=a,e[37]=u,e[38]=m,e[39]=o,e[40]=d,e[41]=g,e[42]=oe):oe=e[42];const xe=oe;let ce;e[43]!==b?(ce=()=>{b()},e[43]=b,e[44]=ce):ce=e[44];const ge=L!=="flat"||P!=="all"||B;let ue;e[45]!==E||e[46]!==M||e[47]!==G?(ue=E?n.jsx(Ca,{open:M,onOpenChange:G}):null,e[45]=E,e[46]=M,e[47]=G,e[48]=ue):ue=e[48];let ke;return e[49]!==k||e[50]!==le||e[51]!==Y||e[52]!==L||e[53]!==h||e[54]!==y||e[55]!==xe||e[56]!==z||e[57]!==ne||e[58]!==F||e[59]!==R||e[60]!==A||e[61]!==B||e[62]!==ce||e[63]!==ge||e[64]!==ue||e[65]!==P||e[66]!==X?(ke={threads:X,activeTaskId:k,filters:Y,hasMore:h,isFetchingMore:y,loadMore:ce,groupBy:L,setGroupBy:F,typeFilter:P,setTypeFilter:A,showAll:B,setShowAll:R,filtersActive:ge,selectTask:ne,archiveTask:le,newThread:xe,openSearch:z,searchDialog:ue},e[49]=k,e[50]=le,e[51]=Y,e[52]=L,e[53]=h,e[54]=y,e[55]=xe,e[56]=z,e[57]=ne,e[58]=F,e[59]=R,e[60]=A,e[61]=B,e[62]=ce,e[63]=ge,e[64]=ue,e[65]=P,e[66]=X,e[67]=ke):ke=e[67],ke}function Qa(t){return!t.trigger_id}function Ja(t){return!!t.trigger_id}function er(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function tr(t){return!t.hidden}function sr(){const t=$.c(59),e=W(),[s,r]=D.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Xa(i),l=$e()?.activeTask;let c;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=l?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const d=o;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=ee("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let y;t[12]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(js,{size:16,className:"shrink-0"}),t[12]=y):y=t[12];let b;t[13]!==u?(b=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=b):b=t[14];let j;t[15]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Xe,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=j):j=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==b?(x=n.jsx(Re,{asChild:!0,children:n.jsx(Bt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[y,b,j]})})}),t[16]=m,t[17]=h,t[18]=b,t[19]=x):x=t[19];let v;t[20]!==e?(v=e("chat.threadsMenu.chats"),t[20]=e,t[21]=v):v=t[21];let S;t[22]!==v?(S=n.jsx(Be,{side:"bottom",children:v}),t[22]=v,t[23]=S):S=t[23];let g;t[24]!==S||t[25]!==x?(g=n.jsxs(Oe,{children:[x,S]}),t[24]=S,t[25]=x,t[26]=g):g=t[26];let p;t[27]!==a?(p=n.jsx(ka,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let k;t[31]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Ss,{size:16}),t[31]=k):k=t[31];let N;t[32]!==d||t[33]!==T?(N=n.jsx(_e,{"aria-label":T,onClick:d,className:"size-8",children:k}),t[32]=d,t[33]=T,t[34]=N):N=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let C;t[37]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(kt,{size:16}),t[37]=C):C=t[37];let w;t[38]!==a.newThread||t[39]!==_?(w=n.jsx(_e,{"aria-label":_,onClick:a.newThread,className:"size-8",children:C}),t[38]=a.newThread,t[39]=_,t[40]=w):w=t[40];let I;t[41]!==N||t[42]!==w?(I=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,w]}),t[41]=N,t[42]=w,t[43]=I):I=t[43];let P;t[44]!==p||t[45]!==I?(P=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,I]}),t[44]=p,t[45]=I,t[46]=P):P=t[46];let A;t[47]!==a?(A=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Za,{panel:a})}),t[47]=a,t[48]=A):A=t[48];let L;t[49]!==P||t[50]!==A?(L=n.jsxs(Ot,{align:"start",side:"bottom",onOpenAutoFocus:nr,className:"flex w-80 flex-col gap-2 p-2",children:[P,A]}),t[49]=P,t[50]=A,t[51]=L):L=t[51];let F;t[52]!==s||t[53]!==g||t[54]!==L?(F=n.jsxs(Dt,{open:s,onOpenChange:r,children:[g,L]}),t[52]=s,t[53]=g,t[54]=L,t[55]=F):F=t[55];let B;return t[56]!==a.searchDialog||t[57]!==F?(B=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=B):B=t[58],B}function nr(t){return t.preventDefault()}function ar(){const t=$.c(20),e=W(),{threads:s}=Je(),{createNewTask:r}=et(),i=Kt(),a=tt();let l;t[0]!==a||t[1]!==s?(l=s.find(j=>j.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=l):l=t[2];const c=l;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const o=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(kt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==o||t[11]!==d?(f=n.jsx(Re,{asChild:!0,children:n.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=o,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let y;t[15]!==h?(y=n.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=y):y=t[16];let b;return t[17]!==f||t[18]!==y?(b=n.jsxs(Oe,{children:[f,y]}),t[17]=f,t[18]=y,t[19]=b):b=t[19],b}function rr(t){const e=$.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Gt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:l,activeTab:c,mainOpen:u}=Ht(a);if(l.length===0)return null;let o;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?os({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(at.Tab,{active:h,title:f.title,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(we,{icon:f.icon})}),n.jsx("span",{className:"md:@max-[40rem]/panel-toolbar:sr-only",children:f.title})]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],o=l.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=s,e[8]=o}else o=e[8];let d;return e[14]!==o?(d=n.jsx(at.Tabs,{"data-tour":hn.surfaceTabs,children:o}),e[14]=o,e[15]=d):d=e[15],d}function ir(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const He="__mobile-main-panel-tab-select__",qe="main";function lr({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const or={kind:"component",Component:ks},cr={kind:"component",Component:Ts},dr={kind:"component",Component:Ns},ur={kind:"component",Component:An};function fr({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:or},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:qe,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:ur}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:cr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:dr}]:[]]}function mr(t){const e=$.c(53),{virtualMcpId:s,taskId:r}=t,i=W(),a=Ae(),{openPanel:l}=Gt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let o;e[1]!==r||e[2]!==s?(o={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=o):o=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Ht(o),{org:h}=re(),y=$s();let b;e[4]!==h.id?(b=rt(h.id),e[4]=h.id,e[5]=b):b=e[5];const j=s===b;let x,v,S,g,p,T,k,N,_,C;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==j||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==y||e[15]!==i||e[16]!==d||e[17]!==s){g=Symbol.for("react.early_return_sentinel");e:{const P=fr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),A=f?P.find(O=>O.value===m)?.value??qe:"chat",L=P.find(O=>O.value===A),F=L?.title??lr({tabs:d,activeTab:m,mainOpen:f,t:i});let B;e[28]!==a?(B=O=>{a({to:".",search:z=>({...z,...sn(O)}),replace:!0})},e[28]=a,e[29]=B):B=e[29];const R=B;let M;e[30]!==j||e[31]!==l||e[32]!==h.id||e[33]!==y||e[34]!==R||e[35]!==s?(M=O=>{if(O!==He){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),pn({reportsOnly:y,onReportAgent:j,tabId:O})){l(O,{virtualmcpid:rt(h.id),search:xr});return}if(O==="chat"||O===qe){R(O==="chat"?"chat":"main");return}l(O,{search:pr})}},e[30]=j,e[31]=l,e[32]=h.id,e[33]=y,e[34]=R,e[35]=s,e[36]=M):M=e[36];const G=M,E=P.find(O=>O.value!==A);if(P.length===2&&E){g=n.jsxs("button",{type:"button",onClick:()=>G(E.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:E.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:E.title})]});break e}v=$n,_=He,C=G;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],S=n.jsx(Ln,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[L&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:L.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=En,p="end",T="w-56",e[39]!==F?(k=n.jsx(Vt,{value:He,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=k):k=e[40],N=P.map(hr)}e[6]=m,e[7]=f,e[8]=a,e[9]=j,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=y,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=v,e[20]=S,e[21]=g,e[22]=p,e[23]=T,e[24]=k,e[25]=N,e[26]=_,e[27]=C}else x=e[18],v=e[19],S=e[20],g=e[21],p=e[22],T=e[23],k=e[24],N=e[25],_=e[26],C=e[27];if(g!==Symbol.for("react.early_return_sentinel"))return g;let w;e[41]!==x||e[42]!==p||e[43]!==T||e[44]!==k||e[45]!==N?(w=n.jsxs(x,{align:p,className:T,children:[k,N]}),e[41]=x,e[42]=p,e[43]=T,e[44]=k,e[45]=N,e[46]=w):w=e[46];let I;return e[47]!==v||e[48]!==S||e[49]!==w||e[50]!==_||e[51]!==C?(I=n.jsxs(v,{value:_,onValueChange:C,children:[S,w]}),e[47]=v,e[48]=S,e[49]=w,e[50]=_,e[51]=C,e[52]=I):I=e[52],I}function hr(t){return n.jsx(Vt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function pr(t){return{...t,sidepanel:!1}}function xr(t){return{...t,thread:void 0,sidepanel:!1}}function gr(){const t=$.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:br},t[0]=e):e=t[0];const s=jt(e);if(!s)return!1;let r;return t[1]!==s?(r=s==="app"||Rn.includes(s),t[1]=s,t[2]=r):r=t[2],r}function br(t){const{staticData:e}=t.matches.findLast(vr)??{};return e?.siteEditorView?"site-editor":e?.mainView==="blog-post"?"blog":e?.mainView}function vr(t){return t.staticData.mainView}function yr(t,e,s){const r=$.c(33),i=Qe(),{locator:a}=re(),l=D.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=D.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[d,m]=D.useState(void 0),[f,h]=D.useState(t);f!==t&&(h(t),m(void 0));let y,b;r[3]!==d||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==c.kind?(y=()=>{t!==null&&(o||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},b=[t,o,c.kind,d,i],r[3]=d,r[4]=t,r[5]=o,r[6]=i,r[7]=c.kind,r[8]=y,r[9]=b):(y=r[8],b=r[9]),D.useEffect(y,b);let j;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(j={mutationFn:async p=>{const T=s?.(p);return i.create({id:p,virtual_mcp_id:e,...T?{branch:T}:{},...Ws(sessionStorage,a,p)})}},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=j):j=r[14];const x=cs(j);let v,S;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==o||r[19]!==c.kind?(v=()=>{t!==null&&(o||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},S=[t,o,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=o,r[19]=c.kind,r[20]=v,r[21]=S):(v=r[20],S=r[21]),D.useEffect(v,S),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(o){let p;return r[23]!==o?(p={status:"ready",task:o},r[23]=o,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let g;return r[32]===Symbol.for("react.memo_cache_sentinel")?(g={status:"loading"},r[32]=g):g=r[32],g}const jr=50;function Sr(t,e){const s=$.c(15),{org:r}=re(),i=Pe(),{data:a}=pe.useSession(),l=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==l||s[2]!==t?(c=fe.agentEntryThreads(r.id,l,t),s[0]=r.id,s[1]=l,s[2]=t,s[3]=c):c=s[3];const u=e&&!!l;let o;s[4]!==i||s[5]!==t?(o=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:jr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=o):o=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==o?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:o},s[7]=c,s[8]=u,s[9]=o,s[10]=d):d=s[10];const m=me(d);if(!e||!l){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function kr(t){const e=$.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Le(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:Tr},e[2]=c):c=e[2];const u=jt(c),{org:o}=re();let d;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(d=i.org?ds({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(nt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function Tr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Nr(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Le(r),{org:a}=re(),{org:l,taskId:c}=s;if(!l||c===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=us({org:l,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function _r(){const t=$.c(2),e=Nr();let s;return t[0]!==e?(s=e?n.jsx(nt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function wr(){const t=$.c(6),e=On(),s=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Le(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:Cr}),t[1]=s,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=n.jsx(Dn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Cr(t){const{preview:e,...s}=t;return s}function Pr(t){const e=$.c(11),{children:s}=t,r=W();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==s?(l=s??n.jsx(ya,{}),e[4]=s,e[5]=l):l=e[5];let c;e[6]!==l?(c=n.jsx(Me,{children:l}),e[6]=l,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(vt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function Ir(t){const e=$.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(Z.ThreadlessStreamSource,{},r):n.jsx(Z.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let l;return e[3]!==i||e[4]!==a?(l=n.jsx(Z.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=l):l=e[5],l}function Mr(t){const e=$.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],D.useLayoutEffect(i),null}function Ar({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=W(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:c,isThreadLocked:u}=Ee(),o=st(),{data:d}=pe.useSession(),m=d?.user?.id,f=!Ms(l?.harness_id),h=Xs({agentSandboxMap:s,threadSandboxMap:l?.metadata?.sandboxMap,userId:m,ownerId:l?.created_by,branch:a}),y=e||Vs(l?.metadata),b=D.useRef(null),j=f&&Qs({threadLoaded:!!l,isOwner:!!m&&l?.created_by===m,hasActiveRepository:y,branch:a??null,attempted:b.current===(l?.id??null)});D.useEffect(()=>{if(!j||!l)return;b.current=l.id;const E=d?.user?.name||d?.user?.email?.split("@")[0];c(o==="blog"?Et(E):$t(E))},[j,l,d,c,o]);const x=Nt(t),v=x.resolved?x.runtime:null,S=Fe(t),g=Ft(S,a),{releases:p,createRelease:T,markSandbox:k}=an(t),N=rn(t,ct(S)),_=ct(S)&&a?ln(a,N.data):!1,C=!!m&&l?.created_by===m,w=!!v&&C&&!!a&&a!==g&&!p.some(E=>E.branch===a)&&!N.isLoading&&_!==!0,I=D.useRef(null);D.useEffect(()=>{!w||!a||!v||I.current!==a&&(I.current=a,T({branch:a,name:cn(p,i(jn(a))),color:on(p.length),createdBy:m,createdAt:new Date().toISOString(),runtime:v}).catch(()=>{}))},[w,a,v,p,T,m,i]);const P=v==="sandbox"&&u&&C&&p.some(E=>E.branch===a&&E.runtime!=="sandbox"),[A,L]=D.useState(null);if(P&&a&&A!==a){L(a);const E=a;queueMicrotask(()=>{k(E).catch(()=>{})})}const F=Js(t,a??void 0),R=(m&&a?Kn(h?.[m]?.[a]):{})["agent-sandbox"]??null,M=R?.previewUrl??null,G=f&&v!=="cms"&&(!!R||F);return f?v==="cms"?n.jsx(ut,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r}):n.jsx(Fn,{resetKey:l?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:M,enabled:G,children:n.jsx(en,{resetKey:l?.id??"no-thread",executionEnabled:f,virtualMcpId:t,branch:a??null,userId:m??null,hasActiveRepository:y,vmEntry:R,threadId:l?.id??null,children:n.jsx(ut,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(Rt,{image:n.jsx(Ye,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Lr(){const t=$.c(19),e=W(),{toggleSidebar:s}=ws(),r=Cs(),{virtualMcpId:i,taskId:a}=Ee(),l=!r&&"md:hidden";let c;t[0]!==l?(c=ee(l),t[0]=l,t[1]=c):c=t[1];let u;t[2]!==e?(u=e("layouts.shellControls.toggleSidebar"),t[2]=e,t[3]=u):u=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(_s,{size:16}),t[4]=o):o=t[4];let d;t[5]!==c||t[6]!==u||t[7]!==s?(d=n.jsx(_e,{className:c,onClick:s,"aria-label":u,children:o}),t[5]=c,t[6]=u,t[7]=s,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(sr,{}),t[9]=m):m=t[9];let f;t[10]!==d?(f=n.jsxs(ze.Topbar.Left,{children:[d,m]}),t[10]=d,t[11]=f):f=t[11];let h;t[12]!==a||t[13]!==i?(h=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(mr,{virtualMcpId:i,taskId:a})}),t[12]=a,t[13]=i,t[14]=h):h=t[14];let y;t[15]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ze.Topbar.Right,{className:"shrink-0",children:n.jsx(ar,{})}),t[15]=y):y=t[15];let b;return t[16]!==f||t[17]!==h?(b=n.jsxs(ze.Topbar,{className:"border-b border-border/60 px-3",children:[f,h,y]}),t[16]=f,t[17]=h,t[18]=b):b=t[18],b}function $r(t){const e=$.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),c=Sn()??"overview",u=gr(),[o,d]=D.useState(null),m=o===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const y=h;let b;e[5]!==i||e[6]!==r?(b=n.jsx(Mr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=b):b=e[7];let j;e[8]!==l||e[9]!==a?(j=n.jsx(rr,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=j):j=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Lr,{}),e[11]=x):x=e[11];const v=l??"threadless";let S;e[12]!==v?(S=n.jsx(dt.Thread,{topbar:x,children:n.jsx(Pr,{},v)}),e[12]=v,e[13]=S):S=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(St,{}),e[14]=g):g=e[14];let p;e[15]!==c||e[16]!==s||e[17]!==j||e[18]!==S||e[19]!==f||e[20]!==y?(p=n.jsxs(dt,{...s,threadOpen:f,toggleThread:y,contentKey:c,contentNavigation:j,children:[S,g]}),e[15]=c,e[16]=s,e[17]=j,e[18]=S,e[19]=f,e[20]=y,e[21]=p):p=e[21];let T;return e[22]!==b||e[23]!==p?(T=n.jsxs(n.Fragment,{children:[b,p]}),e[22]=b,e[23]=p,e[24]=T):T=e[24],T}function Er(){const t=W(),e=Ae(),s=gn(),{create:r}=Lt(),{org:i}=re(),l=Se({strict:!1}).org??"",c=Le({strict:!1}),u=tt(),o=Kt(),d=zt(),[m]=D.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=D.useState(()=>$t(f?.user?.name||f?.user?.email?.split("@")[0])),[y]=D.useState(()=>crypto.randomUUID()),[b]=D.useState(()=>Et(ot(f?.user))),j=st(),x=Qe(),v=D.useSyncExternalStore(x.threads.subscribe,x.threads.get),S=D.useSyncExternalStore(x.threadsStatus.subscribe,x.threadsStatus.get),g=Fe(o),p=!!(g&&It(g)),T=Ft(g,null),[k,N]=D.useState(null);u!==null&&k!==null&&N(null);const _=yr(u,o,z=>z===y?b:h),C=_.status==="ready"?_.task:null,w=!!C&&!!d&&C.virtual_mcp_id===o&&!vn(j,C,g?.metadata),I=(u===null||w)&&!!d&&!!g&&(w||k!==o),P=z=>Zs(z.filter(K=>yn(j,K,g?.metadata)),o,f?.user?.id,At(g?.metadata),p,{baseBranch:T,releases:g?.metadata?.releases??void 0}),A=I&&S.kind!=="loading"?P(v):void 0,L=Sr(o,I&&S.kind!=="loading"&&!A);ja(_.status==="ready"?_.task:null);const F=g?.metadata?.ui?.layout??null,B=F?{defaultMainView:F.defaultMainView??null,chatDefaultOpen:F.chatDefaultOpen??null}:null,R=nn(B),{threadId:M,providerKey:G}=ir({routeThreadId:u,fallbackKey:m}),E=async()=>{const z=crypto.randomUUID(),K=v.find(H=>H.id===M)?.branch??null;try{await r({id:z,virtual_mcp_id:o,...j==="blog"?kn(K,ot(f?.user)):K?{branch:K}:{}})}catch{}s(z,()=>({}))},V=D.useRef(null);D.useEffect(()=>{const z=K=>{ps(K)&&K.shiftKey&&K.code==="KeyS"&&!K.repeat&&(K.preventDefault(),V.current?.())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const O=C?.virtual_mcp_id;if(C&&O&&!bn({routeAgentId:o,threadAgentId:O})){const z=fs({org:l,agentId:O,superAgentId:je(i.id).id});return n.jsx(nt,{target:{route:z,search:{thread:C.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(I){if(S.kind==="loading"||L.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full bg-background shadow-edge rounded-[0.75rem]",children:n.jsx(ms,{})})});const z=A??(L.status==="ready"?P(L.threads):void 0),K=p?j==="blog"?y:m:null,H=z?.id??K;if(H&&H===u)return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{role:"alert",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] p-8 text-sm text-muted-foreground",children:t("agentShellLayout.agentShellLayout.viewDraftUnavailable")})});if(H||w)return n.jsx(hs,{to:".",replace:!0,search:Y=>({...Y,thread:H??void 0})});N(o)}return _.status==="creating"||_.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(Ie,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):_.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:_.error.message})]})}):g?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(Z.Provider,{virtualMcpId:o,task:_.status==="ready"?_.task:null,children:n.jsx(Hs,{layout:R,children:n.jsx(Ar,{virtualMcpId:o,hasActiveRepository:p,sandboxMap:g.metadata?.sandboxMap,children:n.jsx(Ir,{threadId:M,providerKey:G,children:n.jsx(Me,{children:n.jsx($r,{layout:R,onNewTaskRef:V,createNewTask:E})})})})})},o)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(Rt,{image:n.jsx(Ye,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:n.jsx(We,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function $o(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(_r,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(St,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Me,{children:n.jsx(kr,{children:n.jsx(Bn,{children:n.jsxs(zn,{children:[n.jsx(Er,{}),n.jsx(wr,{})]})})})}),t[3]=r):r=t[3],r}export{$o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as U,r as I,a4 as Ve,eI as Ue,b as ee,m as O,j as r,a5 as Qe,et as Ge,B as Ne,t as se,I as We,h as Ye,bv as Ke}from"./index-BP527m3V.js";import{b as Pe}from"./Tool01-BlUlKjGy.js";import{s as He}from"./Trash01-CgZrkZ3U.js";import{i as Re}from"./Upload01-DDoiK0tv.js";import{r as Je,L as Xe,s as Ze,F as et,i as $e}from"./use-never-published-BRSQAhRd.js";import{L as Ce}from"./label-DSlWCd9e.js";import{T as Se,a as ke,c as Ee}from"./tooltip-D9qNlq6S.js";import{u as Ie}from"./repository-binding-DGc5VhVW.js";import{u as tt}from"./chat-context-Na_9rQo_.js";import{u as Fe,a8 as st,h as it,b as rt,a9 as nt}from"./site-editor-toast-BXRGIPuY.js";import{c as ot}from"./use-organization-settings-BWLJTTpw.js";import{a as at}from"./SwitchHorizontal01-Cp1oX99F.js";import{a as lt,b as ct,P as dt}from"./popover-CelLmvH8.js";import{S as ft}from"./switch-B60LgmjA.js";import{a as ut,T as mt}from"./toggle-group-JYZ1PCaE.js";import{m as pt}from"./match-site-slug-config-B47_xZCi.js";import{u as gt}from"./use-file-configs-8VTVKs7P.js";import{u as xt}from"./asset-utils-DxQXeDgB.js";import{i as ht}from"./AlertCircle-DT2ZDuIl.js";const Oe=I.createContext(null);function cs(t){const e=U.c(3),{children:s}=t,n=tt(),a=Fe(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==a.kind||e[1]!==s?(o=I.createElement(Oe.Provider,{value:a.kind},s),e[0]=a.kind,e[1]=s,e[2]=o):o=e[2],o}function vt(){const t=U.c(4),e=I.useContext(Oe),{org:s}=Ve(),n=ot("new_blocks_editor"),a=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==a?(o=st({backend:e,hasOrg:a,orgFlag:n}),t[0]=e,t[1]=n,t[2]=a,t[3]=o):o=t[3],o}function yt(){return vt()??!1}function bt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),a=Ue(n);if(typeof a=="string")return a;const o=s.map(i=>Ue(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function jt(t){const e=U.c(29),{className:s}=t,n=ee();if(yt()){let c;e[0]!==n?(c=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==s?(m=O("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=m):m=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Qe,{className:"size-3.5"}),e[4]=x):x=e[4];let p;e[5]!==c||e[6]!==m?(p=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":c,className:m,children:x})}),e[5]=c,e[6]=m,e[7]=p):p=e[7];let h;e[8]!==n?(h=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=h):h=e[9];let g;e[10]!==h?(g=r.jsx(ke,{className:"max-w-56",children:h}),e[10]=h,e[11]=g):g=e[11];let w;return e[12]!==p||e[13]!==g?(w=r.jsxs(Ee,{children:[p,g]}),e[12]=p,e[13]=g,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=O("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(Se,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let d;e[22]!==n?(d=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=d):d=e[23];let l;e[24]!==d?(l=r.jsx(ke,{className:"max-w-56",children:d}),e[24]=d,e[25]=l):l=e[25];let u;return e[26]!==f||e[27]!==l?(u=r.jsxs(Ee,{children:[f,l]}),e[26]=f,e[27]=l,e[28]=u):u=e[28],u}const Me=I.createContext({required:!1,invalid:!1});function wt(){return I.useContext(Me)}function ds(t){const e=U.c(6),{required:s,invalid:n,children:a}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==a||e[4]!==o?(i=r.jsx(Me.Provider,{value:o,children:a}),e[3]=a,e[4]=o,e[5]=i):i=e[5],i}function fs(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const Nt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function De(t){return Ie(t)?.metadata?.fieldDescriptionTooltips??!1}function Ct(t){const e=U.c(9),{description:s,virtualMcpId:n,children:a}=t,o=De(n);if(!s||!o)return a;let i;e[0]!==a?(i=I.cloneElement(a,{className:O(a.props.className,Nt)}),e[0]=a,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(Se,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let d;e[4]!==s?(d=r.jsx(ke,{className:"max-w-64",children:s}),e[4]=s,e[5]=d):d=e[5];let l;return e[6]!==f||e[7]!==d?(l=r.jsxs(Ee,{delayDuration:300,children:[f,d]}),e[6]=f,e[7]=d,e[8]=l):l=e[8],l}function St(t){const e=U.c(17),{htmlFor:s,label:n,description:a,labelClassName:o,virtualMcpId:i}=t,f=De(i),{required:d,invalid:l}=wt();let u;e[0]!==l||e[1]!==d?(u=d&&l&&r.jsx(jt,{className:"mt-0.5 self-start"}),e[0]=l,e[1]=d,e[2]=u):u=e[2];let c;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(c=r.jsxs(Ce,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=c):c=e[7];const m=c;if(!f){let p;e[8]!==a?(p=a&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:a}),e[8]=a,e[9]=p):p=e[9];let h;return e[10]!==m||e[11]!==p?(h=r.jsxs("div",{className:"space-y-0.5",children:[m,p]}),e[10]=m,e[11]=p,e[12]=h):h=e[12],h}let x;return e[13]!==a||e[14]!==m||e[15]!==i?(x=r.jsx(Ct,{description:a,virtualMcpId:i,children:m}),e[13]=a,e[14]=m,e[15]=i,e[16]=x):x=e[16],x}function kt(t){const e=ee(),s=Ie(t?.virtualMcpId),n=Fe(t?.virtualMcpId,t?.branch),{connection:a}=rt(t?.virtualMcpId),o=nt(n,a);if(s?.metadata?.assetStorageConfigId||!o||!t||n.kind!=="protocol"||!n.describe.assets)return null;const{maxBytes:i}=n.describe.assets,f=d=>`${o}/assets/${encodeURIComponent(d)}`;return async d=>{if(d.size>i)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(i/(1024*1024))} MB`}));if(n.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:d.name}));let l;try{l=await fetch(f(d.name),{method:"PUT",signal:Ge(),headers:{"content-type":d.type||"application/octet-stream"},body:d})}catch{throw new Error(e("decoServe.upload.serverGone",{name:d.name}))}const u=await l.json().catch(()=>null);if(!l.ok||typeof u?.path!="string"){const c=u?.error?.message;throw new Error(e("decoServe.upload.failed",{name:d.name,detail:typeof c=="string"?c:`HTTP ${l.status}`}))}return u.path}}function Et(t,e){const s=U.c(6),n=Fe(t?.virtualMcpId,t?.branch);let a;s[0]!==n||s[1]!==t?.previewUrl?(a=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:it(n),s[0]=n,s[1]=t?.previewUrl,s[2]=a):a=s[2];const o=a;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function It(){const t=U.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Re,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function Tt(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const _t=["low","medium","high","original"];function qe(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Le(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=Ut(t);for(const n of s){const a=n.indexOf("=");if((a>=0?n.slice(0,a):n)===e)return a>=0?n.slice(a+1):""}return null}}function ze(t,e,s){const n=t.indexOf("#"),a=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,d=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(l=>{const u=l.indexOf("=");return(u>=0?l.slice(0,u):l)!==e});return s!==void 0&&d.push(`${e}=${s}`),`${f}${d.length?`?${d.join("&")}`:""}${a}`}function Ut(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Pt(t){if(!t)return;const e=Le(t,"quality");return qe(e)?e:void 0}function $t(t,e){return ze(t,"quality",e)}function Rt(t){return t?Le(t,"muted")!=="false":!0}function Ot(t,e){return ze(t,"muted",e?void 0:"false")}function Mt(t){const e=U.c(36),{value:s,onChange:n,showMuted:a}=t,o=a===void 0?!1:a,i=ee(),f=I.useId();let d;e[0]!==s?(d=Pt(s),e[0]=s,e[1]=d):d=e[1];const l=d;let u;e[2]!==s?(u=Rt(s),e[2]=s,e[3]=u):u=e[3];const c=u;let m;e[4]!==i?(m=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(at,{size:14}),e[6]=x):x=e[6];let p;e[7]!==m?(p=r.jsx(lt,{asChild:!0,children:r.jsx(Ne,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":m,children:x})}),e[7]=m,e[8]=p):p=e[8];let h;e[9]!==i?(h=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=h):h=e[10];let g;e[11]!==h?(g=r.jsx(Ce,{className:"text-xs text-muted-foreground",children:h}),e[11]=h,e[12]=g):g=e[12];const w=l??"";let N;e[13]!==n||e[14]!==s?(N=b=>n($t(s,qe(b)?b:void 0)),e[13]=n,e[14]=s,e[15]=N):N=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=_t.map(Dt),e[16]=y):y=e[16];let F;e[17]!==N||e[18]!==w?(F=r.jsx(ut,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:N,children:y}),e[17]=N,e[18]=w,e[19]=F):F=e[19];let v;e[20]!==F||e[21]!==g?(v=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,F]}),e[20]=F,e[21]=g,e[22]=v):v=e[22];let C;e[23]!==c||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(C=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ce,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(ft,{id:f,checked:c,onCheckedChange:b=>n(Ot(s,b))})]}),e[23]=c,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=C):C=e[29];let S;e[30]!==v||e[31]!==C?(S=r.jsx(ct,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[v,C]})}),e[30]=v,e[31]=C,e[32]=S):S=e[32];let j;return e[33]!==S||e[34]!==p?(j=r.jsxs(dt,{children:[p,S]}),e[33]=S,e[34]=p,e[35]=j):j=e[35],j}function Dt(t){return r.jsx(mt,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function qt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Ae=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Lt(t){const e=U.c(26),{siteSlug:s,virtualMcpId:n,onUploaded:a,onNeedsPicker:o,serveUpload:i}=t,f=ee(),l=Ie(n)?.metadata?.assetStorageConfigId,u=!i;let c;e[0]!==u?(c={enabled:u},e[0]=u,e[1]=c):c=e[1];const m=gt(c),x=xt(),[p,h]=I.useState(!1);let g;e[2]!==m.data?.configs?(g=m.data?.configs??[],e[2]=m.data?.configs,e[3]=g):g=e[3];let w;e[4]!==l||e[5]!==s||e[6]!==g?(w=pt(g,s,l),e[4]=l,e[5]=s,e[6]=g,e[7]=w):w=e[7];const y=l??w?.id??null;let F;e[8]!==m.data?.configs||e[9]!==y||e[10]!==o||e[11]!==a||e[12]!==i||e[13]!==f||e[14]!==x?(F=async function(M){if(!M)return;const $=Array.from(M).filter(zt);if($.length===0){se.error(f("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(i){try{a(await i($[0]))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}return}const k=Je(m.data?.configs??[],y,typeof window<"u"?window.localStorage.getItem(Xe):null);if(!k){o();return}try{const T=await x.mutateAsync({configId:k,file:$[0]}),_=qt(T.publicUrl);if(!_){se.error(f("sectionsEditor.imageField.uploadFailed"));return}a(_),$.length>1&&se.info(f("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:$[0].name}))}catch(T){const _=T;se.error(_ instanceof Error?_.message:f("sectionsEditor.imageField.uploadFailed"))}},e[8]=m.data?.configs,e[9]=y,e[10]=o,e[11]=a,e[12]=i,e[13]=f,e[14]=x,e[15]=F):F=e[15];const v=F;let C,S;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&h(!0)},S=E=>{E.currentTarget===E.target&&h(!1)},e[16]=C,e[17]=S):(C=e[16],S=e[17]);let j;e[18]!==v?(j={onDragOver:C,onDragLeave:S,onDrop:E=>{E.preventDefault(),E.stopPropagation(),h(!1),v(E.dataTransfer.files)}},e[18]=v,e[19]=j):j=e[19];let b;return e[20]!==v||e[21]!==p||e[22]!==y||e[23]!==j||e[24]!==x.isPending?(b={isDragging:p,isPending:x.isPending,lockedConfigId:y,handleFiles:v,dropProps:j},e[20]=v,e[21]=p,e[22]=y,e[23]=j,e[24]=x.isPending,e[25]=b):b=e[25],b}function zt(t){return Ae.has(t.type||"")}const At=3;function us(t){const e=U.c(98),{schema:s,value:n,onChange:a,path:o,label:i,sandbox:f,compact:d}=t,l=ee();let u;e[0]!==n?(u=bt(n),e[0]=n,e[1]=u):u=e[1];const c=u,[m,x]=I.useState(!1),[p,h]=I.useState(!1),[g,w]=I.useState(!1),N=Et(f,c),[y,F]=I.useState(0);let v;e[2]!==y||e[3]!==N?(v=y>0?`${N}${N.includes("?")?"&":"?"}retry=${y}`:N,e[2]=y,e[3]=N,e[4]=v):v=e[4];let C;e[5]!==v?(C=Ze(v),e[5]=v,e[6]=C):C=e[6];const S=C,j=!!c&&!S;let b,E;e[7]!==c?(b=c?Ft(c):"",E=b?Tt(b):"",e[7]=c,e[8]=b,e[9]=E):(b=e[8],E=e[9]);const M=E;let $;e[10]!==a?($=function(fe){h(!1),w(!1),F(0),a(fe)},e[10]=a,e[11]=$):$=e[11];const k=$,[T,_]=I.useState(c),[Be,Te]=I.useState(c);Be!==c&&(Te(c),_(c));let ie;e[12]!==k||e[13]!==c?(ie=function(fe){_(fe);const te=fe.trim();te&&!$e(te)||te!==c&&(Te(te),k(te))},e[12]=k,e[13]=c,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==c||e[16]!==T?(re=function(){T.trim()&&!$e(T)&&_(c)},e[15]=c,e[16]=T,e[17]=re):re=e[17];const me=re,R=kt(f),_e=I.useRef(null);let ne;e[18]!==R?(ne=()=>R?_e.current?.click():x(!0),e[18]=R,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug,ge=f?.virtualMcpId;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==R||e[22]!==k||e[23]!==ge||e[24]!==pe?(ae={siteSlug:pe,virtualMcpId:ge,onUploaded:k,onNeedsPicker:oe,serveUpload:R},e[21]=R,e[22]=k,e[23]=ge,e[24]=pe,e[25]=ae):ae=e[25];const{isDragging:le,isPending:ce,lockedConfigId:xe,dropProps:he,handleFiles:ve}=Lt(ae),ye=!i&&"hidden";let q;e[26]!==ye?(q=O("min-w-0",ye),e[26]=ye,e[27]=q):q=e[27];const be=f?.virtualMcpId;let L;e[28]!==i||e[29]!==o||e[30]!==s.description||e[31]!==be?(L=r.jsx(St,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:be}),e[28]=i,e[29]=o,e[30]=s.description,e[31]=be,e[32]=L):L=e[32];let z;e[33]!==q||e[34]!==L?(z=r.jsx("div",{className:q,children:L}),e[33]=q,e[34]=L,e[35]=z):z=e[35];const je=le&&"border-primary ring-2 ring-primary/30",we=ce&&"pointer-events-none opacity-60";let A;e[36]!==je||e[37]!==we?(A=O("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",je,we),e[36]=je,e[37]=we,e[38]=A):A=e[38];let B;e[39]!==D||e[40]!==d||e[41]!==M||e[42]!==b||e[43]!==g||e[44]!==p||e[45]!==ce||e[46]!==i||e[47]!==y||e[48]!==N||e[49]!==S||e[50]!==c||e[51]!==l||e[52]!==j?(B=c?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":l("sectionsEditor.imageField.replaceImage"),className:O("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",d?"h-28":"h-40"),children:[!g&&!j&&r.jsx("img",{src:S,alt:i,className:O("h-full w-full object-contain transition-opacity",!p&&"opacity-0"),onLoad:()=>h(!0),onError:()=>{N!==c&&y<At?setTimeout(()=>F(Bt),600):w(!0)}},c),(g||j)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(Pe,{size:20}),r.jsx("p",{className:"text-xs",children:l("sectionsEditor.imageField.previewUnavailable")})]}),!p&&!g&&!j&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(It,{})]}),!d&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:b}),M&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:M})]})]}):r.jsxs("button",{type:"button",onClick:D,className:O("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",d?"h-28":"h-40"),children:[r.jsx(Pe,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:l(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!d&&r.jsx("span",{className:"text-xs text-muted-foreground",children:l("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[39]=D,e[40]=d,e[41]=M,e[42]=b,e[43]=g,e[44]=p,e[45]=ce,e[46]=i,e[47]=y,e[48]=N,e[49]=S,e[50]=c,e[51]=l,e[52]=j,e[53]=B):B=e[53];let V;e[54]!==le||e[55]!==l?(V=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:l("sectionsEditor.imageField.dropToUpload")})}),e[54]=le,e[55]=l,e[56]=V):V=e[56];let Q;e[57]!==he||e[58]!==A||e[59]!==B||e[60]!==V?(Q=r.jsxs("div",{...he,className:A,children:[B,V]}),e[57]=he,e[58]=A,e[59]=B,e[60]=V,e[61]=Q):Q=e[61];let G;e[62]!==ue?(G=P=>ue(P.target.value),e[62]=ue,e[63]=G):G=e[63];let W;e[64]!==c?(W=P=>{P.key==="Escape"&&_(c)},e[64]=c,e[65]=W):W=e[65];let Y;e[66]!==l?(Y=l("sectionsEditor.imageField.urlPlaceholder"),e[66]=l,e[67]=Y):Y=e[67];let K;e[68]!==o||e[69]!==me||e[70]!==G||e[71]!==W||e[72]!==Y||e[73]!==T?(K=r.jsx(We,{id:o,type:"url",value:T,onChange:G,onBlur:me,onKeyDown:W,placeholder:Y,className:"h-9 min-w-0 flex-1"}),e[68]=o,e[69]=me,e[70]=G,e[71]=W,e[72]=Y,e[73]=T,e[74]=K):K=e[74];let H;e[75]!==D||e[76]!==c||e[77]!==l?(H=!c&&r.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Re,{size:14}),l("sectionsEditor.imageField.browse")]}),e[75]=D,e[76]=c,e[77]=l,e[78]=H):H=e[78];let J;e[79]!==k||e[80]!==c||e[81]!==l?(J=c&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{value:c,onChange:k}),r.jsx(Ne,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(""),className:"h-9 shrink-0","aria-label":l("sectionsEditor.imageField.removeImage"),children:r.jsx(He,{size:14})})]}),e[79]=k,e[80]=c,e[81]=l,e[82]=J):J=e[82];let X;e[83]!==K||e[84]!==H||e[85]!==J?(X=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[K,H,J]}),e[83]=K,e[84]=H,e[85]=J,e[86]=X):X=e[86];let Z;e[87]!==ve||e[88]!==xe||e[89]!==m||e[90]!==R||e[91]!==k?(Z=R?r.jsx("input",{ref:_e,type:"file",accept:[...Ae].join(","),className:"hidden",onChange:P=>{ve(P.target.files),P.target.value=""}}):r.jsx(et,{open:m,onOpenChange:x,mode:"image",onSelect:P=>k(P),lockedConfigId:xe}),e[87]=ve,e[88]=xe,e[89]=m,e[90]=R,e[91]=k,e[92]=Z):Z=e[92];let de;return e[93]!==z||e[94]!==Q||e[95]!==X||e[96]!==Z?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[z,Q,X,Z]}),e[93]=z,e[94]=Q,e[95]=X,e[96]=Z,e[97]=de):de=e[97],de}function Bt(t){return t+1}function ms(t){const e=U.c(15),{isPending:s,isError:n}=t,a=ee();if(n){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ht,{size:13}),e[0]=d):d=e[0];let l;e[1]!==a?(l=a("sandbox.saveStatus.failed"),e[1]=a,e[2]=l):l=e[2];let u;return e[3]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[d,l]}),e[3]=l,e[4]=u):u=e[4],u}if(s){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ye,{className:"size-[13px]"}),e[5]=d):d=e[5];let l;e[6]!==a?(l=a("sandbox.saveStatus.saving"),e[6]=a,e[7]=l):l=e[7];let u;return e[8]!==l?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[d,l]}),e[8]=l,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(Ke,{size:13}),e[10]=o):o=e[10];let i;e[11]!==a?(i=a("sandbox.saveStatus.saved"),e[11]=a,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{It as C,St as F,us as I,jt as M,cs as N,_t as Q,ds as R,ms as S,yt as a,De as b,wt as c,Ct as d,bt as e,Ft as f,Tt as g,kt as h,fs as i,Et as j,Mt as k,Pt as l,Lt as m,$t as s,vt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as j,b as N,j as s,n as C,hr as F,R as k,r as y,dZ as L,B as D,ax as O,af as E,D as B,v as R,w as A,x as I,aT as q,I as _,y as V,t as z,gf as H}from"./index-BP527m3V.js";import{i as Z}from"./AlertCircle-DT2ZDuIl.js";import{s as G}from"./Plus-DEeR8qC2.js";import{t as J}from"./Users01-DVMhWmct.js";import{E as K}from"./empty-state-C7Sg1bax.js";import{L as w}from"./label-DSlWCd9e.js";import{S as M,b as Q,a as U,d as W,c as P}from"./select-BNoZ1cwH.js";import{T as X}from"./textarea-CRgCAK3p.js";import{u as Y,a as ee}from"./use-secrets-D46GKExN.js";import{R as te}from"./require-capability-CCGZ96D-.js";import"./index-BdQq_4o_.js";import"./index-Ds3fsbcX.js";import"./ChevronUp-DM7pn8nV.js";import"./access-gate-BYQd4796.js";import"./capability-load-error-CHW06qRY.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Z,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?O:J;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(E,{}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(K,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function T({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(B,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(R,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(M,{value:i,onValueChange:o=>c(o),children:[s.jsx(Q,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:o=>l(o.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Y(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(G,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(T,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(T,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function _e(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{_e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aY as i,X as e,l as s}from"./agent-icon-CpMz1pSC.js";import{dM as n}from"./index-BP527m3V.js";import{a as o}from"./UserSquare-DEjJtCDR.js";const r=["general","views","connections","repository","site"],a={general:{icon:s,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},views:{icon:o,titleKey:"virtualMcp.settings.views.title",descriptionKey:"virtualMcp.settings.views.description"},connections:{icon:i,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},repository:{icon:n,titleKey:"virtualMcp.settings.repository.title",descriptionKey:"virtualMcp.settings.repository.description"},site:{icon:e,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function g(t){return!!t&&r.includes(t)}export{a as P,r as a,g as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i8 as ei,bn as ti,c as wn,b as jn,r as b,m as le,j as r,c8 as ni,bk as Cs,i9 as Mo,B as It,Y as on,au as si,_ as ri,bm as oi,Z as ai,q as ii,hG as li,ia as ci,ib as ui,h as di,bo as wt,ic as Jr,id as bs,ie as fi,ig as pt,ih as Qr,ii as mi,fQ as pi,ij as hi,ik as Yr,il as gi,t as W,fu as Zr,im as vi,io as Bt,ip as yi,iq as Si,ir as bi,fi as Xr,is as xs,it as xi,iu as _i,iv as ki,ff as wi,fR as ji,iw as Ri,ix as Ei,ft as Vi,K as Ti,iy as eo,eL as Ai,fJ as Wn,fO as to,iz as no,iA as Ni,iB as Ci,iC as Pi,iD as _s,iE as Bi,iF as Ki,iG as Mi,iH as so,iI as Di,iJ as Fi,fh as ro,iK as Ii,iL as Li,fL as oo,iM as Oi,fd as zi}from"./index-BP527m3V.js";import{u as $i}from"./chat-context-Na_9rQo_.js";import{a as Xn,M as ao}from"./save-status-Cx3aKwGu.js";import{p as kn,f as Hi,n as Wi}from"./parse-sections-Cy8SKsEh.js";import{b as Gi}from"./repository-binding-DGc5VhVW.js";import{n as qi,t as Ui}from"./ChevronUp-DM7pn8nV.js";import{ab as Do,b as Zn,as as Ji,e as Qi,F as Yi,a2 as io,Z as lo}from"./agent-icon-CpMz1pSC.js";import{S as an}from"./scroll-area-mVo2jhxQ.js";import{c as jt,T as Rt,a as Et}from"./tooltip-D9qNlq6S.js";import{h as Zi,i as Xi,j as el,E as tl,k as nl,V as sl,l as rl,m as ol,G as al,s as Jn,v as Qn,p as Fo,n as il,o as ll,a as co,q as cl,u as ul,A as Gn,P as uo,w as fo,x as mo,y as ks,z as dl,B as fl,D as po,F as ml,J as ho,K as go,L as vo,M as pl,Q as yo,c as hl,T as ln,U as gl,W as vl}from"./held-block-view-BR-UYX4S.js";import{j as yl,u as Sl,i as bl,v as xl,aK as _l,U as kl,k as So,b1 as bo,ab as Kt,ac as Mt,ax as wl,b2 as jl,b3 as Rl,aV as xo,aA as El,aH as Vl}from"./site-editor-toast-BXRGIPuY.js";import{u as Tl,ao as _o,e as ko,j as Al,z as Nl,y as qn,ad as Cl,ae as Pl,aj as Bl}from"./blocks-tab-states-BZoxOO-H.js";import{u as Kl}from"./use-delete-block-BbJuByhU.js";import{b as Ml,u as Dl,k as Un,e as xn}from"./use-never-published-BRSQAhRd.js";import{a as Es,e as Io}from"./UserSquare-DEjJtCDR.js";import{i as wo,s as jo}from"./Tool01-BlUlKjGy.js";import{s as Fl}from"./Plus-DEeR8qC2.js";import{s as Il}from"./Trash01-CgZrkZ3U.js";import{i as Vs}from"./Zap-BsuEhLd3.js";import{u as Ll,a as Ro,n as Ol,P as zl,o as $l,C as Hl,D as Wl,c as Gl}from"./core.esm-YEEWezEY.js";import{u as ql,s as Ul,a as Yn,S as Jl,v as Ql}from"./sortable.esm-CA_k0RaZ.js";import{s as Yl,g as Zl,u as Xl,A as ec}from"./use-section-preview-base-BO578O9L.js";import{m as tc,P as nc}from"./mustache-p2j_fCOZ.js";import{r as Eo,u as sc,a as rc,i as oc,f as ac,B as ic}from"./empty-message-CirmMDhM.js";import{u as lc,a as cc,P as Vo,w as uc,b as dc}from"./seo-editor-iaqzR9NS.js";import{v as fc,k as ws,x as To,j as mc,y as pc}from"./named-rule-step-BJ5LyK07.js";import{u as hc}from"./use-apply-named-rule-h1W6SPpC.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as gc,n as Ut,r as js,m as Dt,k as _n,b as vc,s as Ao,z as yc,A as Sc,B as bc}from"./section-array-field-4mOiVd7b.js";import{b as No,a as xc}from"./variant-matcher-override-BKIrGg8S.js";import"./use-view-draft-kind-BtHf66Jj.js";import"./thread-route-D404Xl1w.js";import"./use-project-scope-Dzg0nsjs.js";import"./use-organization-settings-BWLJTTpw.js";import"./schema-BtzAS_P2.js";import"./task-board-CdhOR9bl.js";import"./thread-intent-DrRX6nG0.js";import"./use-mcp-client-CaYmuD4l.js";import"./auth-Br21RAsk.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B39Ow5tK.js";import"./use-entitlements-Chh3D10H.js";import"./use-ai-providers-CxZCPqVC.js";import"./use-decopilot-events-B84nN_Z6.js";import"./Upload01-DDoiK0tv.js";import"./label-DSlWCd9e.js";import"./SwitchHorizontal01-Cp1oX99F.js";import"./popover-CelLmvH8.js";import"./switch-B60LgmjA.js";import"./toggle-group-JYZ1PCaE.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-8VTVKs7P.js";import"./asset-utils-DxQXeDgB.js";import"./useInfiniteQuery-CN2uIy97.js";import"./infiniteQueryObserver-BFZQsptZ.js";import"./AlertCircle-DT2ZDuIl.js";import"./hosted-reconcile-C5UVxzTP.js";import"./SearchMd-DVpGBR2l.js";import"./textarea-CRgCAK3p.js";import"./use-copy-PziytufC.js";import"./ChevronSelectorVertical-BJDM_s_Z.js";import"./command-B0-oLV0k.js";import"./index-CmzG_GaM.js";import"./Play-kYcUI1An.js";import"./monaco-editor-DTLNzmeB.js";import"./editor-COFIs9XE.js";import"./ArrowUp-BdtMKnAz.js";import"./ArrowLeft-DR_MRxUB.js";import"./LinkBroken01-4l2zZef9.js";import"./BookOpen01-DejCO54_.js";import"./Globe04-BZJYx7x5.js";import"./CheckCircle-CM--cqi0.js";import"./CreditCard01-BKZ9QJb-.js";import"./Key01-CC_tghZO.js";import"./Minus-Bj5yI5D8.js";import"./Monitor01-DeK03po-.js";import"./Sun-Ba2OXmDv.js";import"./ShoppingBag01-BV5nZGeU.js";import"./Users01-DVMhWmct.js";import"./XClose-xYIhBL8b.js";import"./index-BdQq_4o_.js";import"./index-Ds3fsbcX.js";import"./utils-DONok1LX.js";import"./calendar-DkvAGmxG.js";import"./usage-stats-CK4hgSt6.js";import"./tool-namespace-BBpCD9sF.js";import"./form-BZ7xdssd.js";import"./utils-CVEq3hMx.js";import"./markdown-BTKw4nl8.js";import"./use-mobile-B0YlxBUo.js";import"./select-BNoZ1cwH.js";import"./editor-classes-aqVUSPbm.js";import"./combobox-CZTRaybI.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-BtXLDGZr.js";import"./use-blocks-v8-project-BLLvbZl2.js";import"./use-voice-input-Li611DFd.js";import"./drawer-CfOCKnhq.js";import"./index-DF1Gszum.js";import"./checkbox-Dn6r2X61.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-3zULVhcU.js";import"./empty-state-CFvQY7HR.js";import"./search-input-ChnwrZA6.js";import"./tabs-DXm_rA9S.js";import"./use-debounced-value-DJ5YZsat.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Dsc6GXhQ.js";import"./collapsible-waKUBV3F.js";import"./shell-layout-BHtZVBED.js";import"./use-deployment-admin-D8TSoW7b.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-XUOEUOb8.js";import"./project-icon-TEwy-duh.js";import"./use-navigate-to-agent-D9u86crS.js";import"./new-project-dialog-C3JFSI1q.js";import"./repository-picker-DO5Hy-o-.js";import"./github-icon-DH5Sm3NR.js";import"./collection-search-CKJ8zcS9.js";import"./legacy-admin-welcome-dialog-DWeHIzCA.js";import"./required-auth-layout-DoMwdVaZ.js";import"./use-org-sso-CBrdU305.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BT9_tzyT.js";import"./types-BfPC7vnd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-1BLiVjE3.js";import"./use-connection-CFmR-X06.js";import"./use-mcp-prompts-lHtFGIni.js";import"./use-thread-outputs-DsjZa1n5.js";import"./file-type-icon-3Zm8W435.js";import"./slider-BKrw7nqs.js";import"./index-jQ2gY_fm.js";import"./tooltipContext-B94TDN-Q.js";import"./CategoricalChart-GawOpO41.js";import"./index-DZi8I8ot.js";import"./use-move-blocks-CRsMTnFT.js";const _c={escape:Zi};function kc(v,e){for(const p of Yl(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function wc(v,e){if(!e)return;const p=ei(v,ti(e));if(p)try{const S=kc(p.resolveType,e);return S&&tc.render(S,p.data,{},_c).trim()||void 0}catch{return}}function jc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(Rt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(jt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Rc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Co(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Lo(v){return v.map((e,p)=>({...e,index:p}))}function Ec(v,e){if(e===v.length)return v;if(e<v.length)return Lo(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function Oo(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=jn(),_=Xn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?Zl(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?wc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=rl(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Zn:k?Do:Io;let q;e[16]!==k||e[17]!==P?(q=P?{color:oi}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=q):q=e[18];const _e=q;let I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(al,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(Ji,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(jc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(ao,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(ao,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Vc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Tc="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function zo(v,e,p){if(p)return ol({selected:e});const S=v.isSavedBlock===!0,x=v.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":S?Vc:x?Tc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rs(v,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Ac(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=jn(),c=Xn(),xe=S?Cs(S.__resolveType??""):!1,q=p.isHidden===!0,_e=xe||q;let I;e[0]!==p?(I=Mo(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Pc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=ql(Oe);let Pe;e[4]!==ze?(Pe=Hl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let de;e[6]!==Pe||e[7]!==st?(de={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=de):de=e[8];const g=de;let we;e[9]!==p?(we=el(p),e[9]=p,e[10]=we):we=e[10];const rt=we,ot="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=le("touch-none transition-colors",Xe,zo(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(Oo,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Qe):Qe=e[22];const H=!c&&d&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(Rs(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Cc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),at=c?r.jsx(tl,{label:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:q,onToggle:Ue,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})}):r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(Rs(_e,q)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Nc,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=ri,Ye=nl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(Rs(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let $e;e[25]!==Ye||e[26]!==ve||e[27]!==it?($e=r.jsx(Ye,{label:ve,classicClassName:it}),e[25]=Ye,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(on,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(si,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=F=>{F.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Qi,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Y;e[38]!==w?(Y=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Y):Y=e[39];let ee;e[40]!==Ke||e[41]!==Y?(ee=r.jsxs(on,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let D;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(D=ke&&r.jsxs(on,{className:le(!c&&sl),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Do,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=D):D=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(on,{className:le(!c&&Rc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Zn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let me;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(me=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(on,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Io,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=me):me=e[58];let He;e[59]!==k?(He=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=He):He=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Il,{className:"h-4 w-4"}),e[61]=et):et=e[61];let Me;e[62]!==w?(Me=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=Me):Me=e[63];let $;e[64]!==He||e[65]!==Me?($=r.jsxs(on,{variant:"destructive",onClick:He,children:[et,Me]}),e[64]=He,e[65]=Me,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==D||e[70]!==T||e[71]!==me||e[72]!==$?(ie=r.jsxs(ai,{align:"end",className:"w-44",children:[Be,ee,D,T,me,$]}),e[67]=Be,e[68]=ee,e[69]=D,e[70]=T,e[71]=me,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==fe||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(fe,{children:[$e,ie]}),e[74]=fe,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==g||e[83]!==A||e[84]!==Qe||e[85]!==H||e[86]!==at||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:X,style:g,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Qe,H,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=g,e[83]=A,e[84]=Qe,e[85]=H,e[86]=at,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Nc(v){return v.stopPropagation()}function Cc(v){return v.stopPropagation()}function Pc(){return!1}function Ns(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=jn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Fl,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Bc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,q=xe===void 0?!0:xe,_e=jn(),I=Xn();let ke;e[0]!==x.length?(ke=()=>Co(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Co(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Ec(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:Ul},e[3]=g):g=e[3];const we=Ll(Ro(zl,de),Ro(Ol,g));let rt;e[4]!==d?(rt=d.map(Kc),e[4]=d,e[5]=rt):rt=e[5];const ot=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Xe;e[7]!==ot||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const We=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));We===-1||ht===-1||(Oe(bt=>Lo(Yn([...bt],We,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(We,ht))},e[7]=ot,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const H=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,He;if(e[11]!==u||e[12]!==q||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){me=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==q||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Ye=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let We;e[61]!==Ae?(We=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=We):We=e[62];const ht=We;let bt;e[63]!==q||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm"})]}),e[63]=q,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],me=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=q,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Ye,e[57]=ve,e[58]=T}else Ye=e[56],ve=e[57],T=e[58];fe=Wl,Ke=we,se=Gl,Y=L,ee=A,D=H,at=Jl,$e=ot,Be=Ql,He="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Ac,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=q,e[13]=I,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=at,e[34]=fe,e[35]=Ye,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=Ke,e[41]=se,e[42]=Y,e[43]=ee,e[44]=D,e[45]=T,e[46]=me,e[47]=He}else at=e[33],fe=e[34],Ye=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],Ke=e[40],se=e[41],Y=e[42],ee=e[43],D=e[44],T=e[45],me=e[46],He=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==He?(et=r.jsx("div",{className:He,children:it}),e[68]=it,e[69]=He,e[70]=et):et=e[70];let Me;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(Me=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=Me):Me=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",zo(ve,!1,I)),children:r.jsx(Oo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=ni.createPortal(r.jsx($l,{dropAnimation:Xi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==fe||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==D||e[90]!==Me||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[Me,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=Me,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==q||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=q,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Kc(v){return v.id}function Mc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Ts(v,p,S)}:{kind:"noop"};const V=As(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Qn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Po="section-form-stale-save",Dc=3;function Bo(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Ko=new WeakMap;let Fc=0;function Ic(v){let e=Ko.get(v);return e===void 0&&(e=++Fc,Ko.set(v,e)),e}function xf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=jn(),xe=$i(),q=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=yl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Tl(_e),X=Xn(),ze=xe?.virtualMcpId,Pe=Gi(ze===e?e:null)?.metadata?.siteSlug??null,st=Xl({virtualMcpId:e,branch:p,sandboxUrl:x}),de=Sl(e,p),g=bl(de),we=Vi(g),rt=!g,ot=!!st||g,[m,L]=b.useState(null),[Xe,A]=b.useState(null),[Qe,H]=b.useState(null),[at,fe]=b.useState(0),[Ye,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[Ke,se]=b.useState(null),[Y,ee]=b.useState(null),[D,T]=b.useState([]),me=b.useRef(null),[He,et]=b.useState(D.length);He!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Me,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,We]=b.useState(!1),[ht,bt]=b.useState(!1),Rn=b.useRef(null),[En,$o]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[je,un]=b.useState(Z),[Ps,Bs]=b.useState(Z);Z&&!Ps&&(Bs(!0),un(!0),L(null),A(null),H(null),T([])),!Z&&Ps&&Bs(!1);const[Ho,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ms,Ot]=b.useState([]),[Ds,Yt]=b.useState(0),[De,lt]=b.useState(0),[Wo,Fe]=b.useState(null),[Zt,Ge]=b.useState(null),[Fs,Is]=b.useState(null),Nn=ii(),Cn=xl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Ml({orgSlug:v,virtualMcpId:e,branch:p}),[Go,qo]=b.useState(V),[Uo,Jo]=b.useState(C),[Qo,Yo]=b.useState(_);(Go!==V||Uo!==C||Qo!==_)&&(queueMicrotask(()=>fn.flush()),qo(V),Jo(C),Yo(_),L(null),A(null),H(null),fe(0),se(null),ee(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const B=Dl({orgSlug:v,virtualMcpId:e,branch:p}),mn=hl(t=>{B.mutate(t,{onSuccess:()=>k?.(),onError:B.reportError})},d??{},B.v8),Pn=Kl({orgSlug:v,virtualMcpId:e,branch:p}),Ls=hc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);_l(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:o,selectedSectionIndex:a}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,a]){const f=l==null?void 0:s[l],R=l==null?void 0:o[l],h=f&&R?.isSavedBlock?_s(f,R):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Zo,Xo]=b.useState(0),$s=li(de,{orgSlug:v,virtualMcpId:e,branch:p}),Hs=ci($s,I[0]?.blockKey??null,ui(d,I[0]?.blockKey??null)),[ea,ta]=b.useState(null),ts=kl(v,e).epoch,[na,sa]=b.useState(ts);lc(je?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Ws=_??(d&&u?_o(ko(d,u),V,C)?.key??null:null),ns=So({orgSlug:v,virtualMcpId:e,branch:p},Ws?[Ws]:[],{withRefs:!0}),[Gs,ra]=b.useState(!1),ss=So({orgSlug:v,virtualMcpId:e,branch:p},Gs?Al:[]),qs={ready:!(de.kind==="protocol"&&de.hosted)||Gs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>ra(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(di,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const oa=ko(d,u),G=!!_,oe=G?null:_o(oa,V,C),y=G?_:oe?.key??null,rs=G&&_?d[_]:void 0,Us=G&&_&&rs?Nl(_,rs):G&&_?_:"",nn=!G&&y&&d[y]?d[y]:null,os=je&&d&&u&&y&&oe?Eo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,aa=je?nn?.seo:void 0,Kn=Ks!==void 0?Ks:aa,ia=je?sc(Kn):void 0,Js=os?.seoTypeOptions??[],Qs=je&&u?rc(u):"",as=Ho??ia??{},Mn=je&&os?cc(as,os):null,Ys=je&&Mn&&oc(Kn)?qn(Mn,u):null,Zs=je?ac(d,u)?.seoData:void 0,pe=G?[{label:"Default",sections:[{__resolveType:_}]}]:Fo(nn?.sections,d??{},g),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],K=Se?.sections??[],ce=kn(K,d,g),Dn=!G&&gc(nn?.sections,g);if(G&&_&&Fs!==_){Is(_);const t=K[0],n=ce[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),H(s.resolveType),Ge(null),Fe(null))}}!G&&Fs!==null&&Is(null),re.current={rawSections:K,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:De,selectedSectionIndex:m};const la=()=>({multivariate:Dn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:g&&Dn&&Ai(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Dn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=g?bo(y,s):No(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Dn&&yt&&!Oe&&!Ee?y:null;if(ls!==ea&&(ta(ls),ls)){const t=pe.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const o=la(),a=g?bo(y,o):No(y,o,d,u);if(!t||n<0){w(a.length>0?a:null);return}const i={pageKey:y,page:o,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?jl(i):xc({...i,decofile:d,meta:u}),f=g?Rl(a,l):[...a,...l];w(f.length>0?f:null)},xt=(t,n,s,o=m??-1,a=!1)=>{const i=pt(t,n);if(!i){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const f=Qr(i,we)[s];if(!f){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const R=hi(f.value,d);A(R?.data??null),H(R?.resolveType??null);const{resolveType:h,formValue:j}=Ut(f.rule,d,u??void 0);Ge(h),Fe(j),a&&$t(i,o,s)},cs=t=>{F(null),fe(t),L(null),A(null),H(null),T([]);const n=pe[t]?.rule,{resolveType:s,formValue:o}=Ut(n,d??{},u??void 0);ee(s),se(o),is(pe.map(a=>({rule:a.rule})),t)},ca=(t,n)=>{const s=K[t],o=ce[t];if(!s||!o)return!1;const a=o.isMultivariate?pt(s,o)?.variants?.length??0:0,i=n<a?n:0;if(L(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),Ge(null),Fe(null)}return!0},Xs=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof Xs=="number"&&ca(Xs,0)),ts!==na){sa(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||B.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=K[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)L(null),A(null),H(null);else if(o.isMultivariate)xt(s,o,De,m);else{const a=wt(s,o,d,g);A(a?.data??null),H(a?.resolveType??null)}}!t&&je&&(dn(null),An(void 0),Yt(s=>s+1))}if(Os!==Zo){Xo(Os);const t=m!==null?K[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,De,m);else{const s=wt(t,n,d,g);A(s?.data??null),H(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Bo(d,n,g),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?bs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,g):null,i=fi(ut,a,l=>Yr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Fn=Qe&&u?qn(Qe,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=ln(d,y,t,te,pe);B.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),B.reportError(o)}})},Ht=()=>{Ce?.(null),L(null),Tn(!1),A(null),H(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1)},er=()=>Jr(me.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,W.error(t,{id:Po}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=de.kind==="protocol"&&de.source==="github",rr=t=>Vl(Nn,Cn,t,de.kind==="protocol"?de:null),or=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},ua=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:o}=re.current,a=zt.current;return{formBase:a?.sectionIndex===t&&a.variantIndex===o?a:null,pageKey:n,global:G,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},da=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),o=s>=0?n[s]:void 0,a=o?n.with(s,{...t,choices:no(o.plan,o.choices,t.plan),fresh:Ii(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Wn(o.plan.theirs)!==Wn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ar=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Wn(a.plan.mine)===Wn(n))return!0;const i=to({...a.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==a);return vn(l),!1}return vn(s.with(o,{...a,plan:i,choices:no(a.plan,a.choices,i)})),!0},fa=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},ma=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const o=n.emitted;return o&&typeof o=="object"&&!ar(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},pa=()=>{const t=ct.current[0],n=ma();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=ji(n.plan,n.choices);de.kind==="protocol"&&de.source==="github"&&Ri(n.plan,n.choices)&&wl(c,!1),vn(ct.current.slice(1));const{formBase:o,target:a}=n;o.base=n.plan.theirs,o.version=void 0,o.emitted=s,es.current.add(o),(zt.current===o||fa(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ha=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??ua(n),l=i.sectionVariantIndex,f=i.formBase,R=a||eo(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const j=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(j,E);return}const M=typeof t=="function"?t():t,z=eo(ct.current,f,i,n,g).base;if(z&&ar(z,M))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Bo(ne,i,g),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const qe=f?.base,Ze=bs(he,ue,l,ne,g),Nt=!!qe&&!!Ze&&Ni(qe,Ze)&&!(f&&Yr(f,Ze));if(Nt&&qe&&Ze){if(Ci(qe,Ze)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Pi(qe,J.map((ae,mt)=>bs(ae,Ne[mt],l,ne,g)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&L(U),yn(M,U,s,i);return}}const Ct=Nt&&qe&&Ze?to({ancestor:qe,mine:M,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,da({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Bi(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?_s(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??M,Gr=Ki({merged:!!Pt,tracked:f,current:zt.current,saved:M});Pt&&W.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),Gr&&f&&(f.emitted=Pt,A(Pt));const Ss=Gr||!Pt?rn:M;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const qr={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&qe&&(f.base=qe),U instanceof El){if(f&&(f.version=void 0),s<Dc){ye.current.delete(j),hn.current=!0;const ae=Li(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:M},n,s+1,i,ae.immediate),ye.current.delete(j),or(xn(g))},ae.delay)}else us();return}B.reportError(U)}},Ur=U=>{pn.current=!0;let ae=!1;B.mutateAsync(U).then(()=>qr.onSuccess(),mt=>{ae=!0,qr.onError(mt)}).finally(()=>{pn.current=!1,or(ae?xn(g):0),tr()})};if(ue.isSavedBlock){const U=_s(he,ue);if(!U)return;Ur({blockKey:U,data:rn,...qe?{base:{value:Di({startedFrom:qe,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:so({formBase:f,rebased:!!Pt,versionOf:rr,productionVersionOf:ae=>oo(Nn,Cn,ae),...sr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Hn={...ne[Ie]},qt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Fi(U,l,rn);qt[n]=Bt(he,ue,ae)}else if(ue.isHidden){const U=Cs(he.__resolveType),ae=U?{...he.section}:{...he},mt=Array.isArray(ae.variants)?[...ae.variants]:[];mt[0]&&(mt[0]=ro(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?qt[n]={...he,section:ae}:qt[n]=ae}else ue.isLazy?qt[n]={...he,section:rn}:qt[n]=rn;if(Q.length>1){const U=Hn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=ro(U?.__resolveType,ae[be],qt)),Hn.sections={...U,variants:ae}}else Hn.sections=qt;Ur({blockKey:Ie,data:Hn,rebaseOnConflict:!1,guard:so({formBase:null,rebased:!1,versionOf:rr,productionVersionOf:U=>oo(Nn,Cn,U),...sr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},R){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(g))},ga=t=>{tn.current=!1,L(t),lt(0),T([]),$(a=>a+1);const n=K[t],s=ce[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const o=wt(n,s,d,g);if(!o){A(null),H(null),Ge(null),Fe(null),$t(null,t,0);return}A(o.data),H(o.resolveType),Ge(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=Ei(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!oe)return;const n={kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},s=Eo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ti.decofile(Cn))?.[y];if(!o||typeof o!="object"||o===null||Array.isArray(o))return null;const a={...o,...Bn.current};return Bn.current={},t?.raw!==void 0?uc(a,t.raw,u):t?.inner!==void 0?dc(n,s,a,t.inner):a})},lr=(t,n)=>{y&&(Bn.current[t]=n,ds())},va=(t,n)=>{if(!y)return;const s=Yn([...K],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},ya=t=>{if(!y)return;const n=K.filter((s,o)=>o!==t);m===t?Ht():m!==null&&m>t&&L(m-1),dt(n)},Sa=t=>{if(!y)return;const n=K[t];if(!n)return;const s=[...K];s.splice(t+1,0,gl(n)),m!==null&&m>t&&L(m+1),dt(s)},ba=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?_i(n,g):ki(n,u);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},xa=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=xi(n);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},_a=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,g);if(!o?.data)return;const{name:a,...i}=o.data,l=[...K];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Ht(),dt(l)},ka=t=>{if(!y)return;const n=Wi(ce),s=[...K.slice(0,n),{__resolveType:t.resolveType},...K.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Ht()}}),We(!1),L(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,g)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,g);if(!i){A(null),H(null),Ge(null),Fe(null);return}A(i.data),H(i.resolveType),Ge(null),Fe(null)},cr=t=>{Rn.current=t.append,We(!0)},wa=t=>{const n=Rn.current;if(!n){ka(t);return}n({__resolveType:t.resolveType}),We(!1),Rn.current=null},ur=t=>{if(m===null)return;const n=K[m],s=ce[m];!n||!s?.isMultivariate||(lt(t),T([]),$(o=>o+1),xt(n,s,t,m,!0))},ja=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=Si(o,t);if(!a){W.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...K];i[m]=Bt(n,s,a);const l=a.variants;let f=De;t===De?f=Math.min(t,l.length-1):t<De&&(f=De-1),lt(f),T([]),$(R=>R+1),xt(i[m],s,f),dt(i)},Ra=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t,g),i=[...K];i[m]=Bt(n,s,a);const l=Xr(o.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},Ea=(t,n)=>{if(m===null||!y||t===n)return;const s=K[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=vi(a,t,n),l=[...K];l[m]=Bt(s,o,i);let f=De;De===t?f=n:t<De&&n>=De?f=De-1:t>De&&n<=De&&(f=De+1),lt(f),xt(l[m],o,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=K[n],o=ce[n];if(!s||!o)return;const a=gi(s,o,void 0,u,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...K];i[n]=a.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){W.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=K[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=yi(t,n,s);if(!o){W.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...K];a[m]=o;const i=kn(a,d,g)[m];if(!i)return;lt(0),Ge(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),$t(null,m,0),dt(a)},Va=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){W.error(n);return}const s=K[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await B.mutateAsync({blockKey:t,data:i,create:!0}),f=[...K];f[ie]={__resolveType:t},await B.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Ht(),Ve(null),Un(l)||W.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){W.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Mt(l))})}},fr=Se?.rule;if(yt&&m===null&&Y===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?il(u):[],fs=u&&d?ll(u,d):[],Wt=g&&u&&d?fc(u,d):[],ms=(t,n)=>{if(Wt.length===0)return;const s=Cl(t);return{kinds:Wt,selected:s,campaignPrefill:mc(t),onPick:n,load:qs}},mr=!G&&!!(ot&&u&&d),pr=Y&&u?qn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},Gt=async(t,n)=>{if(Sc(n,t,u,g))try{await Pn.mutateAsync({blockKey:t})}catch(s){W.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Mt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a={...s[n]},i={...a.sections},l=[...i.variants??[]],f=l[o],R=f?.rule;if(Jt(R,s,u)){const h=R?.__resolveType??"",j=s[h],E=typeof j?.name=="string"?j.name:h,{__resolveType:M,...z}=t;B.mutate({blockKey:h,data:Ft(M??"",z,E)},{onSuccess:()=>k?.(),onError:B.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},B.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};hr(s)},In=async(t,n,s)=>{const o=pc(n,t);if(!o.ok)return o.reason==="conflict"&&W.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),xo),null;const a={};if(s){const i=s(o.rule);if(!i)return null;a[i.blockKey]=i.data}return o.blockWrite&&(a[o.blockWrite.blockKey]=o.blockWrite.block),Object.keys(a).length>0&&!(await Ls.apply({writes:a})).ok?null:(o.blockWrite&&W.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...xo,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},yr=Wt.length>0?{kinds:Wt,load:qs,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Pl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Bl(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const R=s[n],h=R?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const j=h;if(!Array.isArray(j.variants))return null;const E=[...j.variants],M=E[o];return M?(E[o]={...M,rule:f},{blockKey:n,data:{...R,sections:{...j,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=s[n],i=a?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[o];if(!R)return;const h=Dt(R.rule,s,u),j=cn(t);f[o]={...R,rule:j};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:M,formValue:z}=Ut(j,E,u??void 0);ee(M),se(z);try{await B.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await Gt(h,E),k?.()}catch(ne){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Q=z?.__resolveType??"",be=i[Q],Ie=typeof be?.name=="string"?be.name:Q,{__resolveType:he,...ue}=t;B.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:B.reportError});return}const ne=xs(E,s,t),J=[...o];J[n]=Bt(h,j,ne);const Ne=ln(i,l,J,R,f);B.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g)))},Ta=t=>{Ge(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),xr(n)},Aa=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};xr(s)},Na=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=await In(t,i,M=>{const z=o[n],ne=a[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...o];return Ne[n]=Bt(z,ne,xs(J,s,M)),{blockKey:l,data:ln(i,l,Ne,R,f)}});if(!h)return;const{resolveType:j,formValue:E}=Ut(h.rule,h.projected,u??void 0);Ge(j),Fe(E),k?.()},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=Dt(M[s]?.rule,i,u),ne=cn(t),J=xs(E,s,ne),Ne=[...o];Ne[n]=Bt(h,j,J);const Q=ln(i,l,Ne,R,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);Ge(Ie),Fe(he);try{await B.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await Gt(z,be),k?.()}catch(ue){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ue))})}};if(!G&&!oe)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(G&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Re=m!==null?ce[m]??null:null,_r=m!==null?K[m]:null,kr=_r&&Re?.isMultivariate?pt(_r,Re):null,Vt=kr?Qr(kr,we,g):[],Ln=Math.min(De,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=Re?.isMultivariate===!0,ps=m!==null&&Re!==null,At=ps&&(Tt||!!(Fn&&Xe)),Pa=At&&!G&&Re?.isSavedBlock===!0,ft=G||Pa,wr=G?Us:Re?.label??"",Ba=Zt&&u?qn(Zt,u):null,jr=(t,n)=>n&&X?`${t} · ${n}`:t,Rr=Re?Re.variantOf??Re.label:"",Ka=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[jr(Rr,t)]:[Re.label,t]:[Re?.label??""]})(),hs=jr(oe?.name??"",yt?Se?.label:null),On=At&&(!G||D.length>0)?G?[Us,...D]:[hs,...Ka,...D]:[],Er=je&&oe?[oe.name,"SEO",...Ms]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Qt&&oe?[oe.name,Vr]:Lt&&oe&&Re?[hs,Rr,Vr]:[],zn=Tr.length>0?Tr:Er.length>0?Er:ft?On.length>0?On:[wr]:On.length>0?On:[hs],Ar=ps&&!Tt&&!Re?.isHidden&&!!y,Ma=ft||!G&&yt&&!!Se||Ar,Da=ps&&!Tt&&!G&&D.length===0&&!!Re&&Mo(Re)&&!!y,Fa=X&&At&&!Lt&&Tt&&D.length===0&&!!kt,Nr=X&&D.length>0?co(D[D.length-1]):null,Ia=D.length>1?co(D[D.length-2]):null,Cr=ft?wr:At?Re?.label??"":oe?.name??"",La=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):je?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?Re?.variantOf??Re?.label??"":Qt||je?oe?.name??"":Nr?Ia??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!je&&!At&&!ft,Oa=!X&&!je&&!G&&Tt&&D.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=vc(t.sections,K,u,g);if(!n)return;const{sections:s,newVariantIndex:o}=n;B.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),L(null),A(null),H(null),T([]),se(null),ee(null)},onError:B.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const o=d[y],a=o.sections;if(!a||typeof a!="object"||Array.isArray(a))return;const i=a;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=yc(i,l),R={...d,[y]:{...o,sections:f}};B.mutate({blockKey:y,data:R[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const j of h)await Gt(j,R)})()},onError:B.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),fe(s);const o=Yn(pe.map(a=>({rule:a.rule})),t,n);is(o,s),$n(a=>Yn(a,t,n))},Kr=t=>{const n=pe[t]?.rule,s=Dt(n,d??{},u??void 0);$n(o=>o.length<=1?null:(o.splice(t,1),o),()=>{pe.length-1===1?fe(0):t<te?fe(te-1):t===te&&fe(Math.max(0,t-1)),L(null),A(null),H(null),T([]),se(null),ee(null)},s)},za=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!wi(n.rule)).map(({variant:n})=>Dt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Oi({variants:n}),o=n[s];return o?[{...o,rule:zi(u)}]:null},()=>{fe(0),L(null),A(null),H(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=Xr(s,t,g),bc(s,t,g)),()=>{fe(n),L(null),A(null),H(null),T([]),se(null),ee(null)})},$a=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,o=re.current.decofile;if(!s)return;const a=o[s],i=a.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[t];if(!R?.rule||typeof R.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=R.rule,j=n.trim();en(!0);try{if(!j){if(!Jt(h,o,u)){F(null);return}const Q=h.__resolveType??"";f[t]={...R,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await B.mutateAsync({blockKey:s,data:be[s]}),await Gt(Q,be),F(null),k?.();return}const E=As(h,o,u);if(!E){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await B.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,j)}),F(null),k?.();return}const M=Jn(j),z=Qn(M,o,u);if(z){W.error(z);return}const ne=Ft(E.resolveType,E.data,j);let J=null,Ne=!1;try{const Q=await B.mutateAsync({blockKey:M,data:ne,create:!0});Ne=Un(Q),J=Ne?null:M,f[t]={...R,rule:cn(M)},await B.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}F(null),Ne||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:j})),k?.()}catch(E){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(E))})}finally{en(!1)}},Ha=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(s===null||!l)return;const h=o[s],j=a[s];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=M[t];if(!z?.rule||typeof z.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Q=>{const be={...E,variants:Q},Ie=[...o];Ie[s]=Bt(h,j,be);const he=ln(i,l,Ie,R,f);return await B.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...M];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await Gt(Ze,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await B.mutateAsync({blockKey:Q.blockKey,data:Ft(Q.resolveType,Q.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Qn(be,i,u);if(Ie){W.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,qe=!1;try{const Ze=await B.mutateAsync({blockKey:be,data:he,create:!0});qe=Un(Ze),ue=qe?null:be;const Nt=[...M];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Ze){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Ze}O(null),qe||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(Q))})}finally{en(!1)}},Dr=async(t,n,s)=>{A(s);try{await B.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},Wa={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,R=async j=>{const E={...t,variants:j};return await Dr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){W.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const M=[...i];M[n]={...l,rule:h.inlinedRule};const z=await R(M);await Gt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await B.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let j=null,E=!1;try{const M=await B.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(M),j=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await R(z),j=null}catch(M){throw j&&await Pn.mutateAsync({blockKey:j}).catch(()=>{}),M}E||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(j))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Dt(l.rule,a,u);i[n]={...l,rule:cn(s)};const R={...t,variants:i},h={...a,[o]:R};try{await Dr(o,t,R),f&&f!==s&&await Gt(f,h),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(j))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;let i=null;!await In(s,a,f=>{const R=Array.isArray(t.variants)?[...t.variants]:[],h=R[n];return h?(R[n]={...h,rule:f},i={...t,variants:R},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Ht(),g&&$t(null,-1,0)},Ir=t=>{dn(t),ds({inner:t})},Lr=t=>{An(t),ds({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Yt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},Ga=()=>{Vn(!1),Tn(!1),L(null),un(!0)},qa=()=>{je&&$r(),L(null),Vn(!0)},Ua=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(je){if(t===0){$r();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ms.slice(0,t-1)),Yt(s=>s+1);return}if(G){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(D.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(vl(zn.length,{isMultivariateSectionTop:Oa})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(Yi,{className:"size-4"})}):null,Ja=ft||At||je?Ma&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!G&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",ul),children:[r.jsx(cl,{rule:js(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(Gn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr,variant:"header"})}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Gn,{onClick:bn})]}),Qa=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsx(mo,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(dl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:ur,onRename:O,onDuplicate:Ra,onDelete:ja,onRemoveAll:dr,onReorder:Ea,onAdd:()=>Sn()}),r.jsx(mo,{children:r.jsx(ks,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Ta,onSelectGlobal:Ca,named:ms(kt?.rule,Na),namedRow:ws(kt?.rule,Wt),rule:kt?.rule,schema:Ba,formValue:Wo,onChange:Aa,formKey:`${m??"none"}:${Ln}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr=r.jsx("div",{className:le(X?"px-2":"p-2 pt-3"),children:r.jsx(Bc,{listKey:`${y??""}-${te}`,rawSections:K,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{ga(t),Je?.(t)},onReorder:va,onDelete:ya,onDuplicate:Sa,onMakeReusable:Ve,onToggleHidden:ba,onToggleLazy:rt?xa:void 0,onAddVariant:Sn,onDetach:_a,onAddSection:()=>We(!0),canAddSection:mr})}),Ya=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr}),nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Za=r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Xa=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>$o(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(qi,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr]},"editor-section-list");return r.jsx(ic,{value:g,children:r.jsx(fl,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(X||zn.length>1)&&r.jsx(Hi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ys,ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:La}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),gs&&yt&&Se&&r.jsx(po,{variants:pe,activeIndex:te,onSelect:cs,onManage:qa,onRemoveAll:za}),Fa&&r.jsx(po,{variants:Vt,activeIndex:Ln,onSelect:ur,onManage:Ua,onRemoveAll:dr}),gs&&!yt&&r.jsx(Gn,{onClick:bn}),Da&&r.jsx(Gn,{onClick:()=>Sn()}),r.jsx(ml,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Ga,children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Ja}),ut&&r.jsx(mi,{open:!0,fields:pi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>ha({...ut.choices,[t]:n}),onApply:pa},Ic(ut.formBase)),Lt?r.jsx(ho,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&D.length===0&&Hr,r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:G?Wa:void 0})})})]},"editor-section-form"):G?r.jsx(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):je?X?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Ya})},"editor-seo"):Za:Qt?r.jsx(ho,{onAdd:bn,children:Qa},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Wr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:mr,onAddSection:()=>We(!0)})})]},"editor-section-list"):Xa,r.jsx(pl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:B.isPending,onSubmit:Va}),ot&&r.jsx(ec,{open:Ae,onOpenChange:t=>{We(t),t||(Rn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:wa}),ht&&y&&d&&r.jsx(nc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(yo,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(pe[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await $a(Te,t)},onOpenChange:t=>{!t&&!Xt&&F(null)}}),tt!==null&&r.jsx(yo,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ha(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{xf as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,b_ as rt,b$ as _e,j as c,c0 as st,c1 as Ie,c2 as k,c3 as lt,c4 as j,c5 as N,c6 as $,c7 as at,c8 as Ee,c9 as Re,ca as it,cb as ct,cc as dt,cd as ut,ce as pt,cf as ft,cg as mt,ch as ht,ci as vt,cj as gt,ck as xt,cl as St,c as ee,m as oe,bv as wt}from"./index-BP527m3V.js";import{c as Ne}from"./index-BdQq_4o_.js";import{V as Ct}from"./index-Ds3fsbcX.js";import{t as je,n as yt}from"./ChevronUp-DM7pn8nV.js";var bt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,Tt]=it(J),[ne]=vt(J,[Tt,Re]),pe=Re(),[_t,G]=ne(J),[Nt,Pt]=ne(J),Me=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:l,value:s,defaultValue:a,onValueChange:i,dir:u,name:f,autoComplete:m,disabled:w,required:C,form:S}=r,p=pe(e),[g,y]=d.useState(null),[v,x]=d.useState(null),[F,M]=d.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:n??!1,onChange:l,caller:J}),[U,q]=_e({prop:s,defaultProp:a,onChange:i,caller:J}),L=d.useRef(null),B=g?S||!!g.closest("form"):!0,[W,V]=d.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return c.jsx(st,{...p,children:c.jsxs(_t,{required:C,scope:e,trigger:g,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[c.jsx(de.Provider,{scope:e,children:c.jsx(Nt,{scope:r.__scopeSelect,onNativeOptionAdd:d.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:d.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?c.jsxs(et,{"aria-hidden":!0,required:C,tabIndex:-1,name:f,autoComplete:m,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?c.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};Me.displayName=J;var Ae="SelectTrigger",Oe=d.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,l=pe(t),s=G(Ae,t),a=s.disabled||o,i=k(e,s.onTriggerChange),u=ue(t),f=d.useRef("touch"),[m,w,C]=ot(p=>{const g=u().filter(x=>!x.disabled),y=g.find(x=>x.value===s.value),v=nt(g,p,y);v!==void 0&&s.onValueChange(v.value)}),S=p=>{a||(s.onOpenChange(!0),C()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return c.jsx(lt,{asChild:!0,...l,children:c.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":tt(s.value)?"":void 0,...n,ref:i,onClick:N(n.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&S(p)}),onPointerDown:N(n.onPointerDown,p=>{f.current=p.pointerType;const g=p.target;g.hasPointerCapture(p.pointerId)&&g.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(n.onKeyDown,p=>{const g=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(g&&p.key===" ")&&bt.includes(p.key)&&(S(),p.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",ke=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:l,placeholder:s="",...a}=r,i=G(De,t),{onValueNodeHasChildrenChange:u}=i,f=l!==void 0,m=k(e,i.onValueNodeChange);return $(()=>{u(f)},[u,f]),c.jsx(j.span,{...a,ref:m,style:{pointerEvents:"none"},children:tt(i.value)?c.jsx(c.Fragment,{children:s}):l})});ke.displayName=De;var Et="SelectIcon",Le=d.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return c.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Et;var Rt="SelectPortal",Be=r=>c.jsx(at,{asChild:!0,...r});Be.displayName=Rt;var Q="SelectContent",Ve=d.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=d.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const l=o;return l?Ee.createPortal(c.jsx(He,{scope:r.__scopeSelect,children:c.jsx(de.Slot,{scope:r.__scopeSelect,children:c.jsx("div",{children:r.children})})}),l):null}return c.jsx(ze,{...r,ref:e})});Ve.displayName=Q;var A=10,[He,Y]=ne(Q),jt="SelectContentImpl",Mt=gt("SelectContent.RemoveScroll"),ze=d.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:l,onPointerDownOutside:s,side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g,...y}=r,v=G(Q,t),[x,F]=d.useState(null),[M,re]=d.useState(null),P=k(e,h=>F(h)),[O,U]=d.useState(null),[q,L]=d.useState(null),B=ue(t),[W,V]=d.useState(!1),H=d.useRef(!1);d.useEffect(()=>{if(x)return ut(x)},[x]),pt();const E=d.useCallback(h=>{const[T,...R]=B().map(_=>_.ref.current),[b]=R.slice(-1),I=document.activeElement;for(const _ of h)if(_===I||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===b&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==I))return},[B,M]),D=d.useCallback(()=>E([O,x]),[E,O,x]);d.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=v;d.useEffect(()=>{if(x){let h={x:0,y:0};const T=b=>{h={x:Math.abs(Math.round(b.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(b.pageY)-(K.current?.y??0))}},R=b=>{h.x<=10&&h.y<=10?b.preventDefault():x.contains(b.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),d.useEffect(()=>{const h=()=>z(!1);return window.addEventListener("blur",h),window.addEventListener("resize",h),()=>{window.removeEventListener("blur",h),window.removeEventListener("resize",h)}},[z]);const[fe,ae]=ot(h=>{const T=B().filter(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),b=nt(T,h,R);b&&setTimeout(()=>b.ref.current.focus())}),me=d.useCallback((h,T,R)=>{const b=!H.current&&!R;(v.value!==void 0&&v.value===T||b)&&(U(h),b&&(H.current=!0))},[v.value]),he=d.useCallback(()=>x?.focus(),[x]),te=d.useCallback((h,T,R)=>{const b=!H.current&&!R;(v.value!==void 0&&v.value===T||b)&&L(h)},[v.value]),ie=o==="popper"?Se:Fe,se=ie===Se?{side:a,sideOffset:i,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:w,collisionPadding:C,sticky:S,hideWhenDetached:p,avoidCollisions:g}:{};return c.jsx(He,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:c.jsx(ft,{as:Mt,allowPinchZoom:!0,children:c.jsx(mt,{asChild:!0,trapped:v.open,onMountAutoFocus:h=>{h.preventDefault()},onUnmountAutoFocus:N(n,h=>{v.trigger?.focus({preventScroll:!0}),h.preventDefault()}),children:c.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:c.jsx(ie,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:h=>h.preventDefault(),...y,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:N(y.onKeyDown,h=>{const T=h.ctrlKey||h.altKey||h.metaKey;if(h.key==="Tab"&&h.preventDefault(),!T&&h.key.length===1&&ae(h.key),["ArrowUp","ArrowDown","Home","End"].includes(h.key)){let b=B().filter(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(h.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(h.key)){const I=h.target,_=b.indexOf(I);b=b.slice(_+1)}setTimeout(()=>E(b)),h.preventDefault()}})})})})})})});ze.displayName=jt;var At="SelectItemAlignedPosition",Fe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,l=G(Q,t),s=Y(Q,t),[a,i]=d.useState(null),[u,f]=d.useState(null),m=k(e,P=>f(P)),w=ue(t),C=d.useRef(!1),S=d.useRef(!0),{viewport:p,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=s,x=d.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&u&&p&&g&&y){const P=l.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=l.valueNode.getBoundingClientRect(),q=y.getBoundingClientRect();if(l.dir!=="rtl"){const I=q.left-O.left,_=U.left-I,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.left=xe+"px"}else{const I=O.right-q.right,_=window.innerWidth-U.right-I,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);a.style.minWidth=Z+"px",a.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(g.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=g.offsetHeight/2,h=g.offsetTop+se,T=H+E+h,R=K-T;if(T<=te){const I=L.length>0&&g===L[L.length-1].ref.current;a.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(I?he:0)+_+D),Z=T+X;a.style.height=Z+"px"}else{const I=L.length>0&&g===L[0].ref.current;a.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?me:0)+se)+R;a.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}a.style.margin=`${A}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>C.current=!0)}},[w,l.trigger,l.valueNode,a,u,p,g,y,l.dir,o]);$(()=>x(),[x]);const[F,M]=d.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=d.useCallback(P=>{P&&S.current===!0&&(x(),v?.(),S.current=!1)},[x,v]);return c.jsx(Dt,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:C,onScrollButtonChange:re,children:c.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:c.jsx(j.div,{...n,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});Fe.displayName=At;var Ot="SelectPopperPosition",Se=d.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...l}=r,s=pe(t);return c.jsx(xt,{...s,...l,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=Ot;var[Dt,Te]=ne(Q,{}),we="SelectViewport",Ue=d.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,l=Y(we,t),s=Te(we,t),a=k(e,l.onViewportChange),i=d.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(de.Slot,{scope:t,children:c.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:N(n.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:w}=s;if(w?.current&&m){const C=Math.abs(i.current-f.scrollTop);if(C>0){const S=window.innerHeight-A*2,p=parseFloat(m.style.minHeight),g=parseFloat(m.style.height),y=Math.max(p,g);if(y<S){const v=y+C,x=Math.min(S,v),F=v-x;m.style.height=x+"px",m.style.bottom==="0px"&&(f.scrollTop=F>0?F:0,m.style.justifyContent="flex-end")}}}i.current=f.scrollTop})})})]})});Ue.displayName=we;var We="SelectGroup",[kt,Lt]=ne(We),Bt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Ie();return c.jsx(kt,{scope:t,id:n,children:c.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Bt.displayName=We;var Ke="SelectLabel",Vt=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(Ke,t);return c.jsx(j.div,{id:n.id,...o,ref:e})});Vt.displayName=Ke;var ce="SelectItem",[Ht,$e]=ne(ce),Ge=d.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:l,...s}=r,a=G(ce,t),i=Y(ce,t),u=a.value===o,[f,m]=d.useState(l??""),[w,C]=d.useState(!1),S=k(e,v=>i.itemRefCallback?.(v,o,n)),p=Ie(),g=d.useRef("touch"),y=()=>{n||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Ht,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:d.useCallback(v=>{m(x=>x||(v?.textContent??"").trim())},[]),children:c.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:f,children:c.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>C(!0)),onBlur:N(s.onBlur,()=>C(!1)),onClick:N(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:N(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:N(s.onPointerDown,v=>{g.current=v.pointerType}),onPointerMove:N(s.onPointerMove,v=>{g.current=v.pointerType,n?i.onItemLeave?.():g.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,v=>{v.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,v=>{i.searchRef?.current!==""&&v.key===" "||(It.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});Ge.displayName=ce;var le="SelectItemText",Ye=d.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...l}=r,s=G(le,t),a=Y(le,t),i=$e(le,t),u=Pt(le,t),[f,m]=d.useState(null),w=k(e,y=>m(y),i.onItemTextChange,y=>a.itemTextRefCallback?.(y,i.value,i.disabled)),C=f?.textContent,S=d.useMemo(()=>c.jsx("option",{value:i.value,disabled:i.disabled,children:C},i.value),[i.disabled,i.value,C]),{onNativeOptionAdd:p,onNativeOptionRemove:g}=u;return $(()=>(p(S),()=>g(S)),[p,g,S]),c.jsxs(c.Fragment,{children:[c.jsx(j.span,{id:i.textId,...l,ref:w}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(l.children,s.valueNode):null]})});Ye.displayName=le;var qe="SelectItemIndicator",Xe=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return $e(qe,t).isSelected?c.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});Xe.displayName=qe;var Ce="SelectScrollUpButton",Ze=d.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollTop>0;l(u)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop-i.offsetHeight)}}):null});Ze.displayName=Ce;var ye="SelectScrollDownButton",Je=d.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,l]=d.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let a=function(){const u=i.scrollHeight-i.clientHeight,f=Math.ceil(i.scrollTop)<u;l(f)};const i=t.viewport;return a(),i.addEventListener("scroll",a),()=>i.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),n?c.jsx(Qe,{...r,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:i}=t;a&&i&&(a.scrollTop=a.scrollTop+i.offsetHeight)}}):null});Je.displayName=ye;var Qe=d.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,l=Y("SelectScrollButton",t),s=d.useRef(null),a=ue(t),i=d.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>()=>i(),[i]),$(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),c.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:N(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{i()})})}),zt="SelectSeparator",Ft=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return c.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});Ft.displayName=zt;var be="SelectArrow",Ut=d.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),l=G(be,t),s=Y(be,t);return l.open&&s.position==="popper"?c.jsx(St,{...n,...o,ref:e}):null});Ut.displayName=be;var Wt="SelectBubbleInput",et=d.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=d.useRef(null),l=k(o,n),s=ct(e);return d.useEffect(()=>{const a=n.current;if(!a)return;const i=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==e&&f){const m=new Event("change",{bubbles:!0});f.call(a,e),a.dispatchEvent(m)}},[s,e]),c.jsx(j.select,{...t,style:{...Ct,...t.style},ref:l,defaultValue:e})});et.displayName=Wt;function tt(r){return r===""||r===void 0}function ot(r){const e=dt(r),t=d.useRef(""),o=d.useRef(0),n=d.useCallback(s=>{const a=t.current+s;e(a),(function i(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>i(""),1e3))})(a)},[e]),l=d.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,l]}function nt(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,l=t?r.indexOf(t):-1;let s=Kt(r,Math.max(l,0));n.length===1&&(s=s.filter(u=>u!==t));const i=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return i!==t?i:void 0}function Kt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var $t=Me,Gt=Oe,Yt=ke,qt=Le,Xt=Be,Zt=Ve,Jt=Ue,Qt=Ge,Pe=Ye,eo=Xe,to=Ze,oo=Je;function co(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx($t,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=c.jsx(Yt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(r){const e=ee.c(15);let t,o,n,l,s;e[0]!==r?({className:o,size:l,variant:s,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"default":l,i=s===void 0?"outline":s;let u;e[6]!==o?(u=oe("data-[placeholder]:text-subtle-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-ring aria-invalid:bg-destructive/10 aria-invalid:shadow-[inset_0_0_0_1px_var(--destructive)] flex w-fit items-center justify-between gap-1.5 px-3 text-sm whitespace-nowrap transition-[color,background-color,box-shadow] outline-none disabled:text-subtle-foreground disabled:pointer-events-none","data-[variant=outline]:rounded-[var(--studio-control-radius,var(--radius-lg))] data-[variant=outline]:bg-[var(--studio-input-background)] data-[variant=outline]:shadow-edge data-[variant=outline]:hover:bg-sidebar","data-[variant=filled]:rounded-full data-[variant=filled]:bg-muted data-[variant=filled]:hover:bg-secondary-hover","data-[variant=pill]:rounded-full data-[variant=pill]:bg-card data-[variant=pill]:shadow-edge data-[variant=pill]:hover:bg-[var(--studio-outline-hover-background)]","data-[size=default]:h-[var(--studio-control-height,2.25rem)] data-[size=default]:pl-4 data-[size=sm]:h-8 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:text-xs data-[size=xs]:font-medium","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",o),e[6]=o,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=c.jsx(qt,{asChild:!0,children:c.jsx(je,{className:"size-3.5 stroke-[1.5]"})}),e[8]=f):f=e[8];let m;return e[9]!==t||e[10]!==n||e[11]!==a||e[12]!==u||e[13]!==i?(m=c.jsxs(Gt,{"data-slot":"select-trigger","data-size":a,"data-variant":i,className:u,...n,children:[t,f]}),e[9]=t,e[10]=n,e[11]=a,e[12]=u,e[13]=i,e[14]=m):m=e[14],m}function fo(r){const e=ee.c(25);let t,o,n,l,s;e[0]!==r?({className:o,children:t,position:l,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=l===void 0?"popper":l,i=s===void 0?!1:s,u=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let f;e[6]!==o||e[7]!==u?(f=oe("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--studio-surface-radius,var(--radius-lg))] border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==i?(m=!i&&c.jsx(no,{}),e[9]=i,e[10]=m):m=e[10];const w=a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let C;e[11]!==w?(C=oe("p-1",w),e[11]=w,e[12]=C):C=e[12];let S;e[13]!==t||e[14]!==C?(S=c.jsx(Jt,{className:C,children:t}),e[13]=t,e[14]=C,e[15]=S):S=e[15];let p;e[16]!==i?(p=!i&&c.jsx(ro,{}),e[16]=i,e[17]=p):p=e[17];let g;return e[18]!==a||e[19]!==n||e[20]!==f||e[21]!==m||e[22]!==S||e[23]!==p?(g=c.jsx(Xt,{children:c.jsxs(Zt,{"data-slot":"select-content",translate:"no",className:f,position:a,...n,children:[m,S,p]})}),e[18]=a,e[19]=n,e[20]=f,e[21]=m,e[22]=S,e[23]=p,e[24]=g):g=e[24],g}function mo(r){const e=ee.c(19);let t,o,n,l,s;e[0]!==r?({className:o,children:t,description:n,hideCheck:s,...l}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=l,e[5]=s):(t=e[1],o=e[2],n=e[3],l=e[4],s=e[5]);const a=s===void 0?!1:s,i=n&&"items-start py-2";let u;e[6]!==o||e[7]!==i?(u=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i,o),e[6]=o,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==a?(f=!a&&c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(eo,{children:c.jsx(wt,{className:"size-4"})})}),e[9]=a,e[10]=f):f=e[10];let m;e[11]!==t||e[12]!==n?(m=n?c.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c.jsx(Pe,{children:t}),c.jsx("span",{className:"text-xs text-muted-foreground whitespace-normal",children:n})]}):c.jsx(Pe,{children:t}),e[11]=t,e[12]=n,e[13]=m):m=e[13];let w;return e[14]!==l||e[15]!==u||e[16]!==f||e[17]!==m?(w=c.jsxs(Qt,{"data-slot":"select-item",className:u,...l,children:[f,m]}),e[14]=l,e[15]=u,e[16]=f,e[17]=m,e[18]=w):w=e[18],w}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(yt,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(je,{className:"size-4"}),e[5]=l):l=e[5];let s;return e[6]!==o||e[7]!==n?(s=c.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:l}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{co as S,uo as a,po as b,mo as c,fo as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-BP527m3V.js";import{V as a}from"./index-tLhNg31B.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
|