decocms 4.580.0 → 4.580.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-B490hSlt.js → AlertCircle-Bw3i2ESn.js} +1 -1
- package/dist/client/assets/{AreaChart-BD_Roedd.js → AreaChart-YZwx98Is.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DafuRRD5.js → ArrowLeft-6fw6vHKx.js} +1 -1
- package/dist/client/assets/{ArrowUp-DtGM9L0j.js → ArrowUp-CoOHlCW9.js} +1 -1
- package/dist/client/assets/{BookOpen01-CV2z4c8F.js → BookOpen01-CIigO21o.js} +1 -1
- package/dist/client/assets/{CartesianChart-CrCj1-9j.js → CartesianChart-BiVhh5D6.js} +1 -1
- package/dist/client/assets/{CategoricalChart-xRS359kv.js → CategoricalChart-LwMiidhq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DPwXaovL.js → CheckCircle-Bp8tITGL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BMmx_KCU.js → ChevronSelectorVertical-EzXJxozj.js} +1 -1
- package/dist/client/assets/{ChevronUp-Ce_cpdSH.js → ChevronUp-rwg_m6Bz.js} +1 -1
- package/dist/client/assets/{CreditCard01-AousihIp.js → CreditCard01-BSJJY0ul.js} +1 -1
- package/dist/client/assets/{Globe04-Beu1mUUo.js → Globe04-vWAQu6ql.js} +1 -1
- package/dist/client/assets/{Key01-C_oaxPMj.js → Key01-CJqMVRWW.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DanTXGHc.js → LinkBroken01-eOLBCf9g.js} +1 -1
- package/dist/client/assets/{Minus-DbBml1RM.js → Minus-D2dKSFlw.js} +1 -1
- package/dist/client/assets/{Monitor01-DTuQNZAT.js → Monitor01-Ib8XdXsU.js} +1 -1
- package/dist/client/assets/{Play-Di4Yv58S.js → Play-2aGPtJuo.js} +1 -1
- package/dist/client/assets/{Plus--VZnEUO0.js → Plus-lUyuDazr.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DOIz5qVd.js → ReferenceLine-B_-wMiIS.js} +1 -1
- package/dist/client/assets/{SearchMd-D17naag4.js → SearchMd-D0-9ej42.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Ca3CPvRM.js → ShoppingBag01-Ct2vEJ5p.js} +1 -1
- package/dist/client/assets/{Sun-B7TipsV2.js → Sun-DgJwoRO5.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-IY2QD6Vf.js → SwitchHorizontal01-1mxe_S61.js} +1 -1
- package/dist/client/assets/{Tool01-DqBi4vmR.js → Tool01-Yd8ogx8N.js} +1 -1
- package/dist/client/assets/{Tooltip-MxdafbEz.js → Tooltip-sBZ1wr_5.js} +1 -1
- package/dist/client/assets/{Trash01-CodGA_L3.js → Trash01-CGn497Nk.js} +1 -1
- package/dist/client/assets/{Upload01-CWNUSACo.js → Upload01-bs3kHvY6.js} +1 -1
- package/dist/client/assets/{UserSquare-Ba1GW4kA.js → UserSquare-CMedzjXl.js} +1 -1
- package/dist/client/assets/{Users01-LIRLEmGk.js → Users01-DBiECFzL.js} +1 -1
- package/dist/client/assets/{XClose-Ddq6ci19.js → XClose-CjAbxo6W.js} +1 -1
- package/dist/client/assets/{Zap-D88LAwUm.js → Zap-BNB_xEwI.js} +1 -1
- package/dist/client/assets/{access-gate-DoWbmgSR.js → access-gate-DnxUMUUc.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-WlcCkPK1.js → add-connection-dialog-Ci7nF80a.js} +1 -1
- package/dist/client/assets/agent-app-CgBlsdxv.js +1 -0
- package/dist/client/assets/{agent-assets-PBJXgM6u.js → agent-assets-DW6IxMNR.js} +1 -1
- package/dist/client/assets/{agent-automation-DVmOZGtA.js → agent-automation-BVkfRmrC.js} +1 -1
- package/dist/client/assets/{agent-automations-CO9rwZOq.js → agent-automations-CipWfqGX.js} +1 -1
- package/dist/client/assets/{agent-blog--ERi0BnT.js → agent-blog-B9tZD6I7.js} +2 -2
- package/dist/client/assets/{agent-blog-post-4QotU6Nd.js → agent-blog-post-Bz4HBy8Z.js} +2 -2
- package/dist/client/assets/{agent-calendar-DfjpCx1Y.js → agent-calendar-9OIzucax.js} +1 -1
- package/dist/client/assets/{agent-capabilities-D5_s8oLS.js → agent-capabilities-CUP63BgI.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DXqGgV-u.js → agent-connect-sources-CaQuqdds.js} +1 -1
- package/dist/client/assets/agent-deck-BDsmc-WO.js +1 -0
- package/dist/client/assets/{agent-e2e-m4Qqei41.js → agent-e2e-WCBtnyjS.js} +1 -1
- package/dist/client/assets/agent-experiments-BI8egj34.js +1 -0
- package/dist/client/assets/{agent-file-BqOTIsah.js → agent-file-CVS3E5P1.js} +1 -1
- package/dist/client/assets/{agent-hosting-CLP6bzwI.js → agent-hosting-DpUln3JV.js} +1 -1
- package/dist/client/assets/{agent-icon-Cgeh7jW8.js → agent-icon-BFR8_3zP.js} +1 -1
- package/dist/client/assets/agent-library-B0EBwJN9.js +1 -0
- package/dist/client/assets/agent-library-file-DTeHfuOr.js +1 -0
- package/dist/client/assets/agent-overview-BO0vXHXf.js +1 -0
- package/dist/client/assets/{agent-releases-Dsg8Eaml.js → agent-releases-CGIlDi4h.js} +1 -1
- package/dist/client/assets/agent-settings-BGpFw8xn.js +1 -0
- package/dist/client/assets/{agent-site-editor-74zqYFaL.js → agent-site-editor-DAIgJQEZ.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DH3SllH_.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CbuNFOxK.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-o2YfbLEH.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bvnd0G7J.js → agent-view-guard-BGDwff2e.js} +1 -1
- package/dist/client/assets/agent-view-pdBq0p5X.js +1 -0
- package/dist/client/assets/{ai-providers-C86HHWcI.js → ai-providers-Cm5oVFDV.js} +1 -1
- package/dist/client/assets/{alert-Ddk4XOBP.js → alert-CUxou095.js} +1 -1
- package/dist/client/assets/{analytics-sections-ttnA5J1P.js → analytics-sections-CCUq05Wb.js} +1 -1
- package/dist/client/assets/api-keys-Bmt0Z1d3.js +1 -0
- package/dist/client/assets/{api-keys-BDc0LqXX.js → api-keys-Ci7K2c5M.js} +1 -1
- package/dist/client/assets/{app-editor-BqOBHscf.js → app-editor-Bcpx-hkZ.js} +1 -1
- package/dist/client/assets/{asset-utils-CQgV2l5S.js → asset-utils-Cm9qiSAT.js} +1 -1
- package/dist/client/assets/{auth-htV3gWDl.js → auth-BEwu0a-x.js} +1 -1
- package/dist/client/assets/{auth-catchall-TyhKRaCF.js → auth-catchall-CZ9gFtkN.js} +1 -1
- package/dist/client/assets/{auth-entry-Bpiei21J.js → auth-entry-DQRpj7zn.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DcB3Nrin.js → auth-split-layout-CDkLebwC.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BPizgCN9.js → authenticate-and-persist-oauth-s29KUt6J.js} +1 -1
- package/dist/client/assets/{automation-list-row-eJAAzL38.js → automation-list-row-BxrxLejb.js} +1 -1
- package/dist/client/assets/{automation-runs-nA1rdWGx.js → automation-runs-a6qF3SvW.js} +1 -1
- package/dist/client/assets/{automations-BSnZhOU7.js → automations-gzRA8y9-.js} +1 -1
- package/dist/client/assets/{badge-2MmgfPaN.js → badge-C7t6LTfR.js} +1 -1
- package/dist/client/assets/{block-document-ou4uYvdS.js → block-document-CYqbJzu2.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-s_XY_qcc.js → blocks-preview-workspace-context-CsoNzElb.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-C3TVI4qC.js → blocks-tab-states-CITyhFLq.js} +1 -1
- package/dist/client/assets/{blog-preview-url-C2NLmgi3.js → blog-preview-url-B3s1HKrf.js} +1 -1
- package/dist/client/assets/{blog-schema-BZ5bXjzr.js → blog-schema-BkYmMuIN.js} +1 -1
- package/dist/client/assets/{blog-source-gate-D9hQSk7w.js → blog-source-gate-ObteKPqG.js} +1 -1
- package/dist/client/assets/{blog-view-gate-Bfmpcuxi.js → blog-view-gate-COpydlZZ.js} +1 -1
- package/dist/client/assets/{buckets-Br_ZGNiu.js → buckets-BtdFp7x2.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CaVCze7H.js → build-improve-prompt-doc-mvHEeMRP.js} +1 -1
- package/dist/client/assets/{calendar-8DkTle43.js → calendar-BzCbg4ac.js} +1 -1
- package/dist/client/assets/{capability-load-error-UJW8JSu-.js → capability-load-error-DOumSsHX.js} +1 -1
- package/dist/client/assets/{category-editor-Dr07txuz.js → category-editor-LNIPQku6.js} +1 -1
- package/dist/client/assets/{category-tree-CkEo0YAl.js → category-tree-D93GzJKM.js} +1 -1
- package/dist/client/assets/{chart-DogG6gJM.js → chart-DoFUxyzx.js} +1 -1
- package/dist/client/assets/{chat-context-DWiThF8S.js → chat-context-CYceSwsW.js} +1 -1
- package/dist/client/assets/{chat-draft-B3jssFA8.js → chat-draft-BnWEOJEz.js} +1 -1
- package/dist/client/assets/{checkbox-BnIB6z48.js → checkbox-CatUuWpu.js} +1 -1
- package/dist/client/assets/{choose-editor-TvQtb_tG.js → choose-editor-lBrezox9.js} +1 -1
- package/dist/client/assets/{cli-auth-success-ZAdvA-Xl.js → cli-auth-success-CTZyHvy1.js} +1 -1
- package/dist/client/assets/{client-icons-DVQ-0ktS.js → client-icons-DWq7lbi2.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-CovIiNyS.js → cms-settings-editor-Fbx4SvQp.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BSPHJVkT.js → cms-store-drafts-BlEVeidT.js} +1 -1
- package/dist/client/assets/{collapsible-BFaoixTu.js → collapsible-Cn64wIV8.js} +1 -1
- package/dist/client/assets/{collection-detail-BowTRYxc.js → collection-detail-CSgxC7jS.js} +1 -1
- package/dist/client/assets/{collection-display-button-C8-Z4iHs.js → collection-display-button-WiUHbW4Q.js} +1 -1
- package/dist/client/assets/{collection-search-Bzs9Mv8d.js → collection-search-D22DG-N6.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D376ruwc.js → collection-table-wrapper-C4E2H8ma.js} +1 -1
- package/dist/client/assets/{collection-tabs-CLS4TDPh.js → collection-tabs-D5_OqrKG.js} +1 -1
- package/dist/client/assets/{combobox-H2ovb-DO.js → combobox-jjs4eQim.js} +1 -1
- package/dist/client/assets/{command-HsZGGhEb.js → command-Bvze9Tif.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CodCTohE.js → companion-mcps-section-DXXRrWwX.js} +1 -1
- package/dist/client/assets/{config-USouThEx.js → config-tetulvEK.js} +1 -1
- package/dist/client/assets/{connect-C5hrcFB1.js → connect-B-JF1Swb.js} +1 -1
- package/dist/client/assets/{connect-layout-DVa42aXM.js → connect-layout-Crhi6OLb.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-BZzC0_G0.js → connect-source-dialog-DuRrdg_m.js} +1 -1
- package/dist/client/assets/{connection-NXvPQOLL.js → connection-MdGKY2XR.js} +1 -1
- package/dist/client/assets/{connection-card-ConjJ0hW.js → connection-card-PbivGt0u.js} +1 -1
- package/dist/client/assets/{connection-detail-BXPHZvUS.js → connection-detail-CTR0SCc3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-m3kpO5UT.js → connection-form-helpers-BF6bBhxD.js} +1 -1
- package/dist/client/assets/{connection-slug-Ca7qS-7c.js → connection-slug-DjZZC92k.js} +1 -1
- package/dist/client/assets/{connections-DUVJ4E8S.js → connections-CX8LGFB-.js} +1 -1
- package/dist/client/assets/{content-tab-CLSQtEPY.js → content-tab-DpjaAWls.js} +3 -3
- package/dist/client/assets/{context-uUJlzVhd.js → context-04OXdETR.js} +1 -1
- package/dist/client/assets/{context-menu-ChEd2pqk.js → context-menu-DJ6EtlZo.js} +1 -1
- package/dist/client/assets/{context-shell-BwSw_hav.js → context-shell-DHGUs3h1.js} +3 -3
- package/dist/client/assets/{core.esm-FuunRrAt.js → core.esm-BBx9DFCe.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Zgxxuc03.js → create-organization-dialog-B2z-lMM3.js} +1 -1
- package/dist/client/assets/{delete-copy-70AoILCz.js → delete-copy-C1OD72vk.js} +1 -1
- package/dist/client/assets/{device-hint-DmGomvvg.js → device-hint-Bt7sIQmQ.js} +1 -1
- package/dist/client/assets/{discover-DYm4HrFe.js → discover-DlOTrxS0.js} +1 -1
- package/dist/client/assets/{domain-settings-qW_4jz57.js → domain-settings-Cu5x5rE1.js} +1 -1
- package/dist/client/assets/{drawer-CEHmheEC.js → drawer-CYcKWGYw.js} +1 -1
- package/dist/client/assets/{editor-2DOEfa-g.js → editor-DnLe1jNS.js} +1 -1
- package/dist/client/assets/{editor-classes-oEHYD8ed.js → editor-classes-CmD68Fq4.js} +1 -1
- package/dist/client/assets/{empty-message-BJ9hht1U.js → empty-message-mnnSg0iM.js} +1 -1
- package/dist/client/assets/{empty-state-BYcwGXE6.js → empty-state-D60YSb1b.js} +1 -1
- package/dist/client/assets/{empty-state-wGW5h04R.js → empty-state-Sh3VG-tE.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CPnbUsaT.js → experiments-tab-choice-DSclvOvL.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BgJsU8db.js → extract-connection-data-B1idI_Er.js} +1 -1
- package/dist/client/assets/{feature-gate-l0KEufHd.js → feature-gate-DPkeE7uF.js} +1 -1
- package/dist/client/assets/{feature-paywall-U96_3IDe.js → feature-paywall-DDg1qLzb.js} +1 -1
- package/dist/client/assets/{file-explorer-CEr-AGV8.js → file-explorer-CHHt0QX9.js} +1 -1
- package/dist/client/assets/{file-preview-CiOlTiCy.js → file-preview-CgYNe-Mr.js} +1 -1
- package/dist/client/assets/{file-share-button-DmFYrwEa.js → file-share-button-BJO30SNe.js} +1 -1
- package/dist/client/assets/{file-type-icon-CIujMc16.js → file-type-icon-e_gGiYxT.js} +1 -1
- package/dist/client/assets/{folder-icon-D9t07Q_K.js → folder-icon-L-0b54kb.js} +1 -1
- package/dist/client/assets/{form-COsiqxYx.js → form-Bk3nslfo.js} +1 -1
- package/dist/client/assets/{frame-navigation-DPuQG9u8.js → frame-navigation-BEgM6h8_.js} +1 -1
- package/dist/client/assets/{general--BMDlcSt.js → general-DaQy4K-t.js} +1 -1
- package/dist/client/assets/{github-icon-hdY5MZLp.js → github-icon-DQGQvMmf.js} +1 -1
- package/dist/client/assets/{held-block-view-CjiZoLJN.js → held-block-view-Cm31vjrE.js} +1 -1
- package/dist/client/assets/{home-ne4NkQJ-.js → home-DGBnV40S.js} +1 -1
- package/dist/client/assets/{home-overview-CXCvbMpa.js → home-overview-CyukxPn8.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-EPXq16lo.js → hosted-reconcile-CfexzNYR.js} +1 -1
- package/dist/client/assets/{icon-button-DFp2kgCJ.js → icon-button-BXu6Qjya.js} +1 -1
- package/dist/client/assets/{index-DRqFz_gI.js → index-B5IfyADC.js} +1 -1
- package/dist/client/assets/{index-Ckj4MapM.js → index-BKpLGEvk.js} +3 -3
- package/dist/client/assets/{index-DMWerknW.js → index-BgOAo4xm.js} +1 -1
- package/dist/client/assets/{index-BCGy-Hq3.js → index-BkBkbj9f.js} +1 -1
- package/dist/client/assets/{index-ym2A_X-L.js → index-Bmu-UHY1.js} +1 -1
- package/dist/client/assets/{index-B8yx4LYe.js → index-C7tYkEQ8.js} +1 -1
- package/dist/client/assets/{index-BHwwGeDM.js → index-CePmTsdo.js} +1 -1
- package/dist/client/assets/{index-Cb5p1J52.js → index-CfNLmuQI.js} +1 -1
- package/dist/client/assets/{index-BmltYjMQ.js → index-CrfTUiEe.js} +1 -1
- package/dist/client/assets/{index-MEpnpMvz.js → index-DEBA1pg3.js} +1 -1
- package/dist/client/assets/{index-BmIFAFOk.js → index-DEZsHYz8.js} +1 -1
- package/dist/client/assets/{index-C33bhjQY.js → index-DHKBL-0w.js} +1 -1
- package/dist/client/assets/{index-BkzlbVCp.js → index-DXL41NDn.js} +1 -1
- package/dist/client/assets/{index-ZwN2wFBi.js → index-Dg0S3jvO.js} +1 -1
- package/dist/client/assets/{index-BNOS0JsS.js → index-RR-LocRS.js} +1 -1
- package/dist/client/assets/{index-DBxc4w_4.js → index-_JElq8CH.js} +1 -1
- package/dist/client/assets/{index-DPvDzlPf.js → index-qU__HJAz.js} +1 -1
- package/dist/client/assets/{index-redirect-CzXIL6ZA.js → index-redirect-CKuiylNe.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-kaRGs7Hf.js → infiniteQueryObserver-B581IWWx.js} +1 -1
- package/dist/client/assets/{infra-billing-D4ZX6jyj.js → infra-billing-n55oYuuQ.js} +1 -1
- package/dist/client/assets/{input-K73Hb7D2.js → input-B7-dSOUM.js} +3 -3
- package/dist/client/assets/{input-CcRoLVnu.js → input-BUWCiQ-z.js} +1 -1
- package/dist/client/assets/{integration-icon-CgR8Zqe0.js → integration-icon-Ct_bDgI9.js} +1 -1
- package/dist/client/assets/{item-actions-DDmGjpnJ.js → item-actions-D6KeBwnZ.js} +1 -1
- package/dist/client/assets/{jira-icon-MVqMO7bS.js → jira-icon-f6_UboMT.js} +1 -1
- package/dist/client/assets/{label-B0c9G_Wj.js → label-BDLTo2Y-.js} +1 -1
- package/dist/client/assets/{layout-DScf3mma.js → layout-xW4i621c.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-qBk_j2Oe.js → legacy-admin-welcome-dialog-_KyfyHo4.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-ly0BkhRn.js → legacy-agents-deep-CTGA8FAw.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DWWqrbYd.js → legacy-main-redirect-DYEHBu75.js} +1 -1
- package/dist/client/assets/library-CPjn6zN-.js +1 -0
- package/dist/client/assets/{library-tab-CbPRTOYJ.js → library-tab-D3KV5O71.js} +1 -1
- package/dist/client/assets/{login-vMjk4cCL.js → login-BFDkXk1-.js} +1 -1
- package/dist/client/assets/{markdown-iiRSUjbj.js → markdown-BsYAi8XQ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BWum_Yq_.js → mcp-app-renderer-dDBi3URO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-QpEcJw56.js → mcp-oauth-2WlHJ7R6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DY__Mn7q.js → mcp-oauth-D84_fl26.js} +1 -1
- package/dist/client/assets/{members-3gpzixs9.js → members-SEORNWe5.js} +1 -1
- package/dist/client/assets/{memory-CVraGJet.js → memory-1tcv0zES.js} +1 -1
- package/dist/client/assets/{mock-board-Cyg7chND.js → mock-board-GTW4H-2e.js} +3 -3
- package/dist/client/assets/{monaco-editor-CMyd4mpO.js → monaco-editor-D1vzjghk.js} +1 -1
- package/dist/client/assets/{monitoring-8mE1s3Sk.js → monitoring-DQHeaSK4.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C3X8BcFH.js → monitoring-stats-row-DXyyo-Bj.js} +1 -1
- package/dist/client/assets/{multi-select-BqkNqG-G.js → multi-select-BlUZOCfN.js} +1 -1
- package/dist/client/assets/{mustache-BbbmaYy_.js → mustache-CucS04fv.js} +1 -1
- package/dist/client/assets/{named-rule-step-BD8vaW_9.js → named-rule-step-DzxARGEs.js} +1 -1
- package/dist/client/assets/{named-rule-view-DX7lQk6g.js → named-rule-view-BLh1VTgV.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BoCiikdy.js → new-project-dialog-kOo0CX1I.js} +1 -1
- package/dist/client/assets/{oauth-callback-CO3oFULc.js → oauth-callback-Bkh0nm9p.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BCh3vcng.js → oauth-callback-ai-provider-CnZgrcLv.js} +1 -1
- package/dist/client/assets/{oauth-consent-E2-uqyO1.js → oauth-consent-D9UeLvHW.js} +1 -1
- package/dist/client/assets/{onboarding-BCIN3n_n.js → onboarding-DGDSLHwI.js} +1 -1
- package/dist/client/assets/{openai-conversation-B1THhy6d.js → openai-conversation-DBql2S54.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BclI4lhv.js → optimistic-project-sidebar-views-Cw_kLunc.js} +1 -1
- package/dist/client/assets/{order-monitor-day-TnwuzaRA.js → order-monitor-day-DTMjwt2_.js} +1 -1
- package/dist/client/assets/{organization-choice-DMs62edL.js → organization-choice-2jucsQRU.js} +1 -1
- package/dist/client/assets/{orgs-Cnkmmus2.js → orgs-CJ-0OF4Z.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CQf7o7wv.js → own-accounts-section-J0NWrWHr.js} +1 -1
- package/dist/client/assets/{pair-CeaZHNjW.js → pair-CTPgNFFV.js} +1 -1
- package/dist/client/assets/{parse-sections-CpzZzrk6.js → parse-sections-B9nhzb36.js} +3 -3
- package/dist/client/assets/{plan-HsIQZ-2c.js → plan-CQaDNoCH.js} +1 -1
- package/dist/client/assets/{plan-ladder-D2xrhhby.js → plan-ladder-BI4eUCeS.js} +1 -1
- package/dist/client/assets/{plan-usage-card-7peC5gus.js → plan-usage-card-DFQGd0O4.js} +1 -1
- package/dist/client/assets/{popover-1KOagqvY.js → popover-CIHDNHCs.js} +1 -1
- package/dist/client/assets/{post-calendar-ClIvvSw7.js → post-calendar-BDMjG2dP.js} +1 -1
- package/dist/client/assets/{post-editor-CL9E0vn-.js → post-editor-CZDC6xA9.js} +1 -1
- package/dist/client/assets/{preview-content-BNngsjEI.js → preview-content-BTrjkSSQ.js} +1 -1
- package/dist/client/assets/{preview-dialog-Dh6wAotN.js → preview-dialog-CrvvVaQF.js} +1 -1
- package/dist/client/assets/{preview-panel-SgknJwGz.js → preview-panel-DNIoRAHt.js} +1 -1
- package/dist/client/assets/{preview-tab-DPV-sr6_.js → preview-tab-VYZ8NJdg.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-CMSSaVrk.js → product-picker-dialog-Ci68Qqvg.js} +1 -1
- package/dist/client/assets/{profile-CZrFmx7h.js → profile-XTQB4V6Q.js} +1 -1
- package/dist/client/assets/{project-app-view-De-l3CgR.js → project-app-view-BzijeZdr.js} +1 -1
- package/dist/client/assets/{project-apps-k8HMptd3.js → project-apps-D_TFWUBb.js} +1 -1
- package/dist/client/assets/{project-icon-BKBe96cc.js → project-icon-Bvu6n5OS.js} +1 -1
- package/dist/client/assets/{project-index-CbAWo0tj.js → project-index-s3N3q8ZI.js} +1 -1
- package/dist/client/assets/project-reports-CRj65wwW.js +1 -0
- package/dist/client/assets/project-tasks-CkomURVN.js +1 -0
- package/dist/client/assets/{projects-NlD01O1C.js → projects-0pKUprB3.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BDLV9rpC.js → projects-empty-state-CY5mYsav.js} +1 -1
- package/dist/client/assets/{prompts-BJcBRiOW.js → prompts-HlF9eomi.js} +1 -1
- package/dist/client/assets/{record-editor-yPExbiTv.js → record-editor-CV-pm9D2.js} +1 -1
- package/dist/client/assets/{redirect-editor-ByI7pOmQ.js → redirect-editor-ewT0Z79b.js} +1 -1
- package/dist/client/assets/{reports-dXIOsxf3.js → reports-D7FZXXLc.js} +1 -1
- package/dist/client/assets/reports-meX1koUH.js +1 -0
- package/dist/client/assets/{reports-onboarding-hFr1Z7Ke.js → reports-onboarding-BCKv5hwM.js} +1 -1
- package/dist/client/assets/{reports-tab-D7mVCD_Z.js → reports-tab-Cyot8IJh.js} +2 -2
- package/dist/client/assets/repositories-Cp4Zu6Qh.js +1 -0
- package/dist/client/assets/{repositories-Bl3OrZiF.js → repositories-DYAzvJ2e.js} +1 -1
- package/dist/client/assets/{repository-binding-CH7r7brN.js → repository-binding-CP5rmeRO.js} +1 -1
- package/dist/client/assets/{repository-picker-CoAjKPWu.js → repository-picker-DC1bdVSR.js} +1 -1
- package/dist/client/assets/{require-capability-CDM7cu-0.js → require-capability-BVqYoN67.js} +1 -1
- package/dist/client/assets/{required-auth-layout-ZjFjMD09.js → required-auth-layout-DkFLkHwK.js} +1 -1
- package/dist/client/assets/{reset-password-C8_WUU0G.js → reset-password-TRWNpcby.js} +1 -1
- package/dist/client/assets/{resizable-DluOfdHp.js → resizable-BkCowlJw.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-_fU3pcJ8.js → resolve-tab-icon-CP2POYlU.js} +1 -1
- package/dist/client/assets/{review-settings-CqyPCVmw.js → review-settings-BXaEkW6w.js} +1 -1
- package/dist/client/assets/{role-color-D2BIPP-Y.js → role-color-LPLD9FHS.js} +1 -1
- package/dist/client/assets/{roles-eLARL0lr.js → roles-D5PyY97I.js} +1 -1
- package/dist/client/assets/{route-DrxvAn00.js → route-BsF04vyP.js} +1 -1
- package/dist/client/assets/{route-CeUaduIj.js → route-C0IU8ikw.js} +1 -1
- package/dist/client/assets/route-COHimIC5.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-Buz_SzWI.js → sandbox-lifecycle-context-yl4f8uag.js} +1 -1
- package/dist/client/assets/{save-status-Dh8RiNyJ.js → save-status-D_jJpmHD.js} +1 -1
- package/dist/client/assets/{schema-CFD49b5R.js → schema-B-LAHoUK.js} +1 -1
- package/dist/client/assets/{schema-IMH2fbyE.js → schema-DvaJ2rNl.js} +1 -1
- package/dist/client/assets/{scroll-area-7IjOkXaA.js → scroll-area-DYFB45XI.js} +1 -1
- package/dist/client/assets/{search-input-J57XNHRR.js → search-input-DqHJAiRd.js} +1 -1
- package/dist/client/assets/{search-toggle-BQacuk1T.js → search-toggle-YJLuuKM2.js} +1 -1
- package/dist/client/assets/{secret-picker-D-eT4fqr.js → secret-picker-CrMeaVIe.js} +1 -1
- package/dist/client/assets/{secrets-rX9Sgqtx.js → secrets-BaXvvDw0.js} +1 -1
- package/dist/client/assets/{section-array-field-CXs46rRO.js → section-array-field-Bkmst1qa.js} +1 -1
- package/dist/client/assets/sections-editor-DFr81VGf.js +1 -0
- package/dist/client/assets/{sections-Der8b67h.js → sections-yfZBPLDD.js} +1 -1
- package/dist/client/assets/{select-CzHIA1ZP.js → select-B5iUwwXV.js} +1 -1
- package/dist/client/assets/{select-model-CUm0gXy-.js → select-model-4Zcj6CUr.js} +1 -1
- package/dist/client/assets/{seo-editor-B3k4oTgO.js → seo-editor-CMO3yFNl.js} +1 -1
- package/dist/client/assets/{separator-C8rbCtXT.js → separator-CjulnSNe.js} +1 -1
- package/dist/client/assets/settings-tab-Cjr1l3iK.js +1 -0
- package/dist/client/assets/{sheet-LMO2Ln_p.js → sheet-gfkwParf.js} +1 -1
- package/dist/client/assets/{shell-layout-C2C8qdsE.js → shell-layout-BMzHKR9t.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DVSJSpbm.js → site-draft-actions-7lwHkvwZ.js} +3 -3
- package/dist/client/assets/{site-draft-view-C-oT4QS-.js → site-draft-view-DPG5iFOp.js} +1 -1
- package/dist/client/assets/site-editor-BzDBOZfD.js +1 -0
- package/dist/client/assets/{site-editor-toast-NcKSJm_A.js → site-editor-toast-BceqMxyH.js} +1 -1
- package/dist/client/assets/{skills-oDAqiAY0.js → skills-DE4484hs.js} +1 -1
- package/dist/client/assets/{slider-Bfcuox96.js → slider-DcuTWtwH.js} +1 -1
- package/dist/client/assets/{sortable.esm-Djzj6LTi.js → sortable.esm-ANscIFFj.js} +1 -1
- package/dist/client/assets/{sso-yTAfsZ2v.js → sso-DdFXot92.js} +1 -1
- package/dist/client/assets/{suggestion-DajZAFgd.js → suggestion-NKgMRlVT.js} +1 -1
- package/dist/client/assets/{super-agent-icon-D0qxSSxp.js → super-agent-icon-COQfkqms.js} +1 -1
- package/dist/client/assets/{switch-D7_Z0h5K.js → switch-C9Bl2pnH.js} +1 -1
- package/dist/client/assets/{synced-repos-lkhh3o-1.js → synced-repos-BHxMHIO9.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-6eELGE3b.js → tab-icon-glyph-Bqn-t2kR.js} +1 -1
- package/dist/client/assets/{table-CupY_YOD.js → table-3tc9vMUS.js} +1 -1
- package/dist/client/assets/{tabs-CfEge7dC.js → tabs-CEaEmLtB.js} +1 -1
- package/dist/client/assets/{task-board-Bjy19ZeT.js → task-board-DsQ_oTs1.js} +1 -1
- package/dist/client/assets/{task-route-DBxg89lE.js → task-route-Dhjxq4rN.js} +1 -1
- package/dist/client/assets/{task-status-COmJd60B.js → task-status-BACgzbhl.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Do9ulM0U.js → taskboard-analytics-fedXTaWV.js} +1 -1
- package/dist/client/assets/{tasks-DHFP5uDs.js → tasks-DN4gUG8s.js} +1 -1
- package/dist/client/assets/tasks-XUCgNKqq.js +1 -0
- package/dist/client/assets/{textarea-CwMoIHX4.js → textarea-BI99K3kU.js} +1 -1
- package/dist/client/assets/{thread-analytics-C6OXJGy5.js → thread-analytics-BF5ms8Xu.js} +1 -1
- package/dist/client/assets/{thread-intent-B3Q-huPj.js → thread-intent-CCp7NTzo.js} +1 -1
- package/dist/client/assets/{thread-route-DsWHorzr.js → thread-route--4ncLAuV.js} +1 -1
- package/dist/client/assets/{thread-route-CjejQPup.js → thread-route-CngUV5dW.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Cd-Cn-jH.js → thread-sheet-body-Dz8sB7AN.js} +1 -1
- package/dist/client/assets/{time-range-picker-B8-W2K6e.js → time-range-picker-CgzxFYO6.js} +1 -1
- package/dist/client/assets/{toggle-group-CQgadYmC.js → toggle-group-DRCRlz-o.js} +1 -1
- package/dist/client/assets/{tool-namespace-DmqoWQ4e.js → tool-namespace-CDKIr-qo.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DWuBmUKd.js → tool-set-selector-BNZjFKrK.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DJdC-8B7.js → toolbar-icon-button-Dnuh3g8k.js} +1 -1
- package/dist/client/assets/{tooltip-BDrd1lBk.js → tooltip-CHkAenL4.js} +1 -1
- package/dist/client/assets/{tooltipContext-BPkZdlyk.js → tooltipContext-C0rU2vdL.js} +1 -1
- package/dist/client/assets/{track-B3UldxCN.js → track-DLP1jT71.js} +1 -1
- package/dist/client/assets/{types-B_osoN-S.js → types-BU7qSv9N.js} +1 -1
- package/dist/client/assets/{url-slug-DBDGG6PE.js → url-slug-D24e6cXS.js} +1 -1
- package/dist/client/assets/{usage-stats-BrEjL_IX.js → usage-stats-CqG5Et7U.js} +1 -1
- package/dist/client/assets/use-ai-providers-monFFnof.js +1 -0
- package/dist/client/assets/{use-apply-named-rule-DBc2j5DB.js → use-apply-named-rule-qmErOd6S.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-C6XbAhIh.js +1 -0
- package/dist/client/assets/{use-automations-kHu7N1ql.js → use-automations-ClAQYeNg.js} +1 -1
- package/dist/client/assets/{use-autosave-9pWqjYDA.js → use-autosave-C7jfVfde.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DvmEriaW.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Du2lamgE.js → use-chat-layout-state-DvsxRxjF.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CZnv5DMW.js → use-cms-publish-actions-OI0sEt7b.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B5y-W5Pd.js → use-connect-companion-Bve2cc5H.js} +1 -1
- package/dist/client/assets/{use-connection-Cz6D5NSl.js → use-connection-awawZ6Wu.js} +1 -1
- package/dist/client/assets/{use-content-sync-2mOR3FPu.js → use-content-sync-DgF3iqQY.js} +1 -1
- package/dist/client/assets/{use-copy-Ny2hsZBb.js → use-copy-CHckM0yQ.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-WCP1RJ6A.js → use-date-fns-locale-BQZx4bZQ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BDkaj-wr.js → use-debounced-autosave-DITgBReP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CPouCSBM.js → use-debounced-value-JGqBfV3A.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Bpb7VrXk.js → use-deco-credits-C-U99OMS.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DAAHbAJ8.js → use-decopilot-events-CQZ1l3Ag.js} +1 -1
- package/dist/client/assets/{use-delete-block-CgvZRkAz.js → use-delete-block-CS6BnCmg.js} +1 -1
- package/dist/client/assets/{use-delete-connection-PmT312Qy.js → use-delete-connection-DomyIOZf.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Diay1iLK.js → use-deployment-admin-BJVjKk5d.js} +1 -1
- package/dist/client/assets/{use-entitlements-D9Ct8Amk.js → use-entitlements-Bc6hnlLI.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Dir946TD.js → use-fast-preview-draft-url-0fgsSk43.js} +1 -1
- package/dist/client/assets/{use-file-configs-BcXWtzxC.js → use-file-configs-BAq4cYjg.js} +1 -1
- package/dist/client/assets/{use-id-selection-C1R8QtZl.js → use-id-selection-Cud8tUSI.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-D__IqJAr.js → use-inbox-feed-ZpuYzxRQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B-p-eU3J.js → use-infinite-scroll-BbjRydsW.js} +1 -1
- package/dist/client/assets/{use-join-requests-D3k_gbbI.js → use-join-requests-BEtvUTya.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-C8oha61a.js → use-main-panel-tabs-ihvJFTYu.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Cjf2I3y3.js → use-mcp-auth-status-Ba321CQi.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B2rDMtrE.js → use-mcp-client-B3T-i6Yy.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DYPdVpef.js → use-mcp-prompts-DBrWE8Dr.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-2IyvnaHm.js → use-mcp-tools-BGMuCnaV.js} +1 -1
- package/dist/client/assets/{use-mobile-DfHgA8LN.js → use-mobile-DcM2ppEE.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CEb9IJHa.js → use-move-blocks-Devk2xQ3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BPYZlYTF.js → use-navigate-to-agent-D8_0egfT.js} +1 -1
- package/dist/client/assets/{use-never-published-B1VAbjzG.js → use-never-published-8biSL1xa.js} +1 -1
- package/dist/client/assets/{use-org-fs-Dw8NgWuN.js → use-org-fs-EF-fi1l8.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-B6ZZE8jN.js → use-org-repo-syncs-C6h3bPrX.js} +1 -1
- package/dist/client/assets/{use-org-sso-C6B3C6hh.js → use-org-sso-B2a8dOEH.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DzVYOA_w.js → use-organization-settings-Csn2HHVU.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DKCzx0ab.js → use-project-native-view-presence-D7A-wshs.js} +1 -1
- package/dist/client/assets/{use-project-scope-ES_3uHyM.js → use-project-scope-X9RqbqiU.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BRiBdVnp.js → use-recent-apps-rUq1bjhz.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BM06dnbX.js → use-reports-diagnostic-CGI2Xl9F.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-UI-V7x5C.js → use-sandbox-events-DZThvbj1.js} +1 -1
- package/dist/client/assets/{use-secrets-BE6lWakr.js → use-secrets-DAnpZEOQ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C_J8bA7c.js → use-section-preview-base-BJCE_bK_.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CZdcfBEK.js → use-sidebar-collapsed-DSgGjO0O.js} +1 -1
- package/dist/client/assets/{use-tags-DzxmgrrP.js → use-tags-B7tFSqKt.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BTkj9VsO.js → use-task-board-analytics-CMOJTnLm.js} +1 -1
- package/dist/client/assets/{use-task-board-events-AFPQ3IaY.js → use-task-board-events-CwTqGsbl.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Co26Lz0N.js → use-task-board-item-prs-Cru9Avpm.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D-V9hUJ7.js → use-task-board-items-7fqoywfp.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-D_kD7Ykb.js → use-task-board-prompts-1o75tM7-.js} +1 -1
- package/dist/client/assets/{use-task-metadata-qDDX-JKM.js → use-task-metadata-_SaXSt_H.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DhPJ63Je.js → use-thread-outputs-XJ2zBtCL.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CwsOl80j.js → use-view-draft-kind-DwK_OsiM.js} +1 -1
- package/dist/client/assets/{use-voice-input-ycbiUn9M.js → use-voice-input-c6FA5Zln.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dbi-NOGt.js +1 -0
- package/dist/client/assets/{useQueries-COB6YD0k.js → useQueries-6Lw5qdba.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B992fqNS.js +1 -0
- package/dist/client/assets/{users-BXTgI-CJ.js → users-Dv2yl9ko.js} +1 -1
- package/dist/client/assets/{utils-BcxvAJDI.js → utils-DGdwEw5F.js} +1 -1
- package/dist/client/assets/{variant-calendar-Cnt7eLII.js → variant-calendar-CLdhbIZB.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BY5EzDJm.js → variant-matcher-override-WZWgmOzs.js} +1 -1
- package/dist/client/assets/{view-header-C-ywzr1K.js → view-header-Bu2ZBbKL.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CcPkewkK.js → virtual-mcp-BX4v2LOq.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-VTD53pp7.js → watch-sse-pool-D62Siohr.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +528 -528
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Ctpa0e3H.js +0 -1
- package/dist/client/assets/agent-deck-BYYdHuNF.js +0 -1
- package/dist/client/assets/agent-experiments-Cu1S7zm3.js +0 -1
- package/dist/client/assets/agent-library-BkD93h-_.js +0 -1
- package/dist/client/assets/agent-library-file-BhiplAMG.js +0 -1
- package/dist/client/assets/agent-overview-DOuM4YFR.js +0 -1
- package/dist/client/assets/agent-settings-p7CJBmk5.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Ccm9q6fU.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CyDKeP5k.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IsxQOCuU.js +0 -1
- package/dist/client/assets/agent-view-B_d1jiLC.js +0 -1
- package/dist/client/assets/api-keys-BMQlJqLx.js +0 -1
- package/dist/client/assets/library-BRaT6wQ7.js +0 -1
- package/dist/client/assets/project-reports-Dp1r0k4Z.js +0 -1
- package/dist/client/assets/project-tasks-DdWqilqS.js +0 -1
- package/dist/client/assets/reports-q7QaXuRD.js +0 -1
- package/dist/client/assets/repositories-JUhqi1Ee.js +0 -1
- package/dist/client/assets/route-DhZv7zTa.js +0 -1
- package/dist/client/assets/sections-editor-rsqZ0zX0.js +0 -1
- package/dist/client/assets/settings-tab-9OVWk8FJ.js +0 -1
- package/dist/client/assets/site-editor-DuBRbCBy.js +0 -1
- package/dist/client/assets/tasks-BL_awQY4.js +0 -1
- package/dist/client/assets/use-ai-providers-CHfk_CLJ.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BRvXzT6t.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-Do8l7aur.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CiRKSvQD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DOdzMfmO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,r as E,a4 as Ae,eH as Te,b as Z,m as $,j as r,a5 as Be,es as Ve,B as we,t as te,I as Qe,h as Ge,bu as We}from"./index-Ckj4MapM.js";import{b as _e}from"./Tool01-DqBi4vmR.js";import{s as Ye}from"./Trash01-CodGA_L3.js";import{i as Pe}from"./Upload01-CWNUSACo.js";import{r as He,L as Ke,s as Je,F as Xe,i as Ue}from"./use-never-published-B1VAbjzG.js";import{L as Ne}from"./label-B0c9G_Wj.js";import{T as ke,a as Ee,c as Se}from"./tooltip-BDrd1lBk.js";import{u as Ze}from"./repository-binding-CH7r7brN.js";import{u as et}from"./chat-context-DWiThF8S.js";import{u as Ce,a8 as tt,h as st,b as it,a9 as rt}from"./site-editor-toast-NcKSJm_A.js";import{c as nt}from"./use-organization-settings-DzVYOA_w.js";import{a as ot}from"./SwitchHorizontal01-IY2QD6Vf.js";import{a as at,b as lt,P as ct}from"./popover-1KOagqvY.js";import{S as dt}from"./switch-D7_Z0h5K.js";import{a as ft,T as ut}from"./toggle-group-CQgadYmC.js";import{m as mt}from"./match-site-slug-config-D3fUJ6vX.js";import{u as pt}from"./use-file-configs-BcXWtzxC.js";import{u as gt}from"./asset-utils-CQgV2l5S.js";import{i as xt}from"./AlertCircle-B490hSlt.js";const $e=E.createContext(null);function ls(t){const e=T.c(3),{children:s}=t,n=et(),l=Ce(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==l.kind||e[1]!==s?(o=E.createElement($e.Provider,{value:l.kind},s),e[0]=l.kind,e[1]=s,e[2]=o):o=e[2],o}function ht(){const t=T.c(4),e=E.useContext($e),{org:s}=Ae(),n=nt("new_blocks_editor"),l=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==l?(o=tt({backend:e,hasOrg:l,orgFlag:n}),t[0]=e,t[1]=n,t[2]=l,t[3]=o):o=t[3],o}function bt(){return ht()??!1}function yt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),l=Te(n);if(typeof l=="string")return l;const o=s.map(i=>Te(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function vt(t){const e=T.c(29),{className:s}=t,n=Z();if(bt()){let d;e[0]!==n?(d=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==s?(p=$("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Be,{className:"size-3.5"}),e[4]=x):x=e[4];let m;e[5]!==d||e[6]!==p?(m=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":d,className:p,children:x})}),e[5]=d,e[6]=p,e[7]=m):m=e[7];let g;e[8]!==n?(g=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=g):g=e[9];let h;e[10]!==g?(h=r.jsx(Ee,{className:"max-w-56",children:g}),e[10]=g,e[11]=h):h=e[11];let w;return e[12]!==m||e[13]!==h?(w=r.jsxs(Se,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=$("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let c;e[22]!==n?(c=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=c):c=e[23];let a;e[24]!==c?(a=r.jsx(Ee,{className:"max-w-56",children:c}),e[24]=c,e[25]=a):a=e[25];let u;return e[26]!==f||e[27]!==a?(u=r.jsxs(Se,{children:[f,a]}),e[26]=f,e[27]=a,e[28]=u):u=e[28],u}const Re=E.createContext({required:!1,invalid:!1});function jt(){return E.useContext(Re)}function cs(t){const e=T.c(6),{required:s,invalid:n,children:l}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==l||e[4]!==o?(i=r.jsx(Re.Provider,{value:o,children:l}),e[3]=l,e[4]=o,e[5]=i):i=e[5],i}function ds(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const wt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function Oe(t){return Ze(t)?.metadata?.fieldDescriptionTooltips??!1}function Nt(t){const e=T.c(9),{description:s,virtualMcpId:n,children:l}=t,o=Oe(n);if(!s||!o)return l;let i;e[0]!==l?(i=E.cloneElement(l,{className:$(l.props.className,wt)}),e[0]=l,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(ke,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let c;e[4]!==s?(c=r.jsx(Ee,{className:"max-w-64",children:s}),e[4]=s,e[5]=c):c=e[5];let a;return e[6]!==f||e[7]!==c?(a=r.jsxs(Se,{delayDuration:300,children:[f,c]}),e[6]=f,e[7]=c,e[8]=a):a=e[8],a}function kt(t){const e=T.c(17),{htmlFor:s,label:n,description:l,labelClassName:o,virtualMcpId:i}=t,f=Oe(i),{required:c,invalid:a}=jt();let u;e[0]!==a||e[1]!==c?(u=c&&a&&r.jsx(vt,{className:"mt-0.5 self-start"}),e[0]=a,e[1]=c,e[2]=u):u=e[2];let d;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(d=r.jsxs(Ne,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=d):d=e[7];const p=d;if(!f){let m;e[8]!==l?(m=l&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:l}),e[8]=l,e[9]=m):m=e[9];let g;return e[10]!==p||e[11]!==m?(g=r.jsxs("div",{className:"space-y-0.5",children:[p,m]}),e[10]=p,e[11]=m,e[12]=g):g=e[12],g}let x;return e[13]!==l||e[14]!==p||e[15]!==i?(x=r.jsx(Nt,{description:l,virtualMcpId:i,children:p}),e[13]=l,e[14]=p,e[15]=i,e[16]=x):x=e[16],x}function Et(t){const e=Z(),s=Ce(t?.virtualMcpId,t?.branch),{connection:n}=it(t?.virtualMcpId),l=rt(s,n);if(!l||!t||s.kind!=="protocol"||!s.describe.assets)return null;const{maxBytes:o}=s.describe.assets,i=f=>`${l}/assets/${encodeURIComponent(f)}`;return async f=>{if(f.size>o)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(o/(1024*1024))} MB`}));if(s.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:f.name}));let c;try{c=await fetch(i(f.name),{method:"PUT",signal:Ve(),headers:{"content-type":f.type||"application/octet-stream"},body:f})}catch{throw new Error(e("decoServe.upload.serverGone",{name:f.name}))}const a=await c.json().catch(()=>null);if(!c.ok||typeof a?.path!="string"){const u=a?.error?.message;throw new Error(e("decoServe.upload.failed",{name:f.name,detail:typeof u=="string"?u:`HTTP ${c.status}`}))}return a.path}}function St(t,e){const s=T.c(6),n=Ce(t?.virtualMcpId,t?.branch);let l;s[0]!==n||s[1]!==t?.previewUrl?(l=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:st(n),s[0]=n,s[1]=t?.previewUrl,s[2]=l):l=s[2];const o=l;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function Ct(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Pe,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function It(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const Tt=["low","medium","high","original"];function De(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Me(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=_t(t);for(const n of s){const l=n.indexOf("=");if((l>=0?n.slice(0,l):n)===e)return l>=0?n.slice(l+1):""}return null}}function qe(t,e,s){const n=t.indexOf("#"),l=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,c=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(a=>{const u=a.indexOf("=");return(u>=0?a.slice(0,u):a)!==e});return s!==void 0&&c.push(`${e}=${s}`),`${f}${c.length?`?${c.join("&")}`:""}${l}`}function _t(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Ut(t){if(!t)return;const e=Me(t,"quality");return De(e)?e:void 0}function Pt(t,e){return qe(t,"quality",e)}function $t(t){return t?Me(t,"muted")!=="false":!0}function Rt(t,e){return qe(t,"muted",e?void 0:"false")}function Ot(t){const e=T.c(36),{value:s,onChange:n,showMuted:l}=t,o=l===void 0?!1:l,i=Z(),f=E.useId();let c;e[0]!==s?(c=Ut(s),e[0]=s,e[1]=c):c=e[1];const a=c;let u;e[2]!==s?(u=$t(s),e[2]=s,e[3]=u):u=e[3];const d=u;let p;e[4]!==i?(p=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=p):p=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(ot,{size:14}),e[6]=x):x=e[6];let m;e[7]!==p?(m=r.jsx(at,{asChild:!0,children:r.jsx(we,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":p,children:x})}),e[7]=p,e[8]=m):m=e[8];let g;e[9]!==i?(g=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=g):g=e[10];let h;e[11]!==g?(h=r.jsx(Ne,{className:"text-xs text-muted-foreground",children:g}),e[11]=g,e[12]=h):h=e[12];const w=a??"";let v;e[13]!==n||e[14]!==s?(v=j=>n(Pt(s,De(j)?j:void 0)),e[13]=n,e[14]=s,e[15]=v):v=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=Tt.map(Dt),e[16]=N):N=e[16];let S;e[17]!==v||e[18]!==w?(S=r.jsx(ft,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:v,children:N}),e[17]=v,e[18]=w,e[19]=S):S=e[19];let y;e[20]!==S||e[21]!==h?(y=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,S]}),e[20]=S,e[21]=h,e[22]=y):y=e[22];let k;e[23]!==d||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(k=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ne,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(dt,{id:f,checked:d,onCheckedChange:j=>n(Rt(s,j))})]}),e[23]=d,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=k):k=e[29];let b;e[30]!==y||e[31]!==k?(b=r.jsx(lt,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[y,k]})}),e[30]=y,e[31]=k,e[32]=b):b=e[32];let C;return e[33]!==b||e[34]!==m?(C=r.jsxs(ct,{children:[m,b]}),e[33]=b,e[34]=m,e[35]=C):C=e[35],C}function Dt(t){return r.jsx(ut,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function Mt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Le=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function qt(t){const e=T.c(25),{siteSlug:s,onUploaded:n,onNeedsPicker:l,serveUpload:o}=t,i=Z(),f=!o;let c;e[0]!==f?(c={enabled:f},e[0]=f,e[1]=c):c=e[1];const a=pt(c),u=gt(),[d,p]=E.useState(!1);let x;e[2]!==a.data?.configs?(x=a.data?.configs??[],e[2]=a.data?.configs,e[3]=x):x=e[3];let m;e[4]!==s||e[5]!==x?(m=mt(x,s),e[4]=s,e[5]=x,e[6]=m):m=e[6];const g=m;let h;e[7]!==a.data?.configs||e[8]!==g?.id||e[9]!==l||e[10]!==n||e[11]!==o||e[12]!==i||e[13]!==u?(h=async function(C){if(!C)return;const j=Array.from(C).filter(Lt);if(j.length===0){te.error(i("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(o){try{n(await o(j[0]))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}return}const R=He(a.data?.configs??[],g?.id,typeof window<"u"?window.localStorage.getItem(Ke):null);if(!R){l();return}try{const U=await u.mutateAsync({configId:R,file:j[0]}),F=Mt(U.publicUrl);if(!F){te.error(i("sectionsEditor.imageField.uploadFailed"));return}n(F),j.length>1&&te.info(i("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:j[0].name}))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}},e[7]=a.data?.configs,e[8]=g?.id,e[9]=l,e[10]=n,e[11]=o,e[12]=i,e[13]=u,e[14]=h):h=e[14];const w=h,v=g?.id??null;let N,S;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.preventDefault(),b.dataTransfer.types.includes("Files")&&p(!0)},S=b=>{b.currentTarget===b.target&&p(!1)},e[15]=N,e[16]=S):(N=e[15],S=e[16]);let y;e[17]!==w?(y={onDragOver:N,onDragLeave:S,onDrop:b=>{b.preventDefault(),b.stopPropagation(),p(!1),w(b.dataTransfer.files)}},e[17]=w,e[18]=y):y=e[18];let k;return e[19]!==w||e[20]!==d||e[21]!==v||e[22]!==y||e[23]!==u.isPending?(k={isDragging:d,isPending:u.isPending,lockedConfigId:v,handleFiles:w,dropProps:y},e[19]=w,e[20]=d,e[21]=v,e[22]=y,e[23]=u.isPending,e[24]=k):k=e[24],k}function Lt(t){return Le.has(t.type||"")}const zt=3;function fs(t){const e=T.c(97),{schema:s,value:n,onChange:l,path:o,label:i,sandbox:f,compact:c}=t,a=Z();let u;e[0]!==n?(u=yt(n),e[0]=n,e[1]=u):u=e[1];const d=u,[p,x]=E.useState(!1),[m,g]=E.useState(!1),[h,w]=E.useState(!1),v=St(f,d),[N,S]=E.useState(0);let y;e[2]!==N||e[3]!==v?(y=N>0?`${v}${v.includes("?")?"&":"?"}retry=${N}`:v,e[2]=N,e[3]=v,e[4]=y):y=e[4];let k;e[5]!==y?(k=Je(y),e[5]=y,e[6]=k):k=e[6];const b=k,C=!!d&&!b;let j,R;e[7]!==d?(j=d?Ft(d):"",R=j?It(j):"",e[7]=d,e[8]=j,e[9]=R):(j=e[8],R=e[9]);const U=R;let F;e[10]!==l?(F=function(fe){g(!1),w(!1),S(0),l(fe)},e[10]=l,e[11]=F):F=e[11];const I=F,[O,se]=E.useState(d),[ze,Fe]=E.useState(d);ze!==d&&(Fe(d),se(d));let ie;e[12]!==I||e[13]!==d?(ie=function(fe){se(fe);const ee=fe.trim();ee&&!Ue(ee)||ee!==d&&(Fe(ee),I(ee))},e[12]=I,e[13]=d,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==d||e[16]!==O?(re=function(){O.trim()&&!Ue(O)&&se(d)},e[15]=d,e[16]=O,e[17]=re):re=e[17];const me=re,P=Et(f),Ie=E.useRef(null);let ne;e[18]!==P?(ne=()=>P?Ie.current?.click():x(!0),e[18]=P,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==P||e[22]!==I||e[23]!==pe?(ae={siteSlug:pe,onUploaded:I,onNeedsPicker:oe,serveUpload:P},e[21]=P,e[22]=I,e[23]=pe,e[24]=ae):ae=e[24];const{isDragging:le,isPending:ce,lockedConfigId:ge,dropProps:xe,handleFiles:he}=qt(ae),be=!i&&"hidden";let M;e[25]!==be?(M=$("min-w-0",be),e[25]=be,e[26]=M):M=e[26];const ye=f?.virtualMcpId;let q;e[27]!==i||e[28]!==o||e[29]!==s.description||e[30]!==ye?(q=r.jsx(kt,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:ye}),e[27]=i,e[28]=o,e[29]=s.description,e[30]=ye,e[31]=q):q=e[31];let L;e[32]!==M||e[33]!==q?(L=r.jsx("div",{className:M,children:q}),e[32]=M,e[33]=q,e[34]=L):L=e[34];const ve=le&&"border-primary ring-2 ring-primary/30",je=ce&&"pointer-events-none opacity-60";let z;e[35]!==ve||e[36]!==je?(z=$("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",ve,je),e[35]=ve,e[36]=je,e[37]=z):z=e[37];let A;e[38]!==D||e[39]!==c||e[40]!==U||e[41]!==j||e[42]!==h||e[43]!==m||e[44]!==ce||e[45]!==i||e[46]!==N||e[47]!==v||e[48]!==b||e[49]!==d||e[50]!==a||e[51]!==C?(A=d?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":a("sectionsEditor.imageField.replaceImage"),className:$("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",c?"h-28":"h-40"),children:[!h&&!C&&r.jsx("img",{src:b,alt:i,className:$("h-full w-full object-contain transition-opacity",!m&&"opacity-0"),onLoad:()=>g(!0),onError:()=>{v!==d&&N<zt?setTimeout(()=>S(At),600):w(!0)}},d),(h||C)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(_e,{size:20}),r.jsx("p",{className:"text-xs",children:a("sectionsEditor.imageField.previewUnavailable")})]}),!m&&!h&&!C&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(Ct,{})]}),!c&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:j}),U&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:U})]})]}):r.jsxs("button",{type:"button",onClick:D,className:$("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",c?"h-28":"h-40"),children:[r.jsx(_e,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:a(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!c&&r.jsx("span",{className:"text-xs text-muted-foreground",children:a("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[38]=D,e[39]=c,e[40]=U,e[41]=j,e[42]=h,e[43]=m,e[44]=ce,e[45]=i,e[46]=N,e[47]=v,e[48]=b,e[49]=d,e[50]=a,e[51]=C,e[52]=A):A=e[52];let B;e[53]!==le||e[54]!==a?(B=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:a("sectionsEditor.imageField.dropToUpload")})}),e[53]=le,e[54]=a,e[55]=B):B=e[55];let V;e[56]!==xe||e[57]!==z||e[58]!==A||e[59]!==B?(V=r.jsxs("div",{...xe,className:z,children:[A,B]}),e[56]=xe,e[57]=z,e[58]=A,e[59]=B,e[60]=V):V=e[60];let Q;e[61]!==ue?(Q=_=>ue(_.target.value),e[61]=ue,e[62]=Q):Q=e[62];let G;e[63]!==d?(G=_=>{_.key==="Escape"&&se(d)},e[63]=d,e[64]=G):G=e[64];let W;e[65]!==a?(W=a("sectionsEditor.imageField.urlPlaceholder"),e[65]=a,e[66]=W):W=e[66];let Y;e[67]!==o||e[68]!==me||e[69]!==Q||e[70]!==G||e[71]!==W||e[72]!==O?(Y=r.jsx(Qe,{id:o,type:"url",value:O,onChange:Q,onBlur:me,onKeyDown:G,placeholder:W,className:"h-9 min-w-0 flex-1"}),e[67]=o,e[68]=me,e[69]=Q,e[70]=G,e[71]=W,e[72]=O,e[73]=Y):Y=e[73];let H;e[74]!==D||e[75]!==d||e[76]!==a?(H=!d&&r.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Pe,{size:14}),a("sectionsEditor.imageField.browse")]}),e[74]=D,e[75]=d,e[76]=a,e[77]=H):H=e[77];let K;e[78]!==I||e[79]!==d||e[80]!==a?(K=d&&r.jsxs(r.Fragment,{children:[r.jsx(Ot,{value:d,onChange:I}),r.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>I(""),className:"h-9 shrink-0","aria-label":a("sectionsEditor.imageField.removeImage"),children:r.jsx(Ye,{size:14})})]}),e[78]=I,e[79]=d,e[80]=a,e[81]=K):K=e[81];let J;e[82]!==Y||e[83]!==H||e[84]!==K?(J=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[Y,H,K]}),e[82]=Y,e[83]=H,e[84]=K,e[85]=J):J=e[85];let X;e[86]!==he||e[87]!==ge||e[88]!==p||e[89]!==P||e[90]!==I?(X=P?r.jsx("input",{ref:Ie,type:"file",accept:[...Le].join(","),className:"hidden",onChange:_=>{he(_.target.files),_.target.value=""}}):r.jsx(Xe,{open:p,onOpenChange:x,mode:"image",onSelect:_=>I(_),lockedConfigId:ge}),e[86]=he,e[87]=ge,e[88]=p,e[89]=P,e[90]=I,e[91]=X):X=e[91];let de;return e[92]!==L||e[93]!==V||e[94]!==J||e[95]!==X?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[L,V,J,X]}),e[92]=L,e[93]=V,e[94]=J,e[95]=X,e[96]=de):de=e[96],de}function At(t){return t+1}function us(t){const e=T.c(15),{isPending:s,isError:n}=t,l=Z();if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(xt,{size:13}),e[0]=c):c=e[0];let a;e[1]!==l?(a=l("sandbox.saveStatus.failed"),e[1]=l,e[2]=a):a=e[2];let u;return e[3]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[c,a]}),e[3]=a,e[4]=u):u=e[4],u}if(s){let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(Ge,{className:"size-[13px]"}),e[5]=c):c=e[5];let a;e[6]!==l?(a=l("sandbox.saveStatus.saving"),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c,a]}),e[8]=a,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(We,{size:13}),e[10]=o):o=e[10];let i;e[11]!==l?(i=l("sandbox.saveStatus.saved"),e[11]=l,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{Ct as C,kt as F,fs as I,vt as M,ls as N,Tt as Q,cs as R,us as S,bt as a,Oe as b,jt as c,Nt as d,yt as e,Ft as f,It as g,Et as h,ds as i,St as j,Ot as k,Ut as l,qt as m,Pt as s,ht as u};
|
|
1
|
+
import{c as T,r as E,a4 as Ae,eH as Te,b as Z,m as $,j as r,a5 as Be,es as Ve,B as we,t as te,I as Qe,h as Ge,bu as We}from"./index-BKpLGEvk.js";import{b as _e}from"./Tool01-Yd8ogx8N.js";import{s as Ye}from"./Trash01-CGn497Nk.js";import{i as Pe}from"./Upload01-bs3kHvY6.js";import{r as He,L as Ke,s as Je,F as Xe,i as Ue}from"./use-never-published-8biSL1xa.js";import{L as Ne}from"./label-BDLTo2Y-.js";import{T as ke,a as Ee,c as Se}from"./tooltip-CHkAenL4.js";import{u as Ze}from"./repository-binding-CP5rmeRO.js";import{u as et}from"./chat-context-CYceSwsW.js";import{u as Ce,a8 as tt,h as st,b as it,a9 as rt}from"./site-editor-toast-BceqMxyH.js";import{c as nt}from"./use-organization-settings-Csn2HHVU.js";import{a as ot}from"./SwitchHorizontal01-1mxe_S61.js";import{a as at,b as lt,P as ct}from"./popover-CIHDNHCs.js";import{S as dt}from"./switch-C9Bl2pnH.js";import{a as ft,T as ut}from"./toggle-group-DRCRlz-o.js";import{m as mt}from"./match-site-slug-config-D3fUJ6vX.js";import{u as pt}from"./use-file-configs-BAq4cYjg.js";import{u as gt}from"./asset-utils-Cm9qiSAT.js";import{i as xt}from"./AlertCircle-Bw3i2ESn.js";const $e=E.createContext(null);function ls(t){const e=T.c(3),{children:s}=t,n=et(),l=Ce(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==l.kind||e[1]!==s?(o=E.createElement($e.Provider,{value:l.kind},s),e[0]=l.kind,e[1]=s,e[2]=o):o=e[2],o}function ht(){const t=T.c(4),e=E.useContext($e),{org:s}=Ae(),n=nt("new_blocks_editor"),l=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==l?(o=tt({backend:e,hasOrg:l,orgFlag:n}),t[0]=e,t[1]=n,t[2]=l,t[3]=o):o=t[3],o}function bt(){return ht()??!1}function yt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),l=Te(n);if(typeof l=="string")return l;const o=s.map(i=>Te(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function vt(t){const e=T.c(29),{className:s}=t,n=Z();if(bt()){let d;e[0]!==n?(d=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==s?(p=$("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Be,{className:"size-3.5"}),e[4]=x):x=e[4];let m;e[5]!==d||e[6]!==p?(m=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":d,className:p,children:x})}),e[5]=d,e[6]=p,e[7]=m):m=e[7];let g;e[8]!==n?(g=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=g):g=e[9];let h;e[10]!==g?(h=r.jsx(Ee,{className:"max-w-56",children:g}),e[10]=g,e[11]=h):h=e[11];let w;return e[12]!==m||e[13]!==h?(w=r.jsxs(Se,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=$("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let c;e[22]!==n?(c=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=c):c=e[23];let a;e[24]!==c?(a=r.jsx(Ee,{className:"max-w-56",children:c}),e[24]=c,e[25]=a):a=e[25];let u;return e[26]!==f||e[27]!==a?(u=r.jsxs(Se,{children:[f,a]}),e[26]=f,e[27]=a,e[28]=u):u=e[28],u}const Re=E.createContext({required:!1,invalid:!1});function jt(){return E.useContext(Re)}function cs(t){const e=T.c(6),{required:s,invalid:n,children:l}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==l||e[4]!==o?(i=r.jsx(Re.Provider,{value:o,children:l}),e[3]=l,e[4]=o,e[5]=i):i=e[5],i}function ds(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const wt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function Oe(t){return Ze(t)?.metadata?.fieldDescriptionTooltips??!1}function Nt(t){const e=T.c(9),{description:s,virtualMcpId:n,children:l}=t,o=Oe(n);if(!s||!o)return l;let i;e[0]!==l?(i=E.cloneElement(l,{className:$(l.props.className,wt)}),e[0]=l,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(ke,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let c;e[4]!==s?(c=r.jsx(Ee,{className:"max-w-64",children:s}),e[4]=s,e[5]=c):c=e[5];let a;return e[6]!==f||e[7]!==c?(a=r.jsxs(Se,{delayDuration:300,children:[f,c]}),e[6]=f,e[7]=c,e[8]=a):a=e[8],a}function kt(t){const e=T.c(17),{htmlFor:s,label:n,description:l,labelClassName:o,virtualMcpId:i}=t,f=Oe(i),{required:c,invalid:a}=jt();let u;e[0]!==a||e[1]!==c?(u=c&&a&&r.jsx(vt,{className:"mt-0.5 self-start"}),e[0]=a,e[1]=c,e[2]=u):u=e[2];let d;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(d=r.jsxs(Ne,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=d):d=e[7];const p=d;if(!f){let m;e[8]!==l?(m=l&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:l}),e[8]=l,e[9]=m):m=e[9];let g;return e[10]!==p||e[11]!==m?(g=r.jsxs("div",{className:"space-y-0.5",children:[p,m]}),e[10]=p,e[11]=m,e[12]=g):g=e[12],g}let x;return e[13]!==l||e[14]!==p||e[15]!==i?(x=r.jsx(Nt,{description:l,virtualMcpId:i,children:p}),e[13]=l,e[14]=p,e[15]=i,e[16]=x):x=e[16],x}function Et(t){const e=Z(),s=Ce(t?.virtualMcpId,t?.branch),{connection:n}=it(t?.virtualMcpId),l=rt(s,n);if(!l||!t||s.kind!=="protocol"||!s.describe.assets)return null;const{maxBytes:o}=s.describe.assets,i=f=>`${l}/assets/${encodeURIComponent(f)}`;return async f=>{if(f.size>o)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(o/(1024*1024))} MB`}));if(s.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:f.name}));let c;try{c=await fetch(i(f.name),{method:"PUT",signal:Ve(),headers:{"content-type":f.type||"application/octet-stream"},body:f})}catch{throw new Error(e("decoServe.upload.serverGone",{name:f.name}))}const a=await c.json().catch(()=>null);if(!c.ok||typeof a?.path!="string"){const u=a?.error?.message;throw new Error(e("decoServe.upload.failed",{name:f.name,detail:typeof u=="string"?u:`HTTP ${c.status}`}))}return a.path}}function St(t,e){const s=T.c(6),n=Ce(t?.virtualMcpId,t?.branch);let l;s[0]!==n||s[1]!==t?.previewUrl?(l=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:st(n),s[0]=n,s[1]=t?.previewUrl,s[2]=l):l=s[2];const o=l;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function Ct(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Pe,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function It(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const Tt=["low","medium","high","original"];function De(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Me(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=_t(t);for(const n of s){const l=n.indexOf("=");if((l>=0?n.slice(0,l):n)===e)return l>=0?n.slice(l+1):""}return null}}function qe(t,e,s){const n=t.indexOf("#"),l=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,c=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(a=>{const u=a.indexOf("=");return(u>=0?a.slice(0,u):a)!==e});return s!==void 0&&c.push(`${e}=${s}`),`${f}${c.length?`?${c.join("&")}`:""}${l}`}function _t(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Ut(t){if(!t)return;const e=Me(t,"quality");return De(e)?e:void 0}function Pt(t,e){return qe(t,"quality",e)}function $t(t){return t?Me(t,"muted")!=="false":!0}function Rt(t,e){return qe(t,"muted",e?void 0:"false")}function Ot(t){const e=T.c(36),{value:s,onChange:n,showMuted:l}=t,o=l===void 0?!1:l,i=Z(),f=E.useId();let c;e[0]!==s?(c=Ut(s),e[0]=s,e[1]=c):c=e[1];const a=c;let u;e[2]!==s?(u=$t(s),e[2]=s,e[3]=u):u=e[3];const d=u;let p;e[4]!==i?(p=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=p):p=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(ot,{size:14}),e[6]=x):x=e[6];let m;e[7]!==p?(m=r.jsx(at,{asChild:!0,children:r.jsx(we,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":p,children:x})}),e[7]=p,e[8]=m):m=e[8];let g;e[9]!==i?(g=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=g):g=e[10];let h;e[11]!==g?(h=r.jsx(Ne,{className:"text-xs text-muted-foreground",children:g}),e[11]=g,e[12]=h):h=e[12];const w=a??"";let v;e[13]!==n||e[14]!==s?(v=j=>n(Pt(s,De(j)?j:void 0)),e[13]=n,e[14]=s,e[15]=v):v=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=Tt.map(Dt),e[16]=N):N=e[16];let S;e[17]!==v||e[18]!==w?(S=r.jsx(ft,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:v,children:N}),e[17]=v,e[18]=w,e[19]=S):S=e[19];let y;e[20]!==S||e[21]!==h?(y=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,S]}),e[20]=S,e[21]=h,e[22]=y):y=e[22];let k;e[23]!==d||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(k=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ne,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(dt,{id:f,checked:d,onCheckedChange:j=>n(Rt(s,j))})]}),e[23]=d,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=k):k=e[29];let b;e[30]!==y||e[31]!==k?(b=r.jsx(lt,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[y,k]})}),e[30]=y,e[31]=k,e[32]=b):b=e[32];let C;return e[33]!==b||e[34]!==m?(C=r.jsxs(ct,{children:[m,b]}),e[33]=b,e[34]=m,e[35]=C):C=e[35],C}function Dt(t){return r.jsx(ut,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function Mt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Le=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function qt(t){const e=T.c(25),{siteSlug:s,onUploaded:n,onNeedsPicker:l,serveUpload:o}=t,i=Z(),f=!o;let c;e[0]!==f?(c={enabled:f},e[0]=f,e[1]=c):c=e[1];const a=pt(c),u=gt(),[d,p]=E.useState(!1);let x;e[2]!==a.data?.configs?(x=a.data?.configs??[],e[2]=a.data?.configs,e[3]=x):x=e[3];let m;e[4]!==s||e[5]!==x?(m=mt(x,s),e[4]=s,e[5]=x,e[6]=m):m=e[6];const g=m;let h;e[7]!==a.data?.configs||e[8]!==g?.id||e[9]!==l||e[10]!==n||e[11]!==o||e[12]!==i||e[13]!==u?(h=async function(C){if(!C)return;const j=Array.from(C).filter(Lt);if(j.length===0){te.error(i("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(o){try{n(await o(j[0]))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}return}const R=He(a.data?.configs??[],g?.id,typeof window<"u"?window.localStorage.getItem(Ke):null);if(!R){l();return}try{const U=await u.mutateAsync({configId:R,file:j[0]}),F=Mt(U.publicUrl);if(!F){te.error(i("sectionsEditor.imageField.uploadFailed"));return}n(F),j.length>1&&te.info(i("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:j[0].name}))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}},e[7]=a.data?.configs,e[8]=g?.id,e[9]=l,e[10]=n,e[11]=o,e[12]=i,e[13]=u,e[14]=h):h=e[14];const w=h,v=g?.id??null;let N,S;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.preventDefault(),b.dataTransfer.types.includes("Files")&&p(!0)},S=b=>{b.currentTarget===b.target&&p(!1)},e[15]=N,e[16]=S):(N=e[15],S=e[16]);let y;e[17]!==w?(y={onDragOver:N,onDragLeave:S,onDrop:b=>{b.preventDefault(),b.stopPropagation(),p(!1),w(b.dataTransfer.files)}},e[17]=w,e[18]=y):y=e[18];let k;return e[19]!==w||e[20]!==d||e[21]!==v||e[22]!==y||e[23]!==u.isPending?(k={isDragging:d,isPending:u.isPending,lockedConfigId:v,handleFiles:w,dropProps:y},e[19]=w,e[20]=d,e[21]=v,e[22]=y,e[23]=u.isPending,e[24]=k):k=e[24],k}function Lt(t){return Le.has(t.type||"")}const zt=3;function fs(t){const e=T.c(97),{schema:s,value:n,onChange:l,path:o,label:i,sandbox:f,compact:c}=t,a=Z();let u;e[0]!==n?(u=yt(n),e[0]=n,e[1]=u):u=e[1];const d=u,[p,x]=E.useState(!1),[m,g]=E.useState(!1),[h,w]=E.useState(!1),v=St(f,d),[N,S]=E.useState(0);let y;e[2]!==N||e[3]!==v?(y=N>0?`${v}${v.includes("?")?"&":"?"}retry=${N}`:v,e[2]=N,e[3]=v,e[4]=y):y=e[4];let k;e[5]!==y?(k=Je(y),e[5]=y,e[6]=k):k=e[6];const b=k,C=!!d&&!b;let j,R;e[7]!==d?(j=d?Ft(d):"",R=j?It(j):"",e[7]=d,e[8]=j,e[9]=R):(j=e[8],R=e[9]);const U=R;let F;e[10]!==l?(F=function(fe){g(!1),w(!1),S(0),l(fe)},e[10]=l,e[11]=F):F=e[11];const I=F,[O,se]=E.useState(d),[ze,Fe]=E.useState(d);ze!==d&&(Fe(d),se(d));let ie;e[12]!==I||e[13]!==d?(ie=function(fe){se(fe);const ee=fe.trim();ee&&!Ue(ee)||ee!==d&&(Fe(ee),I(ee))},e[12]=I,e[13]=d,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==d||e[16]!==O?(re=function(){O.trim()&&!Ue(O)&&se(d)},e[15]=d,e[16]=O,e[17]=re):re=e[17];const me=re,P=Et(f),Ie=E.useRef(null);let ne;e[18]!==P?(ne=()=>P?Ie.current?.click():x(!0),e[18]=P,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==P||e[22]!==I||e[23]!==pe?(ae={siteSlug:pe,onUploaded:I,onNeedsPicker:oe,serveUpload:P},e[21]=P,e[22]=I,e[23]=pe,e[24]=ae):ae=e[24];const{isDragging:le,isPending:ce,lockedConfigId:ge,dropProps:xe,handleFiles:he}=qt(ae),be=!i&&"hidden";let M;e[25]!==be?(M=$("min-w-0",be),e[25]=be,e[26]=M):M=e[26];const ye=f?.virtualMcpId;let q;e[27]!==i||e[28]!==o||e[29]!==s.description||e[30]!==ye?(q=r.jsx(kt,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:ye}),e[27]=i,e[28]=o,e[29]=s.description,e[30]=ye,e[31]=q):q=e[31];let L;e[32]!==M||e[33]!==q?(L=r.jsx("div",{className:M,children:q}),e[32]=M,e[33]=q,e[34]=L):L=e[34];const ve=le&&"border-primary ring-2 ring-primary/30",je=ce&&"pointer-events-none opacity-60";let z;e[35]!==ve||e[36]!==je?(z=$("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",ve,je),e[35]=ve,e[36]=je,e[37]=z):z=e[37];let A;e[38]!==D||e[39]!==c||e[40]!==U||e[41]!==j||e[42]!==h||e[43]!==m||e[44]!==ce||e[45]!==i||e[46]!==N||e[47]!==v||e[48]!==b||e[49]!==d||e[50]!==a||e[51]!==C?(A=d?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":a("sectionsEditor.imageField.replaceImage"),className:$("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",c?"h-28":"h-40"),children:[!h&&!C&&r.jsx("img",{src:b,alt:i,className:$("h-full w-full object-contain transition-opacity",!m&&"opacity-0"),onLoad:()=>g(!0),onError:()=>{v!==d&&N<zt?setTimeout(()=>S(At),600):w(!0)}},d),(h||C)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(_e,{size:20}),r.jsx("p",{className:"text-xs",children:a("sectionsEditor.imageField.previewUnavailable")})]}),!m&&!h&&!C&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(Ct,{})]}),!c&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:j}),U&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:U})]})]}):r.jsxs("button",{type:"button",onClick:D,className:$("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",c?"h-28":"h-40"),children:[r.jsx(_e,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:a(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!c&&r.jsx("span",{className:"text-xs text-muted-foreground",children:a("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[38]=D,e[39]=c,e[40]=U,e[41]=j,e[42]=h,e[43]=m,e[44]=ce,e[45]=i,e[46]=N,e[47]=v,e[48]=b,e[49]=d,e[50]=a,e[51]=C,e[52]=A):A=e[52];let B;e[53]!==le||e[54]!==a?(B=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:a("sectionsEditor.imageField.dropToUpload")})}),e[53]=le,e[54]=a,e[55]=B):B=e[55];let V;e[56]!==xe||e[57]!==z||e[58]!==A||e[59]!==B?(V=r.jsxs("div",{...xe,className:z,children:[A,B]}),e[56]=xe,e[57]=z,e[58]=A,e[59]=B,e[60]=V):V=e[60];let Q;e[61]!==ue?(Q=_=>ue(_.target.value),e[61]=ue,e[62]=Q):Q=e[62];let G;e[63]!==d?(G=_=>{_.key==="Escape"&&se(d)},e[63]=d,e[64]=G):G=e[64];let W;e[65]!==a?(W=a("sectionsEditor.imageField.urlPlaceholder"),e[65]=a,e[66]=W):W=e[66];let Y;e[67]!==o||e[68]!==me||e[69]!==Q||e[70]!==G||e[71]!==W||e[72]!==O?(Y=r.jsx(Qe,{id:o,type:"url",value:O,onChange:Q,onBlur:me,onKeyDown:G,placeholder:W,className:"h-9 min-w-0 flex-1"}),e[67]=o,e[68]=me,e[69]=Q,e[70]=G,e[71]=W,e[72]=O,e[73]=Y):Y=e[73];let H;e[74]!==D||e[75]!==d||e[76]!==a?(H=!d&&r.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Pe,{size:14}),a("sectionsEditor.imageField.browse")]}),e[74]=D,e[75]=d,e[76]=a,e[77]=H):H=e[77];let K;e[78]!==I||e[79]!==d||e[80]!==a?(K=d&&r.jsxs(r.Fragment,{children:[r.jsx(Ot,{value:d,onChange:I}),r.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>I(""),className:"h-9 shrink-0","aria-label":a("sectionsEditor.imageField.removeImage"),children:r.jsx(Ye,{size:14})})]}),e[78]=I,e[79]=d,e[80]=a,e[81]=K):K=e[81];let J;e[82]!==Y||e[83]!==H||e[84]!==K?(J=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[Y,H,K]}),e[82]=Y,e[83]=H,e[84]=K,e[85]=J):J=e[85];let X;e[86]!==he||e[87]!==ge||e[88]!==p||e[89]!==P||e[90]!==I?(X=P?r.jsx("input",{ref:Ie,type:"file",accept:[...Le].join(","),className:"hidden",onChange:_=>{he(_.target.files),_.target.value=""}}):r.jsx(Xe,{open:p,onOpenChange:x,mode:"image",onSelect:_=>I(_),lockedConfigId:ge}),e[86]=he,e[87]=ge,e[88]=p,e[89]=P,e[90]=I,e[91]=X):X=e[91];let de;return e[92]!==L||e[93]!==V||e[94]!==J||e[95]!==X?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[L,V,J,X]}),e[92]=L,e[93]=V,e[94]=J,e[95]=X,e[96]=de):de=e[96],de}function At(t){return t+1}function us(t){const e=T.c(15),{isPending:s,isError:n}=t,l=Z();if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(xt,{size:13}),e[0]=c):c=e[0];let a;e[1]!==l?(a=l("sandbox.saveStatus.failed"),e[1]=l,e[2]=a):a=e[2];let u;return e[3]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[c,a]}),e[3]=a,e[4]=u):u=e[4],u}if(s){let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(Ge,{className:"size-[13px]"}),e[5]=c):c=e[5];let a;e[6]!==l?(a=l("sandbox.saveStatus.saving"),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c,a]}),e[8]=a,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(We,{size:13}),e[10]=o):o=e[10];let i;e[11]!==l?(i=l("sandbox.saveStatus.saved"),e[11]=l,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{Ct as C,kt as F,fs as I,vt as M,ls as N,Tt as Q,cs as R,us as S,bt as a,Oe as b,jt as c,Nt as d,yt as e,Ft as f,It as g,Et as h,ds as i,St as j,Ot as k,Ut as l,qt as m,Pt as s,ht as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as s,cm as e,aG as a,cn as d,bt as l}from"./index-
|
|
1
|
+
import{aF as s,cm as e,aG as a,cn as d,bt as l}from"./index-BKpLGEvk.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches 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:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment 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:e().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:e().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 Studio 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:e().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."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().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:e().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:e().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:e().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."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().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)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, registers it (the manifest on Deno, APP_REGISTRY on TanStack), adds the npm dependency, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default — it writes code and restarts the dev server on install, and the restart only works on a daemon new enough to honour a forced step, so an org opts in once its pods are running one. With it off the catalogue stays browsable and nothing is installable, which is also the lever for an org that does not want the CMS writing code."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),cms_auto_commit:e().optional().describe("Fast Preview: commit each CMS save to the editing branch. On by default (see DEFAULT_ON_FLAGS). Off, saves are kept in Studio and shown in the editor and the preview, and reach the branch in one commit when someone publishes or submits for review."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` app's own blocks (`blog/*`) everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible, plus, in the inserter, the sections under the blog app's `customSectionPaths`. Off by default. Blocks already present in a post keep rendering; this only governs what can be added."),blog_view_enabled:e().optional().describe("Blog as a project view of its own (a sidebar row, an app tile and `/blog`), edited on Blog drafts with each post beside the site's render of it. Off by default: the blog stays in the Site Editor's Content tab, and `blog-draft-` branches are ordinary drafts.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only","cms_auto_commit"]);function m(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function g(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,g as a,c as b,m as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as r,dA as p,dy as _,aG as n,bt as o,cn as m}from"./index-
|
|
1
|
+
import{aF as r,dA as p,dy as _,aG as n,bt as o,cn as m}from"./index-BKpLGEvk.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,c1 as T,bZ as ce,j as b,c3 as _,ch as ae,dZ as O,c4 as C,cb as P,c5 as ie,c as F,m as $}from"./index-Ckj4MapM.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),Z=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),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),m=T(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:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});Z.displayName=U;var G="ScrollAreaViewport",J=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(G,o),a=d.useRef(null),c=T(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})})]})});J.displayName=G;var g="ScrollAreaScrollbar",K=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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(Q,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});K.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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(Q,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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"))})})}),Q=d.forwardRef((r,e)=>{const o=v(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=v(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(me,{...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=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(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)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(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)}})}})}),[ve,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=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),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 W(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{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,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,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=v(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(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,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(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=v(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=Z,Ce=J,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] transition-[color,box-shadow] focus-ring",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(K,{"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,c1 as T,bZ as ce,j as b,c3 as _,ch as ae,dZ as O,c4 as C,cb as P,c5 as ie,c as F,m as $}from"./index-BKpLGEvk.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,v]=q(U),Z=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),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),m=T(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:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:m,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});Z.displayName=U;var G="ScrollAreaViewport",J=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(G,o),a=d.useRef(null),c=T(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})})]})});J.displayName=G;var g="ScrollAreaScrollbar",K=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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(Q,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});K.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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(Q,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=v(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"))})})}),Q=d.forwardRef((r,e)=>{const o=v(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=v(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(me,{...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=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(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)}})}})}),me=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=v(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(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)}})}})}),[ve,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=v(g,o),[w,A]=d.useState(null),Y=T(e,m=>A(m)),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 W(m){if(x.current){const p=m.clientX-x.current.left,R=m.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const m=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(ve,{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,m=>{m.button===0&&(m.target.setPointerCapture(m.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(m))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,m=>{const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,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=v(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(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,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=v(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=v(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=Z,Ce=J,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] transition-[color,box-shadow] focus-ring",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(K,{"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 f,j as a,bT as j,h as I,bU as S,bV as b}from"./index-
|
|
1
|
+
import{c as f,j as a,bT as j,h as I,bU as S,bV as b}from"./index-BKpLGEvk.js";import{i as g}from"./SearchMd-D0-9ej42.js";function N(x){const e=f.c(14),{value:r,onChange:l,placeholder:h,onKeyDown:i,className:p,isSearching:c,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==c?(s=a.jsx(j,{className:"pr-0",children:c?a.jsx(I,{className:"size-4"}):a.jsx(g,{})}),e[0]=c,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==i||e[6]!==m||e[7]!==t||e[8]!==r?(n=a.jsx(S,{type:"text",value:r,onChange:t,onKeyDown:i,placeholder:m,disabled:u}),e[4]=u,e[5]=i,e[6]=m,e[7]=t,e[8]=r,e[9]=n):n=e[9];let o;return e[10]!==p||e[11]!==s||e[12]!==n?(o=a.jsxs(b,{size:"sm",className:p,children:[s,n]}),e[10]=p,e[11]=s,e[12]=n,e[13]=o):o=e[13],o}export{N as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,r as C,m as B,j as a,b2 as M}from"./index-
|
|
1
|
+
import{c as K,r as C,m as B,j as a,b2 as M}from"./index-BKpLGEvk.js";import{i as I}from"./SearchMd-D0-9ej42.js";import{I as O}from"./icon-button-BXu6Qjya.js";function G(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,_=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:"outline",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const k=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]!==k?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground shadow-edge",k,j),e[4]=j,e[5]=k,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 y=!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]!==y||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:y,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]=y,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==_||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":_,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]=_,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{G as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,ax as d,b as j,j as i}from"./index-
|
|
1
|
+
import{c as x,ax as d,b as j,j as i}from"./index-BKpLGEvk.js";import{t as E}from"./Users01-DBiECFzL.js";const R=/^[A-Za-z0-9_.-]+$/;function b(f){const e=x.c(15),{field:p,secretById:t}=f,s=j(),n=p.value||"";if(!n)return null;let l;e[0]!==n||e[1]!==t?(l=t.get(n),e[0]=n,e[1]=t,e[2]=l):l=e[2];const c=l;if(!c){let a;e[3]!==n||e[4]!==s?(a=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=a):a=e[5];let u;return e[6]!==a?(u=i.jsx("span",{className:"text-destructive",children:a}),e[6]=a,e[7]=u):u=e[7],u}let o;e[8]!==c.scope?(o=i.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=i.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=i.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(f){const e=x.c(2),{scope:p}=f,t=p==="user"?d:E;let s;return e[0]!==t?(s=i.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{b as S,R as a,N as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,b as N,j as s,n as C,hr as F,R as k,r as y,dY as L,B as D,ax as O,af as E,D as B,v as R,w as A,x as I,aT as q,I as _,y as V,t as z,ge as H}from"./index-
|
|
1
|
+
import{c as j,b as N,j as s,n as C,hr as F,R as k,r as y,dY as L,B as D,ax as O,af as E,D as B,v as R,w as A,x as I,aT as q,I as _,y as V,t as z,ge as H}from"./index-BKpLGEvk.js";import{i as Y}from"./AlertCircle-Bw3i2ESn.js";import{s as G}from"./Plus-lUyuDazr.js";import{t as J}from"./Users01-DBiECFzL.js";import{E as K}from"./empty-state-Sh3VG-tE.js";import{L as w}from"./label-BDLTo2Y-.js";import{S as M,b as Q,a as U,d as W,c as P}from"./select-B5iUwwXV.js";import{T as X}from"./textarea-BI99K3kU.js";import{u as Z,a as ee}from"./use-secrets-DAnpZEOQ.js";import{R as te}from"./require-capability-BVqYoN67.js";import"./index-BdQq_4o_.js";import"./index-_JElq8CH.js";import"./ChevronUp-rwg_m6Bz.js";import"./access-gate-DnxUMUUc.js";import"./capability-load-error-DOumSsHX.js";function se(t){const e=j.c(6),{error:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Y,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function re(t){const e=j.c(8),{scope:r}=t,i=N(),c=r==="user"?O:J;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let m;e[10]!==l||e[11]!==a?(m=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=m):m=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let u;e[15]!==d?(u=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=u):u=e[16];let x;return e[17]!==m||e[18]!==u?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[m,u]}),e[17]=m,e[18]=u,e[19]=x):x=e[19],x}function ne(t){const e=j.c(9),{action:r}=t,i=N();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(E,{}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==i?(l=i("settings.secrets.emptyDescription"),e[3]=i,e[4]=l):l=e[4];let a;return e[5]!==r||e[6]!==n||e[7]!==l?(a=s.jsx(H,{children:s.jsx(K,{size:"inline",icon:c,title:n,description:l,children:r})}),e[5]=r,e[6]=n,e[7]=l,e[8]=a):a=e[8],a}function T({open:t,onOpenChange:e}){const r=N(),[i,c]=y.useState("organization"),[n,l]=y.useState(""),[a,m]=y.useState(""),[d,u]=y.useState(""),x=ee();function g(){c("organization"),l(""),m(""),u("")}function p(){g(),e(!1)}async function S(o){if(o.preventDefault(),!(!n.trim()||!a))try{await x.mutateAsync({scope:i,name:n.trim(),value:a,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(B,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(R,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(M,{value:i,onValueChange:o=>c(o),children:[s.jsx(Q,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:o=>l(o.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:a,onChange:o=>m(o.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!a,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=j.c(34),e=N(),r=Z(),[i,c]=y.useState(!1);let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),l=s.jsx(G,{size:14}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let a;t[2]!==e?(a=e("settings.secrets.newSecret"),t[2]=e,t[3]=a):a=t[3];let m;t[4]!==a?(m=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[l,a]})}),t[4]=a,t[5]=m):m=t[5];const d=m;if(r.length===0){let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{action:!1}),t[6]=o):o=t[6];let f;t[7]!==i?(f=s.jsx(T,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,o,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let u,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const o=r.filter(oe),f=r.filter(ae),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let b;t[18]!==r.length||t[19]!==e||t[20]!==h?(b=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=b):b=t[21];let v;t[22]!==b?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:b}),t[22]=b,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=u):u=t[26],x=o.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:o.map(le)})]}):null,g=f.length>0?s.jsxs("section",{className:"surface p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ce)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=u,t[16]=x,t[17]=g}else u=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(T,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let S;return t[29]!==u||t[30]!==x||t[31]!==g||t[32]!==p?(S=s.jsxs(s.Fragment,{children:[u,x,g,p]}),t[29]=u,t[30]=x,t[31]=g,t[32]=p,t[33]=S):S=t[33],S}function ce(t){return s.jsx($,{secret:t},t.id)}function le(t){return s.jsx($,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function me(){const t=j.c(7),e=N();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{fallback:de,children:s.jsx(y.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(F,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function de(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function _e(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(me,{})}),t[0]=e):e=t[0],e}export{_e as default};
|
package/dist/client/assets/{section-array-field-CXs46rRO.js → section-array-field-Bkmst1qa.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{by as g,bx as E,f6 as w,eL as L,f7 as A,f8 as y,f9 as j,eH as d,fa as P,fb as T,fc as k,fd as D,fe as x,ff as R,bj as B,fg as C,fh as K}from"./index-
|
|
1
|
+
import{by as g,bx as E,f6 as w,eL as L,f7 as A,f8 as y,f9 as j,eH as d,fa as P,fb as T,fc as k,fd as D,fe as x,ff as R,bj as B,fg as C,fh as K}from"./index-BKpLGEvk.js";import{z as I,r as F,y as U,a0 as W,aa as $}from"./blocks-tab-states-CITyhFLq.js";const l="https://docs.decocms.com/storefront/blocks",ne={quickstart:`${l}/next/quickstart`,siteEditor:`${l}/next/site-editor#edit-on-your-machine`,serve:`${l}/next/cli#deco-serve`,schema:`${l}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${l}/next/troubleshooting#site-editor`},ae="https://github.com/decocms/blocks/tree/main/.agents/skills/deco-site-workflow";function Y(e){return e.includes("matchers")||e.includes("Match")}function m(e,r){const t=e.__resolveType;return typeof t!="string"||!t||W(t,r)?!1:r?w(r,t):Y(t)}function oe(e,r){const t=[];for(const[n,a]of Object.entries(r)){if(n.includes("/")||!g(n,e)||E(n)||!a||typeof a!="object"||Array.isArray(a))continue;const o=a;m(o,e)&&t.push({blockKey:n,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return t.sort((n,a)=>(n.name??n.blockKey).localeCompare(a.name??a.blockKey))}function p(e,r,t){if(!e)return!1;const n=e.__resolveType;if(typeof n!="string"||!g(n,t)||!Object.hasOwn(r,n))return!1;const a=r[n];return!a||typeof a!="object"||Array.isArray(a)?!1:m(a,t)}function se(e,r,t){return p(e,r,t)?e?.__resolveType??null:null}function S(e,r,t){if(!e)return null;const n=e.__resolveType??"";if(!n)return null;if(p(e,r,t)){const s=r[n]??{},i=s.__resolveType??n,{__resolveType:c,name:u,...v}=s;return{resolveType:i,data:v,blockKey:n}}const{__resolveType:a,...o}=e;return{resolveType:n,data:o}}function q(e,r,t){const n=S(e,r,t);return n?{__resolveType:n.resolveType,...n.data}:{__resolveType:""}}function ie(e,r,t){if(e)return p(e,r,t)?q(e,r,t):e}function z(e,r,t,n){if(!e)return"Default";if(p(e,r,n)){const a=e.__resolveType??"",o=r[a];return I(a,o)}return t(e,F(r))}function ce(e,r,t){return{__resolveType:e,...r,name:t}}function ue(e){return{__resolveType:e}}function le(e,r,t){const n=S(e,r,t);return n?{resolveType:n.resolveType,formValue:n.data}:{resolveType:"",formValue:{}}}function fe(e,r){const t={__resolveType:e};if(!e||!r)return t;const n=U(e,r),a=n?.type==="inline-union"?n.inlineUnionBranches?.[0]?.discriminators:void 0;return a?{...t,...a}:t}function V(e){const r=[];for(let t=e;t?.key!=null;t=t.parent)r.push(t.key);return r.reverse()}function G(e){return{blockKey:e.blockKey,path:V(e)}}function H(e,r,t){const n=[];for(const[o,s]of Object.entries(e))o!==r&&n.push({node:s,blockKey:o,parent:null,key:null});const a=new Set;for(;n.length>0;){const o=n.pop(),{node:s}=o;if(!(!s||typeof s!="object")&&!a.has(s)){if(a.add(s),Array.isArray(s)){s.forEach((i,c)=>{n.push({node:i,blockKey:o.blockKey,parent:o,key:c})});continue}t(s,o);for(const[i,c]of Object.entries(s))n.push({node:c,blockKey:o.blockKey,parent:o,key:i})}}}function N(e,r,t){if(!r)return[];const n=[];return H(e,r,(a,o)=>{if(a.__resolveType!==r||!p(a,e,t))return;const s=J(o);n.push({...G(o),...s?{variant:s}:{}})}),n}function J(e){for(let r=e;r;r=r.parent){const t=r.parent,n=t?.parent,a=n?.parent;if(!t||!n||!a)return;if(r.key==="rule"&&typeof t.key=="number"&&n.key==="variants"&&$(a.node)&&L(a.node.__resolveType)){const o=a.node.experiment;return{containerPath:V(a),containerType:a.node.__resolveType,index:t.key,...typeof o=="string"?{experiment:o}:{}}}}}function Q(e){for(const r of e.anyOfRefs??[]){if(r.resolveType!==A&&r.resolveType!==y)continue;const t=r.schema?.properties?.variants?.items?.properties?.value,n=t?.lazy?t.properties?.value:t;if(n?.type==="array")return n}}function X(e){return Q(e)!==void 0}function ye(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return Array.isArray(t.variants)?t.__resolveType===R?!0:r&&t.__resolveType===y&&!M(t.variants):!1}function M(e){return e.some(r=>Array.isArray(d(r)))}function O(e,r){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===A?!0:r&&t.__resolveType===y&&Array.isArray(t.variants)&&M(t.variants)}function pe(e,r){if(!O(e,r))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=B(t[0],r);return Array.isArray(n)?n:null}function ve(e,r,t,n){if(!O(e,n))return r;const a=structuredClone(e),o=[...a.variants??[]];return o.length===0?o.push({rule:k(t),value:T(a.__resolveType,r)}):o[0]=C(a.__resolveType,o[0],r),{...a,variants:o}}function de(e,r){const n=e[r]?.sections;if(!n||Array.isArray(n))return 1;const a=n;return Array.isArray(a.variants)?a.variants.length:1}function _e(e,r,t){const a=e[r]?.sections;if(Array.isArray(a))return t===0?a:[];if(a&&typeof a=="object"){const o=a.variants;if(Array.isArray(o)){const s=d(o[t]);return Array.isArray(s)?s:[]}}return[]}function he(e,r,t){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const n=e;if(Array.isArray(n.variants)){const a=n.variants,o=j(a.map(s=>z(s.rule,r,t)));return a.map((s,i)=>{const c=o[i],u=d(s);return{label:c||`Variant ${i+1}`,sections:Array.isArray(u)?u:[],rule:s.rule}})}}return[]}function _(e,r,t){return{rule:k(r),value:T(t,e)}}function h(e,r){return e?e.__resolveType===y?y:A:D(r)}function f(e,r,t){return{...r,__resolveType:h(r,t),variants:e}}function be(e,r,t,n=!1){const a=structuredClone(r);if(e&&typeof e=="object"&&!Array.isArray(e)){const c=e;if(!Array.isArray(c.variants))return null;const u=[...c.variants],v=P(u,n);return u.splice(v,0,_(a,t,h(c))),{sections:f(u,c),newVariantIndex:v}}const o=h(void 0,t),s=_(Array.isArray(e)?e:[],t,o),i=_(a,t,o);return{sections:f(n?[i,s]:[s,i],void 0,t),newVariantIndex:n?0:1}}function Ae(e,r,t=!1){const n=e[r];if(!n)return null;const a=[...e];return a.splice(K(e,r,t),0,structuredClone(n)),a}function ge(e,r){if(r.length===0)return f([],e);if(r.length===1){const t=r[0],n=t?.rule;if(!x(n))return f(r,e);const a=d(t);if(Array.isArray(a))return a}return f(r,e)}function Z(e,r,t){return N(e,r,t).length}function Te(e,r,t,n){return n?!1:Z(e,r,t)===0}const ke={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};function b(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===R}function ee(e){if(e.anyOfRefs?.length)return e.anyOfRefs.some(t=>b(t.resolveType));const r=e.properties?.__resolveType;return r?.type==="block-ref"&&r.anyOfRefs?.length?r.anyOfRefs.some(t=>b(t.resolveType)):!1}function Re(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(r=>b(r.resolveType))}function me(e,r){if(r==="global"||r==="sections"||X(e))return!0;const t=e.type==="array"?e.items:void 0;return t?ee(t):!1}export{Te as A,Ae as B,ke as C,ae as D,de as a,be as b,ne as c,X as d,me as e,q as f,_e as g,ue as h,b as i,Re as j,z as k,oe as l,se as m,le as n,p as o,he as p,ce as q,ie as r,fe as s,ye as t,O as u,pe as v,ve as w,Q as x,S as y,ge as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i8 as ei,bn as ti,c as wn,b as jn,r as b,m as le,j as r,c7 as ni,bk as Cs,i9 as Mo,B as It,Y as on,au as si,_ as ri,bm as oi,Z as ai,q as ii,hG as li,ia as ci,ib as ui,h as di,bo as wt,ic as Jr,id as bs,ie as fi,ig as pt,ih as Qr,ii as mi,fP as pi,ij as hi,ik as Yr,il as gi,t as W,ft as Zr,im as vi,io as Bt,ip as yi,iq as Si,ir as bi,fh as Xr,is as xs,it as xi,iu as _i,iv as ki,fe as wi,fQ as ji,iw as Ri,ix as Ei,fs as Vi,K as Ti,iy as eo,eK as Ai,fI as Wn,fN as to,iz as no,iA as Ni,iB as Ci,iC as Pi,iD as _s,iE as Bi,iF as Ki,iG as Mi,iH as so,iI as Di,iJ as Fi,fg as ro,iK as Ii,iL as Li,fK as oo,iM as Oi,fc as zi}from"./index-BKpLGEvk.js";import{u as $i}from"./chat-context-CYceSwsW.js";import{a as Xn,M as ao}from"./save-status-D_jJpmHD.js";import{p as kn,f as Hi,n as Wi}from"./parse-sections-B9nhzb36.js";import{b as Gi}from"./repository-binding-CP5rmeRO.js";import{n as qi,t as Ui}from"./ChevronUp-rwg_m6Bz.js";import{ab as Do,b as Zn,as as Ji,e as Qi,F as Yi,a2 as io,a0 as lo}from"./agent-icon-BFR8_3zP.js";import{S as an}from"./scroll-area-DYFB45XI.js";import{c as jt,T as Rt,a as Et}from"./tooltip-CHkAenL4.js";import{h as Zi,i as Xi,j as el,E as tl,k as nl,V as sl,l as rl,m as ol,G as al,s as Jn,v as Qn,p as Fo,n as il,o as ll,a as co,q as cl,u as ul,A as Gn,P as uo,w as fo,x as mo,y as ks,z as dl,B as fl,D as po,F as ml,J as ho,K as go,L as vo,M as pl,Q as yo,c as hl,T as ln,U as gl,W as vl}from"./held-block-view-Cm31vjrE.js";import{j as yl,u as Sl,i as bl,v as xl,aK as _l,U as kl,k as So,b1 as bo,ab as Kt,ac as Mt,ax as wl,b2 as jl,b3 as Rl,aV as xo,aA as El,aH as Vl}from"./site-editor-toast-BceqMxyH.js";import{u as Tl,ao as _o,e as ko,j as Al,z as Nl,y as qn,ad as Cl,ae as Pl,aj as Bl}from"./blocks-tab-states-CITyhFLq.js";import{u as Kl}from"./use-delete-block-CS6BnCmg.js";import{b as Ml,u as Dl,k as Un,e as xn}from"./use-never-published-8biSL1xa.js";import{a as Es,e as Io}from"./UserSquare-CMedzjXl.js";import{i as wo,s as jo}from"./Tool01-Yd8ogx8N.js";import{s as Fl}from"./Plus-lUyuDazr.js";import{s as Il}from"./Trash01-CGn497Nk.js";import{i as Vs}from"./Zap-BNB_xEwI.js";import{u as Ll,a as Ro,n as Ol,P as zl,o as $l,C as Hl,D as Wl,c as Gl}from"./core.esm-BBx9DFCe.js";import{u as ql,s as Ul,a as Yn,S as Jl,v as Ql}from"./sortable.esm-ANscIFFj.js";import{s as Yl,g as Zl,u as Xl,A as ec}from"./use-section-preview-base-BJCE_bK_.js";import{m as tc,P as nc}from"./mustache-CucS04fv.js";import{r as Eo,u as sc,a as rc,i as oc,f as ac,B as ic}from"./empty-message-mnnSg0iM.js";import{u as lc,a as cc,P as Vo,w as uc,b as dc}from"./seo-editor-CMO3yFNl.js";import{v as fc,k as ws,x as To,j as mc,y as pc}from"./named-rule-step-DzxARGEs.js";import{u as hc}from"./use-apply-named-rule-qmErOd6S.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as gc,n as Ut,r as js,m as Dt,k as _n,b as vc,s as Ao,z as yc,A as Sc,B as bc}from"./section-array-field-Bkmst1qa.js";import{b as No,a as xc}from"./variant-matcher-override-WZWgmOzs.js";import"./use-view-draft-kind-DwK_OsiM.js";import"./thread-route--4ncLAuV.js";import"./use-project-scope-X9RqbqiU.js";import"./use-organization-settings-Csn2HHVU.js";import"./schema-B-LAHoUK.js";import"./task-board-DsQ_oTs1.js";import"./thread-intent-CCp7NTzo.js";import"./use-mcp-client-B3T-i6Yy.js";import"./auth-BEwu0a-x.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-D62Siohr.js";import"./use-entitlements-Bc6hnlLI.js";import"./use-ai-providers-monFFnof.js";import"./use-decopilot-events-CQZ1l3Ag.js";import"./Upload01-bs3kHvY6.js";import"./label-BDLTo2Y-.js";import"./SwitchHorizontal01-1mxe_S61.js";import"./popover-CIHDNHCs.js";import"./switch-C9Bl2pnH.js";import"./toggle-group-DRCRlz-o.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BAq4cYjg.js";import"./asset-utils-Cm9qiSAT.js";import"./useInfiniteQuery-Dbi-NOGt.js";import"./infiniteQueryObserver-B581IWWx.js";import"./AlertCircle-Bw3i2ESn.js";import"./hosted-reconcile-CfexzNYR.js";import"./SearchMd-D0-9ej42.js";import"./textarea-BI99K3kU.js";import"./use-copy-CHckM0yQ.js";import"./ChevronSelectorVertical-EzXJxozj.js";import"./command-Bvze9Tif.js";import"./index-DHKBL-0w.js";import"./Play-2aGPtJuo.js";import"./monaco-editor-D1vzjghk.js";import"./editor-DnLe1jNS.js";import"./ArrowUp-CoOHlCW9.js";import"./ArrowLeft-6fw6vHKx.js";import"./LinkBroken01-eOLBCf9g.js";import"./BookOpen01-CIigO21o.js";import"./Globe04-vWAQu6ql.js";import"./CheckCircle-Bp8tITGL.js";import"./CreditCard01-BSJJY0ul.js";import"./Key01-CJqMVRWW.js";import"./Minus-D2dKSFlw.js";import"./Monitor01-Ib8XdXsU.js";import"./Sun-DgJwoRO5.js";import"./ShoppingBag01-Ct2vEJ5p.js";import"./Users01-DBiECFzL.js";import"./XClose-CjAbxo6W.js";import"./index-BdQq_4o_.js";import"./index-_JElq8CH.js";import"./utils-DGdwEw5F.js";import"./calendar-BzCbg4ac.js";import"./usage-stats-CqG5Et7U.js";import"./tool-namespace-CDKIr-qo.js";import"./form-Bk3nslfo.js";import"./utils-CVEq3hMx.js";import"./markdown-BsYAi8XQ.js";import"./use-mobile-DcM2ppEE.js";import"./select-B5iUwwXV.js";import"./editor-classes-CmD68Fq4.js";import"./combobox-jjs4eQim.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-DZThvbj1.js";import"./use-blocks-v8-project-DvmEriaW.js";import"./use-voice-input-c6FA5Zln.js";import"./drawer-CYcKWGYw.js";import"./index-DXL41NDn.js";import"./checkbox-CatUuWpu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-DcqI6XE4.js";import"./empty-state-D60YSb1b.js";import"./search-input-DqHJAiRd.js";import"./tabs-CEaEmLtB.js";import"./use-debounced-value-JGqBfV3A.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CTPgNFFV.js";import"./collapsible-Cn64wIV8.js";import"./shell-layout-BMzHKR9t.js";import"./use-deployment-admin-BJVjKk5d.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-Ct_bDgI9.js";import"./project-icon-Bvu6n5OS.js";import"./use-navigate-to-agent-D8_0egfT.js";import"./new-project-dialog-kOo0CX1I.js";import"./repository-picker-DC1bdVSR.js";import"./github-icon-DQGQvMmf.js";import"./collection-search-D22DG-N6.js";import"./legacy-admin-welcome-dialog-_KyfyHo4.js";import"./required-auth-layout-DkFLkHwK.js";import"./use-org-sso-B2a8dOEH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-dDBi3URO.js";import"./types-BU7qSv9N.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-gfkwParf.js";import"./use-connection-awawZ6Wu.js";import"./use-mcp-prompts-DBrWE8Dr.js";import"./use-thread-outputs-XJ2zBtCL.js";import"./file-type-icon-e_gGiYxT.js";import"./slider-DcuTWtwH.js";import"./index-CePmTsdo.js";import"./tooltipContext-C0rU2vdL.js";import"./CategoricalChart-LwMiidhq.js";import"./index-B5IfyADC.js";import"./use-move-blocks-Devk2xQ3.js";const _c={escape:Zi};function kc(v,e){for(const p of Yl(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function wc(v,e){if(!e)return;const p=ei(v,ti(e));if(p)try{const S=kc(p.resolveType,e);return S&&tc.render(S,p.data,{},_c).trim()||void 0}catch{return}}function jc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(Rt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(jt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Rc="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function Co(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Lo(v){return v.map((e,p)=>({...e,index:p}))}function Ec(v,e){if(e===v.length)return v;if(e<v.length)return Lo(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function Oo(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=jn(),_=Xn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?Zl(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?wc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=rl(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Zn:k?Do:Io;let q;e[16]!==k||e[17]!==P?(q=P?{color:oi}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=q):q=e[18];const _e=q;let I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(al,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(Ji,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(jc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(ao,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(ao,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Vc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Tc="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function zo(v,e,p){if(p)return ol({selected:e});const S=v.isSavedBlock===!0,x=v.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":S?Vc:x?Tc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rs(v,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Ac(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=jn(),c=Xn(),xe=S?Cs(S.__resolveType??""):!1,q=p.isHidden===!0,_e=xe||q;let I;e[0]!==p?(I=Mo(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Pc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=ql(Oe);let Pe;e[4]!==ze?(Pe=Hl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let de;e[6]!==Pe||e[7]!==st?(de={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=de):de=e[8];const g=de;let we;e[9]!==p?(we=el(p),e[9]=p,e[10]=we):we=e[10];const rt=we,ot="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=le("touch-none transition-colors",Xe,zo(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(Oo,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Qe):Qe=e[22];const H=!c&&d&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(Rs(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Cc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),at=c?r.jsx(tl,{label:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:q,onToggle:Ue,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})}):r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(Rs(_e,q)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Nc,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=ri,Ye=nl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(Rs(_e,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let $e;e[25]!==Ye||e[26]!==ve||e[27]!==it?($e=r.jsx(Ye,{label:ve,classicClassName:it}),e[25]=Ye,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(on,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(si,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=F=>{F.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Qi,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Y;e[38]!==w?(Y=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Y):Y=e[39];let ee;e[40]!==Ke||e[41]!==Y?(ee=r.jsxs(on,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let D;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(D=ke&&r.jsxs(on,{className:le(!c&&sl),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Do,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=D):D=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(on,{className:le(!c&&Rc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Zn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let me;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(me=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(on,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Io,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=me):me=e[58];let He;e[59]!==k?(He=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=He):He=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Il,{className:"h-4 w-4"}),e[61]=et):et=e[61];let Me;e[62]!==w?(Me=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=Me):Me=e[63];let $;e[64]!==He||e[65]!==Me?($=r.jsxs(on,{variant:"destructive",onClick:He,children:[et,Me]}),e[64]=He,e[65]=Me,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==D||e[70]!==T||e[71]!==me||e[72]!==$?(ie=r.jsxs(ai,{align:"end",className:"w-44",children:[Be,ee,D,T,me,$]}),e[67]=Be,e[68]=ee,e[69]=D,e[70]=T,e[71]=me,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==fe||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(fe,{children:[$e,ie]}),e[74]=fe,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==g||e[83]!==A||e[84]!==Qe||e[85]!==H||e[86]!==at||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:X,style:g,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Qe,H,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=g,e[83]=A,e[84]=Qe,e[85]=H,e[86]=at,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Nc(v){return v.stopPropagation()}function Cc(v){return v.stopPropagation()}function Pc(){return!1}function Ns(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=jn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Fl,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Bc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,q=xe===void 0?!0:xe,_e=jn(),I=Xn();let ke;e[0]!==x.length?(ke=()=>Co(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Co(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Ec(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:Ul},e[3]=g):g=e[3];const we=Ll(Ro(zl,de),Ro(Ol,g));let rt;e[4]!==d?(rt=d.map(Kc),e[4]=d,e[5]=rt):rt=e[5];const ot=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Xe;e[7]!==ot||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const We=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));We===-1||ht===-1||(Oe(bt=>Lo(Yn([...bt],We,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(We,ht))},e[7]=ot,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const H=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,He;if(e[11]!==u||e[12]!==q||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){me=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==q||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Ye=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let We;e[61]!==Ae?(We=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=We):We=e[62];const ht=We;let bt;e[63]!==q||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm"})]}),e[63]=q,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],me=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=q,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Ye,e[57]=ve,e[58]=T}else Ye=e[56],ve=e[57],T=e[58];fe=Wl,Ke=we,se=Gl,Y=L,ee=A,D=H,at=Jl,$e=ot,Be=Ql,He="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Ac,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=q,e[13]=I,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=at,e[34]=fe,e[35]=Ye,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=Ke,e[41]=se,e[42]=Y,e[43]=ee,e[44]=D,e[45]=T,e[46]=me,e[47]=He}else at=e[33],fe=e[34],Ye=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],Ke=e[40],se=e[41],Y=e[42],ee=e[43],D=e[44],T=e[45],me=e[46],He=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==He?(et=r.jsx("div",{className:He,children:it}),e[68]=it,e[69]=He,e[70]=et):et=e[70];let Me;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(Me=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=Me):Me=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",zo(ve,!1,I)),children:r.jsx(Oo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=ni.createPortal(r.jsx($l,{dropAnimation:Xi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==fe||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==D||e[90]!==Me||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[Me,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=Me,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==q||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=q,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Kc(v){return v.id}function Mc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Ts(v,p,S)}:{kind:"noop"};const V=As(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Qn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Po="section-form-stale-save",Dc=3;function Bo(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Ko=new WeakMap;let Fc=0;function Ic(v){let e=Ko.get(v);return e===void 0&&(e=++Fc,Ko.set(v,e)),e}function xf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=jn(),xe=$i(),q=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=yl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Tl(_e),X=Xn(),ze=xe?.virtualMcpId,Pe=Gi(ze===e?e:null)?.metadata?.siteSlug??null,st=Xl({virtualMcpId:e,branch:p,sandboxUrl:x}),de=Sl(e,p),g=bl(de),we=Vi(g),rt=!g,ot=!!st||g,[m,L]=b.useState(null),[Xe,A]=b.useState(null),[Qe,H]=b.useState(null),[at,fe]=b.useState(0),[Ye,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[Ke,se]=b.useState(null),[Y,ee]=b.useState(null),[D,T]=b.useState([]),me=b.useRef(null),[He,et]=b.useState(D.length);He!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Me,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,We]=b.useState(!1),[ht,bt]=b.useState(!1),Rn=b.useRef(null),[En,$o]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[je,un]=b.useState(Z),[Ps,Bs]=b.useState(Z);Z&&!Ps&&(Bs(!0),un(!0),L(null),A(null),H(null),T([])),!Z&&Ps&&Bs(!1);const[Ho,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ms,Ot]=b.useState([]),[Ds,Yt]=b.useState(0),[De,lt]=b.useState(0),[Wo,Fe]=b.useState(null),[Zt,Ge]=b.useState(null),[Fs,Is]=b.useState(null),Nn=ii(),Cn=xl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Ml({orgSlug:v,virtualMcpId:e,branch:p}),[Go,qo]=b.useState(V),[Uo,Jo]=b.useState(C),[Qo,Yo]=b.useState(_);(Go!==V||Uo!==C||Qo!==_)&&(queueMicrotask(()=>fn.flush()),qo(V),Jo(C),Yo(_),L(null),A(null),H(null),fe(0),se(null),ee(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const B=Dl({orgSlug:v,virtualMcpId:e,branch:p}),mn=hl(t=>{B.mutate(t,{onSuccess:()=>k?.(),onError:B.reportError})},d??{},B.v8),Pn=Kl({orgSlug:v,virtualMcpId:e,branch:p}),Ls=hc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);_l(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:o,selectedSectionIndex:a}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,a]){const f=l==null?void 0:s[l],R=l==null?void 0:o[l],h=f&&R?.isSavedBlock?_s(f,R):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Zo,Xo]=b.useState(0),$s=li(de,{orgSlug:v,virtualMcpId:e,branch:p}),Hs=ci($s,I[0]?.blockKey??null,ui(d,I[0]?.blockKey??null)),[ea,ta]=b.useState(null),ts=kl(v,e).epoch,[na,sa]=b.useState(ts);lc(je?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Ws=_??(d&&u?_o(ko(d,u),V,C)?.key??null:null),ns=So({orgSlug:v,virtualMcpId:e,branch:p},Ws?[Ws]:[],{withRefs:!0}),[Gs,ra]=b.useState(!1),ss=So({orgSlug:v,virtualMcpId:e,branch:p},Gs?Al:[]),qs={ready:!(de.kind==="protocol"&&de.hosted)||Gs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>ra(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(di,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const oa=ko(d,u),G=!!_,oe=G?null:_o(oa,V,C),y=G?_:oe?.key??null,rs=G&&_?d[_]:void 0,Us=G&&_&&rs?Nl(_,rs):G&&_?_:"",nn=!G&&y&&d[y]?d[y]:null,os=je&&d&&u&&y&&oe?Eo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,aa=je?nn?.seo:void 0,Kn=Ks!==void 0?Ks:aa,ia=je?sc(Kn):void 0,Js=os?.seoTypeOptions??[],Qs=je&&u?rc(u):"",as=Ho??ia??{},Mn=je&&os?cc(as,os):null,Ys=je&&Mn&&oc(Kn)?qn(Mn,u):null,Zs=je?ac(d,u)?.seoData:void 0,pe=G?[{label:"Default",sections:[{__resolveType:_}]}]:Fo(nn?.sections,d??{},g),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],K=Se?.sections??[],ce=kn(K,d,g),Dn=!G&&gc(nn?.sections,g);if(G&&_&&Fs!==_){Is(_);const t=K[0],n=ce[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),H(s.resolveType),Ge(null),Fe(null))}}!G&&Fs!==null&&Is(null),re.current={rawSections:K,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:De,selectedSectionIndex:m};const la=()=>({multivariate:Dn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:g&&Dn&&Ai(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Dn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=g?bo(y,s):No(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Dn&&yt&&!Oe&&!Ee?y:null;if(ls!==ea&&(ta(ls),ls)){const t=pe.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const o=la(),a=g?bo(y,o):No(y,o,d,u);if(!t||n<0){w(a.length>0?a:null);return}const i={pageKey:y,page:o,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?jl(i):xc({...i,decofile:d,meta:u}),f=g?Rl(a,l):[...a,...l];w(f.length>0?f:null)},xt=(t,n,s,o=m??-1,a=!1)=>{const i=pt(t,n);if(!i){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const f=Qr(i,we)[s];if(!f){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const R=hi(f.value,d);A(R?.data??null),H(R?.resolveType??null);const{resolveType:h,formValue:j}=Ut(f.rule,d,u??void 0);Ge(h),Fe(j),a&&$t(i,o,s)},cs=t=>{F(null),fe(t),L(null),A(null),H(null),T([]);const n=pe[t]?.rule,{resolveType:s,formValue:o}=Ut(n,d??{},u??void 0);ee(s),se(o),is(pe.map(a=>({rule:a.rule})),t)},ca=(t,n)=>{const s=K[t],o=ce[t];if(!s||!o)return!1;const a=o.isMultivariate?pt(s,o)?.variants?.length??0:0,i=n<a?n:0;if(L(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),Ge(null),Fe(null)}return!0},Xs=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof Xs=="number"&&ca(Xs,0)),ts!==na){sa(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||B.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=K[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)L(null),A(null),H(null);else if(o.isMultivariate)xt(s,o,De,m);else{const a=wt(s,o,d,g);A(a?.data??null),H(a?.resolveType??null)}}!t&&je&&(dn(null),An(void 0),Yt(s=>s+1))}if(Os!==Zo){Xo(Os);const t=m!==null?K[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,De,m);else{const s=wt(t,n,d,g);A(s?.data??null),H(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Bo(d,n,g),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?bs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,g):null,i=fi(ut,a,l=>Yr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Fn=Qe&&u?qn(Qe,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=ln(d,y,t,te,pe);B.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),B.reportError(o)}})},Ht=()=>{Ce?.(null),L(null),Tn(!1),A(null),H(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1)},er=()=>Jr(me.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,W.error(t,{id:Po}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=de.kind==="protocol"&&de.source==="github",rr=t=>Vl(Nn,Cn,t,de.kind==="protocol"?de:null),or=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},ua=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:o}=re.current,a=zt.current;return{formBase:a?.sectionIndex===t&&a.variantIndex===o?a:null,pageKey:n,global:G,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},da=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),o=s>=0?n[s]:void 0,a=o?n.with(s,{...t,choices:no(o.plan,o.choices,t.plan),fresh:Ii(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Wn(o.plan.theirs)!==Wn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ar=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Wn(a.plan.mine)===Wn(n))return!0;const i=to({...a.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==a);return vn(l),!1}return vn(s.with(o,{...a,plan:i,choices:no(a.plan,a.choices,i)})),!0},fa=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},ma=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const o=n.emitted;return o&&typeof o=="object"&&!ar(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},pa=()=>{const t=ct.current[0],n=ma();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=ji(n.plan,n.choices);de.kind==="protocol"&&de.source==="github"&&Ri(n.plan,n.choices)&&wl(c,!1),vn(ct.current.slice(1));const{formBase:o,target:a}=n;o.base=n.plan.theirs,o.version=void 0,o.emitted=s,es.current.add(o),(zt.current===o||fa(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ha=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??ua(n),l=i.sectionVariantIndex,f=i.formBase,R=a||eo(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const j=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(j,E);return}const M=typeof t=="function"?t():t,z=eo(ct.current,f,i,n,g).base;if(z&&ar(z,M))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Bo(ne,i,g),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const qe=f?.base,Ze=bs(he,ue,l,ne,g),Nt=!!qe&&!!Ze&&Ni(qe,Ze)&&!(f&&Yr(f,Ze));if(Nt&&qe&&Ze){if(Ci(qe,Ze)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Pi(qe,J.map((ae,mt)=>bs(ae,Ne[mt],l,ne,g)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&L(U),yn(M,U,s,i);return}}const Ct=Nt&&qe&&Ze?to({ancestor:qe,mine:M,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,da({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Bi(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?_s(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??M,Gr=Ki({merged:!!Pt,tracked:f,current:zt.current,saved:M});Pt&&W.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),Gr&&f&&(f.emitted=Pt,A(Pt));const Ss=Gr||!Pt?rn:M;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const qr={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&qe&&(f.base=qe),U instanceof El){if(f&&(f.version=void 0),s<Dc){ye.current.delete(j),hn.current=!0;const ae=Li(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:M},n,s+1,i,ae.immediate),ye.current.delete(j),or(xn(g))},ae.delay)}else us();return}B.reportError(U)}},Ur=U=>{pn.current=!0;let ae=!1;B.mutateAsync(U).then(()=>qr.onSuccess(),mt=>{ae=!0,qr.onError(mt)}).finally(()=>{pn.current=!1,or(ae?xn(g):0),tr()})};if(ue.isSavedBlock){const U=_s(he,ue);if(!U)return;Ur({blockKey:U,data:rn,...qe?{base:{value:Di({startedFrom:qe,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:so({formBase:f,rebased:!!Pt,versionOf:rr,productionVersionOf:ae=>oo(Nn,Cn,ae),...sr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Hn={...ne[Ie]},qt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Fi(U,l,rn);qt[n]=Bt(he,ue,ae)}else if(ue.isHidden){const U=Cs(he.__resolveType),ae=U?{...he.section}:{...he},mt=Array.isArray(ae.variants)?[...ae.variants]:[];mt[0]&&(mt[0]=ro(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?qt[n]={...he,section:ae}:qt[n]=ae}else ue.isLazy?qt[n]={...he,section:rn}:qt[n]=rn;if(Q.length>1){const U=Hn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=ro(U?.__resolveType,ae[be],qt)),Hn.sections={...U,variants:ae}}else Hn.sections=qt;Ur({blockKey:Ie,data:Hn,rebaseOnConflict:!1,guard:so({formBase:null,rebased:!1,versionOf:rr,productionVersionOf:U=>oo(Nn,Cn,U),...sr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},R){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(g))},ga=t=>{tn.current=!1,L(t),lt(0),T([]),$(a=>a+1);const n=K[t],s=ce[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const o=wt(n,s,d,g);if(!o){A(null),H(null),Ge(null),Fe(null),$t(null,t,0);return}A(o.data),H(o.resolveType),Ge(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=Ei(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!oe)return;const n={kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},s=Eo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ti.decofile(Cn))?.[y];if(!o||typeof o!="object"||o===null||Array.isArray(o))return null;const a={...o,...Bn.current};return Bn.current={},t?.raw!==void 0?uc(a,t.raw,u):t?.inner!==void 0?dc(n,s,a,t.inner):a})},lr=(t,n)=>{y&&(Bn.current[t]=n,ds())},va=(t,n)=>{if(!y)return;const s=Yn([...K],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},ya=t=>{if(!y)return;const n=K.filter((s,o)=>o!==t);m===t?Ht():m!==null&&m>t&&L(m-1),dt(n)},Sa=t=>{if(!y)return;const n=K[t];if(!n)return;const s=[...K];s.splice(t+1,0,gl(n)),m!==null&&m>t&&L(m+1),dt(s)},ba=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?_i(n,g):ki(n,u);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},xa=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=xi(n);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},_a=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,g);if(!o?.data)return;const{name:a,...i}=o.data,l=[...K];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Ht(),dt(l)},ka=t=>{if(!y)return;const n=Wi(ce),s=[...K.slice(0,n),{__resolveType:t.resolveType},...K.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Ht()}}),We(!1),L(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,g)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,g);if(!i){A(null),H(null),Ge(null),Fe(null);return}A(i.data),H(i.resolveType),Ge(null),Fe(null)},cr=t=>{Rn.current=t.append,We(!0)},wa=t=>{const n=Rn.current;if(!n){ka(t);return}n({__resolveType:t.resolveType}),We(!1),Rn.current=null},ur=t=>{if(m===null)return;const n=K[m],s=ce[m];!n||!s?.isMultivariate||(lt(t),T([]),$(o=>o+1),xt(n,s,t,m,!0))},ja=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=Si(o,t);if(!a){W.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...K];i[m]=Bt(n,s,a);const l=a.variants;let f=De;t===De?f=Math.min(t,l.length-1):t<De&&(f=De-1),lt(f),T([]),$(R=>R+1),xt(i[m],s,f),dt(i)},Ra=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t,g),i=[...K];i[m]=Bt(n,s,a);const l=Xr(o.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},Ea=(t,n)=>{if(m===null||!y||t===n)return;const s=K[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=vi(a,t,n),l=[...K];l[m]=Bt(s,o,i);let f=De;De===t?f=n:t<De&&n>=De?f=De-1:t>De&&n<=De&&(f=De+1),lt(f),xt(l[m],o,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=K[n],o=ce[n];if(!s||!o)return;const a=gi(s,o,void 0,u,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...K];i[n]=a.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){W.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=K[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=yi(t,n,s);if(!o){W.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...K];a[m]=o;const i=kn(a,d,g)[m];if(!i)return;lt(0),Ge(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),$t(null,m,0),dt(a)},Va=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){W.error(n);return}const s=K[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await B.mutateAsync({blockKey:t,data:i,create:!0}),f=[...K];f[ie]={__resolveType:t},await B.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Ht(),Ve(null),Un(l)||W.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){W.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Mt(l))})}},fr=Se?.rule;if(yt&&m===null&&Y===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?il(u):[],fs=u&&d?ll(u,d):[],Wt=g&&u&&d?fc(u,d):[],ms=(t,n)=>{if(Wt.length===0)return;const s=Cl(t);return{kinds:Wt,selected:s,campaignPrefill:mc(t),onPick:n,load:qs}},mr=!G&&!!(ot&&u&&d),pr=Y&&u?qn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},Gt=async(t,n)=>{if(Sc(n,t,u,g))try{await Pn.mutateAsync({blockKey:t})}catch(s){W.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Mt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a={...s[n]},i={...a.sections},l=[...i.variants??[]],f=l[o],R=f?.rule;if(Jt(R,s,u)){const h=R?.__resolveType??"",j=s[h],E=typeof j?.name=="string"?j.name:h,{__resolveType:M,...z}=t;B.mutate({blockKey:h,data:Ft(M??"",z,E)},{onSuccess:()=>k?.(),onError:B.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},B.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};hr(s)},In=async(t,n,s)=>{const o=pc(n,t);if(!o.ok)return o.reason==="conflict"&&W.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),xo),null;const a={};if(s){const i=s(o.rule);if(!i)return null;a[i.blockKey]=i.data}return o.blockWrite&&(a[o.blockWrite.blockKey]=o.blockWrite.block),Object.keys(a).length>0&&!(await Ls.apply({writes:a})).ok?null:(o.blockWrite&&W.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...xo,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},yr=Wt.length>0?{kinds:Wt,load:qs,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Pl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Bl(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const R=s[n],h=R?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const j=h;if(!Array.isArray(j.variants))return null;const E=[...j.variants],M=E[o];return M?(E[o]={...M,rule:f},{blockKey:n,data:{...R,sections:{...j,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=s[n],i=a?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[o];if(!R)return;const h=Dt(R.rule,s,u),j=cn(t);f[o]={...R,rule:j};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:M,formValue:z}=Ut(j,E,u??void 0);ee(M),se(z);try{await B.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await Gt(h,E),k?.()}catch(ne){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Q=z?.__resolveType??"",be=i[Q],Ie=typeof be?.name=="string"?be.name:Q,{__resolveType:he,...ue}=t;B.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:B.reportError});return}const ne=xs(E,s,t),J=[...o];J[n]=Bt(h,j,ne);const Ne=ln(i,l,J,R,f);B.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g)))},Ta=t=>{Ge(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),xr(n)},Aa=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};xr(s)},Na=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=await In(t,i,M=>{const z=o[n],ne=a[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...o];return Ne[n]=Bt(z,ne,xs(J,s,M)),{blockKey:l,data:ln(i,l,Ne,R,f)}});if(!h)return;const{resolveType:j,formValue:E}=Ut(h.rule,h.projected,u??void 0);Ge(j),Fe(E),k?.()},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=Dt(M[s]?.rule,i,u),ne=cn(t),J=xs(E,s,ne),Ne=[...o];Ne[n]=Bt(h,j,J);const Q=ln(i,l,Ne,R,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);Ge(Ie),Fe(he);try{await B.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await Gt(z,be),k?.()}catch(ue){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ue))})}};if(!G&&!oe)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(G&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Re=m!==null?ce[m]??null:null,_r=m!==null?K[m]:null,kr=_r&&Re?.isMultivariate?pt(_r,Re):null,Vt=kr?Qr(kr,we,g):[],Ln=Math.min(De,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=Re?.isMultivariate===!0,ps=m!==null&&Re!==null,At=ps&&(Tt||!!(Fn&&Xe)),Pa=At&&!G&&Re?.isSavedBlock===!0,ft=G||Pa,wr=G?Us:Re?.label??"",Ba=Zt&&u?qn(Zt,u):null,jr=(t,n)=>n&&X?`${t} · ${n}`:t,Rr=Re?Re.variantOf??Re.label:"",Ka=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[jr(Rr,t)]:[Re.label,t]:[Re?.label??""]})(),hs=jr(oe?.name??"",yt?Se?.label:null),On=At&&(!G||D.length>0)?G?[Us,...D]:[hs,...Ka,...D]:[],Er=je&&oe?[oe.name,"SEO",...Ms]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Qt&&oe?[oe.name,Vr]:Lt&&oe&&Re?[hs,Rr,Vr]:[],zn=Tr.length>0?Tr:Er.length>0?Er:ft?On.length>0?On:[wr]:On.length>0?On:[hs],Ar=ps&&!Tt&&!Re?.isHidden&&!!y,Ma=ft||!G&&yt&&!!Se||Ar,Da=ps&&!Tt&&!G&&D.length===0&&!!Re&&Mo(Re)&&!!y,Fa=X&&At&&!Lt&&Tt&&D.length===0&&!!kt,Nr=X&&D.length>0?co(D[D.length-1]):null,Ia=D.length>1?co(D[D.length-2]):null,Cr=ft?wr:At?Re?.label??"":oe?.name??"",La=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):je?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?Re?.variantOf??Re?.label??"":Qt||je?oe?.name??"":Nr?Ia??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!je&&!At&&!ft,Oa=!X&&!je&&!G&&Tt&&D.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=vc(t.sections,K,u,g);if(!n)return;const{sections:s,newVariantIndex:o}=n;B.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),L(null),A(null),H(null),T([]),se(null),ee(null)},onError:B.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const o=d[y],a=o.sections;if(!a||typeof a!="object"||Array.isArray(a))return;const i=a;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=yc(i,l),R={...d,[y]:{...o,sections:f}};B.mutate({blockKey:y,data:R[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const j of h)await Gt(j,R)})()},onError:B.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),fe(s);const o=Yn(pe.map(a=>({rule:a.rule})),t,n);is(o,s),$n(a=>Yn(a,t,n))},Kr=t=>{const n=pe[t]?.rule,s=Dt(n,d??{},u??void 0);$n(o=>o.length<=1?null:(o.splice(t,1),o),()=>{pe.length-1===1?fe(0):t<te?fe(te-1):t===te&&fe(Math.max(0,t-1)),L(null),A(null),H(null),T([]),se(null),ee(null)},s)},za=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!wi(n.rule)).map(({variant:n})=>Dt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Oi({variants:n}),o=n[s];return o?[{...o,rule:zi(u)}]:null},()=>{fe(0),L(null),A(null),H(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=Xr(s,t,g),bc(s,t,g)),()=>{fe(n),L(null),A(null),H(null),T([]),se(null),ee(null)})},$a=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,o=re.current.decofile;if(!s)return;const a=o[s],i=a.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[t];if(!R?.rule||typeof R.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=R.rule,j=n.trim();en(!0);try{if(!j){if(!Jt(h,o,u)){F(null);return}const Q=h.__resolveType??"";f[t]={...R,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await B.mutateAsync({blockKey:s,data:be[s]}),await Gt(Q,be),F(null),k?.();return}const E=As(h,o,u);if(!E){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await B.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,j)}),F(null),k?.();return}const M=Jn(j),z=Qn(M,o,u);if(z){W.error(z);return}const ne=Ft(E.resolveType,E.data,j);let J=null,Ne=!1;try{const Q=await B.mutateAsync({blockKey:M,data:ne,create:!0});Ne=Un(Q),J=Ne?null:M,f[t]={...R,rule:cn(M)},await B.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}F(null),Ne||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:j})),k?.()}catch(E){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(E))})}finally{en(!1)}},Ha=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(s===null||!l)return;const h=o[s],j=a[s];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=M[t];if(!z?.rule||typeof z.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Q=>{const be={...E,variants:Q},Ie=[...o];Ie[s]=Bt(h,j,be);const he=ln(i,l,Ie,R,f);return await B.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...M];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await Gt(Ze,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await B.mutateAsync({blockKey:Q.blockKey,data:Ft(Q.resolveType,Q.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Qn(be,i,u);if(Ie){W.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,qe=!1;try{const Ze=await B.mutateAsync({blockKey:be,data:he,create:!0});qe=Un(Ze),ue=qe?null:be;const Nt=[...M];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Ze){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Ze}O(null),qe||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(Q))})}finally{en(!1)}},Dr=async(t,n,s)=>{A(s);try{await B.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},Wa={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,R=async j=>{const E={...t,variants:j};return await Dr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){W.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const M=[...i];M[n]={...l,rule:h.inlinedRule};const z=await R(M);await Gt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await B.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let j=null,E=!1;try{const M=await B.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(M),j=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await R(z),j=null}catch(M){throw j&&await Pn.mutateAsync({blockKey:j}).catch(()=>{}),M}E||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(j))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Dt(l.rule,a,u);i[n]={...l,rule:cn(s)};const R={...t,variants:i},h={...a,[o]:R};try{await Dr(o,t,R),f&&f!==s&&await Gt(f,h),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(j))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;let i=null;!await In(s,a,f=>{const R=Array.isArray(t.variants)?[...t.variants]:[],h=R[n];return h?(R[n]={...h,rule:f},i={...t,variants:R},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Ht(),g&&$t(null,-1,0)},Ir=t=>{dn(t),ds({inner:t})},Lr=t=>{An(t),ds({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Yt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},Ga=()=>{Vn(!1),Tn(!1),L(null),un(!0)},qa=()=>{je&&$r(),L(null),Vn(!0)},Ua=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(je){if(t===0){$r();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ms.slice(0,t-1)),Yt(s=>s+1);return}if(G){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(D.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(vl(zn.length,{isMultivariateSectionTop:Oa})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(Yi,{className:"size-4"})}):null,Ja=ft||At||je?Ma&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!G&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",ul),children:[r.jsx(cl,{rule:js(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(Gn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr,variant:"header"})}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Gn,{onClick:bn})]}),Qa=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsx(mo,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(dl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:ur,onRename:O,onDuplicate:Ra,onDelete:ja,onRemoveAll:dr,onReorder:Ea,onAdd:()=>Sn()}),r.jsx(mo,{children:r.jsx(ks,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Ta,onSelectGlobal:Ca,named:ms(kt?.rule,Na),namedRow:ws(kt?.rule,Wt),rule:kt?.rule,schema:Ba,formValue:Wo,onChange:Aa,formKey:`${m??"none"}:${Ln}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr=r.jsx("div",{className:le(X?"px-2":"p-2 pt-3"),children:r.jsx(Bc,{listKey:`${y??""}-${te}`,rawSections:K,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{ga(t),Je?.(t)},onReorder:va,onDelete:ya,onDuplicate:Sa,onMakeReusable:Ve,onToggleHidden:ba,onToggleLazy:rt?xa:void 0,onAddVariant:Sn,onDetach:_a,onAddSection:()=>We(!0),canAddSection:mr})}),Ya=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr}),nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Za=r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Xa=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>$o(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-accent","aria-expanded":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(qi,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr]},"editor-section-list");return r.jsx(ic,{value:g,children:r.jsx(fl,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(X||zn.length>1)&&r.jsx(Hi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ys,ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:La}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),gs&&yt&&Se&&r.jsx(po,{variants:pe,activeIndex:te,onSelect:cs,onManage:qa,onRemoveAll:za}),Fa&&r.jsx(po,{variants:Vt,activeIndex:Ln,onSelect:ur,onManage:Ua,onRemoveAll:dr}),gs&&!yt&&r.jsx(Gn,{onClick:bn}),Da&&r.jsx(Gn,{onClick:()=>Sn()}),r.jsx(ml,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Ga,children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Ja}),ut&&r.jsx(mi,{open:!0,fields:pi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>ha({...ut.choices,[t]:n}),onApply:pa},Ic(ut.formBase)),Lt?r.jsx(ho,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&D.length===0&&Hr,r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:G?Wa:void 0})})})]},"editor-section-form"):G?r.jsx(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):je?X?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Ya})},"editor-seo"):Za:Qt?r.jsx(ho,{onAdd:bn,children:Qa},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Wr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:mr,onAddSection:()=>We(!0)})})]},"editor-section-list"):Xa,r.jsx(pl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:B.isPending,onSubmit:Va}),ot&&r.jsx(ec,{open:Ae,onOpenChange:t=>{We(t),t||(Rn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:wa}),ht&&y&&d&&r.jsx(nc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(yo,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(pe[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await $a(Te,t)},onOpenChange:t=>{!t&&!Xt&&F(null)}}),tt!==null&&r.jsx(yo,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ha(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{xf as SectionsEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aY as i,X as e,l as s}from"./agent-icon-
|
|
1
|
+
import{aY as i,X as e,l as s}from"./agent-icon-BFR8_3zP.js";import{dL as n}from"./index-BKpLGEvk.js";import{a as o}from"./UserSquare-CMedzjXl.js";const r=["general","views","connections","repository","site"],a={general:{icon:s,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},views:{icon:o,titleKey:"virtualMcp.settings.views.title",descriptionKey:"virtualMcp.settings.views.description"},connections:{icon:i,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},repository:{icon:n,titleKey:"virtualMcp.settings.repository.title",descriptionKey:"virtualMcp.settings.repository.description"},site:{icon:e,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function g(t){return!!t&&r.includes(t)}export{a as P,r as a,g as i};
|