decocms 4.384.1 → 4.384.2
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-DXrZ6SzB.js → AlertCircle-CL2g6hBv.js} +1 -1
- package/dist/client/assets/{AreaChart-CXORXrmM.js → AreaChart-DzyaUucV.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D7adHwja.js → ArrowLeft-BqNlqHdb.js} +1 -1
- package/dist/client/assets/{ArrowRight-BveFFy2z.js → ArrowRight-yUmRMyFa.js} +1 -1
- package/dist/client/assets/{ArrowUp-CqB5FCTU.js → ArrowUp-doBsDpEd.js} +1 -1
- package/dist/client/assets/{CartesianChart-CIKBGRx6.js → CartesianChart-uXd0KXWF.js} +1 -1
- package/dist/client/assets/{CheckCircle-DMlFOadx.js → CheckCircle-DNXT9LQw.js} +1 -1
- package/dist/client/assets/{ChevronUp-k_EOf84B.js → ChevronUp-Dc2CzZ9J.js} +1 -1
- package/dist/client/assets/{Copy01-EMXGNAiO.js → Copy01-CALkaT8p.js} +1 -1
- package/dist/client/assets/{CreditCard01-CiyU0eR_.js → CreditCard01-BGb46j0w.js} +1 -1
- package/dist/client/assets/{DotsVertical-DhvTdpnP.js → DotsVertical-DDZN-DIr.js} +1 -1
- package/dist/client/assets/{Download01-CsHqAVNu.js → Download01-CFSTXr8x.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Dj2GKSRV.js → ErrorBarContext-Bmb4OVsC.js} +1 -1
- package/dist/client/assets/{Eye-Bi64tP-D.js → Eye-B_-FUDkf.js} +1 -1
- package/dist/client/assets/{Globe01-BWRc6bbu.js → Globe01-DYZzNFRa.js} +1 -1
- package/dist/client/assets/{Globe04-BTVlItdV.js → Globe04-DE66YFpd.js} +1 -1
- package/dist/client/assets/{Image01-8PFZYS9P.js → Image01-D0SI0eJx.js} +1 -1
- package/dist/client/assets/{Key01-EHOZ3vmu.js → Key01-CGyx-jB1.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DuadrTfl.js → LayoutLeft-CduVrmTY.js} +1 -1
- package/dist/client/assets/{Line-CTNXXmhw.js → Line-Bpvsuvfl.js} +1 -1
- package/dist/client/assets/{Link01-KARtnBxY.js → Link01-b3QVbtfw.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DslZPBGz.js → LinkExternal01-PpT-VqQv.js} +1 -1
- package/dist/client/assets/{Monitor01-Crab2RRF.js → Monitor01-tps0G-eA.js} +1 -1
- package/dist/client/assets/{Package-jUQ-QNQ_.js → Package-DmJJ2zwx.js} +1 -1
- package/dist/client/assets/{Palette-DqyEATuR.js → Palette-H25arUUw.js} +1 -1
- package/dist/client/assets/{Play-DIcksfye.js → Play-CN9QsFKm.js} +1 -1
- package/dist/client/assets/{Plus-BHRPkby-.js → Plus-BB6-c5sU.js} +1 -1
- package/dist/client/assets/{SearchLg-C4rS8AcZ.js → SearchLg-CExd0K4D.js} +1 -1
- package/dist/client/assets/{SearchMd-DxK3_oZM.js → SearchMd-pcanFLxJ.js} +1 -1
- package/dist/client/assets/{Sector-5gq5keNL.js → Sector-DTbZ5GzK.js} +1 -1
- package/dist/client/assets/{Settings02-Bs5wKTy4.js → Settings02-Cql2YRRu.js} +1 -1
- package/dist/client/assets/{Share07-CUM6Dqvb.js → Share07-DZnJoaaB.js} +1 -1
- package/dist/client/assets/{Stars01-BvVFnZBk.js → Stars01-koEVpHBg.js} +1 -1
- package/dist/client/assets/{Sun-x_EXvKiQ.js → Sun-DHu0BtRe.js} +1 -1
- package/dist/client/assets/{Tool01-5X6uedg8.js → Tool01-BfvHlgMO.js} +1 -1
- package/dist/client/assets/{Tool02-CR95_N0f.js → Tool02-4AGlMp3_.js} +1 -1
- package/dist/client/assets/{Trash01-CsZj7add.js → Trash01-CoDSwhlk.js} +1 -1
- package/dist/client/assets/{TrendUp01-B7EaxChV.js → TrendUp01-CUQslKNc.js} +1 -1
- package/dist/client/assets/{Upload01-B0aywPN-.js → Upload01-eY69lxYq.js} +1 -1
- package/dist/client/assets/{User01-C_8SVY7B.js → User01-DClxObx9.js} +1 -1
- package/dist/client/assets/{UserSquare-zbEMpwdU.js → UserSquare-yxnFTjmA.js} +1 -1
- package/dist/client/assets/{Users01-CV_KxvLX.js → Users01-Z1l_JeRj.js} +1 -1
- package/dist/client/assets/{X-B9OR2y1D.js → X-DIdmvXi5.js} +1 -1
- package/dist/client/assets/{XCircle-DOFffLSN.js → XCircle-CrmJoBI1.js} +1 -1
- package/dist/client/assets/{XClose-CmbUUKkG.js → XClose-C9HE5_ie.js} +1 -1
- package/dist/client/assets/{Zap-0kUaigVh.js → Zap-gDYafaw-.js} +1 -1
- package/dist/client/assets/{ZoomOut-DalZqqCw.js → ZoomOut-CPqhC1BT.js} +1 -1
- package/dist/client/assets/{access-gate-Bb_ib-N1.js → access-gate-BKr55tJT.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DU2-q29K.js → add-connection-dialog-CVIbPpXW.js} +1 -1
- package/dist/client/assets/{agent-analytics-sscDITo7.js → agent-analytics-DQHSh_JX.js} +1 -1
- package/dist/client/assets/agent-app-CWPHz33P.js +1 -0
- package/dist/client/assets/{agent-assets-vEGmPVHw.js → agent-assets-DTLvLzK0.js} +1 -1
- package/dist/client/assets/{agent-automation-Dxq_18nl.js → agent-automation-BRgbXQGv.js} +1 -1
- package/dist/client/assets/{agent-automations-2L8oRO9W.js → agent-automations-DOMZzOzv.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Do_JSp98.js → agent-connect-sources-CJ58x-7G.js} +1 -1
- package/dist/client/assets/agent-deck-KaJwQbTV.js +1 -0
- package/dist/client/assets/{agent-e2e-Clsl7KyJ.js → agent-e2e-CCdbL8Xu.js} +1 -1
- package/dist/client/assets/{agent-experiments-DJ2Hw8uJ.js → agent-experiments-KbprKLvH.js} +1 -1
- package/dist/client/assets/agent-file-52_nriI_.js +1 -0
- package/dist/client/assets/{agent-git-DleoItlD.js → agent-git-BLxhnCXQ.js} +1 -1
- package/dist/client/assets/{agent-hosting-DQvN7Fny.js → agent-hosting-B5naTGpH.js} +1 -1
- package/dist/client/assets/{agent-icon-DLq4L2Ao.js → agent-icon-Cd4WgvSY.js} +1 -1
- package/dist/client/assets/agent-library-file-DunOvps7.js +1 -0
- package/dist/client/assets/{agent-monitor-MAoNBZM4.js → agent-monitor-DGc5wRri.js} +1 -1
- package/dist/client/assets/{agent-overview-CGPEv6_t.js → agent-overview-BXX-t4TM.js} +1 -1
- package/dist/client/assets/agent-settings-CU_GXHrT.js +1 -0
- package/dist/client/assets/{agent-site-editor-Nplaug8n.js → agent-site-editor-U3bu2qCe.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DPIv2TMg.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-Axgk8yq4.js → agent-site-editor-content-8bbTea8s.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-Bxd28KmI.js → agent-site-editor-preview-ChJDQx5H.js} +3 -3
- package/dist/client/assets/agent-view-DkGJFLPi.js +1 -0
- package/dist/client/assets/{agent-view-guard-V5STCUzo.js → agent-view-guard-CrodJew9.js} +1 -1
- package/dist/client/assets/{agents-list-CUwg87E-.js → agents-list-BBn3YJAX.js} +1 -1
- package/dist/client/assets/{ai-providers-too2IXUV.js → ai-providers-B9hDsTr9.js} +1 -1
- package/dist/client/assets/{alert-DFx1_vq0.js → alert-Dnc1OwUt.js} +1 -1
- package/dist/client/assets/{alert-dialog--j98vjuD.js → alert-dialog-BV6BL0PL.js} +1 -1
- package/dist/client/assets/api-keys-BNmoLSmg.js +1 -0
- package/dist/client/assets/{api-keys-B7Zokrrd.js → api-keys-CCMpftJx.js} +1 -1
- package/dist/client/assets/app-editor-CXfMTTnb.js +1 -0
- package/dist/client/assets/{asset-utils-g7RXB14P.js → asset-utils-BAPGdhel.js} +1 -1
- package/dist/client/assets/{auth-Dz9mRaTv.js → auth-BOVcch8v.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dg4mvru9.js → auth-catchall-DE9t2UFX.js} +1 -1
- package/dist/client/assets/{auth-entry-2wq3xm8h.js → auth-entry-CxQexJqU.js} +1 -1
- package/dist/client/assets/{auth-split-layout-6nyuJnor.js → auth-split-layout-eT5rEO4Y.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BNH6AGkF.js → authenticate-and-persist-oauth-Bq4Rx_LM.js} +1 -1
- package/dist/client/assets/{automation-list-row-DTelN69U.js → automation-list-row-CF-ugqN9.js} +1 -1
- package/dist/client/assets/{automation-runs-Dxt5rTNn.js → automation-runs-CXRY4ihl.js} +1 -1
- package/dist/client/assets/{automations-BKHsjXET.js → automations-BYnxukMx.js} +1 -1
- package/dist/client/assets/{autosend-BZKRqImC.js → autosend-aHWkl5NE.js} +1 -1
- package/dist/client/assets/{avatar-DevS79NO.js → avatar-ClWEwL-z.js} +1 -1
- package/dist/client/assets/{badge-B5sfAgyv.js → badge-V2_EYnYE.js} +1 -1
- package/dist/client/assets/{block-document-DQqSQfTf.js → block-document-Dh4KfQDb.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-3b3z48NA.js → blocks-preview-workspace-context-CObH2vdO.js} +1 -1
- package/dist/client/assets/{breadcrumb-CuxeEsiE.js → breadcrumb-DxvOAl4Z.js} +1 -1
- package/dist/client/assets/{buckets-DZL43_g7.js → buckets-Cm6RwHi7.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Gsk0rQPh.js → build-improve-prompt-doc-C0HV3Evo.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BnqZgf6u.js → bulk-category-panel-CeqnWYWi.js} +1 -1
- package/dist/client/assets/{calendar-CSJbftl5.js → calendar-BonOrtU-.js} +1 -1
- package/dist/client/assets/{capability-load-error-sIxX77fM.js → capability-load-error-DCFFcPkL.js} +1 -1
- package/dist/client/assets/category-editor-DSayEs2q.js +1 -0
- package/dist/client/assets/{chart-CWB4d9zp.js → chart-BBn4HmQQ.js} +1 -1
- package/dist/client/assets/{chat-context-C_38Spkt.js → chat-context-CR299TDT.js} +1 -1
- package/dist/client/assets/{chat-draft-C2Y7ngNf.js → chat-draft-BKtRPZeV.js} +1 -1
- package/dist/client/assets/{checkbox-sg-ezzoL.js → checkbox-B3iDQT4l.js} +1 -1
- package/dist/client/assets/{choose-editor-Dkt9a9o0.js → choose-editor-C_tZTnvs.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CONkf9-a.js → cli-auth-success-B6-7X3Fl.js} +1 -1
- package/dist/client/assets/{client-icons-BEKK0TZn.js → client-icons-DFyDJFTT.js} +1 -1
- package/dist/client/assets/{collapsible-B9sp1MZx.js → collapsible-nit0_hco.js} +1 -1
- package/dist/client/assets/{collection-detail-DvzvKgEI.js → collection-detail-J5DYpKII.js} +1 -1
- package/dist/client/assets/{collection-display-button-yYYde6Q2.js → collection-display-button-BHDqX-DX.js} +1 -1
- package/dist/client/assets/{collection-search-CGwYR_uT.js → collection-search-CIXgPHQU.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CDfbSuzA.js → collection-table-wrapper-D2ZcQRAO.js} +1 -1
- package/dist/client/assets/{collection-tabs-BXzRHkNV.js → collection-tabs-Ced_1P3B.js} +1 -1
- package/dist/client/assets/{combobox-D5eH9To8.js → combobox-Dld3bajr.js} +1 -1
- package/dist/client/assets/{command-ZfYjtuAl.js → command-BFopaNrK.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CBIG-0X4.js → companion-mcps-section-TM5maZVd.js} +1 -1
- package/dist/client/assets/{connect-layout-D9s0C3mQ.js → connect-layout-ZdT0I12j.js} +1 -1
- package/dist/client/assets/{connect-Eu9GeM87.js → connect-tbqEH_6g.js} +1 -1
- package/dist/client/assets/{connection-CTYIl1P4.js → connection-BSw7pzRm.js} +1 -1
- package/dist/client/assets/{connection-card-BqtXbL-v.js → connection-card-CzEduBCC.js} +1 -1
- package/dist/client/assets/{connection-detail-DbawaBsp.js → connection-detail-BREk9-YG.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BPSWaVDO.js → connection-form-helpers-C80XYT0F.js} +1 -1
- package/dist/client/assets/{connections-DBMztUZj.js → connections-DWnzB5FP.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-KYpVbGvC.js → create-organization-dialog-CzRq_uST.js} +1 -1
- package/dist/client/assets/{decofile-api-DAALQSQE.js → decofile-api-DzQykCnT.js} +1 -1
- package/dist/client/assets/{decopilot-BYcz3jno.js → decopilot-CE5pqqZH.js} +1 -1
- package/dist/client/assets/{dialog-Ep7gkNp4.js → dialog-2G-cQw5c.js} +1 -1
- package/dist/client/assets/{discover-eok0FXgg.js → discover-C6HtYxY1.js} +1 -1
- package/dist/client/assets/{domain-settings-D3OWm26W.js → domain-settings-Q8HjSWM5.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BJ8H_bRY.js → download-app-dialog-BkiFA22O.js} +1 -1
- package/dist/client/assets/{drawer-A7F0d8UD.js → drawer-DsN4VmdE.js} +1 -1
- package/dist/client/assets/{editor-B-GNLQkJ.js → editor-WAZQ2CEk.js} +1 -1
- package/dist/client/assets/{empty-state-9N9sPHXJ.js → empty-state-B1cRkX5K.js} +1 -1
- package/dist/client/assets/{empty-state-On4g7NCI.js → empty-state-Dcth7zyn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BOFrfyRH.js → extract-connection-data-AxblE4p8.js} +1 -1
- package/dist/client/assets/{feature-gate-kEpIeNmF.js → feature-gate-BRZIAztK.js} +1 -1
- package/dist/client/assets/{feature-paywall-ha_EsZpy.js → feature-paywall-BZu2_xNC.js} +1 -1
- package/dist/client/assets/{file-explorer--pnN8QXG.js → file-explorer-Cm2GH7D7.js} +1 -1
- package/dist/client/assets/{file-preview-D5A5LDPC.js → file-preview-DNvM7uzn.js} +1 -1
- package/dist/client/assets/{file-share-button-Dk6xpTyI.js → file-share-button-CTwUh9-F.js} +1 -1
- package/dist/client/assets/{file-type-icon-D7QysGoM.js → file-type-icon-BN_9SI7i.js} +1 -1
- package/dist/client/assets/{folder-icon-D2rVMvvv.js → folder-icon-DC8lInlG.js} +1 -1
- package/dist/client/assets/{form-7Lo4SdD_.js → form-Djun1QNL.js} +1 -1
- package/dist/client/assets/{gateway-client-DCte15fa.js → gateway-client-DRvKrGBc.js} +1 -1
- package/dist/client/assets/{general-iiCYDK2R.js → general-Dp4Bvm4s.js} +1 -1
- package/dist/client/assets/{github-icon-CSU4ajb7.js → github-icon-CpjMcSs2.js} +1 -1
- package/dist/client/assets/{home-_v5jbftg.js → home-OXtowKOh.js} +1 -1
- package/dist/client/assets/{hooks-DuIBlPGY.js → hooks-BZYmjCXU.js} +1 -1
- package/dist/client/assets/{hooks-D8SGg3an.js → hooks-DaelEUem.js} +1 -1
- package/dist/client/assets/{icon-button-DPRpkV3w.js → icon-button-DwYlPzUN.js} +1 -1
- package/dist/client/assets/{index-g-FgjHbl.js → index-BYMxdXbD.js} +1 -1
- package/dist/client/assets/{index-Cfhbhqg_.js → index-BcslvKns.js} +1 -1
- package/dist/client/assets/{index-BW6_fYfA.js → index-Bls8HNRj.js} +1 -1
- package/dist/client/assets/{index-BJ7_v32m.js → index-BmcZIG6I.js} +1 -1
- package/dist/client/assets/{index-C8G6PQfC.js → index-C9Rn21KI.js} +1 -1
- package/dist/client/assets/{index-DyvRNjV-.js → index-CIqnRBIS.js} +1 -1
- package/dist/client/assets/{index-ZV5TChxh.js → index-CXqVfpeT.js} +1 -1
- package/dist/client/assets/{index-DRk64_SI.js → index-DDtg2oc-.js} +1 -1
- package/dist/client/assets/{index-D4jXemPT.js → index-DFrjEBpS.js} +1 -1
- package/dist/client/assets/{index-C0aUmM3M.js → index-DMzJoorZ.js} +1 -1
- package/dist/client/assets/{index-BbKImTIi.js → index-DUMyrrY9.js} +1 -1
- package/dist/client/assets/{index-C4TAWeDP.js → index-Ddsmjhat.js} +1 -1
- package/dist/client/assets/{index-CNdpljun.js → index-DvH-nwdq.js} +2 -2
- package/dist/client/assets/{index-DaXGCVlJ.js → index-DvPeuoo_.js} +1 -1
- package/dist/client/assets/{index-redirect-AKNIbkic.js → index-redirect-9OhvIhyq.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-WcINROE-.js → infiniteQueryObserver-BkwDlHKY.js} +1 -1
- package/dist/client/assets/{infra-billing-C31e-vsh.js → infra-billing-CFbvfA_a.js} +1 -1
- package/dist/client/assets/{input-DD2FqIJD.js → input-B2NibJzZ.js} +1 -1
- package/dist/client/assets/{input-MZs4bQHH.js → input-BWgQhoD8.js} +1 -1
- package/dist/client/assets/{input-Chg2c8hI.js → input-BYV3Mzlx.js} +1 -1
- package/dist/client/assets/{integration-icon-PR06095a.js → integration-icon-UwqkSKd2.js} +1 -1
- package/dist/client/assets/{label-CEgqvjTx.js → label-CanEOsWK.js} +1 -1
- package/dist/client/assets/{last-preview-page-CzfPid_Z.js → last-preview-page-Cay0iLXz.js} +1 -1
- package/dist/client/assets/{layout-B_jMrUBL.js → layout-C-kdcMst.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CZ01u8b_.js → legacy-agents-deep-Bi8Z6x_x.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CAcG7CBg.js → legacy-main-redirect-DG5RQTLE.js} +1 -1
- package/dist/client/assets/{library-Dl9f7iEL.js → library-DYux7h5b.js} +1 -1
- package/dist/client/assets/{login-DJOyMfR7.js → login-B7qB_8dS.js} +1 -1
- package/dist/client/assets/{markdown-5uzbD6VU.js → markdown-srbLLrsA.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-6lbnwbz8.js → mcp-app-renderer-CknJJO0m.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DRPFV8Ni.js → mcp-oauth-DErZFwl3.js} +1 -1
- package/dist/client/assets/{members-Dh2ZO9T9.js → members-BQ1jkAlh.js} +1 -1
- package/dist/client/assets/{message-templates-DdU2KHcl.js → message-templates-bROsR-67.js} +1 -1
- package/dist/client/assets/{mini-report-page-CNblffjw.js → mini-report-page-D9yoqiv-.js} +1 -1
- package/dist/client/assets/{mock-board-Cj42XBqR.js → mock-board-DFVKg8L9.js} +3 -3
- package/dist/client/assets/{monaco-editor-YcYvcmpi.js → monaco-editor-bMyr3tAL.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Do1fA3gX.js → monitoring-stats-row-Cw-hEMgD.js} +1 -1
- package/dist/client/assets/{multi-select-DThyFtje.js → multi-select-iudNVzNR.js} +1 -1
- package/dist/client/assets/{mustache-ezl5DDdw.js → mustache-Bz3Is7Ci.js} +1 -1
- package/dist/client/assets/{oauth-callback-C5t4p2B2.js → oauth-callback-BYZhHscl.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B2_IL7YH.js → oauth-callback-ai-provider-D76Gzh5Y.js} +1 -1
- package/dist/client/assets/{onboarding-D4oOEPlK.js → onboarding-CYrrf9CY.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CHR9jMoH.js → optimistic-project-sidebar-views-DLaBZPO6.js} +1 -1
- package/dist/client/assets/{org-file-open-context-BSOmZpBS.js → org-file-open-context-B-Fg35Om.js} +1 -1
- package/dist/client/assets/{organization-choice-CQ_oSf0h.js → organization-choice-BSxQXHhn.js} +1 -1
- package/dist/client/assets/{orgs-BDWGu_3-.js → orgs-CV4Sm6S8.js} +1 -1
- package/dist/client/assets/{page-seo-form-DNrGr10O.js → page-seo-form-Btga6Joj.js} +1 -1
- package/dist/client/assets/{pair-D8FENe5Z.js → pair-BX6SRtxr.js} +1 -1
- package/dist/client/assets/{plan-ladder-DETz2ThM.js → plan-ladder-C2EuN2q6.js} +1 -1
- package/dist/client/assets/{popover-D2Z7_Tvr.js → popover-DmyHt-2h.js} +1 -1
- package/dist/client/assets/{post-calendar-Cip8s3_Q.js → post-calendar-B-hDkmiN.js} +1 -1
- package/dist/client/assets/{post-editor-C-PRABIi.js → post-editor-DfFFUsxK.js} +1 -1
- package/dist/client/assets/{preview-content-DHtRFMEr.js → preview-content-CutowE5z.js} +1 -1
- package/dist/client/assets/{preview-dialog-Cf84Ckqp.js → preview-dialog-DvnYXL1m.js} +1 -1
- package/dist/client/assets/{primitives-8CKU53Tr.js → primitives-2gJROCES.js} +1 -1
- package/dist/client/assets/{profile-B0t4CTKh.js → profile-CmvJSfgO.js} +1 -1
- package/dist/client/assets/{project-app-view-VbpeQsTe.js → project-app-view-CS1p4tFe.js} +1 -1
- package/dist/client/assets/{project-feed-CN-Ezs6b.js → project-feed-DlnhI6NA.js} +1 -1
- package/dist/client/assets/{project-icon-H5FrSPJO.js → project-icon-DtWWc_Fg.js} +1 -1
- package/dist/client/assets/project-reports-CEhDAHEs.js +1 -0
- package/dist/client/assets/project-tasks-BIa4reml.js +1 -0
- package/dist/client/assets/{prompts-OTiuFTXY.js → prompts-Ck5ImUb9.js} +1 -1
- package/dist/client/assets/record-editor-DD047j9y.js +1 -0
- package/dist/client/assets/{redirect-editor-sBjSfk-Y.js → redirect-editor-D9ceU7cX.js} +1 -1
- package/dist/client/assets/registry-Bja-zxmj.js +2 -0
- package/dist/client/assets/{registry-layout-sUiWg3M0.js → registry-layout-CFM49iM3.js} +1 -1
- package/dist/client/assets/{reports-rqI9VF3E.js → reports-Dxk2lCOw.js} +1 -1
- package/dist/client/assets/reports-Vr68UJmX.js +1 -0
- package/dist/client/assets/{reports-onboarding-gUwLEqeu.js → reports-onboarding-BtWC_Tsc.js} +1 -1
- package/dist/client/assets/{reports-tab-BMsMjX6b.js → reports-tab-ayNCwhlc.js} +2 -2
- package/dist/client/assets/{repositories-RJZ_9Cd8.js → repositories-Dj08EpEg.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BBP7KuOG.js → repository-import-picker-CWkH9CnD.js} +1 -1
- package/dist/client/assets/{repository-picker-C2_oqXTC.js → repository-picker-BgSLJeNo.js} +1 -1
- package/dist/client/assets/{require-capability-DjMvq0Kg.js → require-capability-CUlSdcqO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C5L42ZZt.js → required-auth-layout-i35y0evL.js} +1 -1
- package/dist/client/assets/{reset-password-SR1oN615.js → reset-password-Be3PNkDP.js} +1 -1
- package/dist/client/assets/{resizable-CdFoIU6A.js → resizable-DXC545x4.js} +1 -1
- package/dist/client/assets/{review-settings-r-y9evaj.js → review-settings-Bt1FfEOi.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CGZpZOT-.js → rich-text-link-control-CqkMC3kO.js} +1 -1
- package/dist/client/assets/{roles-BxlGbIOP.js → roles-CFwRhdBZ.js} +1 -1
- package/dist/client/assets/{route-DlXqj7Kj.js → route-B7iJkjNW.js} +1 -1
- package/dist/client/assets/{route-DS5unWTs.js → route-BmVIGdu4.js} +1 -1
- package/dist/client/assets/{route-page-header-uHzDO22N.js → route-page-header-CjwQCjT6.js} +1 -1
- package/dist/client/assets/{route-Dv2VWgfK.js → route-vGcGBdl7.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-C5tq8_-0.js → runnable-block-editor-Cv64jlMo.js} +1 -1
- package/dist/client/assets/sandbox-git-api-B1R0585s.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-czmbXmtE.js → sandbox-lifecycle-context-r4oc1CgX.js} +1 -1
- package/dist/client/assets/{schema-B6UYFOiW.js → schema-xJ7U_asm.js} +1 -1
- package/dist/client/assets/{scroll-area-DycqXJW5.js → scroll-area-KLqiO1VQ.js} +1 -1
- package/dist/client/assets/{search-input-BoYU-WLk.js → search-input-BwVXUnNC.js} +1 -1
- package/dist/client/assets/{search-toggle-DWVvj0KE.js → search-toggle-COXJwtkQ.js} +1 -1
- package/dist/client/assets/{secrets-B8xxsSB_.js → secrets-CSym3jGA.js} +1 -1
- package/dist/client/assets/{sections-editor-DoCkeSuj.js → sections-editor-DexxIIq5.js} +1 -1
- package/dist/client/assets/{select-CzmZ0exo.js → select-CMaNbPPd.js} +1 -1
- package/dist/client/assets/{select-model-BMG95zD9.js → select-model-BnUKdsMx.js} +1 -1
- package/dist/client/assets/{seo-editor-CgA7R1AE.js → seo-editor-QO0Y9aap.js} +1 -1
- package/dist/client/assets/{separator-scIwJT-K.js → separator-DdNaSPpK.js} +1 -1
- package/dist/client/assets/{settings-tab-xOdCZ6hZ.js → settings-tab-Crb-CdN4.js} +1 -1
- package/dist/client/assets/{sheet-Big3YL-7.js → sheet-CCbrydch.js} +1 -1
- package/dist/client/assets/{shell-layout-BkECXLU7.js → shell-layout-C2j46sCx.js} +1 -1
- package/dist/client/assets/{sidebar-DSdLAxOi.js → sidebar-CbhdB9UQ.js} +1 -1
- package/dist/client/assets/{skill-preview-d7lD7NA7.js → skill-preview-fSUcbWaT.js} +1 -1
- package/dist/client/assets/{skills-DdHpDwHe.js → skills-llaWPEGB.js} +1 -1
- package/dist/client/assets/{sso-o7oNUwyx.js → sso-DIgjRkxz.js} +1 -1
- package/dist/client/assets/{store-DO9MBgG9.js → store-Cc_kjAsF.js} +1 -1
- package/dist/client/assets/store-registry-CcTXC5Jd.js +2 -0
- package/dist/client/assets/{switch-DNg8Qgce.js → switch-DgkvwxDL.js} +1 -1
- package/dist/client/assets/{synced-repos-CX7ANp8p.js → synced-repos-Bx5jASbd.js} +1 -1
- package/dist/client/assets/{table-N3sFzY9O.js → table-BBW479Qc.js} +1 -1
- package/dist/client/assets/{tabs-lbbUV-Fe.js → tabs-BfXcQInD.js} +1 -1
- package/dist/client/assets/{task-board-DmTmT7UC.js → task-board-DlYdtE3b.js} +1 -1
- package/dist/client/assets/{task-route-BAwBBnHg.js → task-route-Ca6BSRV2.js} +1 -1
- package/dist/client/assets/{task-status-DzeLZc0t.js → task-status-B4Q-ln7c.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BQQ8tNKP.js → taskboard-analytics-xVEQQIMN.js} +1 -1
- package/dist/client/assets/tasks-CxwtCQe0.js +1 -0
- package/dist/client/assets/{tasks-lwemg4Wr.js → tasks-DrL8vC19.js} +1 -1
- package/dist/client/assets/{textarea-Bkx1K2qe.js → textarea-DA5akcl2.js} +1 -1
- package/dist/client/assets/{thread-button-D6HHWA2W.js → thread-button-C_zUFSq7.js} +1 -1
- package/dist/client/assets/{thread-intent-C_hq8Uw9.js → thread-intent-B84W3TB7.js} +1 -1
- package/dist/client/assets/{thread-route-nSJMdhiK.js → thread-route-C3XU0Psn.js} +1 -1
- package/dist/client/assets/{thread-route-DWx_JTBG.js → thread-route-DuM7Be1s.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-rqTYmTzR.js → thread-sheet-body-DTPa7uQ5.js} +1 -1
- package/dist/client/assets/{toggle-group-CXmezzq3.js → toggle-group-D6olnL6L.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cy6AvRzw.js → toolbar-icon-button-SL9rNc2I.js} +1 -1
- package/dist/client/assets/{tooltip-C6enOXyh.js → tooltip-DSdKYCbI.js} +1 -1
- package/dist/client/assets/{track-B7nt-saX.js → track-YGUtSvtW.js} +1 -1
- package/dist/client/assets/{types-DfG-WUi_.js → types-Bt92_6tp.js} +1 -1
- package/dist/client/assets/{usage-stats-CzGYHgmi.js → usage-stats-DXMB2Ogz.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Cvq_HjNr.js → use-ai-providers-BjYj7e51.js} +1 -1
- package/dist/client/assets/{use-automations-GgRcmlLb.js → use-automations-AZ1h_dVu.js} +1 -1
- package/dist/client/assets/{use-autosave-eGi1xNmE.js → use-autosave-Cp7NOJhz.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BAwfX6On.js → use-connect-companion-NEmMLhzt.js} +1 -1
- package/dist/client/assets/{use-connection-D7t7y5-e.js → use-connection-Daw6Xhb2.js} +1 -1
- package/dist/client/assets/{use-copy-xo4iSDBQ.js → use-copy-7f7jLELO.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-TTkZy980.js → use-create-virtual-mcp-HAc5HQZL.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BtRHZTo3.js → use-date-fns-locale-DRjy01i-.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-pxwwDVN-.js → use-debounced-autosave-BsIVeoqi.js} +1 -1
- package/dist/client/assets/{use-debounced-value-tumfDMYW.js → use-debounced-value-BHUjfc1k.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Czcc02R-.js → use-deco-credits-D6PBQHrh.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DZnHJX4M.js → use-decopilot-events-DN9cn0m8.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DkrM9cr8.js → use-delete-connection-DhVyMfFv.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BO2gun9C.js → use-deployment-admin-Br3t4rfB.js} +1 -1
- package/dist/client/assets/{use-entitlements-Cg9aLuDX.js → use-entitlements-YUjw4iUa.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-7JbvyepR.js → use-fast-preview-draft-url-CL-K09WK.js} +1 -1
- package/dist/client/assets/{use-file-configs-CMr6wIKD.js → use-file-configs-CYQYBWb-.js} +1 -1
- package/dist/client/assets/{use-in-settings-CC_3sLol.js → use-in-settings-C-U1gBbP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DlNj8Tv9.js → use-infinite-scroll-Cb4X67my.js} +1 -1
- package/dist/client/assets/{use-join-requests-C3i5G8XM.js → use-join-requests-VDy2Kg17.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-a6BYy7FD.js → use-main-panel-tabs-DU0ArEIW.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-_8ko1UO-.js → use-mcp-auth-status-DUrcGrM7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DMWht7XE.js → use-mcp-client-BIX1SQBb.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-c1iKw71K.js → use-mcp-prompts-DKzGmPLS.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C25Cm-zz.js → use-mcp-tools-CkvnbZRz.js} +1 -1
- package/dist/client/assets/{use-members-KvbK3wqJ.js → use-members-dL8owSbV.js} +1 -1
- package/dist/client/assets/{use-mobile-BKgmbAmN.js → use-mobile-BWQZ9Nov.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DjpZeoZT.js → use-navigate-to-agent-CWYMJtiR.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Bvzx5Ye5.js → use-open-billing-url-DPt-2psD.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C9f9NC5y.js → use-org-auth-client-CDLK3ArO.js} +1 -1
- package/dist/client/assets/{use-org-fs-D5gmoaqA.js → use-org-fs-6hP98hgh.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BbRWoTxu.js → use-org-repo-syncs-BmksYt9W.js} +1 -1
- package/dist/client/assets/{use-org-sso-BWvxNBYa.js → use-org-sso-EP1tdwpB.js} +1 -1
- package/dist/client/assets/{use-organization-roles-G2LQSxiQ.js → use-organization-roles-BCgVvV23.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BTBv23HT.js → use-organization-settings-Dsn6UluU.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-3QPnKCQs.js → use-panel-navigate-CtBFI8Fa.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-SX0Vw2gs.js → use-project-native-view-presence-Cm6tnbwT.js} +1 -1
- package/dist/client/assets/{use-project-scope-C0eA2U2p.js → use-project-scope-D2OaSlGh.js} +1 -1
- package/dist/client/assets/{use-registry-connections-vu7U4-eW.js → use-registry-connections-LjnGKNsQ.js} +1 -1
- package/dist/client/assets/{use-releases-sP1Q2XT7.js → use-releases-Dd36wWRs.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-C34AtNBN.js → use-reports-diagnostic-52lTTKw5.js} +1 -1
- package/dist/client/assets/{use-route-default-main-DTa5_Ucp.js → use-route-default-main-n--kXIcz.js} +1 -1
- package/dist/client/assets/{use-secrets-DFhlbKBp.js → use-secrets-CJFaH6t8.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-KaEtAag1.js → use-section-preview-base-CPNPI5v2.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BrxkMe8P.js → use-session-runtime-UsUKYcrN.js} +1 -1
- package/dist/client/assets/{use-tags-B6YJY2Ng.js → use-tags-D1Cvf62b.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CmUoOHHy.js → use-task-board-analytics-BvYcabLA.js} +1 -1
- package/dist/client/assets/{use-task-metadata-B7KPiGxC.js → use-task-metadata--G-29y7J.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-D2brweDC.js → use-thread-outputs-DeggN_DY.js} +1 -1
- package/dist/client/assets/{use-view-mode-DNVuSnub.js → use-view-mode-DAe4FouK.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CMKJwsUx.js → use-virtual-mcp-Db9im8eJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-h6ttw-AT.js +1 -0
- package/dist/client/assets/{useQueries-NSE55rK5.js → useQueries-C5BMFkFw.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BfJeKBg6.js +1 -0
- package/dist/client/assets/{users-CbH_Gfc3.js → users-ClLWsD2e.js} +1 -1
- package/dist/client/assets/{utils-C2C_XflP.js → utils-PCUp5118.js} +1 -1
- package/dist/client/assets/{variant-calendar-DIaq2FdX.js → variant-calendar-C92tYbri.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CEitEQTV.js → variant-matcher-override-etDf_4I7.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Ib695qKF.js → view-mode-toggle-yTiIUXCA.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CZmS87eX.js → virtual-mcp-CBkUrWeB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DUCG9jHV.js +0 -1
- package/dist/client/assets/agent-deck-DShfu7ZT.js +0 -1
- package/dist/client/assets/agent-file-CHH9Mgc8.js +0 -1
- package/dist/client/assets/agent-library-file-D2ia6GfT.js +0 -1
- package/dist/client/assets/agent-settings-vc6MlS3t.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BlEfPPCG.js +0 -2
- package/dist/client/assets/agent-view-Q3G27DTH.js +0 -1
- package/dist/client/assets/api-keys-DKjA4BWP.js +0 -1
- package/dist/client/assets/app-editor-Bx4fdBDn.js +0 -1
- package/dist/client/assets/category-editor-CGUeaFVZ.js +0 -1
- package/dist/client/assets/project-reports-DXH1YN47.js +0 -1
- package/dist/client/assets/project-tasks-BkWryEy0.js +0 -1
- package/dist/client/assets/record-editor-B7qLBoAW.js +0 -1
- package/dist/client/assets/registry-7aCsq4-d.js +0 -2
- package/dist/client/assets/reports-bctE5arV.js +0 -1
- package/dist/client/assets/sandbox-git-api-CMdpE2TE.js +0 -1
- package/dist/client/assets/store-registry-DHQS2tT_.js +0 -2
- package/dist/client/assets/tasks-BDSkeIpT.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D3_yfQKO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BXmtRabr.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as y}from"./sandbox-url-D3mC8qhT.js";function s(e,n){return y(e,`git/${n}`)}class u extends Error{constructor(n,t){super(n),this.status=t,this.name="SandboxGitError"}status}function B(e){return e instanceof u&&(e.status===503||e.status===410||e.status===404)}function m(e,n){return n instanceof u&&n.status===429?!1:e<1}async function a(e){let n;try{n=await e.json()}catch{throw new u(`Request failed (${e.status})`,e.status)}if(!e.ok)throw new u(typeof n.error=="string"?n.error:`Request failed (${e.status})`,e.status);return n}const w="x-deco-fast-preview";function i(e,n,t){const r=new Headers(n?.headers);return t?.fastPreview&&r.set(w,"1"),fetch(e,{cache:"no-store",...n,headers:r})}async function b(e,n){const t=await i(s(e,"status"),void 0,n);return a(t)}async function _(e,n,t){const r=await i(s(e,"diff"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...n?.base?{base:n.base}:{},...n?.headSha?{headSha:n.headSha}:{}})},t);return a(r)}function l(e){const n={};for(const[t,r]of Object.entries(e.diffs))c(t)||f(t)||(n[t]=r);return{...e,diffs:n}}async function D(e,n){const t=n?{status:n.status,diff:l(n.diff)}:{},r=await i(s(e,"suggest-commit"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});return a(r)}async function E(e,n,t){const r=await i(s(e,"publish"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({message:n})},t);await a(r)}async function R(e,n,t){const r=await i(s(e,"rebase"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({base:n})},t);await a(r)}function c(e){return e==="blocks.gen.json"||e.endsWith("/blocks.gen.json")}function f(e){return e==="static/tailwind.css"||e.endsWith("/static/tailwind.css")}function S(e){return c(e)||f(e)||e.endsWith("generate.digests.json")||e.endsWith("meta.gen.json")}function O(e){return e?e.conflicted.length>0||e.renamed.length>0?!0:[...e.modified,...e.created,...e.deleted,...e.not_added,...e.staged].some(n=>!S(n)):!1}function W(e){return e?!O(e)&&(e.aheadOfBase??0)===0&&(e.unpushed??0)===0:!1}function P(e){return e===".deco"||e.endsWith("/.deco")||e.startsWith(".deco/")||e.includes("/.deco/")}function d(e){return e.length===0?!1:e.every(n=>P(n)||c(n)||f(n))}function h(e){return e?d(Object.keys(e.diffs)):!1}const p="smart";function A(e){return e==="code-review"||e==="open"||e==="smart"?e:p}function J(e){let n=5381;const t=r=>{for(let o=0;o<r.length;o++)n=(n<<5)+n+r.charCodeAt(o)|0};for(const r of Object.keys(e.diffs).sort()){const o=e.diffs[r];t(r),t("\0from:"),t(o?.from??""),t("\0to:"),t(o?.to??""),t("\0\0")}return(n>>>0).toString(36)}async function C(e,n,t){const r=await i(s(e,"judge-review"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({status:n.status,diff:l(n.diff),...n.language?{language:n.language}:{}})},t);return a(r)}async function F(e,n,t){const r=await i(s(e,"discard"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({filepaths:n})},t);await a(r)}const G="current";function N(e){return e?.[G]??null}function j(e){return["sandbox-git-status",e.orgSlug,e.virtualMcpId,e.branch,e.threadId]}const T=5e3;function U(e,n){return{queryKey:j(e),queryFn:()=>b(e,n),staleTime:T,retry:m}}function k(e){return e?e.modified.length+e.created.length+e.deleted.length+e.not_added.length+e.renamed.length:0}function g(e){return e?k(e)>0||e.staged.length>0||e.conflicted.length>0:!1}function x(e){return e?g(e)||e.ahead>0||(e.unpushed??0)>0?!0:e.unpushed===void 0&&(e.aheadOfBase??0)>0&&e.tracking==null:!1}function q(e,n){return e?x(e)||n!=null&&Object.keys(n.diffs).length>0:!1}function I(e,n){return g(e)?!1:n.openPrFromCommits||!n.commitToOpenPr&&(e?.aheadOfBase??0)>0}function L(e,n){return{diffs:{...e?.diffs??{},...n?.diffs??{}},...e?.mergeBaseSha?{mergeBaseSha:e.mergeBaseSha}:{}}}function H(e,n="code-review"){return n==="open"?{allowed:!0,reason:null}:h(e)?{allowed:!0,reason:null}:{allowed:!1,reason:null}}function K(e,n){return e.length===0?{allowed:!1,reason:null}:n==="open"?{allowed:!0,reason:null}:d(e)?{allowed:!0,reason:null}:n==="smart"?{allowed:!1,reason:null,pending:!0}:{allowed:!1,reason:null}}function M(e,n){return n!=="smart"||!e||Object.keys(e.diffs).length===0?!1:!h(e)}function $(e,n){if(n)return{allowed:!1,reason:null,pending:!0};if(!e)return{allowed:!0,reason:null};if(!e.requiresReview)return{allowed:!0,reason:null};const t=e.reason?.trim();return{allowed:!1,reason:t||null}}export{_ as a,J as b,C as c,F as d,B as e,b as f,K as g,H as h,S as i,$ as j,N as k,O as l,A as m,M as n,j as o,E as p,k as q,R as r,U as s,x as t,q as u,I as v,D as w,g as x,L as y,W as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as G,r as o,dq as Ce,dn as De,c as Pe,e as Ae,dk as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-
|
|
1
|
+
import{o as G,r as o,dq as Ce,dn as De,c as Pe,e as Ae,dk as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-DvH-nwdq.js";import{u as Le}from"./use-mcp-client-BIX1SQBb.js";import{u as Ue}from"./use-session-runtime-UsUKYcrN.js";import{u as Re,b as Oe}from"./chat-context-CR299TDT.js";import{u as Be}from"./hooks-BZYmjCXU.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./use-virtual-mcp-Db9im8eJ.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=G(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=G(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=G();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class Ge{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const Xe=1e3,je=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=Ee(),a=G(),V=Re()?.taskId??null,[X,E]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,y]=o.useState({kind:"unknown"}),[j,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new Ge,v.current.set(d,S)),S};o.useEffect(()=>{if(E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);E(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
|
|
2
2
|
`);_(i.source).append(f);for(const l of O.current)try{l(i.source,f)}catch{}H(l=>l+1)}catch{}},J=r=>{const i=r.type;try{const f=JSON.parse(r.data);switch(D=0,i){case"lifecycle":{const l=f;b(l.state);const F=`${c.slug}/${e}/${t}`;if(Se(l.state.phase)&&!(A&&Se(A))){ee(a,c.id);const K=M.decofile(F);a.getQueryData(K)===void 0&&a.invalidateQueries({queryKey:K})}l.state.phase==="running"&&A!=="running"&&(ee(a,c.id),a.invalidateQueries({queryKey:M.decofile(F)}),a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})),A=l.state.phase;const $=l.state.phase==="running"?l.state.port:null,ce=C.current;if(C.current=$,ce!==null&&$!==null&&ce!==$)for(const K of w.current)try{K()}catch{}return}case"status":U(f);return;case"tasks":{const F=f.active.map($=>$.logName??"").filter(Boolean);R(F);return}case"scripts":q(f.scripts);return;case"branch":{const l=f.meta;y(l);return}case"reload":for(const l of w.current)try{l()}catch{}return;case"file-changed":{const{path:l}=f,F=`${c.slug}/${e}/${t}`;if(l.startsWith(".deco/")||l.includes("/.deco/")){if(!(A==="running"))return;P&&clearTimeout(P),P=setTimeout(()=>{if(P=null,a.invalidateQueries({queryKey:M.decofile(F)}),Q)for(const K of w.current)try{K()}catch{}},500)}else T&&clearTimeout(T),T=setTimeout(()=>{T=null,a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})},1e3);return}}}catch{}};function N(){if(S)return;const r=new EventSource(d);g=r,r.onopen=()=>{},r.onerror=()=>{g===r&&r.readyState===EventSource.CLOSED&&x("studio")},r.addEventListener("phase",I),r.addEventListener("gone",B),r.addEventListener(pe,Y);for(const i of he)r.addEventListener(i,J)}function ae(){if(S||!p||m)return;const r=new EventSource(p);m=r;let i=!1;r.onopen=()=>{if(S||m!==r)return;i=!0,D=0;const f=g;g=null,f?.close()},r.onerror=()=>{m===r&&r.readyState===EventSource.CLOSED&&ue(r,i)},r.addEventListener(pe,Y);for(const f of he)r.addEventListener(f,J)}async function ue(r,i){const f=p?await ze(p):!1;if(!(S||m!==r)){if(r.close(),m=null,f){B(),g||N();return}i&&x("direct")}}function x(r){if(S||L)return;const i=ge(je,Xe,D,2,0);D++,L=setTimeout(()=>{if(L=null,!S){if(r==="direct"){m?.close(),m=null,ae();return}g?.close(),g=null,N()}},i)}return N(),()=>{S=!0,g?.close(),m?.close(),L&&clearTimeout(L),T&&clearTimeout(T),P&&clearTimeout(P)}},[e,t,c.slug,c.id,s,V,p,a,Q]);const oe={phase:X,lifecycle:te,status:ne,branch:re,notFound:j,scripts:k,activeProcesses:se,getBuffer:d=>v.current.get(d)?.get()??"",hasData:d=>(v.current.get(d)?.get().length??0)>0,subscribeChunks:d=>(O.current.add(d),()=>{O.current.delete(d)}),subscribeReload:d=>(w.current.add(d),()=>{w.current.delete(d)})};return ye.jsx(ve,{value:oe,children:u})}function de(){return o.use(ve)}function bt(e){const{subscribeChunks:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t((c,a)=>{n.current?.(c,a)}),[t])}function vt(e){const{subscribeReload:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t(()=>{n.current?.()}),[t])}function Ze(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function et(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveGithubRepo&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function wt(e){return e.threadLoaded&&e.isOwner&&e.hasActiveGithubRepo&&!e.branch&&!e.attempted}function tt(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function Tt(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:s,branch:u}=e,c=e.ownerId??s;if(!s||!c||!u)return t;const a=n?.[c]?.[u];return a?{...t??{},[s]:{...t?.[s]??{},[u]:a}}:t}function z(e,t,n){const s={virtualMcpId:e};return t&&(s.branch=t),n&&(s.threadId=n),s}const we=2,nt=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function Te(e){return nt.has(e)}function rt(e){return e.executionEnabled&&e.failedReason!==null&&Te(e.failedReason)&&e.attempts<we&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const st={branch:null,count:0,handled:!1};function ot(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function at(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function ut(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function xe(e,t){return`${e??""}::${t??""}`}function ct(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function Z(e){const{data:t,virtualMcpId:n,branch:s}=e;t?.branch&&!s&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:xe(n,t.branch??s),url:t.previewUrl})}const it={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},ke=o.createContext(it);function xt(){return o.use(ke)}function kt({executionEnabled:e,virtualMcpId:t,branch:n,userId:s,hasActiveGithubRepo:u,vmEntry:c,threadId:a,children:V}){const{org:X}=Ee(),{setCurrentTaskBranch:E}=Oe(),te=Be(),b=de(),ne=G(),U=Ue(t),re=U.resolved?U.runtime:null,y=Re()?.taskId??null,j=Le({connectionId:_e,orgId:X.id,orgSlug:X.slug}),h=Ye(j,{onStarted:()=>{a&&te?.refreshThreadMetadata(a)}}),{mutate:k,reset:q}=h,[se,R]=o.useState(null),H=o.useRef(new Set),v=o.useRef(null),[O,w]=o.useState(st),C=ot(O,n);C!==O&&w(C);const p=b.phase?.kind==="failed"?b.phase:null,Q=ct({vmEntry:c,seeded:p?null:se,key:xe(t,n)}),_=!!t&&!!n&&le.isStopped(t,n),oe=b.status.state==="paused",d=!p||!Te(p.reason)||C.count>=we,S=at({mutationError:h.isError&&h.error?$e(h.error.message):null,phase:b.phase,startPending:h.isPending,claimRetryExhausted:d}),D=Ze({previewUrl:Q,appPaused:oe,userStopped:_,startError:S}),L=ut(D),T=n??"",P=H.current.has(T),g=et({executionEnabled:e,hasActiveGithubRepo:u,userId:s,branch:n,vmEntry:c,userStopped:_,isPending:h.isPending,attempted:P,sessionRuntime:re});o.useEffect(()=>{if(!g||!t)return;H.current.add(T);const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] auto-start failed:",r)}})},[g,T,n,t,y,k,E,R]);const m=b.notFound?c?.sandboxHandle??null:null,A=tt({executionEnabled:e,notFound:b.notFound,deadVmId:m,lastDeadVmId:v.current,isPending:h.isPending,userStopped:_});o.useEffect(()=>{if(!A||!m||!t)return;v.current=m;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] self-heal failed:",r)}})},[A,m,t,n,y,k,E,R]);const I=rt({executionEnabled:e,failedReason:p?.reason??null,attempts:C.count,isPending:h.isPending,userStopped:_,alreadyHandled:C.handled});o.useEffect(()=>{if(!p){w(r=>r.handled?{...r,handled:!1}:r);return}if(!I||!t)return;w(r=>({...r,handled:!0,count:r.count+1}));const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",r)}})},[p,I,t,n,y,k,E,R]);const B=()=>{if(!e||!t)return;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] user start failed:",r)}})},Y=async()=>{if(!(!e||!t||!n)&&c){le.mark(t,n);try{await j.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}ee(ne)}},J=async()=>{await Y(),B()},N=()=>{H.current=new Set,v.current=null,w({branch:n,count:0,handled:!1}),q(),B()},ue={branch:n,previewState:D,status:L,vmEntry:c,previewUrl:Q,userStopped:_,start:B,stop:Y,restart:J,retry:N,resume:N};return ye.jsx(ke,{value:ue,children:V})}export{gt as S,kt as a,Ye as b,de as c,xt as d,bt as e,vt as f,Ke as g,Tt as o,wt as s,Rt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as a,bM as t,ap as e,bN as c,bO as d,bP as p,bQ as m}from"./index-
|
|
1
|
+
import{ao as a,bM as t,ap as e,bN as c,bO as d,bP as p,bQ as m}from"./index-DvH-nwdq.js";const i=500;a({title:e().max(i),url:e().max(i),icon:e().max(i)});a({registries:d(e().max(i),a({enabled:t()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:c(e().max(i)).describe("List of MCP app_name or app_id values to hide from the store.")});const s=a({keyId:e().max(i),modelId:e().max(i),title:e().max(i).optional()}).nullable();p(["fast","smart","thinking","image","web_search","deep_research"]);p(["fast","smart","thinking"]);const _=a({tiers:a({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});a({tiers:a({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});a({ids:c(e().max(i)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const y=a({home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:t().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")}),b=new Set(["reviewer_enabled","cheap_reviewer_model"]);function v(n,r){const h=n?.[r];return b.has(r)?h!==!1:h===!0}function x(n){const r=n?.auto_resolve_conflicts;return typeof r=="boolean"?r:n?.auto_merge===!0}const l=256*1024,f=50,o=500,u=5e3;a({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(u).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:a({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:a({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:c(d(e(),m())).max(f).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),m()).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{b as D,y as O,_ as S,x as a,v as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,bo as A,bv as ce,j as b,bq as _,bH as ae,dl as O,br as C,bA as P,bt as ie,c as F,l as $}from"./index-CNdpljun.js";import{e as de}from"./select-CzmZ0exo.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
1
|
+
import{r as d,bo as A,bv as ce,j as b,bq as _,bH as ae,dl as O,br as C,bA as P,bt as ie,c as F,l as $}from"./index-DvH-nwdq.js";import{e as de}from"./select-CMaNbPPd.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l as w,j as a,h as j}from"./index-
|
|
1
|
+
import{c as b,l as w,j as a,h as j}from"./index-DvH-nwdq.js";import{i as v}from"./SearchMd-pcanFLxJ.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,r as C,l as B,j as a}from"./index-
|
|
1
|
+
import{c as K,r as C,l as B,j as a}from"./index-DvH-nwdq.js";import{i as I}from"./SearchMd-pcanFLxJ.js";import{i as M}from"./X-DIdmvXi5.js";import{I as O}from"./icon-button-DwYlPzUN.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aQ as O,Z as B,B as z,R as E,t as _}from"./index-
|
|
1
|
+
import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aQ as O,Z as B,B as z,R as E,t as _}from"./index-DvH-nwdq.js";import{i as R}from"./AlertCircle-CL2g6hBv.js";import{s as A}from"./Plus-BB6-c5sU.js";import{s as I}from"./User01-DClxObx9.js";import{t as q}from"./Users01-Z1l_JeRj.js";import{D as V,b as H,c as Q,d as Z,h as G,e as J}from"./dialog-2G-cQw5c.js";import{I as P}from"./input-BYV3Mzlx.js";import{L as D}from"./label-CanEOsWK.js";import{S as K,b as M,a as U,d as W,c as $}from"./select-CMaNbPPd.js";import{T as X}from"./textarea-DA5akcl2.js";import{u as Y,a as ee}from"./use-secrets-CJFaH6t8.js";import{R as te}from"./require-capability-CUlSdcqO.js";import"./X-DIdmvXi5.js";import"./index-CXqVfpeT.js";import"./ChevronUp-Dc2CzZ9J.js";import"./access-gate-BKr55tJT.js";import"./capability-load-error-DCFFcPkL.js";function se(t){const e=v.c(6),{error:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(R,{size:16}),e[0]=c):c=e[0];let i;e[1]!==r.message||e[2]!==n?(i=n("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=n,e[3]=i):i=e[3];let l;return e[4]!==i?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:i})]}),e[4]=i,e[5]=l):l=e[5],l}function re(t){const e=v.c(8),{scope:r}=t,n=C(),c=r==="user"?I:q;let i;e[0]!==r||e[1]!==n?(i=n(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=n,e[2]=i):i=e[2];const l=i;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let o;return e[5]!==l||e[6]!==a?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=o):o=e[7],o}function T(t){const e=v.c(20),{secret:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let i;e[3]!==r.scope?(i=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let l;e[5]!==c||e[6]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,i]}),e[5]=c,e[6]=i,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let o;e[10]!==l||e[11]!==a?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=o):o=e[12];let m;e[13]!==r.createdAt?(m=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=m):m=e[14];let d;e[15]!==m?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:m}),e[15]=m,e[16]=d):d=e[16];let u;return e[17]!==o||e[18]!==d?(u=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,d]}),e[17]=o,e[18]=d,e[19]=u):u=e[19],u}function ne(t){const e=v.c(15),{action:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("settings.secrets.emptyTitle"),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("p",{className:"font-medium text-sm",children:i}),e[3]=i,e[4]=l):l=e[4];let a;e[5]!==n?(a=n("settings.secrets.emptyDescription"),e[5]=n,e[6]=a):a=e[6];let o;e[7]!==a?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=o):o=e[8];let m;e[9]!==l||e[10]!==o?(m=s.jsxs("div",{children:[l,o]}),e[9]=l,e[10]=o,e[11]=m):m=e[11];let d;return e[12]!==r||e[13]!==m?(d=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,m,r]}),e[12]=r,e[13]=m,e[14]=d):d=e[14],d}function k({open:t,onOpenChange:e}){const r=C(),[n,c]=y.useState("organization"),[i,l]=y.useState(""),[a,o]=y.useState(""),[m,d]=y.useState(""),u=ee();function b(){c("organization"),l(""),o(""),d("")}function g(){b(),e(!1)}async function S(x){if(x.preventDefault(),!(!i.trim()||!a))try{await u.mutateAsync({scope:n,name:i.trim(),value:a,description:m.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:i.trim()})),g()}catch(j){_.error(j instanceof Error?j.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(V,{open:t,onOpenChange:x=>{x?e(x):g()},children:s.jsxs(H,{className:"sm:max-w-lg",children:[s.jsxs(Q,{children:[s.jsx(Z,{children:r("settings.secrets.newSecretTitle")}),s.jsx(G,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(K,{value:n,onValueChange:x=>c(x),children:[s.jsx(M,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx($,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx($,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(P,{id:"secret-name",value:i,onChange:x=>l(x.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(P,{id:"secret-value",type:"password",value:a,onChange:x=>o(x.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:m,onChange:x=>d(x.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(J,{children:[s.jsx(z,{type:"button",variant:"outline",onClick:g,disabled:u.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(z,{type:"submit",disabled:u.isPending||!i.trim()||!a,children:u.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=v.c(36),e=B(),r=C(),n=Y(),[c,i]=y.useState(!1);let l,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i(!0),a=s.jsx(A,{size:14}),t[0]=l,t[1]=a):(l=t[0],a=t[1]);let o;t[2]!==r?(o=r("settings.secrets.newSecret"),t[2]=r,t[3]=o):o=t[3];let m;t[4]!==o?(m=s.jsx(w.Actions,{children:s.jsxs(z,{size:"sm",onClick:l,children:[a,o]})}),t[4]=o,t[5]=m):m=t[5];const d=m;if(n.length===0){const j=e&&d,N=!e&&d;let h;t[6]!==N?(h=s.jsx(ne,{action:N}),t[6]=N,t[7]=h):h=t[7];let f;t[8]!==c?(f=s.jsx(k,{open:c,onOpenChange:i}),t[8]=c,t[9]=f):f=t[9];let p;return t[10]!==j||t[11]!==h||t[12]!==f?(p=s.jsxs(s.Fragment,{children:[j,h,f]}),t[10]=j,t[11]=h,t[12]=f,t[13]=p):p=t[13],p}let u,b,g;if(t[14]!==d||t[15]!==n||t[16]!==r){const j=n.filter(oe),N=n.filter(ae),h=n.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let f;t[20]!==n.length||t[21]!==r||t[22]!==h?(f=r(h,{count:n.length}),t[20]=n.length,t[21]=r,t[22]=h,t[23]=f):f=t[23];let p;t[24]!==f?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),t[24]=f,t[25]=p):p=t[25],t[26]!==d||t[27]!==p?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[p,d]}),t[26]=d,t[27]=p,t[28]=u):u=t[28],b=j.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionOrganization")}),s.jsx("div",{children:j.map(le)})]}):null,g=N.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionPrivate")}),s.jsx("div",{children:N.map(ce)})]}):null,t[14]=d,t[15]=n,t[16]=r,t[17]=u,t[18]=b,t[19]=g}else u=t[17],b=t[18],g=t[19];let S;t[29]!==c?(S=s.jsx(k,{open:c,onOpenChange:i}),t[29]=c,t[30]=S):S=t[30];let x;return t[31]!==u||t[32]!==b||t[33]!==g||t[34]!==S?(x=s.jsxs(s.Fragment,{children:[u,b,g,S]}),t[31]=u,t[32]=b,t[33]=g,t[34]=S,t[35]=x):x=t[35],x}function ce(t){return s.jsx(T,{secret:t},t.id)}function le(t){return s.jsx(T,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function de(){const t=v.c(7),e=C();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let n;t[2]!==r?(n=s.jsx(w.Title,{children:r}),t[2]=r,t[3]=n):n=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(L,{fallback:me,children:s.jsx(y.Suspense,{fallback:s.jsx(O,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let i;return t[5]!==n?(i=s.jsx(w,{children:s.jsx(w.Content,{children:s.jsx(w.Container,{children:s.jsxs(F,{children:[n,c]})})})}),t[5]=n,t[6]=i):i=t[6],i}function me(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function Pe(){const t=v.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(de,{})}),t[0]=e):e=t[0],e}export{Pe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as St,b as Ht,r as k,l as Ke,j as s,aO as cs,Z as cn,B as ut,F as us,G as yt,I as ds,aN as ms,H as fs,aM as Ua,o as qa,h as Wa,t as L,K as Ya}from"./index-CNdpljun.js";import{u as Ja}from"./chat-context-C_38Spkt.js";import{I as ps,J as Qa,K as Za,L as gs,N as Xa,O as eo,V as to,Q as no,T as hs,U as so,W as ao,X as zt,Y as vs,G as Rt,Z as Rn,_ as wn,$ as vt,C as on,y as rn,a0 as Mt,e as oo,f as ro,h as io,u as lo,a1 as Jn,a2 as co,a3 as uo,a4 as mo,a5 as fo,a6 as po,p as tn,a7 as go,A as jt,a8 as Ot,a9 as ho,aa as vo,ab as at,ac as Qn,z as yo,ad as So,ae as Zn,af as bo,ag as xo,ah as Xn,H as Pt,ai as nn,aj as es,M as _o,ak as ts,al as ht,am as Eo,an as jo,ao as ko,F as Ro,ap as wo,aq as To,ar as kt,as as Vo,at as No,au as Ao,d as Do,av as ns,aw as Ft,ax as ss,ay as Po,az as Mo,aA as Co,aB as Ko,aC as jn,aD as Bo,aE as Io,aF as Lo,aG as Oo,aH as Fo}from"./runnable-block-editor-C5tq8_-0.js";import{d as zo}from"./use-virtual-mcp-CMKJwsUx.js";import{n as $o,t as Ho}from"./ChevronUp-k_EOf84B.js";import{z as Tn,bj as Go,a2 as Vn,a5 as Uo,o as qo,P as Wo,x as Yo}from"./agent-icon-DLq4L2Ao.js";import{i as ys}from"./Globe01-BWRc6bbu.js";import{S as sn}from"./scroll-area-DycqXJW5.js";import{c as Ct,T as Kt,a as Bt}from"./tooltip-C6enOXyh.js";import{m as Jo,u as Qo,P as Zo}from"./mustache-ezl5DDdw.js";import{b as Ss,G as Xo,e as er,j as tr,g as nr,r as an,M as as}from"./claim-phase-copy-0btUuJoC.js";import{a as bs}from"./Copy01-EMXGNAiO.js";import{c as xs}from"./UserSquare-zbEMpwdU.js";import{i as sr}from"./Settings02-Bs5wKTy4.js";import{s as ar}from"./Eye-Bi64tP-D.js";import{s as or}from"./TrendUp01-B7EaxChV.js";import{s as Nn}from"./Plus-BHRPkby-.js";import{s as _s}from"./Trash01-CsZj7add.js";import{i as rr}from"./Zap-0kUaigVh.js";import{a as Es,b as ln,d as js,K as ks,P as Rs,u as ws,C as Ts,s as Vs,e as $t,D as Ns,c as As,S as Ds,v as Ps}from"./rich-text-link-control-CGZpZOT-.js";import{s as ir}from"./safe-image-url-D5z803Ot.js";import{a as lr,P as cr,b as ur}from"./page-seo-form-DNrGr10O.js";import{a as dr}from"./Tool01-5X6uedg8.js";import{u as mr,A as fr}from"./use-section-preview-base-KaEtAag1.js";import{b as os,a as pr}from"./variant-matcher-override-CEitEQTV.js";import"./use-panel-navigate-3QPnKCQs.js";import"./thread-route-DWx_JTBG.js";import"./use-project-scope-C0eA2U2p.js";import"./github-repo-BknN0SVI.js";import"./autosend-BZKRqImC.js";import"./thread-intent-C_hq8Uw9.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DuIBlPGY.js";import"./use-mcp-client-DMWht7XE.js";import"./auth-Dz9mRaTv.js";import"./backoff-8mStPHYB.js";import"./task-board-DmTmT7UC.js";import"./schema-B6UYFOiW.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-Cg9aLuDX.js";import"./use-ai-providers-Cvq_HjNr.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DZnHJX4M.js";import"./use-organization-settings-BTBv23HT.js";import"./use-session-runtime-BrxkMe8P.js";import"./decofile-api-DAALQSQE.js";import"./utils-C2C_XflP.js";import"./ZoomOut-DalZqqCw.js";import"./Image01-8PFZYS9P.js";import"./sandbox-url-D3mC8qhT.js";import"./Play-DIcksfye.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-D8FENe5Z.js";import"./Stars01-BvVFnZBk.js";import"./Tool02-CR95_N0f.js";import"./ArrowRight-BveFFy2z.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-B9sp1MZx.js";import"./use-copy-xo4iSDBQ.js";import"./usage-stats-CzGYHgmi.js";import"./markdown-5uzbD6VU.js";import"./dialog-Ep7gkNp4.js";import"./X-B9OR2y1D.js";import"./Download01-CsHqAVNu.js";import"./org-file-open-context-BSOmZpBS.js";import"./use-mobile-BKgmbAmN.js";import"./shell-layout-BkECXLU7.js";import"./avatar-DevS79NO.js";import"./User01-C_8SVY7B.js";import"./Globe04-BTVlItdV.js";import"./SearchLg-C4rS8AcZ.js";import"./XClose-CmbUUKkG.js";import"./download-app-dialog-BJ8H_bRY.js";import"./CheckCircle-DMlFOadx.js";import"./Monitor01-Crab2RRF.js";import"./Share07-CUM6Dqvb.js";import"./command-ZfYjtuAl.js";import"./index-BJ7_v32m.js";import"./SearchMd-DxK3_oZM.js";import"./integration-icon-PR06095a.js";import"./project-icon-H5FrSPJO.js";import"./required-auth-layout-C5L42ZZt.js";import"./use-org-sso-BWvxNBYa.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-6lbnwbz8.js";import"./types-DfG-WUi_.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DCte15fa.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-DXrZ6SzB.js";import"./LinkExternal01-DslZPBGz.js";import"./sheet-Big3YL-7.js";import"./use-connection-D7t7y5-e.js";import"./Palette-DqyEATuR.js";import"./use-navigate-to-agent-DjpZeoZT.js";import"./Link01-KARtnBxY.js";import"./use-mcp-prompts-c1iKw71K.js";import"./index-Cfhbhqg_.js";import"./form-7Lo4SdD_.js";import"./label-CEgqvjTx.js";import"./input-Chg2c8hI.js";import"./use-thread-outputs-D2brweDC.js";import"./file-type-icon-D7QysGoM.js";import"./popover-D2Z7_Tvr.js";import"./monaco-editor-YcYvcmpi.js";import"./editor-B-GNLQkJ.js";import"./calendar-CSJbftl5.js";import"./textarea-Bkx1K2qe.js";import"./select-CzmZ0exo.js";import"./index-ZV5TChxh.js";import"./switch-DNg8Qgce.js";import"./Upload01-B0aywPN-.js";import"./DotsVertical-DhvTdpnP.js";import"./search-input-BoYU-WLk.js";import"./tabs-lbbUV-Fe.js";import"./use-debounced-value-tumfDMYW.js";import"./use-file-configs-CMr6wIKD.js";import"./asset-utils-g7RXB14P.js";import"./useInfiniteQuery-D3_yfQKO.js";import"./infiniteQueryObserver-WcINROE-.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-CXmezzq3.js";import"./alert-dialog--j98vjuD.js";import"./sandbox-git-api-CMdpE2TE.js";import"./ArrowUp-CqB5FCTU.js";import"./ArrowLeft-D7adHwja.js";import"./CreditCard01-CiyU0eR_.js";import"./Key01-EHOZ3vmu.js";import"./LayoutLeft-DuadrTfl.js";import"./Sun-x_EXvKiQ.js";import"./Package-jUQ-QNQ_.js";import"./Users01-CV_KxvLX.js";import"./XCircle-DOFffLSN.js";import"./section-preview-url-Csj0_ZDg.js";function gr(c){return c.schema?.definitions??c.schema?.$defs??{}}function Ms(c,e){const o=gr(e),l=o[btoa(c)];if(!l)return[];const p=[l];if(Array.isArray(l.allOf)){const x=l.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=o[x.replace("#/definitions/","")];b&&p.push(b)}}return p}function hr(c,e){for(const o of Ms(c,e)){const l=typeof o.image=="string"?o.image:void 0;if(l?.includes("{{{"))return l}}function vr(c,e){if(!e)return;const o=ps(c);if(!o)return;const l=hr(o.resolveType,e);if(!l)return;const p=Qa(l,o.data);if(p)return ir(p)}const yr={escape:Za};function Sr(c,e){for(const o of Ms(c,e)){const l=typeof o.title=="string"?o.title:void 0;if(l?.includes("{{"))return l}}function br(c,e){if(!e)return;const o=ps(c);if(o)try{const l=Sr(o.resolveType,e);return l&&Jo.render(l,o.data,{},yr).trim()||void 0}catch{return}}const xr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_r="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function rs(c){return Array.from({length:c},(e,o)=>({id:crypto.randomUUID(),index:o}))}function Cs(c){return c.map((e,o)=>({...e,index:o}))}function Er(c,e){if(e===c.length)return c;if(e<c.length)return Cs(c.slice(0,e));const o=Array.from({length:e-c.length},(l,p)=>({id:crypto.randomUUID(),index:c.length+p}));return[...c,...o]}function Ks(c){const e=St.c(38),{section:o,raw:l,meta:p,decofile:x}=c,b=cn(),y=o.isSavedBlock===!0,N=o.isMultivariate===!0;let E;e[0]!==p||e[1]!==l?(E=l&&p?vr(l,p):void 0,e[0]=p,e[1]=l,e[2]=E):E=e[2];const P=E;let ne;e[3]!==p||e[4]!==N||e[5]!==l||e[6]!==y?(ne=l&&p&&!y&&!N?br(l,p):void 0,e[3]=p,e[4]=N,e[5]=l,e[6]=y,e[7]=ne):ne=e[7];const Z=ne;let U;e[8]!==x||e[9]!==p||e[10]!==l||e[11]!==o?(U=no(l,o,x,p),e[8]=x,e[9]=p,e[10]=l,e[11]=o,e[12]=U):U=e[12];const V=U,m=N?Go:xs;let v;e[13]!==N||e[14]!==y?(v=y?{color:Xo}:N?{color:"oklch(0.65 0.15 160)"}:void 0,e[13]=N,e[14]=y,e[15]=v):v=e[15];const O=v;let q;e[16]!==m||e[17]!==b||e[18]!==O?(q=b?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx(m,{className:"absolute inset-0 size-4 transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:O}),s.jsx(Vn,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):s.jsx(Vn,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[16]=m,e[17]=b,e[18]=O,e[19]=q):q=e[19];let i;e[20]!==P?(i=P&&s.jsx("img",{src:P,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[20]=P,e[21]=i):i=e[21];let F;e[22]!==b||e[23]!==O?(F=!b&&s.jsx(Tn,{className:"h-4 w-4 shrink-0",style:O}),e[22]=b,e[23]=O,e[24]=F):F=e[24];const d=o.isHidden&&"line-through opacity-50";let W;e[25]!==d?(W=Ke("min-w-0 flex-1 truncate text-sm font-medium",d),e[25]=d,e[26]=W):W=e[26];const X=Z??o.label;let se;e[27]!==X||e[28]!==W?(se=s.jsx("span",{className:W,children:X}),e[27]=X,e[28]=W,e[29]=se):se=e[29];let _e;e[30]!==V?(_e=V&&s.jsx(so,{className:"absolute -right-0.5 -top-0.5"}),e[30]=V,e[31]=_e):_e=e[31];let Ie;return e[32]!==se||e[33]!==_e||e[34]!==q||e[35]!==i||e[36]!==F?(Ie=s.jsxs(s.Fragment,{children:[q,i,F,se,_e]}),e[32]=se,e[33]=_e,e[34]=q,e[35]=i,e[36]=F,e[37]=Ie):Ie=e[37],Ie}const jr="w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",kr="w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Rr="w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100";function kn(c,e){return Ke("h-7 shrink-0 overflow-hidden",e?jr:c?Rr:kr)}function Bs(c,e){const o=c.isSavedBlock===!0,l=c.isMultivariate===!0;return Ke("group relative flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?xr:l?hs:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function wr(c){const e=St.c(85),{section:o,raw:l,meta:p,decofile:x,sortableId:b,selected:y,onSelect:N,onDelete:E,onDuplicate:P,onMakeReusable:ne,onToggleHidden:Z,onToggleLazy:U,onAddVariant:V,onDetach:m}=c,v=Ht(),O=cn(),q=l?Ss(l.__resolveType??""):!1,i=o.isHidden===!0,F=q||i;let d;e[0]!==o?(d=Xa(o),e[0]=o,e[1]=d):d=e[1];const W=d;let X;e[2]!==b?(X={id:b,animateLayoutChanges:Dr},e[2]=b,e[3]=X):X=e[3];const{attributes:se,listeners:_e,setNodeRef:Ie,transform:Te,isDragging:g}=ws(X);let M;e[4]!==Te?(M=Ts.Transform.toString(Te?{...Te,x:0}:null),e[4]=Te,e[5]=M):M=e[5];const ke=g?0:void 0;let D;e[6]!==M||e[7]!==ke?(D={transform:M,opacity:ke},e[6]=M,e[7]=ke,e[8]=D):D=e[8];const He=D;let K;e[9]!==o?(K=eo(o),e[9]=o,e[10]=K):K=e[10];const Ge=K;let ae;e[11]!==N?(ae=R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),N())},e[11]=N,e[12]=ae):ae=e[12];const Ue=g?"cursor-grabbing":"cursor-pointer";let Je;e[13]!==o||e[14]!==y||e[15]!==Ue?(Je=Ke("touch-none transition-colors",Ue,Bs(o,y)),e[13]=o,e[14]=y,e[15]=Ue,e[16]=Je):Je=e[16];let ze;e[17]!==x||e[18]!==p||e[19]!==l||e[20]!==o?(ze=s.jsx(Ks,{section:o,raw:l,meta:p,decofile:x}),e[17]=x,e[18]=p,e[19]=l,e[20]=o,e[21]=ze):ze=e[21];let ye;e[22]!==i||e[23]!==v?(ye=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[22]=i,e[23]=v,e[24]=ye):ye=e[24];let Ve;e[25]!==Z?(Ve=R=>{R.stopPropagation(),Z()},e[25]=Z,e[26]=Ve):Ve=e[26];let Ee;e[27]!==i?(Ee=i?s.jsx(sr,{className:"h-3.5 w-3.5"}):s.jsx(ar,{className:"h-3.5 w-3.5"}),e[27]=i,e[28]=Ee):Ee=e[28];let z;e[29]!==i||e[30]!==v?(z=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[29]=i,e[30]=v,e[31]=z):z=e[31];let A;e[32]!==z?(A=s.jsx(Bt,{side:"bottom",children:z}),e[32]=z,e[33]=A):A=e[33];const me=ds,Se=us,Le=!0,Ne=ut,J="button",fe="ghost",Ce="icon";let oe;e[34]!==v?(oe=v("sectionsEditor.sectionList.sectionActionsMenu"),e[34]=v,e[35]=oe):oe=e[35];const ee=Ke(kn(F,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let pe;e[36]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(ms,{className:"h-3.5 w-3.5"}),e[36]=pe):pe=e[36];let Q;e[37]!==Ne||e[38]!==oe||e[39]!==ee?(Q=s.jsx(Ne,{type:J,variant:fe,size:Ce,"aria-label":oe,className:ee,onClick:Vr,onPointerDown:Tr,children:pe}),e[37]=Ne,e[38]=oe,e[39]=ee,e[40]=Q):Q=e[40];let ce;e[41]!==Se||e[42]!==Q?(ce=s.jsx(Se,{asChild:Le,children:Q}),e[41]=Se,e[42]=Q,e[43]=ce):ce=e[43];let je;e[44]!==P?(je=R=>{R.stopPropagation(),P()},e[44]=P,e[45]=je):je=e[45];let Ae;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ae=s.jsx(bs,{className:"h-4 w-4"}),e[46]=Ae):Ae=e[46];let re;e[47]!==v?(re=v("sectionsEditor.sectionList.duplicateMenuItem"),e[47]=v,e[48]=re):re=e[48];let Re;e[49]!==je||e[50]!==re?(Re=s.jsxs(yt,{onClick:je,children:[Ae,re]}),e[49]=je,e[50]=re,e[51]=Re):Re=e[51];let ge;e[52]!==W||e[53]!==V||e[54]!==v?(ge=W&&s.jsxs(yt,{className:to,onClick:R=>{R.stopPropagation(),V()},children:[s.jsx(or,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.addVariantMenuItem")]}),e[52]=W,e[53]=V,e[54]=v,e[55]=ge):ge=e[55];let Y;e[56]!==O||e[57]!==Ge||e[58]!==ne||e[59]!==v?(Y=Ge&&s.jsxs(yt,{className:_r,onClick:R=>{R.stopPropagation(),ne()},children:[O?s.jsx(ys,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[56]=O,e[57]=Ge,e[58]=ne,e[59]=v,e[60]=Y):Y=e[60];let B;e[61]!==O||e[62]!==m||e[63]!==o.isMultivariate||e[64]!==o.isSavedBlock||e[65]!==v?(B=o.isSavedBlock===!0&&!o.isMultivariate&&s.jsxs(yt,{onClick:R=>{R.stopPropagation(),m()},children:[O?s.jsx(xs,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.detachMenuItem")]}),e[61]=O,e[62]=m,e[63]=o.isMultivariate,e[64]=o.isSavedBlock,e[65]=v,e[66]=B):B=e[66];let te;e[67]!==E?(te=R=>{R.stopPropagation(),E()},e[67]=E,e[68]=te):te=e[68];let be;e[69]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(_s,{className:"h-4 w-4"}),e[69]=be):be=e[69];let ue;e[70]!==v?(ue=v("sectionsEditor.sectionList.deleteMenuItem"),e[70]=v,e[71]=ue):ue=e[71];let De;e[72]!==te||e[73]!==ue?(De=s.jsxs(yt,{className:"text-destructive focus:text-destructive",onClick:te,children:[be,ue]}),e[72]=te,e[73]=ue,e[74]=De):De=e[74];let ie;e[75]!==Re||e[76]!==ge||e[77]!==Y||e[78]!==B||e[79]!==De?(ie=s.jsxs(fs,{align:"end",className:"w-44",children:[Re,ge,Y,B,De]}),e[75]=Re,e[76]=ge,e[77]=Y,e[78]=B,e[79]=De,e[80]=ie):ie=e[80];let C;return e[81]!==me||e[82]!==ce||e[83]!==ie?(C=s.jsxs(me,{children:[ce,ie]}),e[81]=me,e[82]=ce,e[83]=ie,e[84]=C):C=e[84],s.jsxs("div",{ref:Ie,style:He,...se,..._e,role:"button",tabIndex:0,onClick:N,onKeyDown:ae,className:Je,children:[ze,!o.isMultivariate&&s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Ke(kn(F,q)),onClick:R=>{R.stopPropagation(),U()},onPointerDown:Ar,children:s.jsx(rr,{className:Ke("h-3.5 w-3.5",q&&"text-yellow-500")})})}),s.jsx(Bt,{side:"bottom",children:v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":ye,className:Ke(kn(F,i)),onClick:Ve,onPointerDown:Nr,children:Ee})}),A]}),C]})}function Tr(c){return c.stopPropagation()}function Vr(c){return c.stopPropagation()}function Nr(c){return c.stopPropagation()}function Ar(c){return c.stopPropagation()}function Dr(){return!1}function Pr(c){const e=St.c(106),{listKey:o,rawSections:l,sections:p,meta:x,decofile:b,selectedIndex:y,onSelect:N,onReorder:E,onDelete:P,onDuplicate:ne,onMakeReusable:Z,onToggleHidden:U,onToggleLazy:V,onAddVariant:m,onDetach:v,onAddSection:O,canAddSection:q}=c,i=q===void 0?!0:q,F=Ht();let d;e[0]!==p.length?(d=()=>rs(p.length),e[0]=p.length,e[1]=d):d=e[1];const[W,X]=k.useState(d),[se,_e]=k.useState(null),[Ie,Te]=k.useState(o),[g,M]=k.useState(p.length),ke=k.useRef(!1);Ie!==o?(Te(o),M(p.length),X(rs(p.length))):g!==p.length&&(M(p.length),X(ie=>Er(ie,p.length)));let D;e[2]===Symbol.for("react.memo_cache_sentinel")?(D={activationConstraint:{distance:8}},e[2]=D):D=e[2];let He;e[3]===Symbol.for("react.memo_cache_sentinel")?(He={coordinateGetter:Vs},e[3]=He):He=e[3];const K=Es(ln(Rs,D),ln(ks,He));let Ge;e[4]!==W?(Ge=W.map(Mr),e[4]=W,e[5]=Ge):Ge=e[5];const ae=Ge;let Ue;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ue=ie=>{_e(String(ie.active.id))},e[6]=Ue):Ue=e[6];const Je=Ue;let ze;e[7]!==ae||e[8]!==E?(ze=ie=>{_e(null);const{active:C,over:R}=ie;if(!R||C.id===R.id)return;const Qe=ae.indexOf(String(C.id)),qe=ae.indexOf(String(R.id));Qe===-1||qe===-1||(X(dt=>Cs($t([...dt],Qe,qe))),ke.current=!0,requestAnimationFrame(()=>{ke.current=!1}),E?.(Qe,qe))},e[7]=ae,e[8]=E,e[9]=ze):ze=e[9];const ye=ze;let Ve;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>{_e(null)},e[10]=Ve):Ve=e[10];const Ee=Ve;let z,A,me,Se,Le,Ne,J,fe,Ce,oe,ee,pe,Q,ce,je;if(e[11]!==se||e[12]!==i||e[13]!==b||e[14]!==W||e[15]!==ae||e[16]!==ye||e[17]!==x||e[18]!==O||e[19]!==m||e[20]!==P||e[21]!==v||e[22]!==ne||e[23]!==Z||e[24]!==N||e[25]!==U||e[26]!==V||e[27]!==l||e[28]!==p||e[29]!==y||e[30]!==K||e[31]!==F){ce=Symbol.for("react.early_return_sentinel");e:{const ie=C=>{ke.current||N(C)};if(e[47]!==se||e[48]!==i||e[49]!==W||e[50]!==O||e[51]!==l||e[52]!==p||e[53]!==F){const C=se?W.find(R=>R.id===se):null;if(Se=C!=null?p[C.index]:null,me=C!=null?l[C.index]:void 0,W.length===0){let R;e[57]!==F?(R=F("sectionsEditor.sectionList.noSections"),e[57]=F,e[58]=R):R=e[58];let Qe;e[59]!==R?(Qe=s.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:R}),e[59]=R,e[60]=Qe):Qe=e[60];const qe=!i;let dt;e[61]===Symbol.for("react.memo_cache_sentinel")?(dt=s.jsx(Nn,{size:14}),e[61]=dt):dt=e[61];let Xe;e[62]!==F?(Xe=F("sectionsEditor.sectionList.addSectionButton"),e[62]=F,e[63]=Xe):Xe=e[63];let we;e[64]!==O||e[65]!==qe||e[66]!==Xe?(we=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:qe,onClick:O,children:[dt,Xe]}),e[64]=O,e[65]=qe,e[66]=Xe,e[67]=we):we=e[67];let Oe;e[68]!==Qe||e[69]!==we?(Oe=s.jsxs("div",{className:"space-y-2",children:[Qe,we]}),e[68]=Qe,e[69]=we,e[70]=Oe):Oe=e[70],ce=Oe;break e}Q=Ke(C&&"cursor-grabbing"),e[47]=se,e[48]=i,e[49]=W,e[50]=O,e[51]=l,e[52]=p,e[53]=F,e[54]=me,e[55]=Se,e[56]=Q}else me=e[54],Se=e[55],Q=e[56];A=Ns,fe=K,Ce=As,oe=Je,ee=ye,pe=Ee,z=Ds,Ne=ae,J=Ps,je="space-y-1",Le=W.map(C=>{const R=p[C.index];return R?s.jsx(wr,{sortableId:C.id,section:R,raw:l[C.index],meta:x,decofile:b,selected:y===C.index,onSelect:()=>ie(C.index),onDelete:()=>P(C.index),onDuplicate:()=>ne(C.index),onMakeReusable:()=>Z(C.index),onToggleHidden:()=>U(C.index),onToggleLazy:()=>V(C.index),onAddVariant:()=>m(C.index),onDetach:()=>v(C.index)},C.id):null})}e[11]=se,e[12]=i,e[13]=b,e[14]=W,e[15]=ae,e[16]=ye,e[17]=x,e[18]=O,e[19]=m,e[20]=P,e[21]=v,e[22]=ne,e[23]=Z,e[24]=N,e[25]=U,e[26]=V,e[27]=l,e[28]=p,e[29]=y,e[30]=K,e[31]=F,e[32]=z,e[33]=A,e[34]=me,e[35]=Se,e[36]=Le,e[37]=Ne,e[38]=J,e[39]=fe,e[40]=Ce,e[41]=oe,e[42]=ee,e[43]=pe,e[44]=Q,e[45]=ce,e[46]=je}else z=e[32],A=e[33],me=e[34],Se=e[35],Le=e[36],Ne=e[37],J=e[38],fe=e[39],Ce=e[40],oe=e[41],ee=e[42],pe=e[43],Q=e[44],ce=e[45],je=e[46];if(ce!==Symbol.for("react.early_return_sentinel"))return ce;let Ae;e[71]!==Le||e[72]!==je?(Ae=s.jsx("div",{className:je,children:Le}),e[71]=Le,e[72]=je,e[73]=Ae):Ae=e[73];let re;e[74]!==z||e[75]!==Ne||e[76]!==J||e[77]!==Ae?(re=s.jsx(z,{items:Ne,strategy:J,children:Ae}),e[74]=z,e[75]=Ne,e[76]=J,e[77]=Ae,e[78]=re):re=e[78];let Re;e[79]!==me||e[80]!==Se||e[81]!==b||e[82]!==x?(Re=Se?s.jsx("div",{className:Ke("cursor-grabbing shadow-lg ring-1 ring-border/60",Bs(Se,!1)),children:s.jsx(Ks,{section:Se,raw:me,meta:x,decofile:b})}):null,e[79]=me,e[80]=Se,e[81]=b,e[82]=x,e[83]=Re):Re=e[83];let ge;e[84]!==Re?(ge=cs.createPortal(s.jsx(js,{dropAnimation:gs,children:Re}),document.body),e[84]=Re,e[85]=ge):ge=e[85];let Y;e[86]!==A||e[87]!==fe||e[88]!==Ce||e[89]!==oe||e[90]!==ee||e[91]!==pe||e[92]!==re||e[93]!==ge?(Y=s.jsxs(A,{sensors:fe,collisionDetection:Ce,onDragStart:oe,onDragEnd:ee,onDragCancel:pe,children:[re,ge]}),e[86]=A,e[87]=fe,e[88]=Ce,e[89]=oe,e[90]=ee,e[91]=pe,e[92]=re,e[93]=ge,e[94]=Y):Y=e[94];const B=!i;let te;e[95]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Nn,{size:14}),e[95]=te):te=e[95];let be;e[96]!==F?(be=F("sectionsEditor.sectionList.addSectionButton"),e[96]=F,e[97]=be):be=e[97];let ue;e[98]!==O||e[99]!==B||e[100]!==be?(ue=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:B,onClick:O,children:[te,be]}),e[98]=O,e[99]=B,e[100]=be,e[101]=ue):ue=e[101];let De;return e[102]!==Q||e[103]!==Y||e[104]!==ue?(De=s.jsxs("div",{className:Q,children:[Y,ue]}),e[102]=Q,e[103]=Y,e[104]=ue,e[105]=De):De=e[105],De}function Mr(c){return c.id}function An(c){const e=St.c(5),{rule:o,matchers:l}=c,p=o?.__resolveType??"";let x;if(e[0]!==l||e[1]!==p){const E=l.find(P=>P.resolveType===p)?.iconName??ao(p);x=Uo(E),e[0]=l,e[1]=p,e[2]=x}else x=e[2];const b=x;if(!b)return null;let y;return e[3]!==b?(y=s.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=y):y=e[4],y}function is(c){return c.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
1
|
+
import{c as St,b as Ht,r as k,l as Ke,j as s,aO as cs,Z as cn,B as ut,F as us,G as yt,I as ds,aN as ms,H as fs,aM as Ua,o as qa,h as Wa,t as L,K as Ya}from"./index-DvH-nwdq.js";import{u as Ja}from"./chat-context-CR299TDT.js";import{I as ps,J as Qa,K as Za,L as gs,N as Xa,O as eo,V as to,Q as no,T as hs,U as so,W as ao,X as zt,Y as vs,G as Rt,Z as Rn,_ as wn,$ as vt,C as on,y as rn,a0 as Mt,e as oo,f as ro,h as io,u as lo,a1 as Jn,a2 as co,a3 as uo,a4 as mo,a5 as fo,a6 as po,p as tn,a7 as go,A as jt,a8 as Ot,a9 as ho,aa as vo,ab as at,ac as Qn,z as yo,ad as So,ae as Zn,af as bo,ag as xo,ah as Xn,H as Pt,ai as nn,aj as es,M as _o,ak as ts,al as ht,am as Eo,an as jo,ao as ko,F as Ro,ap as wo,aq as To,ar as kt,as as Vo,at as No,au as Ao,d as Do,av as ns,aw as Ft,ax as ss,ay as Po,az as Mo,aA as Co,aB as Ko,aC as jn,aD as Bo,aE as Io,aF as Lo,aG as Oo,aH as Fo}from"./runnable-block-editor-Cv64jlMo.js";import{d as zo}from"./use-virtual-mcp-Db9im8eJ.js";import{n as $o,t as Ho}from"./ChevronUp-Dc2CzZ9J.js";import{z as Tn,bj as Go,a2 as Vn,a5 as Uo,o as qo,P as Wo,x as Yo}from"./agent-icon-Cd4WgvSY.js";import{i as ys}from"./Globe01-DYZzNFRa.js";import{S as sn}from"./scroll-area-KLqiO1VQ.js";import{c as Ct,T as Kt,a as Bt}from"./tooltip-DSdKYCbI.js";import{m as Jo,u as Qo,P as Zo}from"./mustache-Bz3Is7Ci.js";import{b as Ss,G as Xo,e as er,j as tr,g as nr,r as an,M as as}from"./claim-phase-copy-0btUuJoC.js";import{a as bs}from"./Copy01-CALkaT8p.js";import{c as xs}from"./UserSquare-yxnFTjmA.js";import{i as sr}from"./Settings02-Cql2YRRu.js";import{s as ar}from"./Eye-B_-FUDkf.js";import{s as or}from"./TrendUp01-CUQslKNc.js";import{s as Nn}from"./Plus-BB6-c5sU.js";import{s as _s}from"./Trash01-CoDSwhlk.js";import{i as rr}from"./Zap-gDYafaw-.js";import{a as Es,b as ln,d as js,K as ks,P as Rs,u as ws,C as Ts,s as Vs,e as $t,D as Ns,c as As,S as Ds,v as Ps}from"./rich-text-link-control-CqkMC3kO.js";import{s as ir}from"./safe-image-url-D5z803Ot.js";import{a as lr,P as cr,b as ur}from"./page-seo-form-Btga6Joj.js";import{a as dr}from"./Tool01-BfvHlgMO.js";import{u as mr,A as fr}from"./use-section-preview-base-CPNPI5v2.js";import{b as os,a as pr}from"./variant-matcher-override-etDf_4I7.js";import"./use-panel-navigate-CtBFI8Fa.js";import"./thread-route-DuM7Be1s.js";import"./use-project-scope-D2OaSlGh.js";import"./github-repo-BknN0SVI.js";import"./autosend-aHWkl5NE.js";import"./thread-intent-B84W3TB7.js";import"./slugify-CEUa2lfQ.js";import"./hooks-BZYmjCXU.js";import"./use-mcp-client-BIX1SQBb.js";import"./auth-BOVcch8v.js";import"./backoff-8mStPHYB.js";import"./task-board-DlYdtE3b.js";import"./schema-xJ7U_asm.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-entitlements-YUjw4iUa.js";import"./use-ai-providers-BjYj7e51.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DN9cn0m8.js";import"./use-organization-settings-Dsn6UluU.js";import"./use-session-runtime-UsUKYcrN.js";import"./decofile-api-DzQykCnT.js";import"./utils-PCUp5118.js";import"./ZoomOut-CPqhC1BT.js";import"./Image01-D0SI0eJx.js";import"./sandbox-url-D3mC8qhT.js";import"./Play-CN9QsFKm.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BX6SRtxr.js";import"./Stars01-koEVpHBg.js";import"./Tool02-4AGlMp3_.js";import"./ArrowRight-yUmRMyFa.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-nit0_hco.js";import"./use-copy-7f7jLELO.js";import"./usage-stats-DXMB2Ogz.js";import"./markdown-srbLLrsA.js";import"./dialog-2G-cQw5c.js";import"./X-DIdmvXi5.js";import"./Download01-CFSTXr8x.js";import"./org-file-open-context-B-Fg35Om.js";import"./use-mobile-BWQZ9Nov.js";import"./shell-layout-C2j46sCx.js";import"./avatar-ClWEwL-z.js";import"./User01-DClxObx9.js";import"./Globe04-DE66YFpd.js";import"./SearchLg-CExd0K4D.js";import"./XClose-C9HE5_ie.js";import"./download-app-dialog-BkiFA22O.js";import"./CheckCircle-DNXT9LQw.js";import"./Monitor01-tps0G-eA.js";import"./Share07-DZnJoaaB.js";import"./command-BFopaNrK.js";import"./index-BmcZIG6I.js";import"./SearchMd-pcanFLxJ.js";import"./integration-icon-UwqkSKd2.js";import"./project-icon-DtWWc_Fg.js";import"./required-auth-layout-i35y0evL.js";import"./use-org-sso-EP1tdwpB.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CknJJO0m.js";import"./types-Bt92_6tp.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-DRvKrGBc.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-CL2g6hBv.js";import"./LinkExternal01-PpT-VqQv.js";import"./sheet-CCbrydch.js";import"./use-connection-Daw6Xhb2.js";import"./Palette-H25arUUw.js";import"./use-navigate-to-agent-CWYMJtiR.js";import"./Link01-b3QVbtfw.js";import"./use-mcp-prompts-DKzGmPLS.js";import"./index-BcslvKns.js";import"./form-Djun1QNL.js";import"./label-CanEOsWK.js";import"./input-BYV3Mzlx.js";import"./use-thread-outputs-DeggN_DY.js";import"./file-type-icon-BN_9SI7i.js";import"./popover-DmyHt-2h.js";import"./monaco-editor-bMyr3tAL.js";import"./editor-WAZQ2CEk.js";import"./calendar-BonOrtU-.js";import"./textarea-DA5akcl2.js";import"./select-CMaNbPPd.js";import"./index-CXqVfpeT.js";import"./switch-DgkvwxDL.js";import"./Upload01-eY69lxYq.js";import"./DotsVertical-DDZN-DIr.js";import"./search-input-BwVXUnNC.js";import"./tabs-BfXcQInD.js";import"./use-debounced-value-BHUjfc1k.js";import"./use-file-configs-CYQYBWb-.js";import"./asset-utils-BAPGdhel.js";import"./useInfiniteQuery-h6ttw-AT.js";import"./infiniteQueryObserver-BkwDlHKY.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-D6olnL6L.js";import"./alert-dialog-BV6BL0PL.js";import"./sandbox-git-api-B1R0585s.js";import"./ArrowUp-doBsDpEd.js";import"./ArrowLeft-BqNlqHdb.js";import"./CreditCard01-BGb46j0w.js";import"./Key01-CGyx-jB1.js";import"./LayoutLeft-CduVrmTY.js";import"./Sun-DHu0BtRe.js";import"./Package-DmJJ2zwx.js";import"./Users01-Z1l_JeRj.js";import"./XCircle-CrmJoBI1.js";import"./section-preview-url-Csj0_ZDg.js";function gr(c){return c.schema?.definitions??c.schema?.$defs??{}}function Ms(c,e){const o=gr(e),l=o[btoa(c)];if(!l)return[];const p=[l];if(Array.isArray(l.allOf)){const x=l.allOf.find(b=>typeof b.$ref=="string")?.$ref;if(typeof x=="string"){const b=o[x.replace("#/definitions/","")];b&&p.push(b)}}return p}function hr(c,e){for(const o of Ms(c,e)){const l=typeof o.image=="string"?o.image:void 0;if(l?.includes("{{{"))return l}}function vr(c,e){if(!e)return;const o=ps(c);if(!o)return;const l=hr(o.resolveType,e);if(!l)return;const p=Qa(l,o.data);if(p)return ir(p)}const yr={escape:Za};function Sr(c,e){for(const o of Ms(c,e)){const l=typeof o.title=="string"?o.title:void 0;if(l?.includes("{{"))return l}}function br(c,e){if(!e)return;const o=ps(c);if(o)try{const l=Sr(o.resolveType,e);return l&&Jo.render(l,o.data,{},yr).trim()||void 0}catch{return}}const xr="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_r="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function rs(c){return Array.from({length:c},(e,o)=>({id:crypto.randomUUID(),index:o}))}function Cs(c){return c.map((e,o)=>({...e,index:o}))}function Er(c,e){if(e===c.length)return c;if(e<c.length)return Cs(c.slice(0,e));const o=Array.from({length:e-c.length},(l,p)=>({id:crypto.randomUUID(),index:c.length+p}));return[...c,...o]}function Ks(c){const e=St.c(38),{section:o,raw:l,meta:p,decofile:x}=c,b=cn(),y=o.isSavedBlock===!0,N=o.isMultivariate===!0;let E;e[0]!==p||e[1]!==l?(E=l&&p?vr(l,p):void 0,e[0]=p,e[1]=l,e[2]=E):E=e[2];const P=E;let ne;e[3]!==p||e[4]!==N||e[5]!==l||e[6]!==y?(ne=l&&p&&!y&&!N?br(l,p):void 0,e[3]=p,e[4]=N,e[5]=l,e[6]=y,e[7]=ne):ne=e[7];const Z=ne;let U;e[8]!==x||e[9]!==p||e[10]!==l||e[11]!==o?(U=no(l,o,x,p),e[8]=x,e[9]=p,e[10]=l,e[11]=o,e[12]=U):U=e[12];const V=U,m=N?Go:xs;let v;e[13]!==N||e[14]!==y?(v=y?{color:Xo}:N?{color:"oklch(0.65 0.15 160)"}:void 0,e[13]=N,e[14]=y,e[15]=v):v=e[15];const O=v;let q;e[16]!==m||e[17]!==b||e[18]!==O?(q=b?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx(m,{className:"absolute inset-0 size-4 transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:O}),s.jsx(Vn,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):s.jsx(Vn,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[16]=m,e[17]=b,e[18]=O,e[19]=q):q=e[19];let i;e[20]!==P?(i=P&&s.jsx("img",{src:P,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded object-cover"}),e[20]=P,e[21]=i):i=e[21];let F;e[22]!==b||e[23]!==O?(F=!b&&s.jsx(Tn,{className:"h-4 w-4 shrink-0",style:O}),e[22]=b,e[23]=O,e[24]=F):F=e[24];const d=o.isHidden&&"line-through opacity-50";let W;e[25]!==d?(W=Ke("min-w-0 flex-1 truncate text-sm font-medium",d),e[25]=d,e[26]=W):W=e[26];const X=Z??o.label;let se;e[27]!==X||e[28]!==W?(se=s.jsx("span",{className:W,children:X}),e[27]=X,e[28]=W,e[29]=se):se=e[29];let _e;e[30]!==V?(_e=V&&s.jsx(so,{className:"absolute -right-0.5 -top-0.5"}),e[30]=V,e[31]=_e):_e=e[31];let Ie;return e[32]!==se||e[33]!==_e||e[34]!==q||e[35]!==i||e[36]!==F?(Ie=s.jsxs(s.Fragment,{children:[q,i,F,se,_e]}),e[32]=se,e[33]=_e,e[34]=q,e[35]=i,e[36]=F,e[37]=Ie):Ie=e[37],Ie}const jr="w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",kr="w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]",Rr="w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100";function kn(c,e){return Ke("h-7 shrink-0 overflow-hidden",e?jr:c?Rr:kr)}function Bs(c,e){const o=c.isSavedBlock===!0,l=c.isMultivariate===!0;return Ke("group relative flex select-none items-center gap-2 rounded-md px-2 py-2.5",e?"bg-accent text-accent-foreground":o?xr:l?hs:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function wr(c){const e=St.c(85),{section:o,raw:l,meta:p,decofile:x,sortableId:b,selected:y,onSelect:N,onDelete:E,onDuplicate:P,onMakeReusable:ne,onToggleHidden:Z,onToggleLazy:U,onAddVariant:V,onDetach:m}=c,v=Ht(),O=cn(),q=l?Ss(l.__resolveType??""):!1,i=o.isHidden===!0,F=q||i;let d;e[0]!==o?(d=Xa(o),e[0]=o,e[1]=d):d=e[1];const W=d;let X;e[2]!==b?(X={id:b,animateLayoutChanges:Dr},e[2]=b,e[3]=X):X=e[3];const{attributes:se,listeners:_e,setNodeRef:Ie,transform:Te,isDragging:g}=ws(X);let M;e[4]!==Te?(M=Ts.Transform.toString(Te?{...Te,x:0}:null),e[4]=Te,e[5]=M):M=e[5];const ke=g?0:void 0;let D;e[6]!==M||e[7]!==ke?(D={transform:M,opacity:ke},e[6]=M,e[7]=ke,e[8]=D):D=e[8];const He=D;let K;e[9]!==o?(K=eo(o),e[9]=o,e[10]=K):K=e[10];const Ge=K;let ae;e[11]!==N?(ae=R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),N())},e[11]=N,e[12]=ae):ae=e[12];const Ue=g?"cursor-grabbing":"cursor-pointer";let Je;e[13]!==o||e[14]!==y||e[15]!==Ue?(Je=Ke("touch-none transition-colors",Ue,Bs(o,y)),e[13]=o,e[14]=y,e[15]=Ue,e[16]=Je):Je=e[16];let ze;e[17]!==x||e[18]!==p||e[19]!==l||e[20]!==o?(ze=s.jsx(Ks,{section:o,raw:l,meta:p,decofile:x}),e[17]=x,e[18]=p,e[19]=l,e[20]=o,e[21]=ze):ze=e[21];let ye;e[22]!==i||e[23]!==v?(ye=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[22]=i,e[23]=v,e[24]=ye):ye=e[24];let Ve;e[25]!==Z?(Ve=R=>{R.stopPropagation(),Z()},e[25]=Z,e[26]=Ve):Ve=e[26];let Ee;e[27]!==i?(Ee=i?s.jsx(sr,{className:"h-3.5 w-3.5"}):s.jsx(ar,{className:"h-3.5 w-3.5"}),e[27]=i,e[28]=Ee):Ee=e[28];let z;e[29]!==i||e[30]!==v?(z=v(i?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),e[29]=i,e[30]=v,e[31]=z):z=e[31];let A;e[32]!==z?(A=s.jsx(Bt,{side:"bottom",children:z}),e[32]=z,e[33]=A):A=e[33];const me=ds,Se=us,Le=!0,Ne=ut,J="button",fe="ghost",Ce="icon";let oe;e[34]!==v?(oe=v("sectionsEditor.sectionList.sectionActionsMenu"),e[34]=v,e[35]=oe):oe=e[35];const ee=Ke(kn(F,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let pe;e[36]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(ms,{className:"h-3.5 w-3.5"}),e[36]=pe):pe=e[36];let Q;e[37]!==Ne||e[38]!==oe||e[39]!==ee?(Q=s.jsx(Ne,{type:J,variant:fe,size:Ce,"aria-label":oe,className:ee,onClick:Vr,onPointerDown:Tr,children:pe}),e[37]=Ne,e[38]=oe,e[39]=ee,e[40]=Q):Q=e[40];let ce;e[41]!==Se||e[42]!==Q?(ce=s.jsx(Se,{asChild:Le,children:Q}),e[41]=Se,e[42]=Q,e[43]=ce):ce=e[43];let je;e[44]!==P?(je=R=>{R.stopPropagation(),P()},e[44]=P,e[45]=je):je=e[45];let Ae;e[46]===Symbol.for("react.memo_cache_sentinel")?(Ae=s.jsx(bs,{className:"h-4 w-4"}),e[46]=Ae):Ae=e[46];let re;e[47]!==v?(re=v("sectionsEditor.sectionList.duplicateMenuItem"),e[47]=v,e[48]=re):re=e[48];let Re;e[49]!==je||e[50]!==re?(Re=s.jsxs(yt,{onClick:je,children:[Ae,re]}),e[49]=je,e[50]=re,e[51]=Re):Re=e[51];let ge;e[52]!==W||e[53]!==V||e[54]!==v?(ge=W&&s.jsxs(yt,{className:to,onClick:R=>{R.stopPropagation(),V()},children:[s.jsx(or,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.addVariantMenuItem")]}),e[52]=W,e[53]=V,e[54]=v,e[55]=ge):ge=e[55];let Y;e[56]!==O||e[57]!==Ge||e[58]!==ne||e[59]!==v?(Y=Ge&&s.jsxs(yt,{className:_r,onClick:R=>{R.stopPropagation(),ne()},children:[O?s.jsx(ys,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[56]=O,e[57]=Ge,e[58]=ne,e[59]=v,e[60]=Y):Y=e[60];let B;e[61]!==O||e[62]!==m||e[63]!==o.isMultivariate||e[64]!==o.isSavedBlock||e[65]!==v?(B=o.isSavedBlock===!0&&!o.isMultivariate&&s.jsxs(yt,{onClick:R=>{R.stopPropagation(),m()},children:[O?s.jsx(xs,{className:"h-4 w-4"}):s.jsx(Tn,{className:"h-4 w-4"}),v("sectionsEditor.sectionList.detachMenuItem")]}),e[61]=O,e[62]=m,e[63]=o.isMultivariate,e[64]=o.isSavedBlock,e[65]=v,e[66]=B):B=e[66];let te;e[67]!==E?(te=R=>{R.stopPropagation(),E()},e[67]=E,e[68]=te):te=e[68];let be;e[69]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(_s,{className:"h-4 w-4"}),e[69]=be):be=e[69];let ue;e[70]!==v?(ue=v("sectionsEditor.sectionList.deleteMenuItem"),e[70]=v,e[71]=ue):ue=e[71];let De;e[72]!==te||e[73]!==ue?(De=s.jsxs(yt,{className:"text-destructive focus:text-destructive",onClick:te,children:[be,ue]}),e[72]=te,e[73]=ue,e[74]=De):De=e[74];let ie;e[75]!==Re||e[76]!==ge||e[77]!==Y||e[78]!==B||e[79]!==De?(ie=s.jsxs(fs,{align:"end",className:"w-44",children:[Re,ge,Y,B,De]}),e[75]=Re,e[76]=ge,e[77]=Y,e[78]=B,e[79]=De,e[80]=ie):ie=e[80];let C;return e[81]!==me||e[82]!==ce||e[83]!==ie?(C=s.jsxs(me,{children:[ce,ie]}),e[81]=me,e[82]=ce,e[83]=ie,e[84]=C):C=e[84],s.jsxs("div",{ref:Ie,style:He,...se,..._e,role:"button",tabIndex:0,onClick:N,onKeyDown:ae,className:Je,children:[ze,!o.isMultivariate&&s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:Ke(kn(F,q)),onClick:R=>{R.stopPropagation(),U()},onPointerDown:Ar,children:s.jsx(rr,{className:Ke("h-3.5 w-3.5",q&&"text-yellow-500")})})}),s.jsx(Bt,{side:"bottom",children:v(q?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":ye,className:Ke(kn(F,i)),onClick:Ve,onPointerDown:Nr,children:Ee})}),A]}),C]})}function Tr(c){return c.stopPropagation()}function Vr(c){return c.stopPropagation()}function Nr(c){return c.stopPropagation()}function Ar(c){return c.stopPropagation()}function Dr(){return!1}function Pr(c){const e=St.c(106),{listKey:o,rawSections:l,sections:p,meta:x,decofile:b,selectedIndex:y,onSelect:N,onReorder:E,onDelete:P,onDuplicate:ne,onMakeReusable:Z,onToggleHidden:U,onToggleLazy:V,onAddVariant:m,onDetach:v,onAddSection:O,canAddSection:q}=c,i=q===void 0?!0:q,F=Ht();let d;e[0]!==p.length?(d=()=>rs(p.length),e[0]=p.length,e[1]=d):d=e[1];const[W,X]=k.useState(d),[se,_e]=k.useState(null),[Ie,Te]=k.useState(o),[g,M]=k.useState(p.length),ke=k.useRef(!1);Ie!==o?(Te(o),M(p.length),X(rs(p.length))):g!==p.length&&(M(p.length),X(ie=>Er(ie,p.length)));let D;e[2]===Symbol.for("react.memo_cache_sentinel")?(D={activationConstraint:{distance:8}},e[2]=D):D=e[2];let He;e[3]===Symbol.for("react.memo_cache_sentinel")?(He={coordinateGetter:Vs},e[3]=He):He=e[3];const K=Es(ln(Rs,D),ln(ks,He));let Ge;e[4]!==W?(Ge=W.map(Mr),e[4]=W,e[5]=Ge):Ge=e[5];const ae=Ge;let Ue;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ue=ie=>{_e(String(ie.active.id))},e[6]=Ue):Ue=e[6];const Je=Ue;let ze;e[7]!==ae||e[8]!==E?(ze=ie=>{_e(null);const{active:C,over:R}=ie;if(!R||C.id===R.id)return;const Qe=ae.indexOf(String(C.id)),qe=ae.indexOf(String(R.id));Qe===-1||qe===-1||(X(dt=>Cs($t([...dt],Qe,qe))),ke.current=!0,requestAnimationFrame(()=>{ke.current=!1}),E?.(Qe,qe))},e[7]=ae,e[8]=E,e[9]=ze):ze=e[9];const ye=ze;let Ve;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>{_e(null)},e[10]=Ve):Ve=e[10];const Ee=Ve;let z,A,me,Se,Le,Ne,J,fe,Ce,oe,ee,pe,Q,ce,je;if(e[11]!==se||e[12]!==i||e[13]!==b||e[14]!==W||e[15]!==ae||e[16]!==ye||e[17]!==x||e[18]!==O||e[19]!==m||e[20]!==P||e[21]!==v||e[22]!==ne||e[23]!==Z||e[24]!==N||e[25]!==U||e[26]!==V||e[27]!==l||e[28]!==p||e[29]!==y||e[30]!==K||e[31]!==F){ce=Symbol.for("react.early_return_sentinel");e:{const ie=C=>{ke.current||N(C)};if(e[47]!==se||e[48]!==i||e[49]!==W||e[50]!==O||e[51]!==l||e[52]!==p||e[53]!==F){const C=se?W.find(R=>R.id===se):null;if(Se=C!=null?p[C.index]:null,me=C!=null?l[C.index]:void 0,W.length===0){let R;e[57]!==F?(R=F("sectionsEditor.sectionList.noSections"),e[57]=F,e[58]=R):R=e[58];let Qe;e[59]!==R?(Qe=s.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:R}),e[59]=R,e[60]=Qe):Qe=e[60];const qe=!i;let dt;e[61]===Symbol.for("react.memo_cache_sentinel")?(dt=s.jsx(Nn,{size:14}),e[61]=dt):dt=e[61];let Xe;e[62]!==F?(Xe=F("sectionsEditor.sectionList.addSectionButton"),e[62]=F,e[63]=Xe):Xe=e[63];let we;e[64]!==O||e[65]!==qe||e[66]!==Xe?(we=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"w-full",disabled:qe,onClick:O,children:[dt,Xe]}),e[64]=O,e[65]=qe,e[66]=Xe,e[67]=we):we=e[67];let Oe;e[68]!==Qe||e[69]!==we?(Oe=s.jsxs("div",{className:"space-y-2",children:[Qe,we]}),e[68]=Qe,e[69]=we,e[70]=Oe):Oe=e[70],ce=Oe;break e}Q=Ke(C&&"cursor-grabbing"),e[47]=se,e[48]=i,e[49]=W,e[50]=O,e[51]=l,e[52]=p,e[53]=F,e[54]=me,e[55]=Se,e[56]=Q}else me=e[54],Se=e[55],Q=e[56];A=Ns,fe=K,Ce=As,oe=Je,ee=ye,pe=Ee,z=Ds,Ne=ae,J=Ps,je="space-y-1",Le=W.map(C=>{const R=p[C.index];return R?s.jsx(wr,{sortableId:C.id,section:R,raw:l[C.index],meta:x,decofile:b,selected:y===C.index,onSelect:()=>ie(C.index),onDelete:()=>P(C.index),onDuplicate:()=>ne(C.index),onMakeReusable:()=>Z(C.index),onToggleHidden:()=>U(C.index),onToggleLazy:()=>V(C.index),onAddVariant:()=>m(C.index),onDetach:()=>v(C.index)},C.id):null})}e[11]=se,e[12]=i,e[13]=b,e[14]=W,e[15]=ae,e[16]=ye,e[17]=x,e[18]=O,e[19]=m,e[20]=P,e[21]=v,e[22]=ne,e[23]=Z,e[24]=N,e[25]=U,e[26]=V,e[27]=l,e[28]=p,e[29]=y,e[30]=K,e[31]=F,e[32]=z,e[33]=A,e[34]=me,e[35]=Se,e[36]=Le,e[37]=Ne,e[38]=J,e[39]=fe,e[40]=Ce,e[41]=oe,e[42]=ee,e[43]=pe,e[44]=Q,e[45]=ce,e[46]=je}else z=e[32],A=e[33],me=e[34],Se=e[35],Le=e[36],Ne=e[37],J=e[38],fe=e[39],Ce=e[40],oe=e[41],ee=e[42],pe=e[43],Q=e[44],ce=e[45],je=e[46];if(ce!==Symbol.for("react.early_return_sentinel"))return ce;let Ae;e[71]!==Le||e[72]!==je?(Ae=s.jsx("div",{className:je,children:Le}),e[71]=Le,e[72]=je,e[73]=Ae):Ae=e[73];let re;e[74]!==z||e[75]!==Ne||e[76]!==J||e[77]!==Ae?(re=s.jsx(z,{items:Ne,strategy:J,children:Ae}),e[74]=z,e[75]=Ne,e[76]=J,e[77]=Ae,e[78]=re):re=e[78];let Re;e[79]!==me||e[80]!==Se||e[81]!==b||e[82]!==x?(Re=Se?s.jsx("div",{className:Ke("cursor-grabbing shadow-lg ring-1 ring-border/60",Bs(Se,!1)),children:s.jsx(Ks,{section:Se,raw:me,meta:x,decofile:b})}):null,e[79]=me,e[80]=Se,e[81]=b,e[82]=x,e[83]=Re):Re=e[83];let ge;e[84]!==Re?(ge=cs.createPortal(s.jsx(js,{dropAnimation:gs,children:Re}),document.body),e[84]=Re,e[85]=ge):ge=e[85];let Y;e[86]!==A||e[87]!==fe||e[88]!==Ce||e[89]!==oe||e[90]!==ee||e[91]!==pe||e[92]!==re||e[93]!==ge?(Y=s.jsxs(A,{sensors:fe,collisionDetection:Ce,onDragStart:oe,onDragEnd:ee,onDragCancel:pe,children:[re,ge]}),e[86]=A,e[87]=fe,e[88]=Ce,e[89]=oe,e[90]=ee,e[91]=pe,e[92]=re,e[93]=ge,e[94]=Y):Y=e[94];const B=!i;let te;e[95]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Nn,{size:14}),e[95]=te):te=e[95];let be;e[96]!==F?(be=F("sectionsEditor.sectionList.addSectionButton"),e[96]=F,e[97]=be):be=e[97];let ue;e[98]!==O||e[99]!==B||e[100]!==be?(ue=s.jsxs(ut,{type:"button",variant:"outline",size:"sm",className:"mt-2 w-full",disabled:B,onClick:O,children:[te,be]}),e[98]=O,e[99]=B,e[100]=be,e[101]=ue):ue=e[101];let De;return e[102]!==Q||e[103]!==Y||e[104]!==ue?(De=s.jsxs("div",{className:Q,children:[Y,ue]}),e[102]=Q,e[103]=Y,e[104]=ue,e[105]=De):De=e[105],De}function Mr(c){return c.id}function An(c){const e=St.c(5),{rule:o,matchers:l}=c,p=o?.__resolveType??"";let x;if(e[0]!==l||e[1]!==p){const E=l.find(P=>P.resolveType===p)?.iconName??ao(p);x=Uo(E),e[0]=l,e[1]=p,e[2]=x}else x=e[2];const b=x;if(!b)return null;let y;return e[3]!==b?(y=s.jsx(b,{size:14,className:"shrink-0"}),e[3]=b,e[4]=y):y=e[4],y}function is(c){return c.map(e=>`${e.label}|${e.rule?.__resolveType??""}`).join(`
|
|
2
2
|
`)}function ls(c){return c.map((e,o)=>({id:crypto.randomUUID(),index:o,variant:e}))}function Cr(c,e){const o=new Map;for(const l of c){const p=o.get(l.variant.label);p?p.push(l):o.set(l.variant.label,[l])}return e.map((l,p)=>({id:o.get(l.label)?.shift()?.id??crypto.randomUUID(),index:p,variant:l}))}function Kr(c){return c.map((e,o)=>({...e,index:o}))}function Is(c){const e=St.c(19),{label:o,effectiveRule:l,matchers:p,canDelete:x,dragging:b,onRename:y,onDuplicate:N,onDelete:E}=c,P=Ht(),ne=cn();let Z;e[0]!==ne||e[1]!==b||e[2]!==l||e[3]!==p?(Z=ne?s.jsxs("span",{className:"relative size-4 shrink-0",children:[s.jsx("span",{className:Ke("absolute inset-0 flex items-center justify-center transition-opacity",b?"opacity-0":"group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"),children:s.jsx(An,{rule:l,matchers:p})}),s.jsx(Vn,{"aria-hidden":!0,className:Ke("absolute inset-0 size-4 transition-opacity",b?"opacity-100":"opacity-0 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100")})]}):s.jsx(An,{rule:l,matchers:p}),e[0]=ne,e[1]=b,e[2]=l,e[3]=p,e[4]=Z):Z=e[4];let U;e[5]!==o?(U=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:o}),e[5]=o,e[6]=U):U=e[6];let V;e[7]!==x||e[8]!==b||e[9]!==o||e[10]!==E||e[11]!==N||e[12]!==y||e[13]!==P?(V=!b&&s.jsxs(ds,{children:[s.jsx(us,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":P("sectionsEditor.pageVariantTabs.actionsAriaLabel",{label:o}),className:"size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",onClick:Ir,onPointerDown:Br,children:s.jsx(ms,{size:14})})}),s.jsxs(fs,{align:"end",className:"w-36",children:[s.jsxs(yt,{onClick:v=>{v.stopPropagation(),y?.()},children:[s.jsx(dr,{size:14}),P("sectionsEditor.pageVariantTabs.renameAction")]}),s.jsxs(yt,{onClick:v=>{v.stopPropagation(),N?.()},children:[s.jsx(bs,{size:14}),P("sectionsEditor.pageVariantTabs.duplicateAction")]}),s.jsx(Ua,{}),s.jsxs(yt,{variant:"destructive",disabled:!x,onClick:v=>{v.stopPropagation(),E?.()},children:[s.jsx(_s,{size:14}),P("sectionsEditor.pageVariantTabs.deleteAction")]})]})]}),e[7]=x,e[8]=b,e[9]=o,e[10]=E,e[11]=N,e[12]=y,e[13]=P,e[14]=V):V=e[14];let m;return e[15]!==Z||e[16]!==U||e[17]!==V?(m=s.jsxs(s.Fragment,{children:[Z,U,V]}),e[15]=Z,e[16]=U,e[17]=V,e[18]=m):m=e[18],m}function Br(c){return c.stopPropagation()}function Ir(c){return c.stopPropagation()}function Lr(c){const e=St.c(33),{entry:o,isActive:l,canDelete:p,decofile:x,meta:b,matchers:y,onSelect:N,onRename:E,onDuplicate:P,onDelete:ne}=c;let Z;e[0]!==o.id?(Z={id:o.id,animateLayoutChanges:Or},e[0]=o.id,e[1]=Z):Z=e[1];const{attributes:U,listeners:V,setNodeRef:m,transform:v,isDragging:O}=ws(Z);let q;e[2]!==v?(q=Ts.Transform.toString(v?{...v,x:0}:null),e[2]=v,e[3]=q):q=e[3];const i=O?0:void 0;let F;e[4]!==q||e[5]!==i?(F={transform:q,opacity:i},e[4]=q,e[5]=i,e[6]=F):F=e[6];const d=F,W=b??void 0;let X;e[7]!==x||e[8]!==o.variant.rule||e[9]!==W?(X=zt(o.variant.rule,x,W),e[7]=x,e[8]=o.variant.rule,e[9]=W,e[10]=X):X=e[10];const se=X;let _e;e[11]!==N?(_e=D=>{D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),N())},e[11]=N,e[12]=_e):_e=e[12];const Ie=O?"cursor-grabbing":"cursor-pointer active:cursor-grabbing",Te=l?vs:hs;let g;e[13]!==Ie||e[14]!==Te?(g=Ke("group flex select-none items-center gap-2 rounded-md px-2 py-2.5 transition-colors touch-none",Ie,Te),e[13]=Ie,e[14]=Te,e[15]=g):g=e[15];let M;e[16]!==p||e[17]!==se||e[18]!==o.variant.label||e[19]!==y||e[20]!==ne||e[21]!==P||e[22]!==E?(M=s.jsx(Is,{label:o.variant.label,effectiveRule:se,matchers:y,canDelete:p,onRename:E,onDuplicate:P,onDelete:ne}),e[16]=p,e[17]=se,e[18]=o.variant.label,e[19]=y,e[20]=ne,e[21]=P,e[22]=E,e[23]=M):M=e[23];let ke;return e[24]!==U||e[25]!==V||e[26]!==N||e[27]!==m||e[28]!==d||e[29]!==g||e[30]!==M||e[31]!==_e?(ke=s.jsx("div",{ref:m,style:d,...U,...V,onClick:N,onKeyDown:_e,className:g,children:M}),e[24]=U,e[25]=V,e[26]=N,e[27]=m,e[28]=d,e[29]=g,e[30]=M,e[31]=_e,e[32]=ke):ke=e[32],ke}function Or(){return!1}function Fr(c){const e=St.c(9),{variant:o,decofile:l,meta:p,matchers:x}=c,b=p??void 0;let y;e[0]!==l||e[1]!==b||e[2]!==o.rule?(y=zt(o.rule,l,b),e[0]=l,e[1]=b,e[2]=o.rule,e[3]=y):y=e[3];const N=y;let E;e[4]===Symbol.for("react.memo_cache_sentinel")?(E=Ke("flex items-center gap-2 rounded-md px-2 py-2.5 shadow-lg ring-1 ring-border/60 cursor-grabbing",vs),e[4]=E):E=e[4];let P;return e[5]!==N||e[6]!==x||e[7]!==o.label?(P=s.jsx("div",{className:E,children:s.jsx(Is,{label:o.label,effectiveRule:N,matchers:x,canDelete:!1,dragging:!0})}),e[5]=N,e[6]=x,e[7]=o.label,e[8]=P):P=e[8],P}function zr(c){const e=St.c(91),{listKey:o,variants:l,activeIndex:p,decofile:x,meta:b,matchers:y,onSelect:N,onReorder:E,onRename:P,onDuplicate:ne,onDelete:Z,onAdd:U}=c,V=Ht();let m;e[0]!==l?(m=()=>ls(l),e[0]=l,e[1]=m):m=e[1];const[v,O]=k.useState(m),[q,i]=k.useState(null),[F,d]=k.useState(o),[W,X]=k.useState(l.length);let se;e[2]!==l?(se=()=>is(l),e[2]=l,e[3]=se):se=e[3];const[_e,Ie]=k.useState(se),Te=k.useRef(!1),g=is(l);F!==o?(d(o),X(l.length),Ie(g),O(ls(l))):(W!==l.length||_e!==g)&&(X(l.length),Ie(g),O(ge=>Cr(ge,l)));let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M={activationConstraint:{distance:8}},e[4]=M):M=e[4];let ke;e[5]===Symbol.for("react.memo_cache_sentinel")?(ke={coordinateGetter:Vs},e[5]=ke):ke=e[5];const D=Es(ln(Rs,M),ln(ks,ke));let He;e[6]!==v?(He=v.map($r),e[6]=v,e[7]=He):He=e[7];const K=He,Ge=l.length>1;let ae;e[8]!==v?(ae=ge=>{const Y=String(ge.active.id);i(v.find(B=>B.id===Y)??null)},e[8]=v,e[9]=ae):ae=e[9];const Ue=ae;let Je;e[10]!==K||e[11]!==E?(Je=ge=>{i(null);const{active:Y,over:B}=ge;if(!B||Y.id===B.id)return;const te=K.indexOf(String(Y.id)),be=K.indexOf(String(B.id));te===-1||be===-1||(O(ue=>Kr($t([...ue],te,be))),Te.current=!0,requestAnimationFrame(()=>{Te.current=!1}),E(te,be))},e[10]=K,e[11]=E,e[12]=Je):Je=e[12];const ze=Je;let ye;e[13]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>{i(null)},e[13]=ye):ye=e[13];const Ve=ye;let Ee,z,A,me,Se,Le,Ne,J,fe,Ce,oe,ee,pe;if(e[14]!==p||e[15]!==Ge||e[16]!==x||e[17]!==v||e[18]!==K||e[19]!==ze||e[20]!==Ue||e[21]!==y||e[22]!==b||e[23]!==U||e[24]!==Z||e[25]!==ne||e[26]!==P||e[27]!==N||e[28]!==D||e[29]!==V){const ge=R=>{Te.current||N(R)};oe="space-y-1 border-b p-2";let Y;e[43]!==V?(Y=V("sectionsEditor.pageVariantTabs.variantsLabel"),e[43]=V,e[44]=Y):Y=e[44];let B;e[45]!==Y?(B=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:Y}),e[45]=Y,e[46]=B):B=e[46];let te;e[47]!==V?(te=V("sectionsEditor.pageVariantTabs.addVariantAriaLabel"),e[47]=V,e[48]=te):te=e[48];let be;e[49]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Nn,{size:14}),e[49]=be):be=e[49];let ue;e[50]!==U||e[51]!==te?(ue=s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":te,className:"size-6",onClick:U,children:be})}),e[50]=U,e[51]=te,e[52]=ue):ue=e[52];let De;e[53]!==V?(De=V("sectionsEditor.pageVariantTabs.addVariantTooltip"),e[53]=V,e[54]=De):De=e[54];let ie;e[55]!==De?(ie=s.jsx(Bt,{children:De}),e[55]=De,e[56]=ie):ie=e[56];let C;e[57]!==ue||e[58]!==ie?(C=s.jsxs(Ct,{children:[ue,ie]}),e[57]=ue,e[58]=ie,e[59]=C):C=e[59],e[60]!==B||e[61]!==C?(ee=s.jsxs("div",{className:"flex items-center justify-between",children:[B,C]}),e[60]=B,e[61]=C,e[62]=ee):ee=e[62],z=Ns,Le=D,Ne=As,J=Ue,fe=ze,Ce=Ve,Ee=Ds,me=K,Se=Ps,pe="space-y-0.5",A=v.map(R=>s.jsx(Lr,{entry:R,isActive:R.index===p,canDelete:Ge,decofile:x,meta:b,matchers:y,onSelect:()=>ge(R.index),onRename:()=>P(R.index),onDuplicate:()=>ne(R.index),onDelete:()=>Z(R.index)},R.id)),e[14]=p,e[15]=Ge,e[16]=x,e[17]=v,e[18]=K,e[19]=ze,e[20]=Ue,e[21]=y,e[22]=b,e[23]=U,e[24]=Z,e[25]=ne,e[26]=P,e[27]=N,e[28]=D,e[29]=V,e[30]=Ee,e[31]=z,e[32]=A,e[33]=me,e[34]=Se,e[35]=Le,e[36]=Ne,e[37]=J,e[38]=fe,e[39]=Ce,e[40]=oe,e[41]=ee,e[42]=pe}else Ee=e[30],z=e[31],A=e[32],me=e[33],Se=e[34],Le=e[35],Ne=e[36],J=e[37],fe=e[38],Ce=e[39],oe=e[40],ee=e[41],pe=e[42];let Q;e[63]!==A||e[64]!==pe?(Q=s.jsx("div",{className:pe,children:A}),e[63]=A,e[64]=pe,e[65]=Q):Q=e[65];let ce;e[66]!==Ee||e[67]!==me||e[68]!==Se||e[69]!==Q?(ce=s.jsx(Ee,{items:me,strategy:Se,children:Q}),e[66]=Ee,e[67]=me,e[68]=Se,e[69]=Q,e[70]=ce):ce=e[70];let je;e[71]!==q||e[72]!==x||e[73]!==y||e[74]!==b?(je=q?s.jsx(Fr,{variant:q.variant,decofile:x,meta:b,matchers:y}):null,e[71]=q,e[72]=x,e[73]=y,e[74]=b,e[75]=je):je=e[75];let Ae;e[76]!==je?(Ae=cs.createPortal(s.jsx(js,{dropAnimation:gs,children:je}),document.body),e[76]=je,e[77]=Ae):Ae=e[77];let re;e[78]!==z||e[79]!==Le||e[80]!==Ne||e[81]!==J||e[82]!==fe||e[83]!==Ce||e[84]!==ce||e[85]!==Ae?(re=s.jsxs(z,{sensors:Le,collisionDetection:Ne,onDragStart:J,onDragEnd:fe,onDragCancel:Ce,children:[ce,Ae]}),e[78]=z,e[79]=Le,e[80]=Ne,e[81]=J,e[82]=fe,e[83]=Ce,e[84]=ce,e[85]=Ae,e[86]=re):re=e[86];let Re;return e[87]!==oe||e[88]!==ee||e[89]!==re?(Re=s.jsxs("div",{className:oe,children:[ee,re]}),e[87]=oe,e[88]=ee,e[89]=re,e[90]=Re):Re=e[90],Re}function $r(c){return c.id}function Hr(c,e,o,l){if(!c||typeof c!="object")return{kind:"error",reason:"no-matcher-rule"};const p=e.trim();if(!p)return Rt(c,o,l)?{kind:"inline",blockKey:c.__resolveType??"",inlinedRule:Rn(c,o,l)}:{kind:"noop"};const x=wn(c,o,l);if(!x)return{kind:"error",reason:"unreadable-rule"};if(x.blockKey)return{kind:"updateBlock",blockKey:x.blockKey,blockData:vt(x.resolveType,x.data,p)};const b=on(p),y=rn(b,o);return y?{kind:"error",reason:"invalid-block-id",message:y}:{kind:"createBlock",blockId:b,blockData:vt(x.resolveType,x.data,p),reference:Mt(b)}}function xc({orgSlug:c,virtualMcpId:e,branch:o,previewReady:l=!0,previewUrl:p,currentPath:x,activePageBlockKey:b=null,activeGlobalBlockKey:y=null,externalSelection:N,onSaved:E,initialEditSeo:P=!1,onExitSeo:ne,onSelectRoot:Z,onViewJsonFile:U,onVariantPreviewOverride:V}){const m=Ht(),v=Ja(),O=v?.taskId??null,q=l?{orgSlug:c,virtualMcpId:e,branch:o,threadId:O,previewUrl:p}:null,{data:i,isLoading:F}=oo(q),{data:d,isLoading:W}=ro(q),X=cn(),se=v?.virtualMcpId,Ie=zo(se===e?e:null)?.metadata?.siteSlug??null,Te=mr({virtualMcpId:e,sandboxUrl:p}),[g,M]=k.useState(null),[ke,D]=k.useState(null),[He,K]=k.useState(null),[Ge,ae]=k.useState(0),[Ue,Je]=k.useState(void 0),[ze,ye]=k.useState(null),[Ve,Ee]=k.useState(null),[z,A]=k.useState([]),me=k.useRef(null),[Se,Le]=k.useState(z.length);Se!==z.length&&(Le(z.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Ne,J]=k.useState(0),[fe,Ce]=k.useState(null),[oe,ee]=k.useState(null),[pe,Q]=k.useState(null),[ce,je]=k.useState(!0),[Ae,re]=k.useState(!1),[Re,ge]=k.useState(!1),Y=k.useRef(null),[B,te]=k.useState(P),[be,ue]=k.useState(P);P&&!be&&(ue(!0),te(!0),M(null),D(null),K(null),A([])),!P&&be&&ue(!1);const[De,ie]=k.useState(null),[C,R]=k.useState(void 0),[Qe,qe]=k.useState([]),[dt,Xe]=k.useState(0),[we,Oe]=k.useState(0),[Ls,$e]=k.useState(null),[wt,We]=k.useState(null),[Dn,Pn]=k.useState(null),Os=qa(),Fs=`${c}/${e}/${o}`,Gt=io({orgSlug:c,virtualMcpId:e,branch:o}),[zs,$s]=k.useState(x),[Hs,Gs]=k.useState(b),[Us,qs]=k.useState(y);(zs!==x||Hs!==b||Us!==y)&&(queueMicrotask(()=>Gt.flush()),$s(x),Gs(b),qs(y),M(null),D(null),K(null),ae(0),ye(null),Ee(null),Oe(0),$e(null),We(null),A([]),J(t=>t+1),te(!1),ie(null),R(void 0),qe([]),Xe(t=>t+1));const le=lo({orgSlug:c,virtualMcpId:e,branch:o}),Ut=Do((t,n)=>{le.mutate({blockKey:t,data:n},{onSuccess:()=>E?.(),onError:a=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),qt=Qo({orgSlug:c,virtualMcpId:e,branch:o}),[It,Tt]=k.useState(!1),he=k.useRef(null),ot=k.useRef(null),rt=k.useRef(null),un=k.useRef({}),Ze=k.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ws,Ys]=k.useState(null);if(!l||F||W)return s.jsx("div",{className:"h-full w-full flex items-center justify-center",children:s.jsx(Wa,{className:"size-5 text-muted-foreground"})});if(!i||!d)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const Js=er(i),xe=!!y,Ye=xe?null:tr(Js,x,b),_=xe?y:Ye?.key??null,dn=xe&&y?i[y]:void 0,Mn=xe&&y&&dn?nr(y,dn):xe&&y?y:"",Wt=!xe&&_&&i[_]?i[_]:null,mn=B&&i&&d&&_&&Ye?Jn(i,{kind:"page",pageKey:_,pageName:String(Ye.name??""),path:String(Ye.path??"")},d):null,Qs=B?Wt?.seo:void 0,fn=C!==void 0?C:Qs,Zs=B?co(fn):void 0,Xs=mn?.seoTypeOptions??[],ea=B&&d?uo(d):"",Cn=De??Zs??{},pn=B&&mn?lr(Cn,mn):null,ta=B&&pn&&mo(fn)?an(pn,d):null,na=B?fo(i,d)?.seoData:void 0,Fe=xe?[{label:"Default",sections:[{__resolveType:y}]}]:po(Wt?.sections,i??{}),Vt=Fe.length>1,Pe=Math.min(Ge,Fe.length-1),it=Fe[Pe],H=it?.sections??[],Be=tn(H,i),gn=!xe&&go(Wt?.sections);if(xe&&y&&Dn!==y){Pn(y);const t=H[0],n=Be[0];if(t&&n){M(0),Oe(0),A([]);const a=jt(t,n,i);a&&(D(a.data),K(a.resolveType),We(null),$e(null))}}!xe&&Dn!==null&&Pn(null),Ze.current={rawSections:H,parsedSections:Be,decofile:i??{},activePageKey:_,pageVariants:Fe,variantIndex:Pe,sectionVariantIndex:we,selectedSectionIndex:g};const sa=()=>({multivariate:gn,index:Pe,variants:Fe.map(t=>({rule:t.rule}))}),hn=(t,n)=>{if(!V)return;if(!_||!gn||t.length<=1){V(null);return}const a=os(_,{multivariate:!0,index:n,variants:t},i,d);V(a.length>0?a:null)},vn=V&&_&&gn&&Vt&&!F&&!W?_:null;if(vn!==Ws&&(Ys(vn),vn)){const t=Fe.map(a=>({rule:a.rule})),n=Pe;queueMicrotask(()=>hn(t,n))}const Nt=(t,n,a)=>{if(!V)return;if(!_){V(null);return}const r=sa(),u=os(_,r,i,d);if(!t||n<0){V(u.length>0?u:null);return}const h=pr({pageKey:_,page:r,sectionIndex:n,sectionLazy:Be[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:i,meta:d}),f=[...u,...h];V(f.length>0?f:null)},mt=(t,n,a,r=g??-1,u=!1)=>{const h=at(t,n);if(!h){D(null),K(null),We(null),$e(null),u&&Nt(null,r,a);return}const j=Qn(h,ht)[a];if(!j){D(null),K(null),We(null),$e(null),u&&Nt(null,r,a);return}const I=Eo(j.value,i);D(I?.data??null),K(I?.resolveType??null);const{resolveType:S,formValue:w}=Ot(j.rule,i,d??void 0);We(S),$e(w),u&&Nt(h,r,a)},Lt=N?.index;if(N!==void 0&&(N?.seq??null)!==Ue&&(Je(N?.seq??null),typeof Lt=="number")){const t=H[Lt],n=Be[Lt];if(t&&n)if(M(Lt),Oe(0),A([]),J(a=>a+1),n.isMultivariate)mt(t,n,0,Lt);else{const a=jt(t,n,i);a?(D(a.data),K(a.resolveType)):(D(null),K(null)),We(null),$e(null)}}const Yt={orgSlug:c,virtualMcpId:e,branch:o,threadId:O,previewUrl:p??void 0,siteSlug:Ie},yn=He&&d?an(He,d):null,et=(t,n)=>{if(!_)return;he.current&&(clearTimeout(he.current),he.current=null),rt.current&&(clearTimeout(rt.current),rt.current=null),ot.current&&(clearTimeout(ot.current),ot.current=null);const a=Ft(i,_,t,Pe,Fe);le.mutate({blockKey:_,data:a},{onSuccess:()=>n?.onSuccess?.()??E?.(),onError:r=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},At=()=>{M(null),D(null),K(null),Oe(0),$e(null),We(null),A([]),J(t=>t+1)},aa=(t,n)=>{he.current&&clearTimeout(he.current);const a=Ze.current.sectionVariantIndex;he.current=setTimeout(()=>{const{rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current,S=r[n];if(!S)return;const w=u[n];if(!w)return;if(w.isSavedBlock){const $=Io(S,w);if(!$)return;le.mutate({blockKey:$,data:t},{onSuccess:()=>E?.(),onError:G=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:G.message}))});return}if(!f)return;const T={...h[f]},de=[...r];if(w.isMultivariate){const $=at(S,w);if(!$||!f)return;const G=Lo($,a,t);de[n]=kt(S,w,G)}else if(w.isHidden){const $=Ss(S.__resolveType),G=$?{...S.section}:{...S},Me=Array.isArray(G.variants)?[...G.variants]:[];Me[0]&&(Me[0]={...Me[0],value:t}),G.variants=Me,$?de[n]={...S,section:G}:de[n]=G}else w.isLazy?de[n]={...S,section:t}:de[n]=t;if(j.length>1){const $=T.sections,G=[...$?.variants??[]];G[I]&&(G[I]={...G[I],value:de}),T.sections={...$,variants:G}}else T.sections=de;le.mutate({blockKey:f,data:T},{onSuccess:()=>E?.(),onError:$=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:$.message}))})},jn)},oa=t=>{M(t),Oe(0),A([]),J(u=>u+1);const n=H[t],a=Be[t];if(!n||!a)return;if(a.isMultivariate){mt(n,a,0,t);return}const r=jt(n,a,i);if(!r){D(null),K(null),We(null),$e(null),Nt(null,t,0);return}D(r.data),K(r.resolveType),We(null),$e(null),Nt(null,t,0)},Kn=t=>{const n=t;D(n),g!==null&&aa(n,g)},Sn=t=>{if(!_||!i||!d||!Ye)return;const n={kind:"page",pageKey:_,pageName:String(Ye.name??""),path:String(Ye.path??"")},a=Jn(i,n,d);a&&Gt.save(_,()=>{const r=Os.getQueryData(Ya.decofile(Fs))?.[_];if(!r||typeof r!="object"||r===null||Array.isArray(r))return null;const u={...r,...un.current};return un.current={},t?.raw!==void 0?{...u,seo:t.raw}:t?.inner!==void 0?ur(n,a,u,t.inner):u})},ra=(t,n)=>{_&&(un.current[t]=n,Sn())},ia=(t,n)=>{if(!_)return;const a=$t([...H],t,n);g!==null&&(g===t?M(n):t<g&&n>=g?M(g-1):t>g&&n<=g&&M(g+1)),et(a)},la=t=>{if(!_)return;const n=H.filter((a,r)=>r!==t);g===t?At():g!==null&&g>t&&M(g-1),et(n)},ca=t=>{if(!_)return;const n=H[t];if(!n)return;const a=[...H];a.splice(t+1,0,Ko(n)),g!==null&&g>t&&M(g+1),et(a)},ua=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a)return;const r=a.isHidden?Mo(n):Co(n);if(!r)return;const u=[...H];u[t]=r,g===t&&At(),et(u)},da=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a||a.isMultivariate)return;const r=Po(n);if(!r)return;const u=[...H];u[t]=r,g===t&&At(),et(u)},ma=t=>{if(!_)return;const n=H[t],a=Be[t];if(!n||!a?.isSavedBlock)return;const r=jt(n,a,i);if(!r?.data)return;const{name:u,...h}=r.data,f=[...H];a.isLazy?f[t]={...n,section:h}:f[t]=h,g===t&&At(),et(f)},fa=t=>{if(!_)return;const n=[...H,{__resolveType:t.resolveType}],a=n.length-1;et(n,{onSuccess:()=>{re(!1),M(a),Oe(0),A([]),J(f=>f+1);const r=n[a],u=tn(n,i)[a];if(!r||!u)return;if(u.isMultivariate){mt(r,u,0);return}const h=jt(r,u,i);if(!h){D(null),K(null),We(null),$e(null);return}D(h.data),K(h.resolveType),We(null),$e(null)}})},Bn=t=>{Y.current=t.append,re(!0)},pa=t=>{const n=Y.current;if(!n){fa(t);return}n({__resolveType:t.resolveType}),re(!1),Y.current=null},ga=t=>{if(g===null)return;const n=H[g],a=Be[g];!n||!a?.isMultivariate||(Oe(t),A([]),J(r=>r+1),mt(n,a,t,g,!0))},ha=t=>{if(g===null||!_)return;const n=H[g],a=Be[g];if(!n||!a?.isMultivariate)return;const r=at(n,a);if(!r)return;const u=No(r,t);if(!u){L.error(m("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const h=[...H];h[g]=kt(n,a,u);const f=u.variants;let j=we;t===we?j=Math.min(t,f.length-1):t<we&&(j=we-1),Oe(j),A([]),J(I=>I+1),mt(h[g],a,j),et(h)},va=t=>{if(g===null||!_)return;const n=H[g],a=Be[g];if(!n||!a?.isMultivariate)return;const r=at(n,a);if(!r)return;const u=Ao(r,t),h=[...H];h[g]=kt(n,a,u);const f=t+1;Oe(f),A([]),J(j=>j+1),mt(h[g],a,f),et(h)},ya=(t,n)=>{if(g===null||!_||t===n)return;const a=H[g],r=Be[g];if(!a||!r?.isMultivariate)return;const u=at(a,r);if(!u)return;const h=To(u,t,n),f=[...H];f[g]=kt(a,r,h);let j=we;we===t?j=n:t<we&&n>=we?j=we-1:t>we&&n<=we&&(j=we+1),Oe(j),mt(f[g],r,j),et(f)},bn=t=>{const n=t??g;if(n===null||!_)return;const a=H[n],r=Be[n];if(!a||!r)return;const u=ko(a,r);if(!u){L.error(m("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const h=[...H];h[n]=u.section;const f=tn(h,i)[n];if(!f?.isMultivariate){L.error(m("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}M(n),Oe(u.newVariantIndex),A([]),J(j=>j+1),mt(u.section,f,u.newVariantIndex,n),et(h)},Sa=()=>{if(g===null||!_)return;const t=H[g],n=Be[g];if(!t||!n?.isMultivariate)return;const a=at(t,n);if(!a)return;const r=Vo(t,n,a);if(!r){L.error(m("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const u=[...H];u[g]=r;const h=tn(u,i)[g];if(!h)return;Oe(0),We(null),$e(null),A([]),J(j=>j+1);const f=jt(r,h,i);f?(D(f.data),K(f.resolveType)):(D(null),K(null)),Nt(null,g,0),et(u)},ba=async t=>{if(fe===null||!_)return;const n=rn(t,i);if(n){L.error(n);return}const a=H[fe],r=Be[fe];if(!a||!r)return;const u=jt(a,r,i);if(!u){L.error(m("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const h={...u.data,name:t};try{await le.mutateAsync({blockKey:t,data:h});const f=[...H];f[fe]={__resolveType:t},await le.mutateAsync({blockKey:_,data:Ft(i,_,f,Pe,Fe)}),g===fe&&At(),Ce(null),L.success(m("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),E?.()}catch(f){L.error(f instanceof Error?f.message:m("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},In=it?.rule;if(Vt&&g===null&&Ve===null&&In){const{resolveType:t,formValue:n}=Ot(In,i??{},d??void 0);Ee(t),ye(n)}const Jt=d?ho(d):[],Ln=d&&i?vo(d,i):[],xa=!xe&&!!(Te&&d&&i),_a=Ve&&d?an(Ve,d):null,ft=()=>{ot.current&&(clearTimeout(ot.current),ot.current=null),rt.current&&(clearTimeout(rt.current),rt.current=null)},bt=async(t,n)=>{if(!(Bo(n,t,d)>0))try{await qt.mutateAsync({blockKey:t})}catch(a){L.error(a instanceof Error?a.message:m("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},On=t=>{ot.current&&clearTimeout(ot.current),ot.current=setTimeout(()=>{const{activePageKey:n,decofile:a,variantIndex:r}=Ze.current;if(!n)return;const u={...a[n]},h={...u.sections},f=[...h.variants??[]],j=f[r],I=j?.rule;if(Rt(I,a,d)){const S=I?.__resolveType??"",w=a[S],T=typeof w?.name=="string"?w.name:S,{__resolveType:de,...$}=t;le.mutate({blockKey:S,data:vt(de??"",$,T)},{onSuccess:()=>E?.(),onError:G=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:G.message}))});return}j&&(f[r]={...j,rule:t}),u.sections={...h,variants:f},le.mutate({blockKey:n,data:u},{onSuccess:()=>E?.(),onError:S=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:S.message}))})},jn)},Ea=t=>{Ee(t);const n=t?ss(t,d):{__resolveType:as};ye(t?n:{}),On(n)},ja=t=>{const n=t;ye(n);const a=Ve?{__resolveType:Ve,...n}:{...n};On(a)},ka=async t=>{ft();const{activePageKey:n,decofile:a,variantIndex:r}=Ze.current;if(!n)return;const u=a[n],h=u?.sections;if(!h||typeof h!="object"||Array.isArray(h))return;const f=h;if(!Array.isArray(f.variants))return;const j=[...f.variants],I=j[r];if(!I)return;const S=Pt(I.rule,a,d),w=Mt(t);j[r]={...I,rule:w};const T={...a,[n]:{...u,sections:{...f,variants:j}}},{resolveType:de,formValue:$}=Ot(w,T,d??void 0);Ee(de),ye($);try{await le.mutateAsync({blockKey:n,data:T[n]}),S&&S!==t&&await bt(S,T),E?.()}catch(G){L.error(G instanceof Error?G.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},Fn=t=>{rt.current&&clearTimeout(rt.current);const{selectedSectionIndex:n,sectionVariantIndex:a}=Ze.current;n!==null&&(rt.current=setTimeout(()=>{const{rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(!f)return;const S=r[n],w=u[n];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const $=(T.variants??[])[a]?.rule;if(Rt($,h,d)){const ve=$?.__resolveType??"",tt=h[ve],lt=typeof tt?.name=="string"?tt.name:ve,{__resolveType:pt,...ct}=t;le.mutate({blockKey:ve,data:vt(pt??"",ct,lt)},{onSuccess:()=>E?.(),onError:gt=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:gt.message}))});return}const G=ns(T,a,t),Me=[...r];Me[n]=kt(S,w,G);const st=Ft(h,f,Me,I,j);le.mutate({blockKey:f,data:st},{onSuccess:()=>E?.(),onError:ve=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:ve.message}))})},jn))},Ra=t=>{We(t);const n=t?ss(t,d):{__resolveType:as};$e(t?n:{}),Fn(n)},wa=t=>{const n=t;$e(n);const a=wt?{__resolveType:wt,...n}:{...n};Fn(a)},Ta=async t=>{ft();const{selectedSectionIndex:n,sectionVariantIndex:a,rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(n===null||!f)return;const S=r[n],w=u[n];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const de=T.variants??[],$=Pt(de[a]?.rule,h,d),G=Mt(t),Me=ns(T,a,G),st=[...r];st[n]=kt(S,w,Me);const ve=Ft(h,f,st,I,j),tt={...h,[f]:ve},{resolveType:lt,formValue:pt}=Ot(G,tt,d??void 0);We(lt),$e(pt);try{await le.mutateAsync({blockKey:f,data:ve}),$&&$!==t&&await bt($,tt),E?.()}catch(ct){L.error(ct instanceof Error?ct.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!xe&&!Ye)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.noPageFound",{currentPath:x})});if(xe&&!dn)return s.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:m("sectionsEditor.sectionsEditor.globalBlockNotFound")});const nt=g!==null?Be[g]??null:null,zn=g!==null?H[g]:null,$n=zn&&nt?.isMultivariate?at(zn,nt):null,xt=$n?Qn($n,ht):[],xn=Math.min(we,Math.max(xt.length-1,0)),Dt=xt[xn]??null,_t=nt?.isMultivariate===!0,Hn=g!==null&&nt!==null,Qt=Hn&&(_t||!!(yn&&ke)),Va=Qt&&!xe&&nt?.isSavedBlock===!0,Et=xe||Va,Na=xe?Mn:nt?.label??"",Aa=wt&&d?an(wt,d):null,Zt=Qt&&(!xe||z.length>0)?xe?[Mn,...z]:[Ye.name,..._t&&Dt?X?[`${nt.variantOf??nt.label} · ${Dt.label}`]:[nt.label,Dt.label]:[nt.label],...z]:[],Gn=B&&Ye?[Ye.name,"SEO",...Qe]:[],Xt=Gn.length>0?Gn:Et?Zt.length>0?Zt:[Na]:Zt.length>0?Zt:[Ye.name],Un=Hn&&!_t&&!nt?.isHidden&&!!_,Da=Et||!xe&&Vt&&!!it||Un,Pa=!X&&!B&&!xe&&_t&&z.length===0,qn=()=>{if(!_)return;ft(),he.current&&(clearTimeout(he.current),he.current=null);const t=i[_],n=Ro(t.sections,H);if(!n)return;const a=wo(n);le.mutate({blockKey:_,data:{...t,sections:n}},{onSuccess:()=>{ae(a),M(null),D(null),K(null),A([]),ye(null),Ee(null)},onError:r=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:r.message}))})},_n=(t,n,a)=>{if(!_)return;ft(),he.current&&(clearTimeout(he.current),he.current=null);const r=i[_],u=r.sections;if(!u||typeof u!="object"||Array.isArray(u))return;const h=u;if(!Array.isArray(h.variants))return;const f=t([...h.variants]);if(!f)return;const j=Oo(h,f),I={...i,[_]:{...r,sections:j}};le.mutate({blockKey:_,data:I[_]},{onSuccess:()=>{n?.(),a&&bt(a,I)},onError:S=>L.error(m("sectionsEditor.sectionsEditor.saveFailed",{error:S.message}))})},Ma=t=>{ee(null),ae(t),M(null),D(null),K(null),A([]);const n=Fe[t]?.rule,{resolveType:a,formValue:r}=Ot(n,i??{},d??void 0);Ee(a),ye(r),hn(Fe.map(u=>({rule:u.rule})),t)},Ca=(t,n)=>{if(t===n)return;let a=Pe;Pe===t?a=n:t<Pe&&n>=Pe?a=Pe-1:t>Pe&&n<=Pe&&(a=Pe+1),ae(a);const r=$t(Fe.map(u=>({rule:u.rule})),t,n);hn(r,a),_n(u=>$t(u,t,n))},Ka=t=>{const n=Fe[t]?.rule,a=Pt(n,i??{},d??void 0);_n(r=>r.length<=1?null:(r.splice(t,1),r),()=>{Fe.length-1===1?ae(0):t<Pe?ae(Pe-1):t===Pe&&ae(Math.max(0,t-1)),M(null),D(null),K(null),A([]),ye(null),Ee(null)},a)},Ba=t=>{_n(n=>Fo(n,t),()=>{ae(t+1),M(null),D(null),K(null),A([]),ye(null),Ee(null)})},Ia=async(t,n)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const a=Ze.current.activePageKey,r=Ze.current.decofile;if(!a)return;const u=r[a],h=u.sections;if(!h||typeof h!="object"||Array.isArray(h))return;const f=h;if(!Array.isArray(f.variants))return;const j=[...f.variants],I=j[t];if(!I?.rule||typeof I.rule!="object"){L.error(m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const S=I.rule,w=n.trim();Tt(!0);try{if(!w){if(!Rt(S,r,d)){ee(null);return}const st=S.__resolveType??"";j[t]={...I,rule:Rn(S,r,d)};const ve={...r,[a]:{...u,sections:{...f,variants:j}}};await le.mutateAsync({blockKey:a,data:ve[a]}),await bt(st,ve),ee(null),E?.();return}const T=wn(S,r,d);if(!T){L.error(m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(T.blockKey){await le.mutateAsync({blockKey:T.blockKey,data:vt(T.resolveType,T.data,w)}),ee(null),E?.();return}const de=on(w),$=rn(de,r);if($){L.error($);return}const G=vt(T.resolveType,T.data,w);let Me=null;try{await le.mutateAsync({blockKey:de,data:G}),Me=de,j[t]={...I,rule:Mt(de)},await le.mutateAsync({blockKey:a,data:{...u,sections:{...f,variants:j}}}),Me=null}catch(st){throw Me&&await qt.mutateAsync({blockKey:Me}).catch(()=>{}),st}ee(null),L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:w})),E?.()}catch(T){L.error(T instanceof Error?T.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}},La=async(t,n)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{selectedSectionIndex:a,rawSections:r,parsedSections:u,decofile:h,activePageKey:f,pageVariants:j,variantIndex:I}=Ze.current;if(a===null||!f)return;const S=r[a],w=u[a];if(!S||!w?.isMultivariate)return;const T=at(S,w);if(!T)return;const de=T.variants??[],$=de[t];if(!$?.rule||typeof $.rule!="object"){L.error(m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const G=$.rule,Me=n.trim();Tt(!0);const st=async ve=>{const tt={...T,variants:ve},lt=[...r];lt[a]=kt(S,w,tt);const pt=Ft(h,f,lt,I,j);return await le.mutateAsync({blockKey:f,data:pt}),{...h,[f]:pt}};try{if(!Me){if(!Rt(G,h,d)){Q(null);return}const gt=G.__resolveType??"",Yn=[...de];Yn[t]={...$,rule:Rn(G,h,d)};const Ga=await st(Yn);await bt(gt,Ga),Q(null),E?.();return}const ve=wn(G,h,d);if(!ve){L.error(m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(ve.blockKey){await le.mutateAsync({blockKey:ve.blockKey,data:vt(ve.resolveType,ve.data,Me)}),Q(null),E?.();return}const tt=on(Me),lt=rn(tt,h);if(lt){L.error(lt);return}const pt=vt(ve.resolveType,ve.data,Me);let ct=null;try{await le.mutateAsync({blockKey:tt,data:pt}),ct=tt;const gt=[...de];gt[t]={...$,rule:Mt(tt)},await st(gt),ct=null}catch(gt){throw ct&&await qt.mutateAsync({blockKey:ct}).catch(()=>{}),gt}Q(null),L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:Me})),E?.()}catch(ve){L.error(ve instanceof Error?ve.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}},Oa={rename:async(t,n,a)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{activePageKey:r,decofile:u}=Ze.current;if(!r)return;const h=Array.isArray(t.variants)?[...t.variants]:[],f=h[n],j=f?.rule&&typeof f.rule=="object"?f.rule:void 0,I=async w=>{const T={...t,variants:w};return await le.mutateAsync({blockKey:r,data:T}),{...u,[r]:T}},S=Hr(j,a,u,d);if(S.kind!=="noop"){if(S.kind==="error"){L.error(S.reason==="no-matcher-rule"?m("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):S.reason==="unreadable-rule"?m("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):S.message??m("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Tt(!0);try{if(S.kind==="inline"){const T=[...h];T[n]={...f,rule:S.inlinedRule};const de=await I(T);await bt(S.blockKey,de),E?.();return}if(S.kind==="updateBlock"){await le.mutateAsync({blockKey:S.blockKey,data:S.blockData}),E?.();return}let w=null;try{await le.mutateAsync({blockKey:S.blockId,data:S.blockData}),w=S.blockId;const T=[...h];T[n]={...f,rule:S.reference},await I(T),w=null}catch(T){throw w&&await qt.mutateAsync({blockKey:w}).catch(()=>{}),T}L.success(m("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:a.trim()})),E?.()}catch(w){L.error(w instanceof Error?w.message:m("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Tt(!1)}}},selectGlobal:async(t,n,a)=>{ft(),he.current&&(clearTimeout(he.current),he.current=null);const{activePageKey:r,decofile:u}=Ze.current;if(!r)return;const h=Array.isArray(t.variants)?[...t.variants]:[],f=h[n];if(!f)return;const j=Pt(f.rule,u,d);h[n]={...f,rule:Mt(a)};const I={...t,variants:h},S={...u,[r]:I};try{await le.mutateAsync({blockKey:r,data:I}),j&&j!==a&&await bt(j,S),E?.()}catch(w){L.error(w instanceof Error?w.message:m("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}}},Wn=()=>{At()},Fa=t=>{ie(t),Sn({inner:t})},za=t=>{R(t),Sn({raw:t})},$a=()=>{ie(null),qe([])},Ha=()=>Xe(t=>t+1),En=t=>{if(B){if(t===0){Gt.flush(),te(!1),ie(null),R(void 0),qe([]),Xe(a=>a+1),ne?.();return}if(t===1){qe([]),Xe(a=>a+1);return}qe(Qe.slice(0,t-1)),Xe(a=>a+1);return}if(xe){A(z.slice(0,t)),J(a=>a+1);return}if(t===0){Wn();return}if(t===1){A([]),J(a=>a+1);return}const n=!X&&_t&&Dt?1:0;if(n===1&&t===2){A([]),J(a=>a+1);return}A(z.slice(0,t-1-n))},en=Xt.length>1?s.jsx("button",{type:"button",onClick:()=>En(jo(Xt.length,{isMultivariateSectionTop:Pa})),title:m("sectionsEditor.sectionsEditor.back"),"aria-label":m("sectionsEditor.sectionsEditor.back"),className:Ke("shrink-0 inline-flex size-6 items-center justify-center classic:rounded-md compact:rounded-lg transition-colors",Et?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:s.jsx(qo,{className:"size-4"})}):null;return s.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&en&&s.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:en}),(X||Xt.length>1)&&s.jsx(yo,{crumbs:Xt,onSelect:En,onSelectRoot:()=>{Gt.flush(),Z?Z():En(0)}}),s.jsx("div",{className:"shrink-0",children:Et||Qt||B?(Da||X&&en)&&s.jsxs("div",{className:Ke("border-b px-3 py-2.5",Et&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[X&&en,!xe&&Vt&&it&&s.jsxs("button",{type:"button",onClick:Wn,title:m("sectionsEditor.sectionsEditor.editingInVariant",{variant:it.label}),className:Ke("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",So),children:[s.jsx(An,{rule:zt(it.rule,i??{},d??void 0),matchers:Jt}),s.jsx("span",{className:"max-w-[160px] truncate",children:it.label})]}),s.jsx("div",{className:"flex-1"}),Et&&s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx("span",{className:"shrink-0 cursor-help",children:s.jsx(ys,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),s.jsx(Bt,{side:"bottom",className:"max-w-[260px]",children:m("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Un&&s.jsx(Zn,{onClick:()=>bn()})]}),Et&&s.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:m("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):s.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(bo,{pageKey:_,initialName:Ye.name,initialPath:Ye.path,onFieldChange:ra})}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":m("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>te(!0),children:s.jsx(Wo,{size:14})})}),s.jsx(Bt,{side:"bottom",children:m("sectionsEditor.sectionsEditor.editSeo")})]}),s.jsxs(Ct,{children:[s.jsx(Kt,{asChild:!0,children:s.jsx(ut,{type:"button",variant:"ghost",size:"icon","aria-label":m("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>U&&_?U():ge(!0),children:s.jsx(Yo,{size:14})})}),s.jsx(Bt,{side:"bottom",children:m("sectionsEditor.sectionsEditor.viewJson")})]}),s.jsx(Zn,{onClick:qn})]})}),B?s.jsx(sn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:s.jsx("div",{className:"mx-auto max-w-2xl",children:Wt&&_?s.jsx(cr,{rawSeo:fn,innerSeo:Cn,defaultResolveType:ea,seoSchema:ta,activeResolveType:pn,seoTypeOptions:Xs,formResetKey:dt,siteDefaultSeo:na,onBreadcrumbChange:qe,onPersistRaw:za,onInnerChange:Fa,onClearForm:$a,onBumpFormKey:Ha}):s.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:m("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"):Qt?s.jsxs(sn,{viewportRef:me,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[_t&&xt.length>0&&z.length===0&&s.jsxs(s.Fragment,{children:[s.jsx(xo,{listKey:`${_??""}:${g??""}`,variants:xt.map((t,n)=>({index:n,label:t.label})),selectedIndex:xn,onSelect:ga,onRename:Q,onDuplicate:va,onDelete:ha,onRemoveAll:Sa,onReorder:ya,onAdd:()=>bn()}),_t&&s.jsxs("div",{className:"px-3 py-3 border-b space-y-2",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sectionsEditor.sectionsEditor.variantRule")}),s.jsx(Xn,{currentRt:wt??"",currentLabel:nn(Dt?.rule,i??{},ht,d??void 0),currentGlobalKey:Pt(Dt?.rule,i??{},d??void 0)??void 0,matchers:Jt,globals:Ln,onSelect:Ra,onSelectGlobal:Ta,schema:Aa,formValue:Ls,onChange:wa,formKey:`${g??"none"}:${xn}:${wt??""}`,formWrapperClassName:"pt-1",meta:d??void 0,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt})]})]}),s.jsx(es,{activeSchema:yn,formValue:ke,formResetKey:Ne,onFormChange:Kn,onBreadcrumbChange:A,breadcrumbPath:z,emptyMessage:m("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:d,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt,previewBaseUrl:Te,onRequestAddSection:Bn})]},"editor-section-form"):xe?s.jsx(sn,{viewportRef:me,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx(es,{activeSchema:yn,formValue:ke,formResetKey:Ne,onFormChange:Kn,onBreadcrumbChange:A,breadcrumbPath:z,emptyMessage:m("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:d,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt,previewBaseUrl:Te,onRequestAddSection:Bn,onVariantMatcherOp:Oa})},"editor-global-block"):s.jsxs(sn,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[Vt&&_&&s.jsx(zr,{listKey:_,variants:Fe,activeIndex:Pe,decofile:i??{},meta:d,matchers:Jt,onSelect:Ma,onReorder:Ca,onRename:ee,onDuplicate:Ba,onDelete:Ka,onAdd:qn}),Vt&&Ve!==null&&s.jsxs("div",{className:Ke("px-3 border-b",ce?"pt-3 pb-5 space-y-3":"py-2"),children:[s.jsxs("button",{type:"button",onClick:()=>je(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer classic:rounded-sm compact:rounded-lg py-0.5 hover:bg-muted/40","aria-expanded":ce,children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sectionsEditor.sectionsEditor.variantRule")}),ce?s.jsx($o,{className:"size-3.5 shrink-0 text-muted-foreground"}):s.jsx(Ho,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),ce&&s.jsx("div",{className:Ke("space-y-3",It&&"pointer-events-none opacity-50"),children:s.jsx(Xn,{currentRt:Ve,currentLabel:nn(it?.rule,i??{},ht,d??void 0),currentGlobalKey:Pt(it?.rule,i??{},d??void 0)??void 0,matchers:Jt,globals:Ln,onSelect:Ea,onSelectGlobal:ka,schema:_a,formValue:ze,onChange:ja,formKey:`${Pe}:${Ve??""}`,formWrapperClassName:"space-y-3",meta:d??void 0,decofile:i,onSaveReferencedBlock:Ut,sandbox:Yt})})]}),s.jsx("div",{className:"p-2 pt-3",children:s.jsx(Pr,{listKey:`${_??""}-${Pe}`,rawSections:H,sections:Be,meta:d,decofile:i,selectedIndex:g,onSelect:oa,onReorder:ia,onDelete:la,onDuplicate:ca,onMakeReusable:Ce,onToggleHidden:ua,onToggleLazy:da,onAddVariant:bn,onDetach:ma,onAddSection:()=>re(!0),canAddSection:xa})})]},"editor-section-list"),s.jsx(_o,{open:fe!==null,onOpenChange:t=>{t||Ce(null)},defaultBlockId:fe!==null?on(Be[fe]?.label??""):"",isPending:le.isPending,onSubmit:ba}),Te&&s.jsx(fr,{open:Ae,onOpenChange:t=>{re(t),t||(Y.current=null)},meta:d,decofile:i,previewBaseUrl:Te,onSelect:pa}),Re&&_&&i&&s.jsx(Zo,{open:Re,onOpenChange:ge,pageKey:_,decofile:i}),oe!==null&&s.jsx(ts,{open:!0,initialName:Rt(Fe[oe]?.rule,i??{},d??void 0)?nn(Fe[oe]?.rule,i??{},ht,d??void 0):"",autoLabel:ht(zt(Fe[oe]?.rule,i??{},d??void 0)),isPending:It,onSubmit:async t=>{await Ia(oe,t)},onOpenChange:t=>{!t&&!It&&ee(null)}}),pe!==null&&s.jsx(ts,{open:!0,initialName:Rt(xt[pe]?.rule,i??{},d??void 0)?nn(xt[pe]?.rule,i??{},ht,d??void 0):"",autoLabel:ht(zt(xt[pe]?.rule,i??{},d??void 0)),isPending:It,onSubmit:async t=>{await La(pe,t)},onOpenChange:t=>{!t&&!It&&Q(null)}})]})}export{xc as SectionsEditor};
|