decocms 4.372.1 → 4.372.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DbwtWnTP.js → AlertCircle-CMjsP_Tk.js} +1 -1
- package/dist/client/assets/{AreaChart-tdrxZdfF.js → AreaChart-Bh_grNQZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CyH6aWpS.js → ArrowLeft-CjYy5Nhj.js} +1 -1
- package/dist/client/assets/{ArrowRight-Bv0iX4wy.js → ArrowRight-CLncCNat.js} +1 -1
- package/dist/client/assets/{ArrowUp-Scf6R8DX.js → ArrowUp-Cii1LHW7.js} +1 -1
- package/dist/client/assets/{CartesianChart-D1MxLL7k.js → CartesianChart-CD-5y_pX.js} +1 -1
- package/dist/client/assets/{Check-BZE0WrNL.js → Check-B3RSsr_D.js} +1 -1
- package/dist/client/assets/{CheckCircle-BKb1RVrA.js → CheckCircle-DHXQFnpK.js} +1 -1
- package/dist/client/assets/{ChevronRight-DNrwFBnC.js → ChevronRight-USKkhEpL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-oXn0cTzk.js → ChevronSelectorVertical-DpRb2z1l.js} +1 -1
- package/dist/client/assets/{ChevronUp-D5_IWEtB.js → ChevronUp-DiYhGG4T.js} +1 -1
- package/dist/client/assets/{Copy01-DTHuBaTA.js → Copy01-nMxlBfeT.js} +1 -1
- package/dist/client/assets/{CreditCard01-CwX6pA0M.js → CreditCard01-CWXVH3ZM.js} +1 -1
- package/dist/client/assets/{Database01-RGlwXHSd.js → Database01-C0YJpjc3.js} +1 -1
- package/dist/client/assets/{DotsVertical-DE9eZKrJ.js → DotsVertical-CsjwfYzf.js} +1 -1
- package/dist/client/assets/{Download01-qX3hmvr5.js → Download01-BRrSA3Yx.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-9sp0Dc4M.js → ErrorBarContext-fXvhmekg.js} +1 -1
- package/dist/client/assets/{Eye-DXUjft5i.js → Eye-Dyg2WPG4.js} +1 -1
- package/dist/client/assets/{File02-g-xJPix_.js → File02-BvR-HYxK.js} +1 -1
- package/dist/client/assets/{GitBranch01-ddoPQdPH.js → GitBranch01-rWb2SJK9.js} +1 -1
- package/dist/client/assets/{Globe01-DIy8wXF6.js → Globe01-D6FaaFR2.js} +1 -1
- package/dist/client/assets/{HardDrive-DU_z1AQw.js → HardDrive-DNTPLPT4.js} +1 -1
- package/dist/client/assets/{Image01-DfaxHjlV.js → Image01-CxnjAzbb.js} +1 -1
- package/dist/client/assets/{Key01-mqjfsZRe.js → Key01-CIXwHMRo.js} +1 -1
- package/dist/client/assets/{Line-D02_6GXf.js → Line-YO4Ozgbt.js} +1 -1
- package/dist/client/assets/{Link01-C656VtHx.js → Link01-C0FvgZZB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BkRUjBAn.js → LinkExternal01-AWlhN5o7.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CgotMmLL.js → MessageCircle01-DBcg2aiD.js} +1 -1
- package/dist/client/assets/{Monitor01-CQ6Zk1oP.js → Monitor01-Ccs1gh2Z.js} +1 -1
- package/dist/client/assets/{Package-t6euxYcP.js → Package-nTbucmaQ.js} +1 -1
- package/dist/client/assets/{Palette-oECS8j3l.js → Palette-DSdn1Xis.js} +1 -1
- package/dist/client/assets/{Play-DQgzDnaW.js → Play-lMuWOObF.js} +1 -1
- package/dist/client/assets/{Plus-D2HOi_DD.js → Plus-CVauOqLT.js} +1 -1
- package/dist/client/assets/{Printer-BpZBiqyG.js → Printer-CvyxF9Jo.js} +1 -1
- package/dist/client/assets/{SearchLg-DbX4T5E-.js → SearchLg-BrrPVuXr.js} +1 -1
- package/dist/client/assets/{SearchMd-FDCJM3CR.js → SearchMd-C45D2PMI.js} +1 -1
- package/dist/client/assets/{Sector-BW9tyobX.js → Sector-9mXbxJ9i.js} +1 -1
- package/dist/client/assets/{Settings02-CFcKewXh.js → Settings02-Cyf85ea0.js} +1 -1
- package/dist/client/assets/{Share07-CxuHcmnM.js → Share07-wC47qn2E.js} +1 -1
- package/dist/client/assets/{Shield01-HrKG6yUn.js → Shield01-CqB4I7qm.js} +1 -1
- package/dist/client/assets/{Stars01-B_nM3FYf.js → Stars01-oAh9h5b5.js} +1 -1
- package/dist/client/assets/{Sun-SBoG-e9B.js → Sun-0Ied-kyZ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-hHr6GOmU.js → SwitchHorizontal01-DpXsFGyJ.js} +1 -1
- package/dist/client/assets/{Tool01-DHi_Z7zo.js → Tool01-DouqPjim.js} +1 -1
- package/dist/client/assets/{Tool02-JY0gm8cg.js → Tool02-CATStXCy.js} +1 -1
- package/dist/client/assets/{Trash01-C6bziN5X.js → Trash01-nl-t4IoV.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bkdgpfn7.js → TrendUp01-BFAEMx9E.js} +1 -1
- package/dist/client/assets/{Upload01-DC2spim9.js → Upload01-B4Fqdkae.js} +1 -1
- package/dist/client/assets/{User01-BbOpA84p.js → User01-ClMaVCaJ.js} +1 -1
- package/dist/client/assets/{UserSquare-qgzToKNd.js → UserSquare-B2lKdt4w.js} +1 -1
- package/dist/client/assets/{Users01-BOsDT0Jv.js → Users01-BFhxJVhO.js} +1 -1
- package/dist/client/assets/{Users03-BP-0DNhp.js → Users03-Y0Jco4zL.js} +1 -1
- package/dist/client/assets/{X-Bzh3NI3m.js → X-CFCE4a-Q.js} +1 -1
- package/dist/client/assets/{XCircle-CuK2q_XU.js → XCircle-CleKT0Id.js} +1 -1
- package/dist/client/assets/{XClose-Cvyz3reC.js → XClose-BgzK-Dwz.js} +1 -1
- package/dist/client/assets/{Zap-DXNovEva.js → Zap-B6zkqKWB.js} +1 -1
- package/dist/client/assets/{ZoomOut-BRjMa-04.js → ZoomOut-BPxprY2s.js} +1 -1
- package/dist/client/assets/{access-gate-NMf18NsK.js → access-gate-Ds4n25mC.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-GfufFuLz.js → add-connection-dialog-DZjTm9W3.js} +1 -1
- package/dist/client/assets/{agent-analytics-DKvARLL3.js → agent-analytics-DmvdLg8B.js} +1 -1
- package/dist/client/assets/agent-app-BvmFdS4C.js +1 -0
- package/dist/client/assets/{agent-assets-DePuap3v.js → agent-assets-czUGY90q.js} +1 -1
- package/dist/client/assets/{agent-automation-NvLs9ax2.js → agent-automation-C5Kr5Oj3.js} +1 -1
- package/dist/client/assets/{agent-automations-BV3f-ekl.js → agent-automations-D-3-Opoc.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DtqgR_Ib.js → agent-connect-sources-CjhmYssY.js} +1 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +1 -0
- package/dist/client/assets/{agent-e2e-CHL03ziT.js → agent-e2e-DkL4Ltr6.js} +1 -1
- package/dist/client/assets/{agent-experiments-CWfra8gc.js → agent-experiments--rXT-2aB.js} +1 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +1 -0
- package/dist/client/assets/{agent-git-CU-dqFim.js → agent-git-D4IYczGa.js} +1 -1
- package/dist/client/assets/{agent-hosting-x-9xTx9o.js → agent-hosting-DaIfm8Hu.js} +1 -1
- package/dist/client/assets/{agent-icon-BD4DM2Lv.js → agent-icon-CczrFEe7.js} +1 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +1 -0
- package/dist/client/assets/{agent-monitor-CpVDwlgY.js → agent-monitor-C-HIyaF_.js} +1 -1
- package/dist/client/assets/{agent-overview-SQDEg6Zv.js → agent-overview-cm15sxNU.js} +1 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +1 -0
- package/dist/client/assets/{agent-site-editor-BXrb3i4T.js → agent-site-editor-DJSdtoNU.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-C3uy2bqp.js → agent-site-editor-content-DOAcxz0t.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-BB-KqzfI.js → agent-site-editor-preview-mg5Q6hoW.js} +3 -3
- package/dist/client/assets/agent-view-ClMILC98.js +1 -0
- package/dist/client/assets/{agent-view-guard-q_9RifUL.js → agent-view-guard-DHJpzCVR.js} +1 -1
- package/dist/client/assets/{agents-list-BCgsEzHh.js → agents-list-rKFF5b3o.js} +1 -1
- package/dist/client/assets/{ai-providers-DGgtE9F7.js → ai-providers-jxGd6MbV.js} +1 -1
- package/dist/client/assets/{alert-Cnsh1M35.js → alert-U2IStW1f.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bi9Cy1y8.js → alert-dialog-BI-B_8hq.js} +1 -1
- package/dist/client/assets/{api-keys-BlYGdiam.js → api-keys-AIfL76r6.js} +1 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +1 -0
- package/dist/client/assets/app-editor-BZKFeBmU.js +1 -0
- package/dist/client/assets/{asset-utils-syVIRo9d.js → asset-utils-DhbLEVKo.js} +1 -1
- package/dist/client/assets/{auth-D-2jYpOE.js → auth-DhzAq_9m.js} +1 -1
- package/dist/client/assets/{auth-catchall-C3GEml6h.js → auth-catchall-Dar7OygY.js} +1 -1
- package/dist/client/assets/{auth-entry-CJhH7CHs.js → auth-entry-CwWjlqGu.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B3xBkE6i.js → auth-split-layout-DLFqjvPt.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-2yRhuiER.js → authenticate-and-persist-oauth-DkJ4g-X5.js} +1 -1
- package/dist/client/assets/{automation-list-row-DVPV4sOa.js → automation-list-row-Btr-Kty6.js} +1 -1
- package/dist/client/assets/{automation-runs-DnDgp3GT.js → automation-runs-CnOOOwZJ.js} +1 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +1 -0
- package/dist/client/assets/{autosend-D-BN-cv5.js → autosend-BberXmli.js} +1 -1
- package/dist/client/assets/{avatar-Duu5Gg02.js → avatar-C9HiP4eS.js} +1 -1
- package/dist/client/assets/{badge-BNBGXxmC.js → badge-Bu51Hlti.js} +1 -1
- package/dist/client/assets/{block-document-BT-7XjFG.js → block-document-BLCekKXO.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BvM2Da4n.js → blocks-preview-workspace-context-Bwmvvd4S.js} +1 -1
- package/dist/client/assets/{breadcrumb-sWWxibcS.js → breadcrumb-Dhdru7Jh.js} +1 -1
- package/dist/client/assets/{buckets-Biauz5yB.js → buckets-BndbOAGO.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-RalyChXZ.js → build-improve-prompt-doc-Cedp3vV1.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CODUgRdO.js → bulk-category-panel-D3c_qJDk.js} +1 -1
- package/dist/client/assets/{calendar-Dyov14Y_.js → calendar-DIQx67oO.js} +1 -1
- package/dist/client/assets/{capability-load-error-L3ivCxmO.js → capability-load-error-CJMvYDf4.js} +1 -1
- package/dist/client/assets/{cards-ojW-Mo-n.js → cards-BVw8sRdW.js} +1 -1
- package/dist/client/assets/category-editor-C7sRrVfl.js +1 -0
- package/dist/client/assets/{chart-Con9xnVz.js → chart-8nXuVw9P.js} +1 -1
- package/dist/client/assets/{chat-context-BBVkwd3p.js → chat-context-tZCX_cqt.js} +1 -1
- package/dist/client/assets/{chat-draft-bAtYgASI.js → chat-draft-BCeqPSxA.js} +1 -1
- package/dist/client/assets/{checkbox-Dkejdmst.js → checkbox-jLf7fBuW.js} +1 -1
- package/dist/client/assets/{choose-editor-BKF6XAA7.js → choose-editor-Cbu3-nVC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BUl2RZMr.js → cli-auth-success-D39z_FO3.js} +1 -1
- package/dist/client/assets/{client-icons-DLMNndDc.js → client-icons-DpcP1bht.js} +1 -1
- package/dist/client/assets/{collapsible-n44mVpiB.js → collapsible-CTgXdVQa.js} +1 -1
- package/dist/client/assets/{collection-detail-B7MXGdLU.js → collection-detail-BF7WM7Gn.js} +1 -1
- package/dist/client/assets/{collection-display-button-C3iXY6zC.js → collection-display-button-C-4xB6xx.js} +1 -1
- package/dist/client/assets/{collection-search-CeA9TK20.js → collection-search-J9Bt25gS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-SWoJua5h.js → collection-table-wrapper-DBeauaNS.js} +1 -1
- package/dist/client/assets/{collection-tabs-3kW0qDG6.js → collection-tabs-CrXIJeNf.js} +1 -1
- package/dist/client/assets/{combobox-Px3Uvt7K.js → combobox-BHrqHmge.js} +1 -1
- package/dist/client/assets/{command-D2fiEFer.js → command-B-XD29Nx.js} +1 -1
- package/dist/client/assets/{command-palette-store-LVCQ6fRv.js → command-palette-store-DK-56E2K.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BcoKVpmX.js → companion-mcps-section-xmRpNJBK.js} +1 -1
- package/dist/client/assets/{connect-DlipH902.js → connect-D4qCE3TM.js} +1 -1
- package/dist/client/assets/{connect-layout-BQblJmFQ.js → connect-layout-DGO84ImO.js} +1 -1
- package/dist/client/assets/{connection-BfiO32wM.js → connection-DD0omVHZ.js} +1 -1
- package/dist/client/assets/{connection-card-83VJQMov.js → connection-card-fcMCwbTh.js} +1 -1
- package/dist/client/assets/{connection-detail-j_CvFKhd.js → connection-detail-DS015J4e.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Ms_1nBbP.js → connection-form-helpers-CHlcdgAK.js} +1 -1
- package/dist/client/assets/{connections-CERSp27f.js → connections-C98FMYyY.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D0myNU26.js → create-organization-dialog-1mI4Ad1B.js} +1 -1
- package/dist/client/assets/{decofile-api-BVqR93jw.js → decofile-api-BNWbEMR6.js} +1 -1
- package/dist/client/assets/{decopilot-72HlEf1U.js → decopilot-BvepxP_-.js} +1 -1
- package/dist/client/assets/{dialog-DbzCN1O8.js → dialog-llvhXw2o.js} +1 -1
- package/dist/client/assets/{discover-D5kdY2vL.js → discover-DNPHmIfF.js} +1 -1
- package/dist/client/assets/{domain-settings-uVxQd7aQ.js → domain-settings-CXxEmIjB.js} +1 -1
- package/dist/client/assets/{download-app-dialog-Bsig7tOs.js → download-app-dialog-D_4eQbbs.js} +1 -1
- package/dist/client/assets/{drawer-CBdcJytm.js → drawer-BIjkXMV3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dd8nakK9.js → dropdown-menu-C5iafa8S.js} +1 -1
- package/dist/client/assets/{editor-CpBx0ZCm.js → editor-D4Ls62vg.js} +1 -1
- package/dist/client/assets/{empty-state-ClEXvr10.js → empty-state-BdiOfgle.js} +1 -1
- package/dist/client/assets/{empty-state-BIcQyeij.js → empty-state-CyICQznD.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CM8c_Wvw.js → extract-connection-data-Dbm_cKaX.js} +1 -1
- package/dist/client/assets/{feature-gate-BURkiaEd.js → feature-gate-Bp7Cydio.js} +1 -1
- package/dist/client/assets/{feature-paywall-BOwjYKin.js → feature-paywall-DEy2mpV2.js} +1 -1
- package/dist/client/assets/{file-explorer-BgbzlNyO.js → file-explorer-Bs7B2-rr.js} +1 -1
- package/dist/client/assets/{file-preview-BOFvyeTK.js → file-preview-CARebwHJ.js} +1 -1
- package/dist/client/assets/{file-share-button-Doj91OJi.js → file-share-button-Dk1ugrdV.js} +1 -1
- package/dist/client/assets/{file-type-icon-C37FwvPU.js → file-type-icon-C9Qn36v4.js} +1 -1
- package/dist/client/assets/{folder-icon-Dox5xEXV.js → folder-icon-BLBZBD_a.js} +1 -1
- package/dist/client/assets/{form-B7dtslOD.js → form-CSXgIHLz.js} +1 -1
- package/dist/client/assets/{gateway-client-CFIpVRaR.js → gateway-client-BuiOykcN.js} +1 -1
- package/dist/client/assets/{general-BcnikUr3.js → general-BYFfG0fF.js} +1 -1
- package/dist/client/assets/{github-icon-BcrkxW36.js → github-icon-huXDOAgf.js} +1 -1
- package/dist/client/assets/{home-MrzklFP0.js → home-DTaaCW3K.js} +1 -1
- package/dist/client/assets/{hooks-D09Ti1PG.js → hooks-BoX5BC-f.js} +1 -1
- package/dist/client/assets/{hooks-CkL4R3Tj.js → hooks-DZOMRp7D.js} +1 -1
- package/dist/client/assets/{index-D-XXgZ8p.js → index-2eKztu7k.js} +1 -1
- package/dist/client/assets/{index-KOGfrBZR.js → index-2gtoysbs.js} +1 -1
- package/dist/client/assets/{index-Cyoz5tz5.js → index-BD213WLU.js} +1 -1
- package/dist/client/assets/{index-DZOe0ODJ.js → index-BH7uCYoT.js} +1 -1
- package/dist/client/assets/{index-D68Q2TT2.js → index-BWpNlf6e.js} +1 -1
- package/dist/client/assets/{index-CULK6hDm.js → index-Bb-Re5q8.js} +1 -1
- package/dist/client/assets/{index-G9Ugx8pT.js → index-CSd_k8Np.js} +1 -1
- package/dist/client/assets/{index-NrvdR10n.js → index-CiMUXLco.js} +1 -1
- package/dist/client/assets/{index-C9w15wdL.js → index-D4RUT3q0.js} +1 -1
- package/dist/client/assets/{index-B46P4HkV.js → index-DWw5wi2G.js} +1 -1
- package/dist/client/assets/{index-BFjKFLU3.js → index-D_X-LIyA.js} +1 -1
- package/dist/client/assets/{index-z4bKt11m.js → index-Dc7hzqoi.js} +2 -2
- package/dist/client/assets/{index-CuiP-22D.js → index-DiULBiX9.js} +1 -1
- package/dist/client/assets/{index-DLxUQ-f9.js → index-DqT4mG5l.js} +1 -1
- package/dist/client/assets/{index-redirect-AuU1lkcv.js → index-redirect-BQTLrDGT.js} +1 -1
- package/dist/client/assets/{index-BwuwoN1w.js → index-tj4CWdxr.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BjcfJE2O.js → infiniteQueryObserver-CjWlcBHD.js} +1 -1
- package/dist/client/assets/{infra-billing-Blv1R6xm.js → infra-billing-D6jrbNxA.js} +1 -1
- package/dist/client/assets/{input-C7XH8Uj_.js → input-DXlaTX4w.js} +1 -1
- package/dist/client/assets/{input-I71U33T1.js → input-D_FfvHr0.js} +1 -1
- package/dist/client/assets/{input-CSQboV8k.js → input-uIV5S_EX.js} +1 -1
- package/dist/client/assets/{integration-icon-DOHTaQ6D.js → integration-icon-BeEdjsn9.js} +1 -1
- package/dist/client/assets/{label-8juC5J-g.js → label-BMxIRiEr.js} +1 -1
- package/dist/client/assets/{last-preview-page-C8M_ayBL.js → last-preview-page-B_H0ubHa.js} +1 -1
- package/dist/client/assets/{layout-fdXIUmGR.js → layout-Dli4i2a0.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CIQ2cOBs.js → legacy-agents-deep-CoiLV3QJ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DdrzU7Xj.js → legacy-main-redirect-BZ4nzqkQ.js} +1 -1
- package/dist/client/assets/{library-DyrbEVfm.js → library-Dste3SFA.js} +1 -1
- package/dist/client/assets/{login-BhC3su0G.js → login-C4Dx9xMO.js} +1 -1
- package/dist/client/assets/{markdown-BhLIBmBv.js → markdown-DGWjAeXL.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DjwQ0S-h.js → mcp-app-renderer-BTjC7Gse.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DiqQlKOx.js → mcp-oauth-C4khbNJJ.js} +1 -1
- package/dist/client/assets/{members-PF8wxsqA.js → members-CRtKrUle.js} +1 -1
- package/dist/client/assets/{message-templates-BvR8vQvs.js → message-templates-B8kOo0Kk.js} +1 -1
- package/dist/client/assets/{mini-report-page-D2etEugE.js → mini-report-page-Ci4cxCz8.js} +1 -1
- package/dist/client/assets/{mock-board-jCiKK3gA.js → mock-board-DRa60E6i.js} +3 -3
- package/dist/client/assets/{monaco-editor-BHu8MLvz.js → monaco-editor-CMRYkmyb.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-2QEp_Jld.js → monitoring-stats-row-PncjnNwy.js} +1 -1
- package/dist/client/assets/{multi-select-DcF09HV8.js → multi-select-DzAZ8Rb8.js} +1 -1
- package/dist/client/assets/{mustache-DtVu96DY.js → mustache-CPZS2ebG.js} +1 -1
- package/dist/client/assets/{oauth-callback-CwSlt3mo.js → oauth-callback-CETK2WZB.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Co0a0HMU.js → oauth-callback-ai-provider-DqbbngEF.js} +1 -1
- package/dist/client/assets/{onboarding-D-ej0NPt.js → onboarding-B5zAGi2B.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-yjPJnhEG.js → optimistic-project-sidebar-views-CrZ9OeIk.js} +1 -1
- package/dist/client/assets/{org-file-open-context-BgiBbqKQ.js → org-file-open-context-BCUpiY_R.js} +1 -1
- package/dist/client/assets/{organization-choice-loyQwhEZ.js → organization-choice-BNulT5zU.js} +1 -1
- package/dist/client/assets/{orgs-DkENMfud.js → orgs-B1TBklWZ.js} +1 -1
- package/dist/client/assets/{page-seo-form-BBCLz5m0.js → page-seo-form-BrHgBXF1.js} +1 -1
- package/dist/client/assets/{pair-B2TMNGEX.js → pair-B46EBBjF.js} +1 -1
- package/dist/client/assets/{plan-ladder-C80Qcxkm.js → plan-ladder-B2pv9Y73.js} +1 -1
- package/dist/client/assets/{popover-CsEsUqbZ.js → popover-yk_ePqAA.js} +1 -1
- package/dist/client/assets/{post-calendar-gswoVxcp.js → post-calendar-Bx8YiCbs.js} +1 -1
- package/dist/client/assets/{post-editor-5tYPjO0c.js → post-editor-B1fD7o8C.js} +1 -1
- package/dist/client/assets/{preview-content-D5E6-qEP.js → preview-content-CfbsbElk.js} +1 -1
- package/dist/client/assets/{preview-dialog-D1qWdONG.js → preview-dialog-CA2C3DS4.js} +1 -1
- package/dist/client/assets/{primitives-Dy5hA1_y.js → primitives-JiGRyPkw.js} +1 -1
- package/dist/client/assets/{profile-9GEyG1R7.js → profile-CDR0JVtv.js} +1 -1
- package/dist/client/assets/{project-app-view-CsjjG0iu.js → project-app-view-8VWdrWMf.js} +1 -1
- package/dist/client/assets/{project-feed-CEhr0jA4.js → project-feed-ChJRKxhk.js} +1 -1
- package/dist/client/assets/{project-icon-Cw3la58q.js → project-icon-MWmzrrm8.js} +1 -1
- package/dist/client/assets/project-reports-D31utlHg.js +1 -0
- package/dist/client/assets/project-tasks-D2AAgqxo.js +1 -0
- package/dist/client/assets/{prompts-DQaXCBzS.js → prompts-4lILOzK9.js} +1 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +1 -0
- package/dist/client/assets/{redirect-editor-B2uGI7FY.js → redirect-editor-EPs_GX-_.js} +1 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +2 -0
- package/dist/client/assets/{registry-layout-tJiz4Tt0.js → registry-layout-CC2lewiS.js} +1 -1
- package/dist/client/assets/{reports-DvgXBdzM.js → reports-BpxYdv2_.js} +1 -1
- package/dist/client/assets/reports-Ch9UvBcS.js +1 -0
- package/dist/client/assets/{reports-onboarding-BLUSVbkd.js → reports-onboarding-Dhm8IBuD.js} +1 -1
- package/dist/client/assets/{reports-tab-DSknxHUH.js → reports-tab-BJWrZp37.js} +2 -2
- package/dist/client/assets/{repositories-cOMgIGPf.js → repositories-CMIGVJwC.js} +1 -1
- package/dist/client/assets/{repository-import-picker-C0YugeGx.js → repository-import-picker-DhVniDI2.js} +1 -1
- package/dist/client/assets/{repository-picker-BaqWNwxf.js → repository-picker-BkoSI-jm.js} +1 -1
- package/dist/client/assets/{require-capability-CjU7EXPP.js → require-capability-CmtOZnXt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-WkX8CtfT.js → required-auth-layout-RoMNnMPO.js} +1 -1
- package/dist/client/assets/{reset-password-FnA2kczZ.js → reset-password-BeUL8IgX.js} +1 -1
- package/dist/client/assets/{resizable-7umHaFcH.js → resizable-Bt7dvMCc.js} +1 -1
- package/dist/client/assets/{review-settings-BHAkNdHq.js → review-settings-Cx_Yzx40.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-DgGIjR0I.js → rich-text-link-control-CHsxXHIo.js} +1 -1
- package/dist/client/assets/{roles-iNTzpIoS.js → roles-BNleKwt9.js} +1 -1
- package/dist/client/assets/{route-BdFq2Icl.js → route-CHqG9ihd.js} +1 -1
- package/dist/client/assets/{route-DQ3O_pQ7.js → route-DqJoK5dW.js} +1 -1
- package/dist/client/assets/{route-D2mgsDfh.js → route-x8jgkj5T.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-CCXhy-vO.js → runnable-block-editor-xmOnaiFL.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DL9kkwoa.js → sandbox-lifecycle-context-C7VKOJoV.js} +1 -1
- package/dist/client/assets/{schema-D0xfowSf.js → schema-1zAO-l7e.js} +1 -1
- package/dist/client/assets/{scroll-area-BqCCUXvj.js → scroll-area-C-wtbVS1.js} +1 -1
- package/dist/client/assets/{search-input-DpLbMQRj.js → search-input-Pobww52G.js} +1 -1
- package/dist/client/assets/{secrets-B9E8fieV.js → secrets-BF5nuoR4.js} +1 -1
- package/dist/client/assets/{sections-editor-D24EQfD8.js → sections-editor-B1LpXw4X.js} +1 -1
- package/dist/client/assets/{select-cIekAVlM.js → select-BkKPcZFe.js} +1 -1
- package/dist/client/assets/{select-model-DcwphIdD.js → select-model-DPv-zVVj.js} +1 -1
- package/dist/client/assets/{seo-editor-BRYLT6tF.js → seo-editor-9G7mQFJ5.js} +1 -1
- package/dist/client/assets/{settings-tab-DKZf7OJg.js → settings-tab-D1V5Uszb.js} +1 -1
- package/dist/client/assets/{sheet-DhNzwMUj.js → sheet-i72Qx7sL.js} +1 -1
- package/dist/client/assets/{shell-layout-DMJSwXH6.js → shell-layout-Ce0aCJuX.js} +1 -1
- package/dist/client/assets/{sidebar-BCim0GYP.js → sidebar-C5KRz1Pj.js} +1 -1
- package/dist/client/assets/{skill-preview-eH_MzYft.js → skill-preview-gfYVdSdM.js} +1 -1
- package/dist/client/assets/{skills-BtiwGp2Q.js → skills-CgTiBPyO.js} +1 -1
- package/dist/client/assets/{sso-BOpSC7cb.js → sso-BK-aRT5P.js} +1 -1
- package/dist/client/assets/{store-DmrioYP8.js → store-Nm6KtwbD.js} +1 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +2 -0
- package/dist/client/assets/{switch-9PLadaw_.js → switch-BQFtt3BH.js} +1 -1
- package/dist/client/assets/{synced-repos-gfJnKqre.js → synced-repos-B1z4DDCt.js} +1 -1
- package/dist/client/assets/{table-B6mPp07a.js → table-6I6YKvFY.js} +1 -1
- package/dist/client/assets/{tabs-Co2GUrNY.js → tabs-CLziM0Ww.js} +1 -1
- package/dist/client/assets/{task-board-lQZGfEfb.js → task-board-DrUf5p-Z.js} +1 -1
- package/dist/client/assets/{task-route-Btltx00G.js → task-route-BCTCy27Q.js} +1 -1
- package/dist/client/assets/{task-status-CLlOhQGx.js → task-status-DhCT2ly_.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CCRKXVH2.js → taskboard-analytics-Cf1r1f7I.js} +1 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +1 -0
- package/dist/client/assets/{tasks-D_kcQmbi.js → tasks-Drgd6az8.js} +1 -1
- package/dist/client/assets/{textarea-BEOceSll.js → textarea-BU6xemAP.js} +1 -1
- package/dist/client/assets/{thread-intent-9fI0jPLV.js → thread-intent-F-sZEflj.js} +1 -1
- package/dist/client/assets/{thread-route-B1EuqJlg.js → thread-route-BBf64Mwk.js} +1 -1
- package/dist/client/assets/{thread-route-DG6kj-ho.js → thread-route-BSYRqZDg.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CbIiPC8V.js → thread-sheet-body-B4OUWlMn.js} +1 -1
- package/dist/client/assets/{toggle-group-Ck5f9XVv.js → toggle-group-BiU_UDOq.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-8ctMGgIP.js → toolbar-icon-button-PuQFE8Y9.js} +1 -1
- package/dist/client/assets/{tooltip-BuKeolDX.js → tooltip-DV2xHesQ.js} +1 -1
- package/dist/client/assets/{track-B7aLvyYR.js → track-ZuOMvhd2.js} +1 -1
- package/dist/client/assets/{types-Bh4jNqv3.js → types-27TVsPN_.js} +1 -1
- package/dist/client/assets/{usage-stats-waRf4dtg.js → usage-stats-vMRDbAUM.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B0bxSHYG.js → use-ai-providers-BnF5Rw_n.js} +1 -1
- package/dist/client/assets/{use-automations-BdS9yl-d.js → use-automations-Bo0S3g8m.js} +1 -1
- package/dist/client/assets/{use-autosave-CfERN5UF.js → use-autosave-DOzyZumC.js} +1 -1
- package/dist/client/assets/{use-connect-companion-_GDNSGRN.js → use-connect-companion-CClQCUMS.js} +1 -1
- package/dist/client/assets/{use-connection-CPQUKm0a.js → use-connection-Ba04fHwa.js} +1 -1
- package/dist/client/assets/{use-copy-DUiBegp6.js → use-copy-C_ctOeuP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BRT9hKZ3.js → use-create-virtual-mcp-D1w9d4ex.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-PFUAQIxr.js → use-date-fns-locale-onM9TTf8.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CyDohN_c.js → use-debounced-autosave-DqyNKPJM.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DeY1TNRX.js → use-debounced-value-B9nG3bW5.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Du6WCMYS.js → use-deco-credits-BGBshlLi.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-_O_0AHeH.js → use-decopilot-events-BpuQrfKN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-kqt66yqS.js → use-delete-connection-Cns6x8UC.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-MznxNIiy.js → use-deployment-admin-BVfgEagI.js} +1 -1
- package/dist/client/assets/{use-entitlements-BWaaNeuI.js → use-entitlements-Dl7pAsQ5.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BrZtKg6o.js → use-fast-preview-draft-url-mcfOeAAq.js} +1 -1
- package/dist/client/assets/{use-file-configs-sqbLS09v.js → use-file-configs-DYGSdjth.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-RrOnf-fI.js → use-infinite-scroll-PhBGPm8H.js} +1 -1
- package/dist/client/assets/{use-join-requests-BZzsbvb0.js → use-join-requests-DjeVFQr9.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CyT7yQAB.js → use-main-panel-tabs-sSRGo66A.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DvQCYJw0.js → use-mcp-auth-status-I377R0Kg.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B1u2B39v.js → use-mcp-client-e_hCatGm.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DxT8Kz-M.js → use-mcp-prompts-DJRXjL4_.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Ch_j97A3.js → use-mcp-tools-g86k4oib.js} +1 -1
- package/dist/client/assets/{use-members-H3oi0qPu.js → use-members-DPYHJDe2.js} +1 -1
- package/dist/client/assets/{use-mobile-CV7f0Wqe.js → use-mobile-hIijCK0k.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BMSyO1iB.js → use-navigate-to-agent-C8pu0B4z.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BGn9Wkis.js → use-open-billing-url-Df7K1DCF.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-ZxEGrzhh.js → use-org-auth-client-DbPU3bA-.js} +1 -1
- package/dist/client/assets/{use-org-fs-D6lKuMAi.js → use-org-fs-Du-ErRPs.js} +1 -1
- package/dist/client/assets/{use-org-notice-C5thI8aD.js → use-org-notice-CyiiFkRG.js} +1 -1
- package/dist/client/assets/{use-org-sso-vHIufIoJ.js → use-org-sso-BvfIL0yq.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DmWmnvDm.js → use-organization-roles-FAEtbpE5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C-XY0Wze.js → use-organization-settings-CKbX2SdA.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BG4d0Vrr.js → use-panel-navigate-WrD0KEYx.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-0NQTfFQT.js → use-project-native-view-presence-DWzPH-Sc.js} +1 -1
- package/dist/client/assets/{use-project-scope-DRope0ob.js → use-project-scope-DU0-JxYr.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D_a0MIjQ.js → use-registry-connections-SLFMHpqj.js} +1 -1
- package/dist/client/assets/{use-releases-BPrtCiPS.js → use-releases-CFNTwgY3.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BtS3SpeX.js → use-reports-diagnostic-8BvW2in8.js} +1 -1
- package/dist/client/assets/{use-route-default-main-DBXt2fvS.js → use-route-default-main-Djaj_cL9.js} +1 -1
- package/dist/client/assets/{use-secrets-C5iKdreo.js → use-secrets-DVry--sz.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Dwn5dF7B.js → use-section-preview-base-BOFovHh4.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DU2zS-3V.js → use-session-runtime-BR1aW1y5.js} +1 -1
- package/dist/client/assets/{use-tags-BvskEBAC.js → use-tags-CZXCbbwL.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DjIJHPkR.js → use-task-board-analytics-Ci1AhxvH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-9gheSHac.js → use-task-metadata-Dt9l5S_a.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DAcljy5D.js → use-thread-outputs-Dq-RN0P_.js} +1 -1
- package/dist/client/assets/{use-view-mode-CTt0Tykp.js → use-view-mode-B0LeaJg7.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bq1RMGPF.js → use-virtual-mcp-DkK7ErtB.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +1 -0
- package/dist/client/assets/{useQueries-DMqJmHGu.js → useQueries-C-SV8tD7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +1 -0
- package/dist/client/assets/{users-B0Y-7Aab.js → users-BiOPZ43X.js} +1 -1
- package/dist/client/assets/{utils-CU3t1jst.js → utils-DsvmRe8M.js} +1 -1
- package/dist/client/assets/{variant-calendar-Bp201sXA.js → variant-calendar-DImnsJnP.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DUPu0vkW.js → variant-matcher-override-BFQoXu82.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DaZN0qXY.js → view-mode-toggle-DvGhnpsV.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BYPZngzy.js → virtual-mcp-ldxphi5G.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +651 -651
- package/dist/server/server.js +434 -434
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CQgi_fkJ.js +0 -1
- package/dist/client/assets/agent-deck-Dx12NQ18.js +0 -1
- package/dist/client/assets/agent-file-B5qivcOi.js +0 -1
- package/dist/client/assets/agent-library-file-OKK2mnnF.js +0 -1
- package/dist/client/assets/agent-settings-BraxsXkL.js +0 -1
- package/dist/client/assets/agent-site-editor-code-03I9o24S.js +0 -2
- package/dist/client/assets/agent-view-74_Cuyp8.js +0 -1
- package/dist/client/assets/api-keys-ClN6LoeU.js +0 -1
- package/dist/client/assets/app-editor-CaCDGdiz.js +0 -1
- package/dist/client/assets/automations-XsBsFuGM.js +0 -1
- package/dist/client/assets/category-editor-CFCxetoB.js +0 -1
- package/dist/client/assets/project-reports-D83XbTn5.js +0 -1
- package/dist/client/assets/project-tasks-IrwgrDaD.js +0 -1
- package/dist/client/assets/record-editor-C02fIlfV.js +0 -1
- package/dist/client/assets/registry-CORfkc_Z.js +0 -2
- package/dist/client/assets/reports-X2I2m9Nu.js +0 -1
- package/dist/client/assets/store-registry-B398fyC0.js +0 -2
- package/dist/client/assets/tasks-BqLnbtfB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-C6OBOha-.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-XFcbI_PD.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-
|
|
2
|
-
import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,h as kt,B as Ye,au as Ir,M as Gt,av as zr,as as Kr,l as Ke,o as Hr,t as yn}from"./index-z4bKt11m.js";import{A as Ur}from"./agent-view-guard-q_9RifUL.js";import{F as Wr}from"./feature-gate-BURkiaEd.js";import{a as Vr,b as St}from"./chat-context-BBVkwd3p.js";import{d as qr,a as Gr}from"./use-virtual-mcp-Bq1RMGPF.js";import{c as zn,d as Jt,f as Jr}from"./sandbox-lifecycle-context-DL9kkwoa.js";import{e as Yr,d as Qr}from"./backoff-8mStPHYB.js";import{a as Xr}from"./thread-intent-9fI0jPLV.js";import{u as Kn}from"./use-session-runtime-DU2zS-3V.js";import{u as Zr}from"./use-mobile-CV7f0Wqe.js";import{t as es}from"./ChevronUp-D5_IWEtB.js";import{v as Hn,C as ts,D as ns,h as wn,y as rs,E as kn,F as ss,G as os,H as is}from"./agent-icon-BD4DM2Lv.js";import{s as Sn}from"./Database01-RGlwXHSd.js";import{n as Un}from"./LinkExternal01-BkRUjBAn.js";import{s as as}from"./Plus-D2HOi_DD.js";import{i as ls}from"./SearchLg-DbX4T5E-.js";import{c as ut,T as mt,a as ft}from"./tooltip-BuKeolDX.js";import{T as pt}from"./toolbar-icon-button-8ctMGgIP.js";import{P as cs}from"./index-G9Ugx8pT.js";import{b as ds,a as us,u as Wn,g as ms,c as fs,B as It,P as ps,r as hs,R as gs,d as vs,e as Yt,f as Vn,h as xs,l as bs,m as ys,i as ws,p as ks,j as Ss,S as zt}from"./runnable-block-editor-CCXhy-vO.js";import{w as ht}from"./variant-matcher-override-DUPu0vkW.js";import{N as Ps,b as js,s as wt,n as Qt,c as qn,f as Fe,v as Gn,h as Es,e as Ns,d as Cs,j as Rs,k as Pn}from"./claim-phase-copy-0btUuJoC.js";import{r as Ts,w as Ls,D as _s,b as jn,a as Os}from"./section-preview-url-Csj0_ZDg.js";import{u as Ds}from"./use-fast-preview-draft-url-BrZtKg6o.js";import{r as Jn,l as Yn,u as As,w as Ms}from"./last-preview-page-C8M_ayBL.js";import{u as Fs}from"./use-is-desktop-app-BNujXJc_.js";import{u as $s}from"./shell-layout-DMJSwXH6.js";import{u as Wt}from"./useQueries-DMqJmHGu.js";import{i as Bs}from"./ArrowRight-Bv0iX4wy.js";import{a as Qn,b as Xn,c as Is,d as zs,e as Ks,C as Hs}from"./command-D2fiEFer.js";import{b as Zn,D as er,c as tr,d as nr,e as Us}from"./dialog-DbzCN1O8.js";import{I as En}from"./input-C7XH8Uj_.js";import{u as rr}from"./blocks-preview-workspace-context-BvM2Da4n.js";import{i as Ws}from"./AlertCircle-DbwtWnTP.js";import{E as Xt}from"./empty-state-BIcQyeij.js";import{i as Vs}from"./X-Bzh3NI3m.js";import{M as qs}from"./monaco-editor-BHu8MLvz.js";import{R as Nn,a as gt,b as Cn}from"./resizable-7umHaFcH.js";import{a as sr}from"./use-org-notice-C5thI8aD.js";import{r as Gs}from"./virtual-mcp-BYPZngzy.js";import{b as Kt}from"./use-project-scope-DRope0ob.js";import{G as Rn}from"./github-icon-BcrkxW36.js";import{R as Js}from"./repository-import-picker-C0YugeGx.js";import{r as Ys}from"./use-main-panel-tabs-CyT7yQAB.js";import{u as Qs}from"./use-task-metadata-9gheSHac.js";import{b as Xs}from"./thread-route-B1EuqJlg.js";import"./use-panel-navigate-BG4d0Vrr.js";import"./feature-paywall-BOwjYKin.js";import"./Check-BZE0WrNL.js";import"./plan-ladder-C80Qcxkm.js";import"./use-entitlements-BWaaNeuI.js";import"./autosend-D-BN-cv5.js";import"./hooks-CkL4R3Tj.js";import"./use-mcp-client-B1u2B39v.js";import"./auth-D-2jYpOE.js";import"./task-board-lQZGfEfb.js";import"./schema-D0xfowSf.js";import"./use-ai-providers-B0bxSHYG.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-_O_0AHeH.js";import"./use-organization-settings-C-XY0Wze.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-DHi_Z7zo.js";import"./ArrowUp-Scf6R8DX.js";import"./ArrowLeft-CyH6aWpS.js";import"./Tool02-JY0gm8cg.js";import"./TrendUp01-Bkdgpfn7.js";import"./ZoomOut-BRjMa-04.js";import"./Users03-BP-0DNhp.js";import"./CheckCircle-BKb1RVrA.js";import"./ChevronRight-DNrwFBnC.js";import"./ChevronSelectorVertical-oXn0cTzk.js";import"./DotsVertical-DE9eZKrJ.js";import"./UserSquare-qgzToKNd.js";import"./Copy01-DTHuBaTA.js";import"./CreditCard01-CwX6pA0M.js";import"./MessageCircle01-CgotMmLL.js";import"./Download01-qX3hmvr5.js";import"./Printer-BpZBiqyG.js";import"./Settings02-CFcKewXh.js";import"./Eye-DXUjft5i.js";import"./File02-g-xJPix_.js";import"./Share07-CxuHcmnM.js";import"./GitBranch01-ddoPQdPH.js";import"./Globe01-DIy8wXF6.js";import"./SwitchHorizontal01-hHr6GOmU.js";import"./HardDrive-DU_z1AQw.js";import"./Image01-DfaxHjlV.js";import"./Key01-mqjfsZRe.js";import"./Link01-C656VtHx.js";import"./Monitor01-CQ6Zk1oP.js";import"./Sun-SBoG-e9B.js";import"./Package-t6euxYcP.js";import"./Palette-oECS8j3l.js";import"./Play-DQgzDnaW.js";import"./SearchMd-FDCJM3CR.js";import"./Shield01-HrKG6yUn.js";import"./Stars01-B_nM3FYf.js";import"./Trash01-C6bziN5X.js";import"./Upload01-DC2spim9.js";import"./User01-BbOpA84p.js";import"./Users01-BOsDT0Jv.js";import"./XCircle-CuK2q_XU.js";import"./XClose-Cvyz3reC.js";import"./Zap-DXNovEva.js";import"./index-B46P4HkV.js";import"./decofile-api-BVqR93jw.js";import"./utils-CU3t1jst.js";import"./pair-B2TMNGEX.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-n44mVpiB.js";import"./use-copy-DUiBegp6.js";import"./usage-stats-waRf4dtg.js";import"./markdown-BhLIBmBv.js";import"./org-file-open-context-BgiBbqKQ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DjwQ0S-h.js";import"./types-Bh4jNqv3.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-CFIpVRaR.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-DhNzwMUj.js";import"./integration-icon-DOHTaQ6D.js";import"./use-connection-CPQUKm0a.js";import"./use-navigate-to-agent-BMSyO1iB.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-DxT8Kz-M.js";import"./index-CuiP-22D.js";import"./form-B7dtslOD.js";import"./label-8juC5J-g.js";import"./use-thread-outputs-DAcljy5D.js";import"./file-type-icon-C37FwvPU.js";import"./popover-CsEsUqbZ.js";import"./scroll-area-BqCCUXvj.js";import"./select-cIekAVlM.js";import"./calendar-Dyov14Y_.js";import"./textarea-BEOceSll.js";import"./rich-text-link-control-DgGIjR0I.js";import"./switch-9PLadaw_.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-Dd8nakK9.js";import"./search-input-DpLbMQRj.js";import"./tabs-Co2GUrNY.js";import"./use-debounced-value-DeY1TNRX.js";import"./use-file-configs-sqbLS09v.js";import"./asset-utils-syVIRo9d.js";import"./useInfiniteQuery-C6OBOha-.js";import"./infiniteQueryObserver-BjcfJE2O.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-Ck5f9XVv.js";import"./alert-dialog-Bi9Cy1y8.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-Duu5Gg02.js";import"./download-app-dialog-Bsig7tOs.js";import"./anchors-yqDzZN4K.js";import"./command-palette-store-LVCQ6fRv.js";import"./project-icon-Cw3la58q.js";import"./required-auth-layout-WkX8CtfT.js";import"./use-org-sso-vHIufIoJ.js";import"./index-Cyoz5tz5.js";import"./editor-CpBx0ZCm.js";import"./repository-picker-BaqWNwxf.js";import"./collection-search-CeA9TK20.js";import"./use-route-default-main-DBXt2fvS.js";import"./use-mcp-tools-Ch_j97A3.js";import"./index-BFjKFLU3.js";import"./drawer-CBdcJytm.js";import"./input-I71U33T1.js";import"./chat-draft-bAtYgASI.js";import"./use-deco-credits-Du6WCMYS.js";import"./use-open-billing-url-BGn9Wkis.js";import"./decopilot-72HlEf1U.js";import"./checkbox-Dkejdmst.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CULK6hDm.js";import"./input-CSQboV8k.js";import"./hooks-D09Ti1PG.js";import"./use-org-fs-D6lKuMAi.js";import"./question-004-sINsf4GQ.js";import"./use-members-H3oi0qPu.js";import"./use-org-auth-client-ZxEGrzhh.js";import"./add-connection-dialog-GfufFuLz.js";import"./extract-connection-data-CM8c_Wvw.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-BfiO32wM.js";import"./connection-card-83VJQMov.js";import"./use-registry-connections-D_a0MIjQ.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-Ms_1nBbP.js";import"./authenticate-and-persist-oauth-2yRhuiER.js";import"./mcp-oauth-DiqQlKOx.js";import"./collection-tabs-3kW0qDG6.js";import"./badge-BNBGXxmC.js";import"./use-infinite-scroll-RrOnf-fI.js";import"./useSuspenseInfiniteQuery-XFcbI_PD.js";import"./use-project-native-view-presence-0NQTfFQT.js";import"./site-slug-uya6Wp4-.js";const Zs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function eo(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:o=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Zs:s&&o&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const to=1e4,no=1e3,ro=3e4;function so({iframeRef:t,src:e,active:r}){const s=x.useRef(0),o=x.useRef(null),u=x.useRef(null),d=x.useRef(e),l=x.useRef(r);d.current=e,l.current=r;const a=()=>{o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),o.current=null,u.current=null},c=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,h()},to)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=Yr(ro,no,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,a()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),h()};return x.useEffect(()=>{if(a(),s.current=0,!(!r||!e))return c(),a},[e,r]),{handleLoad:p,handleError:f}}var Tn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Tn||(Tn={}));const oo=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Je(),height:Je()}),position:yt({x:Je(),y:Je()})}),io=`(function() {
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-B1LpXw4X.js","assets/index-Dc7hzqoi.js","assets/index-CpNTsElB.css","assets/chat-context-tZCX_cqt.js","assets/use-panel-navigate-WrD0KEYx.js","assets/thread-route-BBf64Mwk.js","assets/use-project-scope-DU0-JxYr.js","assets/use-virtual-mcp-DkK7ErtB.js","assets/use-mcp-client-e_hCatGm.js","assets/auth-DhzAq_9m.js","assets/github-repo-BknN0SVI.js","assets/autosend-BberXmli.js","assets/thread-intent-F-sZEflj.js","assets/slugify-CEUa2lfQ.js","assets/hooks-DZOMRp7D.js","assets/backoff-8mStPHYB.js","assets/task-board-DrUf5p-Z.js","assets/schema-1zAO-l7e.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-Dl7pAsQ5.js","assets/use-ai-providers-BnF5Rw_n.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-BpuQrfKN.js","assets/use-organization-settings-CKbX2SdA.js","assets/ChevronUp-DiYhGG4T.js","assets/agent-icon-CczrFEe7.js","assets/AlertCircle-CMjsP_Tk.js","assets/Tool01-DouqPjim.js","assets/ArrowUp-Cii1LHW7.js","assets/ArrowLeft-CjYy5Nhj.js","assets/Tool02-CATStXCy.js","assets/ArrowRight-CLncCNat.js","assets/TrendUp01-BFAEMx9E.js","assets/ZoomOut-BPxprY2s.js","assets/Users03-Y0Jco4zL.js","assets/CheckCircle-DHXQFnpK.js","assets/Check-B3RSsr_D.js","assets/ChevronRight-USKkhEpL.js","assets/ChevronSelectorVertical-DpRb2z1l.js","assets/DotsVertical-CsjwfYzf.js","assets/UserSquare-B2lKdt4w.js","assets/Copy01-nMxlBfeT.js","assets/CreditCard01-CWXVH3ZM.js","assets/Database01-C0YJpjc3.js","assets/MessageCircle01-DBcg2aiD.js","assets/Download01-BRrSA3Yx.js","assets/Printer-CvyxF9Jo.js","assets/Settings02-Cyf85ea0.js","assets/Eye-Dyg2WPG4.js","assets/File02-BvR-HYxK.js","assets/Share07-wC47qn2E.js","assets/GitBranch01-rWb2SJK9.js","assets/Globe01-D6FaaFR2.js","assets/SwitchHorizontal01-DpXsFGyJ.js","assets/HardDrive-DNTPLPT4.js","assets/Image01-CxnjAzbb.js","assets/Key01-CIXwHMRo.js","assets/Link01-C0FvgZZB.js","assets/LinkExternal01-AWlhN5o7.js","assets/Monitor01-Ccs1gh2Z.js","assets/Sun-0Ied-kyZ.js","assets/Package-nTbucmaQ.js","assets/Palette-DSdn1Xis.js","assets/Play-lMuWOObF.js","assets/Plus-CVauOqLT.js","assets/SearchLg-BrrPVuXr.js","assets/SearchMd-C45D2PMI.js","assets/Shield01-CqB4I7qm.js","assets/Stars01-oAh9h5b5.js","assets/Trash01-nl-t4IoV.js","assets/Upload01-B4Fqdkae.js","assets/User01-ClMaVCaJ.js","assets/Users01-BFhxJVhO.js","assets/XCircle-CleKT0Id.js","assets/XClose-BgzK-Dwz.js","assets/X-CFCE4a-Q.js","assets/Zap-B6zkqKWB.js","assets/scroll-area-C-wtbVS1.js","assets/select-BkKPcZFe.js","assets/index-DWw5wi2G.js","assets/tooltip-DV2xHesQ.js","assets/dialog-llvhXw2o.js","assets/input-DXlaTX4w.js","assets/runnable-block-editor-xmOnaiFL.js","assets/use-session-runtime-BR1aW1y5.js","assets/decofile-api-BNWbEMR6.js","assets/utils-DsvmRe8M.js","assets/sandbox-url-D3mC8qhT.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-B46EBBjF.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-CTgXdVQa.js","assets/use-copy-C_ctOeuP.js","assets/usage-stats-vMRDbAUM.js","assets/markdown-DGWjAeXL.js","assets/org-file-open-context-BCUpiY_R.js","assets/use-mobile-hIijCK0k.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BTjC7Gse.js","assets/types-27TVsPN_.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-BuiOykcN.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/shell-layout-Ce0aCJuX.js","assets/avatar-C9HiP4eS.js","assets/download-app-dialog-D_4eQbbs.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-CyiiFkRG.js","assets/command-palette-store-DK-56E2K.js","assets/command-B-XD29Nx.js","assets/index-BD213WLU.js","assets/integration-icon-BeEdjsn9.js","assets/project-icon-MWmzrrm8.js","assets/required-auth-layout-RoMNnMPO.js","assets/use-org-sso-BvfIL0yq.js","assets/shell-layout-CuFt8bor.css","assets/sheet-i72Qx7sL.js","assets/use-connection-Ba04fHwa.js","assets/use-navigate-to-agent-C8pu0B4z.js","assets/use-mcp-prompts-DJRXjL4_.js","assets/index-DiULBiX9.js","assets/form-CSXgIHLz.js","assets/label-BMxIRiEr.js","assets/use-thread-outputs-Dq-RN0P_.js","assets/file-type-icon-C9Qn36v4.js","assets/popover-yk_ePqAA.js","assets/monaco-editor-CMRYkmyb.js","assets/editor-D4Ls62vg.js","assets/calendar-DIQx67oO.js","assets/textarea-BU6xemAP.js","assets/rich-text-link-control-CHsxXHIo.js","assets/switch-BQFtt3BH.js","assets/safe-image-url-D5z803Ot.js","assets/dropdown-menu-C5iafa8S.js","assets/search-input-Pobww52G.js","assets/tabs-CLziM0Ww.js","assets/use-debounced-value-B9nG3bW5.js","assets/use-file-configs-DYGSdjth.js","assets/asset-utils-DhbLEVKo.js","assets/useInfiniteQuery-CspLjV7h.js","assets/infiniteQueryObserver-CjWlcBHD.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-BiU_UDOq.js","assets/alert-dialog-BI-B_8hq.js","assets/sandbox-git-api-CMdpE2TE.js","assets/mustache-CPZS2ebG.js","assets/page-seo-form-BrHgBXF1.js","assets/use-section-preview-base-BOFovHh4.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-BFQoXu82.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,h as kt,B as Ye,au as Ir,M as Gt,av as zr,as as Kr,l as Ke,o as Hr,t as yn}from"./index-Dc7hzqoi.js";import{A as Ur}from"./agent-view-guard-DHJpzCVR.js";import{F as Wr}from"./feature-gate-Bp7Cydio.js";import{a as Vr,b as St}from"./chat-context-tZCX_cqt.js";import{d as qr,a as Gr}from"./use-virtual-mcp-DkK7ErtB.js";import{c as zn,d as Jt,f as Jr}from"./sandbox-lifecycle-context-C7VKOJoV.js";import{e as Yr,d as Qr}from"./backoff-8mStPHYB.js";import{a as Xr}from"./thread-intent-F-sZEflj.js";import{u as Kn}from"./use-session-runtime-BR1aW1y5.js";import{u as Zr}from"./use-mobile-hIijCK0k.js";import{t as es}from"./ChevronUp-DiYhGG4T.js";import{v as Hn,C as ts,D as ns,h as wn,y as rs,E as kn,F as ss,G as os,H as is}from"./agent-icon-CczrFEe7.js";import{s as Sn}from"./Database01-C0YJpjc3.js";import{n as Un}from"./LinkExternal01-AWlhN5o7.js";import{s as as}from"./Plus-CVauOqLT.js";import{i as ls}from"./SearchLg-BrrPVuXr.js";import{c as ut,T as mt,a as ft}from"./tooltip-DV2xHesQ.js";import{T as pt}from"./toolbar-icon-button-PuQFE8Y9.js";import{P as cs}from"./index-CSd_k8Np.js";import{b as ds,a as us,u as Wn,g as ms,c as fs,B as It,P as ps,r as hs,R as gs,d as vs,e as Yt,f as Vn,h as xs,l as bs,m as ys,i as ws,p as ks,j as Ss,S as zt}from"./runnable-block-editor-xmOnaiFL.js";import{w as ht}from"./variant-matcher-override-BFQoXu82.js";import{N as Ps,b as js,s as wt,n as Qt,c as qn,f as Fe,v as Gn,h as Es,e as Ns,d as Cs,j as Rs,k as Pn}from"./claim-phase-copy-0btUuJoC.js";import{r as Ts,w as Ls,D as _s,b as jn,a as Os}from"./section-preview-url-Csj0_ZDg.js";import{u as Ds}from"./use-fast-preview-draft-url-mcfOeAAq.js";import{r as Jn,l as Yn,u as As,w as Ms}from"./last-preview-page-B_H0ubHa.js";import{u as Fs}from"./use-is-desktop-app-BNujXJc_.js";import{u as $s}from"./shell-layout-Ce0aCJuX.js";import{u as Wt}from"./useQueries-C-SV8tD7.js";import{i as Bs}from"./ArrowRight-CLncCNat.js";import{a as Qn,b as Xn,c as Is,d as zs,e as Ks,C as Hs}from"./command-B-XD29Nx.js";import{b as Zn,D as er,c as tr,d as nr,e as Us}from"./dialog-llvhXw2o.js";import{I as En}from"./input-DXlaTX4w.js";import{u as rr}from"./blocks-preview-workspace-context-Bwmvvd4S.js";import{i as Ws}from"./AlertCircle-CMjsP_Tk.js";import{E as Xt}from"./empty-state-CyICQznD.js";import{i as Vs}from"./X-CFCE4a-Q.js";import{M as qs}from"./monaco-editor-CMRYkmyb.js";import{R as Nn,a as gt,b as Cn}from"./resizable-Bt7dvMCc.js";import{a as sr}from"./use-org-notice-CyiiFkRG.js";import{r as Gs}from"./virtual-mcp-ldxphi5G.js";import{b as Kt}from"./use-project-scope-DU0-JxYr.js";import{G as Rn}from"./github-icon-huXDOAgf.js";import{R as Js}from"./repository-import-picker-DhVniDI2.js";import{r as Ys}from"./use-main-panel-tabs-sSRGo66A.js";import{u as Qs}from"./use-task-metadata-Dt9l5S_a.js";import{b as Xs}from"./thread-route-BBf64Mwk.js";import"./use-panel-navigate-WrD0KEYx.js";import"./feature-paywall-DEy2mpV2.js";import"./Check-B3RSsr_D.js";import"./plan-ladder-B2pv9Y73.js";import"./use-entitlements-Dl7pAsQ5.js";import"./autosend-BberXmli.js";import"./hooks-DZOMRp7D.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./task-board-DrUf5p-Z.js";import"./schema-1zAO-l7e.js";import"./use-ai-providers-BnF5Rw_n.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BpuQrfKN.js";import"./use-organization-settings-CKbX2SdA.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-DouqPjim.js";import"./ArrowUp-Cii1LHW7.js";import"./ArrowLeft-CjYy5Nhj.js";import"./Tool02-CATStXCy.js";import"./TrendUp01-BFAEMx9E.js";import"./ZoomOut-BPxprY2s.js";import"./Users03-Y0Jco4zL.js";import"./CheckCircle-DHXQFnpK.js";import"./ChevronRight-USKkhEpL.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./DotsVertical-CsjwfYzf.js";import"./UserSquare-B2lKdt4w.js";import"./Copy01-nMxlBfeT.js";import"./CreditCard01-CWXVH3ZM.js";import"./MessageCircle01-DBcg2aiD.js";import"./Download01-BRrSA3Yx.js";import"./Printer-CvyxF9Jo.js";import"./Settings02-Cyf85ea0.js";import"./Eye-Dyg2WPG4.js";import"./File02-BvR-HYxK.js";import"./Share07-wC47qn2E.js";import"./GitBranch01-rWb2SJK9.js";import"./Globe01-D6FaaFR2.js";import"./SwitchHorizontal01-DpXsFGyJ.js";import"./HardDrive-DNTPLPT4.js";import"./Image01-CxnjAzbb.js";import"./Key01-CIXwHMRo.js";import"./Link01-C0FvgZZB.js";import"./Monitor01-Ccs1gh2Z.js";import"./Sun-0Ied-kyZ.js";import"./Package-nTbucmaQ.js";import"./Palette-DSdn1Xis.js";import"./Play-lMuWOObF.js";import"./SearchMd-C45D2PMI.js";import"./Shield01-CqB4I7qm.js";import"./Stars01-oAh9h5b5.js";import"./Trash01-nl-t4IoV.js";import"./Upload01-B4Fqdkae.js";import"./User01-ClMaVCaJ.js";import"./Users01-BFhxJVhO.js";import"./XCircle-CleKT0Id.js";import"./XClose-BgzK-Dwz.js";import"./Zap-B6zkqKWB.js";import"./index-DWw5wi2G.js";import"./decofile-api-BNWbEMR6.js";import"./utils-DsvmRe8M.js";import"./pair-B46EBBjF.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CTgXdVQa.js";import"./use-copy-C_ctOeuP.js";import"./usage-stats-vMRDbAUM.js";import"./markdown-DGWjAeXL.js";import"./org-file-open-context-BCUpiY_R.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BTjC7Gse.js";import"./types-27TVsPN_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BuiOykcN.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-i72Qx7sL.js";import"./integration-icon-BeEdjsn9.js";import"./use-connection-Ba04fHwa.js";import"./use-navigate-to-agent-C8pu0B4z.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-DJRXjL4_.js";import"./index-DiULBiX9.js";import"./form-CSXgIHLz.js";import"./label-BMxIRiEr.js";import"./use-thread-outputs-Dq-RN0P_.js";import"./file-type-icon-C9Qn36v4.js";import"./popover-yk_ePqAA.js";import"./scroll-area-C-wtbVS1.js";import"./select-BkKPcZFe.js";import"./calendar-DIQx67oO.js";import"./textarea-BU6xemAP.js";import"./rich-text-link-control-CHsxXHIo.js";import"./switch-BQFtt3BH.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-C5iafa8S.js";import"./search-input-Pobww52G.js";import"./tabs-CLziM0Ww.js";import"./use-debounced-value-B9nG3bW5.js";import"./use-file-configs-DYGSdjth.js";import"./asset-utils-DhbLEVKo.js";import"./useInfiniteQuery-CspLjV7h.js";import"./infiniteQueryObserver-CjWlcBHD.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-BiU_UDOq.js";import"./alert-dialog-BI-B_8hq.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-C9HiP4eS.js";import"./download-app-dialog-D_4eQbbs.js";import"./anchors-yqDzZN4K.js";import"./command-palette-store-DK-56E2K.js";import"./project-icon-MWmzrrm8.js";import"./required-auth-layout-RoMNnMPO.js";import"./use-org-sso-BvfIL0yq.js";import"./index-BD213WLU.js";import"./editor-D4Ls62vg.js";import"./repository-picker-BkoSI-jm.js";import"./collection-search-J9Bt25gS.js";import"./use-route-default-main-Djaj_cL9.js";import"./use-mcp-tools-g86k4oib.js";import"./index-D_X-LIyA.js";import"./drawer-BIjkXMV3.js";import"./input-D_FfvHr0.js";import"./chat-draft-BCeqPSxA.js";import"./use-deco-credits-BGBshlLi.js";import"./use-open-billing-url-Df7K1DCF.js";import"./decopilot-BvepxP_-.js";import"./checkbox-jLf7fBuW.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-Bb-Re5q8.js";import"./input-uIV5S_EX.js";import"./hooks-BoX5BC-f.js";import"./use-org-fs-Du-ErRPs.js";import"./question-004-sINsf4GQ.js";import"./use-members-DPYHJDe2.js";import"./use-org-auth-client-DbPU3bA-.js";import"./add-connection-dialog-DZjTm9W3.js";import"./extract-connection-data-Dbm_cKaX.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-DD0omVHZ.js";import"./connection-card-fcMCwbTh.js";import"./use-registry-connections-SLFMHpqj.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CHlcdgAK.js";import"./authenticate-and-persist-oauth-DkJ4g-X5.js";import"./mcp-oauth-C4khbNJJ.js";import"./collection-tabs-CrXIJeNf.js";import"./badge-Bu51Hlti.js";import"./use-infinite-scroll-PhBGPm8H.js";import"./useSuspenseInfiniteQuery-BiQYAhJn.js";import"./use-project-native-view-presence-DWzPH-Sc.js";import"./site-slug-uya6Wp4-.js";const Zs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function eo(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:o=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Zs:s&&o&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const to=1e4,no=1e3,ro=3e4;function so({iframeRef:t,src:e,active:r}){const s=x.useRef(0),o=x.useRef(null),u=x.useRef(null),d=x.useRef(e),l=x.useRef(r);d.current=e,l.current=r;const a=()=>{o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),o.current=null,u.current=null},c=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,h()},to)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=Yr(ro,no,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,a()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),h()};return x.useEffect(()=>{if(a(),s.current=0,!(!r||!e))return c(),a},[e,r]),{handleLoad:p,handleError:f}}var Tn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Tn||(Tn={}));const oo=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Je(),height:Je()}),position:yt({x:Je(),y:Je()})}),io=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -515,4 +515,4 @@ import{r as x,aa as yt,at as Je,ab as Se,c as pe,b as Ce,j as n,K as $r,e as Br,
|
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
})();`;function Vt(t,e){let r=t,s=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let o=0;s&&o<5;o++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const d=u.__resolveType;if(typeof d=="string"&&d&&d!==s){r=u,s=d;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const o=Array.isArray(r.variants)?r.variants:[];if(o.length===0||o.every(l=>l?.rule?.__resolveType===Ps))return null;const d=[];for(const l of o){const a=l?.value;if(a&&typeof a=="object")for(const c of Vt(a,e)??[])d.includes(c)||d.push(c)}return d}if(js(s)){const o=r.section&&typeof r.section=="object"?Vt(r.section,e):[];return o===null?null:o.length?[s,...o]:[s]}return[s]}function Ge(t){return t.replace(/[`*_]/g,"\\$&")}function co(t,e){const r=[`The user selected an element on the live preview and asked: **"${Ge(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&r.push(`**Section resolveType:** \`${Ge(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const s=`<${t.tag}${t.classes?` class="${Ge(t.classes)}"`:""}>`;r.push(`**Clicked element:** \`${s}\``),t.parents&&r.push(`**DOM breadcrumb:** ${Ge(t.parents)} > ${t.tag}`),t.text&&r.push(`**Text content:** "${Ge(t.text)}"`),t.componentName&&r.push(`**Component name:** ${Ge(t.componentName)}`);const o=t.html.replace(/```/g,"`` `");return r.push("","**HTML snippet:**","```html",o,"```"),r.push("","Please read the source file, locate the element, and apply the requested change."),r.join(`
|
|
518
|
-
`)}function uo(t,e,r=320,s=44,o=12){const{x:u,y:d}=t,{width:l,height:a}=e,c=Math.max(o,Math.min(u-r/2,l-r-o)),p=d/a>.68?Math.max(o,d-s-18):Math.min(d+18,a-s-o);return{leftPct:c/l*100,topPct:p/a*100}}function mo(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[o,u]=x.useState(""),d=x.useRef(null),{sendMessage:l}=Vr(),{openSidePanel:a}=$s(),c=Ce();let h;e[0]!==r||e[1]!==o||e[2]!==s||e[3]!==a||e[4]!==l?(h=()=>{if(!o.trim())return;const D=co(r,o);a(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=uo(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let v;e[19]!==o||e[20]!==y||e[21]!==S?(v=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:o,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=S,e[22]=v):v=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let $;e[27]!==c?($=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let B;e[38]!==v||e[39]!==O||e[40]!==k?(B=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[v,O]}),e[38]=v,e[39]=O,e[40]=k,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const _n="site-links",fo=/details?page|\bpdp\b/i,po=/listingpage|\bplp\b/i;function ho(t,e,r){const s=new Set;for(const l of r)fo.test(l)&&s.add("product"),po.test(l)&&s.add("category");const o=wt(Qt(t)),u=o[o.length-1],d=o[o.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const go=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):go.flatMap(s=>t(s))}function vo(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const or=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function xo(t){const e=new Set;for(const r of t){const s=Zt(r);or.has(s)&&e.add(s)}return e}function bo(t,e){const r=Zt(t);return!or.has(r)||e.size===0?!0:e.has(r)}const yo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>vo(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:No}];function wo(t,e,r=new Set){const s=[...e],o=l=>{const a=[];for(const c of yo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&bo(p,r));h&&a.push({cand:c,resolveType:h})}return a.find(c=>r.has(Zt(c.resolveType)))??a[0]},u=(l,a,c)=>({kind:l.kind,id:`${l.kind}:${a}`,resolveType:a,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(a,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const a=o(l);a&&d.push(u(a.cand,a.resolveType,!1))}return t.size>0&&d.push(ko(t.has("category")?"category":"product")),d}function ko(t){return{kind:t,id:_n,resolveType:_n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>_o(e,r)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function So(t,e,r){const s=new Set,o=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=He(d);if(!l)return;const a=l.__resolveType;if(typeof a=="string"){if(r(a))s.add(a);else if(a in e&&!o.has(a)){o.add(a);const c=He(e[a])?.__resolveType;typeof c=="string"&&r(c)&&s.add(a),u(e[a])}}for(const c of Object.values(l))u(c)};return u(t),s}function ir(t){const e=new Set,r=[];for(const s of t)for(const o of s)e.has(o.value)||(e.add(o.value),r.push(o));return r}function ar(t){try{return decodeURIComponent(t)}catch{return t}}function Po(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jo(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=Po(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function lr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const o=wt(Qt(e)),{pattern:u,order:d}=jo(o),l=d.indexOf(r);if(l===-1)return null;const a=s.match(u);if(!a)return null;const c=a[l+1]?.replace(/^\/+|\/+$/g,"");return c?ar(c):null}function xt(t,e){const r=He(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],o=[],u=new Set;for(const d of s){const l=He(d);if(!l)continue;const a=lr(l.url,e.template,e.paramName);if(!a||u.has(a))continue;u.add(a);const c=He(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||a,p=Array.isArray(l.image)?He(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;o.push({value:a,label:h,image:f})}return o}function Eo(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?ar(r):null}function No(t){const e=[],r=new Set,s=(o,u)=>{const d=He(o);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",a=l?[...u,l]:u,c=Eo(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:a.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,a)};if(Array.isArray(t))for(const o of t)s(o,[]);return e}const Co=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Ro(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function To(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,o=0;for(;(s=r.exec(t))!==null&&o++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Lo(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const a=t.slice(u.index,u.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:a||void 0})}return e}function _o(t,e){const r=[],s=new Set,o=(u,d,l,a)=>{if(r.length>=200)return;const c=lr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&Co.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:Ro(c),kind:l,image:a}))};for(const{url:u,name:d,image:l}of Lo(t))o(u,d,"product",l);for(const{href:u,text:d}of To(t))u.startsWith("/")&&!u.startsWith("//")&&o(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const cr=1e4;function Oo(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function Do(t,{resolveType:e,props:r}){const s=await fetch(ds(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(cr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function On(t,e){const r=await fetch(us(t,e),{signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Ao(t,e,r){const s=e.optionsFromPayload(await On(t,"/"),r),o=s.find(d=>d.kind==="category");if(!o)return s;const u=Fe(r.template,{[r.paramName]:o.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await On(t,u),r).filter(l=>l.kind==="product");return ir([s,d])}catch{return s}}function Mo(t,e,r){return $r.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Fo(t,e,r,s){if(e.homepageLinks)return Ao(t,e,s);const o=e.buildRequests?.(r)??[];if(o.length===0)return[];const u=await Promise.allSettled(o.map(l=>Do(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(a=>a.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ir(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,o){return{queryKey:Mo(t,e,r),queryFn:()=>Fo(t,e,r,s),enabled:o,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:o,template:u,paramName:d,keyPrefix:l,onSelect:a}=t;if(o.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(Xn,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>a(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Hn,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=a,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=o.map(p),e[0]=s,e[1]=l,e[2]=a,e[3]=o,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Qn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function Dn(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function $o(t){const e=pe.c(52),{sources:r,template:s,paramName:o,value:u,sandboxRef:d,onCommit:l}=t,a=Ce(),[c,h]=x.useState(!1),[p,f]=x.useState(""),[E,g]=x.useState(""),w=x.useRef(null),b=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,k=Oo(a),y=[...new Set(r.map(U=>k[U.kind].noun))].join(" or ");let S;e[0]!==a||e[1]!==y?(S=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=a,e[1]=y,e[2]=S):S=e[2];const v=S,P={template:s,paramName:o};let M;e[3]!==p?(M=(U,T)=>({source:U,query:T,options:U.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,$=r.filter(Vo),W=r.filter(Wo),K=Wt({queries:$.map(U=>qt(d,U,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(U,T)=>j(U,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=$.map(R),B=O.length===0||O.every(Uo),V=Wt({queries:W.map(U=>qt(d,U,E,P,c&&B))});let D;e[8]!==V||e[9]!==j?(D=(U,T)=>j(U,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const H=W.map(D),A=B?H:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(Ho),p),Y=tt(L.filter(Ko),p),de=Z.length>0&&Y.length>0,q=U=>{h(U),w.current&&clearTimeout(w.current),f(U?u:""),g(U?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=U=>{f(U),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(U)},300)},e[11]=X):X=e[11];const ee=X,J=U=>{l(U),q(!1)},ue=qn(p),re=Fe(s,{[o]:ue}),G=er,ie=Zn,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=zo;let te;e[12]!==b||e[13]!==a?(te=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=a,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(tr,{className:"sr-only",children:n.jsx(nr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Hn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==a?(ne=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=zs,Re=!1,$e="min-h-0 flex-1";let ge;e[25]!==v||e[26]!==p?(ge=n.jsx(Ks,{autoFocus:!0,placeholder:v,value:p,onValueChange:ee}),e[25]=v,e[26]=p,e[27]=ge):ge=e[27];const Qe=Is,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==a?(Te=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(Hs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const Be=ue&&n.jsx(Qn,{className:"shrink-0",children:n.jsxs(Xn,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Bs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:o,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:o,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(U=>{const{source:T,query:fe,options:Me}=U,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Xe=fe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Xe.filter(Io),p),template:s,paramName:o,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Xe.filter(Bo),p),template:s,paramName:o,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:o,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Qe||e[33]!==je||e[34]!==Be||e[35]!==De?(Ae=n.jsxs(Qe,{className:Oe,children:[je,Be,De]}),e[32]=Qe,e[33]=je,e[34]=Be,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:$e,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let Ue;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(Ue=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:U=>{U.stopPropagation(),q(!0)},children:u||b}),Ue]})}function Bo(t){return t.kind==="product"}function Io(t){return t.kind!=="product"}function zo(t){return t.stopPropagation()}function Ko(t){return t.kind==="product"}function Ho(t){return t.kind!=="product"}function Uo(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Wo(t){return t.isFallback}function Vo(t){return!t.isFallback}function qo(t){const e=pe.c(8),{sources:r,template:s,paramName:o,sandboxRef:u,onFill:d}=t;let l,a;if(e[0]!==o||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:o},g=r.filter(Go);a=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=o,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=a}else l=e[4],a=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=a(c),[p,f]=x.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function Go(t){return!t.isFallback}function Jo(t){const e=pe.c(31),{name:r,value:s,onCommit:o}=t,u=Ce(),[d,l]=x.useState(s),[a,c]=x.useState(!1),h=x.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==o||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=qn(d);l(j),j!==s&&o(j)},e[12]=d,e[13]=o,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Yo,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let v;e[22]!==g||e[23]!==S?(v=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=v):v=e[24];let P;e[25]!==a||e[26]!==u?(P=a&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(ts,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==v?(M=n.jsxs(n.Fragment,{children:[v,P]}),e[28]=P,e[29]=v,e[30]=M):M=e[30],M}function Yo(t){return t.stopPropagation()}function Qo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Xo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Zo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Wn(r);let o;return e[2]!==t||e[3]!==s?(o={mutationFn:async u=>{const{name:d,path:l,template:a}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=ms(d),h=a?{...a,name:d,path:l}:fs(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=o):o=e[4],Br(o)}function ei(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:o,error:u,templates:d,onSubmit:l}=t,a=o===void 0?!1:o,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=x.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=x.useState(E),[b,k]=x.useState(It),[N,y]=x.useState(null),[S,v]=x.useState(r);r!==S&&(v(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==a||e[5]!==s?(M=ne=>{!ne&&!a&&(y(null),s(!1))},e[4]=a,e[5]=s,e[6]=M):M=e[6];const j=M;let $;e[7]!==a||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?($=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||a)return;const Pe=Gn(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=a,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=$):$=e[13];const W=$,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(tr,{children:n.jsx(nr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let B;e[18]!==c?(B=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let H;e[23]!==c?(H=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=H):H=e[24];let A;e[25]!==a||e[26]!==p||e[27]!==H?(A=n.jsx(En,{id:"new-page-name",value:p,onChange:D,placeholder:H,autoFocus:!0,disabled:a}),e[25]=a,e[26]=p,e[27]=H,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==a||e[40]!==g||e[41]!==Y?(de=n.jsx(En,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:a}),e[39]=a,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==a||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(ps,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:a})]}),e[46]=a,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==a||e[64]!==ue||e[65]!==re?(G=n.jsx(Ye,{type:"button",variant:"outline",onClick:ue,disabled:a,children:re}),e[63]=a,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==a||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||a,e[67]=a,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==a||e[72]!==c?(xe=a?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Ye,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Us,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(Zn,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(er,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function ti(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,blockKey:a}=t,c=Ce();let h;e[0]!==o||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:o},e[0]=o,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Wn(h);let f;e[4]!==p?(f=vs((v,P)=>p.mutate({blockKey:v,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==a||e[7]!==l?(g=hs(l,a),e[6]=a,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let P;return e[11]!==v?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=P):P=e[12],P}const N=`loader:${a}`;let y;e[13]!==a||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:a,resolveType:w,title:k},e[13]=a,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==o||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(gs,{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ni,onSaveReferencedBlock:E,showRun:!1},N),e[17]=o,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ni(){}function ri(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function An(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ri(t.error)}}function si(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function oi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=si(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const ii="https://github.com/decocms/blocks";function ai(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ns,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let o;t[3]!==e?(o=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=o):o=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Un,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Ye,{size:"sm",asChild:!0,children:n.jsxs("a",{href:ii,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let a;return t[10]!==s||t[11]!==o||t[12]!==l?(a=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:o,actions:l}),t[10]=s,t[11]=o,t[12]=l,t[13]=a):a=t[13],a}function li(t){const e=pe.c(15),{source:r,onRetry:s}=t,o=Ce();let u;e[0]!==r||e[1]!==o?(u=o(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=o,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ws,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let a;e[4]!==o?(a=o("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==o?(c=o("mainPanelTabs.blocksTabStates.retry"),e[6]=o,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Ye,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==a||e[13]!==h?(p=n.jsx(Xt,{image:l,title:a,description:d,actions:h}),e[11]=d,e[12]=a,e[13]=h,e[14]=p):p=e[14],p}const ci=x.lazy(()=>Ir(()=>import("./sections-editor-D24EQfD8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:o}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:a}=St(),c=zn(),h=Jt(),p=rr(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==a||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:a??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=a,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Yt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Vn(w,N),S=oi({lifecyclePhase:c.lifecycle.phase,decofile:An(k),meta:An(y),hasEditableContent:Es(k.data,y.data),fastPreviewActive:Kn(r).runtime==="cms"}),v=di;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(zr,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(ai,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=v(n.jsx(li,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>v(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(ti,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let $;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?($=j||!l?null:Jn(Yn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=$):$=e[33];const W=$;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const B=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",H=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==B||e[39]!==o||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==H||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(x.Suspense,{fallback:V,children:n.jsx(ci,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:H,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:o},B)})),e[35]=O,e[36]=R,e[37]=K,e[38]=B,e[39]=o,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=H,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function di(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Fn(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:o,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:a,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==a||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=a?{orgSlug:l.slug,virtualMcpId:r,branch:a,threadId:c??null,previewUrl:p}:null,e[0]=a,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Yt(f),w=a??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=xs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,v=g.data!==void 0&&y===void 0,P=!a||v||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let $;e[12]!==s||e[13]!==P||e[14]!==k?($=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=$):$=e[15];const W=$;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],x.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let B;e[22]!==d?(B=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=B):B=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Vs,{size:14}),e[24]=V):V=e[24];let D;e[25]!==o||e[26]!==B?(D=n.jsx(Ye,{variant:"ghost",size:"icon",onClick:o,"aria-label":B,className:"size-7 shrink-0",children:V}),e[25]=o,e[26]=B,e[27]=D):D=e[27];let H;e[28]!==D||e[29]!==O?(H=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=H):H=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==v||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):v?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(qs,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=v,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==H||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,A]}),e[41]=H,e[42]=A,e[43]=I):I=e[43],I}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ui(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function mi(t){return dr({contentEditingEnabled:sr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function fi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const pi=500,hi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},$n=1,Ht=["desktop","mobile","tablet"],Bn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function In(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function gi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ut(t,e){try{return new URL(t,e).href}catch{return null}}function vi(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function xi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function bi(t,e,r){const s=t.toLowerCase(),o=e.toLowerCase(),u=o.split("/").filter(Boolean),d=a=>{if(a===r)return 100;const c=a.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(a[c-1]??"")&&(h+=20),h+=Math.round(r.length/a.length*20),h};let l=Math.max(d(s),d(o));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function yi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function wi({virtualMcpId:t}){const e=Ce(),r=Fs(),s=Zr(),{currentBranch:o,taskId:u,virtualMcpId:d}=St(),l=rr(),a=qr(d===t?t:null),c=Kn(t),h=Gs(a?.metadata?.ui?.layout??null),p=sr(h),f=dr({contentEditingEnabled:p,isMobile:s}),[E,g]=x.useState(()=>mi({cmsMode:h,isMobile:s})),[w,b]=x.useState("desktop"),[k,N]=x.useState(null),[y,S]=x.useState(null),v=x.useRef(null),P=x.useRef(null),[M,j]=x.useState(!1),$=x.useRef(null),W=()=>{$.current?.flush(),j(!1)},K=()=>j(i=>(i&&$.current?.flush(),!i)),[R,O]=x.useState({width:0,height:0}),[B,V]=x.useState(null),[D,H]=x.useState(!1),[A,I]=x.useState(""),Q=x.useRef(null),[L,Z]=x.useState(!1),[Y,de]=x.useState(),[q,X]=x.useState(null),[ee,J]=x.useState(null),[ue,re]=x.useState(null),[G,ie]=x.useState("/"),[xe,me]=x.useState(null),[te,ae]=x.useState({}),[be,ne]=x.useState(!1),le=x.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),$e=zn(),ge=Jt(),Qe=ge.vmEntry,Oe=ge.previewUrl,Te=$e.lifecycle.phase,je=Te==="running",Be=a?.id===t?Xr(a.metadata):null,De=a?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Ts({sandboxUrl:Oe,previewServerUrl:Be,fastPreviewActive:De}),Le=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null,previewUrl:Oe}:null,Ue=Yt(Le,{fetchEnabled:je}),U=Vn(Le,{fetchEnabled:je}),T=Ue.data,fe=U.data,Me=T?Ns(T).sort((i,m)=>i.name.localeCompare(m.name)):[],Pt=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o}:null,Xe=Zo(Pt),jt=T&&fe?Cs(T,fe):[],en=T&&fe?bs(fe,T,"loaders"):[],We=A?(()=>{const i=A.toLowerCase();return Me.map(m=>({page:m,score:bi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(i=>i.key===ee)??null:null,Ee=Qt,Nt=q||ee?null:Rs(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const i=ys(fe,"loaders"),m=z?T[z]:void 0,C=So(m,T,oe=>i.has(oe)),_=xo(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=ho(G,oe.name,C),ke=wo(_e,i,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null}:null,rn=T&&z?ws(T,z,0):[],sn=T?ks(rn,T):[],Tt=sn.map(i=>i.isSavedBlock?i.label:""),Lt=sn.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),_t=rn.map(i=>Vt(i,T??{})),on=x.useRef(null),Ne=x.useRef(null),ur=$e.status.state==="paused",Ot=$e.phase,an=Ss({claimPhase:Ot,lifecycle:$e.lifecycle}),Ie=ge.previewState,mr=ge.userStopped,fr=As(Re.slug,t??"",o??""),{url:ze}=Ds(De&&t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,previewServerUrl:Be??null,path:ye}:null),pr=Ae&&c.runtime==="sandbox",F=eo({previewState:Ie,progressStatus:an.status,previewServerUrl:Be,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:pr}),Ze=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,hr=!r,qe=F.mode==="production"?ln:bt(Oe),gr=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&gr&&f&&E==="blocks",cn=x.useRef(null),{pin:vr,effective:xr}=vi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=vr;const we=gi(F.mode==="sandbox"?ht(In(ue??Ut(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&hr?ht(In(Ls(ue??xr??Ut(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?_s:null),w),l.state.variantOverride??[]):null);x.useEffect(()=>{},[r,ln,B]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ut(ye,F.iframeBase):null),br=F.mode==="production"?un?ht(un,l.state.variantOverride??[]):null:we??F.iframeBase,yr=async()=>{const i=br;if(i){window.open(i,"_blank","noopener");return}},it=t&&o?Yn(Re.slug,t,o):null,at=i=>{it&&Ms(it,i)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const i=te[ce.key]??{};Ne.current=Fe(ce.path,i),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:i})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const i=jt.find(m=>m.key===ce.key);if(i){Ne.current=null;const m=Pn(fe);J(null),X(i),re(jn(ve,m,i.key))}}},[ce,ve,fe,te]),x.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,wr]=x.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const i=mn!==null;wr(Ie.previewUrl);const m=it?Jn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else i&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=so({iframeRef:v,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=x.useRef(null);x.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const i=v.current;i&&i.getAttribute("src")!==we&&(se(),i.src=we)},[ze,we]);const hn=()=>{const i=v.current?.contentWindow,m=qe;if(!i||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Os({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=ht(_.src,l.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const i={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=xi(Dt.current,i);Dt.current=i,m&&hn()},[T,et,q,ee,z,ye,G]);const At=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const i=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:i},!(!m||m.page!==z||m.sig===i)&&hn()},[l.state.variantOverride,et,q,ee,z]);const kr=!!t&&!!o&&!$e.notFound&&!mr&&!ur&&(Ot?.kind==="ready"||Te!=="idle"),he=fi({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});x.useEffect(()=>{const i=qe;if(!i)return;const m=C=>{if(C.origin===i)if(C.data?.type==="visual-editor::element-clicked"){const _=oo.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=lo.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},i)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[qe,Tt,Lt,_t]);const gn=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::activate",script:io},m)},Sr=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:Ln}}:{type:"visual-editor::activate",script:Ln},m),i.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},Pr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},jr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},Ft=i=>{if(i==="blocks"&&!f)return;const m=E;!s&&i!==m&&(i==="blocks"?P.current?.resize("30%"):P.current?.collapse()),i!=="blocks"&&W(),g(i),N(null),S(null),i!=="blocks"&&J(null),m==="visual"&&Sr(),i==="visual"&&gn(),m==="blocks"&&i!=="blocks"&&Pr(),i==="blocks"&&Mt()},Er=()=>{Ft(ui(E,f))},Nr=()=>{if(!v.current||!we)return;se();const i=v.current;i.src=we};Jr(()=>{const i=v.current;if(!i)return;se();const m=document.activeElement,C=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),yi(i,on.current);let _;const oe=()=>{clearTimeout(_),i.tabIndex=C,i.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===i)&&m?.focus(),i.removeEventListener("load",oe)};i.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Cr=()=>{const i=Ht.indexOf(w);b(Ht[(i+1)%Ht.length])},$t=(i,m)=>{if(!z)return;const C=z,_={...Ve,[i]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Qo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Bt=i=>{const m=te[i.key]??{},C=Fe(i.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(i.key),ie(i.path),at({path:i.path,pageKey:i.key,params:m}),l.selectTarget({kind:"page",key:i.key,path:i.path})},Rr=i=>{if(!ve||!fe){yn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=Pn(fe),C=jn(ve,m,i.key);X(i),J(null),re(C),S(null),l.selectTarget({kind:"section",key:i.key})},Tr=i=>{f&&(X(null),J(i.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:i.key}))},Lr=async({name:i,path:m,templateKey:C})=>{if(!t||!o)return;const _=Gn(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Xe.mutateAsync({name:i,path:oe,template:_e});Z(!1),yn.success(e("sandbox.preview.pageCreated",{name:i})),await Qr(pi),Bt({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Ze&&(kr||F.mode==="production"),_r=Xo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Nr,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(Kr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),_r?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>H(i=>!i),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(wn,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Sn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((i,m)=>{if(i.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:i.text},`text-${m}`);const C=Rt[i.name];return C&&ot?n.jsx($o,{sources:C,template:G,paramName:i.name,value:Ve[i.name]??"",sandboxRef:ot,onCommit:_=>$t(i.name,_)},`${z}:${i.name}`):n.jsx(Jo,{name:i.name,value:Ve[i.name]??"",onCommit:_=>$t(i.name,_)},`${z}:${i.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>H(i=>!i),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(es,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(ls,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:i=>I(i.target.value),onKeyDown:i=>{if(i.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(i.preventDefault(),H(!1),I(""),Bt(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:i=>{i.preventDefault(),H(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Bt(i)},children:[n.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.path})]},i.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Rr(i)},children:[n.jsx(wn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Tr(i)},children:[n.jsx(Sn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{"aria-label":e(dn),onClick:()=>{yr()},children:n.jsx(Un,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,Or=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Dr=F.mode==="sandbox",ct=hi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*$n),bn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*$n):1,1),Ar=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/bn}px`:`${ct.height}px`,transform:`scale(${bn})`,transformOrigin:"top center"},Mr=Ze?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Dr&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Er,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(kn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Cr,"aria-label":e(Bn[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(ss,{size:16}),w==="tablet"&&n.jsx(os,{size:16}),w==="desktop"&&n.jsx(is,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e(Bn[w])})]})]})}):null,Fr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([i,m])=>(Ve[i]??"")===""?n.jsx(qo,{sources:m,template:G,paramName:i,sandboxRef:ot,onFill:C=>$t(i,C)},`${z}:${i}`):null),n.jsx(cs.Topbar.Center.Portal,{fallback:lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),children:Or}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Fr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Nn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(gt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(Cn,{withHandle:!0}),n.jsx(gt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Nn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(Cn,{withHandle:!0})]}),n.jsx(gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:i=>{if(!i)return;const m=()=>O(_=>_.width===i.clientWidth&&_.height===i.clientHeight?_:{width:i.clientWidth,height:i.clientHeight});m();const C=new ResizeObserver(m);return C.observe(i),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Ze&&!dt&&"bg-muted/30"),children:[(be||fr)&&Ze&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(kn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(mo,{element:k,onDismiss:()=>N(null)}),Mr,Ze&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Ar,onMouseLeave:jr,children:n.jsx("iframe",{ref:v,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Hr("vm_preview_loaded",{view_mode:he,vm_id:Qe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(i)!==Ee(m))||Ee(i)===Ee(ye))return;ie(i),at({path:i,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(ei,{open:L,onOpenChange:Z,isPending:Xe.isPending,error:Y,templates:Me,onSubmit:Lr})]})}function ki(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),o=Gr(r),{activeTask:u,taskId:d,currentBranch:l}=St(),a=Qs(d),[c,h]=x.useState(!1);if(Ys({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(o?.metadata),threadHasRepo:Kt(a)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Rn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Rn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Ye,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let v;e[15]!==c?(v=n.jsx(Js,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let P;return e[17]!==S||e[18]!==v?(P=n.jsxs(n.Fragment,{children:[S,v]}),e[17]=S,e[18]=v,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(wi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function ud(){const t=pe.c(2),e=Xs();let r;return t[0]!==e?(r=n.jsx(Ur,{tabId:"site-editor",children:n.jsx(Wr,{feature:"cms",children:n.jsx(ki,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{ud as default};
|
|
518
|
+
`)}function uo(t,e,r=320,s=44,o=12){const{x:u,y:d}=t,{width:l,height:a}=e,c=Math.max(o,Math.min(u-r/2,l-r-o)),p=d/a>.68?Math.max(o,d-s-18):Math.min(d+18,a-s-o);return{leftPct:c/l*100,topPct:p/a*100}}function mo(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[o,u]=x.useState(""),d=x.useRef(null),{sendMessage:l}=Vr(),{openSidePanel:a}=$s(),c=Ce();let h;e[0]!==r||e[1]!==o||e[2]!==s||e[3]!==a||e[4]!==l?(h=()=>{if(!o.trim())return;const D=co(r,o);a(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=uo(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let v;e[19]!==o||e[20]!==y||e[21]!==S?(v=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:o,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=S,e[22]=v):v=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let $;e[27]!==c?($=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let B;e[38]!==v||e[39]!==O||e[40]!==k?(B=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[v,O]}),e[38]=v,e[39]=O,e[40]=k,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const _n="site-links",fo=/details?page|\bpdp\b/i,po=/listingpage|\bplp\b/i;function ho(t,e,r){const s=new Set;for(const l of r)fo.test(l)&&s.add("product"),po.test(l)&&s.add("category");const o=wt(Qt(t)),u=o[o.length-1],d=o[o.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const go=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):go.flatMap(s=>t(s))}function vo(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const or=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function xo(t){const e=new Set;for(const r of t){const s=Zt(r);or.has(s)&&e.add(s)}return e}function bo(t,e){const r=Zt(t);return!or.has(r)||e.size===0?!0:e.has(r)}const yo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>vo(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:No}];function wo(t,e,r=new Set){const s=[...e],o=l=>{const a=[];for(const c of yo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&bo(p,r));h&&a.push({cand:c,resolveType:h})}return a.find(c=>r.has(Zt(c.resolveType)))??a[0]},u=(l,a,c)=>({kind:l.kind,id:`${l.kind}:${a}`,resolveType:a,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(a,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const a=o(l);a&&d.push(u(a.cand,a.resolveType,!1))}return t.size>0&&d.push(ko(t.has("category")?"category":"product")),d}function ko(t){return{kind:t,id:_n,resolveType:_n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>_o(e,r)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function So(t,e,r){const s=new Set,o=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=He(d);if(!l)return;const a=l.__resolveType;if(typeof a=="string"){if(r(a))s.add(a);else if(a in e&&!o.has(a)){o.add(a);const c=He(e[a])?.__resolveType;typeof c=="string"&&r(c)&&s.add(a),u(e[a])}}for(const c of Object.values(l))u(c)};return u(t),s}function ir(t){const e=new Set,r=[];for(const s of t)for(const o of s)e.has(o.value)||(e.add(o.value),r.push(o));return r}function ar(t){try{return decodeURIComponent(t)}catch{return t}}function Po(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jo(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=Po(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function lr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const o=wt(Qt(e)),{pattern:u,order:d}=jo(o),l=d.indexOf(r);if(l===-1)return null;const a=s.match(u);if(!a)return null;const c=a[l+1]?.replace(/^\/+|\/+$/g,"");return c?ar(c):null}function xt(t,e){const r=He(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],o=[],u=new Set;for(const d of s){const l=He(d);if(!l)continue;const a=lr(l.url,e.template,e.paramName);if(!a||u.has(a))continue;u.add(a);const c=He(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||a,p=Array.isArray(l.image)?He(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;o.push({value:a,label:h,image:f})}return o}function Eo(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?ar(r):null}function No(t){const e=[],r=new Set,s=(o,u)=>{const d=He(o);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",a=l?[...u,l]:u,c=Eo(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:a.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,a)};if(Array.isArray(t))for(const o of t)s(o,[]);return e}const Co=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function Ro(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function To(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,o=0;for(;(s=r.exec(t))!==null&&o++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Lo(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const a=t.slice(u.index,u.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:a||void 0})}return e}function _o(t,e){const r=[],s=new Set,o=(u,d,l,a)=>{if(r.length>=200)return;const c=lr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&Co.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:Ro(c),kind:l,image:a}))};for(const{url:u,name:d,image:l}of Lo(t))o(u,d,"product",l);for(const{href:u,text:d}of To(t))u.startsWith("/")&&!u.startsWith("//")&&o(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const cr=1e4;function Oo(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function Do(t,{resolveType:e,props:r}){const s=await fetch(ds(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(cr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function On(t,e){const r=await fetch(us(t,e),{signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Ao(t,e,r){const s=e.optionsFromPayload(await On(t,"/"),r),o=s.find(d=>d.kind==="category");if(!o)return s;const u=Fe(r.template,{[r.paramName]:o.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await On(t,u),r).filter(l=>l.kind==="product");return ir([s,d])}catch{return s}}function Mo(t,e,r){return $r.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Fo(t,e,r,s){if(e.homepageLinks)return Ao(t,e,s);const o=e.buildRequests?.(r)??[];if(o.length===0)return[];const u=await Promise.allSettled(o.map(l=>Do(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(a=>a.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ir(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,o){return{queryKey:Mo(t,e,r),queryFn:()=>Fo(t,e,r,s),enabled:o,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:o,template:u,paramName:d,keyPrefix:l,onSelect:a}=t;if(o.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(Xn,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>a(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Hn,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=a,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=o.map(p),e[0]=s,e[1]=l,e[2]=a,e[3]=o,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Qn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function Dn(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function $o(t){const e=pe.c(52),{sources:r,template:s,paramName:o,value:u,sandboxRef:d,onCommit:l}=t,a=Ce(),[c,h]=x.useState(!1),[p,f]=x.useState(""),[E,g]=x.useState(""),w=x.useRef(null),b=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,k=Oo(a),y=[...new Set(r.map(U=>k[U.kind].noun))].join(" or ");let S;e[0]!==a||e[1]!==y?(S=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=a,e[1]=y,e[2]=S):S=e[2];const v=S,P={template:s,paramName:o};let M;e[3]!==p?(M=(U,T)=>({source:U,query:T,options:U.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,$=r.filter(Vo),W=r.filter(Wo),K=Wt({queries:$.map(U=>qt(d,U,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(U,T)=>j(U,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=$.map(R),B=O.length===0||O.every(Uo),V=Wt({queries:W.map(U=>qt(d,U,E,P,c&&B))});let D;e[8]!==V||e[9]!==j?(D=(U,T)=>j(U,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const H=W.map(D),A=B?H:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(Ho),p),Y=tt(L.filter(Ko),p),de=Z.length>0&&Y.length>0,q=U=>{h(U),w.current&&clearTimeout(w.current),f(U?u:""),g(U?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=U=>{f(U),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(U)},300)},e[11]=X):X=e[11];const ee=X,J=U=>{l(U),q(!1)},ue=qn(p),re=Fe(s,{[o]:ue}),G=er,ie=Zn,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=zo;let te;e[12]!==b||e[13]!==a?(te=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=a,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(tr,{className:"sr-only",children:n.jsx(nr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Hn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==a?(ne=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=zs,Re=!1,$e="min-h-0 flex-1";let ge;e[25]!==v||e[26]!==p?(ge=n.jsx(Ks,{autoFocus:!0,placeholder:v,value:p,onValueChange:ee}),e[25]=v,e[26]=p,e[27]=ge):ge=e[27];const Qe=Is,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==a?(Te=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(Hs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const Be=ue&&n.jsx(Qn,{className:"shrink-0",children:n.jsxs(Xn,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Bs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:o,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:o,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(U=>{const{source:T,query:fe,options:Me}=U,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Xe=fe.data??[];return n.jsxs(x.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Xe.filter(Io),p),template:s,paramName:o,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Xe.filter(Bo),p),template:s,paramName:o,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:o,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Qe||e[33]!==je||e[34]!==Be||e[35]!==De?(Ae=n.jsxs(Qe,{className:Oe,children:[je,Be,De]}),e[32]=Qe,e[33]=je,e[34]=Be,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:$e,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let Ue;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(Ue=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:U=>{U.stopPropagation(),q(!0)},children:u||b}),Ue]})}function Bo(t){return t.kind==="product"}function Io(t){return t.kind!=="product"}function zo(t){return t.stopPropagation()}function Ko(t){return t.kind==="product"}function Ho(t){return t.kind!=="product"}function Uo(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Wo(t){return t.isFallback}function Vo(t){return!t.isFallback}function qo(t){const e=pe.c(8),{sources:r,template:s,paramName:o,sandboxRef:u,onFill:d}=t;let l,a;if(e[0]!==o||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:o},g=r.filter(Go);a=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=o,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=a}else l=e[4],a=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=a(c),[p,f]=x.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function Go(t){return!t.isFallback}function Jo(t){const e=pe.c(31),{name:r,value:s,onCommit:o}=t,u=Ce(),[d,l]=x.useState(s),[a,c]=x.useState(!1),h=x.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==o||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=qn(d);l(j),j!==s&&o(j)},e[12]=d,e[13]=o,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Yo,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let v;e[22]!==g||e[23]!==S?(v=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=v):v=e[24];let P;e[25]!==a||e[26]!==u?(P=a&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(ts,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==v?(M=n.jsxs(n.Fragment,{children:[v,P]}),e[28]=P,e[29]=v,e[30]=M):M=e[30],M}function Yo(t){return t.stopPropagation()}function Qo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Xo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Zo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Wn(r);let o;return e[2]!==t||e[3]!==s?(o={mutationFn:async u=>{const{name:d,path:l,template:a}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=ms(d),h=a?{...a,name:d,path:l}:fs(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=o):o=e[4],Br(o)}function ei(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:o,error:u,templates:d,onSubmit:l}=t,a=o===void 0?!1:o,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=x.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=x.useState(E),[b,k]=x.useState(It),[N,y]=x.useState(null),[S,v]=x.useState(r);r!==S&&(v(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==a||e[5]!==s?(M=ne=>{!ne&&!a&&(y(null),s(!1))},e[4]=a,e[5]=s,e[6]=M):M=e[6];const j=M;let $;e[7]!==a||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?($=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||a)return;const Pe=Gn(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=a,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=$):$=e[13];const W=$,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(tr,{children:n.jsx(nr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let B;e[18]!==c?(B=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let H;e[23]!==c?(H=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=H):H=e[24];let A;e[25]!==a||e[26]!==p||e[27]!==H?(A=n.jsx(En,{id:"new-page-name",value:p,onChange:D,placeholder:H,autoFocus:!0,disabled:a}),e[25]=a,e[26]=p,e[27]=H,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==a||e[40]!==g||e[41]!==Y?(de=n.jsx(En,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:a}),e[39]=a,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==a||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(ps,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:a})]}),e[46]=a,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==a||e[64]!==ue||e[65]!==re?(G=n.jsx(Ye,{type:"button",variant:"outline",onClick:ue,disabled:a,children:re}),e[63]=a,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==a||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||a,e[67]=a,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==a||e[72]!==c?(xe=a?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Ye,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Us,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(Zn,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(er,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function ti(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,blockKey:a}=t,c=Ce();let h;e[0]!==o||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:o},e[0]=o,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Wn(h);let f;e[4]!==p?(f=vs((v,P)=>p.mutate({blockKey:v,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==a||e[7]!==l?(g=hs(l,a),e[6]=a,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let P;return e[11]!==v?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=P):P=e[12],P}const N=`loader:${a}`;let y;e[13]!==a||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:a,resolveType:w,title:k},e[13]=a,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==o||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(gs,{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ni,onSaveReferencedBlock:E,showRun:!1},N),e[17]=o,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ni(){}function ri(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function An(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ri(t.error)}}function si(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function oi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=si(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const ii="https://github.com/decocms/blocks";function ai(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ns,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let o;t[3]!==e?(o=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=o):o=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Un,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Ye,{size:"sm",asChild:!0,children:n.jsxs("a",{href:ii,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let a;return t[10]!==s||t[11]!==o||t[12]!==l?(a=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:o,actions:l}),t[10]=s,t[11]=o,t[12]=l,t[13]=a):a=t[13],a}function li(t){const e=pe.c(15),{source:r,onRetry:s}=t,o=Ce();let u;e[0]!==r||e[1]!==o?(u=o(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=o,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ws,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let a;e[4]!==o?(a=o("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==o?(c=o("mainPanelTabs.blocksTabStates.retry"),e[6]=o,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Ye,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==a||e[13]!==h?(p=n.jsx(Xt,{image:l,title:a,description:d,actions:h}),e[11]=d,e[12]=a,e[13]=h,e[14]=p):p=e[14],p}const ci=x.lazy(()=>Ir(()=>import("./sections-editor-B1LpXw4X.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:o}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:a}=St(),c=zn(),h=Jt(),p=rr(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==a||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:a??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=a,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Yt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Vn(w,N),S=oi({lifecyclePhase:c.lifecycle.phase,decofile:An(k),meta:An(y),hasEditableContent:Es(k.data,y.data),fastPreviewActive:Kn(r).runtime==="cms"}),v=di;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(zr,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=v(n.jsx(ai,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=v(n.jsx(li,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>v(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(ti,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let $;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?($=j||!l?null:Jn(Yn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=$):$=e[33];const W=$;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const B=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",H=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==B||e[39]!==o||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==H||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(x.Suspense,{fallback:V,children:n.jsx(ci,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:H,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:o},B)})),e[35]=O,e[36]=R,e[37]=K,e[38]=B,e[39]=o,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=H,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function di(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Fn(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:o,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:a,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==a||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=a?{orgSlug:l.slug,virtualMcpId:r,branch:a,threadId:c??null,previewUrl:p}:null,e[0]=a,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Yt(f),w=a??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=xs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,v=g.data!==void 0&&y===void 0,P=!a||v||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let $;e[12]!==s||e[13]!==P||e[14]!==k?($=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=$):$=e[15];const W=$;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],x.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let B;e[22]!==d?(B=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=B):B=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Vs,{size:14}),e[24]=V):V=e[24];let D;e[25]!==o||e[26]!==B?(D=n.jsx(Ye,{variant:"ghost",size:"icon",onClick:o,"aria-label":B,className:"size-7 shrink-0",children:V}),e[25]=o,e[26]=B,e[27]=D):D=e[27];let H;e[28]!==D||e[29]!==O?(H=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=H):H=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==v||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):v?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(qs,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=v,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==H||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,A]}),e[41]=H,e[42]=A,e[43]=I):I=e[43],I}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ui(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function mi(t){return dr({contentEditingEnabled:sr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function fi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const pi=500,hi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},$n=1,Ht=["desktop","mobile","tablet"],Bn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function In(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function gi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ut(t,e){try{return new URL(t,e).href}catch{return null}}function vi(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function xi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function bi(t,e,r){const s=t.toLowerCase(),o=e.toLowerCase(),u=o.split("/").filter(Boolean),d=a=>{if(a===r)return 100;const c=a.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(a[c-1]??"")&&(h+=20),h+=Math.round(r.length/a.length*20),h};let l=Math.max(d(s),d(o));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function yi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function wi({virtualMcpId:t}){const e=Ce(),r=Fs(),s=Zr(),{currentBranch:o,taskId:u,virtualMcpId:d}=St(),l=rr(),a=qr(d===t?t:null),c=Kn(t),h=Gs(a?.metadata?.ui?.layout??null),p=sr(h),f=dr({contentEditingEnabled:p,isMobile:s}),[E,g]=x.useState(()=>mi({cmsMode:h,isMobile:s})),[w,b]=x.useState("desktop"),[k,N]=x.useState(null),[y,S]=x.useState(null),v=x.useRef(null),P=x.useRef(null),[M,j]=x.useState(!1),$=x.useRef(null),W=()=>{$.current?.flush(),j(!1)},K=()=>j(i=>(i&&$.current?.flush(),!i)),[R,O]=x.useState({width:0,height:0}),[B,V]=x.useState(null),[D,H]=x.useState(!1),[A,I]=x.useState(""),Q=x.useRef(null),[L,Z]=x.useState(!1),[Y,de]=x.useState(),[q,X]=x.useState(null),[ee,J]=x.useState(null),[ue,re]=x.useState(null),[G,ie]=x.useState("/"),[xe,me]=x.useState(null),[te,ae]=x.useState({}),[be,ne]=x.useState(!1),le=x.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),$e=zn(),ge=Jt(),Qe=ge.vmEntry,Oe=ge.previewUrl,Te=$e.lifecycle.phase,je=Te==="running",Be=a?.id===t?Xr(a.metadata):null,De=a?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Ts({sandboxUrl:Oe,previewServerUrl:Be,fastPreviewActive:De}),Le=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null,previewUrl:Oe}:null,Ue=Yt(Le,{fetchEnabled:je}),U=Vn(Le,{fetchEnabled:je}),T=Ue.data,fe=U.data,Me=T?Ns(T).sort((i,m)=>i.name.localeCompare(m.name)):[],Pt=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o}:null,Xe=Zo(Pt),jt=T&&fe?Cs(T,fe):[],en=T&&fe?bs(fe,T,"loaders"):[],We=A?(()=>{const i=A.toLowerCase();return Me.map(m=>({page:m,score:bi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(i=>i.key===ee)??null:null,Ee=Qt,Nt=q||ee?null:Rs(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const i=ys(fe,"loaders"),m=z?T[z]:void 0,C=So(m,T,oe=>i.has(oe)),_=xo(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=ho(G,oe.name,C),ke=wo(_e,i,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null}:null,rn=T&&z?ws(T,z,0):[],sn=T?ks(rn,T):[],Tt=sn.map(i=>i.isSavedBlock?i.label:""),Lt=sn.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),_t=rn.map(i=>Vt(i,T??{})),on=x.useRef(null),Ne=x.useRef(null),ur=$e.status.state==="paused",Ot=$e.phase,an=Ss({claimPhase:Ot,lifecycle:$e.lifecycle}),Ie=ge.previewState,mr=ge.userStopped,fr=As(Re.slug,t??"",o??""),{url:ze}=Ds(De&&t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,previewServerUrl:Be??null,path:ye}:null),pr=Ae&&c.runtime==="sandbox",F=eo({previewState:Ie,progressStatus:an.status,previewServerUrl:Be,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:pr}),Ze=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,hr=!r,qe=F.mode==="production"?ln:bt(Oe),gr=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&gr&&f&&E==="blocks",cn=x.useRef(null),{pin:vr,effective:xr}=vi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=vr;const we=gi(F.mode==="sandbox"?ht(In(ue??Ut(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&hr?ht(In(Ls(ue??xr??Ut(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?_s:null),w),l.state.variantOverride??[]):null);x.useEffect(()=>{},[r,ln,B]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ut(ye,F.iframeBase):null),br=F.mode==="production"?un?ht(un,l.state.variantOverride??[]):null:we??F.iframeBase,yr=async()=>{const i=br;if(i){window.open(i,"_blank","noopener");return}},it=t&&o?Yn(Re.slug,t,o):null,at=i=>{it&&Ms(it,i)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const i=te[ce.key]??{};Ne.current=Fe(ce.path,i),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:i})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const i=jt.find(m=>m.key===ce.key);if(i){Ne.current=null;const m=Pn(fe);J(null),X(i),re(jn(ve,m,i.key))}}},[ce,ve,fe,te]),x.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,wr]=x.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const i=mn!==null;wr(Ie.previewUrl);const m=it?Jn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else i&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=so({iframeRef:v,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=x.useRef(null);x.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const i=v.current;i&&i.getAttribute("src")!==we&&(se(),i.src=we)},[ze,we]);const hn=()=>{const i=v.current?.contentWindow,m=qe;if(!i||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Os({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=ht(_.src,l.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const i={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=xi(Dt.current,i);Dt.current=i,m&&hn()},[T,et,q,ee,z,ye,G]);const At=x.useRef(null);x.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const i=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:i},!(!m||m.page!==z||m.sig===i)&&hn()},[l.state.variantOverride,et,q,ee,z]);const kr=!!t&&!!o&&!$e.notFound&&!mr&&!ur&&(Ot?.kind==="ready"||Te!=="idle"),he=fi({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});x.useEffect(()=>{const i=qe;if(!i)return;const m=C=>{if(C.origin===i)if(C.data?.type==="visual-editor::element-clicked"){const _=oo.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=lo.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},i)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[qe,Tt,Lt,_t]);const gn=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::activate",script:io},m)},Sr=()=>{const i=v.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:Ln}}:{type:"visual-editor::activate",script:Ln},m),i.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},Pr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},jr=()=>{const i=v.current?.contentWindow,m=qe;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},Ft=i=>{if(i==="blocks"&&!f)return;const m=E;!s&&i!==m&&(i==="blocks"?P.current?.resize("30%"):P.current?.collapse()),i!=="blocks"&&W(),g(i),N(null),S(null),i!=="blocks"&&J(null),m==="visual"&&Sr(),i==="visual"&&gn(),m==="blocks"&&i!=="blocks"&&Pr(),i==="blocks"&&Mt()},Er=()=>{Ft(ui(E,f))},Nr=()=>{if(!v.current||!we)return;se();const i=v.current;i.src=we};Jr(()=>{const i=v.current;if(!i)return;se();const m=document.activeElement,C=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),yi(i,on.current);let _;const oe=()=>{clearTimeout(_),i.tabIndex=C,i.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===i)&&m?.focus(),i.removeEventListener("load",oe)};i.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Cr=()=>{const i=Ht.indexOf(w);b(Ht[(i+1)%Ht.length])},$t=(i,m)=>{if(!z)return;const C=z,_={...Ve,[i]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Qo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Bt=i=>{const m=te[i.key]??{},C=Fe(i.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(i.key),ie(i.path),at({path:i.path,pageKey:i.key,params:m}),l.selectTarget({kind:"page",key:i.key,path:i.path})},Rr=i=>{if(!ve||!fe){yn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=Pn(fe),C=jn(ve,m,i.key);X(i),J(null),re(C),S(null),l.selectTarget({kind:"section",key:i.key})},Tr=i=>{f&&(X(null),J(i.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:i.key}))},Lr=async({name:i,path:m,templateKey:C})=>{if(!t||!o)return;const _=Gn(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Xe.mutateAsync({name:i,path:oe,template:_e});Z(!1),yn.success(e("sandbox.preview.pageCreated",{name:i})),await Qr(pi),Bt({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Ze&&(kr||F.mode==="production"),_r=Xo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Nr,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(Kr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),_r?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>H(i=>!i),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(wn,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Sn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((i,m)=>{if(i.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:i.text},`text-${m}`);const C=Rt[i.name];return C&&ot?n.jsx($o,{sources:C,template:G,paramName:i.name,value:Ve[i.name]??"",sandboxRef:ot,onCommit:_=>$t(i.name,_)},`${z}:${i.name}`):n.jsx(Jo,{name:i.name,value:Ve[i.name]??"",onCommit:_=>$t(i.name,_)},`${z}:${i.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>H(i=>!i),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(es,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(ls,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:i=>I(i.target.value),onKeyDown:i=>{if(i.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(i.preventDefault(),H(!1),I(""),Bt(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:i=>{i.preventDefault(),H(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Bt(i)},children:[n.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.path})]},i.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Rr(i)},children:[n.jsx(wn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Tr(i)},children:[n.jsx(Sn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{"aria-label":e(dn),onClick:()=>{yr()},children:n.jsx(Un,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,Or=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Dr=F.mode==="sandbox",ct=hi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*$n),bn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*$n):1,1),Ar=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/bn}px`:`${ct.height}px`,transform:`scale(${bn})`,transformOrigin:"top center"},Mr=Ze?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Dr&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Er,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(kn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Cr,"aria-label":e(Bn[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(ss,{size:16}),w==="tablet"&&n.jsx(os,{size:16}),w==="desktop"&&n.jsx(is,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e(Bn[w])})]})]})}):null,Fr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([i,m])=>(Ve[i]??"")===""?n.jsx(qo,{sources:m,template:G,paramName:i,sandboxRef:ot,onFill:C=>$t(i,C)},`${z}:${i}`):null),n.jsx(cs.Topbar.Center.Portal,{fallback:lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),children:Or}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Fr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Nn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(gt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(Cn,{withHandle:!0}),n.jsx(gt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Nn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Fn,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(Cn,{withHandle:!0})]}),n.jsx(gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:i=>{if(!i)return;const m=()=>O(_=>_.width===i.clientWidth&&_.height===i.clientHeight?_:{width:i.clientWidth,height:i.clientHeight});m();const C=new ResizeObserver(m);return C.observe(i),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Ze&&!dt&&"bg-muted/30"),children:[(be||fr)&&Ze&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(kn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(mo,{element:k,onDismiss:()=>N(null)}),Mr,Ze&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Ar,onMouseLeave:jr,children:n.jsx("iframe",{ref:v,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Hr("vm_preview_loaded",{view_mode:he,vm_id:Qe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(i)!==Ee(m))||Ee(i)===Ee(ye))return;ie(i),at({path:i,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(ei,{open:L,onOpenChange:Z,isPending:Xe.isPending,error:Y,templates:Me,onSubmit:Lr})]})}function ki(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),o=Gr(r),{activeTask:u,taskId:d,currentBranch:l}=St(),a=Qs(d),[c,h]=x.useState(!1);if(Ys({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(o?.metadata),threadHasRepo:Kt(a)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Rn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Rn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Ye,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let v;e[15]!==c?(v=n.jsx(Js,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let P;return e[17]!==S||e[18]!==v?(P=n.jsxs(n.Fragment,{children:[S,v]}),e[17]=S,e[18]=v,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(wi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function ud(){const t=pe.c(2),e=Xs();let r;return t[0]!==e?(r=n.jsx(Ur,{tabId:"site-editor",children:n.jsx(Wr,{feature:"cms",children:n.jsx(ki,{virtualMcpId:e})})}),t[0]=e,t[1]=r):r=t[1],r}export{ud as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,G as l}from"./index-Dc7hzqoi.js";import{C as u}from"./index-BH7uCYoT.js";import{AppViewContent as c}from"./project-app-view-8VWdrWMf.js";import{S as d}from"./settings-tab-D1V5Uszb.js";import{a as f}from"./use-virtual-mcp-DkK7ErtB.js";import"./use-mobile-hIijCK0k.js";import"./index-CSd_k8Np.js";import"./resizable-Bt7dvMCc.js";import"./MessageCircle01-DBcg2aiD.js";import"./thread-route-BBf64Mwk.js";import"./use-panel-navigate-WrD0KEYx.js";import"./use-project-scope-DU0-JxYr.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-Djaj_cL9.js";import"./hooks-DZOMRp7D.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./backoff-8mStPHYB.js";import"./task-board-DrUf5p-Z.js";import"./schema-1zAO-l7e.js";import"./tooltip-DV2xHesQ.js";import"./index-DWw5wi2G.js";import"./toolbar-icon-button-PuQFE8Y9.js";import"./gateway-client-BuiOykcN.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-tools-g86k4oib.js";import"./sandbox-lifecycle-context-C7VKOJoV.js";import"./use-session-runtime-BR1aW1y5.js";import"./thread-intent-F-sZEflj.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-tZCX_cqt.js";import"./autosend-BberXmli.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-Dl7pAsQ5.js";import"./use-ai-providers-BnF5Rw_n.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BpuQrfKN.js";import"./use-organization-settings-CKbX2SdA.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BTjC7Gse.js";import"./types-27TVsPN_.js";import"./shell-layout-Ce0aCJuX.js";import"./avatar-C9HiP4eS.js";import"./User01-ClMaVCaJ.js";import"./Users03-Y0Jco4zL.js";import"./SearchLg-BrrPVuXr.js";import"./agent-icon-CczrFEe7.js";import"./AlertCircle-CMjsP_Tk.js";import"./Tool01-DouqPjim.js";import"./ArrowUp-Cii1LHW7.js";import"./ArrowLeft-CjYy5Nhj.js";import"./Tool02-CATStXCy.js";import"./ArrowRight-CLncCNat.js";import"./TrendUp01-BFAEMx9E.js";import"./ZoomOut-BPxprY2s.js";import"./CheckCircle-DHXQFnpK.js";import"./Check-B3RSsr_D.js";import"./ChevronUp-DiYhGG4T.js";import"./ChevronRight-USKkhEpL.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./DotsVertical-CsjwfYzf.js";import"./UserSquare-B2lKdt4w.js";import"./Copy01-nMxlBfeT.js";import"./CreditCard01-CWXVH3ZM.js";import"./Database01-C0YJpjc3.js";import"./Download01-BRrSA3Yx.js";import"./Printer-CvyxF9Jo.js";import"./Settings02-Cyf85ea0.js";import"./Eye-Dyg2WPG4.js";import"./File02-BvR-HYxK.js";import"./Share07-wC47qn2E.js";import"./GitBranch01-rWb2SJK9.js";import"./Globe01-D6FaaFR2.js";import"./SwitchHorizontal01-DpXsFGyJ.js";import"./HardDrive-DNTPLPT4.js";import"./Image01-CxnjAzbb.js";import"./Key01-CIXwHMRo.js";import"./Link01-C0FvgZZB.js";import"./LinkExternal01-AWlhN5o7.js";import"./Monitor01-Ccs1gh2Z.js";import"./Sun-0Ied-kyZ.js";import"./Package-nTbucmaQ.js";import"./Palette-DSdn1Xis.js";import"./Play-lMuWOObF.js";import"./Plus-CVauOqLT.js";import"./SearchMd-C45D2PMI.js";import"./Shield01-CqB4I7qm.js";import"./Stars01-oAh9h5b5.js";import"./Trash01-nl-t4IoV.js";import"./Upload01-B4Fqdkae.js";import"./Users01-BFhxJVhO.js";import"./XCircle-CleKT0Id.js";import"./XClose-BgzK-Dwz.js";import"./X-CFCE4a-Q.js";import"./Zap-B6zkqKWB.js";import"./download-app-dialog-D_4eQbbs.js";import"./dialog-llvhXw2o.js";import"./anchors-yqDzZN4K.js";import"./use-org-notice-CyiiFkRG.js";import"./command-palette-store-DK-56E2K.js";import"./command-B-XD29Nx.js";import"./index-BD213WLU.js";import"./integration-icon-BeEdjsn9.js";import"./project-icon-MWmzrrm8.js";import"./required-auth-layout-RoMNnMPO.js";import"./use-org-sso-BvfIL0yq.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-CClQCUMS.js";import"./companions-core-WMNDPuPs.js";import"./github-D4UJ99TO.js";import"./github-repo-scope-C8GSbvaz.js";import"./metadata-dUsYcpuu.js";import"./form-CSXgIHLz.js";import"./label-BMxIRiEr.js";import"./input-DXlaTX4w.js";import"./use-debounced-value-B9nG3bW5.js";import"./provision-repo-scoped-github-connection-B6zdkC6p.js";import"./extract-connection-data-Dbm_cKaX.js";import"./connection-DD0omVHZ.js";import"./useQueries-C-SV8tD7.js";import"./authenticate-and-persist-oauth-DkJ4g-X5.js";import"./mcp-oauth-C4khbNJJ.js";import"./track-ZuOMvhd2.js";import"./build-improve-prompt-doc-Cedp3vV1.js";import"./empty-state-CyICQznD.js";import"./use-date-fns-locale-onM9TTf8.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-connection-Ba04fHwa.js";import"./alert-dialog-BI-B_8hq.js";import"./textarea-BU6xemAP.js";import"./use-debounced-autosave-DqyNKPJM.js";import"./popover-yk_ePqAA.js";import"./scroll-area-C-wtbVS1.js";import"./select-BkKPcZFe.js";import"./add-connection-dialog-DZjTm9W3.js";import"./collection-search-J9Bt25gS.js";import"./connection-card-fcMCwbTh.js";import"./use-registry-connections-SLFMHpqj.js";import"./useInfiniteQuery-CspLjV7h.js";import"./infiniteQueryObserver-CjWlcBHD.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-BIjkXMV3.js";import"./connection-form-helpers-CHlcdgAK.js";import"./collection-tabs-CrXIJeNf.js";import"./badge-Bu51Hlti.js";import"./use-infinite-scroll-PhBGPm8H.js";import"./useSuspenseInfiniteQuery-BiQYAhJn.js";import"./dropdown-menu-C5iafa8S.js";import"./file-type-icon-C9Qn36v4.js";import"./use-org-fs-Du-ErRPs.js";import"./checkbox-jLf7fBuW.js";import"./search-input-Pobww52G.js";import"./use-mcp-auth-status-I377R0Kg.js";import"./use-mcp-prompts-DJRXjL4_.js";import"./utils-CVEq3hMx.js";import"./switch-BQFtt3BH.js";import"./use-project-native-view-presence-DWzPH-Sc.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-DYGSdjth.js";import"./site-slug-uya6Wp4-.js";import"./optimistic-project-sidebar-views-CrZ9OeIk.js";import"./breadcrumb-Dhdru7Jh.js";import"./virtual-mcp-ldxphi5G.js";import"./repository-import-picker-DhVniDI2.js";import"./use-navigate-to-agent-C8pu0B4z.js";import"./repository-picker-BkoSI-jm.js";import"./github-icon-huXDOAgf.js";import"./use-secrets-DVry--sz.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function Si(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{Si as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,C as p,G as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,C as p,G as m}from"./index-Dc7hzqoi.js";import{u as f}from"./use-main-panel-tabs-sSRGo66A.js";import{a as I}from"./thread-route-BBf64Mwk.js";import{r as h}from"./use-panel-navigate-WrD0KEYx.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
|