decocms 4.515.1 → 4.517.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-CHmxGMIj.js → ActiveShapeUtils-BB436TvV.js} +1 -1
- package/dist/client/assets/{AlertCircle-CUAx3A4b.js → AlertCircle-Cch634f7.js} +1 -1
- package/dist/client/assets/{AreaChart-CW0Iiw9b.js → AreaChart-CpsihjcZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BWCsylYe.js → ArrowLeft-CohopnCT.js} +1 -1
- package/dist/client/assets/{ArrowUp-EL0FBv9C.js → ArrowUp-DLUdomd9.js} +1 -1
- package/dist/client/assets/{BarChart-7G_lP-bc.js → BarChart-DC5-aC-9.js} +1 -1
- package/dist/client/assets/{Building02-PifDTlhb.js → Building02-BHJQSDUK.js} +1 -1
- package/dist/client/assets/{CartesianChart-CQlacwEw.js → CartesianChart-dMOiAgfo.js} +1 -1
- package/dist/client/assets/{CategoricalChart-QwBn7EzX.js → CategoricalChart-BCAB1JR1.js} +3 -3
- package/dist/client/assets/{CheckCircle-CMGqXocs.js → CheckCircle-Cs8i9zYt.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BSRBjpBn.js → ChevronSelectorVertical-C5d75KyY.js} +1 -1
- package/dist/client/assets/{ChevronUp-x46FJEcD.js → ChevronUp-BT7eMKPK.js} +1 -1
- package/dist/client/assets/{Copy01-OBSYmimV.js → Copy01-B341DqLV.js} +1 -1
- package/dist/client/assets/{CreditCard01-DWsSThAm.js → CreditCard01-4Fwr0tNh.js} +1 -1
- package/dist/client/assets/{DotsVertical-jkvtcdek.js → DotsVertical-DbrlDgFh.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-MNRbBKZp.js → ErrorBarContext-t45nElJh.js} +1 -1
- package/dist/client/assets/{Globe04-blkS_Kfg.js → Globe04-BE6c1UDj.js} +1 -1
- package/dist/client/assets/{Image01-BCnLFq1D.js → Image01-hTzc15CE.js} +1 -1
- package/dist/client/assets/{Key01-CG7Kua6O.js → Key01-kTu6t6u_.js} +1 -1
- package/dist/client/assets/{Link01-8aKNfNRw.js → Link01-hfA48cFL.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DcsqjBuj.js → LinkBroken01-Dioz3u9i.js} +1 -1
- package/dist/client/assets/{Minus-B38cW2ZC.js → Minus-DqDPTtRG.js} +1 -1
- package/dist/client/assets/{Monitor01-DQEkUL3d.js → Monitor01-Bz6QaUO4.js} +1 -1
- package/dist/client/assets/{Play-Ns9aRVTY.js → Play-CByslM3d.js} +1 -1
- package/dist/client/assets/{Plus-vkM1FxVr.js → Plus-Dewm72je.js} +1 -1
- package/dist/client/assets/ReferenceLine-DV9hYxt_.js +1 -0
- package/dist/client/assets/{SearchMd-Cp6J-1Iu.js → SearchMd-7Jo0ZofC.js} +1 -1
- package/dist/client/assets/{Sector-BeXkYaJv.js → Sector-D64VY8hG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-aJuRSlBz.js → ShoppingBag01-BStpgW0a.js} +1 -1
- package/dist/client/assets/{Sun-k4hypx5Q.js → Sun-C37Hpdko.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B5WFt7_0.js → SwitchHorizontal01-CrC4ThKg.js} +1 -1
- package/dist/client/assets/{Tool01-BsK9c3-e.js → Tool01-2gJDR0Ho.js} +1 -1
- package/dist/client/assets/{Trash01-Z1ezoy3S.js → Trash01-DjE7Raat.js} +1 -1
- package/dist/client/assets/{Upload01-B3-nlnKa.js → Upload01-CYfTR3aZ.js} +1 -1
- package/dist/client/assets/{User01-C2Sw39bs.js → User01-X6IeKYZH.js} +1 -1
- package/dist/client/assets/{UserSquare-BBEl_BxL.js → UserSquare-pmxb5ZdZ.js} +1 -1
- package/dist/client/assets/{Users01-DMFeioyM.js → Users01-uKJoVSle.js} +1 -1
- package/dist/client/assets/{XClose-BdwIxxCT.js → XClose-BVxVAZ6V.js} +1 -1
- package/dist/client/assets/{ZoomOut-DytgoG2i.js → ZoomOut-DixQygt2.js} +1 -1
- package/dist/client/assets/{access-gate-BUnHIPK_.js → access-gate-BpfEc6VH.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-F6QQAEZv.js → add-connection-dialog-BZwLO1Ja.js} +1 -1
- package/dist/client/assets/agent-analytics-Cb2tda3-.js +1 -0
- package/dist/client/assets/agent-app-HX00w6TV.js +1 -0
- package/dist/client/assets/agent-assets-e6Gk5J-Q.js +1 -0
- package/dist/client/assets/{agent-automation-CKRFKK95.js → agent-automation-jGwXvC8f.js} +1 -1
- package/dist/client/assets/{agent-automations-CoXmwt9k.js → agent-automations-DzW1crP1.js} +1 -1
- package/dist/client/assets/agent-calendar-DCHNIRTc.js +1 -0
- package/dist/client/assets/{agent-connect-sources-B_bS144d.js → agent-connect-sources-6bCKMOK5.js} +1 -1
- package/dist/client/assets/agent-deck-BV-5B8og.js +1 -0
- package/dist/client/assets/{agent-e2e-DC8ADnZZ.js → agent-e2e-DwASXEee.js} +1 -1
- package/dist/client/assets/agent-experiments-DetDutY3.js +1 -0
- package/dist/client/assets/agent-file-BvfhZ3mT.js +1 -0
- package/dist/client/assets/{agent-hosting-Tr8uV5DY.js → agent-hosting-BVT3wdCc.js} +1 -1
- package/dist/client/assets/{agent-icon--EtIPqub.js → agent-icon-CiKTiUdq.js} +1 -1
- package/dist/client/assets/agent-library-DSuyqe6T.js +1 -0
- package/dist/client/assets/agent-library-file-B1l2ZLvA.js +1 -0
- package/dist/client/assets/agent-monitor-C_MtaF0x.js +1 -0
- package/dist/client/assets/agent-overview-BaJQVLzH.js +1 -0
- package/dist/client/assets/agent-releases-rSbadgkl.js +2 -0
- package/dist/client/assets/agent-settings-DCjo4ZYC.js +1 -0
- package/dist/client/assets/{agent-site-editor-BML41A1E.js → agent-site-editor-DGIssniL.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-BVwfCzHc.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BU-vFmu-.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Coo-Ni4u.js +1 -0
- package/dist/client/assets/agent-view-CftHb5tC.js +1 -0
- package/dist/client/assets/{agent-view-guard-BuPewEB-.js → agent-view-guard-Cz_9FSeB.js} +1 -1
- package/dist/client/assets/{agents-list-BxOpJ6GX.js → agents-list-BehVRlw8.js} +1 -1
- package/dist/client/assets/{ai-providers-BgJW78yt.js → ai-providers-Cfzh0dop.js} +1 -1
- package/dist/client/assets/{alert-BDbwlXZm.js → alert-DlpN1nbO.js} +1 -1
- package/dist/client/assets/{alert-dialog-C-DaggA1.js → alert-dialog-BdWXpnme.js} +1 -1
- package/dist/client/assets/{analytics-sections-i9-JccxC.js → analytics-sections-CBRurMfi.js} +1 -1
- package/dist/client/assets/analytics-tab-Bu3yOSFE.js +2 -0
- package/dist/client/assets/{api-keys-CsGvnzMj.js → api-keys-SwcfBYZn.js} +1 -1
- package/dist/client/assets/api-keys-jGYtI-cW.js +1 -0
- package/dist/client/assets/app-editor-BzaLO82-.js +1 -0
- package/dist/client/assets/{asset-utils-Cb8p2lKk.js → asset-utils-CYj7sEud.js} +1 -1
- package/dist/client/assets/{auth-C_nDagDA.js → auth-DVebpHI3.js} +1 -1
- package/dist/client/assets/{auth-catchall-DLKOtnms.js → auth-catchall-CM988zgH.js} +1 -1
- package/dist/client/assets/{auth-entry-CGuqEb3C.js → auth-entry-BM6bA3ji.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CA_lMCib.js → auth-split-layout-BnlVBIeL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CpcQdSQ-.js → authenticate-and-persist-oauth-qcbNyaRp.js} +1 -1
- package/dist/client/assets/{automation-list-row-B0U8Omed.js → automation-list-row-BIlvc0v-.js} +1 -1
- package/dist/client/assets/{automation-runs-CHS-S7AU.js → automation-runs-jRApvuta.js} +1 -1
- package/dist/client/assets/{automations-BMiuIrti.js → automations-DMHgje9o.js} +1 -1
- package/dist/client/assets/{autosend-xoWUmECR.js → autosend-BTx7-p6a.js} +1 -1
- package/dist/client/assets/{avatar-DHKJiyOX.js → avatar-DjIkOwsx.js} +1 -1
- package/dist/client/assets/{badge-ux-RK1YK.js → badge-BfMggcm8.js} +1 -1
- package/dist/client/assets/{block-document-C53UA67Y.js → block-document-DKju3Lsl.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-CCLLqfhM.js → blocks-preview-workspace-context-AokvrTWO.js} +1 -1
- package/dist/client/assets/blocks-tab-states-5tpSikld.js +1 -0
- package/dist/client/assets/{blog-schema-CUXWCb3x.js → blog-schema-B8hGgOKc.js} +1 -1
- package/dist/client/assets/{buckets-KXy-OHx-.js → buckets-DzW1ArnB.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-7EW1ZAui.js → build-improve-prompt-doc-BGKe2ED3.js} +1 -1
- package/dist/client/assets/{calendar-qN6CeKGa.js → calendar-kdikRXDO.js} +1 -1
- package/dist/client/assets/campaigns-view-CXUV2H04.js +1 -0
- package/dist/client/assets/{capability-load-error-CoMXa4ni.js → capability-load-error-BuC7MxXm.js} +1 -1
- package/dist/client/assets/category-editor-jRguVRoH.js +1 -0
- package/dist/client/assets/{chart-86pPxb3F.js → chart-aHPEwhl0.js} +1 -1
- package/dist/client/assets/{chat-context-DXm8btNS.js → chat-context-BEyCIAaN.js} +2 -2
- package/dist/client/assets/{chat-draft-WGnppXw7.js → chat-draft-Dql_zG1A.js} +1 -1
- package/dist/client/assets/{checkbox-vFQy8MvV.js → checkbox-R6Pm_B33.js} +1 -1
- package/dist/client/assets/{choose-editor-Bry8-aop.js → choose-editor-C1zV1Fp9.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BM0cUkz3.js → cli-auth-success-Dw0y5N0L.js} +1 -1
- package/dist/client/assets/{client-icons-M2pakr5u.js → client-icons-C_WiAP0u.js} +1 -1
- package/dist/client/assets/cms-settings-editor-BAGntXvx.js +1 -0
- package/dist/client/assets/{collapsible-CnlVGt-G.js → collapsible-BcZaehP2.js} +1 -1
- package/dist/client/assets/{collection-detail-B_r2Oxl1.js → collection-detail-AO17C_8B.js} +1 -1
- package/dist/client/assets/{collection-display-button-ALXFDy_R.js → collection-display-button-C0cYhq66.js} +1 -1
- package/dist/client/assets/{collection-search--9d0M5sc.js → collection-search-7sBPioRN.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DyQ4WIpY.js → collection-table-wrapper-BzgZq6u7.js} +1 -1
- package/dist/client/assets/{collection-tabs-BfpnVdlQ.js → collection-tabs-DMsbicTn.js} +1 -1
- package/dist/client/assets/{column-rules-DgVqSNU2.js → column-rules-CBkHBJjn.js} +1 -1
- package/dist/client/assets/{combobox-BMxhMbUn.js → combobox-CEzxugDA.js} +1 -1
- package/dist/client/assets/{command-BlBQgQPI.js → command-KmLWWmqo.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-B3EkkVtL.js → companion-mcps-section-vJ3FRpYP.js} +1 -1
- package/dist/client/assets/{config-CE3I8pu5.js → config-0t8v4_10.js} +1 -1
- package/dist/client/assets/{connect-C4NhmEFJ.js → connect-Ceo_a42v.js} +1 -1
- package/dist/client/assets/{connect-layout-DZGJCEON.js → connect-layout-DXn91Bwy.js} +1 -1
- package/dist/client/assets/connect-source-dialog-DCA13Vr9.js +1 -0
- package/dist/client/assets/{connection-Bo3v2rj5.js → connection-BXCm7RUN.js} +1 -1
- package/dist/client/assets/{connection-card-DMfcnulT.js → connection-card-DudSxk_f.js} +1 -1
- package/dist/client/assets/{connection-detail-DxSeFIwH.js → connection-detail-Bzj7ZAYC.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-A3QfJozi.js → connection-form-helpers-BCgvOrMH.js} +1 -1
- package/dist/client/assets/{connections-DzbvhEpV.js → connections-DZsQ6PqI.js} +1 -1
- package/dist/client/assets/{content-tab-CaoAhPSw.js → content-tab-B8CAyeYn.js} +8 -8
- package/dist/client/assets/context-Dxx9Nppi.js +1 -0
- package/dist/client/assets/{context-menu-BD833dh0.js → context-menu-Bup14w-O.js} +1 -1
- package/dist/client/assets/{context-shell-D1uT0vY1.js → context-shell-YuMc6M7u.js} +3 -3
- package/dist/client/assets/{core.esm-DJ5llHMe.js → core.esm-BmE_KURk.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-nhhaUNZK.js → create-organization-dialog-oYjru5bh.js} +1 -1
- package/dist/client/assets/{daily-pulse-Cry9rVi8.js → daily-pulse-Cj6zflmn.js} +1 -1
- package/dist/client/assets/{discover-C4Up8V0-.js → discover-BsfuhgQD.js} +1 -1
- package/dist/client/assets/{domain-settings-Bec9kB9d.js → domain-settings-BCFlmNLU.js} +1 -1
- package/dist/client/assets/{drawer-0sYDH2mt.js → drawer-Bi1-udV5.js} +1 -1
- package/dist/client/assets/{editor-BctLuJLS.js → editor-DAekV0he.js} +1 -1
- package/dist/client/assets/{editor-classes-BnPaf--r.js → editor-classes-BaBC2QPU.js} +1 -1
- package/dist/client/assets/{empty-state-D6RWdvUz.js → empty-state-B4dSQMeM.js} +1 -1
- package/dist/client/assets/{empty-state-DeArX05X.js → empty-state-wXIjf_EN.js} +1 -1
- package/dist/client/assets/experiments-tab-PntzDOfu.js +1 -0
- package/dist/client/assets/{experiments-tab-choice-CMHPX5ZC.js → experiments-tab-choice-CQ5EsK8h.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CBAyhzk-.js → extract-connection-data-Bg9K46Rs.js} +1 -1
- package/dist/client/assets/{feature-gate-DQ0ZaDj1.js → feature-gate-4u7sb4lR.js} +1 -1
- package/dist/client/assets/{feature-paywall-hsFyGLR_.js → feature-paywall-BsVH1P4Z.js} +1 -1
- package/dist/client/assets/{file-explorer-GrzeifA-.js → file-explorer-CsBngoR2.js} +1 -1
- package/dist/client/assets/{file-preview-Bcawxb03.js → file-preview-CVVpAx14.js} +1 -1
- package/dist/client/assets/{file-share-button-LmGmSS33.js → file-share-button-Dh2OblA7.js} +1 -1
- package/dist/client/assets/{file-type-icon-DHFVwXjA.js → file-type-icon-DYeFNgMs.js} +1 -1
- package/dist/client/assets/{folder-icon-BwmfzM1C.js → folder-icon-CMfbCZZj.js} +1 -1
- package/dist/client/assets/{form-D4PspedZ.js → form-BGI3x6he.js} +1 -1
- package/dist/client/assets/{general-CXfgWejD.js → general-AgdwRV2K.js} +1 -1
- package/dist/client/assets/home-B3JLIiqG.js +1 -0
- package/dist/client/assets/hosted-publish-api-Cg6A3e6a.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-R86hK4rw.js +1 -0
- package/dist/client/assets/{icon-button-HZwQKD3a.js → icon-button-Du_O8eku.js} +1 -1
- package/dist/client/assets/{index-Bxkd37dZ.js → index-BEaGR-Ng.js} +1 -1
- package/dist/client/assets/{index-XzZeDzj0.js → index-BWEksKOa.js} +1 -1
- package/dist/client/assets/{index-CgVQmSg0.js → index-BXwVgYyP.js} +1 -1
- package/dist/client/assets/{index-ifZGovK1.js → index-BeWb3VLq.js} +52 -52
- package/dist/client/assets/{index-D_6gfRTQ.js → index-BflgjdLH.js} +1 -1
- package/dist/client/assets/{index-BCHFFeZZ.js → index-BliYmmPu.js} +1 -1
- package/dist/client/assets/{index-B32YFtAw.js → index-BnbMIYQC.js} +1 -1
- package/dist/client/assets/index-CEnumkKh.js +1 -0
- package/dist/client/assets/{index-BeV3dEoK.js → index-CcDpskhn.js} +2 -2
- package/dist/client/assets/{index-DNa7Epd0.js → index-CdhgpKbn.js} +1 -1
- package/dist/client/assets/{index-CafY8AgN.js → index-CkwxAoM4.js} +1 -1
- package/dist/client/assets/{index-DgfcOEet.js → index-CqX2WR0x.js} +1 -1
- package/dist/client/assets/{index-BjrJaWD9.js → index-CqllmV-p.js} +1 -1
- package/dist/client/assets/{index-gqp4B5qj.js → index-DVxNOEMj.js} +1 -1
- package/dist/client/assets/index-DjdMnw7p.css +1 -0
- package/dist/client/assets/{index-CvMuyNgv.js → index-Dw3D39xs.js} +1 -1
- package/dist/client/assets/{index-redirect-BKvfBlvA.js → index-redirect-BpERt5XK.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DvmMaiCa.js → infiniteQueryObserver-BOCgDRcQ.js} +1 -1
- package/dist/client/assets/{infra-billing-WLIR9CQb.js → infra-billing-443Q4BKf.js} +1 -1
- package/dist/client/assets/input-D1nDj3Gx.js +17 -0
- package/dist/client/assets/{input-BeDIlaby.js → input-D9vH1igB.js} +1 -1
- package/dist/client/assets/{integration-icon-D1aQLe0v.js → integration-icon-VoZokpOe.js} +1 -1
- package/dist/client/assets/{jira-icon-Bs7EGbwb.js → jira-icon-BOD4UX3O.js} +1 -1
- package/dist/client/assets/{label-Dhoh3DcI.js → label-TKhfC6jr.js} +1 -1
- package/dist/client/assets/{layout-dz9-bhT2.js → layout-OvvfNrHJ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DO-8kywe.js → legacy-agents-deep-Bj2cFPCz.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BMyuR4az.js → legacy-main-redirect-Y-IABTgs.js} +1 -1
- package/dist/client/assets/library-CEpc5ko6.js +1 -0
- package/dist/client/assets/{login-DwOQDvQC.js → login-d1G00P7v.js} +1 -1
- package/dist/client/assets/{markdown-prFeEkT4.js → markdown-D_Bab0vD.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-fHjuxWIZ.js → mcp-app-renderer-C5DYTOzS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CTJ5Iw4i.js → mcp-oauth-Bv0ymH6e.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CNKUkWMd.js → mcp-oauth-gJmjFND6.js} +1 -1
- package/dist/client/assets/{members-B9Wn7yAF.js → members-CGCmgk2j.js} +1 -1
- package/dist/client/assets/{memory-BDb7_tyh.js → memory-DjHNNPOW.js} +1 -1
- package/dist/client/assets/{mini-report-page-Bsjfan82.js → mini-report-page-BSYlfSmZ.js} +1 -1
- package/dist/client/assets/{mock-board-BWfjyR2S.js → mock-board-BCQJ9AHq.js} +3 -3
- package/dist/client/assets/{monaco-editor-Wx_2qGOP.js → monaco-editor-CVRVgXSh.js} +1 -1
- package/dist/client/assets/monitor-v8-CHgzPfyd.js +1 -0
- package/dist/client/assets/monitoring-mogv5pNr.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-THiAXYTp.js → monitoring-stats-row-BEpenrU2.js} +1 -1
- package/dist/client/assets/{multi-select-DOxlfIKk.js → multi-select-ZwwArowo.js} +1 -1
- package/dist/client/assets/{mustache-BzHjgnm5.js → mustache-B20fDMb8.js} +1 -1
- package/dist/client/assets/named-rule-uses-Bxr3PCeC.js +1 -0
- package/dist/client/assets/named-rule-view-pF5yBmDb.js +1 -0
- package/dist/client/assets/{new-project-dialog-DFsG79bb.js → new-project-dialog-DfI138Mw.js} +1 -1
- package/dist/client/assets/{oauth-callback-BekJkoCF.js → oauth-callback-C0l4AVA-.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-FtcHAH0j.js → oauth-callback-ai-provider-DlpJWGZf.js} +1 -1
- package/dist/client/assets/{onboarding-DNskGrdg.js → onboarding-DMkG4-4M.js} +1 -1
- package/dist/client/assets/openai-conversation-BcQvnIOU.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-CrYamEqL.js → optimistic-project-sidebar-views-CBzXyVUz.js} +1 -1
- package/dist/client/assets/order-monitor-day-raWLiT1v.js +1 -0
- package/dist/client/assets/{organization-choice-zGI39_sg.js → organization-choice-CSBUJWem.js} +1 -1
- package/dist/client/assets/{orgs-BjIQy8J3.js → orgs-DYr5Iir2.js} +1 -1
- package/dist/client/assets/{page-seo-form-CrgZFHtq.js → page-seo-form-C0_Mzxj0.js} +1 -1
- package/dist/client/assets/{pair-Ck7rgrik.js → pair-v8_ULhan.js} +7 -7
- package/dist/client/assets/parse-sections-CigeyiXV.js +1 -0
- package/dist/client/assets/plan-BYiUi2-G.js +1 -0
- package/dist/client/assets/{plan-ladder-BKLU8eo8.js → plan-ladder-CtR99jrd.js} +1 -1
- package/dist/client/assets/{popover-DaReiQzV.js → popover-s88DXvPL.js} +1 -1
- package/dist/client/assets/post-calendar-DbUDJn5r.js +1 -0
- package/dist/client/assets/{post-editor-CRy0VAcT.js → post-editor-CdhtoksR.js} +2 -2
- package/dist/client/assets/{preview-content-DJOuEciL.js → preview-content-BNZ95rhM.js} +1 -1
- package/dist/client/assets/{preview-dialog-CnlKftcv.js → preview-dialog-BZcvH5f1.js} +1 -1
- package/dist/client/assets/{preview-panel-C2Athpf5.js → preview-panel-CjWzxG-O.js} +1 -1
- package/dist/client/assets/{preview-tab-CzS9kIxI.js → preview-tab-ztwq5J9Z.js} +4 -4
- package/dist/client/assets/product-picker-dialog-CecFCJox.js +1 -0
- package/dist/client/assets/{profile-DAF3l5cg.js → profile-Bo384oXV.js} +1 -1
- package/dist/client/assets/project-app-view-C-JC6Lnp.js +1 -0
- package/dist/client/assets/{project-apps-CG2eY1ZZ.js → project-apps-BQ30Q_BX.js} +1 -1
- package/dist/client/assets/{project-feed-K24c6-Xx.js → project-feed--d7Txdh1.js} +1 -1
- package/dist/client/assets/{project-icon-ZadU5ZjL.js → project-icon-Ds8VtVRG.js} +1 -1
- package/dist/client/assets/project-reports-BRMk8sbv.js +1 -0
- package/dist/client/assets/project-tasks-DPFfk-Co.js +1 -0
- package/dist/client/assets/{projects-BWrIdbSy.js → projects-BN_UNvg1.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BWAilN1f.js → projects-empty-state-CmS_yrG7.js} +1 -1
- package/dist/client/assets/{prompts-DKnoRB34.js → prompts-g_Bby1s0.js} +1 -1
- package/dist/client/assets/record-editor-CmI7uwKH.js +1 -0
- package/dist/client/assets/redirect-editor-CBEbRvVY.js +1 -0
- package/dist/client/assets/releases-api-DbKlRR9w.js +1 -0
- package/dist/client/assets/reports-BKtNuFy0.js +1 -0
- package/dist/client/assets/{reports-Bg1fi6kR.js → reports-Bgmc-lqT.js} +1 -1
- package/dist/client/assets/{reports-onboarding-acV5ZZpQ.js → reports-onboarding-D6-A2sL7.js} +1 -1
- package/dist/client/assets/reports-tab-B_Sk2TLl.js +2 -0
- package/dist/client/assets/repositories-C2vwcNjc.js +1 -0
- package/dist/client/assets/repositories-CszhODTX.js +1 -0
- package/dist/client/assets/{repository-binding-DtIeSvDY.js → repository-binding-Cf_thK-b.js} +1 -1
- package/dist/client/assets/{repository-import-picker-C2sQ94O1.js → repository-import-picker-BOku3VrR.js} +1 -1
- package/dist/client/assets/repository-picker-CeCsQGv8.js +1 -0
- package/dist/client/assets/{require-capability-DAfCGgHW.js → require-capability-DC_q9Xad.js} +1 -1
- package/dist/client/assets/{required-auth-layout-4jyUcmCy.js → required-auth-layout-DhxdstQv.js} +1 -1
- package/dist/client/assets/{reset-password-BGjvzv1z.js → reset-password-BCS7WVZ6.js} +1 -1
- package/dist/client/assets/{resizable-CQyxQjcn.js → resizable-BySAwPSW.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-56O81FJc.js → resolve-tab-icon-B7CsMGsC.js} +1 -1
- package/dist/client/assets/{review-settings-CWih3HF4.js → review-settings-DtZi6zHg.js} +1 -1
- package/dist/client/assets/{roles-BRkp9ar3.js → roles-CGYNn4dv.js} +1 -1
- package/dist/client/assets/route-ChD1cXkH.js +1 -0
- package/dist/client/assets/route-ChLLCXC9.js +1 -0
- package/dist/client/assets/route-_su_B2um.js +1 -0
- package/dist/client/assets/{runnable-block-editor-CqYgijVY.js → runnable-block-editor-Bod17qTV.js} +7 -7
- package/dist/client/assets/sandbox-lifecycle-context-CCjKxqdS.js +1 -0
- package/dist/client/assets/{schema-Dvc5tPTN.js → schema-ClGCzPdy.js} +1 -1
- package/dist/client/assets/{schema-Cn4x5iT-.js → schema-b5uziS6S.js} +1 -1
- package/dist/client/assets/{scroll-area-9wUBmncr.js → scroll-area-BVZXqx5M.js} +1 -1
- package/dist/client/assets/{search-input-1DLvCYgl.js → search-input-BL6XGlmm.js} +1 -1
- package/dist/client/assets/{search-toggle-BnK2KHqJ.js → search-toggle-IRNGzCzn.js} +1 -1
- package/dist/client/assets/secret-ciphertext-CKG2rzpX.js +1 -0
- package/dist/client/assets/{secret-picker-B4zI9e3W.js → secret-picker-NNIqKwTx.js} +1 -1
- package/dist/client/assets/{secrets-C2PS9_a9.js → secrets-BLs8g0Qc.js} +1 -1
- package/dist/client/assets/{sections-DX6pY_bs.js → sections-Dw8sSpTv.js} +1 -1
- package/dist/client/assets/sections-editor-IbsR8YsO.js +4 -0
- package/dist/client/assets/{select-DUEGSJco.js → select-H4FJk0rp.js} +1 -1
- package/dist/client/assets/{select-model-mFyCcf-O.js → select-model-VSltfcKe.js} +1 -1
- package/dist/client/assets/seo-editor-DJxK0wxd.js +1 -0
- package/dist/client/assets/{separator-Bk_a4cod.js → separator-l8ktDBQ-.js} +1 -1
- package/dist/client/assets/settings-tab-D08h17sS.js +1 -0
- package/dist/client/assets/{sheet-Dhe0uPV2.js → sheet-DdrzSnyB.js} +1 -1
- package/dist/client/assets/{shell-layout-U7D4A6nk.js → shell-layout-Dpds4_um.js} +1 -1
- package/dist/client/assets/{site-draft-actions-Dpnw67Ug.js → site-draft-actions-B1VIigls.js} +6 -6
- package/dist/client/assets/site-draft-view-BvQXujRd.js +2 -0
- package/dist/client/assets/site-editor-B8qpeTpl.js +1 -0
- package/dist/client/assets/site-editor-toast-C48kJZ8y.js +1 -0
- package/dist/client/assets/{skills-DghKPwKw.js → skills-F7XSMMWV.js} +1 -1
- package/dist/client/assets/{slider-CLUaEqdg.js → slider-tSRa1HDF.js} +1 -1
- package/dist/client/assets/{sortable.esm-CkqHW6-y.js → sortable.esm-CE2eXOQU.js} +1 -1
- package/dist/client/assets/{sso-DGFWPeza.js → sso-B_KsCvoW.js} +1 -1
- package/dist/client/assets/{suggestion-BNEVVm5c.js → suggestion-Bu3BweEe.js} +1 -1
- package/dist/client/assets/{switch-ByCU93P4.js → switch-BI2l0q9a.js} +1 -1
- package/dist/client/assets/{symbol-BQLM2_V8.js → symbol-CW0bfPL3.js} +1 -1
- package/dist/client/assets/{synced-repos-CjPrTUpI.js → synced-repos-BXQtYjtL.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Cz_BoFAU.js → tab-icon-glyph-B_hAV_wB.js} +1 -1
- package/dist/client/assets/{table-Tw2gCVXe.js → table-BI-3H0Nx.js} +1 -1
- package/dist/client/assets/{tabs-C7f3nqQx.js → tabs-Cw5epDK7.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-BiPanmNM.js → task-assignee-avatar-B4jYRjC8.js} +1 -1
- package/dist/client/assets/{task-board-BrTYr-oE.js → task-board-ByNQwZsl.js} +1 -1
- package/dist/client/assets/{task-route-BLP-DBaS.js → task-route-B8oSJFnj.js} +1 -1
- package/dist/client/assets/{task-status-CVpsP3bD.js → task-status-GAY2L2Vz.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CQMw4wzL.js → taskboard-analytics-MtxZahkF.js} +1 -1
- package/dist/client/assets/{tasks-CtPgnGlW.js → tasks-CaRFrr2H.js} +1 -1
- package/dist/client/assets/tasks-Zus8qgLK.js +1 -0
- package/dist/client/assets/{textarea-Bbbnnl4r.js → textarea-7I-DLD6x.js} +1 -1
- package/dist/client/assets/{thread-analytics-CtQHMk9N.js → thread-analytics-BhyMnytl.js} +1 -1
- package/dist/client/assets/{thread-intent-7GmQH5mt.js → thread-intent-CoB1rbzj.js} +2 -2
- package/dist/client/assets/{thread-route-C7RSGMhP.js → thread-route-BPSSuk8V.js} +1 -1
- package/dist/client/assets/{thread-route-DpLeB4i0.js → thread-route-Bjcqwe4C.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-dWggSd-b.js → thread-sheet-body-DyDxpawL.js} +1 -1
- package/dist/client/assets/{time-range-picker-BVXe-Owx.js → time-range-picker-DJ-TaM2M.js} +1 -1
- package/dist/client/assets/{toggle-group-CXUKmPFr.js → toggle-group-BngkTNsG.js} +1 -1
- package/dist/client/assets/{tool-namespace-DIE_8J9o.js → tool-namespace-DePiqr-m.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DzJeqLa2.js → toolbar-icon-button-DKjsnGdZ.js} +1 -1
- package/dist/client/assets/{tooltip-gMeEuHtO.js → tooltip-4vv5k-uR.js} +1 -1
- package/dist/client/assets/{tooltipContext-BQS7kWxi.js → tooltipContext-B3bWUtmi.js} +1 -1
- package/dist/client/assets/{track-DdeuRUoM.js → track-C0wfSYRO.js} +1 -1
- package/dist/client/assets/{types-CHFSNT7a.js → types-CNU-uWw-.js} +1 -1
- package/dist/client/assets/{url-slug-D37s8EDd.js → url-slug-DU3tFMUC.js} +1 -1
- package/dist/client/assets/{usage-stats-BecGIkLk.js → usage-stats-CKpL0uWf.js} +2 -2
- package/dist/client/assets/{use-ai-providers-CAt_9H4n.js → use-ai-providers-Ct47MIru.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-R20A_NaL.js +1 -0
- package/dist/client/assets/{use-automations-C6LbyvJD.js → use-automations-Ho0ayZT_.js} +1 -1
- package/dist/client/assets/{use-autosave-e9CI9oFB.js → use-autosave-DzNsVsl3.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-24wCHq_-.js → use-chat-layout-state-CWI-mwQI.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DflKMAWl.js → use-clock-tick-DE4s8Okz.js} +1 -1
- package/dist/client/assets/{use-connect-companion-3OWtftC8.js → use-connect-companion-Dmdscsai.js} +1 -1
- package/dist/client/assets/{use-connection-CBKH8IwL.js → use-connection-HenJjVMr.js} +1 -1
- package/dist/client/assets/use-content-sync-C0CqYtRD.js +1 -0
- package/dist/client/assets/{use-copy-Cn8Org7G.js → use-copy-C4LbXPXl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-jW1iVRi_.js → use-create-virtual-mcp-dBeQ8KM_.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DTRxIyi4.js → use-date-fns-locale-DBqQ9Xwt.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DDaoW-uw.js → use-debounced-autosave-B_kpX8YN.js} +1 -1
- package/dist/client/assets/{use-debounced-value-c5JdkW89.js → use-debounced-value-Br6JzfN-.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D8w-JIDW.js → use-deco-credits-DhL8Ql0T.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Cp8NaBPU.js → use-decopilot-events-CuBncVze.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BJIObh7l.js → use-delete-connection-DuErB0IF.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D7XKR1Dx.js → use-deployment-admin-BOXhbvir.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-BPrZ2XMf.js +1 -0
- package/dist/client/assets/{use-file-configs-DW0hmZjE.js → use-file-configs-B_k4AoEo.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DOpe-XBh.js → use-inbox-feed-D96kN3Ph.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Cuyf7850.js → use-infinite-scroll-Ba0Xf9MO.js} +1 -1
- package/dist/client/assets/{use-join-requests-CBahVlKF.js → use-join-requests-DNpCy_xv.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-BndsHuRH.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-Cs8ZHHaN.js → use-mcp-auth-status-BOQ5PtOH.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D1kFCZ4v.js → use-mcp-client-2WkK0AxE.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-wKDmQlGB.js → use-mcp-prompts-BY0itm-N.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-I-kpM305.js → use-mcp-tools-Wkfd46Rr.js} +1 -1
- package/dist/client/assets/{use-members-0ZBHc0S5.js → use-members-Cl1_-fx1.js} +1 -1
- package/dist/client/assets/{use-mobile-CKoO3XSk.js → use-mobile-BAnIvR27.js} +1 -1
- package/dist/client/assets/use-move-blocks-lN8kagdi.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-DLX1nkvn.js → use-navigate-to-agent-C2NQ-36B.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-C5lEsbaH.js → use-open-billing-url-Bewtr0D-.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-t4l-TKT1.js → use-org-auth-client-vWdVrvgR.js} +1 -1
- package/dist/client/assets/{use-org-fs-49a1bhbu.js → use-org-fs-CxjQMzFd.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BunA5GFg.js → use-org-repo-syncs-dRJpc7Ti.js} +1 -1
- package/dist/client/assets/{use-org-sso-B_zXOLDA.js → use-org-sso-BnFa9r-G.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Bc45ILhm.js → use-organization-roles-D9hV-WPT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-laAOR3Cm.js → use-organization-settings-CE5BJyh9.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Bghh8kV3.js → use-panel-navigate-CXkMPISv.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-C3Vtd78t.js → use-project-native-view-presence-D4-BL2Rg.js} +1 -1
- package/dist/client/assets/{use-project-scope-DH5nL_oD.js → use-project-scope-BOj2O9A_.js} +1 -1
- package/dist/client/assets/{use-recent-apps-D6yVH6-8.js → use-recent-apps-Cj-iBJUa.js} +1 -1
- package/dist/client/assets/{use-releases-G0pirYfu.js → use-releases-2-Z6BMdW.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BKJYEIJX.js → use-reports-diagnostic-D--oIp45.js} +1 -1
- package/dist/client/assets/use-sandbox-events-BVhJrX2Z.js +2 -0
- package/dist/client/assets/{use-secrets-DszBqpzD.js → use-secrets-CQ9dfY46.js} +1 -1
- package/dist/client/assets/use-section-preview-base-CrcAXE9z.js +1 -0
- package/dist/client/assets/use-session-runtime-CqJF6neP.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-CuPY8XXm.js → use-sidebar-collapsed-NZNztmvG.js} +1 -1
- package/dist/client/assets/{use-tags-BsXvHuTC.js → use-tags-BG7cxCCb.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BtNGPBbp.js → use-task-board-analytics-BhvhSxL9.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BARWSwfj.js → use-task-board-events-CtQgceab.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BhAhDKGd.js → use-task-board-item-prs-Dp099nXL.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Dd-9Qkoq.js → use-task-metadata-BBoC1uvX.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-B9Rm3t_E.js → use-thread-analytics-g0_FCkSl.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CoFWg3_v.js → use-thread-outputs-C38yfNsJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CxzyY6DS.js +1 -0
- package/dist/client/assets/{useQueries-_Urb_S-y.js → useQueries-DSs3oNbf.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CWvS_hOW.js +1 -0
- package/dist/client/assets/{users-BXTFPRVd.js → users-BAyRTNUi.js} +1 -1
- package/dist/client/assets/{utils-CduIoZ0d.js → utils-t1gjPfET.js} +1 -1
- package/dist/client/assets/{variant-calendar-D0iLcmjF.js → variant-calendar-BYITnHO8.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-HWAlFj6Z.js → variant-draft-pointer-Cjn_TXkR.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Xd6PvE5_.js → virtual-mcp-cTWrWR4Y.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BoG6Bqps.js → watch-sse-pool-C9NPGTmI.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/migrate.js +214 -209
- package/dist/server/server.js +633 -633
- package/package.json +1 -1
- package/dist/client/assets/ReferenceLine-CJq91vhq.js +0 -1
- package/dist/client/assets/agent-analytics-2BuaXhJ4.js +0 -2
- package/dist/client/assets/agent-app-DW_869sy.js +0 -1
- package/dist/client/assets/agent-assets-CPVwuId5.js +0 -1
- package/dist/client/assets/agent-calendar-CV9Ef0wP.js +0 -1
- package/dist/client/assets/agent-deck-OUciFfON.js +0 -1
- package/dist/client/assets/agent-experiments-BwjYQ0V4.js +0 -1
- package/dist/client/assets/agent-file-CStNgNPQ.js +0 -1
- package/dist/client/assets/agent-library-Bf2YaEvb.js +0 -1
- package/dist/client/assets/agent-library-file-DAttgEac.js +0 -1
- package/dist/client/assets/agent-monitor-DIe6BVqe.js +0 -1
- package/dist/client/assets/agent-overview-popLuSBk.js +0 -1
- package/dist/client/assets/agent-releases-CZVpd2dN.js +0 -2
- package/dist/client/assets/agent-settings-C6L22aS3.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Dnn-bhoB.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Bt6vrV5b.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-q3wCu8-N.js +0 -1
- package/dist/client/assets/agent-view-B1o861lr.js +0 -1
- package/dist/client/assets/api-keys-DfU9uedt.js +0 -1
- package/dist/client/assets/app-editor-Cq-B0QFL.js +0 -1
- package/dist/client/assets/blocks-tab-states-Chq5j0oT.js +0 -1
- package/dist/client/assets/campaigns-view-CwEmfYeP.js +0 -1
- package/dist/client/assets/category-editor-C-13e8GC.js +0 -1
- package/dist/client/assets/cms-settings-editor-CHoKFct5.js +0 -1
- package/dist/client/assets/coming-soon-page-6F4aAL8E.js +0 -1
- package/dist/client/assets/context-0XuHSild.js +0 -1
- package/dist/client/assets/home-DkYJf0RN.js +0 -1
- package/dist/client/assets/hosted-publish-api-CK3ZnEoi.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-BG4t8HgW.js +0 -1
- package/dist/client/assets/index-EoMx4WDO.css +0 -1
- package/dist/client/assets/index-j4NUsiRT.js +0 -2
- package/dist/client/assets/input-DIcILgWd.js +0 -17
- package/dist/client/assets/library-BQ9URfiH.js +0 -1
- package/dist/client/assets/monitoring-BmpcQtwP.js +0 -1
- package/dist/client/assets/named-rule-uses-Mu_Msc9v.js +0 -1
- package/dist/client/assets/named-rule-view-CN2yeHp5.js +0 -1
- package/dist/client/assets/openai-conversation-_LIGb37e.js +0 -3
- package/dist/client/assets/order-monitor-day-DLFR-weA.js +0 -1
- package/dist/client/assets/parse-sections-YhOUxu7l.js +0 -1
- package/dist/client/assets/plan-Iixr6Ywe.js +0 -1
- package/dist/client/assets/post-calendar--v0MjZPE.js +0 -1
- package/dist/client/assets/product-picker-dialog-oD9OPZfl.js +0 -1
- package/dist/client/assets/project-app-view-CZXBsQ0a.js +0 -1
- package/dist/client/assets/project-reports-Crv9B-vM.js +0 -1
- package/dist/client/assets/project-tasks-Cz-57jQh.js +0 -1
- package/dist/client/assets/record-editor-d52mwz1n.js +0 -1
- package/dist/client/assets/redirect-editor-C-WKtN9s.js +0 -1
- package/dist/client/assets/releases-api-q3AffL1J.js +0 -1
- package/dist/client/assets/reports-B3miutne.js +0 -1
- package/dist/client/assets/reports-tab-Clf7FxSU.js +0 -2
- package/dist/client/assets/repositories-CxdgYwWQ.js +0 -1
- package/dist/client/assets/repositories-D42Ai47E.js +0 -1
- package/dist/client/assets/repository-picker-BXaWFfDW.js +0 -1
- package/dist/client/assets/route-4SgoFvu0.js +0 -1
- package/dist/client/assets/route-BEESJELS.js +0 -1
- package/dist/client/assets/route-D6eBZFy3.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-DdMgF1Lv.js +0 -1
- package/dist/client/assets/sections-editor-DD9uWqQ8.js +0 -4
- package/dist/client/assets/seo-editor-Bf-sfYSP.js +0 -1
- package/dist/client/assets/settings-tab-DpQMA4J6.js +0 -1
- package/dist/client/assets/site-draft-view-Cho80MC6.js +0 -2
- package/dist/client/assets/site-editor-34XlqmyW.js +0 -1
- package/dist/client/assets/tasks-C_346UtB.js +0 -1
- package/dist/client/assets/use-apply-named-rule-B_CXDUdG.js +0 -1
- package/dist/client/assets/use-content-sync-D_qyLHCv.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-CSz1rYUo.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CVsgtXg7.js +0 -1
- package/dist/client/assets/use-move-blocks-Dm4etxGk.js +0 -1
- package/dist/client/assets/use-section-preview-base-BASvFHv_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-wCORGPw3.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-JvpRoEFG.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as P,r as i,dI as ie,dG as ce,c as le,e as de,db as j,a2 as fe,J as Se,j as me}from"./index-BeWb3VLq.js";import{u as pe}from"./use-mcp-client-2WkK0AxE.js";import{u as ye}from"./use-session-runtime-CqJF6neP.js";import{c as Ee,u as he}from"./chat-context-BEyCIAaN.js";import{u as Re}from"./thread-intent-CoB1rbzj.js";import{e as xe}from"./backoff-CrEUbyZT.js";import{u as we}from"./use-sandbox-events-BVhJrX2Z.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function X(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=X(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(u=>n.subscribe(()=>{const a=ie(s.current,X(n,r.current));s.current!==a&&(s.current=a,ce.schedule(u))}),[n]),()=>s.current,()=>s.current)}async function Ce(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const q=["SANDBOX_START"],w=new Map,be=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),U=new Set,g={mark:(e,t)=>U.add(`${e}::${t}`),clear:(e,t)=>U.delete(`${e}::${t}`),isStopped:(e,t)=>U.has(`${e}::${t}`)};function _e(e,t){const n=P();return de({mutationKey:q,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>xe(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=be(r),u=w.get(s);if(u)return u;const a=(async()=>(await Ce(e,"SANDBOX_START",r)).structuredContent)();w.set(s,a);try{return await a}finally{w.get(s)===a&&w.delete(s)}},onSuccess:()=>{j(n),t?.onStarted?.()}})}function Ge(e,t){const n=le.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:q,predicate:u=>{if(!e)return!1;const a=u.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function ge(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function Me(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function De(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function We(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,u=e.ownerId??r;if(!r||!u||!s)return t;const a=n?.[u]?.[s];return a?{...t??{},[r]:{...t?.[r]??{},[s]:a}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Y=2,Le=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function J(e){return Le.has(e)}function Oe(e){return e.executionEnabled&&e.failedReason!==null&&J(e.failedReason)&&e.attempts<Y&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const $e={branch:null,count:0,handled:!1};function Be(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Ve(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function Q(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:Q(n,t.branch??r),url:t.previewUrl})}const Ie={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},G=i.createContext(Ie);function ze(){return i.use(G)}function Ze({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:u,threadId:a,children:D}){const{org:L}=fe(),{setCurrentTaskBranch:l}=Ee(),M=Re(),p=we(),W=P(),O=ye(t),z=O.resolved?O.runtime:null,d=he()?.taskId??null,$=pe({connectionId:Se,orgId:L.id,orgSlug:L.slug}),c=_e($,{onStarted:()=>{a&&M?.refreshThreadMetadata(a)}}),{mutate:f,reset:Z}=c,[ee,S]=i.useState(null),C=i.useRef(new Set),b=i.useRef(null),[B,R]=i.useState($e),E=Be(B,n);E!==B&&R(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:u,seeded:y?null:ee,key:Q(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),te=p.status.state==="paused",ne=!y||!J(y.reason)||E.count>=Y,re=Ve({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:ne}),F=Ue({previewUrl:V,appPaused:te,userStopped:h,startError:re}),se=Fe(F),k=n??"",oe=C.current.has(k),v=ge({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:u,userStopped:h,isPending:c.isPending,attempted:oe,sessionRuntime:z});i.useEffect(()=>{if(!v||!t)return;C.current.add(k);const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] auto-start failed:",o)}})},[v,k,n,t,d,f,l,S]);const x=p.notFound?u?.sandboxHandle??null:null,I=De({executionEnabled:e,notFound:p.notFound,deadVmId:x,lastDeadVmId:b.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!I||!x||!t)return;b.current=x;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] self-heal failed:",o)}})},[I,x,t,n,d,f,l,S]);const N=Oe({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){R(o=>o.handled?{...o,handled:!1}:o);return}if(!N||!t)return;R(o=>({...o,handled:!0,count:o.count+1}));const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",o)}})},[y,N,t,n,d,f,l,S]);const _=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] user start failed:",o)}})},K=async()=>{if(!(!e||!t||!n)&&u){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}j(W)}},ae=async()=>{await K(),_()},H=()=>{C.current=new Set,b.current=null,R({branch:n,count:0,handled:!1}),Z(),_()},ue={branch:n,previewState:F,status:se,vmEntry:u,previewUrl:V,userStopped:h,start:_,stop:K,restart:ae,retry:H,resume:H};return me.jsx(G,{value:ue,children:D})}export{Ze as S,ze as a,_e as b,We as o,Me as s,Ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as r,cZ as p,cX as _,aG as n,bW as o,bV as m}from"./index-
|
|
1
|
+
import{aF as r,cZ as p,cX as _,aG as n,bW as o,bV as m}from"./index-BeWb3VLq.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{aF as s,bU as e,aG as a,bV as d,bW as l}from"./index-
|
|
1
|
+
import{aF as s,bU as e,aG as a,bV as d,bW as l}from"./index-BeWb3VLq.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."),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, the npm dependency and the registry entry into the project's repository, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default, for every org — the catalogue stays browsable without it and nothing is installable. Rollout lever, separate from the deploy."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks 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. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(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,m as a,c as b,g as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,bA as A,bw as ce,j as b,bC as _,bP as ae,dp as O,bD as C,bJ as P,bE as ie,c as F,l as $}from"./index-ifZGovK1.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),J=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,D]=d.useState(0),[j,y]=d.useState(!1),[N,W]=d.useState(!1),m=A(e,E=>c(E)),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:j,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:D,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}})})});J.displayName=U;var G="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(G,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=G;var g="ScrollAreaScrollbar",Q=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(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=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(Z,{"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"))})})}),Z=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 R(o.viewport,c),R(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=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),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=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[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,T]=d.useState(null),Y=A(e,m=>T(m)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,D=l.content-l.viewport,j=P(i),y=P(c),N=X(h,10);function W(m){if(x.current){const p=m.clientX-x.current.left,E=m.clientY-x.current.top;u({x:p,y:E})}}return d.useEffect(()=>{const m=p=>{const E=p.target;w?.contains(E)&&j(p,D)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,D,j]),d.useEffect(y,[l,y]),R(w,N),R(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=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=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 R(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),R(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 R(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=J,Ce=K,Ee=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(Re,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Ee,{}),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 Re(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
1
|
+
import{r as d,bA as A,bw as ce,j as b,bC as _,bP as ae,dp as O,bD as C,bJ as P,bE as ie,c as F,l as $}from"./index-BeWb3VLq.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),J=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,D]=d.useState(0),[j,y]=d.useState(!1),[N,W]=d.useState(!1),m=A(e,E=>c(E)),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:j,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:D,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}})})});J.displayName=U;var G="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=v(G,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=G;var g="ScrollAreaScrollbar",Q=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(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=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(Z,{"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"))})})}),Z=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 R(o.viewport,c),R(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=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),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=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[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,T]=d.useState(null),Y=A(e,m=>T(m)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,D=l.content-l.viewport,j=P(i),y=P(c),N=X(h,10);function W(m){if(x.current){const p=m.clientX-x.current.left,E=m.clientY-x.current.top;u({x:p,y:E})}}return d.useEffect(()=>{const m=p=>{const E=p.target;w?.contains(E)&&j(p,D)};return document.addEventListener("wheel",m,{passive:!1}),()=>document.removeEventListener("wheel",m,{passive:!1})},[M,w,D,j]),d.useEffect(y,[l,y]),R(w,N),R(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=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=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 R(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),R(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 R(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=J,Ce=K,Ee=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(Re,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Ee,{}),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 Re(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as a,bn as j,h as I,bo as S,bp as b}from"./index-
|
|
1
|
+
import{c as f,j as a,bn as j,h as I,bo as S,bp as b}from"./index-BeWb3VLq.js";import{i as g}from"./SearchMd-7Jo0ZofC.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,l as B,j as a,aU as M}from"./index-
|
|
1
|
+
import{c as K,r as C,l as B,j as a,aU as M}from"./index-BeWb3VLq.js";import{i as I}from"./SearchMd-7Jo0ZofC.js";import{I as O}from"./icon-button-Du_O8eku.js";function A(S){const e=K.c(34),{value:t,onChange:l,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 s,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>p(!0),g=a.jsx(I,{}),e[0]=s,e[1]=g):(s=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"outline",onClick:s,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]!==l?(r=s=>l(s.target.value),e[8]=l,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]!==l?(c=s=>{s.key==="Escape"&&l("")},e[13]=l,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]!==l||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":_,onMouseDown:P,onClick:()=>{l(""),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]=l,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{A as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as S,b as j,j as i,r as C,af as A,B as E,l as R,a5 as w}from"./index-BeWb3VLq.js";import{a as T}from"./Copy01-B341DqLV.js";import{a as N,b as k,A as L}from"./alert-DlpN1nbO.js";import{u as O}from"./use-copy-C4LbXPXl.js";import{a3 as $,aF as B}from"./parse-sections-CigeyiXV.js";const y="https://docs.decocms.com/storefront/blocks",D={quickstart:`${y}/next/quickstart`,siteEditor:`${y}/next/site-editor#edit-on-your-machine`,serve:`${y}/next/cli#deco-serve`,schema:`${y}/next/cli#deco-schema-and-deco-content`,troubleshooting:`${y}/next/troubleshooting#site-editor`};function Q(t){const e=S.c(4),{text:s}=t;let n;e[0]!==s?(n=s.split("`").map(P),e[0]=s,e[1]=n):n=e[1];let r;return e[2]!==n?(r=i.jsx(i.Fragment,{children:n}),e[2]=n,e[3]=r):r=e[3],r}function P(t,e){return e%2===1?i.jsx("code",{className:"whitespace-nowrap rounded bg-muted px-1 py-px font-mono text-[0.85em] text-foreground",children:t},e):i.jsx(C.Fragment,{children:t},e)}function ee(t){const e=S.c(31),{command:s}=t,n=j(),{handleCopy:r,copied:o}=O();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("span",{"aria-hidden":"true",className:"select-none text-muted-foreground",children:["$"," "]}),e[0]=a):a=e[0];let c;e[1]!==s?(c=s.split(" ").map(I),e[1]=s,e[2]=c):c=e[2];let l;e[3]!==c?(l=i.jsxs("code",{className:"min-w-0 flex-1 overflow-x-auto py-1.5 font-mono text-xs leading-5 text-foreground",children:[a,c]}),e[3]=c,e[4]=l):l=e[4];let d;e[5]!==n?(d=n("decoServe.guide.copy"),e[5]=n,e[6]=d):d=e[6];let f;e[7]!==s||e[8]!==r?(f=()=>{r(s).catch(F)},e[7]=s,e[8]=r,e[9]=f):f=e[9];let u;e[10]!==o?(u=o?i.jsx(A,{className:"text-success"}):i.jsx(T,{}),e[10]=o,e[11]=u):u=e[11];let p;e[12]!==o||e[13]!==n?(p=n(o?"decoServe.guide.copied":"decoServe.guide.copyShort"),e[12]=o,e[13]=n,e[14]=p):p=e[14];let m;e[15]!==p?(m=i.jsx("span",{"aria-hidden":"true",children:p}),e[15]=p,e[16]=m):m=e[16];let g;e[17]!==d||e[18]!==f||e[19]!==u||e[20]!==m?(g=i.jsxs(E,{type:"button",variant:"ghost",size:"sm",className:"shrink-0 self-start","aria-label":d,onClick:f,children:[u,m]}),e[17]=d,e[18]=f,e[19]=u,e[20]=m,e[21]=g):g=e[21];let h;e[22]!==o||e[23]!==n?(h=o?n("decoServe.guide.copiedAnnouncement"):"",e[22]=o,e[23]=n,e[24]=h):h=e[24];let v;e[25]!==h?(v=i.jsx("span",{className:"sr-only","aria-live":"polite",children:h}),e[25]=h,e[26]=v):v=e[26];let x;return e[27]!==v||e[28]!==l||e[29]!==g?(x=i.jsxs("div",{className:"flex items-center gap-1 rounded-lg border border-border bg-muted/60 py-1 pr-1 pl-3",children:[l,g,v]}),e[27]=v,e[28]=l,e[29]=g,e[30]=x):x=e[30],x}function F(){}function I(t,e){return i.jsxs(C.Fragment,{children:[e>0&&" ",i.jsx("span",{className:"whitespace-nowrap",children:t})]},e)}const Y={quickstart:"decoServe.docs.quickstart",siteEditor:"decoServe.docs.siteEditor",serve:"decoServe.docs.serve",schema:"decoServe.docs.schema",troubleshooting:"decoServe.docs.troubleshooting"};function te(t){const e=S.c(20),{links:s,className:n}=t,r=j();let o;e[0]!==r?(o=r("decoServe.docs.heading"),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n?(a=R("flex flex-col gap-2 text-sm",n),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==r?(c=r("decoServe.docs.heading"),e[4]=r,e[5]=c):c=e[5];let l;e[6]!==c?(l=i.jsx("span",{className:"text-muted-foreground",children:c}),e[6]=c,e[7]=l):l=e[7];let d;if(e[8]!==s||e[9]!==r){let p;e[11]!==r?(p=m=>i.jsxs("a",{href:D[m],target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-foreground underline-offset-4 hover:underline focus-visible:underline",children:[r(Y[m]),i.jsx(w,{"aria-hidden":"true",className:"size-3.5"}),i.jsx("span",{className:"sr-only",children:r("decoServe.docs.newTab")})]},m),e[11]=r,e[12]=p):p=e[12],d=s.map(p),e[8]=s,e[9]=r,e[10]=d}else d=e[10];let f;e[13]!==d?(f=i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:d}),e[13]=d,e[14]=f):f=e[14];let u;return e[15]!==o||e[16]!==a||e[17]!==l||e[18]!==f?(u=i.jsxs("nav",{"aria-label":o,className:a,children:[l,f]}),e[15]=o,e[16]=a,e[17]=l,e[18]=f,e[19]=u):u=e[19],u}function se(t,e,s){switch(e.reason){case"not-answering":return{title:t("decoServe.state.notAnswering.title"),body:t("decoServe.state.notAnswering.short",{host:s})};case"outdated":return{title:t("decoServe.state.outdated.title"),body:t("decoServe.state.outdated.body",{host:s})};case"version-mismatch":return{title:t("decoServe.state.versionMismatch.title"),body:t("decoServe.state.versionMismatch.body",{host:s})};case"not-deco-serve":return{title:t("decoServe.state.notDecoServe.title",{host:s}),body:t("decoServe.state.notDecoServe.body",{host:s})};case"not-v8":return{title:t("decoServe.state.notV8.title"),body:t("decoServe.state.notV8.body",{host:s})};case"error":return{title:t("decoServe.state.error.title"),body:t("decoServe.state.error.body",{detail:e.detail??""})}}}function re(){const t=S.c(11),e=j();let s;t[0]!==e?(s=e("decoServe.lna.deniedTitle"),t[0]=e,t[1]=s):s=t[1];let n;t[2]!==s?(n=i.jsx(N,{className:"line-clamp-none",children:s}),t[2]=s,t[3]=n):n=t[3];let r;t[4]!==e?(r=e("decoServe.lna.deniedBody"),t[4]=e,t[5]=r):r=t[5];let o;t[6]!==r?(o=i.jsx(k,{children:r}),t[6]=r,t[7]=o):o=t[7];let a;return t[8]!==n||t[9]!==o?(a=i.jsx(L,{variant:"destructive",children:i.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[n,o]})}),t[8]=n,t[9]=o,t[10]=a):a=t[10],a}const ne={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(t){return t.includes("/sections/")||t.includes("multivariate/section")||t===B}function z(t){if(t.type==="block-ref"&&t.anyOfRefs?.length)return t.anyOfRefs.some(s=>b(s.resolveType));if(t.anyOfRefs?.length)return t.anyOfRefs.some(s=>b(s.resolveType));const e=t.properties?.__resolveType;return e?.type==="block-ref"&&e.anyOfRefs?.length?e.anyOfRefs.some(s=>b(s.resolveType)):!1}function oe(t){return t.type!=="block-ref"||!t.anyOfRefs?.length?!1:t.anyOfRefs.some(e=>b(e.resolveType))}function ie(t,e){if(e==="global"||e==="sections"||$(t))return!0;const s=t.type==="array"?t.items:void 0;return s?z(s):!1}const ae="secret",M=[256,384,512],U=12,V=16,q=/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/;function K(t){let e="";for(const s of t)e+=String.fromCharCode(s);return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function _(t){if(!/^[A-Za-z0-9_-]*$/.test(t)||t.length%4===1)return null;const e=t.replace(/-/g,"+").replace(/_/g,"/")+"=".repeat((4-t.length%4)%4);let s;try{s=atob(e)}catch{return null}const n=Uint8Array.from(s,r=>r.charCodeAt(0));return K(n)===t?n:null}function W(t){if(typeof t!="string"||!q.test(t))return null;const[,e="",s="",n=""]=t.split("."),r=_(e),o=_(s),a=_(n);return!r||!o||!a||!M.includes(r.byteLength)||o.byteLength!==U||a.byteLength<V?null:{wrappedKey:r,iv:o,ciphertext:a}}function ce(t){return W(t)!==null}export{ee as C,te as D,re as L,Q as R,ae as S,ne as a,D as b,oe as c,ce as d,b as e,ie as i,se as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,b as d,j as l}from"./index-
|
|
1
|
+
import{c as x,b as d,j as l}from"./index-BeWb3VLq.js";import{s as j}from"./User01-X6IeKYZH.js";import{t as E}from"./Users01-uKJoVSle.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.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=l.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(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,b as N,j as s,n as C,fM as F,H as k,r as y,b1 as L,B as D,ad as T,D as O,q as B,s as A,v as R,aM as q,I as _,w as I,t as z,ex as H}from"./index-
|
|
1
|
+
import{c as j,b as N,j as s,n as C,fM as F,H as k,r as y,b1 as L,B as D,ad as T,D as O,q as B,s as A,v as R,aM as q,I as _,w as I,t as z,ex as H}from"./index-BeWb3VLq.js";import{i as V}from"./AlertCircle-Cch634f7.js";import{s as M}from"./Plus-Dewm72je.js";import{s as G}from"./User01-X6IeKYZH.js";import{t as J}from"./Users01-uKJoVSle.js";import{E as K}from"./empty-state-wXIjf_EN.js";import{L as w}from"./label-TKhfC6jr.js";import{S as Q,b as U,a as W,d as X,c as P}from"./select-H4FJk0rp.js";import{T as Y}from"./textarea-7I-DLD6x.js";import{u as Z,a as ee}from"./use-secrets-CQ9dfY46.js";import{R as te}from"./require-capability-DC_q9Xad.js";import"./index-BdQq_4o_.js";import"./index-CdhgpKbn.js";import"./ChevronUp-BT7eMKPK.js";import"./access-gate-BpfEc6VH.js";import"./capability-load-error-BuC7MxXm.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(V,{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"?G: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(T,{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(T,{}),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 E({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(O,{open:t,onOpenChange:o=>{o?e(o):p()},children:s.jsxs(B,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(R,{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(Q,{value:i,onValueChange:o=>c(o),children:[s.jsx(U,{id:"secret-scope",children:s.jsx(W,{})}),s.jsxs(X,{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(Y,{id:"secret-description",value:d,onChange:o=>u(o.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(I,{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(M,{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(E,{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(E,{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 ze(){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{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as i,F as e}from"./agent-icon
|
|
1
|
+
import{X as i,F as e}from"./agent-icon-CiKTiUdq.js";import{i as n}from"./Link01-hfA48cFL.js";const s=["general","connections","site"],r={general:{icon:e,titleKey:"virtualMcp.settings.general.title",descriptionKey:"virtualMcp.settings.general.description"},connections:{icon:n,titleKey:"virtualMcp.settings.connections.title",descriptionKey:"virtualMcp.settings.connections.description"},site:{icon:i,titleKey:"virtualMcp.settings.site.title",descriptionKey:"virtualMcp.settings.site.description"}};function l(t){return!!t&&s.includes(t)}export{s as P,r as a,l as i};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{c as ct,b as Lt,r as R,l as me,j as o,b2 as li,B as Et,U as ln,ag as ci,X as ui,V as di,a as Io,F as fi,K as Ko,m as mi,o as pi,h as hi,t as ae}from"./index-BeWb3VLq.js";import{u as gi}from"./chat-context-BEyCIAaN.js";import{$ as vi,H as Zn,a0 as yi,a1 as xi,a2 as bi,a3 as Si,a4 as _i,a5 as wi,a6 as Xr,a7 as ji,a8 as ki,y as kt,a9 as Le,aa as Ei,z as Gn,w as Un,d as Ri,u as Ai,ab as Zr,i as Ci,ac as Ni,k as Ti,h as Vi,ad as Fo,ae as Pi,af as Mi,t as eo,ag as Di,ah as Ii,ai as Wn,aj as to,ak as no,al as so,am as vs,an as Ki,C as Fi,ao as Bi,x as Oi,ap as ro,aq as Li,ar as oo,as as ao,at as io,M as $i,au as lo,a as zi,av as cn,aw as Hi,ax as Wi,ay as jn,az as ys}from"./runnable-block-editor-Bod17qTV.js";import{c as qi}from"./repository-binding-Cf_thK-b.js";import{n as Gi,t as Ui}from"./ChevronUp-BT7eMKPK.js";import{aa as Bo,b as Qn,ap as Yi,H as Ji,a4 as co,a0 as uo}from"./agent-icon-CiKTiUdq.js";import{S as un}from"./scroll-area-BVZXqx5M.js";import{c as At,T as Ct,a as Nt}from"./tooltip-4vv5k-uR.js";import{am as Qi,a2 as fo,l as Xi,u as Zi,m as el,C as tl,Q as nl,A as sl,a0 as Kt,a1 as Ft,ar as mo,J as rl,at as ol}from"./site-editor-toast-C48kJZ8y.js";import{f as al,u as il,G as ll,t as xs,H as po,s as cl,m as ul,I as dl}from"./blocks-tab-states-5tpSikld.js";import{m as fl,u as ml,P as pl}from"./mustache-B20fDMb8.js";import{b0 as hl,b as Is,b2 as Oo,G as gl,b3 as ot,b4 as Es,b5 as Lo,al as Qt,a7 as Rs,b6 as As,am as Ot,a8 as dn,e as vl,j as yl,A as xl,q as qn,p as En,ax as bl,aj as Jt,aa as bs,ai as St,ah as kn,b7 as Sl,H as _l,an as ho,ao as go,ak as wl,b8 as jl,b9 as Bt,ba as kl,bb as El,bc as Rl,ag as vo,bd as Ss,be as Al,bf as Cl,bg as Nl,ae as Tl,aN as Vl,aP as Pl,aI as Ml,bh as Dl,bi as Il,bj as Kl,a9 as yo,bk as Fl,ad as Bl,bl as Ol}from"./parse-sections-CigeyiXV.js";import{a as Ll}from"./Copy01-B341DqLV.js";import{a as Cs,e as $o}from"./UserSquare-pmxb5ZdZ.js";import{i as xo}from"./Tool01-2gJDR0Ho.js";import{s as bo}from"./Image01-hTzc15CE.js";import{s as $l}from"./Plus-Dewm72je.js";import{s as zl}from"./Trash01-DjE7Raat.js";import{i as Ns}from"./ZoomOut-DixQygt2.js";import{u as Hl,a as So,K as Wl,P as ql,b as Gl,C as Ul,D as Yl,c as Jl}from"./core.esm-BmE_KURk.js";import{u as Ql,s as Xl,a as Yn,S as Zl,v as ec}from"./sortable.esm-CE2eXOQU.js";import{s as tc,g as nc,u as sc,A as rc}from"./use-section-preview-base-CrcAXE9z.js";import{i as oc}from"./thread-intent-CoB1rbzj.js";import{A as _s}from"./avatar-DjIkOwsx.js";import{e as ac,d as _o,b as ic,A as lc,a as cc,f as uc}from"./alert-dialog-BdWXpnme.js";import{b as dc}from"./format-time-Cq80KKvY.js";import{e as fc}from"./shell-layout-Dpds4_um.js";import{u as mc}from"./use-members-Cl1_-fx1.js";import{a as pc,P as wo,w as hc,b as gc}from"./page-seo-form-C0_Mzxj0.js";import{u as vc}from"./use-apply-named-rule-R20A_NaL.js";import{c as jo,d as ko,e as yc,f as xc,g as bc}from"./variant-draft-pointer-Cjn_TXkR.js";import"./use-panel-navigate-CXkMPISv.js";import"./thread-route-BPSSuk8V.js";import"./use-project-scope-BOj2O9A_.js";import"./autosend-BTx7-p6a.js";import"./use-mcp-client-2WkK0AxE.js";import"./auth-DVebpHI3.js";import"./use-decopilot-events-CuBncVze.js";import"./watch-sse-pool-C9NPGTmI.js";import"./task-board-ByNQwZsl.js";import"./schema-b5uziS6S.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-Ct47MIru.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-CE5BJyh9.js";import"./utils-t1gjPfET.js";import"./Play-CByslM3d.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-v8_ULhan.js";import"./LinkBroken01-Dioz3u9i.js";import"./collapsible-BcZaehP2.js";import"./use-copy-C4LbXPXl.js";import"./usage-stats-CKpL0uWf.js";import"./tool-namespace-DePiqr-m.js";import"./form-BGI3x6he.js";import"./label-TKhfC6jr.js";import"./utils-CVEq3hMx.js";import"./markdown-D_Bab0vD.js";import"./use-mobile-BAnIvR27.js";import"./use-clock-tick-DE4s8Okz.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C5DYTOzS.js";import"./types-CNU-uWw-.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./AlertCircle-Cch634f7.js";import"./XClose-BVxVAZ6V.js";import"./ShoppingBag01-BStpgW0a.js";import"./SearchMd-7Jo0ZofC.js";import"./sheet-DdrzSnyB.js";import"./integration-icon-VoZokpOe.js";import"./use-connection-HenJjVMr.js";import"./use-navigate-to-agent-C2NQ-36B.js";import"./Link01-hfA48cFL.js";import"./use-mcp-prompts-BY0itm-N.js";import"./Monitor01-Bz6QaUO4.js";import"./use-thread-outputs-C38yfNsJ.js";import"./file-type-icon-DYeFNgMs.js";import"./secret-ciphertext-CKG2rzpX.js";import"./alert-DlpN1nbO.js";import"./switch-BI2l0q9a.js";import"./textarea-7I-DLD6x.js";import"./ChevronSelectorVertical-C5d75KyY.js";import"./command-KmLWWmqo.js";import"./index-BliYmmPu.js";import"./popover-s88DXvPL.js";import"./monaco-editor-CVRVgXSh.js";import"./editor-DAekV0he.js";import"./delay-CnY5UFtP.js";import"./calendar-kdikRXDO.js";import"./SwitchHorizontal01-CrC4ThKg.js";import"./Minus-DqDPTtRG.js";import"./select-H4FJk0rp.js";import"./index-BdQq_4o_.js";import"./index-CdhgpKbn.js";import"./editor-classes-BaBC2QPU.js";import"./toggle-group-BngkTNsG.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-CEzxugDA.js";import"./Upload01-CYfTR3aZ.js";import"./DotsVertical-DbrlDgFh.js";import"./search-input-BL6XGlmm.js";import"./tabs-Cw5epDK7.js";import"./use-debounced-value-Br6JzfN-.js";import"./use-file-configs-B_k4AoEo.js";import"./asset-utils-CYj7sEud.js";import"./useInfiniteQuery-CxzyY6DS.js";import"./infiniteQueryObserver-BOCgDRcQ.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-session-runtime-CqJF6neP.js";import"./sandbox-git-api-CH_-QFpD.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-DLUdomd9.js";import"./ArrowLeft-CohopnCT.js";import"./Building02-BHJQSDUK.js";import"./CheckCircle-Cs8i9zYt.js";import"./CreditCard01-4Fwr0tNh.js";import"./Globe04-BE6c1UDj.js";import"./Key01-kTu6t6u_.js";import"./Sun-C37Hpdko.js";import"./User01-X6IeKYZH.js";import"./Users01-uKJoVSle.js";import"./experiments-tab-choice-CQ5EsK8h.js";import"./use-sandbox-events-BVhJrX2Z.js";import"./slider-tSRa1HDF.js";import"./index-BEaGR-Ng.js";import"./tooltipContext-B3bWUtmi.js";import"./CategoricalChart-BCAB1JR1.js";import"./index-DVxNOEMj.js";import"./ActiveShapeUtils-BB436TvV.js";import"./Sector-D64VY8hG.js";import"./symbol-CW0bfPL3.js";import"./empty-state-B4dSQMeM.js";import"./section-preview-url-7zfngvgW.js";import"./slugify-CEUa2lfQ.js";import"./differenceInSeconds-C3x8sHUj.js";import"./project-icon-Ds8VtVRG.js";import"./new-project-dialog-DfI138Mw.js";import"./repository-import-picker-BOku3VrR.js";import"./repository-picker-CeCsQGv8.js";import"./collection-search-7sBPioRN.js";import"./required-auth-layout-DhxdstQv.js";import"./use-org-sso-BnFa9r-G.js";import"./use-org-auth-client-vWdVrvgR.js";import"./use-move-blocks-lN8kagdi.js";const Sc={escape:vi};function _c(n,e){for(const r of tc(n,e)){const a=typeof r.title=="string"?r.title:void 0;if(a?.includes("{{"))return a}}function wc(n,e){if(!e)return;const r=hl(n,oc(e));if(r)try{const a=_c(r.resolveType,e);return a&&fl.render(a,r.data,{},Sc).trim()||void 0}catch{return}}function jc(n){const e=ct.c(13),{icon:r,label:a,className:l}=n;let u;e[0]!==l?(u=me("size-3.5",l),e[0]=l,e[1]=u):u=e[1];let y;e[2]!==r||e[3]!==u?(y=o.jsx(r,{className:u}),e[2]=r,e[3]=u,e[4]=y):y=e[4];let m;e[5]!==a||e[6]!==y?(m=o.jsx(Ct,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":a,className:"shrink-0 cursor-help",children:y})}),e[5]=a,e[6]=y,e[7]=m):m=e[7];let b;e[8]!==a?(b=o.jsx(Nt,{className:"max-w-56",children:a}),e[8]=a,e[9]=b):b=e[9];let h;return e[10]!==m||e[11]!==b?(h=o.jsxs(At,{children:[m,b]}),e[10]=m,e[11]=b,e[12]=h):h=e[12],h}const kc="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 Eo(n){return Array.from({length:n},(e,r)=>({id:crypto.randomUUID(),index:r}))}function zo(n){return n.map((e,r)=>({...e,index:r}))}function Ec(n,e){if(e===n.length)return n;if(e<n.length)return zo(n.slice(0,e));const r=Array.from({length:e-n.length},(a,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...r]}function Ho(n){const e=ct.c(44),{section:r,raw:a,meta:l,decofile:u}=n,y=Lt(),m=Zn(),b=r.isSavedBlock===!0,h=r.isMultivariate===!0;let k;e[0]!==l||e[1]!==a?(k=a&&l?nc(a,l):void 0,e[0]=l,e[1]=a,e[2]=k):k=e[2];const N=k;let L;e[3]!==l||e[4]!==h||e[5]!==a||e[6]!==b?(L=a&&l&&!b&&!h?wc(a,l):void 0,e[3]=l,e[4]=h,e[5]=a,e[6]=b,e[7]=L):L=e[7];const z=L;let H;e[8]!==u||e[9]!==l||e[10]!==a||e[11]!==r?(H=wi(a,r,u,l),e[8]=u,e[9]=l,e[10]=a,e[11]=r,e[12]=H):H=e[12];const B=H;let w;e[13]!==h||e[14]!==a?.__resolveType?(w=!h&&Is(a?.__resolveType??""),e[13]=h,e[14]=a?.__resolveType,e[15]=w):w=e[15];const p=w,te=b?Qn:h?Bo:$o;let E;e[16]!==h||e[17]!==b?(E=b?{color:gl}:h?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=h,e[17]=b,e[18]=E):E=e[18];const W=E;let V;e[19]!==te||e[20]!==m?(V=m?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(te,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(ki,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(Yi,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=te,e[20]=m,e[21]=V):V=e[21];let J;e[22]!==N?(J=N&&o.jsx("img",{src:N,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=N,e[23]=J):J=e[23];let g;e[24]!==m||e[25]!==W?(g=!m&&o.jsx(Cs,{className:"h-4 w-4 shrink-0",style:W}),e[24]=m,e[25]=W,e[26]=g):g=e[26];const Q=m?"shrink":"flex-1",x=r.isHidden&&"line-through opacity-50";let Z;e[27]!==x||e[28]!==Q?(Z=me("min-w-0 truncate text-sm font-medium",Q,x),e[27]=x,e[28]=Q,e[29]=Z):Z=e[29];const q=z??r.label;let pe;e[30]!==Z||e[31]!==q?(pe=o.jsx("span",{className:Z,children:q}),e[30]=Z,e[31]=q,e[32]=pe):pe=e[32];let ye;e[33]!==p||e[34]!==m||e[35]!==B||e[36]!==y?(ye=m?o.jsxs(o.Fragment,{children:[p&&o.jsx(jc,{icon:Ns,label:y("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),B&&o.jsx(Xr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):B&&o.jsx(Xr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=p,e[34]=m,e[35]=B,e[36]=y,e[37]=ye):ye=e[37];let ue;return e[38]!==pe||e[39]!==ye||e[40]!==V||e[41]!==J||e[42]!==g?(ue=o.jsxs(o.Fragment,{children:[V,J,g,pe,ye]}),e[38]=pe,e[39]=ye,e[40]=V,e[41]=J,e[42]=g,e[43]=ue):ue=e[43],ue}const Rc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ac="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 Wo(n,e,r){if(r)return ji({selected:e});const a=n.isSavedBlock===!0,l=n.isMultivariate===!0;return me("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":a?Rc:l?Ac:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ws(n,e){return me("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"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 Cc(n){const e=ct.c(90),{section:r,raw:a,meta:l,decofile:u,sortableId:y,selected:m,onSelect:b,onDelete:h,onDuplicate:k,onMakeReusable:N,onToggleHidden:L,onToggleLazy:z,onAddVariant:H,onDetach:B}=n,w=Lt(),p=Zn(),te=a?Is(a.__resolveType??""):!1,E=r.isHidden===!0,W=te||E;let V;e[0]!==r?(V=Oo(r),e[0]=r,e[1]=V):V=e[1];const J=V,g=!!z&&!r.isMultivariate;let Q;e[2]!==y?(Q={id:y,animateLayoutChanges:Vc},e[2]=y,e[3]=Q):Q=e[3];const{attributes:x,listeners:Z,setNodeRef:q,transform:pe,isDragging:ye}=Ql(Q);let ue;e[4]!==pe?(ue=Ul.Transform.toString(pe?{...pe,x:0}:null),e[4]=pe,e[5]=ue):ue=e[5];const fe=ye?0:void 0;let Re;e[6]!==ue||e[7]!==fe?(Re={transform:ue,opacity:fe},e[6]=ue,e[7]=fe,e[8]=Re):Re=e[8];const j=Re;let re;e[9]!==r?(re=xi(r),e[9]=r,e[10]=re):re=e[10];const Ae=re,Ce="button",S=0;let I;e[11]!==b?(I=K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),b())},e[11]=b,e[12]=I):I=e[12];const he=ye?"cursor-grabbing":"cursor-pointer";let M;e[13]!==p||e[14]!==r||e[15]!==m||e[16]!==he?(M=me("touch-none transition-colors",he,Wo(r,m,p)),e[13]=p,e[14]=r,e[15]=m,e[16]=he,e[17]=M):M=e[17];let xe;e[18]!==u||e[19]!==l||e[20]!==a||e[21]!==r?(xe=o.jsx(Ho,{section:r,raw:a,meta:l,decofile:u}),e[18]=u,e[19]=l,e[20]=a,e[21]=r,e[22]=xe):xe=e[22];const O=!p&&g&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon","aria-label":w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:me(ws(W,te)),onClick:K=>{K.stopPropagation(),z?.()},onPointerDown:Tc,children:o.jsx(Ns,{className:me("h-3.5 w-3.5",te&&"text-warning")})})}),o.jsx(Nt,{side:"bottom",children:w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),oe=p?o.jsx(bi,{label:w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:E,onToggle:L,children:E?o.jsx(xo,{className:"h-3.5 w-3.5"}):o.jsx(bo,{className:"h-3.5 w-3.5"})}):o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon","aria-label":w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:me(ws(W,E)),onClick:K=>{K.stopPropagation(),L()},onPointerDown:Nc,children:E?o.jsx(xo,{className:"h-3.5 w-3.5"}):o.jsx(bo,{className:"h-3.5 w-3.5"})})}),o.jsx(Nt,{side:"bottom",children:w(E?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),G=ui,Ie=Si;let ke;e[23]!==w?(ke=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ke):ke=e[24];const ut=me(ws(W,!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 Ze;e[25]!==Ie||e[26]!==ke||e[27]!==ut?(Ze=o.jsx(Ie,{label:ke,classicClassName:ut}),e[25]=Ie,e[26]=ke,e[27]=ut,e[28]=Ze):Ze=e[28];let $e;e[29]!==p||e[30]!==g||e[31]!==te||e[32]!==z||e[33]!==w?($e=p&&g&&o.jsxs(o.Fragment,{children:[o.jsxs(ln,{onClick:K=>{K.stopPropagation(),z?.()},children:[o.jsx(Ns,{className:"h-4 w-4"}),w(te?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ci,{})]}),e[29]=p,e[30]=g,e[31]=te,e[32]=z,e[33]=w,e[34]=$e):$e=e[34];let qe;e[35]!==k?(qe=K=>{K.stopPropagation(),k()},e[35]=k,e[36]=qe):qe=e[36];let at;e[37]===Symbol.for("react.memo_cache_sentinel")?(at=o.jsx(Ll,{className:"h-4 w-4"}),e[37]=at):at=e[37];let Ge;e[38]!==w?(Ge=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Ge):Ge=e[39];let Ue;e[40]!==qe||e[41]!==Ge?(Ue=o.jsxs(ln,{onClick:qe,children:[at,Ge]}),e[40]=qe,e[41]=Ge,e[42]=Ue):Ue=e[42];let Ye;e[43]!==p||e[44]!==J||e[45]!==H||e[46]!==w?(Ye=J&&o.jsxs(ln,{className:me(!p&&_i),onClick:K=>{K.stopPropagation(),H()},children:[o.jsx(Bo,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=p,e[44]=J,e[45]=H,e[46]=w,e[47]=Ye):Ye=e[47];let de;e[48]!==p||e[49]!==Ae||e[50]!==N||e[51]!==w?(de=Ae&&o.jsxs(ln,{className:me(!p&&kc),onClick:K=>{K.stopPropagation(),N()},children:[p?o.jsx(Qn,{className:"h-4 w-4"}):o.jsx(Cs,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=p,e[49]=Ae,e[50]=N,e[51]=w,e[52]=de):de=e[52];let ge;e[53]!==p||e[54]!==B||e[55]!==r.isMultivariate||e[56]!==r.isSavedBlock||e[57]!==w?(ge=r.isSavedBlock===!0&&!r.isMultivariate&&o.jsxs(ln,{onClick:K=>{K.stopPropagation(),B()},children:[p?o.jsx($o,{className:"h-4 w-4"}):o.jsx(Cs,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=p,e[54]=B,e[55]=r.isMultivariate,e[56]=r.isSavedBlock,e[57]=w,e[58]=ge):ge=e[58];let be;e[59]!==h?(be=K=>{K.stopPropagation(),h()},e[59]=h,e[60]=be):be=e[60];let ee;e[61]===Symbol.for("react.memo_cache_sentinel")?(ee=o.jsx(zl,{className:"h-4 w-4"}),e[61]=ee):ee=e[61];let F;e[62]!==w?(F=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=F):F=e[63];let De;e[64]!==be||e[65]!==F?(De=o.jsxs(ln,{variant:"destructive",onClick:be,children:[ee,F]}),e[64]=be,e[65]=F,e[66]=De):De=e[66];let et;e[67]!==$e||e[68]!==Ue||e[69]!==Ye||e[70]!==de||e[71]!==ge||e[72]!==De?(et=o.jsxs(di,{align:"end",className:"w-44",children:[$e,Ue,Ye,de,ge,De]}),e[67]=$e,e[68]=Ue,e[69]=Ye,e[70]=de,e[71]=ge,e[72]=De,e[73]=et):et=e[73];let tt;e[74]!==G||e[75]!==Ze||e[76]!==et?(tt=o.jsxs(G,{children:[Ze,et]}),e[74]=G,e[75]=Ze,e[76]=et,e[77]=tt):tt=e[77];let st;return e[78]!==x||e[79]!==Z||e[80]!==b||e[81]!==q||e[82]!==j||e[83]!==M||e[84]!==xe||e[85]!==O||e[86]!==oe||e[87]!==tt||e[88]!==I?(st=o.jsxs("div",{ref:q,style:j,...x,...Z,role:Ce,tabIndex:S,onClick:b,onKeyDown:I,className:M,children:[xe,O,oe,tt]}),e[78]=x,e[79]=Z,e[80]=b,e[81]=q,e[82]=j,e[83]=M,e[84]=xe,e[85]=O,e[86]=oe,e[87]=tt,e[88]=I,e[89]=st):st=e[89],st}function Nc(n){return n.stopPropagation()}function Tc(n){return n.stopPropagation()}function Vc(){return!1}function Ts(n){const e=ct.c(11),{canAddSection:r,onAddSection:a,className:l,size:u}=n,y=Lt();let m;e[0]!==l?(m=me("w-full",l),e[0]=l,e[1]=m):m=e[1];const b=!r;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx($l,{size:14}),e[2]=h):h=e[2];let k;e[3]!==y?(k=y("sectionsEditor.sectionList.addSectionButton"),e[3]=y,e[4]=k):k=e[4];let N;return e[5]!==a||e[6]!==u||e[7]!==m||e[8]!==b||e[9]!==k?(N=o.jsxs(Et,{type:"button",variant:"outline",size:u,className:m,disabled:b,onClick:a,children:[h,k]}),e[5]=a,e[6]=u,e[7]=m,e[8]=b,e[9]=k,e[10]=N):N=e[10],N}function Pc(n){const e=ct.c(101),{listKey:r,rawSections:a,sections:l,meta:u,decofile:y,selectedIndex:m,onSelect:b,onReorder:h,onDelete:k,onDuplicate:N,onMakeReusable:L,onToggleHidden:z,onToggleLazy:H,onAddVariant:B,onDetach:w,onAddSection:p,canAddSection:te}=n,E=te===void 0?!0:te,W=Lt(),V=Zn();let J;e[0]!==l.length?(J=()=>Eo(l.length),e[0]=l.length,e[1]=J):J=e[1];const[g,Q]=R.useState(J),[x,Z]=R.useState(null),[q,pe]=R.useState(r),[ye,ue]=R.useState(l.length),fe=R.useRef(!1);q!==r?(pe(r),ue(l.length),Q(Eo(l.length))):ye!==l.length&&(ue(l.length),Q(Je=>Ec(Je,l.length)));let Re;e[2]===Symbol.for("react.memo_cache_sentinel")?(Re={activationConstraint:{distance:8}},e[2]=Re):Re=e[2];let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j={coordinateGetter:Xl},e[3]=j):j=e[3];const re=Hl(So(ql,Re),So(Wl,j));let Ae;e[4]!==g?(Ae=g.map(Mc),e[4]=g,e[5]=Ae):Ae=e[5];const Ce=Ae;let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=Je=>{Z(String(Je.active.id))},e[6]=S):S=e[6];const I=S;let he;e[7]!==Ce||e[8]!==h?(he=Je=>{Z(null);const{active:ie,over:Ne}=Je;if(!Ne||ie.id===Ne.id)return;const ze=Ce.indexOf(String(ie.id)),rt=Ce.indexOf(String(Ne.id));ze===-1||rt===-1||(Q(it=>zo(Yn([...it],ze,rt))),fe.current=!0,requestAnimationFrame(()=>{fe.current=!1}),h?.(ze,rt))},e[7]=Ce,e[8]=h,e[9]=he):he=e[9];const M=he;let xe;e[10]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>{Z(null)},e[10]=xe):xe=e[10];const O=xe;let oe,G,Ie,ke,ut,Ze,$e,qe,at,Ge,Ue,Ye,de,ge,be;if(e[11]!==x||e[12]!==E||e[13]!==V||e[14]!==y||e[15]!==g||e[16]!==Ce||e[17]!==M||e[18]!==u||e[19]!==p||e[20]!==B||e[21]!==k||e[22]!==w||e[23]!==N||e[24]!==L||e[25]!==b||e[26]!==z||e[27]!==H||e[28]!==a||e[29]!==l||e[30]!==m||e[31]!==re||e[32]!==W){ge=Symbol.for("react.early_return_sentinel");e:{const Je=ie=>{fe.current||b(ie)};if(e[48]!==x||e[49]!==E||e[50]!==V||e[51]!==g||e[52]!==p||e[53]!==a||e[54]!==l||e[55]!==W){const ie=x?g.find(Ne=>Ne.id===x):null;if(ke=ie!=null?l[ie.index]:null,Ie=ie!=null?a[ie.index]:void 0,g.length===0){let Ne;e[59]!==W?(Ne=W("sectionsEditor.sectionList.noSections"),e[59]=W,e[60]=Ne):Ne=e[60];let ze;e[61]!==Ne?(ze=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ne}),e[61]=Ne,e[62]=ze):ze=e[62];const rt=ze;let it;e[63]!==E||e[64]!==V||e[65]!==rt||e[66]!==p?(it=V?rt:o.jsxs("div",{className:"space-y-2",children:[rt,o.jsx(Ts,{canAddSection:E,onAddSection:p,size:"sm"})]}),e[63]=E,e[64]=V,e[65]=rt,e[66]=p,e[67]=it):it=e[67],ge=it;break e}de=me(ie&&"cursor-grabbing"),e[48]=x,e[49]=E,e[50]=V,e[51]=g,e[52]=p,e[53]=a,e[54]=l,e[55]=W,e[56]=Ie,e[57]=ke,e[58]=de}else Ie=e[56],ke=e[57],de=e[58];G=Yl,qe=re,at=Jl,Ge=I,Ue=M,Ye=O,oe=Zl,Ze=Ce,$e=ec,be="space-y-1",ut=g.map(ie=>{const Ne=l[ie.index];return Ne?o.jsx(Cc,{sortableId:ie.id,section:Ne,raw:a[ie.index],meta:u,decofile:y,selected:m===ie.index,onSelect:()=>Je(ie.index),onDelete:()=>k(ie.index),onDuplicate:()=>N(ie.index),onMakeReusable:()=>L(ie.index),onToggleHidden:()=>z(ie.index),onToggleLazy:H?()=>H(ie.index):void 0,onAddVariant:()=>B(ie.index),onDetach:()=>w(ie.index)},ie.id):null})}e[11]=x,e[12]=E,e[13]=V,e[14]=y,e[15]=g,e[16]=Ce,e[17]=M,e[18]=u,e[19]=p,e[20]=B,e[21]=k,e[22]=w,e[23]=N,e[24]=L,e[25]=b,e[26]=z,e[27]=H,e[28]=a,e[29]=l,e[30]=m,e[31]=re,e[32]=W,e[33]=oe,e[34]=G,e[35]=Ie,e[36]=ke,e[37]=ut,e[38]=Ze,e[39]=$e,e[40]=qe,e[41]=at,e[42]=Ge,e[43]=Ue,e[44]=Ye,e[45]=de,e[46]=ge,e[47]=be}else oe=e[33],G=e[34],Ie=e[35],ke=e[36],ut=e[37],Ze=e[38],$e=e[39],qe=e[40],at=e[41],Ge=e[42],Ue=e[43],Ye=e[44],de=e[45],ge=e[46],be=e[47];if(ge!==Symbol.for("react.early_return_sentinel"))return ge;let ee;e[68]!==ut||e[69]!==be?(ee=o.jsx("div",{className:be,children:ut}),e[68]=ut,e[69]=be,e[70]=ee):ee=e[70];let F;e[71]!==oe||e[72]!==Ze||e[73]!==$e||e[74]!==ee?(F=o.jsx(oe,{items:Ze,strategy:$e,children:ee}),e[71]=oe,e[72]=Ze,e[73]=$e,e[74]=ee,e[75]=F):F=e[75];let De;e[76]!==Ie||e[77]!==ke||e[78]!==V||e[79]!==y||e[80]!==u?(De=ke?o.jsx("div",{className:me("cursor-grabbing shadow-lift",Wo(ke,!1,V)),children:o.jsx(Ho,{section:ke,raw:Ie,meta:u,decofile:y})}):null,e[76]=Ie,e[77]=ke,e[78]=V,e[79]=y,e[80]=u,e[81]=De):De=e[81];let et;e[82]!==De?(et=li.createPortal(o.jsx(Gl,{dropAnimation:yi,children:De}),document.body),e[82]=De,e[83]=et):et=e[83];let tt;e[84]!==G||e[85]!==qe||e[86]!==at||e[87]!==Ge||e[88]!==Ue||e[89]!==Ye||e[90]!==F||e[91]!==et?(tt=o.jsxs(G,{sensors:qe,collisionDetection:at,onDragStart:Ge,onDragEnd:Ue,onDragCancel:Ye,children:[F,et]}),e[84]=G,e[85]=qe,e[86]=at,e[87]=Ge,e[88]=Ue,e[89]=Ye,e[90]=F,e[91]=et,e[92]=tt):tt=e[92];let st;e[93]!==E||e[94]!==V||e[95]!==p?(st=!V&&o.jsx(Ts,{canAddSection:E,onAddSection:p,size:"sm",className:"mt-2"}),e[93]=E,e[94]=V,e[95]=p,e[96]=st):st=e[96];let K;return e[97]!==de||e[98]!==tt||e[99]!==st?(K=o.jsxs("div",{className:de,children:[tt,st]}),e[97]=de,e[98]=tt,e[99]=st,e[100]=K):K=e[100],K}function Mc(n){return n.id}function js(n,e,r,a,l){if(!n||!e)return null;if(!e.isMultivariate)return kt(n,e,a,l)?.data??null;const u=ot(n,e),y=u?Es(u,al)[r]:void 0;return y?Lo(y.value,a)?.data??null:null}const Dc=50;function Ic(n,e){n.own.push(Le(e)),n.own.length>Dc&&n.own.shift()}function Ro(n,e){return n.own.includes(Le(e))}function Kc(n,e){const{sectionIndex:r,variantIndex:a,shown:l,next:u,sectionCount:y}=e;return n&&n.sectionIndex===r&&n.variantIndex===a&&n.emitted===l?(n.emitted=u,n):l?{sectionIndex:r,variantIndex:a,base:l,emitted:u,sectionCount:y,own:[Le(l)]}:null}function qo(n,e){return e!==null&&Le(n)!==Le(e)}function Go(n,e){return n.__resolveType!==e.__resolveType}function Fc(n,e,r,a){if(e.length===a)return"here";const l=Le(n),u=e.flatMap((y,m)=>m!==r&&y!==null&&Le(y)===l?[m]:[]);return u.length===1?u[0]:"unknown"}function Ao({formBase:n,rebased:e,versionOf:r}){let a=null;return{ifMatch:l=>{a=l,n&&(n.version===void 0||e)&&(n.version=r(l));const u=n?n.version:r(l);return u===void 0?void 0:{[l]:u}},onApplied:l=>{n&&a!==null&&Object.hasOwn(l,a)&&(n.version=l[a])},reloadOnConflict:!0}}function Bc({merged:n,tracked:e,current:r,saved:a}){return!!n&&!!e&&r===e&&e.emitted===a}function Co(n,e){return!!n&&!!e&&n.contains(e)}function Vs(n){const e=[],r=Ps("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:r,pointers:e}}function Ps(n,e,r,a,l){const u=(y,m)=>Le(y)===Le(m);if(u(r,a)||u(e,a))return r;if(u(e,r))return a;if(ks(r)&&ks(a)){const y=ks(e)?e:{},m={},b=[...Object.keys(r),...Object.keys(a).filter(h=>!(h in r))];for(const h of b){const k=Ps(`${n}/${h.replaceAll("~","~0").replaceAll("/","~1")}`,y[h],r[h],a[h],l);k!==void 0&&(m[h]=k)}return m}return Array.isArray(e)&&Array.isArray(r)&&Array.isArray(a)&&r.length===e.length&&a.length===e.length?e.map((y,m)=>Ps(`${n}/${m}`,y,r[m],a[m],l)):(l.push(n),a)}function ks(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Oc(n,e){let r=n.merged;for(const a of n.pointers)e[a]==="mine"&&(r=Hc(r,a,Xt(n.mine,a)));return r}function Lc(n,e){return Object.fromEntries(n.pointers.map(r=>[r,e]))}function Uo(n){return Lc(n,"mine")}function Ms(n,e,r){const a=Uo(r);for(const l of r.pointers){const u=e[l];if(!u||!n.pointers.includes(l))continue;["mine","theirs"].every(m=>Le(Xt(n[m],l))===Le(Xt(r[m],l)))&&(a[l]=u)}return a}function Yo(n,e,r={}){const a=e.pointers.filter(l=>!n.pointers.includes(l)||Le(Xt(n.theirs,l))!==Le(Xt(e.theirs,l)));return a.length===0?r:{...r,...Object.fromEntries(a.map(l=>[l,(r[l]??0)+1]))}}function $c(n,e,r){if(!e||Go(n.plan.ancestor,e)||!qo(n.plan.theirs,e)||r(e))return null;const a=Vs({...n.plan,theirs:e});return a.pointers.length===0?null:{plan:a,choices:Ms(n.plan,n.choices,a),fresh:Yo(n.plan,a,n.fresh)}}function zc(n,e){return n.pointers.map(r=>({pointer:r,label:Ei(r,e),mine:Xt(n.mine,r),theirs:Xt(n.theirs,r),schema:Wc(e??null,r)}))}function Ks(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function Xt(n,e){let r=n;for(const a of Ks(e))if(Array.isArray(r))r=r[Number(a)];else if(r&&typeof r=="object")r=r[a];else return;return r}function Hc(n,e,r){const a=Ks(e),l=(u,y)=>{if(y===a.length)return r;const m=a[y];if(Array.isArray(u)){const k=[...u];return k[Number(m)]=l(u[Number(m)],y+1),k}const b=u&&typeof u=="object"?{...u}:{},h=l(b[m],y+1);return h===void 0?delete b[m]:b[m]=h,b};return l(n,0)}function Wc(n,e){let r=n;for(const a of Ks(e)){if(!r)return null;r=/^\d+$/.test(a)&&!r.properties?.[a]?r.items:r.properties?.[a]}return r??null}const qc=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,No=60,Gc=3;function Jo(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&qc.test(n)}function Ds(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const a=n.replace(/<br\s*\/?>/gi,`
|
|
2
|
+
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
3
|
+
`);return Yc(a).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
|
|
4
|
+
`).trim()}const Uc={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};function Yc(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let r="";r!==e;)r=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,r=>Uc[r]??r)}function Jn(n){const e=n.replace(/\s+/g," ").trim();return e.length>No?`${e.slice(0,No-1)}…`:e}function Jc(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Xn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return Jo(n,e)?{kind:"image",src:n}:{kind:"text",text:Ds(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const r=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,Gc).map(a=>Qc(a,r)??"")}}if(typeof n=="object"){const r=n;if("value"in r&&Object.keys(r).length<=2)return Xn(r.value,e?.properties?.value??e);const a=Object.entries(r).filter(([l,u])=>!l.startsWith("__")&&u!==void 0).flatMap(([l,u])=>{const y=e?.properties?.[l]??null,m=Xn(u,y);if(m.kind==="empty")return[];const b=m.kind==="text"?Jn(m.text):m.kind==="image"?Jc(m.src):m.kind==="yesNo"?m.value?"✓":"✗":m.kind==="list"?`${m.count}`:"…";return[{label:y?.title?.trim()||l,text:b}]}).slice(0,4);return a.length>0?{kind:"fields",entries:a}:{kind:"empty"}}return{kind:"text",text:String(n)}}function Qc(n,e){if(typeof n=="string")return Jn(Ds(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const r=n,a=e?.titleBy,l=a?r[a]:void 0;if(typeof l=="string"&&l.trim())return Jn(l);for(const[u,y]of Object.entries(r))if(!(u.startsWith("__")||typeof y!="string"||!y.trim())&&!Jo(y,e?.properties?.[u]??null))return Jn(Ds(y,null));return null}const To=1500;function Xc(n,e){const r=n.split(/(\s+)/).filter(k=>k!==""),a=e.split(/(\s+)/).filter(k=>k!=="");if(r.length>To||a.length>To)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const l=Array.from({length:r.length+1},()=>new Array(a.length+1).fill(0));for(let k=r.length-1;k>=0;k--)for(let N=a.length-1;N>=0;N--){const L=l[k];L[N]=r[k]===a[N]?l[k+1][N+1]+1:Math.max(l[k+1][N],L[N+1])}const u=[],y=[],m=(k,N,L)=>{const z=k.at(-1);z&&(z.kind===L||L==="same"&&!N.trim())?z.text+=N:k.push({text:N,kind:L})};let b=0,h=0;for(;b<r.length&&h<a.length;)r[b]===a[h]?(m(u,r[b],"same"),m(y,a[h],"same"),b++,h++):l[b+1][h]>=l[b][h+1]?(m(u,r[b],"changed"),b++):(m(y,a[h],"changed"),h++);for(;b<r.length;b++)m(u,r[b],"changed");for(;h<a.length;h++)m(y,a[h],"changed");return{mine:u,theirs:y}}function Zc(n){const e=ct.c(10);let r,a;e[0]!==n?({open:r,...a}=n,e[0]=n,e[1]=r,e[2]=a):(r=e[1],a=e[2]);const{data:l}=Io.useSession();let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=me("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=u):u=e[3];const y=l?.user??null;let m;e[4]!==a||e[5]!==y?(m=o.jsx(ac,{className:u,"data-testid":"form-conflict-dialog",onEscapeKeyDown:tu,children:o.jsx(iu,{...a,viewer:y,heading:eu})}),e[4]=a,e[5]=y,e[6]=m):m=e[6];let b;return e[7]!==r||e[8]!==m?(b=o.jsx(uc,{open:r,children:m}),e[7]=r,e[8]=m,e[9]=b):b=e[9],b}function eu(n,e){return o.jsxs(ic,{className:"text-left",children:[o.jsx(lc,{children:n}),o.jsx(cc,{children:e})]})}function tu(n){return n.preventDefault()}const nu={},su=(n,e)=>o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold",children:n}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function ru(n,e,r=0,a={},l=null){const u=e[Math.min(r,e.length-1)],y=l?.you?void 0:l?.name?.split(/\s+/)[0],m={field:u?au(u.label):"",label:u?.label??"",name:y??""},b=(h,k,N)=>n(l?.you?N:y?k:h,m);return e.length<=1?{title:b("sectionsEditor.formConflict.titleOne","sectionsEditor.formConflict.titleOneNamed","sectionsEditor.formConflict.titleOneYou"),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:b("sectionsEditor.formConflict.titleStep","sectionsEditor.formConflict.titleStepNamed","sectionsEditor.formConflict.titleStepYou"),description:r>=e.length-1?o.jsx(ou,{t:n,fields:e,choices:a,name:y}):n("sectionsEditor.formConflict.descriptionStep")}}function ou(n){const e=ct.c(11),{t:r,fields:a,choices:l,name:u}=n;let y;if(e[0]!==l||e[1]!==a||e[2]!==u||e[3]!==r){let b;e[5]!==l||e[6]!==u||e[7]!==r?(b=(h,k)=>o.jsxs(R.Fragment,{children:[k>0&&" · ",`${h.label}: `,o.jsx("span",{className:"font-medium text-foreground",children:r((l[h.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":u?"sectionsEditor.formConflict.summaryTheirsNamed":"sectionsEditor.formConflict.summaryTheirs",{name:u??""})})]},h.pointer),e[5]=l,e[6]=u,e[7]=r,e[8]=b):b=e[8],y=a.map(b),e[0]=l,e[1]=a,e[2]=u,e[3]=r,e[4]=y}else y=e[4];let m;return e[9]!==y?(m=o.jsx("span",{"data-testid":"form-conflict-summary",children:y}),e[9]=y,e[10]=m):m=e[10],m}function au(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function iu(n){const e=ct.c(68),r=Lt(),{fields:a,choices:l,changedAgain:u,fresh:y,heading:m}=n,b=u===void 0?!1:u,h=y===void 0?nu:y,k=m===void 0?su:m,N=a.length>1,[L,z]=R.useState(0),[H,B]=R.useState(lu);let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w={},e[0]=w):w=e[0];const[p,te]=R.useState(w),E=Math.max(0,Math.min(L,a.length-1)),W=a[E],V=E===a.length-1;let J;e[1]!==E||e[2]!==a||e[3]!==h?(J=xe=>{const O=a[E],oe=a[xe];!O||!oe||xe===E||(B(G=>new Set(G).add(O.pointer)),te(G=>({...G,[O.pointer]:h[O.pointer]??0,[oe.pointer]:h[oe.pointer]??0})),z(xe))},e[1]=E,e[2]=a,e[3]=h,e[4]=J):J=e[4];const g=J;let Q;e[5]!==E||e[6]!==g?(Q=xe=>{if(!xe)return;const O=oe=>{const G={ArrowLeft:-1,ArrowRight:1}[oe.key];!G||oe.defaultPrevented||oe.altKey||oe.ctrlKey||oe.metaKey||oe.shiftKey||fc(oe.target)||(oe.preventDefault(),g(E+G))};return xe.ownerDocument.addEventListener("keydown",O),()=>xe.ownerDocument.removeEventListener("keydown",O)},e[5]=E,e[6]=g,e[7]=Q):Q=e[7];const x=Q;if(!W)return null;let Z,q,pe,ye,ue;if(e[8]!==H||e[9]!==E||e[10]!==l||e[11]!==a||e[12]!==h||e[13]!==g||e[14]!==k||e[15]!==x||e[16]!==N||e[17]!==n||e[18]!==p||e[19]!==r){const{title:xe,description:O}=ru(r,a,E,l,n.author??null);let oe;e[25]!==n?(oe=G=>{G.detail>1||n.onApply()},e[25]=n,e[26]=oe):oe=e[26],Z=oe,q=N?x:void 0,pe="flex min-w-0 flex-col gap-3",e[27]!==H||e[28]!==E||e[29]!==a||e[30]!==h||e[31]!==g||e[32]!==N||e[33]!==p||e[34]!==r?(ye=N&&o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("div",{role:"group","aria-label":r("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:a.map((G,Ie)=>{const ke=Ie!==E&&(h[G.pointer]??0)>(p[G.pointer]??0);return o.jsx("button",{type:"button","aria-label":ke?r("sectionsEditor.formConflict.stepChangedAgain",{label:G.label}):G.label,"aria-current":Ie===E?"step":void 0,"data-answered":Ie!==E&&H.has(G.pointer)?"":void 0,"data-changed-again":ke?"":void 0,onClick:()=>g(Ie),className:"group cursor-pointer rounded-full p-1 focus-ring",children:o.jsx("span",{className:me("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},G.pointer)})}),o.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:r("sectionsEditor.formConflict.stepCount",{step:String(E+1),count:String(a.length)})})]}),e[27]=H,e[28]=E,e[29]=a,e[30]=h,e[31]=g,e[32]=N,e[33]=p,e[34]=r,e[35]=ye):ye=e[35],ue=k(xe,O),e[8]=H,e[9]=E,e[10]=l,e[11]=a,e[12]=h,e[13]=g,e[14]=k,e[15]=x,e[16]=N,e[17]=n,e[18]=p,e[19]=r,e[20]=Z,e[21]=q,e[22]=pe,e[23]=ye,e[24]=ue}else Z=e[20],q=e[21],pe=e[22],ye=e[23],ue=e[24];let fe;e[36]!==q||e[37]!==pe||e[38]!==ye||e[39]!==ue?(fe=o.jsxs("div",{ref:q,className:pe,children:[ye,ue]}),e[36]=q,e[37]=pe,e[38]=ye,e[39]=ue,e[40]=fe):fe=e[40];const Re=!b&&"sr-only";let j;e[41]!==Re?(j=me("text-sm text-muted-foreground",Re),e[41]=Re,e[42]=j):j=e[42];let re;e[43]!==b||e[44]!==N||e[45]!==r?(re=b?r(N?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=b,e[44]=N,e[45]=r,e[46]=re):re=e[46];let Ae;e[47]!==j||e[48]!==re?(Ae=o.jsx("p",{role:"status",className:j,children:re}),e[47]=j,e[48]=re,e[49]=Ae):Ae=e[49];const Ce=N?"vertical":"all";let S;e[50]!==W||e[51]!==n||e[52]!==Ce?(S=o.jsx(fu,{field:W,...n,arrows:Ce}),e[50]=W,e[51]=n,e[52]=Ce,e[53]=S):S=e[53];let I;e[54]!==Ae||e[55]!==S?(I=o.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[Ae,S]}),e[54]=Ae,e[55]=S,e[56]=I):I=e[56];let he;e[57]!==Z||e[58]!==E||e[59]!==g||e[60]!==V||e[61]!==N||e[62]!==r?(he=N?o.jsxs(_o,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[o.jsx(Et,{type:"button",variant:"outline","aria-disabled":E===0,onClick:()=>g(E-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:r("sectionsEditor.formConflict.back")}),o.jsx(Et,{type:"button","data-testid":"form-conflict-primary",onClick:V?Z:()=>g(E+1),children:r(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):o.jsx(_o,{className:"items-center gap-2",children:o.jsx(Et,{type:"button","data-testid":"form-conflict-primary",onClick:Z,children:r("sectionsEditor.formConflict.ok")})}),e[57]=Z,e[58]=E,e[59]=g,e[60]=V,e[61]=N,e[62]=r,e[63]=he):he=e[63];let M;return e[64]!==fe||e[65]!==I||e[66]!==he?(M=o.jsxs(o.Fragment,{children:[fe,I,he]}),e[64]=fe,e[65]=I,e[66]=he,e[67]=M):M=e[67],M}function lu(){return new Set}function cu(n){const e=Xn(n.mine,n.schema),r=Xn(n.theirs,n.schema),a=e.kind==="text"&&r.kind==="text"?Xc(e.text,r.text):null;return l=>a?o.jsx(pu,{parts:a[l]}):o.jsx(gu,{preview:l==="mine"?e:r})}const uu={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function du(n,e){const r=uu[e][n.key];if(!r)return;const a=[...n.currentTarget.querySelectorAll('[role="radio"]')],l=a.indexOf(document.activeElement);if(l<0)return;n.preventDefault();const u=a[(l+r+a.length)%a.length];u?.focus(),u?.click()}function fu(n){const e=ct.c(65),{field:r,choices:a,viewer:l,author:u,onChoose:y,arrows:m}=n,b=u===void 0?null:u,h=Lt(),[k]=fi(),{language:N}=k;let L,z,H,B,w,p,te,E,W,V,J,g,Q,x;if(e[0]!==m||e[1]!==b||e[2]!==a||e[3]!==r||e[4]!==N||e[5]!==y||e[6]!==h||e[7]!==l?.image||e[8]!==l?.name){const pe=cu(r),ye=a[r.pointer]??"mine",ue=l?.image??void 0;let fe;e[23]!==h||e[24]!==l?.name?(fe=l?.name?.trim()||h("sectionsEditor.formConflict.you"),e[23]=h,e[24]=l?.name,e[25]=fe):fe=e[25];let Re;e[26]!==ue||e[27]!==fe?(Re=o.jsx(_s,{url:ue,fallback:fe,shape:"circle",size:"sm",className:"text-xs"}),e[26]=ue,e[27]=fe,e[28]=Re):Re=e[28];const j=Re;let re;e[29]!==b||e[30]!==j?(re=b?.you?j:b?.name?o.jsx(_s,{url:b.avatarUrl,fallback:b.name,shape:"circle",size:"sm",className:"text-xs"}):o.jsx(_s,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[29]=b,e[30]=j,e[31]=re):re=e[31];const Ae=re,Ce=b?new Date(b.at):null;H="radiogroup",B=r.label,w="flex flex-col gap-2",e[32]!==m?(p=M=>du(M,m),e[32]=m,e[33]=p):p=e[33];let S;e[34]!==r.pointer||e[35]!==y?(S=()=>y(r.pointer,"mine"),e[34]=r.pointer,e[35]=y,e[36]=S):S=e[36];let I;e[37]!==h?(I=h("sectionsEditor.formConflict.you"),e[37]=h,e[38]=I):I=e[38];let he;e[39]!==h?(he=h("sectionsEditor.formConflict.yourVersionNotSaved"),e[39]=h,e[40]=he):he=e[40],te=o.jsx(Vo,{side:"mine",checked:ye==="mine",onChoose:S,avatar:j,who:I,meta:he,children:pe("mine")}),L=Vo,E="theirs",W=ye==="theirs",e[41]!==r.pointer||e[42]!==y?(V=()=>y(r.pointer,"theirs"),e[41]=r.pointer,e[42]=y,e[43]=V):V=e[43],J=Ae,e[44]!==b?.name||e[45]!==b?.you||e[46]!==h?(g=b?.you?h("sectionsEditor.formConflict.youElsewhere"):b?.name||h("sectionsEditor.formConflict.someoneElse"),e[44]=b?.name,e[45]=b?.you,e[46]=h,e[47]=g):g=e[47],Q=Ce?h("sectionsEditor.formConflict.savedAt",{when:dc(Ce,N)}):h("sectionsEditor.formConflict.theirVersionSaved"),x=Ce?mu(Ce,N):void 0,z=pe("theirs"),e[0]=m,e[1]=b,e[2]=a,e[3]=r,e[4]=N,e[5]=y,e[6]=h,e[7]=l?.image,e[8]=l?.name,e[9]=L,e[10]=z,e[11]=H,e[12]=B,e[13]=w,e[14]=p,e[15]=te,e[16]=E,e[17]=W,e[18]=V,e[19]=J,e[20]=g,e[21]=Q,e[22]=x}else L=e[9],z=e[10],H=e[11],B=e[12],w=e[13],p=e[14],te=e[15],E=e[16],W=e[17],V=e[18],J=e[19],g=e[20],Q=e[21],x=e[22];let Z;e[48]!==L||e[49]!==z||e[50]!==E||e[51]!==W||e[52]!==V||e[53]!==J||e[54]!==g||e[55]!==Q||e[56]!==x?(Z=o.jsx(L,{side:E,checked:W,onChoose:V,avatar:J,who:g,meta:Q,metaTitle:x,children:z}),e[48]=L,e[49]=z,e[50]=E,e[51]=W,e[52]=V,e[53]=J,e[54]=g,e[55]=Q,e[56]=x,e[57]=Z):Z=e[57];let q;return e[58]!==H||e[59]!==B||e[60]!==w||e[61]!==p||e[62]!==te||e[63]!==Z?(q=o.jsxs("div",{role:H,"aria-label":B,className:w,onKeyDown:p,children:[te,Z]}),e[58]=H,e[59]=B,e[60]=w,e[61]=p,e[62]=te,e[63]=Z,e[64]=q):q=e[64],q}const mu=(n,e)=>n.toLocaleString(e,{dateStyle:"medium",timeStyle:"short"});function Vo(n){const e=ct.c(28),{side:r,checked:a,onChoose:l,avatar:u,who:y,meta:m,metaTitle:b,children:h}=n,k=R.useId(),N=`${k}-who`,L=`${k}-meta ${k}-value`,z=a?0:-1,H=a?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-accent";let B;e[0]!==H?(B=me("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] focus-ring",H),e[0]=H,e[1]=B):B=e[1];const w=`${k}-who`;let p;e[2]!==w||e[3]!==y?(p=o.jsx("span",{id:w,className:"text-sm font-medium text-foreground",children:y}),e[2]=w,e[3]=y,e[4]=p):p=e[4];const te=`${k}-meta`;let E;e[5]!==m||e[6]!==b||e[7]!==te?(E=o.jsx("span",{id:te,title:b,children:m}),e[5]=m,e[6]=b,e[7]=te,e[8]=E):E=e[8];let W;e[9]!==p||e[10]!==E?(W=o.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[p,E]}),e[9]=p,e[10]=E,e[11]=W):W=e[11];const V=`${k}-value`,J=`conflict-${r}`;let g;e[12]!==h||e[13]!==V||e[14]!==J?(g=o.jsx("span",{id:V,"data-testid":J,className:"min-w-0 text-sm",children:h}),e[12]=h,e[13]=V,e[14]=J,e[15]=g):g=e[15];let Q;e[16]!==W||e[17]!==g?(Q=o.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[W,g]}),e[16]=W,e[17]=g,e[18]=Q):Q=e[18];let x;return e[19]!==u||e[20]!==a||e[21]!==l||e[22]!==N||e[23]!==Q||e[24]!==L||e[25]!==z||e[26]!==B?(x=o.jsxs("button",{type:"button",role:"radio","aria-checked":a,"aria-labelledby":N,"aria-describedby":L,tabIndex:z,onClick:l,className:B,children:[u,Q]}),e[19]=u,e[20]=a,e[21]=l,e[22]=N,e[23]=Q,e[24]=L,e[25]=z,e[26]=B,e[27]=x):x=e[27],x}function pu(n){const e=ct.c(4),{parts:r}=n;let a;e[0]!==r?(a=r.map(hu),e[0]=r,e[1]=a):a=e[1];let l;return e[2]!==a?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:a}),e[2]=a,e[3]=l):l=e[3],l}function hu(n,e){return n.kind==="changed"?o.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):o.jsx("span",{children:n.text},e)}function gu(n){const e=ct.c(29),{preview:r}=n,a=Lt();switch(r.kind){case"empty":{let l;e[0]!==a?(l=a("sectionsEditor.formConflict.empty"),e[0]=a,e[1]=l):l=e[1];let u;return e[2]!==l?(u=o.jsx("span",{className:"italic text-muted-foreground",children:l}),e[2]=l,e[3]=u):u=e[3],u}case"text":{let l;return e[4]!==r.text?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:r.text}),e[4]=r.text,e[5]=l):l=e[5],l}case"image":{let l;return e[6]!==r.src?(l=o.jsx("img",{src:r.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=r.src,e[7]=l):l=e[7],l}case"yesNo":{const l=r.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let u;e[8]!==a||e[9]!==l?(u=a(l),e[8]=a,e[9]=l,e[10]=u):u=e[10];let y;return e[11]!==u?(y=o.jsx("span",{children:u}),e[11]=u,e[12]=y):y=e[12],y}case"list":{const l=r.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",u=String(r.count);let y;e[13]!==a||e[14]!==l||e[15]!==u?(y=a(l,{count:u}),e[13]=a,e[14]=l,e[15]=u,e[16]=y):y=e[16];let m;e[17]!==y?(m=o.jsx("span",{className:"text-muted-foreground",children:y}),e[17]=y,e[18]=m):m=e[18];let b;e[19]!==r.count||e[20]!==r.items?(b=r.items.some(Boolean)&&o.jsxs("span",{className:"flex flex-col",children:[r.items.map(yu),r.count>r.items.length&&o.jsx("span",{children:"…"})]}),e[19]=r.count,e[20]=r.items,e[21]=b):b=e[21];let h;return e[22]!==m||e[23]!==b?(h=o.jsxs("span",{className:"flex flex-col gap-1",children:[m,b]}),e[22]=m,e[23]=b,e[24]=h):h=e[24],h}case"fields":{let l;e[25]!==r.entries?(l=r.entries.map(vu),e[25]=r.entries,e[26]=l):l=e[26];let u;return e[27]!==l?(u=o.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:l}),e[27]=l,e[28]=u):u=e[28],u}}}function vu(n){return o.jsxs("div",{className:"contents",children:[o.jsx("dt",{className:"text-muted-foreground",children:n.label}),o.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function yu(n,e){return o.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function xu(n,e){return n.kind==="protocol"&&n.source==="github"?e:null}function bu(n,e){if(Object.hasOwn(n,e))return n[e]??null;const r=fo(e),a=Object.keys(n).find(l=>fo(l)===r);return a===void 0?null:n[a]??null}async function Su(n,e){try{const r=await fetch(`/api/${n.orgSlug}/decofile/${encodeURIComponent(n.virtualMcpId)}/${encodeURIComponent(n.branch)}`,{cache:"no-store",headers:Qi("v8")});if(!r.ok)return null;const a=await r.json().catch(()=>({})),l=bu(a.changedBy??{},e);return l&&typeof l.userId=="string"&&Number.isFinite(Date.parse(l.at))?l:null}catch{return null}}function _u(n,e,r){const a=e.find(y=>y.userId===n.userId),l=a?.user?.name?.trim(),u=a?.user?.image??void 0;return{...l?{name:l}:{},...u?{avatarUrl:u}:{},at:n.at,you:!!r&&n.userId===r}}function wu(n){let e=2166136261,r=0;for(let a=0;a<n.length;a++){const l=n.charCodeAt(a);e=Math.imul(e^l,16777619),r=Math.imul(r,31)+l|0}return`${(e>>>0).toString(36)}${(r>>>0).toString(36)}:${n.length}`}function ju(n,e,r){const a=ct.c(19),l=!!n&&!!e&&r!==null;let u;a[0]!==e||a[1]!==n||a[2]!==r?(u=Ko.conflictAuthor(n?`${n.orgSlug}/${n.virtualMcpId}/${n.branch}`:"",e??"",r??""),a[0]=e,a[1]=n,a[2]=r,a[3]=u):u=a[3];let y;a[4]!==e||a[5]!==n?(y=()=>Su(n,e),a[4]=e,a[5]=n,a[6]=y):y=a[6];let m;a[7]!==l||a[8]!==u||a[9]!==y?(m={queryKey:u,queryFn:y,enabled:l,staleTime:Number.POSITIVE_INFINITY,gcTime:6e5,retry:!1,refetchOnWindowFocus:!1},a[7]=l,a[8]=u,a[9]=y,a[10]=m):m=a[10];const{data:b}=mi(m),h=l?b??null:null,k=!!h;let N;a[11]!==k?(N={enabled:k},a[11]=k,a[12]=N):N=a[12];const{data:L}=mc(N);let z;a[13]!==L?(z=L?.data?.members??[],a[13]=L,a[14]=z):z=a[14];const H=z,{data:B}=Io.useSession();if(!h)return null;const w=B?.user?.id??null;let p;return a[15]!==h||a[16]!==H||a[17]!==w?(p=_u(h,H,w),a[15]=h,a[16]=H,a[17]=w,a[18]=p):p=a[18],p}function ku(n,e,r,a){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const l=e.trim();if(!l)return Qt(n,r,a)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:Rs(n,r,a)}:{kind:"noop"};const u=As(n,r,a);if(!u)return{kind:"error",reason:"unreadable-rule"};if(u.blockKey)return{kind:"updateBlock",blockKey:u.blockKey,blockData:Ot(u.resolveType,u.data,l)};const y=Gn(l),m=Un(y,r);return m?{kind:"error",reason:"invalid-block-id",message:m}:{kind:"createBlock",blockId:y,blockData:Ot(u.resolveType,u.data,l),reference:dn(y)}}const Po="section-form-stale-save",Eu=3,Ru=1e3;function Mo(n,e,r){const a=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?n[e.pageKey]?.sections:void 0,n,r),l=Math.max(0,Math.min(e.pageVariantIndex,a.length-1)),u=a[l]?.sections??[];return{pageVariants:a,variantIndex:l,rawSections:u,parsedSections:En(u,n,r)}}const Do=new WeakMap;let Au=0;function Cu(n){let e=Do.get(n);return e===void 0&&(e=++Au,Do.set(n,e)),e}function gm({orgSlug:n,virtualMcpId:e,branch:r,previewReady:a=!0,previewUrl:l,currentPath:u,activePageBlockKey:y=null,activeGlobalBlockKey:m=null,externalSelection:b,onSaved:h,initialEditSeo:k=!1,onExitSeo:N,onSelectRoot:L,onViewJsonFile:z,onFocusedBlockChange:H,onVariantPreviewOverride:B,focusVariant:w}){const p=Lt(),te=gi(),E=te?.taskId??null,W=a?{orgSlug:n,virtualMcpId:e,branch:r,threadId:E,previewUrl:l}:null,[V,J]=R.useState([]),{data:g,isLoading:Q}=Xi(W,{pollWhile:V.length>0}),{data:x,isLoading:Z}=il(W),q=Zn(),pe=te?.virtualMcpId,ue=qi(pe===e?e:null)?.metadata?.siteSlug??null,fe=sc({virtualMcpId:e,branch:r,sandboxUrl:l}),Re=Zi(e,r),j=el(Re),re=ul(j),Ae=!j,Ce=!!fe||j,[S,I]=R.useState(null),[he,M]=R.useState(null),[xe,O]=R.useState(null),[oe,G]=R.useState(0),[Ie,ke]=R.useState(void 0),[ut,Ze]=R.useState(null),[$e,qe]=R.useState(null);w&&w.seq!==ut&&(Ze(w.seq),qe(w));const[at,Ge]=R.useState(null),Ue={index:at,remember:Ge},[Ye,de]=R.useState(null),[ge,be]=R.useState(null),[ee,F]=R.useState([]),De=R.useRef(null),[et,tt]=R.useState(ee.length);et!==ee.length&&(tt(ee.length),requestAnimationFrame(()=>{De.current&&(De.current.scrollTop=0)}));const[st,K]=R.useState(0),[Je,ie]=R.useState(null),[Ne,ze]=R.useState(null),[rt,it]=R.useState(null),[Qo,Zt]=R.useState(!1),[Fs,es]=R.useState(!1),Rn=R.useRef(null),[An,Xo]=R.useState(!0),[en,Cn]=R.useState(!1),[$t,Nn]=R.useState(!1),[He,fn]=R.useState(k),[Bs,Os]=R.useState(k);k&&!Bs&&(Os(!0),fn(!0),I(null),M(null),O(null),F([])),!k&&Bs&&Os(!1);const[Zo,mn]=R.useState(null),[Ls,Tn]=R.useState(void 0),[$s,zt]=R.useState([]),[zs,tn]=R.useState(0),[Qe,dt]=R.useState(0),[ea,Xe]=R.useState(null),[nn,nt]=R.useState(null),[Hs,Ws]=R.useState(null),qs=pi(),Gs=tl({orgSlug:n,virtualMcpId:e,branch:r},{tunnel:!1}),pn=Ri({orgSlug:n,virtualMcpId:e,branch:r}),[ta,na]=R.useState(u),[sa,ra]=R.useState(y),[oa,aa]=R.useState(m);(ta!==u||sa!==y||oa!==m)&&(queueMicrotask(()=>pn.flush()),na(u),ra(y),aa(m),I(null),M(null),O(null),G(0),de(null),be(null),dt(0),Xe(null),nt(null),F([]),K(t=>t+1),fn(!1),mn(null),Tn(void 0),zt([]),tn(t=>t+1));const X=Ai({orgSlug:n,virtualMcpId:e,branch:r}),hn=zi((t,s)=>{X.mutate({blockKey:t,data:s},{onSuccess:()=>h?.(),onError:X.reportError})}),Vn=ml({orgSlug:n,virtualMcpId:e,branch:r}),Us=vc({orgSlug:n,virtualMcpId:e,branch:r}),[sn,rn]=R.useState(!1),$=R.useRef(null),Tt=R.useRef(null),ht=R.useRef(null),gt=R.useRef(null),Pn=R.useRef({}),Ht=R.useRef(null),gn=R.useRef(!1),vn=R.useRef(!1),Ke=R.useRef(new Map),on=R.useRef(!1),_t=R.useRef([]),ts=R.useRef(new WeakSet);nl(n,e,t=>{const{activePageKey:s,rawSections:i,parsedSections:c,selectedSectionIndex:d}=Se.current,v=new Set;s&&v.add(s);for(const f of[Tt.current?.sectionIndex,d]){const _=f==null?void 0:i[f],D=f==null?void 0:c[f],A=_&&D?.isSavedBlock?ys(_,D):null;A&&v.add(A)}if([...v].some(f=>t.has(f))){for(const f of[$,ht,gt])f.current&&clearTimeout(f.current),f.current=null;Tt.current=null,Ke.current.clear(),s&&t.has(s)&&(Pn.current={})}});const Se=R.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Ys,Js]=R.useState(0),[ia,la]=R.useState(0),ca=ju(xu(Re,{orgSlug:n,virtualMcpId:e,branch:r}),V[0]?.blockKey??null,V[0]?wu(Le(V[0].plan.theirs)):null),[ua,da]=R.useState(null),ns=sl(n,e).epoch,[fa,ma]=R.useState(ns);if(!a||Q||Z)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(hi,{className:"size-5 text-muted-foreground"})});if(!g||!x)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const pa=vl(g,x),ne=!!m,_e=ne?null:yl(pa,u,y),C=ne?m:_e?.key??null,Mn=ne&&m?g[m]:void 0,Qs=ne&&m&&Mn?xl(m,Mn):ne&&m?m:"",Wt=!ne&&C&&g[C]?g[C]:null,ss=He&&g&&x&&C&&_e?Zr(g,{kind:"page",pageKey:C,pageName:String(_e.name??""),path:String(_e.path??"")},x):null,ha=He?Wt?.seo:void 0,Dn=Ls!==void 0?Ls:ha,ga=He?Ci(Dn):void 0,Xs=ss?.seoTypeOptions??[],Zs=He&&x?Ni(x):"",rs=Zo??ga??{},In=He&&ss?pc(rs,ss):null,er=He&&In&&Ti(Dn)?qn(In,x):null,tr=He?Vi(g,x)?.seoData:void 0,Te=ne?[{label:"Default",sections:[{__resolveType:m}]}]:Fo(Wt?.sections,g??{},j),vt=Te.length>1,ve=Math.min(oe,Te.length-1),Fe=Te[ve],U=Fe?.sections??[],Ve=En(U,g,j),Kn=!ne&&bl(Wt?.sections,j);if(ne&&m&&Hs!==m){Ws(m);const t=U[0],s=Ve[0];if(t&&s){I(0),dt(0),F([]);const i=kt(t,s,g,j);i&&(M(i.data),O(i.resolveType),nt(null),Xe(null))}}!ne&&Hs!==null&&Ws(null),Se.current={rawSections:U,parsedSections:Ve,decofile:g??{},activePageKey:C,pageVariants:Te,variantIndex:ve,sectionVariantIndex:Qe,selectedSectionIndex:S};const va=()=>({multivariate:Kn,index:ve,variants:Te.map(t=>({rule:t.rule})),lazyValues:j&&Kn&&Ml(Wt?.sections?.variants?.[ve]?.value)}),os=(t,s)=>{if(!B)return;if(!C||!Kn||t.length<=1){B(null);return}const i={multivariate:!0,index:s,variants:t},c=j?jo(C,i):ko(C,i,g,x);B(c.length>0?c:null)},as=B&&C&&Kn&&vt&&!Q&&!Z?C:null;if(as!==ua&&(da(as),as)){const t=Te.map(i=>({rule:i.rule})),s=ve;queueMicrotask(()=>os(t,s))}const qt=(t,s,i)=>{if(!B)return;if(!C){B(null);return}const c=va(),d=j?jo(C,c):ko(C,c,g,x);if(!t||s<0){B(d.length>0?d:null);return}const v={pageKey:C,page:c,sectionIndex:s,sectionLazy:Ve[s]?.isLazy??!1,mvObj:t,selectedVariantIndex:i},f=j?yc(v):xc({...v,decofile:g,meta:x}),_=j?bc(d,f):[...d,...f];B(_.length>0?_:null)},wt=(t,s,i,c=S??-1,d=!1)=>{const v=ot(t,s);if(!v){M(null),O(null),nt(null),Xe(null),d&&qt(null,c,i);return}const _=Es(v,re)[i];if(!_){M(null),O(null),nt(null),Xe(null),d&&qt(null,c,i);return}const D=Lo(_.value,g);M(D?.data??null),O(D?.resolveType??null);const{resolveType:A,formValue:T}=Jt(_.rule,g,x??void 0);nt(A),Xe(T),d&&qt(v,c,i)},yn=t=>{ze(null),G(t),I(null),M(null),O(null),F([]);const s=Te[t]?.rule,{resolveType:i,formValue:c}=Jt(s,g??{},x??void 0);be(i),de(c),os(Te.map(d=>({rule:d.rule})),t)},nr=(t,s)=>{const i=U[t],c=Ve[t];if(!i||!c)return!1;const d=c.isMultivariate?ot(i,c)?.variants?.length??0:0,v=s<d?s:0;if(I(t),dt(v),F([]),K(f=>f+1),c.isMultivariate)wt(i,c,v,t);else{const f=kt(i,c,g,j);f?(M(f.data),O(f.resolveType)):(M(null),O(null)),nt(null),Xe(null)}return!0},sr=b?.index;if(b!==void 0&&(b?.seq??null)!==Ie&&(ke(b?.seq??null),typeof sr=="number"&&nr(sr,0)),$e&&(ne?Mn:Wt)){const t=$e.pageVariant,s=!ne&&t!==void 0&&t<Te.length;if(s&&t!==ve)yn(t);else{qe(null);const{section:i,variant:c}=$e;if(ne)c!==void 0&&(Ge(c),F([]),K(d=>d+1));else if(i!==void 0&&nr(i,c??0)){const d=U[i],v=Ve[i],f=v.isMultivariate?ot(d,v):null;f&&c!==void 0&&queueMicrotask(()=>qt(f,i,c))}else s&&yn(t)}}if(ns!==fa){ma(ns);const t=$.current!==null||Ke.current.size>0||gt.current!==null||ht.current!==null||X.isPending||pn.isPending||V.length>0,s=S!==null&&Co(De.current,document.activeElement);if(!t&&s&&(on.current=!0),!t&&!s&&S!==null){const i=U[S],c=Ve[S];if(F([]),K(d=>d+1),!i||!c)I(null),M(null),O(null);else if(c.isMultivariate)wt(i,c,Qe,S);else{const d=kt(i,c,g,j);M(d?.data??null),O(d?.resolveType??null)}}!t&&He&&(mn(null),Tn(void 0),tn(i=>i+1))}if(Ys!==ia){la(Ys);const t=S!==null?U[S]:null,s=S!==null?Ve[S]:null;if(t&&s&&S!==null)if(F([]),K(i=>i+1),s.isMultivariate)wt(t,s,Qe,S);else{const i=kt(t,s,g,j);M(i?.data??null),O(i?.resolveType??null)}}const ft=V[0];if(ft){const{formBase:t,target:s}=ft,i=Mo(g,s,j),c=t.sectionIndex,d=i.rawSections.length===t.sectionCount?js(i.rawSections[c],i.parsedSections[c],s.sectionVariantIndex,g,j):null,v=$c(ft,d,f=>Ro(t,f));if(v){const _=[{...ft,...v,changedAgain:!0},...V.slice(1)];_t.current=_,J(_)}}const xn={orgSlug:n,virtualMcpId:e,branch:r,threadId:E,previewUrl:j?void 0:l??void 0,siteSlug:ue},Fn=xe&&x?qn(xe,x):null,mt=(t,s)=>{if(!C)return;$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear(),gt.current&&(clearTimeout(gt.current),gt.current=null),ht.current&&(clearTimeout(ht.current),ht.current=null);const i=cn(g,C,t,ve,Te);X.mutate({blockKey:C,data:i},{onSuccess:()=>s?.onSuccess?.()??h?.(),onError:c=>{s?.onError?.(),X.reportError(c)}})},Gt=()=>{H?.(null),I(null),Nn(!1),M(null),O(null),dt(0),Xe(null),nt(null),F([]),K(t=>t+1)},rr=()=>Co(De.current,document.activeElement),is=(t=p("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if($.current&&(clearTimeout($.current),$.current=null),Ke.current.clear(),Tt.current=null,ae.error(t,{id:Po}),rr()){on.current=!0;return}Js(s=>s+1)},or=()=>{!on.current||rr()||_t.current.length>0||$.current!==null||gn.current||vn.current||Ke.current.size>0||(on.current=!1,Js(t=>t+1))},ar=()=>{on.current&&setTimeout(or,0)},ir=t=>ol(qs,Gs,t),lr=t=>{Ke.current.size!==0&&setTimeout(()=>{if(gn.current||vn.current)return;const s=[...Ke.current.values()];Ke.current.clear();for(const i of s)i()},t)},ya=t=>{const{activePageKey:s,variantIndex:i,sectionVariantIndex:c}=Se.current,d=Ht.current;return{formBase:d?.sectionIndex===t&&d.variantIndex===c?d:null,pageKey:s,global:ne,pageVariantIndex:i,sectionVariantIndex:c,schema:Fn}},bn=t=>{_t.current=t,J(t)},xa=t=>{const s=_t.current,i=s.findIndex(v=>v.formBase===t.formBase),c=i>=0?s[i]:void 0,d=c?s.with(i,{...t,choices:Ms(c.plan,c.choices,t.plan),fresh:Yo(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||Le(c.plan.theirs)!==Le(t.plan.theirs)}):[...s,{...t,changedAgain:ts.current.has(t.formBase)}];bn(d)},cr=(t,s)=>{const i=_t.current,c=i.findIndex(f=>f.formBase===t),d=i[c];if(!d)return!1;if(Le(d.plan.mine)===Le(s))return!0;const v=Vs({...d.plan,mine:s});if(v.pointers.length===0){const f=i.filter(_=>_!==d);return bn(f),!1}return bn(i.with(c,{...d,plan:v,choices:Ms(d.plan,d.choices,v)})),!0},ba=t=>{const s=Se.current;return s.selectedSectionIndex===t.formBase.sectionIndex&&s.activePageKey===t.target.pageKey&&s.variantIndex===t.target.pageVariantIndex&&s.sectionVariantIndex===t.target.sectionVariantIndex},Sa=()=>{const t=_t.current[0];if(!t)return null;const{formBase:s,target:i}=t;$.current&&Tt.current?.sectionIndex===s.sectionIndex&&Tt.current.sectionVariantIndex===i.sectionVariantIndex&&(clearTimeout($.current),$.current=null,Tt.current=null),Ke.current.delete(`${i.pageKey}:${s.sectionIndex}:${i.sectionVariantIndex}`);const c=s.emitted;return c&&typeof c=="object"&&!cr(s,c)&&Sn(c,s.sectionIndex,0,i),_t.current[0]??null},_a=()=>{const t=_t.current[0],s=Sa();if(!s||!t||s.formBase!==t.formBase||s.plan.pointers.some(v=>!t.plan.pointers.includes(v)))return;const i=Oc(s.plan,s.choices);bn(_t.current.slice(1));const{formBase:c,target:d}=s;c.base=s.plan.theirs,c.version=void 0,c.emitted=i,ts.current.add(c),(Ht.current===c||ba(s))&&(Ht.current=c,M(i),K(v=>v+1)),Sn(i,c.sectionIndex,0,d)},wa=t=>{const[s,...i]=_t.current;s&&bn([{...s,choices:t},...i])},Sn=(t,s,i=0,c)=>{const d=c??ya(s),v=d.sectionVariantIndex,f=d.formBase,_=Tt.current;$.current&&(clearTimeout($.current),$.current=null,_&&(_.sectionIndex!==s||_.sectionVariantIndex!==v)&&_.write());const D=`${d.pageKey}:${s}:${v}`,A=()=>{if(gn.current||vn.current){Ke.current.set(D,A);return}const T=typeof t=="function"?t():t;if(f&&cr(f,T))return;const P=Se.current.decofile,{rawSections:se,parsedSections:le,pageVariants:Be,variantIndex:we}=Mo(P,d,j),Pe=d.pageKey,Y=se[s];if(!Y)return;const ce=le[s];if(!ce)return;const Me=f?.base,We=js(Y,ce,v,P,j),xt=!!Me&&!!We&&qo(Me,We)&&!(f&&Ro(f,We));if(xt&&Me&&We){if(Go(Me,We)){is(p("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const je=ce.isSavedBlock?"here":Fc(Me,se.map((Ee,It)=>js(Ee,le[It],v,P,j)),s,f?.sectionCount??se.length);if(je==="unknown"){is(p("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof je=="number"&&f){f.sectionCount=se.length,f.sectionIndex=je,Ht.current===f&&I(je),Sn(T,je,i,d);return}}const lt=xt&&Me&&We?Vs({ancestor:Me,mine:T,theirs:We}):null;if(lt&<.pointers.length>0&&f){f.sectionCount=se.length,xa({plan:lt,formBase:f,target:d,sectionIndex:s,choices:Uo(lt),changedAgain:!1,blockKey:ce.isSavedBlock?ys(Y,ce):Pe,fresh:{}});return}const bt=lt?lt.merged:null,Dt=bt??T,Yr=Bc({merged:!!bt,tracked:f,current:Ht.current,saved:T});bt&&ae.info(p("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),Yr&&f&&(f.emitted=bt,M(bt));const gs=Yr||!bt?Dt:T;f&&(f.base=gs,f.sectionCount=se.length,Ic(f,gs));const Jr={onSuccess:()=>{f&&ts.current.delete(f),h?.()},onError:je=>{if(f?.base===gs&&Me&&(f.base=Me),je instanceof rl){f&&(f.version=void 0),i<Eu?(Ke.current.delete(D),vn.current=!0,setTimeout(()=>{vn.current=!1,Sn(()=>{const Ee=f?.emitted;return Ee&&typeof Ee=="object"?Ee:T},s,i+1,d),Ke.current.delete(D),lr(jn)},Ru*2**i)):is();return}X.reportError(je)}},Qr=je=>{gn.current=!0;let Ee=!1;X.mutateAsync(je).then(()=>Jr.onSuccess(),It=>{Ee=!0,Jr.onError(It)}).finally(()=>{gn.current=!1,lr(Ee?jn:0),or()})};if(ce.isSavedBlock){const je=ys(Y,ce);if(!je)return;Qr({blockKey:je,data:Dt,...Me?{base:{value:bt?We:Me}}:{},rebaseOnConflict:!1,guard:Ao({formBase:f,rebased:!!bt,versionOf:ir})});return}if(!Pe)return;const Hn={...P[Pe]},Yt=[...se];if(ce.isMultivariate){const je=ot(Y,ce);if(!je||!Pe)return;const Ee=Kl(je,v,Dt);Yt[s]=Bt(Y,ce,Ee)}else if(ce.isHidden){const je=Is(Y.__resolveType),Ee=je?{...Y.section}:{...Y},It=Array.isArray(Ee.variants)?[...Ee.variants]:[];It[0]&&(It[0]=yo(Ee.__resolveType,It[0],Dt)),Ee.variants=It,je?Yt[s]={...Y,section:Ee}:Yt[s]=Ee}else ce.isLazy?Yt[s]={...Y,section:Dt}:Yt[s]=Dt;if(Be.length>1){const je=Hn.sections,Ee=[...je?.variants??[]];Ee[we]&&(Ee[we]=yo(je?.__resolveType,Ee[we],Yt)),Hn.sections={...je,variants:Ee}}else Hn.sections=Yt;Qr({blockKey:Pe,data:Hn,rebaseOnConflict:!1,guard:Ao({formBase:null,rebased:!1,versionOf:ir})})};Tt.current={sectionIndex:s,sectionVariantIndex:v,write:A},$.current=setTimeout(()=>{$.current=null,A()},jn)},ja=t=>{on.current=!1,I(t),dt(0),F([]),K(d=>d+1);const s=U[t],i=Ve[t];if(H?.(i?.isSavedBlock?i.resolveType??null:null),!s||!i)return;if(i.isMultivariate){wt(s,i,0,t);return}const c=kt(s,i,g,j);if(!c){M(null),O(null),nt(null),Xe(null),qt(null,t,0);return}M(c.data),O(c.resolveType),nt(null),Xe(null),qt(null,t,0)},ur=t=>{const s=t;S!==null&&(Ht.current=Kc(Ht.current,{sectionIndex:S,variantIndex:Se.current.sectionVariantIndex,shown:he,next:s,sectionCount:Se.current.rawSections.length})),M(s),S!==null&&Sn(s,S)},ls=t=>{if(!C||!g||!x||!_e)return;const s={kind:"page",pageKey:C,pageName:String(_e.name??""),path:String(_e.path??"")},i=Zr(g,s,x);i&&pn.save(C,()=>{const c=qs.getQueryData(Ko.decofile(Gs))?.[C];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const d={...c,...Pn.current};return Pn.current={},t?.raw!==void 0?hc(d,t.raw,x):t?.inner!==void 0?gc(s,i,d,t.inner):d})},dr=(t,s)=>{C&&(Pn.current[t]=s,ls())},ka=(t,s)=>{if(!C)return;const i=Yn([...U],t,s);S!==null&&(S===t?I(s):t<S&&s>=S?I(S-1):t>S&&s<=S&&I(S+1)),mt(i)},Ea=t=>{if(!C)return;const s=U.filter((i,c)=>c!==t);S===t?Gt():S!==null&&S>t&&I(S-1),mt(s)},Ra=t=>{if(!C)return;const s=U[t];if(!s)return;const i=[...U];i.splice(t+1,0,Hi(s)),S!==null&&S>t&&I(S+1),mt(i)},Aa=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i)return;const c=i.isHidden?Cl(s,j):Nl(s,x);if(!c)return;const d=[...U];d[t]=c,S===t&&Gt(),mt(d)},Ca=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i||i.isMultivariate)return;const c=Al(s);if(!c)return;const d=[...U];d[t]=c,S===t&&Gt(),mt(d)},Na=t=>{if(!C)return;const s=U[t],i=Ve[t];if(!s||!i?.isSavedBlock)return;const c=kt(s,i,g,j);if(!c?.data)return;const{name:d,...v}=c.data,f=[...U];i.isLazy?f[t]={...s,section:v}:f[t]=v,S===t&&Gt(),mt(f)},Ta=t=>{if(!C)return;const s=[...U,{__resolveType:t.resolveType}],i=s.length-1;mt(s,{onError:()=>{Se.current.selectedSectionIndex===i&&Gt()}}),Zt(!1),I(i),dt(0),F([]),K(f=>f+1);const c=s[i],d=En(s,g,j)[i];if(!c||!d)return;if(d.isMultivariate){wt(c,d,0);return}const v=kt(c,d,g,j);if(!v){M(null),O(null),nt(null),Xe(null);return}M(v.data),O(v.resolveType),nt(null),Xe(null)},fr=t=>{Rn.current=t.append,Zt(!0)},Va=t=>{const s=Rn.current;if(!s){Ta(t);return}s({__resolveType:t.resolveType}),Zt(!1),Rn.current=null},mr=t=>{if(S===null)return;const s=U[S],i=Ve[S];!s||!i?.isMultivariate||(dt(t),F([]),K(c=>c+1),wt(s,i,t,S,!0))},Pa=t=>{if(S===null||!C)return;const s=U[S],i=Ve[S];if(!s||!i?.isMultivariate)return;const c=ot(s,i);if(!c)return;const d=El(c,t);if(!d){ae.error(p("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const v=[...U];v[S]=Bt(s,i,d);const f=d.variants;let _=Qe;t===Qe?_=Math.min(t,f.length-1):t<Qe&&(_=Qe-1),dt(_),F([]),K(D=>D+1),wt(v[S],i,_),mt(v)},Ma=t=>{if(S===null||!C)return;const s=U[S],i=Ve[S];if(!s||!i?.isMultivariate)return;const c=ot(s,i);if(!c)return;const d=Rl(c,t,j),v=[...U];v[S]=Bt(s,i,d);const f=vo(c.variants??[],t,j);dt(f),F([]),K(_=>_+1),wt(v[S],i,f,S,j),mt(v)},Da=(t,s)=>{if(S===null||!C||t===s)return;const i=U[S],c=Ve[S];if(!i||!c?.isMultivariate)return;const d=ot(i,c);if(!d)return;const v=jl(d,t,s),f=[...U];f[S]=Bt(i,c,v);let _=Qe;Qe===t?_=s:t<Qe&&s>=Qe?_=Qe-1:t>Qe&&s<=Qe&&(_=Qe+1),dt(_),wt(f[S],c,_,S,j),mt(f)},_n=t=>{const s=t??S;if(s===null||!C)return;const i=U[s],c=Ve[s];if(!i||!c)return;const d=Sl(i,c,void 0,x,j);if(!d){ae.error(p("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const v=[...U];v[s]=d.section;const f=En(v,g,j)[s];if(!f?.isMultivariate){ae.error(p("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}I(s),dt(d.newVariantIndex),F([]),K(_=>_+1),wt(d.section,f,d.newVariantIndex,s,j),mt(v)},pr=()=>{if(S===null||!C)return;const t=U[S],s=Ve[S];if(!t||!s?.isMultivariate)return;const i=ot(t,s);if(!i)return;const c=kl(t,s,i);if(!c){ae.error(p("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const d=[...U];d[S]=c;const v=En(d,g,j)[S];if(!v)return;dt(0),nt(null),Xe(null),F([]),K(_=>_+1);const f=kt(c,v,g,j);f?(M(f.data),O(f.resolveType)):(M(null),O(null)),qt(null,S,0),mt(d)},Ia=async t=>{if(Je===null||!C)return;const s=Un(t,g,x);if(s){ae.error(s);return}const i=U[Je],c=Ve[Je];if(!i||!c)return;const d=kt(i,c,g,j);if(!d){ae.error(p("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const v={...d.data,name:t};try{await X.mutateAsync({blockKey:t,data:v});const f=[...U];f[Je]={__resolveType:t},await X.mutateAsync({blockKey:C,data:cn(g,C,f,ve,Te)}),S===Je&&Gt(),ie(null),ae.success(p("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),h?.()}catch(f){ae.error(p("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(p,Ft(f))})}},hr=Fe?.rule;if(vt&&S===null&&ge===null&&hr){const{resolveType:t,formValue:s}=Jt(hr,g??{},x??void 0);be(t),de(s)}const an=x?Pi(x):[],cs=x&&g?Mi(x,g):[],Ut=j&&x&&g?ll(x,g):[],us=(t,s)=>{if(Ut.length===0)return;const i=wl(t);return{kinds:Ut,selected:i,campaignPrefill:cl(t),onPick:s}},gr=!ne&&!!(Ce&&x&&g),vr=ge&&x?qn(ge,x):null,yt=()=>{ht.current&&(clearTimeout(ht.current),ht.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null)},jt=async(t,s)=>{if(!(Il(s,t,x)>0))try{await Vn.mutateAsync({blockKey:t})}catch(i){ae.error(p("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(p,Ft(i))})}},yr=t=>{ht.current&&clearTimeout(ht.current),ht.current=setTimeout(()=>{const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;const d={...i[s]},v={...d.sections},f=[...v.variants??[]],_=f[c],D=_?.rule;if(Qt(D,i,x)){const A=D?.__resolveType??"",T=i[A],P=typeof T?.name=="string"?T.name:A,{__resolveType:se,...le}=t;X.mutate({blockKey:A,data:Ot(se??"",le,P)},{onSuccess:()=>h?.(),onError:X.reportError});return}_&&(f[c]={..._,rule:t}),d.sections={...v,variants:f},X.mutate({blockKey:s,data:d},{onSuccess:()=>h?.(),onError:X.reportError})},jn)},xr=t=>{be(t);const s=t?ho(t,x):{__resolveType:go(x)};de(t?s:{}),yr(s)},br=t=>{const s=t;de(s);const i=ge?{__resolveType:ge,...s}:{...s};yr(i)},Bn=async(t,s,i)=>{const c=dl(s,t);if(!c.ok)return c.reason==="conflict"&&ae.info(t.kind==="experiments"?p("sectionsEditor.namedRulePicker.conflictTests"):p("sectionsEditor.namedRulePicker.conflictCampaigns"),mo),null;const d={};if(i){const v=i(c.rule);if(!v)return null;d[v.blockKey]=v.data}return c.blockWrite&&(d[c.blockWrite.blockKey]=c.blockWrite.block),Object.keys(d).length>0&&!(await Us.apply({writes:d})).ok?null:(c.blockWrite&&ae.success(t.kind==="experiments"?p("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):p("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...mo,description:p("sectionsEditor.namedRulePicker.createdHint")}),{rule:c.rule,projected:{...s,...d}})},Sr=Ut.length>0?{kinds:Ut,prepare:async t=>(await Bn(t,Se.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const s=Vl(Se.current.decofile,t);return s.kind==="saved"?!0:s.kind==="conflict"?!1:(await Us.apply({writes:{[Pl(t).blockKey]:s.block}})).ok}}:null,_r=async t=>{yt();const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;let d=null;const v=await Bn(t,i,D=>{const A=i[s],T=A?.sections;if(!T||typeof T!="object"||Array.isArray(T))return null;const P=T;if(!Array.isArray(P.variants))return null;const se=[...P.variants],le=se[c];return le?(d=St(le.rule,i,x),se[c]={...le,rule:D},{blockKey:s,data:{...A,sections:{...P,variants:se}}}):null});if(!v)return;const{resolveType:f,formValue:_}=Jt(v.rule,v.projected,x??void 0);be(f),de(_),d&&await jt(d,v.projected),h?.()},wr=async t=>{yt();const{activePageKey:s,decofile:i,variantIndex:c}=Se.current;if(!s)return;const d=i[s],v=d?.sections;if(!v||typeof v!="object"||Array.isArray(v))return;const f=v;if(!Array.isArray(f.variants))return;const _=[...f.variants],D=_[c];if(!D)return;const A=St(D.rule,i,x),T=dn(t);_[c]={...D,rule:T};const P={...i,[s]:{...d,sections:{...f,variants:_}}},{resolveType:se,formValue:le}=Jt(T,P,x??void 0);be(se),de(le);try{await X.mutateAsync({blockKey:s,data:P[s]}),A&&A!==t&&await jt(A,P),h?.()}catch(Be){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(p,Ft(Be))})}},jr=t=>{gt.current&&clearTimeout(gt.current);const{selectedSectionIndex:s,sectionVariantIndex:i}=Se.current;s!==null&&(gt.current=setTimeout(()=>{const{rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(!f)return;const A=c[s],T=d[s];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const le=(P.variants??[])[i]?.rule;if(Qt(le,v,x)){const Y=le?.__resolveType??"",ce=v[Y],Me=typeof ce?.name=="string"?ce.name:Y,{__resolveType:We,...xt}=t;X.mutate({blockKey:Y,data:Ot(We??"",xt,Me)},{onSuccess:()=>h?.(),onError:X.reportError});return}const Be=Ss(P,i,t),we=[...c];we[s]=Bt(A,T,Be);const Pe=cn(v,f,we,D,_);X.mutate({blockKey:f,data:Pe},{onSuccess:()=>h?.(),onError:X.reportError})},jn))},Ka=t=>{nt(t);const s=t?ho(t,x):{__resolveType:go(x)};Xe(t?s:{}),jr(s)},Fa=t=>{const s=t;Xe(s);const i=nn?{__resolveType:nn,...s}:{...s};jr(i)},Ba=async t=>{yt();const{selectedSectionIndex:s,sectionVariantIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(s===null||!f)return;let A=null;const T=await Bn(t,v,le=>{const Be=c[s],we=d[s];if(!Be||!we?.isMultivariate)return null;const Pe=ot(Be,we);if(!Pe)return null;const Y=Pe.variants??[];A=St(Y[i]?.rule,v,x);const ce=[...c];return ce[s]=Bt(Be,we,Ss(Pe,i,le)),{blockKey:f,data:cn(v,f,ce,D,_)}});if(!T)return;const{resolveType:P,formValue:se}=Jt(T.rule,T.projected,x??void 0);nt(P),Xe(se),A&&await jt(A,T.projected),h?.()},Oa=async t=>{yt();const{selectedSectionIndex:s,sectionVariantIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(s===null||!f)return;const A=c[s],T=d[s];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const se=P.variants??[],le=St(se[i]?.rule,v,x),Be=dn(t),we=Ss(P,i,Be),Pe=[...c];Pe[s]=Bt(A,T,we);const Y=cn(v,f,Pe,D,_),ce={...v,[f]:Y},{resolveType:Me,formValue:We}=Jt(Be,ce,x??void 0);nt(Me),Xe(We);try{await X.mutateAsync({blockKey:f,data:Y}),le&&le!==t&&await jt(le,ce),h?.()}catch(xt){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(p,Ft(xt))})}};if(!ne&&!_e)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.noPageFound",{currentPath:u})});if(ne&&!Mn)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:p("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Oe=S!==null?Ve[S]??null:null,kr=S!==null?U[S]:null,Er=kr&&Oe?.isMultivariate?ot(kr,Oe):null,Vt=Er?Es(Er,re):[],On=Math.min(Qe,Math.max(Vt.length-1,0)),Rt=Vt[On]??null,Pt=Oe?.isMultivariate===!0,ds=S!==null&&Oe!==null,Mt=ds&&(Pt||!!(Fn&&he)),La=Mt&&!ne&&Oe?.isSavedBlock===!0,pt=ne||La,Rr=ne?Qs:Oe?.label??"",$a=nn&&x?qn(nn,x):null,Ar=(t,s)=>s&&q?`${t} · ${s}`:t,Cr=Oe?Oe.variantOf??Oe.label:"",za=(()=>{const t=Pt&&Rt?Rt.label:null;return t?q?[Ar(Cr,t)]:[Oe.label,t]:[Oe?.label??""]})(),fs=Ar(_e?.name??"",vt?Fe?.label:null),Ln=Mt&&(!ne||ee.length>0)?ne?[Qs,...ee]:[fs,...za,...ee]:[],Nr=He&&_e?[_e.name,"SEO",...$s]:[],Tr=p("sectionsEditor.pageVariantTabs.variantsLabel"),Vr=en&&_e?[_e.name,Tr]:$t&&_e&&Oe?[fs,Cr,Tr]:[],$n=Vr.length>0?Vr:Nr.length>0?Nr:pt?Ln.length>0?Ln:[Rr]:Ln.length>0?Ln:[fs],Pr=ds&&!Pt&&!Oe?.isHidden&&!!C,Ha=pt||!ne&&vt&&!!Fe||Pr,Wa=ds&&!Pt&&!ne&&ee.length===0&&!!Oe&&Oo(Oe)&&!!C,qa=q&&Mt&&!$t&&Pt&&ee.length===0&&!!Rt,Mr=q&&ee.length>0?eo(ee[ee.length-1]):null,Ga=ee.length>1?eo(ee[ee.length-2]):null,Dr=pt?Rr:Mt?Oe?.label??"":_e?.name??"",Ua=en||$t?p("sectionsEditor.pageVariantTabs.variantsLabel"):He?p("sectionsEditor.panelSections.seo"):Mr??Dr,Ir=$t?Oe?.variantOf??Oe?.label??"":en||He?_e?.name??"":Mr?Ga??Dr:pt?p("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Mt?_e?.name??"":_e?.path??"",ms=!en&&!$t&&!He&&!Mt&&!pt,Ya=!q&&!He&&!ne&&Pt&&ee.length===0,wn=()=>{if(!C)return;yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const t=g[C],s=_l(t.sections,U,x,j);if(!s)return;const{sections:i,newVariantIndex:c}=s;X.mutate({blockKey:C,data:{...t,sections:i}},{onSuccess:()=>{G(c),I(null),M(null),O(null),F([]),de(null),be(null)},onError:X.reportError})},zn=(t,s,i)=>{if(!C)return;yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const c=g[C],d=c.sections;if(!d||typeof d!="object"||Array.isArray(d))return;const v=d;if(!Array.isArray(v.variants))return;const f=t([...v.variants]);if(!f)return;const _=Dl(v,f),D={...g,[C]:{...c,sections:_}};X.mutate({blockKey:C,data:D[C]},{onSuccess:()=>{s?.();const A=typeof i=="string"?[i]:i??[];(async()=>{for(const T of A)await jt(T,D)})()},onError:X.reportError})},Kr=(t,s)=>{if(t===s)return;let i=ve;ve===t?i=s:t<ve&&s>=ve?i=ve-1:t>ve&&s<=ve&&(i=ve+1),G(i);const c=Yn(Te.map(d=>({rule:d.rule})),t,s);os(c,i),zn(d=>Yn(d,t,s))},Fr=t=>{const s=Te[t]?.rule,i=St(s,g??{},x??void 0);zn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{Te.length-1===1?G(0):t<ve?G(ve-1):t===ve&&G(Math.max(0,t-1)),I(null),M(null),O(null),F([]),de(null),be(null)},i)},Ja=()=>{const t=Te.map((s,i)=>({variant:s,index:i})).filter(({variant:s})=>!Tl(s.rule)).map(({variant:s})=>St(s.rule,g??{},x??void 0)).filter(s=>!!s);zn(s=>{const i=Fl({variants:s}),c=s[i];return c?[{...c,rule:Bl(x)}]:null},()=>{G(0),I(null),M(null),O(null),F([]),de(null),be(null),Cn(!1)},t)},Br=t=>{let s=t+1;zn(i=>(s=vo(i,t,j),Ol(i,t,j)),()=>{G(s),I(null),M(null),O(null),F([]),de(null),be(null)})},Qa=async(t,s)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const i=Se.current.activePageKey,c=Se.current.decofile;if(!i)return;const d=c[i],v=d.sections;if(!v||typeof v!="object"||Array.isArray(v))return;const f=v;if(!Array.isArray(f.variants))return;const _=[...f.variants],D=_[t];if(!D?.rule||typeof D.rule!="object"){ae.error(p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const A=D.rule,T=s.trim();rn(!0);try{if(!T){if(!Qt(A,c,x)){ze(null);return}const Pe=A.__resolveType??"";_[t]={...D,rule:Rs(A,c,x)};const Y={...c,[i]:{...d,sections:{...f,variants:_}}};await X.mutateAsync({blockKey:i,data:Y[i]}),await jt(Pe,Y),ze(null),h?.();return}const P=As(A,c,x);if(!P){ae.error(p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(P.blockKey){await X.mutateAsync({blockKey:P.blockKey,data:Ot(P.resolveType,P.data,T)}),ze(null),h?.();return}const se=Gn(T),le=Un(se,c,x);if(le){ae.error(le);return}const Be=Ot(P.resolveType,P.data,T);let we=null;try{await X.mutateAsync({blockKey:se,data:Be}),we=se,_[t]={...D,rule:dn(se)},await X.mutateAsync({blockKey:i,data:{...d,sections:{...f,variants:_}}}),we=null}catch(Pe){throw we&&await Vn.mutateAsync({blockKey:we}).catch(()=>{}),Pe}ze(null),ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:T})),h?.()}catch(P){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(p,Ft(P))})}finally{rn(!1)}},Xa=async(t,s)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const{selectedSectionIndex:i,rawSections:c,parsedSections:d,decofile:v,activePageKey:f,pageVariants:_,variantIndex:D}=Se.current;if(i===null||!f)return;const A=c[i],T=d[i];if(!A||!T?.isMultivariate)return;const P=ot(A,T);if(!P)return;const se=P.variants??[],le=se[t];if(!le?.rule||typeof le.rule!="object"){ae.error(p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Be=le.rule,we=s.trim();rn(!0);const Pe=async Y=>{const ce={...P,variants:Y},Me=[...c];Me[i]=Bt(A,T,ce);const We=cn(v,f,Me,D,_);return await X.mutateAsync({blockKey:f,data:We}),{...v,[f]:We}};try{if(!we){if(!Qt(Be,v,x)){it(null);return}const lt=Be.__resolveType??"",bt=[...se];bt[t]={...le,rule:Rs(Be,v,x)};const Dt=await Pe(bt);await jt(lt,Dt),it(null),h?.();return}const Y=As(Be,v,x);if(!Y){ae.error(p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Y.blockKey){await X.mutateAsync({blockKey:Y.blockKey,data:Ot(Y.resolveType,Y.data,we)}),it(null),h?.();return}const ce=Gn(we),Me=Un(ce,v,x);if(Me){ae.error(Me);return}const We=Ot(Y.resolveType,Y.data,we);let xt=null;try{await X.mutateAsync({blockKey:ce,data:We}),xt=ce;const lt=[...se];lt[t]={...le,rule:dn(ce)},await Pe(lt),xt=null}catch(lt){throw xt&&await Vn.mutateAsync({blockKey:xt}).catch(()=>{}),lt}it(null),ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:we})),h?.()}catch(Y){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(p,Ft(Y))})}finally{rn(!1)}},Or=async(t,s,i)=>{M(i);try{await X.mutateAsync({blockKey:t,data:i})}catch(c){throw M(d=>d===i?s:d),c}},Za={rename:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;const v=Array.isArray(t.variants)?[...t.variants]:[],f=v[s],_=f?.rule&&typeof f.rule=="object"?f.rule:void 0,D=async T=>{const P={...t,variants:T};return await Or(c,t,P),{...d,[c]:P}},A=ku(_,i,d,x);if(A.kind!=="noop"){if(A.kind==="error"){ae.error(A.reason==="no-matcher-rule"?p("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):A.reason==="unreadable-rule"?p("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):A.message??p("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}rn(!0);try{if(A.kind==="inline"){const P=[...v];P[s]={...f,rule:A.inlinedRule};const se=await D(P);await jt(A.blockKey,se),h?.();return}if(A.kind==="updateBlock"){await X.mutateAsync({blockKey:A.blockKey,data:A.blockData}),h?.();return}let T=null;try{await X.mutateAsync({blockKey:A.blockId,data:A.blockData}),T=A.blockId;const P=[...v];P[s]={...f,rule:A.reference},await D(P),T=null}catch(P){throw T&&await Vn.mutateAsync({blockKey:T}).catch(()=>{}),P}ae.success(p("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:i.trim()})),h?.()}catch(T){ae.error(p("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(p,Ft(T))})}finally{rn(!1)}}},selectGlobal:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;const v=Array.isArray(t.variants)?[...t.variants]:[],f=v[s];if(!f)return;const _=St(f.rule,d,x);v[s]={...f,rule:dn(i)};const D={...t,variants:v},A={...d,[c]:D};try{await Or(c,t,D),_&&_!==i&&await jt(_,A),h?.()}catch(T){ae.error(p("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(p,Ft(T))})}},selectNamedRule:async(t,s,i)=>{yt(),$.current&&(clearTimeout($.current),$.current=null),Ke.current.clear();const{activePageKey:c,decofile:d}=Se.current;if(!c)return;let v=null,f=null;const _=await Bn(i,d,D=>{const A=Array.isArray(t.variants)?[...t.variants]:[],T=A[s];return T?(v=St(T.rule,d,x),A[s]={...T,rule:D},f={...t,variants:A},{blockKey:c,data:f}):null});!_||!f||(M(f),v&&await jt(v,_.projected),h?.())}},Lr=()=>{Gt()},$r=t=>{mn(t),ls({inner:t})},zr=t=>{Tn(t),ls({raw:t})},Hr=()=>{mn(null),zt([])},Wr=()=>tn(t=>t+1),qr=()=>{pn.flush(),fn(!1),mn(null),Tn(void 0),zt([]),tn(t=>t+1),N?.()},ei=()=>{Cn(!1),Nn(!1),I(null),fn(!0)},ti=()=>{He&&qr(),I(null),Cn(!0)},ni=()=>Nn(!0),ps=t=>{if(en&&t===0){Cn(!1);return}if($t&&t<2){Nn(!1),t===0&&I(null);return}if(He){if(t===0){qr();return}if(t===1){zt([]),tn(i=>i+1);return}zt($s.slice(0,t-1)),tn(i=>i+1);return}if(ne){F(ee.slice(0,t)),K(i=>i+1);return}if(t===0){Lr();return}if(t===1){F([]),K(i=>i+1);return}const s=!q&&Pt&&Rt?1:0;if(s===1&&t===2){F([]),K(i=>i+1);return}F(ee.slice(0,t-1-s))},hs=$n.length>1?o.jsx("button",{type:"button",onClick:()=>ps(Wi($n.length,{isMultivariateSectionTop:Ya})),title:p("sectionsEditor.sectionsEditor.back"),"aria-label":p("sectionsEditor.sectionsEditor.back"),className:me("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",pt?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:o.jsx(Ji,{className:"size-4"})}):null,si=pt||Mt||He?Ha&&o.jsxs("div",{className:me("border-b px-3 py-2.5",pt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ne&&vt&&Fe&&o.jsxs("button",{type:"button",onClick:Lr,title:p("sectionsEditor.sectionsEditor.editingInVariant",{variant:Fe.label}),className:me("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",Ii),children:[o.jsx(Di,{rule:bs(Fe.rule,g??{},x??void 0),matchers:an}),o.jsx("span",{className:"max-w-[160px] truncate",children:Fe.label})]}),o.jsx("div",{className:"flex-1"}),pt&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Qn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(Nt,{side:"bottom",className:"max-w-[260px]",children:p("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Pr&&o.jsx(Wn,{onClick:()=>_n()})]}),pt&&o.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:p("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):o.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(to,{pageKey:C,initialName:_e.name,initialPath:_e.path,onFieldChange:dr,variant:"header"})}),o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>fn(!0),children:o.jsx(co,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.editSeo")})]}),o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"ghost",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>z&&C?z():es(!0),children:o.jsx(uo,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.viewJson")})]}),o.jsx(Wn,{onClick:wn})]}),ri=o.jsxs(o.Fragment,{children:[vt&&C&&o.jsx(no,{listKey:C,variants:Te,activeIndex:ve,decofile:g??{},meta:x,matchers:an,onSelect:yn,onReorder:Kr,onRename:ze,onDuplicate:Br,onDelete:Fr,onAdd:wn}),vt&&ge!==null&&o.jsx(so,{className:"mt-3",children:o.jsx("div",{className:me("space-y-3",sn&&"pointer-events-none opacity-50"),children:o.jsx(vs,{currentRt:ge,currentLabel:kn(Fe?.rule,g??{},re,x??void 0),currentGlobalKey:St(Fe?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:xr,onSelectGlobal:wr,named:us(Fe?.rule,_r),namedRow:xs(Fe?.rule,Ut),rule:Fe?.rule,schema:vr,formValue:Ye,onChange:br,formKey:`${ve}:${ge??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})})]}),Gr=o.jsxs(o.Fragment,{children:[o.jsx(Ki,{listKey:`${C??""}:${S??""}`,variants:Vt.map((t,s)=>({index:s,label:t.label})),selectedIndex:On,onSelect:mr,onRename:it,onDuplicate:Ma,onDelete:Pa,onRemoveAll:pr,onReorder:Da,onAdd:()=>_n()}),o.jsx(so,{children:o.jsx(vs,{currentRt:nn??"",currentLabel:kn(Rt?.rule,g??{},re,x??void 0),currentGlobalKey:St(Rt?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:Ka,onSelectGlobal:Oa,named:us(Rt?.rule,Ba),namedRow:xs(Rt?.rule,Ut),rule:Rt?.rule,schema:$a,formValue:ea,onChange:Fa,formKey:`${S??"none"}:${On}:${nn??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})]}),Ur=o.jsx("div",{className:me(q?"px-2":"p-2 pt-3"),children:o.jsx(Pc,{listKey:`${C??""}-${ve}`,rawSections:U,sections:Ve,meta:x,decofile:g,selectedIndex:S,onSelect:ja,onReorder:ka,onDelete:Ea,onDuplicate:Ra,onMakeReusable:ie,onToggleHidden:Aa,onToggleLazy:Ae?Ca:void 0,onAddVariant:_n,onDetach:Na,onAddSection:()=>Zt(!0),canAddSection:gr})}),oi=o.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[C&&_e&&o.jsx(to,{pageKey:C,initialName:_e.name,initialPath:_e.path,onFieldChange:dr}),Wt&&C?o.jsx(wo,{rawSeo:Dn,innerSeo:rs,defaultResolveType:Zs,seoTypesLoading:j&&!x,seoSchema:er,activeResolveType:In,seoTypeOptions:Xs,formResetKey:zs,siteDefaultSeo:tr,onBreadcrumbChange:zt,onPersistRaw:zr,onInnerChange:$r,onClearForm:Hr,onBumpFormKey:Wr,asyncRenderAvailable:Ae}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),ai=o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:Wt&&C?o.jsx(wo,{rawSeo:Dn,innerSeo:rs,defaultResolveType:Zs,seoTypesLoading:j&&!x,seoSchema:er,activeResolveType:In,seoTypeOptions:Xs,formResetKey:zs,siteDefaultSeo:tr,onBreadcrumbChange:zt,onPersistRaw:zr,onInnerChange:$r,onClearForm:Hr,onBumpFormKey:Wr,asyncRenderAvailable:Ae}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),ii=o.jsxs(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[vt&&C&&o.jsx(no,{listKey:C,variants:Te,activeIndex:ve,decofile:g??{},meta:x,matchers:an,onSelect:yn,onReorder:Kr,onRename:ze,onDuplicate:Br,onDelete:Fr,onAdd:wn}),vt&&ge!==null&&o.jsxs("div",{className:me("px-3 border-b",An?"pt-3 pb-5 space-y-3":"py-2"),children:[o.jsxs("button",{type:"button",onClick:()=>Xo(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":An,children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:p("sectionsEditor.sectionsEditor.variantRule")}),An?o.jsx(Gi,{className:"size-3.5 shrink-0 text-muted-foreground"}):o.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),An&&o.jsx("div",{className:me("space-y-3",sn&&"pointer-events-none opacity-50"),children:o.jsx(vs,{currentRt:ge,currentLabel:kn(Fe?.rule,g??{},re,x??void 0),currentGlobalKey:St(Fe?.rule,g??{},x??void 0)??void 0,matchers:an,globals:cs,onSelect:xr,onSelectGlobal:wr,named:us(Fe?.rule,_r),namedRow:xs(Fe?.rule,Ut),rule:Fe?.rule,schema:vr,formValue:Ye,onChange:br,formKey:`${ve}:${ge??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:g,onSaveReferencedBlock:hn,sandbox:xn})})]}),Ur]},"editor-section-list");return o.jsx(Fi,{value:j,children:o.jsx(Bi,{children:o.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!q&&hs&&o.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:hs}),(q||$n.length>1)&&o.jsx(Oi,{crumbs:$n,onSelect:ps,onSelectRoot:()=>{pn.flush(),L?L():ps(0)}}),o.jsx("div",{className:"shrink-0",children:q?o.jsxs("div",{className:me("flex items-center gap-2 border-b px-3 py-2.5",pt&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[q&&hs,pt&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Qn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(Nt,{side:"bottom",className:"max-w-[260px]",children:p("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[o.jsx("span",{className:"truncate text-sm font-semibold",children:Ua}),Ir&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Ir})]}),ms&&vt&&Fe&&o.jsx(ro,{variants:Te,activeIndex:ve,onSelect:yn,onManage:ti,onRemoveAll:Ja}),qa&&o.jsx(ro,{variants:Vt,activeIndex:On,onSelect:mr,onManage:ni,onRemoveAll:pr}),ms&&!vt&&o.jsx(Wn,{onClick:wn}),Wa&&o.jsx(Wn,{onClick:()=>_n()}),o.jsx(Li,{}),ms&&o.jsxs(o.Fragment,{children:[o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"outline",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:ei,children:o.jsx(co,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.editSeo")})]}),!z&&o.jsxs(At,{children:[o.jsx(Ct,{asChild:!0,children:o.jsx(Et,{type:"button",variant:"outline",size:"icon-sm","aria-label":p("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>es(!0),children:o.jsx(uo,{size:14})})}),o.jsx(Nt,{side:"bottom",children:p("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):si}),ft&&o.jsx(Zc,{open:!0,fields:zc(ft.plan,ft.target.schema),choices:ft.choices,changedAgain:ft.changedAgain,author:ca,fresh:ft.fresh,onChoose:(t,s)=>wa({...ft.choices,[t]:s}),onApply:_a},Cu(ft.formBase)),$t?o.jsx(oo,{onAdd:()=>_n(),children:Gr},"editor-section-variants"):Mt?o.jsxs(un,{viewportRef:De,onBlur:ar,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!q&&Pt&&Vt.length>0&&ee.length===0&&Gr,o.jsx(po,{value:Sr,children:o.jsx(ao,{value:ne&&j?Ue:null,children:o.jsx(io,{activeSchema:Fn,formValue:he,formResetKey:st,onFormChange:ur,onBreadcrumbChange:F,breadcrumbPath:ee,emptyMessage:p("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:g,onSaveReferencedBlock:hn,sandbox:xn,previewBaseUrl:fe,onRequestAddSection:fr,onVariantMatcherOp:ne?Za:void 0})})})]},"editor-section-form"):ne?o.jsx(un,{viewportRef:De,onBlur:ar,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx(po,{value:Sr,children:o.jsx(ao,{value:ne&&j?Ue:null,children:o.jsx(io,{activeSchema:Fn,formValue:he,formResetKey:st,onFormChange:ur,onBreadcrumbChange:F,breadcrumbPath:ee,emptyMessage:p("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:g,onSaveReferencedBlock:hn,sandbox:xn,previewBaseUrl:fe,onRequestAddSection:fr})})})},"editor-global-block"):He?q?o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"p-3",children:oi})},"editor-seo"):ai:en?o.jsx(oo,{onAdd:wn,children:ri},"editor-variants"):q?o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(un,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"py-2",children:Ur})}),o.jsx("div",{className:"shrink-0 border-t p-2",children:o.jsx(Ts,{canAddSection:gr,onAddSection:()=>Zt(!0)})})]},"editor-section-list"):ii,o.jsx($i,{open:Je!==null,onOpenChange:t=>{t||ie(null)},defaultBlockId:Je!==null?Gn(Ve[Je]?.label??""):"",isPending:X.isPending,onSubmit:Ia}),Ce&&o.jsx(rc,{open:Qo,onOpenChange:t=>{Zt(t),t||(Rn.current=null)},meta:x,decofile:g,previewBaseUrl:fe,onSelect:Va}),Fs&&C&&g&&o.jsx(pl,{open:Fs,onOpenChange:es,pageKey:C,decofile:g}),Ne!==null&&o.jsx(lo,{open:!0,initialName:Qt(Te[Ne]?.rule,g??{},x??void 0)?kn(Te[Ne]?.rule,g??{},re,x??void 0):"",autoLabel:re(bs(Te[Ne]?.rule,g??{},x??void 0)),isPending:sn,onSubmit:async t=>{await Qa(Ne,t)},onOpenChange:t=>{!t&&!sn&&ze(null)}}),rt!==null&&o.jsx(lo,{open:!0,initialName:Qt(Vt[rt]?.rule,g??{},x??void 0)?kn(Vt[rt]?.rule,g??{},re,x??void 0):"",autoLabel:re(bs(Vt[rt]?.rule,g??{},x??void 0)),isPending:sn,onSubmit:async t=>{await Xa(rt,t)},onOpenChange:t=>{!t&&!sn&&it(null)}})]})})})}export{gm as SectionsEditor};
|