decocms 4.514.6 → 4.515.1
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 +1 -0
- package/dist/client/assets/{AlertCircle-Ctbquk5a.js → AlertCircle-CUAx3A4b.js} +1 -1
- package/dist/client/assets/AreaChart-CW0Iiw9b.js +1 -0
- package/dist/client/assets/{ArrowLeft-DZ0mAFgb.js → ArrowLeft-BWCsylYe.js} +1 -1
- package/dist/client/assets/{ArrowUp-bYg1aEOe.js → ArrowUp-EL0FBv9C.js} +1 -1
- package/dist/client/assets/BarChart-7G_lP-bc.js +1 -0
- package/dist/client/assets/{Building02-BHIVlbfK.js → Building02-PifDTlhb.js} +1 -1
- package/dist/client/assets/CartesianChart-CQlacwEw.js +1 -0
- package/dist/client/assets/{CategoricalChart-CRSSpo7X.js → CategoricalChart-QwBn7EzX.js} +2 -2
- package/dist/client/assets/{CheckCircle-C2ndOEUO.js → CheckCircle-CMGqXocs.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DaUdbCWk.js → ChevronSelectorVertical-BSRBjpBn.js} +1 -1
- package/dist/client/assets/{ChevronUp-C8mqlnDX.js → ChevronUp-x46FJEcD.js} +1 -1
- package/dist/client/assets/{Copy01-DC8f0fwU.js → Copy01-OBSYmimV.js} +1 -1
- package/dist/client/assets/{CreditCard01-P7j8oDkg.js → CreditCard01-DWsSThAm.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvwGTDkC.js → DotsVertical-jkvtcdek.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-KwnilJkg.js → ErrorBarContext-MNRbBKZp.js} +1 -1
- package/dist/client/assets/{Globe04-D6C-ihBU.js → Globe04-blkS_Kfg.js} +1 -1
- package/dist/client/assets/{Image01-D7F4wuKx.js → Image01-BCnLFq1D.js} +1 -1
- package/dist/client/assets/{Key01-u4HXXUPa.js → Key01-CG7Kua6O.js} +1 -1
- package/dist/client/assets/{Link01-BoUupQbW.js → Link01-8aKNfNRw.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BJx0R97x.js → LinkBroken01-DcsqjBuj.js} +1 -1
- package/dist/client/assets/{Minus-C1PMcNV0.js → Minus-B38cW2ZC.js} +1 -1
- package/dist/client/assets/{Monitor01-D3VwU2ni.js → Monitor01-DQEkUL3d.js} +1 -1
- package/dist/client/assets/{Play-DxsFk4r2.js → Play-Ns9aRVTY.js} +1 -1
- package/dist/client/assets/{Plus-BDveVGJf.js → Plus-vkM1FxVr.js} +1 -1
- package/dist/client/assets/ReferenceLine-CJq91vhq.js +1 -0
- package/dist/client/assets/{SearchMd-Cuf45jFP.js → SearchMd-Cp6J-1Iu.js} +1 -1
- package/dist/client/assets/Sector-BeXkYaJv.js +28 -0
- package/dist/client/assets/{ShoppingBag01-BMRnsG58.js → ShoppingBag01-aJuRSlBz.js} +1 -1
- package/dist/client/assets/{Sun-sKGpeIhM.js → Sun-k4hypx5Q.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CshMTQzi.js → SwitchHorizontal01-B5WFt7_0.js} +1 -1
- package/dist/client/assets/{Tool01-BM29_KWq.js → Tool01-BsK9c3-e.js} +1 -1
- package/dist/client/assets/{Trash01-D92WhXf2.js → Trash01-Z1ezoy3S.js} +1 -1
- package/dist/client/assets/{Upload01-BSDy4f7m.js → Upload01-B3-nlnKa.js} +1 -1
- package/dist/client/assets/{User01-Cn3JqTjv.js → User01-C2Sw39bs.js} +1 -1
- package/dist/client/assets/{UserSquare-Drp4z0v0.js → UserSquare-BBEl_BxL.js} +1 -1
- package/dist/client/assets/{Users01-Cxbx87gg.js → Users01-DMFeioyM.js} +1 -1
- package/dist/client/assets/{XClose-dOW_RI9u.js → XClose-BdwIxxCT.js} +1 -1
- package/dist/client/assets/{ZoomOut-BfQx-fBr.js → ZoomOut-DytgoG2i.js} +1 -1
- package/dist/client/assets/{access-gate-BjUA5Gw_.js → access-gate-BUnHIPK_.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B0vtW1sl.js → add-connection-dialog-F6QQAEZv.js} +1 -1
- package/dist/client/assets/agent-analytics-2BuaXhJ4.js +2 -0
- package/dist/client/assets/agent-app-DW_869sy.js +1 -0
- package/dist/client/assets/agent-assets-CPVwuId5.js +1 -0
- package/dist/client/assets/{agent-automation-Cc45Az0m.js → agent-automation-CKRFKK95.js} +1 -1
- package/dist/client/assets/agent-automations-CoXmwt9k.js +1 -0
- package/dist/client/assets/agent-calendar-CV9Ef0wP.js +1 -0
- package/dist/client/assets/{agent-connect-sources-mK6fw0FS.js → agent-connect-sources-B_bS144d.js} +1 -1
- package/dist/client/assets/agent-deck-OUciFfON.js +1 -0
- package/dist/client/assets/agent-e2e-DC8ADnZZ.js +1 -0
- package/dist/client/assets/agent-experiments-BwjYQ0V4.js +1 -0
- package/dist/client/assets/agent-file-CStNgNPQ.js +1 -0
- package/dist/client/assets/agent-hosting-Tr8uV5DY.js +1 -0
- package/dist/client/assets/{agent-icon-U4gZaLOQ.js → agent-icon--EtIPqub.js} +1 -1
- package/dist/client/assets/agent-library-Bf2YaEvb.js +1 -0
- package/dist/client/assets/agent-library-file-DAttgEac.js +1 -0
- package/dist/client/assets/agent-monitor-DIe6BVqe.js +1 -0
- package/dist/client/assets/{agent-overview-NPCMkyDB.js → agent-overview-popLuSBk.js} +1 -1
- package/dist/client/assets/agent-releases-CZVpd2dN.js +2 -0
- package/dist/client/assets/agent-settings-C6L22aS3.js +1 -0
- package/dist/client/assets/agent-site-editor-BML41A1E.js +16 -0
- package/dist/client/assets/agent-site-editor-code-Dnn-bhoB.js +2 -0
- package/dist/client/assets/agent-site-editor-content-Bt6vrV5b.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-q3wCu8-N.js +1 -0
- package/dist/client/assets/agent-view-B1o861lr.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bk4OTT2f.js → agent-view-guard-BuPewEB-.js} +1 -1
- package/dist/client/assets/{agents-list-B_j46cpj.js → agents-list-BxOpJ6GX.js} +1 -1
- package/dist/client/assets/{ai-providers-Cb4AWs2D.js → ai-providers-BgJW78yt.js} +2 -2
- package/dist/client/assets/alert-BDbwlXZm.js +1 -0
- package/dist/client/assets/{alert-dialog-CKDHmJ-l.js → alert-dialog-C-DaggA1.js} +3 -3
- package/dist/client/assets/analytics-sections-i9-JccxC.js +1 -0
- package/dist/client/assets/{api-keys-Xjw7lgqR.js → api-keys-CsGvnzMj.js} +1 -1
- package/dist/client/assets/api-keys-DfU9uedt.js +1 -0
- package/dist/client/assets/app-editor-Cq-B0QFL.js +1 -0
- package/dist/client/assets/{asset-utils-DrTFUoo_.js → asset-utils-Cb8p2lKk.js} +1 -1
- package/dist/client/assets/{auth-hgpoCSIS.js → auth-C_nDagDA.js} +1 -1
- package/dist/client/assets/{auth-catchall-CIV9IiTJ.js → auth-catchall-DLKOtnms.js} +1 -1
- package/dist/client/assets/{auth-entry-ctrK7teX.js → auth-entry-CGuqEb3C.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DkyooQGo.js → auth-split-layout-CA_lMCib.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-jn1R1qId.js → authenticate-and-persist-oauth-CpcQdSQ-.js} +1 -1
- package/dist/client/assets/automation-list-row-B0U8Omed.js +1 -0
- package/dist/client/assets/{automation-runs-C367-v6a.js → automation-runs-CHS-S7AU.js} +1 -1
- package/dist/client/assets/{automations-8JKgpNEK.js → automations-BMiuIrti.js} +1 -1
- package/dist/client/assets/{autosend-BZOm698U.js → autosend-xoWUmECR.js} +1 -1
- package/dist/client/assets/{avatar-RpIBVCkY.js → avatar-DHKJiyOX.js} +1 -1
- package/dist/client/assets/badge-ux-RK1YK.js +1 -0
- package/dist/client/assets/{block-document-baEM6UJG.js → block-document-C53UA67Y.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-Ca46yWEV.js → blocks-preview-workspace-context-CCLLqfhM.js} +1 -1
- package/dist/client/assets/blocks-tab-states-Chq5j0oT.js +1 -0
- package/dist/client/assets/blog-schema-CUXWCb3x.js +1 -0
- package/dist/client/assets/{buckets-p2Fiyc0f.js → buckets-KXy-OHx-.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-ClmcYJRa.js → build-improve-prompt-doc-7EW1ZAui.js} +1 -1
- package/dist/client/assets/{calendar-DqVFnL9A.js → calendar-qN6CeKGa.js} +1 -1
- package/dist/client/assets/campaigns-view-CwEmfYeP.js +1 -0
- package/dist/client/assets/{capability-load-error-DdN4o47w.js → capability-load-error-CoMXa4ni.js} +1 -1
- package/dist/client/assets/category-editor-C-13e8GC.js +1 -0
- package/dist/client/assets/{chart-B5vy2nis.js → chart-86pPxb3F.js} +1 -1
- package/dist/client/assets/{chat-context-_d3c57p1.js → chat-context-DXm8btNS.js} +6 -6
- package/dist/client/assets/{chat-draft-CKcHhXuF.js → chat-draft-WGnppXw7.js} +1 -1
- package/dist/client/assets/{checkbox-CUzk21sc.js → checkbox-vFQy8MvV.js} +1 -1
- package/dist/client/assets/{choose-editor-BFcNvSv4.js → choose-editor-Bry8-aop.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BolfyrKO.js → cli-auth-success-BM0cUkz3.js} +1 -1
- package/dist/client/assets/{client-icons-50FpZDWK.js → client-icons-M2pakr5u.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CHoKFct5.js +1 -0
- package/dist/client/assets/{collapsible-CeBZpglT.js → collapsible-CnlVGt-G.js} +1 -1
- package/dist/client/assets/collection-detail-B_r2Oxl1.js +1 -0
- package/dist/client/assets/{collection-display-button-El-xnsaW.js → collection-display-button-ALXFDy_R.js} +1 -1
- package/dist/client/assets/{collection-search-gW4FCqmq.js → collection-search--9d0M5sc.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CB0t7kAl.js → collection-table-wrapper-DyQ4WIpY.js} +1 -1
- package/dist/client/assets/{collection-tabs-DIFXv7hR.js → collection-tabs-BfpnVdlQ.js} +1 -1
- package/dist/client/assets/{column-rules-o-DlIK_-.js → column-rules-DgVqSNU2.js} +1 -1
- package/dist/client/assets/{combobox-DlpsfK7m.js → combobox-BMxhMbUn.js} +1 -1
- package/dist/client/assets/{coming-soon-page-ZTZUbFgV.js → coming-soon-page-6F4aAL8E.js} +1 -1
- package/dist/client/assets/{command-C7n5qLsN.js → command-BlBQgQPI.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C2rDEgkL.js → companion-mcps-section-B3EkkVtL.js} +1 -1
- package/dist/client/assets/{config-BCpfsSBB.js → config-CE3I8pu5.js} +1 -1
- package/dist/client/assets/{connect-Du_rXIM1.js → connect-C4NhmEFJ.js} +3 -3
- package/dist/client/assets/{connect-layout-DyGwITyt.js → connect-layout-DZGJCEON.js} +1 -1
- package/dist/client/assets/{connection-Dik4epzq.js → connection-Bo3v2rj5.js} +1 -1
- package/dist/client/assets/{connection-card-DCnmTKpJ.js → connection-card-DMfcnulT.js} +1 -1
- package/dist/client/assets/{connection-detail-CaTyUBlA.js → connection-detail-DxSeFIwH.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-ta2yIvIb.js → connection-form-helpers-A3QfJozi.js} +1 -1
- package/dist/client/assets/{connections-Dy2qa1bG.js → connections-DzbvhEpV.js} +1 -1
- package/dist/client/assets/content-tab-CaoAhPSw.js +22 -0
- package/dist/client/assets/context-0XuHSild.js +1 -0
- package/dist/client/assets/{context-menu-BUZj1ZG7.js → context-menu-BD833dh0.js} +1 -1
- package/dist/client/assets/{context-shell-CWF9i3Vt.js → context-shell-D1uT0vY1.js} +3 -3
- package/dist/client/assets/{core.esm-DNra8pgf.js → core.esm-DJ5llHMe.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BkJvAp86.js → create-organization-dialog-nhhaUNZK.js} +1 -1
- package/dist/client/assets/{daily-pulse-DYjhyf3I.js → daily-pulse-Cry9rVi8.js} +1 -1
- package/dist/client/assets/date-utils-CrvIKg-s.js +1 -0
- package/dist/client/assets/{discover-nnC5Qnas.js → discover-C4Up8V0-.js} +1 -1
- package/dist/client/assets/{domain-settings-CpxFWOzU.js → domain-settings-Bec9kB9d.js} +1 -1
- package/dist/client/assets/{drawer-ZlYTI3Z6.js → drawer-0sYDH2mt.js} +1 -1
- package/dist/client/assets/{editor-BFHySd1K.js → editor-BctLuJLS.js} +1 -1
- package/dist/client/assets/{editor-classes-DPi5BWR5.js → editor-classes-BnPaf--r.js} +1 -1
- package/dist/client/assets/{empty-state-Bok1L2hc.js → empty-state-D6RWdvUz.js} +1 -1
- package/dist/client/assets/{empty-state-Cu20Qj3-.js → empty-state-DeArX05X.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-CMHPX5ZC.js +1 -0
- package/dist/client/assets/{extract-connection-data-CNLani4P.js → extract-connection-data-CBAyhzk-.js} +1 -1
- package/dist/client/assets/{feature-gate-dfnyrtcC.js → feature-gate-DQ0ZaDj1.js} +1 -1
- package/dist/client/assets/{feature-paywall-D-GfxA1X.js → feature-paywall-hsFyGLR_.js} +1 -1
- package/dist/client/assets/{file-explorer-DOlx1A5r.js → file-explorer-GrzeifA-.js} +1 -1
- package/dist/client/assets/{file-preview-DSIiiWjA.js → file-preview-Bcawxb03.js} +1 -1
- package/dist/client/assets/{file-share-button-CB7fcIJI.js → file-share-button-LmGmSS33.js} +2 -2
- package/dist/client/assets/{file-type-icon-DPqHd815.js → file-type-icon-DHFVwXjA.js} +1 -1
- package/dist/client/assets/{folder-icon-qexQSaYN.js → folder-icon-BwmfzM1C.js} +2 -2
- package/dist/client/assets/{form-Dpwt-9St.js → form-D4PspedZ.js} +1 -1
- package/dist/client/assets/{general-DJuGMWNv.js → general-CXfgWejD.js} +1 -1
- package/dist/client/assets/{home-D9ErGwHG.js → home-DkYJf0RN.js} +1 -1
- package/dist/client/assets/hosted-publish-api-CK3ZnEoi.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-BG4t8HgW.js +1 -0
- package/dist/client/assets/{icon-button-CwrVRVUS.js → icon-button-HZwQKD3a.js} +1 -1
- package/dist/client/assets/{index-BpRXpcv4.js → index-B32YFtAw.js} +1 -1
- package/dist/client/assets/{index-DK4LlU65.js → index-BCHFFeZZ.js} +1 -1
- package/dist/client/assets/{index-DzppA2EQ.js → index-BeV3dEoK.js} +3 -3
- package/dist/client/assets/{index-DUXVtfV1.js → index-BjrJaWD9.js} +1 -1
- package/dist/client/assets/{index-DPulqOQn.js → index-Bxkd37dZ.js} +1 -1
- package/dist/client/assets/{index-2uBqLA9S.js → index-CafY8AgN.js} +6 -6
- package/dist/client/assets/{index-DJM5MV7l.js → index-CgVQmSg0.js} +1 -1
- package/dist/client/assets/{index-TNsA6rsO.js → index-CvMuyNgv.js} +1 -1
- package/dist/client/assets/{index-C9OgV5Vt.js → index-DNa7Epd0.js} +1 -1
- package/dist/client/assets/{index-BWUABroT.js → index-D_6gfRTQ.js} +1 -1
- package/dist/client/assets/{index-DLuP-oy3.js → index-DgfcOEet.js} +1 -1
- package/dist/client/assets/index-EoMx4WDO.css +1 -0
- package/dist/client/assets/index-XzZeDzj0.js +4 -0
- package/dist/client/assets/{index-Cd_jqW-G.js → index-gqp4B5qj.js} +1 -1
- package/dist/client/assets/{index-CaH7O3hJ.js → index-ifZGovK1.js} +54 -54
- package/dist/client/assets/{index-CJu3ft8V.js → index-j4NUsiRT.js} +1 -1
- package/dist/client/assets/{index-redirect-CLzDU0fe.js → index-redirect-BKvfBlvA.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-u-Zd7Oxq.js → infiniteQueryObserver-DvmMaiCa.js} +1 -1
- package/dist/client/assets/infra-billing-WLIR9CQb.js +1 -0
- package/dist/client/assets/{input-DN6U5jAj.js → input-BeDIlaby.js} +1 -1
- package/dist/client/assets/{input-D2sd1bar.js → input-DIcILgWd.js} +7 -7
- package/dist/client/assets/{integration-icon-DCiBepJw.js → integration-icon-D1aQLe0v.js} +1 -1
- package/dist/client/assets/{jira-icon-DoiJbCfx.js → jira-icon-Bs7EGbwb.js} +1 -1
- package/dist/client/assets/{label-Cnc4HQwP.js → label-Dhoh3DcI.js} +1 -1
- package/dist/client/assets/{layout-BVW5q62A.js → layout-dz9-bhT2.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DMfsC9-u.js → legacy-agents-deep-DO-8kywe.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-BMyuR4az.js +1 -0
- package/dist/client/assets/library-BQ9URfiH.js +1 -0
- package/dist/client/assets/{login-CN9ueiIT.js → login-DwOQDvQC.js} +1 -1
- package/dist/client/assets/{markdown-CA3yd3L6.js → markdown-prFeEkT4.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Xaw0krD3.js → mcp-app-renderer-fHjuxWIZ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-3Gakbc_U.js → mcp-oauth-CNKUkWMd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CxgfM8zh.js → mcp-oauth-CTJ5Iw4i.js} +1 -1
- package/dist/client/assets/{members-54kLIghY.js → members-B9Wn7yAF.js} +1 -1
- package/dist/client/assets/{memory-CQX6dqQP.js → memory-BDb7_tyh.js} +2 -2
- package/dist/client/assets/{mini-report-page-DCq4FNu-.js → mini-report-page-Bsjfan82.js} +1 -1
- package/dist/client/assets/{mock-board-CrlDKQvj.js → mock-board-BWfjyR2S.js} +3 -3
- package/dist/client/assets/{monaco-editor-C7rmyhBT.js → monaco-editor-Wx_2qGOP.js} +2 -2
- package/dist/client/assets/monitoring-BmpcQtwP.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-Bhxzz0Gz.js → monitoring-stats-row-THiAXYTp.js} +1 -1
- package/dist/client/assets/{multi-select-DtSzZ5RJ.js → multi-select-DOxlfIKk.js} +1 -1
- package/dist/client/assets/mustache-BzHjgnm5.js +4 -0
- package/dist/client/assets/named-rule-uses-Mu_Msc9v.js +1 -0
- package/dist/client/assets/named-rule-view-CN2yeHp5.js +1 -0
- package/dist/client/assets/{new-project-dialog-DpHJ0D5s.js → new-project-dialog-DFsG79bb.js} +1 -1
- package/dist/client/assets/{oauth-callback-ChXsONZm.js → oauth-callback-BekJkoCF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BnJfOlsF.js → oauth-callback-ai-provider-FtcHAH0j.js} +1 -1
- package/dist/client/assets/{onboarding-CuSBfoiA.js → onboarding-DNskGrdg.js} +1 -1
- package/dist/client/assets/{openai-conversation-B0QRsRtq.js → openai-conversation-_LIGb37e.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-Cgq6MsN2.js → optimistic-project-sidebar-views-CrYamEqL.js} +1 -1
- package/dist/client/assets/order-monitor-day-DLFR-weA.js +1 -0
- package/dist/client/assets/{organization-choice-hoXHHizl.js → organization-choice-zGI39_sg.js} +1 -1
- package/dist/client/assets/{orgs-CsgsGgsX.js → orgs-BjIQy8J3.js} +1 -1
- package/dist/client/assets/page-seo-form-CrgZFHtq.js +1 -0
- package/dist/client/assets/{pair-5gOZrfkD.js → pair-Ck7rgrik.js} +7 -7
- package/dist/client/assets/parse-sections-YhOUxu7l.js +1 -0
- package/dist/client/assets/plan-Iixr6Ywe.js +1 -0
- package/dist/client/assets/{plan-ladder-BydnH1hR.js → plan-ladder-BKLU8eo8.js} +1 -1
- package/dist/client/assets/{popover-DSRFfUdL.js → popover-DaReiQzV.js} +1 -1
- package/dist/client/assets/post-calendar--v0MjZPE.js +1 -0
- package/dist/client/assets/post-editor-CRy0VAcT.js +2 -0
- package/dist/client/assets/{preview-content-hWNiqB3L.js → preview-content-DJOuEciL.js} +1 -1
- package/dist/client/assets/{preview-dialog-HJF1l34b.js → preview-dialog-CnlKftcv.js} +1 -1
- package/dist/client/assets/{preview-panel-PigPEt4W.js → preview-panel-C2Athpf5.js} +1 -1
- package/dist/client/assets/preview-tab-CzS9kIxI.js +551 -0
- package/dist/client/assets/product-picker-dialog-oD9OPZfl.js +1 -0
- package/dist/client/assets/{profile-D-LHzn9e.js → profile-DAF3l5cg.js} +1 -1
- package/dist/client/assets/{project-app-view-CGbP48WX.js → project-app-view-CZXBsQ0a.js} +1 -1
- package/dist/client/assets/project-apps-CG2eY1ZZ.js +1 -0
- package/dist/client/assets/{project-feed-uKBIzmIi.js → project-feed-K24c6-Xx.js} +1 -1
- package/dist/client/assets/{project-icon-njec1yh1.js → project-icon-ZadU5ZjL.js} +1 -1
- package/dist/client/assets/project-reports-Crv9B-vM.js +1 -0
- package/dist/client/assets/project-tasks-Cz-57jQh.js +1 -0
- package/dist/client/assets/{projects-OJnagyMB.js → projects-BWrIdbSy.js} +1 -1
- package/dist/client/assets/{projects-empty-state-C9IhB7We.js → projects-empty-state-BWAilN1f.js} +1 -1
- package/dist/client/assets/{prompts-B590L6x_.js → prompts-DKnoRB34.js} +1 -1
- package/dist/client/assets/record-editor-d52mwz1n.js +1 -0
- package/dist/client/assets/redirect-editor-C-WKtN9s.js +1 -0
- package/dist/client/assets/releases-api-q3AffL1J.js +1 -0
- package/dist/client/assets/reports-B3miutne.js +1 -0
- package/dist/client/assets/{reports-DBL7SnEu.js → reports-Bg1fi6kR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Be9p494r.js → reports-onboarding-acV5ZZpQ.js} +1 -1
- package/dist/client/assets/reports-tab-Clf7FxSU.js +2 -0
- package/dist/client/assets/{repositories-BEFfDE3p.js → repositories-CxdgYwWQ.js} +1 -1
- package/dist/client/assets/repositories-D42Ai47E.js +1 -0
- package/dist/client/assets/{repository-binding-BLgLcT4o.js → repository-binding-DtIeSvDY.js} +1 -1
- package/dist/client/assets/{repository-import-picker-lphgZTGu.js → repository-import-picker-C2sQ94O1.js} +1 -1
- package/dist/client/assets/{repository-picker-Dadd-3sc.js → repository-picker-BXaWFfDW.js} +1 -1
- package/dist/client/assets/{require-capability-D4hkdMxt.js → require-capability-DAfCGgHW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-e3_y0Tns.js → required-auth-layout-4jyUcmCy.js} +1 -1
- package/dist/client/assets/{reset-password-DPAO5WIu.js → reset-password-BGjvzv1z.js} +1 -1
- package/dist/client/assets/{resizable-D4wP3vt7.js → resizable-CQyxQjcn.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-56O81FJc.js +1 -0
- package/dist/client/assets/{review-settings-BJK_0aY-.js → review-settings-CWih3HF4.js} +1 -1
- package/dist/client/assets/{roles-CJ569tPn.js → roles-BRkp9ar3.js} +1 -1
- package/dist/client/assets/route-4SgoFvu0.js +1 -0
- package/dist/client/assets/route-BEESJELS.js +1 -0
- package/dist/client/assets/route-D6eBZFy3.js +1 -0
- package/dist/client/assets/runnable-block-editor-CqYgijVY.js +20 -0
- package/dist/client/assets/{sandbox-git-api-CRxdlhrN.js → sandbox-git-api-CH_-QFpD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-v9W7lV1M.js → sandbox-lifecycle-context-DdMgF1Lv.js} +1 -1
- package/dist/client/assets/schema-Cn4x5iT-.js +1 -0
- package/dist/client/assets/{schema-Cx9ZLa-H.js → schema-Dvc5tPTN.js} +1 -1
- package/dist/client/assets/{scroll-area-Bnrys5oj.js → scroll-area-9wUBmncr.js} +1 -1
- package/dist/client/assets/{search-input-CXQLMhKZ.js → search-input-1DLvCYgl.js} +1 -1
- package/dist/client/assets/{search-toggle-DxUZFRWy.js → search-toggle-BnK2KHqJ.js} +1 -1
- package/dist/client/assets/{secret-picker-HHgZv9y6.js → secret-picker-B4zI9e3W.js} +1 -1
- package/dist/client/assets/{secrets-Cm2ZaKef.js → secrets-C2PS9_a9.js} +1 -1
- package/dist/client/assets/{sections-DT5ozPKC.js → sections-DX6pY_bs.js} +1 -1
- package/dist/client/assets/sections-editor-DD9uWqQ8.js +4 -0
- package/dist/client/assets/{select-CSQbGY9x.js → select-DUEGSJco.js} +1 -1
- package/dist/client/assets/{select-model-NUb0C_oX.js → select-model-mFyCcf-O.js} +1 -1
- package/dist/client/assets/seo-editor-Bf-sfYSP.js +1 -0
- package/dist/client/assets/{separator-CjiQChVR.js → separator-Bk_a4cod.js} +1 -1
- package/dist/client/assets/settings-tab-DpQMA4J6.js +1 -0
- package/dist/client/assets/{sheet-C-yunzji.js → sheet-Dhe0uPV2.js} +1 -1
- package/dist/client/assets/shell-layout-U7D4A6nk.js +1 -0
- package/dist/client/assets/site-draft-actions-Dpnw67Ug.js +12 -0
- package/dist/client/assets/site-draft-view-Cho80MC6.js +2 -0
- package/dist/client/assets/site-editor-34XlqmyW.js +1 -0
- package/dist/client/assets/{skills-9HRxIPqn.js → skills-DghKPwKw.js} +1 -1
- package/dist/client/assets/slider-CLUaEqdg.js +1 -0
- package/dist/client/assets/{sortable.esm-C1zl1f3P.js → sortable.esm-CkqHW6-y.js} +1 -1
- package/dist/client/assets/{sso-PqsQn3xP.js → sso-DGFWPeza.js} +1 -1
- package/dist/client/assets/{suggestion-Wgq7DDQo.js → suggestion-BNEVVm5c.js} +2 -2
- package/dist/client/assets/{switch-DYA2xfHU.js → switch-ByCU93P4.js} +1 -1
- package/dist/client/assets/{symbol-B8wQ7lKk.js → symbol-BQLM2_V8.js} +1 -1
- package/dist/client/assets/{synced-repos-mXhCt1sQ.js → synced-repos-CjPrTUpI.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BpaLtZlY.js → tab-icon-glyph-Cz_BoFAU.js} +1 -1
- package/dist/client/assets/{table-BQLxO2Sb.js → table-Tw2gCVXe.js} +1 -1
- package/dist/client/assets/{tabs-2NCCfhSA.js → tabs-C7f3nqQx.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-FdiZZP36.js → task-assignee-avatar-BiPanmNM.js} +1 -1
- package/dist/client/assets/{task-board-DRNr9Dsj.js → task-board-BrTYr-oE.js} +1 -1
- package/dist/client/assets/{task-route-BaANwBST.js → task-route-BLP-DBaS.js} +1 -1
- package/dist/client/assets/{task-status-VcYcBtq_.js → task-status-CVpsP3bD.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-RJkelUr8.js → taskboard-analytics-CQMw4wzL.js} +1 -1
- package/dist/client/assets/tasks-C_346UtB.js +1 -0
- package/dist/client/assets/{tasks-COZY0QCJ.js → tasks-CtPgnGlW.js} +3 -3
- package/dist/client/assets/{textarea-CxhXyMKI.js → textarea-Bbbnnl4r.js} +1 -1
- package/dist/client/assets/{thread-analytics-BGQNbVS2.js → thread-analytics-CtQHMk9N.js} +1 -1
- package/dist/client/assets/{thread-intent-DKuqiaG7.js → thread-intent-7GmQH5mt.js} +4 -4
- package/dist/client/assets/{thread-route-CQ0phZyI.js → thread-route-C7RSGMhP.js} +1 -1
- package/dist/client/assets/{thread-route-jNELZX1N.js → thread-route-DpLeB4i0.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Cdv_wHnA.js → thread-sheet-body-dWggSd-b.js} +1 -1
- package/dist/client/assets/time-range-picker-BVXe-Owx.js +1 -0
- package/dist/client/assets/toggle-group-CXUKmPFr.js +1 -0
- package/dist/client/assets/{tool-namespace-DTl3so75.js → tool-namespace-DIE_8J9o.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BPY5dUh9.js → toolbar-icon-button-DzJeqLa2.js} +1 -1
- package/dist/client/assets/{tooltip-B5RmO6BW.js → tooltip-gMeEuHtO.js} +1 -1
- package/dist/client/assets/tooltipContext-BQS7kWxi.js +1 -0
- package/dist/client/assets/{track-BBpplM-4.js → track-DdeuRUoM.js} +1 -1
- package/dist/client/assets/{types-Bt5yyj-z.js → types-CHFSNT7a.js} +6 -6
- package/dist/client/assets/{url-slug-B41xLFy_.js → url-slug-D37s8EDd.js} +1 -1
- package/dist/client/assets/{usage-stats-BkcKNXzu.js → usage-stats-BecGIkLk.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D1TJRnIR.js → use-ai-providers-CAt_9H4n.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-B_CXDUdG.js +1 -0
- package/dist/client/assets/{use-automations-B9eI7BBQ.js → use-automations-C6LbyvJD.js} +1 -1
- package/dist/client/assets/{use-autosave-D3uy94Wi.js → use-autosave-e9CI9oFB.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-BNudmQ0u.js → use-chat-layout-state-24wCHq_-.js} +1 -1
- package/dist/client/assets/{use-clock-tick-D3FoyBXt.js → use-clock-tick-DflKMAWl.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BLomLbPK.js → use-connect-companion-3OWtftC8.js} +1 -1
- package/dist/client/assets/{use-connection-BwU_KLSF.js → use-connection-CBKH8IwL.js} +1 -1
- package/dist/client/assets/use-content-sync-D_qyLHCv.js +1 -0
- package/dist/client/assets/{use-copy-d7X6hrKI.js → use-copy-Cn8Org7G.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-jW1iVRi_.js +1 -0
- package/dist/client/assets/{use-date-fns-locale-BuGEMgXR.js → use-date-fns-locale-DTRxIyi4.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-KHVF-MyQ.js → use-debounced-autosave-DDaoW-uw.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DJkh4QSx.js → use-debounced-value-c5JdkW89.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Dx8wT8P5.js → use-deco-credits-D8w-JIDW.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-AlKmmETJ.js → use-decopilot-events-Cp8NaBPU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BQjQHz64.js → use-delete-connection-BJIObh7l.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BIA7CHLS.js → use-deployment-admin-D7XKR1Dx.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-CSz1rYUo.js +1 -0
- package/dist/client/assets/{use-file-configs-tsH4be9V.js → use-file-configs-DW0hmZjE.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-bGge9UaE.js → use-inbox-feed-DOpe-XBh.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BO0n6TVn.js → use-infinite-scroll-Cuyf7850.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqhkfI-R.js → use-join-requests-CBahVlKF.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CVsgtXg7.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DmZSbEuf.js → use-mcp-auth-status-Cs8ZHHaN.js} +1 -1
- package/dist/client/assets/use-mcp-client-D1kFCZ4v.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-DHm-ZTib.js → use-mcp-prompts-wKDmQlGB.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DiCKzhUm.js → use-mcp-tools-I-kpM305.js} +1 -1
- package/dist/client/assets/{use-members-h3MYd8gX.js → use-members-0ZBHc0S5.js} +1 -1
- package/dist/client/assets/{use-mobile-DCpa1RnA.js → use-mobile-CKoO3XSk.js} +1 -1
- package/dist/client/assets/use-move-blocks-Dm4etxGk.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Bt0oZ-ou.js → use-navigate-to-agent-DLX1nkvn.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-B2NuYLXS.js → use-open-billing-url-C5lEsbaH.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CL0a2tPL.js → use-org-auth-client-t4l-TKT1.js} +1 -1
- package/dist/client/assets/{use-org-fs-D_4Q985K.js → use-org-fs-49a1bhbu.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CC0BNhdO.js → use-org-repo-syncs-BunA5GFg.js} +1 -1
- package/dist/client/assets/{use-org-sso-LC63-uuA.js → use-org-sso-B_zXOLDA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D1Q7317o.js → use-organization-roles-Bc45ILhm.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DhvN44pQ.js → use-organization-settings-laAOR3Cm.js} +1 -1
- package/dist/client/assets/use-panel-navigate-Bghh8kV3.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-C3Vtd78t.js +1 -0
- package/dist/client/assets/{use-project-scope-Cq4vb2Sy.js → use-project-scope-DH5nL_oD.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CeIVmzp8.js → use-recent-apps-D6yVH6-8.js} +1 -1
- package/dist/client/assets/{use-releases-DQ--CsAF.js → use-releases-G0pirYfu.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CWir9L_Y.js → use-reports-diagnostic-BKJYEIJX.js} +1 -1
- package/dist/client/assets/{use-secrets-D6tUoaJC.js → use-secrets-DszBqpzD.js} +1 -1
- package/dist/client/assets/use-section-preview-base-BASvFHv_.js +1 -0
- package/dist/client/assets/{use-sidebar-collapsed-DPHQfMII.js → use-sidebar-collapsed-CuPY8XXm.js} +1 -1
- package/dist/client/assets/{use-tags-DE48pnzl.js → use-tags-BsXvHuTC.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DlTk43Uu.js → use-task-board-analytics-BtNGPBbp.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CSRq29Tm.js → use-task-board-events-BARWSwfj.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BsxjjcBf.js → use-task-board-item-prs-BhAhDKGd.js} +1 -1
- package/dist/client/assets/{use-task-metadata-ToXrxOCT.js → use-task-metadata-Dd-9Qkoq.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Bu_i1v9r.js → use-thread-analytics-B9Rm3t_E.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-jyAHyZHI.js → use-thread-outputs-CoFWg3_v.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-wCORGPw3.js +1 -0
- package/dist/client/assets/{useQueries-CddGJ3VE.js → useQueries-_Urb_S-y.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-JvpRoEFG.js +1 -0
- package/dist/client/assets/{users-2guAvf9G.js → users-BXTFPRVd.js} +1 -1
- package/dist/client/assets/{utils-DzhKsxx8.js → utils-CduIoZ0d.js} +2 -2
- package/dist/client/assets/variant-calendar-D0iLcmjF.js +1 -0
- package/dist/client/assets/variant-draft-pointer-HWAlFj6Z.js +1 -0
- package/dist/client/assets/virtual-mcp-Xd6PvE5_.js +1 -0
- package/dist/client/assets/{watch-sse-pool-DwBbAQ97.js → watch-sse-pool-BoG6Bqps.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +684 -684
- package/package.json +1 -1
- package/dist/client/assets/ActiveShapeUtils-DV40gvcg.js +0 -1
- package/dist/client/assets/AreaChart-C_4ebEom.js +0 -1
- package/dist/client/assets/BarChart-DfTtCBDv.js +0 -1
- package/dist/client/assets/CartesianChart-uNdbRuTj.js +0 -1
- package/dist/client/assets/ReferenceLine-ILm1GG8J.js +0 -1
- package/dist/client/assets/Sector-D2xOkxuc.js +0 -28
- package/dist/client/assets/agent-analytics-D74l8HWB.js +0 -2
- package/dist/client/assets/agent-app-CEBVAZwO.js +0 -1
- package/dist/client/assets/agent-assets-Bwo-LFkg.js +0 -1
- package/dist/client/assets/agent-automations-Du82D3qr.js +0 -1
- package/dist/client/assets/agent-deck-BZZHzjdZ.js +0 -1
- package/dist/client/assets/agent-e2e-D6ovLSkg.js +0 -1
- package/dist/client/assets/agent-experiments-Bf1OqB1m.js +0 -1
- package/dist/client/assets/agent-file-CzvpBEaK.js +0 -1
- package/dist/client/assets/agent-hosting-6te_9jdz.js +0 -1
- package/dist/client/assets/agent-library-BOSIxUYz.js +0 -1
- package/dist/client/assets/agent-library-file-C0RqJ45T.js +0 -1
- package/dist/client/assets/agent-monitor-C3Fta9kk.js +0 -1
- package/dist/client/assets/agent-releases-COSsnWfe.js +0 -2
- package/dist/client/assets/agent-settings-DDIl5jyz.js +0 -1
- package/dist/client/assets/agent-site-editor-DlN_1OE1.js +0 -27
- package/dist/client/assets/agent-site-editor-code-ByOIwjcy.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DSEuxkJh.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-pw2RBbYs.js +0 -1
- package/dist/client/assets/agent-view-IbmF6KBh.js +0 -1
- package/dist/client/assets/alert-B29bfkXd.js +0 -1
- package/dist/client/assets/analytics-sections-wgH0NLyS.js +0 -1
- package/dist/client/assets/api-keys-CiMyiLjo.js +0 -1
- package/dist/client/assets/app-editor-DgdEdwhZ.js +0 -1
- package/dist/client/assets/automation-list-row-qFFhCtZo.js +0 -1
- package/dist/client/assets/badge-Cnnepvq1.js +0 -1
- package/dist/client/assets/blocks-tab-states-jGeS9iVz.js +0 -20
- package/dist/client/assets/blog-schema-CUOOV4a2.js +0 -1
- package/dist/client/assets/category-editor-Gr46SDP4.js +0 -1
- package/dist/client/assets/cms-settings-editor-CxJ3W3GB.js +0 -1
- package/dist/client/assets/collection-detail-BXVqh2XU.js +0 -1
- package/dist/client/assets/content-tab-YH7YYY48.js +0 -22
- package/dist/client/assets/context-3twD8BEv.js +0 -1
- package/dist/client/assets/hosted-publish-feedback-9IsLIhi6.js +0 -1
- package/dist/client/assets/index-BRzGXE32.js +0 -4
- package/dist/client/assets/index-BqS2UmN9.css +0 -1
- package/dist/client/assets/infra-billing-DkMlIjvS.js +0 -1
- package/dist/client/assets/legacy-main-redirect-mSx9JMxj.js +0 -1
- package/dist/client/assets/library-BNARKbpY.js +0 -1
- package/dist/client/assets/monitoring-DX0mWeP-.js +0 -1
- package/dist/client/assets/mustache-BxPGtFxk.js +0 -4
- package/dist/client/assets/order-monitor-day-BHpHKh9K.js +0 -1
- package/dist/client/assets/page-seo-form-PX_1VQkb.js +0 -1
- package/dist/client/assets/plan-BnqYpKp5.js +0 -1
- package/dist/client/assets/post-calendar-D_8Ms9Cq.js +0 -1
- package/dist/client/assets/post-editor-lU8h7ku9.js +0 -2
- package/dist/client/assets/preview-tab-B-uX9H3E.js +0 -551
- package/dist/client/assets/product-picker-dialog-BUcziHgK.js +0 -1
- package/dist/client/assets/project-apps-CajNRGrz.js +0 -1
- package/dist/client/assets/project-reports-BwZ6fxIs.js +0 -1
- package/dist/client/assets/project-tasks-zYigtiRn.js +0 -1
- package/dist/client/assets/record-editor-BxllIkC_.js +0 -1
- package/dist/client/assets/redirect-editor-CTLxiYxe.js +0 -1
- package/dist/client/assets/reports-CJqSx9sD.js +0 -1
- package/dist/client/assets/reports-tab-B0M7UKAQ.js +0 -2
- package/dist/client/assets/repositories-DceuH_GA.js +0 -1
- package/dist/client/assets/resolve-tab-icon-CE5OwNrK.js +0 -1
- package/dist/client/assets/route-Bzf1UEGL.js +0 -1
- package/dist/client/assets/route-CG_vDQP9.js +0 -1
- package/dist/client/assets/route-Dfqmjwjm.js +0 -1
- package/dist/client/assets/schema-BdFq22Hl.js +0 -1
- package/dist/client/assets/secret-ciphertext-DZr2qcb4.js +0 -1
- package/dist/client/assets/sections-editor-CkId24Js.js +0 -4
- package/dist/client/assets/seo-editor-D886xssW.js +0 -1
- package/dist/client/assets/settings-tab-BmEKDSFe.js +0 -1
- package/dist/client/assets/shell-layout-vQvYndIW.js +0 -1
- package/dist/client/assets/site-editor-1ZGqBXbh.js +0 -1
- package/dist/client/assets/site-editor-toast-BtFL0E4q.js +0 -1
- package/dist/client/assets/slider-DB0IY-tO.js +0 -1
- package/dist/client/assets/tasks-CYZeHeAX.js +0 -1
- package/dist/client/assets/time-range-picker-DEciYFPf.js +0 -1
- package/dist/client/assets/toggle-group-CtdhsZGp.js +0 -1
- package/dist/client/assets/tooltipContext-C93Q6WFf.js +0 -1
- package/dist/client/assets/use-content-sync-BgOMBs5q.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-OUIvni0u.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-5oeXM-kY.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BrJK-bL3.js +0 -1
- package/dist/client/assets/use-main-schema-v8-CZLsOlEV.js +0 -1
- package/dist/client/assets/use-mcp-client-MRThuZpK.js +0 -10
- package/dist/client/assets/use-panel-navigate-DoD4Atgz.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DF_1PP5b.js +0 -1
- package/dist/client/assets/use-section-preview-base-Ca45yoz9.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ZoWXsJcj.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D2W70ffp.js +0 -1
- package/dist/client/assets/variant-calendar-Bdj0O-mA.js +0 -1
- package/dist/client/assets/variant-draft-pointer-_apEPqxm.js +0 -1
- package/dist/client/assets/virtual-mcp-CMZ8dHEU.js +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{c as M,b as ve,r as q,j as a,B as we,l as Q,K as Ft,ap as Gs,av as ar,az as Fa,U as Ot,t as _e,T as xs,V as vs,X as ys,a as ws,a2 as js,bs as $a,h as Lt,aq as Ea,I as _a,a5 as Oa,o as Ps,R as lr,m as Rt,dX as Qs,F as ir,D as or,v as cr,q as dr,Q as ur,H as hr,a$ as fr,a3 as mr,aV as Ws,e as Tn,y as La,J as Ua}from"./index-ifZGovK1.js";import{S as qa}from"./separator-Bk_a4cod.js";import{f as za,u as Vt,r as pr,l as br,c as gr,b as Ha}from"./chat-context-DXm8btNS.js";import{u as Ht,a0 as Ka,c as xr,b as vr,a1 as Js,a2 as hs,a3 as In,a4 as Va,a5 as Ga,E as yr,H as Ds,a6 as Qa,a7 as Bn,a8 as Wa,a9 as Ja,aa as Xa,ab as Ya,ac as Za,ad as el,ae as tl,C as Xs,A as wr,af as sl,ag as jr,w as Pr}from"./use-content-sync-D_qyLHCv.js";import{L as nl,a as rl}from"./shell-layout-U7D4A6nk.js";import{I as Sr}from"./toolbar-icon-button-DzJeqLa2.js";import{P as al,a as ll,b as il}from"./popover-DaReiQzV.js";import{c as wt,T as jt,a as Pt,b as Ss}from"./tooltip-gMeEuHtO.js";import{A as Ys,a as Zs,b as en,c as tn,g as sn,d as nn,e as rn,f as an}from"./alert-dialog-C-DaggA1.js";import{d as ol,e as cl,c as dl,C as Dn,a as Mn,b as Fn}from"./command-BlBQgQPI.js";import{T as Dt,a as kr,c as Cr}from"./tabs-C7f3nqQx.js";import{t as Nr}from"./ChevronUp-x46FJEcD.js";import{aM as ks,H as ul,a as Ar,aN as hl,b as fl,aO as Rr,O as ml}from"./agent-icon--EtIPqub.js";import{i as Tr}from"./DotsVertical-jkvtcdek.js";import{b as Ir}from"./Tool01-BsK9c3-e.js";import{s as Br}from"./Plus-vkM1FxVr.js";import{s as Cs}from"./Trash01-Z1ezoy3S.js";import{u as ln,r as Ms,a as $n,n as Fs,g as on,b as cn}from"./use-releases-G0pirYfu.js";import{u as pl}from"./use-members-0ZBHc0S5.js";import{o as bl,d as gl,l as xl,j as vl}from"./thread-intent-7GmQH5mt.js";import{h as Dr,r as Mr,g as yl,f as Ye,a as dn,j as Fr}from"./repository-binding-DtIeSvDY.js";import{u as wl}from"./use-debounced-value-c5JdkW89.js";import{u as jl}from"./use-clock-tick-DflKMAWl.js";import{u as Pl}from"./useInfiniteQuery-wCORGPw3.js";import{e as Sl,c as kl,p as Cl,g as $r,h as Er,i as _r}from"./use-navigate-to-agent-DLX1nkvn.js";import{R as En}from"./virtual-mcp-Xd6PvE5_.js";import{u as Or,c as Nl,e as Al}from"./experiments-tab-choice-CMHPX5ZC.js";import{G as Lr}from"./repository-picker-BXaWFfDW.js";import{a as un}from"./input-DIcILgWd.js";import{u as Rl,a as Tl}from"./use-fast-preview-draft-url-CSz1rYUo.js";import{aQ as Et,aR as Ur,E as fs,u as hn,aS as qr,aT as fn,a6 as Il,b as Bl,aU as zr,aC as Dl,aA as Ml,aV as Fl,aW as $l,q as El,B as At,f as mn,aX as _l,T as Ol,R as Hr}from"./parse-sections-YhOUxu7l.js";import{u as Ll}from"./index-j4NUsiRT.js";import{T as Ul}from"./textarea-Bbbnnl4r.js";import{i as pn}from"./CheckCircle-CMGqXocs.js";import{s as ms}from"./Image01-BCnLFq1D.js";import{b as ql}from"./format-time-Cq80KKvY.js";import{a as zl,g as Hl}from"./UserSquare-BBEl_BxL.js";import{n as Kl,b as Vl,m as Gl}from"./named-rule-uses-Mu_Msc9v.js";import{f as bn,b as Kr,r as Ns,p as Ql,c as Vr,i as gn,d as Wl,e as Gr,m as Jl,h as Xl,g as Qr,j as Yl,n as Zl,k as ei,l as ti,o as si,q as xn,t as ni,u as Wr,s as Jr,v as $s}from"./sandbox-git-api-CH_-QFpD.js";import{b as ri,g as ai}from"./utils-CduIoZ0d.js";import{i as li}from"./Monitor01-DQEkUL3d.js";import{w as Xr,g as ii,D as oi}from"./section-preview-url-7zfngvgW.js";import{w as vn}from"./device-hint-SeLRi17j.js";import{w as _n}from"./editor-BctLuJLS.js";import{p as ci,H as di,r as ui}from"./hosted-publish-api-CK3ZnEoi.js";import{h as hi,n as fi,a as mi}from"./hosted-publish-feedback-BG4t8HgW.js";import{s as Yr}from"./save-changes-debug-nBi-n9eV.js";import{u as pi}from"./use-mcp-client-D1kFCZ4v.js";import{b as bi,a as gi}from"./sandbox-lifecycle-context-DdMgF1Lv.js";import{b as xi}from"./thread-route-C7RSGMhP.js";const On=/[\r\n<>]/,vi=/^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/;function As(t){const e=t?.userName?.trim();if(!e||On.test(e))return null;const s=t?.userEmail?.trim();return!s||On.test(s)?{userName:e}:vi.test(s)?{userName:e,userEmail:s}:{userName:e}}function yi(t){return t.split(`
|
|
2
|
+
`).filter(e=>!/^Co-authored-by:\s/i.test(e)).join(`
|
|
3
|
+
`).trimEnd()}function wi(t){const e=t.userName.trim(),s=t.userEmail?.trim();return s?`Co-authored-by: ${e} <${s}>`:`Co-authored-by: ${e}`}function Zr(t,e){const s=As(e);if(!s)return t;const r=yi(t),n=wi(s);if(r.includes(n))return r;const o=r.trimEnd();return o.length>0?`${o}
|
|
4
|
+
|
|
5
|
+
${n}`:n}function ji(t,e){const s=t?.trim();return s?Zr(s,e):s||void 0}const Pi={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "},Ln=1114111;function Un(t){return t?t.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(e,s)=>{if(s.startsWith("#x")||s.startsWith("#X")){const r=Number.parseInt(s.slice(2),16);return!Number.isFinite(r)||r>Ln?e:String.fromCodePoint(r)}if(s.startsWith("#")){const r=Number.parseInt(s.slice(1),10);return!Number.isFinite(r)||r>Ln?e:String.fromCodePoint(r)}return Pi[s]??e}):""}function Si(t){const e=M.c(39),{url:s,onSave:r}=t,n=ve(),[o,d]=q.useState(s??"");let l;e[0]!==o?(l=o.trim(),e[0]=o,e[1]=l):l=e[1];const i=l;let c;e[2]!==r||e[3]!==i?(c=()=>r(i?bl(i):null),e[2]=r,e[3]=i,e[4]=c):c=e[4];const u=c;let h;e[5]!==n?(h=n("thread.branchPicker.localHint"),e[5]=n,e[6]=h):h=e[6];let m;e[7]!==h?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[7]=h,e[8]=m):m=e[8];let b;e[9]!==n?(b=n("thread.branchPicker.localUrlLabel"),e[9]=n,e[10]=b):b=e[10];let f;e[11]!==n?(f=n("thread.branchPicker.localUrlPlaceholder"),e[11]=n,e[12]=f):f=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=k=>d(k.target.value),e[13]=p):p=e[13];let x;e[14]!==u||e[15]!==i?(x=k=>{k.key==="Enter"&&i&&u()},e[14]=u,e[15]=i,e[16]=x):x=e[16];let g;e[17]!==b||e[18]!==f||e[19]!==x||e[20]!==o?(g=a.jsx("input",{type:"url",inputMode:"url","aria-label":b,placeholder:f,value:o,onChange:p,onKeyDown:x,className:"h-8 w-full rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[17]=b,e[18]=f,e[19]=x,e[20]=o,e[21]=g):g=e[21];let P;e[22]!==r||e[23]!==n||e[24]!==s?(P=s?a.jsx(we,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>r(null),children:n("thread.branchPicker.localTurnOff")}):a.jsx("span",{}),e[22]=r,e[23]=n,e[24]=s,e[25]=P):P=e[25];const y=!i;let v;e[26]!==n?(v=n("thread.branchPicker.save"),e[26]=n,e[27]=v):v=e[27];let j;e[28]!==u||e[29]!==y||e[30]!==v?(j=a.jsx(we,{size:"sm",disabled:y,onClick:u,children:v}),e[28]=u,e[29]=y,e[30]=v,e[31]=j):j=e[31];let w;e[32]!==P||e[33]!==j?(w=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P,j]}),e[32]=P,e[33]=j,e[34]=w):w=e[34];let N;return e[35]!==w||e[36]!==m||e[37]!==g?(N=a.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[m,g,w]}),e[35]=w,e[36]=m,e[37]=g,e[38]=N):N=e[38],N}function ki(t){const e=M.c(8),{virtualMcpId:s,branch:r,serve:n,rowRef:o,onPicked:d}=t,l=Ht(s,r),i=!!n.connection,c=i&&l.kind==="protocol"&&l.source==="local";let u;e[0]!==d||e[1]!==n?(u=()=>Ci(n,d),e[0]=d,e[1]=n,e[2]=u):u=e[2];let h;return e[3]!==o||e[4]!==i||e[5]!==c||e[6]!==u?(h=a.jsx(Ni,{rowRef:o,selected:i,connected:c,onSelect:u}),e[3]=o,e[4]=i,e[5]=c,e[6]=u,e[7]=h):h=e[7],h}function Ci(t,e){e?.(),!t.connection&&t.set({endpoint:t.lastEndpoint??Ka})}function Ni(t){const e=M.c(19),{rowRef:s,selected:r,connected:n,onSelect:o}=t,d=ve(),l=r?"bg-accent":"hover:bg-accent";let i;e[0]!==l?(i=Q("flex rounded-lg",l),e[0]=l,e[1]=i):i=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("span",{"data-testid":"localhost-dot",className:"h-2 w-2 shrink-0 rounded-full bg-foreground"}),e[2]=c):c=e[2];let u;e[3]!==d?(u=d("thread.branchPicker.localhost.label"),e[3]=d,e[4]=u):u=e[4];let h;e[5]!==u?(h=a.jsx("span",{className:"min-w-0 flex-1 truncate",children:u}),e[5]=u,e[6]=h):h=e[6];let m;e[7]!==n||e[8]!==d?(m=n&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:d("thread.branchPicker.localhost.connected")}),e[7]=n,e[8]=d,e[9]=m):m=e[9];let b;e[10]!==o||e[11]!==r||e[12]!==h||e[13]!==m?(b=a.jsxs("button",{type:"button","aria-pressed":r,onClick:o,className:"flex w-full min-w-0 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[c,h,m]}),e[10]=o,e[11]=r,e[12]=h,e[13]=m,e[14]=b):b=e[14];let f;return e[15]!==s||e[16]!==i||e[17]!==b?(f=a.jsx("div",{ref:s,className:i,children:b}),e[15]=s,e[16]=i,e[17]=b,e[18]=f):f=e[18],f}const Ai=10080*60*1e3;function Ri({sandboxMap:t,userId:e,rawBranches:s,now:r}){const n=new Map;for(const[h,m]of Object.entries(t??{}))for(const[b,f]of Object.entries(m??{})){let p=n.get(b);p||(p={userIds:new Set,lastActiveAt:0},n.set(b,p)),p.userIds.add(h);for(const x of Object.values(f??{})){const g=x?.createdAt??0;g>p.lastActiveAt&&(p.lastActiveAt=g)}}const o=r-Ai,d=[...n.entries()].filter(([,h])=>h.lastActiveAt>=o).sort((h,m)=>m[1].lastActiveAt-h[1].lastActiveAt).map(([h,m])=>({name:h,source:"recent",contributors:[...m.userIds],lastActiveAt:m.lastActiveAt})),l=new Set(d.map(h=>h.name)),i=new Set(Object.keys(t?.[e]??{})),c=[...i].filter(h=>!l.has(h)).sort().map(h=>({name:h,source:"yours"})),u=s.filter(h=>!i.has(h.name)&&!l.has(h.name)).map(h=>({name:h.name,source:"other",author:h.author??null}));return{recent:d,yours:c,others:u}}const Ti=100,Ii=50,Bi=300;function Us(t,e){const s=e.trim().toLowerCase();return s?t.toLowerCase().includes(s):!0}function Di(t){const e=M.c(39),{orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:d,owner:l,repo:i,search:c,enabled:u}=t,h=c===void 0?"":c,m=u===void 0?!0:u;let b;e[0]!==h?(b=h.trim(),e[0]=h,e[1]=b):b=e[1];const f=b,p=wl(f,Bi);let x;e[2]!==o?(x=Dr(o),e[2]=o,e[3]=x):x=e[3];const g=x,P=f.length>0;let y;e[4]!==p||e[5]!==s||e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==o?(y=Ft.githubBranchSearch(s,r,Mr(o),l,i,p),e[4]=p,e[5]=s,e[6]=r,e[7]=l,e[8]=i,e[9]=o,e[10]=y):y=e[10];const v=m&&g;let j;e[11]!==p||e[12]!==r||e[13]!==o?(j=W=>{const{pageParam:z}=W;return Gs(r,"REPOSITORY_SEARCH_BRANCHES",{...o,query:p,limit:p?Ii:Ti,cursor:z})},e[11]=p,e[12]=r,e[13]=o,e[14]=j):j=e[14];let w;e[15]!==p?(w=W=>p?void 0:W.nextCursor??void 0,e[15]=p,e[16]=w):w=e[16];let N;e[17]!==y||e[18]!==v||e[19]!==j||e[20]!==w?(N={queryKey:y,enabled:v,staleTime:3e4,retry:!1,initialPageParam:null,queryFn:j,getNextPageParam:w},e[17]=y,e[18]=v,e[19]=j,e[20]=w,e[21]=N):N=e[21];const{data:k,isLoading:A,isError:S,isFetching:R,hasNextPage:T,isFetchingNextPage:B,fetchNextPage:D}=Pl(N),F=P&&(p!==f||R),C=(k?.pages??[]).flatMap(Mi),I=jl(6e4),$=Ri({sandboxMap:d,userId:n,rawBranches:C,now:I});let Z;e[22]!==f?(Z=W=>Us(W.name,f),e[22]=f,e[23]=Z):Z=e[23];const ee=$.recent.filter(Z);let H;e[24]!==f?(H=W=>Us(W.name,f),e[24]=f,e[25]=H):H=e[25];const J=$.yours.filter(H),_=$.others,G=k?.pages[0],ie=P&&G&&!F?Math.max(0,G.totalCount-G.branches.length):0,X=!P&&T;let V;e[26]!==D?(V=()=>{D()},e[26]=D,e[27]=V):V=e[27];let ae;return e[28]!==ie||e[29]!==S||e[30]!==B||e[31]!==A||e[32]!==F||e[33]!==_||e[34]!==ee||e[35]!==X||e[36]!==V||e[37]!==J?(ae={recent:ee,yours:J,others:_,isLoading:A,isError:S,isSearching:F,hiddenMatchCount:ie,hasMore:X,isFetchingMore:B,fetchMore:V},e[28]=ie,e[29]=S,e[30]=B,e[31]=A,e[32]=F,e[33]=_,e[34]=ee,e[35]=X,e[36]=V,e[37]=J,e[38]=ae):ae=e[38],ae}function Mi(t){return t.branches}function Fi(t){const e=M.c(241),{virtualMcpId:s,isV8:r,userLabel:n,value:o,baseBranch:d,orgId:l,orgSlug:i,userId:c,target:u,owner:h,repo:m,sandboxMap:b,onChange:f,onCreateBranch:p,onAdoptBranch:x,disabled:g,spawnsNewChat:P,placement:y}=t,v=r===void 0?!1:r,j=g===void 0?!1:g,w=P===void 0?!1:P,N=y===void 0?"chat":y,k=ve(),A=N==="header",[S,R]=q.useState(!1),[T,B]=q.useState(!1),[D,F]=q.useState("branches"),[C,I]=q.useState(null),[$,Z]=q.useState(""),[ee,H]=q.useState(null),J=q.useRef(null),{releases:_,createRelease:G,renameRelease:ie,deleteRelease:X}=ln(s),{url:V,setUrl:ae,clear:W}=xr(s),z=vr(s),de=v&&!!z.connection,me=v?z.connection?.endpoint??null:V,re=!!me;let oe;e[0]!==W||e[1]!==v||e[2]!==z?(oe=()=>{W(),v&&z.clear()},e[0]=W,e[1]=v,e[2]=z,e[3]=oe):oe=e[3];const Y=oe;let ue;e[4]!==S?(ue={enabled:S},e[4]=S,e[5]=ue):ue=e[5];const{data:je}=pl(ue);let O;e[6]!==je?.data?.members?(O=se=>se?je?.data?.members?.find(yt=>yt.userId===se)?.user?.name??void 0:void 0,e[6]=je?.data?.members,e[7]=O):O=e[7];const U=O,L=_.length>=En;let Pe;e[8]!==k?(Pe=k("thread.branchPicker.capReached",{max:En}),e[8]=k,e[9]=Pe):Pe=e[9];const he=Pe,te=!!o&&o===d;let fe,$e,ge,Te,De,Ne,Ee,Ie,Me,ut,Ce,le,Se,ht,E,xe,be,ye,Be,ft,mt,Ge,Ze,ke,et,tt,Qe,kt,st;if(e[10]!==L||e[11]!==d||e[12]!==he||e[13]!==Y||e[14]!==G||e[15]!==X||e[16]!==j||e[17]!==$||e[18]!==te||e[19]!==A||e[20]!==re||e[21]!==de||e[22]!==x||e[23]!==f||e[24]!==p||e[25]!==S||e[26]!==ee||e[27]!==_||e[28]!==ie||e[29]!==ae||e[30]!==k||e[31]!==c||e[32]!==n||e[33]!==o){let se;e[63]!==o?(se=ne=>ne.branch===o,e[63]=o,e[64]=se):se=e[64];const yt=_.find(se);st=!te&&!yt&&!!o;const Ba=te?k("thread.branchPicker.live"):yt?.name??k("thread.branchPicker.defaultVersionName");Ce=de?k("thread.branchPicker.localhost.label"):re?k("thread.branchPicker.localLabel"):o?Ba:k("thread.branchPicker.selectVersion");const Da=de?"bg-foreground":re?"bg-special":te?"bg-success":Ms(yt?.color??"orange");let Qt;e[65]!==Y||e[66]!==f?(Qt=ne=>{Y(),f(ne),R(!1)},e[65]=Y,e[66]=f,e[67]=Qt):Qt=e[67],Se=Qt;let Wt;e[68]!==k?(Wt=ne=>{_e.error(k("thread.branchPicker.saveError"),{description:Js(k,hs(ne))})},e[68]=k,e[69]=Wt):Wt=e[69];const Fe=Wt;let Jt;e[70]!==ae?(Jt=ne=>{ae(ne),B(!1),R(!1)},e[70]=ae,e[71]=Jt):Jt=e[71],Ne=Jt;let Xt;e[72]!==L||e[73]!==he||e[74]!==Y||e[75]!==G||e[76]!==x||e[77]!==f||e[78]!==_||e[79]!==Fe||e[80]!==c?(Xt=(ne,Bt)=>{if(Y(),x){x(ne),B(!1),R(!1);return}if(!_.some(Bs=>Bs.branch===ne)){if(L){_e.error(he);return}G({branch:ne,name:Bt.trim()||ne,color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe)}f(ne),B(!1),R(!1)},e[72]=L,e[73]=he,e[74]=Y,e[75]=G,e[76]=x,e[77]=f,e[78]=_,e[79]=Fe,e[80]=c,e[81]=Xt):Xt=e[81],Ee=Xt;let Yt;e[82]!==L||e[83]!==he||e[84]!==Y||e[85]!==G||e[86]!==f||e[87]!==p||e[88]!==_||e[89]!==Fe||e[90]!==k||e[91]!==c||e[92]!==n?(Yt=()=>{if(L){_e.error(he);return}Y();const ne=on(n);G({branch:ne,name:$n(_,k("thread.branchPicker.defaultVersionName")),color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe),(p??f)(ne),R(!1)},e[82]=L,e[83]=he,e[84]=Y,e[85]=G,e[86]=f,e[87]=p,e[88]=_,e[89]=Fe,e[90]=k,e[91]=c,e[92]=n,e[93]=Yt):Yt=e[93],ut=Yt;let Zt;e[94]===Symbol.for("react.memo_cache_sentinel")?(Zt=()=>{I(null),Z(""),B(!1),F("branches")},e[94]=Zt):Zt=e[94];const Ma=Zt;let es;e[95]===Symbol.for("react.memo_cache_sentinel")?(es=ne=>{F(ne),B(!0)},e[95]=es):es=e[95],le=es;let ts;e[96]===Symbol.for("react.memo_cache_sentinel")?(ts=ne=>{I(ne.branch),Z(ne.name)},e[96]=ts):ts=e[96],xe=ts;let ss;e[97]!==$||e[98]!==ie||e[99]!==Fe?(ss=ne=>{const Bt=$.trim();Bt&&ie(ne,Bt).catch(Fe),I(null),Z("")},e[97]=$,e[98]=ie,e[99]=Fe,e[100]=ss):ss=e[100],ht=ss;let ns;e[101]!==L||e[102]!==he||e[103]!==G||e[104]!==$||e[105]!==_.length||e[106]!==Fe||e[107]!==c||e[108]!==o?(ns=()=>{const ne=$.trim();if(ne&&o){if(L){_e.error(he),I(null),Z("");return}G({branch:o,name:ne,color:Fs(_.length),createdBy:c,createdAt:new Date().toISOString()}).catch(Fe)}I(null),Z("")},e[101]=L,e[102]=he,e[103]=G,e[104]=$,e[105]=_.length,e[106]=Fe,e[107]=c,e[108]=o,e[109]=ns):ns=e[109],E=ns;let rs;e[110]===Symbol.for("react.memo_cache_sentinel")?(rs=()=>{I(null),Z("")},e[110]=rs):rs=e[110],Ie=rs;let as;e[111]!==d||e[112]!==X||e[113]!==ee||e[114]!==Se||e[115]!==_||e[116]!==Fe||e[117]!==o?(as=()=>{const ne=ee;if(H(null),!!ne){if(ne.branch===o){const Bt=_.find(Bs=>Bs.branch!==ne.branch);Bt?Se(Bt.branch):d?Se(d):R(!1)}else R(!1);X(ne.branch).catch(Fe)}},e[111]=d,e[112]=X,e[113]=ee,e[114]=Se,e[115]=_,e[116]=Fe,e[117]=o,e[118]=as):as=e[118],Me=as,De=al,tt=S,e[119]!==j?(Qe=j?void 0:ne=>{ne||Ma(),R(ne)},e[119]=j,e[120]=Qe):Qe=e[120],Te=wt,ge=jt,et=!0,ke="inline-flex min-w-0 shrink",$e=ll,Ze=!0,fe=we,be=nl.branchPicker,ye=A?"outline":"ghost",Be=A?"sm":"default",ft=Ce,mt=j;const Is=A?"text-xs":"text-xs text-muted-foreground hover:text-foreground";e[121]!==Is?(Ge=Q("shrink min-w-0 max-w-[220px] gap-2",Is,Sr),e[121]=Is,e[122]=Ge):Ge=e[122],kt=Q("h-2 w-2 shrink-0 rounded-full",o||re?Da:"bg-muted-foreground"),e[10]=L,e[11]=d,e[12]=he,e[13]=Y,e[14]=G,e[15]=X,e[16]=j,e[17]=$,e[18]=te,e[19]=A,e[20]=re,e[21]=de,e[22]=x,e[23]=f,e[24]=p,e[25]=S,e[26]=ee,e[27]=_,e[28]=ie,e[29]=ae,e[30]=k,e[31]=c,e[32]=n,e[33]=o,e[34]=fe,e[35]=$e,e[36]=ge,e[37]=Te,e[38]=De,e[39]=Ne,e[40]=Ee,e[41]=Ie,e[42]=Me,e[43]=ut,e[44]=Ce,e[45]=le,e[46]=Se,e[47]=ht,e[48]=E,e[49]=xe,e[50]=be,e[51]=ye,e[52]=Be,e[53]=ft,e[54]=mt,e[55]=Ge,e[56]=Ze,e[57]=ke,e[58]=et,e[59]=tt,e[60]=Qe,e[61]=kt,e[62]=st}else fe=e[34],$e=e[35],ge=e[36],Te=e[37],De=e[38],Ne=e[39],Ee=e[40],Ie=e[41],Me=e[42],ut=e[43],Ce=e[44],le=e[45],Se=e[46],ht=e[47],E=e[48],xe=e[49],be=e[50],ye=e[51],Be=e[52],ft=e[53],mt=e[54],Ge=e[55],Ze=e[56],ke=e[57],et=e[58],tt=e[59],Qe=e[60],kt=e[61],st=e[62];let We;e[123]!==kt?(We=a.jsx("span",{className:kt}),e[123]=kt,e[124]=We):We=e[124];let Je;e[125]!==Ce?(Je=a.jsx("span",{className:"min-w-0 truncate @max-3xl/panel-header:hidden",children:Ce}),e[125]=Ce,e[126]=Je):Je=e[126];let pt;e[127]!==j?(pt=!j&&a.jsx(Nr,{size:12,className:"opacity-60 shrink-0"}),e[127]=j,e[128]=pt):pt=e[128];let nt;e[129]!==fe||e[130]!==be||e[131]!==ye||e[132]!==Be||e[133]!==ft||e[134]!==mt||e[135]!==Ge||e[136]!==We||e[137]!==Je||e[138]!==pt?(nt=a.jsxs(fe,{"data-tour":be,variant:ye,size:Be,"aria-label":ft,disabled:mt,className:Ge,children:[We,Je,pt]}),e[129]=fe,e[130]=be,e[131]=ye,e[132]=Be,e[133]=ft,e[134]=mt,e[135]=Ge,e[136]=We,e[137]=Je,e[138]=pt,e[139]=nt):nt=e[139];let bt;e[140]!==$e||e[141]!==Ze||e[142]!==nt?(bt=a.jsx($e,{asChild:Ze,children:nt}),e[140]=$e,e[141]=Ze,e[142]=nt,e[143]=bt):bt=e[143];let rt;e[144]!==ke||e[145]!==bt?(rt=a.jsx("span",{className:ke,children:bt}),e[144]=ke,e[145]=bt,e[146]=rt):rt=e[146];let gt;e[147]!==ge||e[148]!==et||e[149]!==rt?(gt=a.jsx(ge,{asChild:et,children:rt}),e[147]=ge,e[148]=et,e[149]=rt,e[150]=gt):gt=e[150];let at;e[151]!==Ce?(at=a.jsx(Pt,{children:Ce}),e[151]=Ce,e[152]=at):at=e[152];let xt;e[153]!==Te||e[154]!==gt||e[155]!==at?(xt=a.jsxs(Te,{children:[gt,at]}),e[153]=Te,e[154]=gt,e[155]=at,e[156]=xt):xt=e[156];let Ct;e[157]===Symbol.for("react.memo_cache_sentinel")?(Ct=se=>{se.preventDefault(),J.current?.scrollIntoView({block:"nearest"})},e[157]=Ct):Ct=e[157];let Xe;e[158]!==w||e[159]!==k?(Xe=w&&a.jsx("p",{className:"px-2 pb-1.5 pt-1 text-xs text-muted-foreground",children:k("thread.branchPicker.newChatHint")}),e[158]=w,e[159]=k,e[160]=Xe):Xe=e[160];let vt;e[161]!==Ne||e[162]!==Ee||e[163]!==T||e[164]!==D||e[165]!==L||e[166]!==Ie||e[167]!==he||e[168]!==Y||e[169]!==ut||e[170]!==U||e[171]!==$||e[172]!==C||e[173]!==v||e[174]!==re||e[175]!==me||e[176]!==de||e[177]!==S||e[178]!==le||e[179]!==l||e[180]!==i||e[181]!==h||e[182]!==Se||e[183]!==_||e[184]!==m||e[185]!==b||e[186]!==ht||e[187]!==E||e[188]!==z||e[189]!==xe||e[190]!==k||e[191]!==u||e[192]!==V||e[193]!==st||e[194]!==c||e[195]!==o||e[196]!==s?(vt=T?a.jsx(Ei,{orgId:l,orgSlug:i,userId:c,target:u,owner:h,repo:m,sandboxMap:b,enabled:S,tab:D,onTabChange:F,isV8:v,localUrl:V,onSaveLocal:Ne,onBack:()=>B(!1),onAdopt:Ee}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Q("always-scrollbar flex max-h-[min(50vh,20rem)] flex-col overflow-y-auto",v&&"gap-1"),children:[!v&&re&&me&&a.jsx($i,{rowRef:J,url:me,onSelect:()=>le("local"),onEdit:()=>le("local"),onTurnOff:()=>Y()}),st&&o&&(C===o?a.jsx(qn,{value:$,onChange:Z,onSave:E,onCancel:Ie}):a.jsx(zn,{rowRef:re?void 0:J,dot:Ms("orange"),label:k("thread.branchPicker.defaultVersionName"),branch:o,selected:!re,onSelect:()=>Se(o),onRename:()=>{I(o),Z($n(_,k("thread.branchPicker.defaultVersionName")))}})),_.map(se=>C===se.branch?a.jsx(qn,{value:$,onChange:Z,onSave:()=>ht(se.branch),onCancel:Ie},se.branch):a.jsx(zn,{rowRef:!re&&se.branch===o?J:void 0,dot:Ms(se.color),label:se.name,creator:U(se.createdBy),branch:se.branch,selected:!re&&se.branch===o,onSelect:()=>Se(se.branch),onRename:()=>xe(se),onDelete:()=>H(se)},se.branch)),v&&a.jsx(ki,{virtualMcpId:s,branch:o,serve:z,rowRef:de?J:void 0,onPicked:()=>R(!1)})]}),(st||_.length>0||v)&&a.jsx("div",{className:"my-1 border-t"}),a.jsxs("button",{type:"button",onClick:()=>{ut()},disabled:L,className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",children:[a.jsx(Br,{className:"h-4 w-4 shrink-0"}),k("thread.branchPicker.newVersion")]}),L&&a.jsx("p",{className:"px-2 pb-1 pt-0.5 text-xs text-warning",children:he}),a.jsxs("button",{type:"button",onClick:()=>le("branches"),className:Q("flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left text-xs text-muted-foreground hover:bg-accent hover:text-foreground",v&&"mt-1"),children:[k("thread.branchPicker.advanced"),a.jsx(ar,{className:"h-4 w-4 shrink-0"})]})]}),e[161]=Ne,e[162]=Ee,e[163]=T,e[164]=D,e[165]=L,e[166]=Ie,e[167]=he,e[168]=Y,e[169]=ut,e[170]=U,e[171]=$,e[172]=C,e[173]=v,e[174]=re,e[175]=me,e[176]=de,e[177]=S,e[178]=le,e[179]=l,e[180]=i,e[181]=h,e[182]=Se,e[183]=_,e[184]=m,e[185]=b,e[186]=ht,e[187]=E,e[188]=z,e[189]=xe,e[190]=k,e[191]=u,e[192]=V,e[193]=st,e[194]=c,e[195]=o,e[196]=s,e[197]=vt):vt=e[197];let lt;e[198]!==Xe||e[199]!==vt?(lt=a.jsxs(il,{className:"w-[min(300px,calc(100vw-2rem))] p-1.5",align:"start",onOpenAutoFocus:Ct,children:[Xe,vt]}),e[198]=Xe,e[199]=vt,e[200]=lt):lt=e[200];let Nt;e[201]!==De||e[202]!==tt||e[203]!==Qe||e[204]!==xt||e[205]!==lt?(Nt=a.jsxs(De,{open:tt,onOpenChange:Qe,children:[xt,lt]}),e[201]=De,e[202]=tt,e[203]=Qe,e[204]=xt,e[205]=lt,e[206]=Nt):Nt=e[206];const Tt=Nt,It=ee!==null;let it;e[207]===Symbol.for("react.memo_cache_sentinel")?(it=se=>{se||H(null)},e[207]=it):it=e[207];let Oe;e[208]!==k?(Oe=k("thread.branchPicker.deleteTitle"),e[208]=k,e[209]=Oe):Oe=e[209];let Le;e[210]!==Oe?(Le=a.jsx(Ys,{children:Oe}),e[210]=Oe,e[211]=Le):Le=e[211];let Ue;e[212]!==ee||e[213]!==k?(Ue=ee&&k("thread.branchPicker.deleteConfirm",{name:ee.name}),e[212]=ee,e[213]=k,e[214]=Ue):Ue=e[214];let qe;e[215]!==Ue?(qe=a.jsx(Zs,{children:Ue}),e[215]=Ue,e[216]=qe):qe=e[216];let ze;e[217]!==Le||e[218]!==qe?(ze=a.jsxs(en,{children:[Le,qe]}),e[217]=Le,e[218]=qe,e[219]=ze):ze=e[219];let He;e[220]!==k?(He=k("thread.branchPicker.cancel"),e[220]=k,e[221]=He):He=e[221];let Ke;e[222]!==He?(Ke=a.jsx(tn,{children:He}),e[222]=He,e[223]=Ke):Ke=e[223];let Ve;e[224]!==k?(Ve=k("thread.branchPicker.delete"),e[224]=k,e[225]=Ve):Ve=e[225];let ot;e[226]!==Me||e[227]!==Ve?(ot=a.jsx(sn,{onClick:Me,variant:"destructive",children:Ve}),e[226]=Me,e[227]=Ve,e[228]=ot):ot=e[228];let K;e[229]!==Ke||e[230]!==ot?(K=a.jsxs(nn,{children:[Ke,ot]}),e[229]=Ke,e[230]=ot,e[231]=K):K=e[231];let ce;e[232]!==ze||e[233]!==K?(ce=a.jsxs(rn,{children:[ze,K]}),e[232]=ze,e[233]=K,e[234]=ce):ce=e[234];let pe;e[235]!==It||e[236]!==ce?(pe=a.jsx(an,{open:It,onOpenChange:it,children:ce}),e[235]=It,e[236]=ce,e[237]=pe):pe=e[237];let Ae;return e[238]!==Tt||e[239]!==pe?(Ae=a.jsxs(a.Fragment,{children:[Tt,pe]}),e[238]=Tt,e[239]=pe,e[240]=Ae):Ae=e[240],Ae}function qn(t){const e=M.c(20),{value:s,onChange:r,onSave:n,onCancel:o}=t,d=ve();let l;e[0]!==d?(l=d("thread.branchPicker.rename"),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==r?(i=f=>r(f.target.value),e[2]=r,e[3]=i):i=e[3];let c;e[4]!==o||e[5]!==n?(c=f=>{f.key==="Enter"&&n(),f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),o())},e[4]=o,e[5]=n,e[6]=c):c=e[6];let u;e[7]!==l||e[8]!==i||e[9]!==c||e[10]!==s?(u=a.jsx("input",{autoFocus:!0,"aria-label":l,value:s,onChange:i,onKeyDown:c,className:"h-8 flex-1 rounded-md border bg-transparent px-2 text-sm focus-ring"}),e[7]=l,e[8]=i,e[9]=c,e[10]=s,e[11]=u):u=e[11];let h;e[12]!==d?(h=d("thread.branchPicker.save"),e[12]=d,e[13]=h):h=e[13];let m;e[14]!==n||e[15]!==h?(m=a.jsx(we,{size:"sm",onClick:n,children:h}),e[14]=n,e[15]=h,e[16]=m):m=e[16];let b;return e[17]!==u||e[18]!==m?(b=a.jsxs("div",{className:"flex items-center gap-1.5 p-1",children:[u,m]}),e[17]=u,e[18]=m,e[19]=b):b=e[19],b}function zn(t){const e=M.c(49),{rowRef:s,dot:r,label:n,creator:o,branch:d,selected:l,onSelect:i,onRename:c,onDelete:u}=t,h=ve(),m=l?"bg-accent":"hover:bg-accent";let b;e[0]!==m?(b=Q("group flex items-center rounded-lg",m),e[0]=m,e[1]=b):b=e[1];let f;e[2]!==r?(f=Q("h-2 w-2 shrink-0 rounded-full",r),e[2]=r,e[3]=f):f=e[3];let p;e[4]!==f?(p=a.jsx("span",{className:f}),e[4]=f,e[5]=p):p=e[5];let x;e[6]!==o?(x=o&&a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:o}),e[6]=o,e[7]=x):x=e[7];let g;e[8]!==n||e[9]!==x?(g=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[n,x]}),e[8]=n,e[9]=x,e[10]=g):g=e[10];let P;e[11]!==i||e[12]!==l||e[13]!==p||e[14]!==g?(P=a.jsx(jt,{asChild:!0,children:a.jsxs("button",{type:"button","aria-pressed":l,onClick:i,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[p,g]})}),e[11]=i,e[12]=l,e[13]=p,e[14]=g,e[15]=P):P=e[15];let y;e[16]!==d||e[17]!==h?(y=h("thread.branchPicker.branchTooltip",{branch:d}),e[16]=d,e[17]=h,e[18]=y):y=e[18];let v;e[19]!==y?(v=a.jsx(Pt,{side:"bottom",className:"font-mono text-xs",children:y}),e[19]=y,e[20]=v):v=e[20];let j;e[21]!==P||e[22]!==v?(j=a.jsxs(wt,{children:[P,v]}),e[21]=P,e[22]=v,e[23]=j):j=e[23];let w;e[24]!==h?(w=h("thread.branchPicker.moreActions"),e[24]=h,e[25]=w):w=e[25];let N;e[26]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx(Tr,{className:"h-4 w-4"}),e[26]=N):N=e[26];let k;e[27]!==w?(k=a.jsx(xs,{asChild:!0,children:a.jsx(we,{variant:"ghost",size:"icon","aria-label":w,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:N})}),e[27]=w,e[28]=k):k=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=a.jsx(Ir,{className:"h-4 w-4"}),e[29]=A):A=e[29];let S;e[30]!==h?(S=h("thread.branchPicker.rename"),e[30]=h,e[31]=S):S=e[31];let R;e[32]!==c||e[33]!==S?(R=a.jsxs(Ot,{onSelect:c,children:[A,S]}),e[32]=c,e[33]=S,e[34]=R):R=e[34];let T;e[35]!==u||e[36]!==h?(T=u&&a.jsxs(Ot,{onSelect:u,className:"text-destructive focus:text-destructive",children:[a.jsx(Cs,{className:"h-4 w-4"}),h("thread.branchPicker.delete")]}),e[35]=u,e[36]=h,e[37]=T):T=e[37];let B;e[38]!==R||e[39]!==T?(B=a.jsxs(vs,{align:"end",children:[R,T]}),e[38]=R,e[39]=T,e[40]=B):B=e[40];let D;e[41]!==k||e[42]!==B?(D=a.jsxs(ys,{children:[k,B]}),e[41]=k,e[42]=B,e[43]=D):D=e[43];let F;return e[44]!==s||e[45]!==j||e[46]!==D||e[47]!==b?(F=a.jsxs("div",{ref:s,className:b,children:[j,D]}),e[44]=s,e[45]=j,e[46]=D,e[47]=b,e[48]=F):F=e[48],F}function $i(t){const e=M.c(40),{rowRef:s,url:r,onSelect:n,onEdit:o,onTurnOff:d}=t,l=ve();let i;try{let R;e[0]!==r?(R=new URL(r),e[0]=r,e[1]=R):R=e[1],i=R.host}catch{i=r}const c=i;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-special"}),e[2]=u):u=e[2];let h;e[3]!==l?(h=l("thread.branchPicker.localLabel"),e[3]=l,e[4]=h):h=e[4];let m;e[5]!==c?(m=a.jsx("span",{className:"ml-1.5 text-xs font-normal text-muted-foreground/70",children:c}),e[5]=c,e[6]=m):m=e[6];let b;e[7]!==h||e[8]!==m?(b=a.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[h,m]}),e[7]=h,e[8]=m,e[9]=b):b=e[9];let f;e[10]!==n||e[11]!==b?(f=a.jsxs("button",{type:"button","aria-pressed":!0,onClick:n,className:"flex min-w-0 flex-1 items-center gap-2.5 px-2 py-2 text-left text-sm",children:[u,b]}),e[10]=n,e[11]=b,e[12]=f):f=e[12];let p;e[13]!==l?(p=l("thread.branchPicker.moreActions"),e[13]=l,e[14]=p):p=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Tr,{className:"h-4 w-4"}),e[15]=x):x=e[15];let g;e[16]!==p?(g=a.jsx(xs,{asChild:!0,children:a.jsx(we,{variant:"ghost",size:"icon","aria-label":p,className:"mr-1 h-6 w-6 shrink-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100",children:x})}),e[16]=p,e[17]=g):g=e[17];let P;e[18]===Symbol.for("react.memo_cache_sentinel")?(P=a.jsx(Ir,{className:"h-4 w-4"}),e[18]=P):P=e[18];let y;e[19]!==l?(y=l("thread.branchPicker.rename"),e[19]=l,e[20]=y):y=e[20];let v;e[21]!==o||e[22]!==y?(v=a.jsxs(Ot,{onSelect:o,children:[P,y]}),e[21]=o,e[22]=y,e[23]=v):v=e[23];let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(Cs,{className:"h-4 w-4"}),e[24]=j):j=e[24];let w;e[25]!==l?(w=l("thread.branchPicker.localTurnOff"),e[25]=l,e[26]=w):w=e[26];let N;e[27]!==d||e[28]!==w?(N=a.jsxs(Ot,{onSelect:d,className:"text-destructive focus:text-destructive",children:[j,w]}),e[27]=d,e[28]=w,e[29]=N):N=e[29];let k;e[30]!==v||e[31]!==N?(k=a.jsxs(vs,{align:"end",children:[v,N]}),e[30]=v,e[31]=N,e[32]=k):k=e[32];let A;e[33]!==k||e[34]!==g?(A=a.jsxs(ys,{children:[g,k]}),e[33]=k,e[34]=g,e[35]=A):A=e[35];let S;return e[36]!==s||e[37]!==A||e[38]!==f?(S=a.jsxs("div",{ref:s,className:"group flex items-center rounded-lg bg-accent",children:[f,A]}),e[36]=s,e[37]=A,e[38]=f,e[39]=S):S=e[39],S}function Ei(t){const e=M.c(73),{orgId:s,orgSlug:r,userId:n,target:o,owner:d,repo:l,sandboxMap:i,enabled:c,tab:u,onTabChange:h,isV8:m,localUrl:b,onSaveLocal:f,onBack:p,onAdopt:x}=t,g=ve(),[P,y]=q.useState(""),v=u==="branches"?P:"",j=c&&u==="branches";let w;e[0]!==s||e[1]!==r||e[2]!==d||e[3]!==l||e[4]!==i||e[5]!==v||e[6]!==j||e[7]!==o||e[8]!==n?(w={orgId:s,orgSlug:r,userId:n,target:o,sandboxMap:i,owner:d,repo:l,search:v,enabled:j},e[0]=s,e[1]=r,e[2]=d,e[3]=l,e[4]=i,e[5]=v,e[6]=j,e[7]=o,e[8]=n,e[9]=w):w=e[9];const{recent:N,yours:k,others:A,isLoading:S,hasMore:R,isFetchingMore:T,fetchMore:B}=Di(w),D=c&&u==="prs";let F;e[10]!==s||e[11]!==r||e[12]!==d||e[13]!==l||e[14]!==D||e[15]!==o?(F={orgId:s,orgSlug:r,target:o,owner:d,repo:l,enabled:D},e[10]=s,e[11]=r,e[12]=d,e[13]=l,e[14]=D,e[15]=o,e[16]=F):F=e[16];const{data:C,isLoading:I}=Sl(F);let $;if(e[17]!==B||e[18]!==R||e[19]!==T||e[20]!==S||e[21]!==m||e[22]!==b||e[23]!==x||e[24]!==p||e[25]!==f||e[26]!==h||e[27]!==A||e[28]!==d||e[29]!==I||e[30]!==N||e[31]!==l||e[32]!==P||e[33]!==g||e[34]!==C||e[35]!==u||e[36]!==k){const Z=C===void 0?[]:C,ee=`${d}/${l}`;let H;e[38]!==ee?(H=ee.toLowerCase(),e[38]=ee,e[39]=H):H=e[39];const J=H;let _;e[40]!==J?(_=O=>O.headRepoFullName?.toLowerCase()===J,e[40]=J,e[41]=_):_=e[41];const G=Z.filter(_);let ie;if(e[42]!==A||e[43]!==N||e[44]!==k){const O=new Set;ie=[...N,...k,...A].filter(U=>O.has(U.name)?!1:(O.add(U.name),!0)),e[42]=A,e[43]=N,e[44]=k,e[45]=ie}else ie=e[45];const X=ie;let V;e[46]===Symbol.for("react.memo_cache_sentinel")?(V=a.jsx(ul,{className:"h-4 w-4 shrink-0"}),e[46]=V):V=e[46];let ae;e[47]!==g?(ae=g("thread.branchPicker.advancedBack"),e[47]=g,e[48]=ae):ae=e[48];let W;e[49]!==p||e[50]!==ae?(W=a.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-1.5 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground",children:[V,ae]}),e[49]=p,e[50]=ae,e[51]=W):W=e[51];let z;e[52]!==h?(z=O=>{h(O),y("")},e[52]=h,e[53]=z):z=e[53];let de;e[54]!==g?(de=g("thread.branchPicker.branchesTab"),e[54]=g,e[55]=de):de=e[55];let me;e[56]!==de?(me=a.jsx(Dt,{value:"branches",className:"h-6 px-2.5 text-xs",children:de}),e[56]=de,e[57]=me):me=e[57];let re;e[58]!==g?(re=g("thread.branchPicker.prsTab"),e[58]=g,e[59]=re):re=e[59];let oe;e[60]!==re?(oe=a.jsx(Dt,{value:"prs",className:"h-6 px-2.5 text-xs",children:re}),e[60]=re,e[61]=oe):oe=e[61];let Y;e[62]!==m||e[63]!==g?(Y=!m&&a.jsx(Dt,{value:"local",className:"h-6 px-2.5 text-xs",children:g("thread.branchPicker.localTab")}),e[62]=m,e[63]=g,e[64]=Y):Y=e[64];let ue;e[65]!==me||e[66]!==oe||e[67]!==Y?(ue=a.jsxs(kr,{className:"h-auto w-fit justify-start gap-1 bg-accent p-1",variant:"pill",children:[me,oe,Y]}),e[65]=me,e[66]=oe,e[67]=Y,e[68]=ue):ue=e[68];let je;e[69]!==z||e[70]!==ue||e[71]!==u?(je=a.jsx(Cr,{className:"px-2 pt-2 pb-1",value:u,onValueChange:z,children:ue}),e[69]=z,e[70]=ue,e[71]=u,e[72]=je):je=e[72],$=a.jsxs("div",{className:"flex flex-col",children:[W,je,u==="local"&&!m?a.jsx(Si,{url:b,onSave:f}):a.jsxs(ol,{filter:u==="branches"?_i:void 0,children:[a.jsx(cl,{placeholder:g(u==="branches"?"thread.branchPicker.searchBranches":"thread.branchPicker.searchPullRequests"),value:P,onValueChange:y}),a.jsx(dl,{onScroll:O=>{const U=O.currentTarget;u==="branches"&&U.scrollHeight-U.scrollTop-U.clientHeight<48&&B()},children:u==="branches"?a.jsxs(a.Fragment,{children:[S&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingMore")}),!S&&X.length===0&&a.jsx(Dn,{children:g("thread.branchPicker.noBranchesFound")}),X.length>0&&a.jsx(Mn,{children:X.map(O=>a.jsxs(Fn,{value:O.name,className:"cursor-pointer",onSelect:()=>x(O.name,O.name),children:[a.jsx(Fa,{className:"mr-2 h-4 w-4 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:O.name})]},O.name))}),R&&a.jsx("div",{className:"p-2",children:a.jsx(we,{variant:"ghost",size:"sm",className:"h-7 w-full text-xs",disabled:T,onClick:B,children:g(T?"thread.branchPicker.loadingMore":"thread.branchPicker.loadMoreBranches")})})]}):a.jsxs(a.Fragment,{children:[I&&a.jsx("div",{className:"p-3 text-xs text-muted-foreground",children:g("thread.branchPicker.loadingPullRequests")}),!I&&G.length===0&&a.jsx(Dn,{children:g("thread.branchPicker.noOpenPullRequests")}),G.length>0&&a.jsx(Mn,{children:G.map(O=>a.jsxs(Fn,{value:`#${O.number} ${O.title} ${O.head}`,className:"cursor-pointer",onSelect:()=>x(O.head,Un(O.title)),children:[a.jsx(ks,{className:"mr-2 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx("span",{className:"truncate",children:Un(O.title)}),a.jsxs("span",{className:"truncate text-xs text-muted-foreground",children:["#",O.number," · ",O.head]})]})]},O.number))})]})})]})]}),e[17]=B,e[18]=R,e[19]=T,e[20]=S,e[21]=m,e[22]=b,e[23]=x,e[24]=p,e[25]=f,e[26]=h,e[27]=A,e[28]=d,e[29]=I,e[30]=N,e[31]=l,e[32]=P,e[33]=g,e[34]=C,e[35]=u,e[36]=k,e[37]=$}else $=e[37];return $}function _i(t,e){return Us(t,e)?1:0}function Oi(t){const e=M.c(18),{locked:s,placement:r,value:n,virtualMcpId:o,isV8:d,userLabel:l,baseBranch:i,onChange:c,onCreateBranch:u,onAdoptBranch:h,orgId:m,orgSlug:b,userId:f,target:p,owner:x,repo:g,sandboxMap:P}=t;let y;return e[0]!==i||e[1]!==d||e[2]!==s||e[3]!==h||e[4]!==c||e[5]!==u||e[6]!==m||e[7]!==b||e[8]!==x||e[9]!==r||e[10]!==g||e[11]!==P||e[12]!==p||e[13]!==f||e[14]!==l||e[15]!==n||e[16]!==o?(y=a.jsx(Fi,{virtualMcpId:o,isV8:d,userLabel:l,value:n,baseBranch:i,orgId:m,orgSlug:b,userId:f,target:p,owner:x,repo:g,sandboxMap:P,onChange:c,onCreateBranch:u,onAdoptBranch:h,spawnsNewChat:s,placement:r}),e[0]=i,e[1]=d,e[2]=s,e[3]=h,e[4]=c,e[5]=u,e[6]=m,e[7]=b,e[8]=x,e[9]=r,e[10]=g,e[11]=P,e[12]=p,e[13]=f,e[14]=l,e[15]=n,e[16]=o,e[17]=y):y=e[17],y}function Li(t){const e=M.c(2),{branchPill:s}=t;if(!s)return null;let r;return e[0]!==s?(r=a.jsx(a.Fragment,{children:s}),e[0]=s,e[1]=r):r=e[1],r}function Ui(t){const e=M.c(21),{virtualMcp:s,currentBranch:r}=t,n=za(),o=Vt();let d;e[0]!==n?.messages||e[1]!==o?.isThreadLocked?(d=(n?.messages??[]).length>0||(o?.isThreadLocked??!1),e[0]=n?.messages,e[1]=o?.isThreadLocked,e[2]=d):d=e[2];const l=d,i=o?.setCurrentTaskBranch,c=o?.createTask;let u;e[3]!==o?.activeTask?.metadata||e[4]!==s?.metadata?(u=gl(s?.metadata)==="cms"&&xl(o?.activeTask?.metadata,s?.metadata)==="sandbox",e[3]=o?.activeTask?.metadata,e[4]=s?.metadata,e[5]=u):u=e[5];const h=u,m=yl(s),b=Ye(m),{data:f}=ws.useSession(),p=f?.user;let x;e[6]!==p?(x=cn(p),e[6]=p,e[7]=x):x=e[7];const g=x,P=f?.user?.id??"",{org:y}=js(),v=kl(s,r),j=Or(s?.id);let w;e[8]!==c||e[9]!==l||e[10]!==i?(w=D=>{l&&c?c({branch:D}):i&&i(D)},e[8]=c,e[9]=l,e[10]=i,e[11]=w):w=e[11];const N=w;let k;e[12]!==h||e[13]!==c||e[14]!==l||e[15]!==i?(k=D=>{(l||h)&&c?c({branch:D}):i&&i(D)},e[12]=h,e[13]=c,e[14]=l,e[15]=i,e[16]=k):k=e[16];const A=k;let S;e[17]!==c?(S=c?D=>c({runtime:"sandbox",branch:D}):void 0,e[17]=c,e[18]=S):S=e[18];const R=S,T=m&&Dr(b)?a.jsx(Oi,{userLabel:g,virtualMcpId:s?.id??"",isV8:j==="v8",value:r,baseBranch:v,orgId:y.id,orgSlug:y.slug,userId:P,target:b,owner:m.owner,repo:m.name,sandboxMap:s?.metadata?.sandboxMap,onChange:N,onCreateBranch:A,onAdoptBranch:R,locked:l,placement:"chat"},`${Mr(b)}:${m.owner}/${m.name}`):null;let B;return e[19]!==T?(B=a.jsx(Li,{branchPill:T}),e[19]=T,e[20]=B):B=e[20],B}const qi=$a("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function zi(t){const e=M.c(11);let s,r,n;e[0]!==t?({className:s,orientation:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==s||e[5]!==r?(o=Q(qi({orientation:r}),s),e[4]=s,e[5]=r,e[6]=o):o=e[6];let d;return e[7]!==r||e[8]!==n||e[9]!==o?(d=a.jsx("div",{role:"group","data-slot":"button-group","data-orientation":r,className:o,...n}),e[7]=r,e[8]=n,e[9]=o,e[10]=d):d=e[10],d}function Hi(t){const e=M.c(14),{item:s}=t;let r;e[0]!==s?(r=()=>{s.onSelect()},e[0]=s,e[1]=r):r=e[1];let n;e[2]!==s.disabled||e[3]!==s.icon||e[4]!==s.label||e[5]!==r?(n=a.jsxs(Ot,{disabled:s.disabled,onSelect:r,children:[s.icon,s.label]}),e[2]=s.disabled,e[3]=s.icon,e[4]=s.label,e[5]=r,e[6]=n):n=e[6];const o=n;if(!s.tooltip)return o;let d;e[7]!==o?(d=a.jsx(jt,{asChild:!0,children:o}),e[7]=o,e[8]=d):d=e[8];let l;e[9]!==s.tooltip?(l=a.jsx(Pt,{side:"right",children:s.tooltip}),e[9]=s.tooltip,e[10]=l):l=e[10];let i;return e[11]!==d||e[12]!==l?(i=a.jsxs(wt,{children:[d,l]}),e[11]=d,e[12]=l,e[13]=i):i=e[13],i}function ea(t){const e=M.c(20),{label:s,onClick:r,variant:n,size:o,disabled:d,loading:l,pulse:i,tooltip:c,icon:u,items:h,menuAriaLabel:m,className:b}=t,f=n===void 0?"default":n,p=o===void 0?"default":o,x=d===void 0?!1:d,g=l===void 0?!1:l,P=i===void 0?!1:i,y=(h?.length??0)>0;let v;if(e[0]!==b||e[1]!==x||e[2]!==y||e[3]!==u||e[4]!==h||e[5]!==s||e[6]!==g||e[7]!==m||e[8]!==r||e[9]!==P||e[10]!==p||e[11]!==c||e[12]!==f){const j=Q(Sr,f==="default"&&"focus-visible:inset-ring-current");let w;e[14]!==u||e[15]!==g?(w=g?a.jsx(Lt,{size:"xs"}):u,e[14]=u,e[15]=g,e[16]=w):w=e[16];const N=a.jsxs(we,{type:"button",variant:f,size:p,disabled:x,"aria-busy":g||void 0,onClick:g?void 0:r,className:Q(j,y&&"rounded-r-none border-r border-current/20"),children:[w,s]}),k=P&&"animate-pulse-brightness motion-reduce:animate-none motion-reduce:opacity-80";let A;e[17]!==b||e[18]!==k?(A=Q(k,b),e[17]=b,e[18]=k,e[19]=A):A=e[19],v=a.jsxs(zi,{className:A,children:[c?a.jsxs(wt,{children:[a.jsx(jt,{asChild:!0,children:a.jsx("span",{className:Q("inline-flex rounded-lg outline-none",j,x&&"cursor-not-allowed"),tabIndex:x?0:void 0,role:x?"button":void 0,"aria-disabled":x||void 0,children:N})}),a.jsx(Pt,{children:c})]}):N,y?a.jsxs(ys,{children:[a.jsx(xs,{asChild:!0,children:a.jsx(we,{type:"button",variant:f,size:p,"aria-label":m,className:Q("has-[>svg]:px-2",j),children:a.jsx(Nr,{className:"size-3.5"})})}),a.jsx(vs,{align:"end",children:h?.map(Ki)})]}):null]}),e[0]=b,e[1]=x,e[2]=y,e[3]=u,e[4]=h,e[5]=s,e[6]=g,e[7]=m,e[8]=r,e[9]=P,e[10]=p,e[11]=c,e[12]=f,e[13]=v}else v=e[13];return v}function Ki(t){return a.jsx(Hi,{item:t},t.key)}function ta(t){return As({userName:t?.name,userEmail:t?.email})??void 0}function Rs(t){const e=M.c(18),{state:s,header:r,body:n,note:o,gate:d,footer:l}=t,i=s!=="ready";let c;e[0]!==r?(c=a.jsx("div",{className:"space-y-0.5 px-4 py-3",children:r}),e[0]=r,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx("div",{className:"border-t"}),e[2]=u):u=e[2];let h;e[3]!==o?(h=o?a.jsx("div",{className:"space-y-1.5 border-t px-4 py-3",children:o}):null,e[3]=o,e[4]=h):h=e[4];let m;e[5]!==n||e[6]!==h?(m=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[n,h]}),e[5]=n,e[6]=h,e[7]=m):m=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx("div",{className:"border-t"}),e[8]=b):b=e[8];let f;e[9]!==l?(f=a.jsx("div",{className:"space-y-2 px-4 py-3",children:l}),e[9]=l,e[10]=f):f=e[10];let p;return e[11]!==d||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==m||e[16]!==f?(p=a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col","data-publish-state":s,"aria-busy":i,children:[c,u,m,d,b,f]}),e[11]=d,e[12]=s,e[13]=i,e[14]=c,e[15]=m,e[16]=f,e[17]=p):p=e[17],p}function Kt(t){const e=M.c(2),{children:s}=t;let r;return e[0]!==s?(r=a.jsx("div",{className:"scroll-fade min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain px-4 pt-3 pb-2 [scrollbar-width:thin]",children:s}),e[0]=s,e[1]=r):r=e[1],r}function sa(t){const e=M.c(10);let s,r,n;e[0]!==t?({className:r,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==r?(o=Q("rounded-lg border bg-card px-3 py-2.5",r),e[4]=r,e[5]=o):o=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==o?(d=a.jsx("div",{className:o,...n,children:s}),e[6]=s,e[7]=n,e[8]=o,e[9]=d):d=e[9],d}function dt(t){const e=M.c(4),{className:s}=t;let r;e[0]!==s?(r=Q("animate-pulse rounded bg-muted motion-reduce:animate-none",s),e[0]=s,e[1]=r):r=e[1];let n;return e[2]!==r?(n=a.jsx("div",{className:r}),e[2]=r,e[3]=n):n=e[3],n}function Mt(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(sa,{children:a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(dt,{className:"size-4 rounded-md"}),a.jsx(dt,{className:"h-3 w-24"}),a.jsx(dt,{className:"h-2.5 w-16"}),a.jsx(dt,{className:"ml-auto size-6 rounded"})]})}),t[0]=e):e=t[0],e}async function Vi(t,e,s){const r=As(s.coAuthor),{changeRequest:n}=await Gs(t,"CHANGE_REQUEST_OPEN",{...e,head:s.branch,base:s.base,title:s.title,body:ji(s.body,r)||void 0});return{number:n.number,htmlUrl:n.url}}class na extends Error{reason;detail;constructor(e,s){super(s||`Merge refused: ${e}`),this.name="ChangeRequestMergeRefused",this.reason=e,this.detail=s}}async function ra(t,e,s){const r=As(s.coAuthor),n=r?Zr(s.commitMessage?.trim()??"",r):s.commitMessage?.trim()||void 0,o=await Gs(t,"CHANGE_REQUEST_MERGE",{...e,number:s.number,strategy:"squash",commitTitle:s.commitTitle,commitMessage:n});if(!o.merged)throw new na(o.reason??"error",o.detail)}function Gi(t,e){switch(t){case"conflict":return e("thread.mergeRefused.conflict");case"blocked":return e("thread.mergeRefused.blocked");case"rate_limited":return e("thread.mergeRefused.rateLimited");case"not_found":return e("thread.mergeRefused.notFound");default:return e("thread.mergeRefused.error")}}class qs extends Error{constructor(){super("The branch changed since these changes were shown"),this.name="PublishHeadMovedError"}}class yn extends Error{constructor(e,s,r){super(e),this.step=s,this.pr=r,this.name="PublishStepError"}step;pr}const ps=255;function aa(t){if(t.length<=ps)return t;const e=t.slice(0,ps-1),s=e.lastIndexOf(" ");return`${(s>0?e.slice(0,s):e).trimEnd()}…`}function Qi(t){const e=t.title.trim(),s=t.body.trim(),r=[e,s].filter(Boolean).join(`
|
|
6
|
+
|
|
7
|
+
`);if(e.length>ps)return{title:aa(e),body:r,message:r};const n=e||t.fallbackTitle;return{title:n,body:s||void 0,message:r||n}}function Wi(t,e){const s=t.trim().split(`
|
|
8
|
+
`);return Qi({title:s[0]??"",body:s.slice(1).join(`
|
|
9
|
+
`),fallbackTitle:e})}function bs(t){return{orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:t.threadId}}function Ji(t){return t.fastPreview?{fastPreview:!0}:void 0}async function Es(t,e,s){try{return await s()}catch(r){throw new yn(r instanceof Error?r.message:e,t)}}async function la(t){const{expectedHeadSha:e,expectedDiffSignature:s}=t;if(!e&&!s)return;const r=await bn(bs(t)).catch(()=>null);if(!r)return;if(e&&r.headSha&&r.headSha!==e)throw new qs;if(!s)return;const n=await Kr(bs(t),r,t.baseBranch,Ji(t)).catch(()=>null);if(n&&Ns(n)!==s)throw new qs}function ia(t,e){return Ql(bs(t),e)}function oa(t,e){return Vi(t.orgSlug,t.target,{branch:t.headBranch,title:e.title,body:e.body,base:t.baseBranch,coAuthor:t.coAuthor})}async function Xi(t,e,s){await la(t),await Es("push",s("thread.publishDialog.failedPushChanges"),()=>ia(t,e.message)),await Es("sync",s("thread.publishDialog.failedRebase"),()=>Vr(bs(t),t.baseBranch));const r=await Es("open-pr",s("thread.publishDialog.failedOpenPullRequest"),()=>oa(t,e));try{await ra(t.orgSlug,t.target,{number:r.number,commitTitle:e.title,commitMessage:e.body,coAuthor:t.coAuthor})}catch(n){throw new yn(n instanceof Error?n.message:s("thread.publishDialog.failedMergePullRequest"),"merge",r)}return r}async function Yi(t,e){return await la(t),await ia(t,e.message),oa(t,e)}function Hn(t,e){return t instanceof qs?{message:e("siteEditor.publish.changedMeanwhile"),pullRequest:null,headMoved:!0}:t instanceof yn&&t.step==="merge"&&t.pr?{message:e("thread.publishDialog.mergeFailed",{prNumber:t.pr.number,message:t.message}),pullRequest:t.pr,headMoved:!1}:{message:t instanceof Error?t.message:e("thread.publishDialog.failedPublish"),pullRequest:null,headMoved:!1}}function Zi(t,e){_e.success(e("thread.publishDialog.submittedForReview",{prNumber:t.number}),{action:{label:e("thread.publishDialog.viewOnProvider"),onClick:()=>window.open(t.htmlUrl,"_blank","noopener,noreferrer")}})}function ca(t){return t.kind!=="block"?null:t.namedRule??null}function eo(t,e){const s=e.find(r=>r&&typeof r=="object");return s?Fl(s.__resolveType):zr(t)}const to=/(?:^|\/)\.deco\/blocks\/([^/]+)\.json$/;function wn(t){const e=to.exec(t)?.[1];return e?ri(e):null}function gs(t){if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&!Array.isArray(e))return e}catch{}return null}function so(t,e){return t===null?"new":e===null?"removed":"edited"}function da(t){const e=t.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return e?(e.charAt(0).toUpperCase()+e.slice(1)).replace(/\s+[A-Z](?=[a-z])/g,s=>s.toLowerCase()):t}function _t(t,e,s=!1){if(t&&typeof t=="object"&&!Array.isArray(t)){const r=t.__resolveType;if(typeof r=="string"&&r.trim()){if(s)return Il(r);const o=(r.split("/").pop()??r).replace(/\.[jt]sx?$/,"");return da(o)||o}}return`Section ${e+1}`}function jn(t){if(qr(t))return t.value??null;const e=t.__resolveType;return typeof e=="string"&&Bl(e)?t.section??null:null}const ua=6;function ds(t,e=0){if(e>ua||!t||typeof t!="object")return[];if(Array.isArray(t))return t.flatMap(n=>ds(n,e+1));const s=t;if(fn(s.__resolveType))return zs(s).flatMap(n=>ds(n?.value,e+1));const r=jn(s);return r!==null?ds(r,e+1):[s]}function zs(t){const e=t?.variants;return Array.isArray(e)?e.map(s=>s&&typeof s=="object"&&!Array.isArray(s)?s:null):[]}function Kn(t){let e=t;for(let s=0;s<ua;s++){if(!e||typeof e!="object"||Array.isArray(e))return null;const r=e;if(fn(r.__resolveType))return r;const n=jn(r);if(n===null)return null;e=n}return null}function no(t,e,s){const r=zs(Kn(t)),n=e?zs(Kn(e)):[],o=e?Array.from({length:Math.max(r.length,n.length)},(i,c)=>c).filter(i=>!Ts(r[i],n[i])):[],l=[...o.map(i=>r[i]??n[i]),...r.filter((i,c)=>!o.includes(c))].flatMap(i=>ds(i?.value)).map(i=>_t(i,s,!0));return[...new Set(l)]}function _s(t,e,s,r,n){let o=t,d=!1;for(let i=0;i<4;i++){if(!o||typeof o!="object"||Array.isArray(o)){d=!0;break}const c=o;if(fn(c.__resolveType)){d=!0;break}const u=jn(c);if(u===null)break;o=u}const l=d?no(t,n,e):[];return{name:_t(d?t:o,e,!0),kind:"section",status:s,fields:r,...d?{wrapper:!0}:{},...l.length>0?{held:l}:{}}}function Hs(t,e){const s=t.sections;if(Array.isArray(s))return s.flatMap((r,n)=>r&&typeof r=="object"&&!Array.isArray(r)?[{section:r,basePath:["sections",n]}]:[]);if(s&&typeof s=="object"){const r=s.variants;if(Array.isArray(r))return r.flatMap((n,o)=>{const d=n&&typeof n=="object"&&!Array.isArray(n)?n.value:null,l=e&&qr(d),i=l?d.value:d;if(!Array.isArray(i))return[];const c=l?["sections","variants",o,"value","value"]:["sections","variants",o,"value"];return i.flatMap((u,h)=>u&&typeof u=="object"&&!Array.isArray(u)?[{section:u,basePath:[...c,h]}]:[])})}return[]}function Vn(t){return JSON.stringify(t,(e,s)=>{if(s&&typeof s=="object"&&!Array.isArray(s)){const r=s;return Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{})}return s})}function Ts(t,e){return t===void 0&&e===void 0?!0:Vn(t)===Vn(e)}function Ut(t,e,s,r=new Set){const n=new Set([...Object.keys(t??{}),...Object.keys(e??{})]),o=[];for(const d of n){if(d.startsWith("__")||r.has(d))continue;const l=t?t[d]:void 0,i=e?e[d]:void 0;Ts(l,i)||o.push({label:da(d),path:[...s,d],from:l,to:i})}return o}const ro=new Set(["sections"]);function Pn(t,e,s=!1){const r=t?Hs(t,s):[],n=e?Hs(e,s):[],o=[],d=Math.max(r.length,n.length);for(let i=0;i<d;i++){const c=r[i],u=n[i];if(!s){const h=ao(c,u,i);h&&o.push(h);continue}if(c&&u){if(Ts(c.section,u.section))continue;o.push(_s(u.section,i,"edited",Ut(c.section,u.section,u.basePath),c.section))}else u?o.push(_s(u.section,i,"new",[])):c&&o.push(_s(c.section,i,"removed",[]))}const l=Ut(t,e,[],ro);return l.length>0&&o.push({name:"Page settings",kind:"settings",status:"edited",fields:l}),o}function ao(t,e,s){return t&&e?Ts(t.section,e.section)?null:{name:_t(e.section,s),kind:"section",status:"edited",fields:Ut(t.section,e.section,e.basePath)}:e?{name:_t(e.section,s),kind:"section",status:"new",fields:[]}:t?{name:_t(t.section,s),kind:"section",status:"removed",fields:[]}:null}function Ks(t,e){return{kind:"other",blockKey:null,name:t.split("/").pop()??t,pagePath:null,isSiteApp:!1,status:e,filepaths:[t],sections:[],fromJson:null,toJson:null}}function lo(t){const e=[],s=[],r=[],n=[];for(const[o,d]of Object.entries(t?.diffs??{})){if(gn(o)){n.push(o);continue}const l=so(d.from,d.to),i=wn(o);if(!i){r.push(Ks(o,l));continue}const c=gs(d.from),u=gs(d.to),h=u??c;if(!h){r.push(Ks(o,l));continue}const m=Et(i,h);if(m){e.push({kind:"page",blockKey:i,name:m.name,pagePath:m.path,isSiteApp:!1,status:l,filepaths:[o],sections:l==="edited"?Pn(c,u):[],fromJson:c,toJson:u});continue}const b=hn(i,h);s.push({kind:"block",blockKey:i,name:fs(i,h),pagePath:null,isSiteApp:b,status:l,filepaths:[o],sections:l==="edited"?[{name:fs(i,h),kind:"section",status:"edited",fields:Ut(c,u,[])}].filter(f=>f.fields.length>0):[],fromJson:c,toJson:u})}return ha({pages:e,blocks:s,other:r,generated:n})}function Os(t,e){return(t.filepaths[0]??"").localeCompare(e.filepaths[0]??"")}function ha(t){const{pages:e,blocks:s,other:r,generated:n}=t;return e.sort(Os),s.sort(Os),r.sort(Os),{pages:e,blocks:s,other:r,generated:n,count:e.length+s.length+r.length}}function io(t){return t==="added"?"new":t==="removed"?"removed":"edited"}function fa(t){return t.startsWith("pages-")}function ma(t){const{files:e,lookup:s,diff:r}=t,n=[],o=[],d=[],l=[];for(const i of e){const c=i.path;if(gn(c)){l.push(c);continue}const u=io(i.status),h=wn(c);if(!h){d.push(Ks(c,u));continue}const m=r?.diffs[c],b=gs(m?.from??null),f=gs(m?.to??null),p=pa(s,h),x=p??f??b;if((p?Et(h,p):null)??(!p&&fa(h))){const y=x?Et(h,x):null;n.push({kind:"page",blockKey:h,name:y?.name??Ur(h),pagePath:y?.path??null,isSiteApp:!1,status:u,filepaths:[c],sections:u==="edited"?Pn(b,f):[],fromJson:b,toJson:f??(u==="new"?p:null)});continue}const P=fs(h,x??{});o.push({kind:"block",blockKey:h,name:P,pagePath:null,isSiteApp:hn(h,p??{}),status:u,filepaths:[c],sections:u==="edited"?[{name:P,kind:"section",status:"edited",fields:Ut(b,f,[])}].filter(y=>y.fields.length>0):[],fromJson:b,toJson:f})}return ha({pages:n,blocks:o,other:d,generated:l})}function pa(t,e){const s=t?.[e];return s&&typeof s=="object"&&!Array.isArray(s)?s:null}function oo(t,e){return t??e}function ba(t){return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}const Ls=3;function ls(t){if(t.length<=Ls)return ba(t);const e=t.length-Ls;return`${t.slice(0,Ls).join(", ")} and ${e} more`}function co(t,e){if(!e){const r=t.sections.filter(n=>n.kind==="section").map(n=>n.name).slice(0,3);return r.length>0?`${t.name} (${r.join(", ")})`:t.name}const s=[...new Set(t.sections.filter(r=>r.kind==="section").flatMap(r=>r.wrapper?r.held??[]:[r.name]))].slice(0,3);return s.length>0?`${t.name} (${s.join(", ")})`:t.name}function uo(t){const e=ca(t);return e==="experiments"?"A/B tests":e==="campaigns"?"Campaign dates":t.name}function ho(t){const e=[],s=t.pages.filter(l=>l.status==="edited"),r=t.pages.filter(l=>l.status==="new"),n=t.pages.filter(l=>l.status==="removed");if(s.length>0&&e.push(`updated ${ls(s.map(l=>co(l,!!t.v8)))}`),r.length>0){const l=r.length===1?"page":"pages";e.push(`added the ${ls(r.map(i=>i.name))} ${l}`)}if(n.length>0){const l=n.length===1?"page":"pages";e.push(`removed the ${ls(n.map(i=>i.name))} ${l}`)}const o=t.blocks.map(uo);if(o.length>0&&e.push(`changed ${ls(o)}`),t.other.length>0){const l=t.other.length===1?"file":"files";e.push(`changed ${t.other.length} ${l}`)}if(e.length===0)return"";const d=ba(e);return aa(d.charAt(0).toUpperCase()+d.slice(1))}function fo(t,e){return t?Hs(t,e).length:0}function mo(t,e=!1){const s={newPageSections:t.kind==="page"&&t.status==="new"?fo(t.toJson,e):null,sections:0,settings:!1,fields:0};if(s.newPageSections!==null)return s;for(const r of t.sections){if(r.kind==="settings"){s.settings=!0;continue}t.kind==="page"?s.sections+=1:s.fields+=r.fields.length}return s}const Gn="••••••";function qt(t){if(Array.isArray(t))return t.map(qt);if(!t||typeof t!="object")return t;const e=t,s={};for(const[r,n]of Object.entries(e))s[r]=qt(n);return e.__resolveType===Dl&&"ciphertext"in e&&(s.ciphertext=Gn),Ml(e)&&"encrypted"in e&&(s.encrypted=Gn),s}function Qn(t){return t.map(e=>({...e,from:qt(e.from),to:qt(e.to)}))}function po(t){const{changes:e,sides:s,lookup:r,meta:n,missingRules:o,missingRuleUses:d}=t,l=[],i=[],c=h=>[...new Set((s?.diagnostics??[]).filter(m=>In(Va(m.file))===In(h)).map(m=>m.side))],u=Object.keys(e).sort((h,m)=>h<m?-1:h>m?1:0);for(const h of u){const m=e[h],b=m.kind==="delete"?"removed":m.baseVersion===null?"new":"edited",f=s?.entries[h],p=f?.before??null,x=f?.after??null,g=pa(r,h),P=g??x??p,y=c(h),v=o?.get(h),j=zr(h),w=j?d?.get(j):void 0,N={blockKey:h,status:b,filepaths:[],entry:{name:h,version:m.version},...y.length>0?{unreadable:y}:{},...v&&v.length>0?{missingRules:v}:{},...j&&w&&w.pages+w.sections>0?{missingRuleUses:{kind:j,...w}}:{},fromJson:qt(p),toJson:qt(x??(b==="new"?g:null))},k=g?Et(h,g,n):null,A=!g&&P?Et(h,P,n):null;if(k??A??(!P&&fa(h))){const T=P?Et(h,P,n):null;l.push({...N,kind:"page",name:T?.name??Ur(h),pagePath:T?.path??null,isSiteApp:!1,sections:b==="edited"?Pn(p,x,!0).map(B=>({...B,fields:Qn(B.fields)})):[]});continue}const S=fs(h,P??{}),R=eo(h,[g,x,p]);i.push({...N,kind:"block",name:S,...R?{namedRule:R}:{},pagePath:null,isSiteApp:hn(h,g??P??{}),sections:b==="edited"?[{name:S,kind:"section",status:"edited",fields:Qn(Ut(p,x,[]))}].filter(T=>T.fields.length>0):[]})}return{pages:l,blocks:i,other:[],generated:[],count:l.length+i.length,v8:!0}}function Re(t){return t.filepaths[0]??t.blockKey??t.name}function bo(t){const e=t.pages+t.sections===1,s=t.names===1;return t.kind==="experiments"?s?e?"thread.publishPopover.missingTestUsesOne":"thread.publishPopover.missingTestUses":e?"thread.publishPopover.missingTestsUsesOne":"thread.publishPopover.missingTestsUses":s?e?"thread.publishPopover.missingCampaignUsesOne":"thread.publishPopover.missingCampaignUses":e?"thread.publishPopover.missingCampaignsUsesOne":"thread.publishPopover.missingCampaignsUses"}function go(t,e){return e(t==="new"?"thread.publishPopover.chipNew":t==="removed"?"thread.publishPopover.chipRemoved":"thread.publishPopover.chipEdited")}function xo(t,e){const s=t.kind==="block"?zl:Ar;return a.jsx("span",{title:go(t.status,e),className:"flex shrink-0",children:a.jsx(s,{className:Q("size-4",t.status==="new"&&"text-brand",t.status==="edited"&&"text-warning",t.status==="removed"&&"text-destructive")})})}function vo(t,e){if(t.kind==="page")return t.pagePath;if(t.kind!=="block")return null;const s=ca(t);return s==="experiments"?e("thread.publishPopover.abTests"):s==="campaigns"?e("thread.publishPopover.campaignDates"):t.isSiteApp?e("thread.publishPopover.siteConfiguration"):e("thread.publishPopover.globalSection")}function yo(t,e,s){const r=mo(t,s);if(r.newPageSections!==null)return[r.newPageSections===1?e("thread.publishPopover.newPageSectionOne"):e("thread.publishPopover.newPageSections",{count:r.newPageSections})];const n=[];return r.sections===1?n.push(e("thread.publishPopover.sectionChangedOne")):r.sections>1&&n.push(e("thread.publishPopover.sectionsChanged",{count:r.sections})),r.fields===1?n.push(e("thread.publishPopover.fieldChangedOne")):r.fields>1&&n.push(e("thread.publishPopover.fieldsChanged",{count:r.fields})),r.settings&&n.push(e("thread.publishPopover.pageSettingsChanged")),n}function ga(t){const e=M.c(47),{change:s,bodyPending:r,selected:n,onSelect:o,confirming:d,onConfirmingChange:l,onDiscard:i,isPublishing:c,isDiscarding:u,v8:h}=t,m=r===void 0?!1:r,b=h===void 0?!1:h,f=ve();let p;e[0]!==s||e[1]!==f?(p=vo(s,f),e[0]=s,e[1]=f,e[2]=p):p=e[2];const x=p;let g;if(e[3]!==m||e[4]!==s||e[5]!==d||e[6]!==x||e[7]!==u||e[8]!==c||e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==n||e[13]!==f||e[14]!==b){const P=yo(s,f,b);let y;e[16]!==s.missingRules?(y=s.missingRules??[],e[16]=s.missingRules,e[17]=y):y=e[17];const v=y,j=s.missingRuleUses,w=j?Kl(f,j):null,N=m&&P.length===0&&s.status==="edited",k=n&&"border-foreground/30 bg-accent hover:bg-secondary-hover";let A;e[18]!==k?(A=Q("cursor-pointer transition-colors hover:bg-accent",k),e[18]=k,e[19]=A):A=e[19];let S;e[20]!==s?(S=Re(s),e[20]=s,e[21]=S):S=e[21];let R;e[22]!==s||e[23]!==f?(R=xo(s,f),e[22]=s,e[23]=f,e[24]=R):R=e[24];let T;e[25]!==s.name?(T=a.jsx("span",{className:"truncate text-sm font-medium",children:s.name}),e[25]=s.name,e[26]=T):T=e[26];let B;e[27]!==x?(B=x?a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:x}):null,e[27]=x,e[28]=B):B=e[28];let D;e[29]!==n||e[30]!==T||e[31]!==B?(D=a.jsxs("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 text-left","aria-pressed":n,children:[T,B]}),e[29]=n,e[30]=T,e[31]=B,e[32]=D):D=e[32];let F;e[33]!==d||e[34]!==u||e[35]!==c||e[36]!==l||e[37]!==i||e[38]!==f?(F=d?a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[a.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground",onClick:$=>{$.stopPropagation(),l(!1)},children:f("thread.publishDialog.cancel")}),a.jsx("button",{type:"button",className:"text-xs font-medium text-destructive disabled:opacity-50",onClick:$=>{$.stopPropagation(),l(!1),i?.()},disabled:u,children:f("thread.publishPopover.discard")})]}):i?a.jsx(Ss,{children:a.jsxs(wt,{children:[a.jsx(jt,{asChild:!0,children:a.jsx(we,{type:"button",variant:"ghost-destructive",size:"icon-xs","aria-label":f("thread.publishPopover.discard"),className:"shrink-0 disabled:pointer-events-auto",onClick:$=>{$.stopPropagation(),l(!0)},disabled:c||u,children:a.jsx(Cs,{className:"size-3.5"})})}),a.jsx(Pt,{children:f("thread.publishPopover.discard")})]})}):null,e[33]=d,e[34]=u,e[35]=c,e[36]=l,e[37]=i,e[38]=f,e[39]=F):F=e[39];let C;e[40]!==D||e[41]!==F||e[42]!==R?(C=a.jsxs("div",{className:"flex items-center gap-2.5",children:[R,D,F]}),e[40]=D,e[41]=F,e[42]=R,e[43]=C):C=e[43];let I;e[44]!==v||e[45]!==f?(I=v.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-foreground","data-testid":"publish-change-missing-rule",children:v.map($=>a.jsx("div",{className:"truncate",children:f($==="experiments"?"thread.publishPopover.missingTest":"thread.publishPopover.missingCampaign")},$))}):null,e[44]=v,e[45]=f,e[46]=I):I=e[46],g=a.jsxs(sa,{className:A,"data-change-id":S,onClick:o,children:[C,P.length>0?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px] text-xs text-muted-foreground",children:P.map(wo)}):N?a.jsx("div",{className:"mt-1 space-y-0.5 pl-[26px]",children:a.jsx(dt,{className:"h-4 w-2/3"})}):null,I,j&&w?a.jsx("div",{className:"mt-1 truncate pl-[26px] text-xs text-foreground","data-testid":"publish-change-missing-rule-uses",children:f(bo(j),{places:w.places})}):null]}),e[3]=m,e[4]=s,e[5]=d,e[6]=x,e[7]=u,e[8]=c,e[9]=l,e[10]=i,e[11]=o,e[12]=n,e[13]=f,e[14]=b,e[15]=g}else g=e[15];return g}function wo(t,e){return a.jsx("div",{className:"truncate",children:t},`${e}-${t}`)}function xa(){const t=M.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:-1,height:-1},t[0]=e):e=t[0];const[s,r]=q.useState(e);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=l=>{if(!l)return;const i=()=>r(u=>u.width===l.clientWidth&&u.height===l.clientHeight?u:{width:l.clientWidth,height:l.clientHeight});i();const c=new ResizeObserver(i);return c.observe(l),()=>c.disconnect()},t[1]=n):n=t[1];const o=n;let d;return t[2]!==s?(d=[s,o],t[2]=s,t[3]=d):d=t[3],d}function jo(){return document.documentElement.classList.contains("dark")?"vs-dark":"vs"}const Po=[{width:"w-3/4",tone:"ctx"},{width:"w-1/2",tone:"del"},{width:"w-3/5",tone:"add"},{width:"w-2/5",tone:"ctx"},{width:"w-4/5",tone:"add"},{width:"w-1/2",tone:"ctx"}];function Wn(t){const e=M.c(10),{height:s}=t,r=ve();let n;e[0]!==s?(n={height:s},e[0]=s,e[1]=n):n=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=Po.map(So),e[2]=o):o=e[2];let d;e[3]!==r?(d=r("thread.publishDialog.openingComparison"),e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx("div",{className:"flex items-center justify-center pt-1 text-2xs text-muted-foreground",children:d}),e[5]=d,e[6]=l):l=e[6];let i;return e[7]!==n||e[8]!==l?(i=a.jsxs("div",{style:n,className:"flex w-full flex-col gap-1.5 overflow-hidden px-3 py-2",children:[o,l]}),e[7]=n,e[8]=l,e[9]=i):i=e[9],i}function So(t,e){return a.jsxs("div",{className:Q("flex items-center gap-2 rounded px-1 py-0.5",t.tone==="del"&&"bg-destructive/5",t.tone==="add"&&"bg-success/5"),children:[a.jsx("div",{className:Q("h-2 w-4 shrink-0 animate-pulse rounded-sm bg-muted",t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")}),a.jsx("div",{className:Q("h-2 animate-pulse rounded-sm bg-muted",t.width,t.tone==="del"&&"bg-destructive/20",t.tone==="add"&&"bg-success/25")})]},e)}const va={readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12},ko={...va,lineNumbersMinChars:3,lineDecorationsWidth:4,folding:!1,glyphMargin:!1,renderOverviewRuler:!1};function Co(t){const e=M.c(11),{diff:s,emptyMessage:r,rowClassName:n,onDiscardFile:o,hideFileRows:d,editorHeight:l}=t,i=r===void 0?"No file changes in the working tree":r,c=n===void 0?"px-6":n,u=d===void 0?!1:d,h=l===void 0?"380px":l,[m,b]=q.useState(null),[f,p]=q.useState(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=jo(),e[0]=x):x=e[0];const g=x;if(!s||Object.keys(s.diffs).length===0){let y;return e[1]!==i?(y=a.jsx("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:i}),e[1]=i,e[2]=y):y=e[2],y}let P;return e[3]!==s.diffs||e[4]!==f||e[5]!==h||e[6]!==m||e[7]!==u||e[8]!==o||e[9]!==c?(P=a.jsx("div",{className:"divide-y",children:Object.entries(s.diffs).map(y=>{const[v,j]=y,{from:w,to:N}=j,k=m===v,A=w===null,S=N===null,R=v.startsWith("/")?v.slice(1):v,T=R.lastIndexOf("/"),B=T>=0?R.slice(T+1):R,D=T>=0?R.slice(0,T):null,F=ai(v),C=A?"bg-success":S?"bg-destructive":"bg-warning";return u?a.jsx("div",{children:a.jsx(_n,{original:w??"",modified:N??"",language:F,theme:g,height:h,loading:a.jsx(Wn,{height:h}),options:ko})},v):a.jsxs("div",{children:[a.jsxs("div",{className:Q("flex items-center gap-3 py-3 hover:bg-accent",c),children:[a.jsx("button",{type:"button",className:"flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground transition-transform hover:text-foreground",onClick:()=>b(k?null:v),children:a.jsx(ar,{className:Q("h-3.5 w-3.5 transition-transform",k&&"rotate-90")})}),a.jsx("div",{className:Q("h-2.5 w-2.5 shrink-0 rounded-full",C)}),a.jsx(Ar,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:B}),D&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:D}),o?a.jsxs(ys,{children:[a.jsx(xs,{asChild:!0,children:a.jsx("button",{type:"button",className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground hover:bg-accent hover:text-foreground rounded-lg",children:a.jsx(Ea,{className:"h-3.5 w-3.5"})})}),a.jsx(vs,{align:"end",children:a.jsx(Ot,{className:"text-destructive focus:text-destructive",onSelect:()=>p(v),children:"Discard changes"})})]}):null]}),f===v&&o?a.jsxs("div",{className:Q("flex items-center justify-between gap-3 border-t bg-destructive/5 py-2.5",c),children:[a.jsxs("span",{className:"text-xs text-destructive",children:["Discard all changes to"," ",a.jsx("span",{className:"font-medium",children:B}),"? This cannot be undone."]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[a.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>p(null),children:"Cancel"}),a.jsx(we,{type:"button",variant:"destructive",size:"sm",onClick:()=>{p(null),o(v)},children:"Discard"})]})]}):null,k&&a.jsx("div",{className:"border-t",children:a.jsx(_n,{original:w??"",modified:N??"",language:F,theme:g,height:h,loading:a.jsx(Wn,{height:h}),options:va})})]},v)})}),e[3]=s.diffs,e[4]=f,e[5]=h,e[6]=m,e[7]=u,e[8]=o,e[9]=c,e[10]=P):P=e[10],P}function No(t){if(t.kind!=="block"||t.isSiteApp||!t.blockKey)return null;const e=(t.toJson??t.fromJson)?.__resolveType;return typeof e=="string"&&$l(e)?t.blockKey:null}function Ao(t){return t.kind!=="page"?!0:!t.pagePath||At(t.pagePath).length>0}function Ro(t,e){try{return ii(t,_l,e)}catch{return null}}function To(t,e,s){if(!e)return;const r=El(e,t);if(!r)return null;if(At(r.path).length===0||s?.path!==r.path)return r.path;const n=mn(r.path,s.params);return At(n).length===0?n:r.path}function Io(t){return t.sectionKey&&!t.v8?Ro(t.previewServerUrl,t.sectionKey):Do(t.previewServerUrl,t.path)}function Bo(t,e){if(t.kind!=="page")return"/";const s=t.pagePath;if(!s)return"";if(At(s).length===0)return s;if(e?.path!==s)return"";const r=mn(s,e.params);return At(r).length===0?r:""}function Do(t,e){const s=e.trim();if(!s||At(s).length>0)return null;try{const r=new URL(t),n=new URL(s.startsWith("/")?s:`/${s}`,r);return n.origin===r.origin?n:null}catch{return null}}function Mo(t,e){if(!e)return null;if(e.kind==="pointer")return Xr(t.toString(),e.pointer);try{return new URL(`${t.pathname}${t.search}`,e.previewUrl).href}catch{return null}}function Fo(t,e,s){return e===null?!1:t!=="other"||s?.kind==="sandbox"}function $o(t,e){const s=e?t.kind==="page":t.kind!=="other";return{before:s&&t.status==="new"?"new":null,after:s&&t.status==="removed"?"removed":null}}const ya=q.createContext(!0),Eo=["split","before","after","code"];function _o(t){return Eo.includes(t)}const wa={desktop:1280,mobile:412};function Oo(t,e){const s=(o,d)=>t.unreadable?.includes(d)?e:o?`${JSON.stringify(o,null,2)}
|
|
10
|
+
`:null,r=t.status==="new"?null:s(t.fromJson,"before"),n=t.status==="removed"?null:s(t.toJson,"after");return r===null&&n===null?{diffs:{}}:t.status==="edited"&&(r===null||n===null)?{diffs:{}}:{diffs:{[Ga(t.entry.name)]:{from:r,to:n}}}}function ja(t){const e=M.c(76),{change:s,diff:r,bodyPending:n,previewServerUrl:o,draft:d,lastPage:l,v8:i,onReady:c}=t,u=ve(),h=q.use(ya),m=No(s),b=i?null:m,f=i?m:null,p=f?To(f,i?.blocks,l):void 0,x=f!==null&&p===null,g=Fo(s.kind,o,d)&&(f===null||typeof p=="string"),[P,y]=q.useState(null),v=g?P??"split":"code",[j,w]=q.useState("desktop"),[N,k]=q.useState(null),A=N??(f?p??"":Bo(s,l));let S;e[0]!==s?(S=Ao(s),e[0]=s,e[1]=S):S=e[1];const R=S,T=o?Io({previewServerUrl:o,sectionKey:m,path:A,v8:!!i}):null,B=T?Xr(T.toString(),oi):null,D=T?Mo(T,d):null;let F;e[2]!==s||e[3]!==r?.diffs||e[4]!==u?(F=s.entry?Oo(s,u("thread.publishCompare.sideUnreadable")):{diffs:Object.fromEntries(s.filepaths.flatMap(te=>{const fe=r?.diffs[te];return fe?[[te,fe]]:[]}))},e[2]=s,e[3]=r?.diffs,e[4]=u,e[5]=F):F=e[5];const C=F;let I;e[6]!==C.diffs?(I=Object.keys(C.diffs),e[6]=C.diffs,e[7]=I):I=e[7];const $=I.length>0;let Z;e:{if(b!==null){Z=null;break e}if(f!==null){const fe=A.trim();if(!fe){Z=null;break e}Z=At(fe).length>0?u("thread.publishCompare.dynamicHint",{template:fe}):u("thread.publishCompare.blockHint",{path:fe});break e}if(s.kind!=="page"){let fe;e[8]!==u?(fe=u("thread.publishCompare.globalHint"),e[8]=u,e[9]=fe):fe=e[9],Z=fe;break e}let te;e[10]!==s.pagePath||e[11]!==u?(te=s.pagePath&&At(s.pagePath).length>0?u("thread.publishCompare.dynamicHint",{template:s.pagePath}):null,e[10]=s.pagePath,e[11]=u,e[12]=te):te=e[12],Z=te}const ee=Z,H=$o(s,!!i),[J,_]=q.useState(Lo);let G;e[13]===Symbol.for("react.memo_cache_sentinel")?(G=te=>_(fe=>fe.has(te)?fe:new Set(fe).add(te)),e[13]=G):G=e[13];const ie=G;let X;e[14]!==i?(X=te=>i?a.jsx(zo,{...te,onLoaded:ie}):a.jsx(qo,{...te}),e[14]=i,e[15]=X):X=e[15];const V=X,W=(g?[H.before==="new"?null:B,H.after==="removed"?null:D].flatMap(te=>te?[vn(te,j)]:[]):[]).every(te=>J.has(te));let z;e[16]!==c||e[17]!==W?(z=W&&c?te=>{te&&c()}:void 0,e[16]=c,e[17]=W,e[18]=z):z=e[18];const de=z,me=H.before==="new"?a.jsx(is,{icon:a.jsx(Br,{className:"size-5 text-brand"}),title:u("thread.publishCompare.newTitle"),description:u("thread.publishCompare.newDescription")}):V({url:B,device:j,title:u("thread.publishCompare.before"),missing:u("thread.publishCompare.enterPath")}),re=H.after==="removed"?a.jsx(is,{icon:a.jsx(Cs,{className:"size-5 text-destructive"}),title:u("thread.publishCompare.removedTitle"),description:u("thread.publishCompare.removedDescription")}):V({url:D,device:j,title:u("thread.publishCompare.after"),missing:u(T?"thread.publishCompare.draftUnavailable":"thread.publishCompare.enterPath")});let oe;e[19]!==g||e[20]!==y||e[21]!==h||e[22]!==u||e[23]!==v?(oe=g||h?a.jsx(Cr,{value:v,onValueChange:te=>{_o(te)&&y(te)},children:a.jsxs(kr,{className:"h-8 w-auto",variant:"pill",children:[g?a.jsxs(a.Fragment,{children:[a.jsx(Dt,{value:"split",className:"px-3 text-xs",children:u("thread.publishCompare.sideBySide")}),a.jsx(Dt,{value:"before",className:"px-3 text-xs",children:u("thread.publishCompare.before")}),a.jsx(Dt,{value:"after",className:"px-3 text-xs",children:u("thread.publishCompare.after")})]}):null,h?a.jsx(Dt,{value:"code",className:"px-3 text-xs",children:u("thread.publishCompare.code")}):null]})}):null,e[19]=g,e[20]=y,e[21]=h,e[22]=u,e[23]=v,e[24]=oe):oe=e[24];let Y;e[25]!==D||e[26]!==g||e[27]!==s.pagePath||e[28]!==j||e[29]!==A||e[30]!==R||e[31]!==b||e[32]!==w||e[33]!==k||e[34]!==u||e[35]!==v?(Y=g&&v!=="code"?a.jsxs(a.Fragment,{children:[b?null:R?a.jsx(_a,{value:A,onChange:te=>k(te.target.value),placeholder:s.pagePath??"/","aria-label":u("thread.publishCompare.pathLabel"),className:"h-8 w-56 font-mono text-xs"}):a.jsx("span",{className:"max-w-56 truncate px-1 font-mono text-xs text-muted-foreground",children:A}),a.jsxs("div",{className:"flex items-center rounded-lg border p-0.5",children:[a.jsx(Jn,{active:j==="desktop",label:u("thread.publishCompare.desktop"),onClick:()=>w("desktop"),children:a.jsx(li,{className:"size-3.5"})}),a.jsx(Jn,{active:j==="mobile",label:u("thread.publishCompare.mobile"),onClick:()=>w("mobile"),children:a.jsx(hl,{className:"size-3.5"})})]}),D?a.jsxs("a",{href:D,target:"_blank",rel:"noopener noreferrer",className:"ml-auto flex items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[a.jsx(Oa,{className:"size-3.5"}),u("thread.publishCompare.openDraft")]}):null]}):null,e[25]=D,e[26]=g,e[27]=s.pagePath,e[28]=j,e[29]=A,e[30]=R,e[31]=b,e[32]=w,e[33]=k,e[34]=u,e[35]=v,e[36]=Y):Y=e[36];let ue;e[37]!==oe||e[38]!==Y?(ue=a.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b bg-background px-4 py-2.5 max-md:pr-12",children:[oe,Y]}),e[37]=oe,e[38]=Y,e[39]=ue):ue=e[39];let je;e[40]!==g||e[41]!==ee||e[42]!==v?(je=ee&&g&&v!=="code"?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:ee}):null,e[40]=g,e[41]=ee,e[42]=v,e[43]=je):je=e[43];let O;e[44]!==x||e[45]!==h||e[46]!==u?(O=x&&h?a.jsx("p",{className:"border-b bg-background px-4 py-1.5 text-2xs text-muted-foreground",children:u("thread.publishCompare.notOnAnyPage")}):null,e[44]=x,e[45]=h,e[46]=u,e[47]=O):O=e[47];let U;e[48]!==o||e[49]!==h||e[50]!==u||e[51]!==f||e[52]!==p||e[53]!==v?(U=v==="code"&&!h?f!==null&&p===void 0?a.jsx(dt,{className:"m-4 h-64 rounded"}):o===null?a.jsx(is,{icon:a.jsx(ms,{className:"size-5 text-muted-foreground"}),title:u("thread.publishCompare.previewNotReadyTitle"),description:u("thread.publishCompare.draftUnavailable")}):a.jsx(is,{icon:a.jsx(ms,{className:"size-5 text-muted-foreground"}),title:u("thread.publishCompare.noPreviewTitle"),description:u("thread.publishCompare.noPreviewDescription")}):null,e[48]=o,e[49]=h,e[50]=u,e[51]=f,e[52]=p,e[53]=v,e[54]=U):U=e[54];let L;e[55]!==n||e[56]!==$||e[57]!==C||e[58]!==h||e[59]!==u||e[60]!==v?(L=v==="code"&&h?a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto bg-background [scrollbar-width:thin]",children:$?a.jsx(Co,{diff:C,hideFileRows:!0,editorHeight:"70vh"}):n?a.jsx(dt,{className:"m-4 h-64 rounded"}):a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:u("thread.publishPopover.detailsUnavailable")})}):null,e[55]=n,e[56]=$,e[57]=C,e[58]=h,e[59]=u,e[60]=v,e[61]=L):L=e[61];let Pe;e[62]!==re||e[63]!==me||e[64]!==g||e[65]!==u||e[66]!==v?(Pe=g?a.jsxs("div",{className:Q("flex min-h-0 flex-1 gap-3 p-3",v==="code"&&"hidden"),children:[a.jsx(Xn,{label:u("thread.publishCompare.before"),hidden:v==="after",children:me}),a.jsx(Xn,{label:u("thread.publishCompare.after"),highlight:!0,hidden:v==="before",children:re})]}):null,e[62]=re,e[63]=me,e[64]=g,e[65]=u,e[66]=v,e[67]=Pe):Pe=e[67];let he;return e[68]!==de||e[69]!==ue||e[70]!==je||e[71]!==O||e[72]!==U||e[73]!==L||e[74]!==Pe?(he=a.jsxs("div",{ref:de,className:"flex min-h-0 min-w-0 flex-1 flex-col bg-muted/40",children:[ue,je,O,U,L,Pe]}),e[68]=de,e[69]=ue,e[70]=je,e[71]=O,e[72]=U,e[73]=L,e[74]=Pe,e[75]=he):he=e[75],he}function Lo(){return new Set}function Jn(t){const e=M.c(8),{active:s,label:r,onClick:n,children:o}=t,d=s&&"bg-accent text-foreground";let l;e[0]!==d?(l=Q("flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",d),e[0]=d,e[1]=l):l=e[1];let i;return e[2]!==s||e[3]!==o||e[4]!==r||e[5]!==n||e[6]!==l?(i=a.jsx("button",{type:"button","aria-label":r,"aria-pressed":s,title:r,onClick:n,className:l,children:o}),e[2]=s,e[3]=o,e[4]=r,e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function Xn(t){const e=M.c(18),{label:s,highlight:r,hidden:n,children:o}=t,d=r===void 0?!1:r,i=(n===void 0?!1:n)&&"hidden";let c;e[0]!==i?(c=Q("flex min-h-0 min-w-0 flex-1 flex-col gap-1.5",i),e[0]=i,e[1]=c):c=e[1];const u=d&&"bg-brand";let h;e[2]!==u?(h=Q("size-1.5 rounded-full bg-muted-foreground/50",u),e[2]=u,e[3]=h):h=e[3];let m;e[4]!==h?(m=a.jsx("span",{className:h}),e[4]=h,e[5]=m):m=e[5];let b;e[6]!==s||e[7]!==m?(b=a.jsxs("div",{className:"flex items-center gap-1.5 px-0.5 text-2xs font-medium text-muted-foreground",children:[m,s]}),e[6]=s,e[7]=m,e[8]=b):b=e[8];const f=d&&"border-brand/60";let p;e[9]!==f?(p=Q("relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-background",f),e[9]=f,e[10]=p):p=e[10];let x;e[11]!==o||e[12]!==p?(x=a.jsx("div",{className:p,children:o}),e[11]=o,e[12]=p,e[13]=x):x=e[13];let g;return e[14]!==x||e[15]!==c||e[16]!==b?(g=a.jsxs("div",{className:c,children:[b,x]}),e[14]=x,e[15]=c,e[16]=b,e[17]=g):g=e[17],g}function is(t){const e=M.c(10),{icon:s,title:r,description:n}=t;let o;e[0]!==s?(o=a.jsx("div",{className:"mb-1",children:s}),e[0]=s,e[1]=o):o=e[1];let d;e[2]!==r?(d=a.jsx("p",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=d):d=e[3];let l;e[4]!==n?(l=a.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=l):l=e[5];let i;return e[6]!==o||e[7]!==d||e[8]!==l?(i=a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-1 px-6 text-center",children:[o,d,l]}),e[6]=o,e[7]=d,e[8]=l,e[9]=i):i=e[9],i}function Uo(t,e){if(!t)return{visibility:"hidden",width:e};const s=Math.min(t.width/e,1);return{left:Math.max((t.width-e*s)/2,0),width:e,height:t.height/s,transform:`scale(${s})`,transformOrigin:"top left"}}function qo(t){const e=M.c(24),{url:s,device:r,title:n,missing:o}=t,[d,l]=xa(),[i,c]=q.useState(null);if(!s){let w;return e[0]!==o?(w=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=w):w=e[1],w}let u;e[2]!==r||e[3]!==s?(u=vn(s,r),e[2]=r,e[3]=s,e[4]=u):u=e[4];const h=u,m=wa[r],b=d.width>0?Math.min(d.width/m,1):1,f=d.width>0?Math.max((d.width-m*b)/2,0):0;let p;e[5]!==h?(p=()=>c(h),e[5]=h,e[6]=p):p=e[6];const x=d.height>0?d.height/b:"100%",g=`scale(${b})`;let P;e[7]!==m||e[8]!==f||e[9]!==x||e[10]!==g?(P={left:f,width:m,height:x,transform:g,transformOrigin:"top left"},e[7]=m,e[8]=f,e[9]=x,e[10]=g,e[11]=P):P=e[11];let y;e[12]!==h||e[13]!==p||e[14]!==P||e[15]!==n?(y=a.jsx("iframe",{src:h,title:n,sandbox:"allow-scripts allow-same-origin",onLoad:p,className:"absolute top-0 border-0 bg-white",style:P},h),e[12]=h,e[13]=p,e[14]=P,e[15]=n,e[16]=y):y=e[16];let v;e[17]!==i||e[18]!==h?(v=i!==h?a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Lt,{className:"size-5 motion-reduce:animate-none"})}):null,e[17]=i,e[18]=h,e[19]=v):v=e[19];let j;return e[20]!==l||e[21]!==y||e[22]!==v?(j=a.jsxs("div",{ref:l,className:"absolute inset-0",children:[y,v]}),e[20]=l,e[21]=y,e[22]=v,e[23]=j):j=e[23],j}function zo(t){const e=M.c(21),{url:s,device:r,title:n,missing:o,onLoaded:d}=t,[l,i]=xa(),[c,u]=q.useState(null),[h,m]=q.useState(null),b=l.width>0&&l.height>0;b&&(c?.width!==l.width||c?.height!==l.height)&&u(l);const f=b?l:c;if(!s){let j;return e[0]!==o?(j=a.jsx("p",{className:"flex h-full items-center justify-center px-6 text-center text-xs text-muted-foreground",children:o}),e[0]=o,e[1]=j):j=e[1],j}let p,x,g,P;if(e[2]!==f||e[3]!==r||e[4]!==d||e[5]!==i||e[6]!==h||e[7]!==n||e[8]!==s){const j=vn(s,r),w=wa[r];p=h?.src!==j;const N=[...h&&p?[h]:[],{src:j,logicalWidth:w}];x=i,g="absolute inset-0",P=N.map(k=>{const A=k.src===j&&p;return a.jsx("iframe",{src:k.src,title:n,"aria-hidden":A&&h?!0:void 0,sandbox:"allow-scripts allow-same-origin",onLoad:()=>{k.src===j&&(m(k),d?.(k.src))},className:Q("absolute top-0 border-0 bg-white",A&&"pointer-events-none opacity-0"),style:Uo(f,k.logicalWidth)},k.src)}),e[2]=f,e[3]=r,e[4]=d,e[5]=i,e[6]=h,e[7]=n,e[8]=s,e[9]=p,e[10]=x,e[11]=g,e[12]=P}else p=e[9],x=e[10],g=e[11],P=e[12];let y;e[13]!==p||e[14]!==h?(y=p?h?a.jsx(Lt,{className:"absolute right-2 top-2 size-4 text-muted-foreground motion-reduce:animate-none"}):a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/60",children:a.jsx(Lt,{className:"size-5 motion-reduce:animate-none"})}):null,e[13]=p,e[14]=h,e[15]=y):y=e[15];let v;return e[16]!==x||e[17]!==g||e[18]!==P||e[19]!==y?(v=a.jsxs("div",{ref:x,className:g,children:[P,y]}),e[16]=x,e[17]=g,e[18]=P,e[19]=y,e[20]=v):v=e[20],v}const Ho=/^Co-authored-by:\s*([^<\r\n]+?)(?:\s*<[^>\r\n]*>)?\s*$/im;function Ko(t){if(!t)return null;const e=Ho.exec(t)?.[1]?.trim();return e||null}function Vo(t){return/\[bot\]$/i.test(t)||/-bot$/i.test(t)}function Go(t){const e=Ko(t.body);if(e)return e;const s=t.author.trim();return!s||Vo(s)?null:s}function Pa(t){const e=M.c(9),s=ve(),r=Ps();let n;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(n={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=n):n=e[3];const o=yr(n);let d;return e[4]!==t||e[5]!==o||e[6]!==r||e[7]!==s?(d=async(l,i,c)=>{try{await Wa(o,{blockKeys:i.map(Wo),write:()=>Ja(l.client,i)}),_e.success(c)}catch(u){const h=u;if(Xa(h)){_e.info(s("siteEditor.discard.changedMeanwhile")),await t.refresh().catch(Qo);return}l.source==="local"&&Ya(h)&&r.resetQueries({queryKey:Ft.contentBackend(t.orgSlug,t.virtualMcpId,"local")}),_e.error(s("siteEditor.discard.failed"),{description:Js(s,hs(h))})}},e[4]=t,e[5]=o,e[6]=r,e[7]=s,e[8]=d):d=e[8],d}function Qo(){}function Wo(t){return t.name}function Jo(t){const{mode:e,target:s,note:r,allPaths:n,destinationHost:o,publishLockRef:d,onOpenChange:l,refresh:i,onPullRequestChanged:c,onPublished:u,hosted:h=!1,authorName:m,protocol:b}=t,f=ve(),p=Ps(),[x,g]=q.useState(!1),[P,y]=q.useState(),[v,j]=q.useState(null),w=()=>Wi(r,h?m?f("siteEditor.publish.defaultNote",{name:m}):f("siteEditor.publish.defaultNoteAnonymous"):f("thread.publishDialog.changesFrom",{branch:s.headBranch})),N=async C=>{try{await C?.()}catch{}},k=yr({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch}),A=async()=>{try{await Ds(k,{kind:"publish",refreshOnError:!0,write:()=>ui(s)}),Bn(f)}catch(C){mi(f,C,()=>{A()})}},S=async C=>{fi(f,C,()=>{A()}),l(!1),await N(u)},R=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{const C=await Ds(k,{kind:"publish",reread:!0,refreshOnError:!0,write:()=>ci(s,w().message)});await S(C)}catch(C){C instanceof di&&C.code===vl&&Qa(p,s.orgSlug,s.virtualMcpId);const I=hi(f,C);y(I.message),j(I.detail)}finally{d.current=!1,g(!1)}},T=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{await Xi(s,w(),f),Bn(f,o),l(!1),await Promise.all([N(c),N(u)])}catch(C){const I=Hn(C,f);y(I.headMoved?I.message:f("siteEditor.publish.failed")),j(I.headMoved?null:[I.pullRequest?`#${I.pullRequest.number} ${I.pullRequest.htmlUrl}`:null,hs(C)].filter(Boolean).join(`
|
|
11
|
+
`)||null),I.pullRequest&&await N(c),I.headMoved&&await i()}finally{d.current=!1,g(!1)}},B=async()=>{d.current=!0,g(!0),y(void 0),j(null);try{const C=await Yi(s,w());Zi(C,f),l(!1),await c?.()}catch(C){const I=Hn(C,f);y(I.message||f("thread.publishDialog.failedSubmitForReview")),I.headMoved&&await i()}finally{d.current=!1,g(!1)}},D=Pa({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch,refresh:i}),F=async(C,I)=>{try{await Ds(k,{kind:"discard",reread:!0,write:()=>Wl({orgSlug:s.orgSlug,virtualMcpId:s.virtualMcpId,branch:s.branch,threadId:s.threadId},C)}),_e.success(I),await i()}catch($){_e.error(f("siteEditor.discard.failed"),{description:Js(f,hs($))})}};return{isPublishing:x,publishError:P,publishErrorDetail:v,submit:e==="review"?B:h?R:T,discardChange:C=>{const I=f("thread.publishPopover.discarded",{name:C.name});return b&&C.entry?D(b.backend,[C.entry],I):F(C.filepaths,I)},discardAll:async()=>{const C=f("thread.publishDialog.allChangesDiscarded");if(b){if(b.entries.length===0)return;await D(b.backend,b.entries,C);return}n.length!==0&&await F(n,C)}}}function Xo(t,e,s,r,n,o){return["cms-publish-bodies",t,e,s,r,n,o]}const Yo=6e4;function Zo(t,e){return e?null:t.files.map(s=>`${s.index}${s.working_dir} ${s.path}`).sort().join(`
|
|
12
|
+
`)}function ec(t,e,s){const r=M.c(6);let n;r[0]!==s||r[1]!==t||r[2]!==e?(n=Ft.decofile(`${t}/${e}/${s}`),r[0]=s,r[1]=t,r[2]=e,r[3]=n):n=r[3];let o;r[4]!==n?(o={queryKey:n,queryFn:Qs},r[4]=n,r[5]=o):o=r[5];const{data:d}=Rt(o);return d}function Sa(t){const{orgSlug:e,virtualMcpId:s,branch:r,threadId:n,baseBranch:o,fastPreview:d,recoverSandbox:l}=t,i={orgSlug:e,virtualMcpId:s,branch:r,threadId:n},c=d?{fastPreview:!0}:void 0,u=q.useRef(null),h=async j=>{try{return await j()}catch(w){if(!l||!Qr(w))throw w;return u.current??=l(),await u.current,j()}},m=lr({...Gr(i),queryFn:()=>h(()=>bn(i))}),b=m.data,f=b.changedFiles??null,p=b.headSha??null,x=f?f.length>0:Jl(b)||Xl(b),g=Rt({queryKey:Xo(e,s,r,o,p,Zo(b,d)),queryFn:()=>h(()=>Kr(i,b,o,c)),enabled:x,staleTime:d?Yo:0,gcTime:d?void 0:0,throwOnError:(j,w)=>!f&&w.state.data===void 0}),P=ec(e,s,r),y=g.data??null,v=f?ma({files:f,lookup:P,diff:y}):lo(y);return{status:b,summary:v,allPaths:f?f.map(j=>j.path):Object.keys(y?.diffs??{}),discardablePaths:d?null:new Set(b.files.map(j=>j.path)),changedFilesTotal:b.changedFilesTotal??v.count,changedFilesTruncated:b.changedFilesTruncated??!1,headSha:p,diff:y,bodiesPending:x&&g.isPending,bodiesFailed:g.isError,cardsPending:!f&&x&&g.isPending,refresh:()=>Promise.all([m.refetch(),d?null:g.refetch()])}}function tc(t){const e=M.c(4);let s;e[0]!==t?(s=Ft.decofile(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==s?(r={queryKey:s,queryFn:Qs},e[2]=s,e[3]=r):r=e[3];const{data:n}=Rt(r);return n}function sc(t,e){const s=M.c(5);let r;s[0]!==t||s[1]!==e?(r=e?el(e,t):Ft.liveMeta("","no-scope"),s[0]=t,s[1]=e,s[2]=r):r=s[2];let n;s[3]!==r?(n={queryKey:r,queryFn:Qs},s[3]=r,s[4]=n):n=s[4];const{data:o}=Rt(n);return o}function Sn(t){const e=M.c(26),{backend:s,cacheKey:r,scope:n}=t,o=Ps();let d;e[0]!==r?(d=Ft.contentChanges(r),e[0]=r,e[1]=d):d=e[1];let l;e[2]!==s||e[3]!==r||e[4]!==o?(l=()=>tl(o,s.client,r),e[2]=s,e[3]=r,e[4]=o,e[5]=l):l=e[5];let i;e[6]!==d||e[7]!==l?(i={queryKey:d,queryFn:l,staleTime:0},e[6]=d,e[7]=l,e[8]=i):i=e[8];const c=lr(i),u=c.data,h=Za(s,r,u),m=tc(r),b=sc(s,n);let f;if(e[9]!==u.changes||e[10]!==m||e[11]!==b||e[12]!==h.data){const j=m&&b?Vl(m,b):null,w=m&&b?Gl(m,b):null;f=po({changes:u.changes,sides:h.data??null,lookup:m,meta:b,...j?{missingRules:j}:{},...w?{missingRuleUses:w}:{}}),e[9]=u.changes,e[10]=m,e[11]=b,e[12]=h.data,e[13]=f}else f=e[13];const p=f;let x;e[14]!==u.changes?(x=Object.entries(u.changes).map(nc),e[14]=u.changes,e[15]=x):x=e[15];const g=p.count>0&&h.isPending,P=m??null;let y;e[16]!==c?(y=()=>c.refetch(),e[16]=c,e[17]=y):y=e[17];let v;return e[18]!==u||e[19]!==h.isError||e[20]!==p||e[21]!==x||e[22]!==g||e[23]!==P||e[24]!==y?(v={changes:u,summary:p,entries:x,sidesPending:g,sidesFailed:h.isError,blocks:P,refresh:y},e[18]=u,e[19]=h.isError,e[20]=p,e[21]=x,e[22]=g,e[23]=P,e[24]=y,e[25]=v):v=e[25],v}function nc(t){const[e,s]=t;return{name:e,version:s.version}}function rc(t){return["smart-review-verdict",t.orgSlug,t.virtualMcpId,t.branch,t.threadId,t.fastPreview?"fast-preview-upstream":"sandbox",t.signature,t.language]}function ac(t){const e=M.c(27),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:c}=t,[u]=ir(),{language:h}=u;let m,b,f;if(e[0]!==n||e[1]!==i||e[2]!==c||e[3]!==d||e[4]!==h||e[5]!==s||e[6]!==l||e[7]!==o||e[8]!==r){const j=i?Ns(i):"";m=c&&!!n&&!!l&&!!i&&j!=="",f=Rt,b=rc({orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,signature:j,language:h}),e[0]=n,e[1]=i,e[2]=c,e[3]=d,e[4]=h,e[5]=s,e[6]=l,e[7]=o,e[8]=r,e[9]=m,e[10]=b,e[11]=f}else m=e[9],b=e[10],f=e[11];let p;e[12]!==n||e[13]!==i||e[14]!==h||e[15]!==s||e[16]!==l||e[17]!==o||e[18]!==r?(p=()=>Yl({orgSlug:s,virtualMcpId:r,branch:n,threadId:o},{status:l,diff:i,language:h}),e[12]=n,e[13]=i,e[14]=h,e[15]=s,e[16]=l,e[17]=o,e[18]=r,e[19]=p):p=e[19];let x;e[20]!==m||e[21]!==b||e[22]!==p?(x={queryKey:b,queryFn:p,enabled:m,staleTime:1/0,gcTime:6e5,retry:lc},e[20]=m,e[21]=b,e[22]=p,e[23]=x):x=e[23];const g=f(x),P=g.data??null,y=m&&g.isFetching&&!g.data;let v;return e[24]!==P||e[25]!==y?(v={verdict:P,loading:y},e[24]=P,e[25]=y,e[26]=v):v=e[26],v}function lc(t,e){return!Qr(e)&&t<1}function ka(t){const e=M.c(30),{orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,policy:c,judgeEnabled:u,paths:h}=t,m=u===void 0?!0:u,b=h===void 0?null:h;let f;e[0]!==i||e[1]!==m||e[2]!==c?(f=m&&Zl(i,c),e[0]=i,e[1]=m,e[2]=c,e[3]=f):f=e[3];const p=f;let x;e[4]!==n||e[5]!==i||e[6]!==d||e[7]!==p||e[8]!==s||e[9]!==l||e[10]!==o||e[11]!==r?(x={orgSlug:s,virtualMcpId:r,branch:n,threadId:o,fastPreview:d,status:l,diff:i,enabled:p},e[4]=n,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=l,e[10]=o,e[11]=r,e[12]=x):x=e[12];const{verdict:g,loading:P}=ac(x);if(!i&&b){let w;e[13]!==b||e[14]!==c?(w=ei(b,c),e[13]=b,e[14]=c,e[15]=w):w=e[15];let N;return e[16]!==w?(N={gate:w,ready:!1},e[16]=w,e[17]=N):N=e[17],N}if(!i){let w;return e[18]===Symbol.for("react.memo_cache_sentinel")?(w={gate:{allowed:!0,reason:null},ready:!1},e[18]=w):w=e[18],w}if(!p){let w;e[19]!==i||e[20]!==c?(w=ti(i,c),e[19]=i,e[20]=c,e[21]=w):w=e[21];let N;return e[22]!==w?(N={gate:w,ready:!0},e[22]=w,e[23]=N):N=e[23],N}let y;e[24]!==P||e[25]!==g?(y=si(g,P),e[24]=P,e[25]=g,e[26]=y):y=e[26];const v=!P;let j;return e[27]!==y||e[28]!==v?(j={gate:y,ready:v},e[27]=y,e[28]=v,e[29]=j):j=e[29],j}function ic(t){return["main","master"].includes(t.trim().toLowerCase())}function oc(t,e,s,r){return t===0?r("thread.publishPopover.publish"):s||!ic(e)?t===1?r("thread.publishPopover.publishOne"):r("thread.publishPopover.publishCount",{count:t}):t===1?r("thread.publishPopover.publishOneInProduction"):r("thread.publishPopover.publishCountInProduction",{count:t})}const cc=2500;function dc(t){const{selectedId:e,readyIds:s,lastShownId:r,liveIds:n}=t;return e===null||s.has(e)?e:r!==null&&r!==e&&n.includes(r)?r:e}function Ca(t){const e=M.c(16),s=q.useRef(!1),r=ve();let n;e[0]!==t?(n=h=>{!h&&s.current||t.onOpenChange(h)},e[0]=t,e[1]=n):n=e[1];const o=n;let d;e[2]!==t.mode||e[3]!==r?(d=t.mode==="review"?r("thread.publishPopover.submitForReview"):r("thread.publishPopover.publish"),e[2]=t.mode,e[3]=r,e[4]=d):d=e[4];let l;e[5]!==d?(l=a.jsx(cr,{className:"sr-only",children:d}),e[5]=d,e[6]=l):l=e[6];let i;e[7]!==t?(i=t.open?a.jsx(fc,{...t,publishLockRef:s}):null,e[7]=t,e[8]=i):i=e[8];let c;e[9]!==l||e[10]!==i?(c=a.jsxs(dr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[l,i]}),e[9]=l,e[10]=i,e[11]=c):c=e[11];let u;return e[12]!==o||e[13]!==t.open||e[14]!==c?(u=a.jsx(or,{open:t.open,onOpenChange:o,children:c}),e[12]=o,e[13]=t.open,e[14]=c,e[15]=u):u=e[15],u}const uc=4,zt="flex h-[45%] min-h-0 min-w-0 shrink-0 md:h-auto md:flex-1";function Gt(t){const e=M.c(5),{list:s,pane:r}=t;let n;e[0]!==s?(n=a.jsx("div",{className:"flex min-h-0 w-full flex-1 flex-col max-md:border-t md:w-[380px] md:flex-none md:shrink-0 md:border-l md:[&>[data-publish-state]>:first-child]:pr-12",children:s}),e[0]=s,e[1]=n):n=e[1];let o;return e[2]!==r||e[3]!==n?(o=a.jsxs(a.Fragment,{children:[r,n]}),e[2]=r,e[3]=n,e[4]=o):o=e[4],o}function kn(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:Q(zt,"bg-muted/40 p-3"),children:a.jsx(dt,{className:"h-full w-full rounded-lg"})}),t[0]=e):e=t[0],e}function Cn(t){const e=M.c(11),{mode:s,title:r,subLine:n,trailing:o}=t,d=s==="review"?ks:fl;let l;e[0]!==d?(l=a.jsx(d,{className:"size-4 shrink-0 text-muted-foreground"}),e[0]=d,e[1]=l):l=e[1];let i;e[2]!==l||e[3]!==r||e[4]!==o?(i=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[l,r,o]}),e[2]=l,e[3]=r,e[4]=o,e[5]=i):i=e[5];let c;e[6]!==n?(c=n?a.jsx("div",{className:"pl-6 text-xs text-muted-foreground",children:n}):null,e[6]=n,e[7]=c):c=e[7];let u;return e[8]!==i||e[9]!==c?(u=a.jsxs(a.Fragment,{children:[i,c]}),e[8]=i,e[9]=c,e[10]=u):u=e[10],u}function Nn(t){const e=M.c(9),{draftPreviewUrl:s,t:r}=t;let n;e[0]!==s?(n=()=>{s&&window.open(s,"_blank","noopener,noreferrer")},e[0]=s,e[1]=n):n=e[1];const o=!s;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(ms,{className:"size-4"}),e[2]=d):d=e[2];let l;e[3]!==r?(l=r("thread.publishPopover.preview"),e[3]=r,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==o||e[7]!==l?(i=a.jsxs(we,{type:"button",variant:"outline",onClick:n,disabled:o,children:[d,l]}),e[5]=n,e[6]=o,e[7]=l,e[8]=i):i=e[8],i}function Na(t){const e=M.c(21),{mode:s,draftPreviewUrl:r}=t,n=ve();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(kn,{}),e[0]=o):o=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(dt,{className:"h-3.5 w-48"}),e[1]=d):d=e[1];let l;e[2]!==s?(l=a.jsx(Cn,{mode:s,title:d}),e[2]=s,e[3]=l):l=e[3];let i,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{}),a.jsx(Mt,{})]})}),c=a.jsxs(a.Fragment,{children:[a.jsx(dt,{className:"h-3 w-20"}),a.jsx(dt,{className:"h-14 w-full rounded-lg"})]}),e[4]=i,e[5]=c):(i=e[4],c=e[5]);let u;e[6]!==r||e[7]!==n?(u=a.jsx(Nn,{draftPreviewUrl:r,t:n}),e[6]=r,e[7]=n,e[8]=u):u=e[8];const h=s==="review"?"default":"brand";let m;e[9]!==s||e[10]!==n?(m=n(s==="review"?"thread.publishPopover.submitForReview":"thread.publishPopover.publish"),e[9]=s,e[10]=n,e[11]=m):m=e[11];let b;e[12]!==h||e[13]!==m?(b=a.jsx(we,{type:"button",variant:h,className:"flex-1",disabled:!0,children:m}),e[12]=h,e[13]=m,e[14]=b):b=e[14];let f;e[15]!==u||e[16]!==b?(f=a.jsxs("div",{className:"flex gap-2",children:[u,b]}),e[15]=u,e[16]=b,e[17]=f):f=e[17];let p;return e[18]!==f||e[19]!==l?(p=a.jsx(Gt,{pane:o,list:a.jsx(Rs,{state:"loading",header:l,body:i,note:c,footer:f})}),e[18]=f,e[19]=l,e[20]=p):p=e[20],p}function hc(t){const e=M.c(26),{mode:s,draftPreviewUrl:r,message:n,onRetry:o}=t,d=ve();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("div",{className:Q(zt,"bg-muted/40")}),e[0]=l):l=e[0];let i;e[1]!==d?(i=d("thread.publishPopover.loadFailed"),e[1]=d,e[2]=i):i=e[2];let c;e[3]!==i?(c=a.jsx("span",{className:"truncate",children:i}),e[3]=i,e[4]=c):c=e[4];let u;e[5]!==s||e[6]!==c?(u=a.jsx(Cn,{mode:s,title:c}),e[5]=s,e[6]=c,e[7]=u):u=e[7];let h;e[8]!==n?(h=a.jsx("p",{className:"px-4 py-6 text-xs text-destructive",children:n}),e[8]=n,e[9]=h):h=e[9];let m;e[10]!==r||e[11]!==d?(m=a.jsx(Nn,{draftPreviewUrl:r,t:d}),e[10]=r,e[11]=d,e[12]=m):m=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(Ws,{className:"size-4"}),e[13]=b):b=e[13];let f;e[14]!==d?(f=d("thread.publishPopover.retry"),e[14]=d,e[15]=f):f=e[15];let p;e[16]!==o||e[17]!==f?(p=a.jsxs(we,{type:"button",variant:"outline",className:"flex-1",onClick:o,children:[b,f]}),e[16]=o,e[17]=f,e[18]=p):p=e[18];let x;e[19]!==m||e[20]!==p?(x=a.jsxs("div",{className:"flex gap-2",children:[m,p]}),e[19]=m,e[20]=p,e[21]=x):x=e[21];let g;return e[22]!==x||e[23]!==u||e[24]!==h?(g=a.jsx(Gt,{pane:l,list:a.jsx(Rs,{state:"ready",header:u,body:h,footer:x})}),e[22]=x,e[23]=u,e[24]=h,e[25]=g):g=e[25],g}function fc(t){const e=M.c(3),s=t.mode??"publish";let r;return e[0]!==s||e[1]!==t?(r=a.jsx(ur,{children:n=>{const{reset:o}=n;return a.jsx(hr,{fallback:d=>{const{error:l,resetError:i}=d;return a.jsx(hc,{mode:s,draftPreviewUrl:t.draftPreviewUrl,message:l?.message??"",onRetry:()=>{o(),i()}})},children:a.jsx(q.Suspense,{fallback:a.jsx(Na,{mode:s,draftPreviewUrl:t.draftPreviewUrl}),children:a.jsx(mc,{...t})})})}}),e[0]=s,e[1]=t,e[2]=r):r=e[2],r}function mc(t){const e=M.c(13),s=Ht(t.virtualMcpId,t.branch);let r;e[0]!==t.branch||e[1]!==t.orgSlug||e[2]!==t.virtualMcpId?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch},e[0]=t.branch,e[1]=t.orgSlug,e[2]=t.virtualMcpId,e[3]=r):r=e[3];const n=Xs(r);if(s.kind==="protocol"&&n){let d;return e[4]!==s||e[5]!==n||e[6]!==t?(d=s.source==="sandbox"?a.jsx(gc,{...t,backend:s,cacheKey:n}):a.jsx(bc,{...t,backend:s,cacheKey:n}),e[4]=s,e[5]=n,e[6]=t,e[7]=d):d=e[7],d}if(s.kind!=="legacy"){const d=t.mode??"publish";let l;return e[8]!==t.draftPreviewUrl||e[9]!==d?(l=a.jsx(Na,{mode:d,draftPreviewUrl:t.draftPreviewUrl}),e[8]=t.draftPreviewUrl,e[9]=d,e[10]=l):l=e[10],l}let o;return e[11]!==t?(o=a.jsx(pc,{...t}),e[11]=t,e[12]=o):o=e[12],o}function pc(t){const e=M.c(52),s=Vt()?.taskId??null;let r;e[0]!==t.baseBranch||e[1]!==t.branch||e[2]!==t.fastPreview||e[3]!==t.orgSlug||e[4]!==t.recoverSandbox||e[5]!==t.virtualMcpId||e[6]!==s?(r={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,baseBranch:t.baseBranch,fastPreview:t.fastPreview,recoverSandbox:t.recoverSandbox},e[0]=t.baseBranch,e[1]=t.branch,e[2]=t.fastPreview,e[3]=t.orgSlug,e[4]=t.recoverSandbox,e[5]=t.virtualMcpId,e[6]=s,e[7]=r):r=e[7];const n=Sa(r),o=t.mode!=="review";let d;e[8]!==t.branch||e[9]!==t.fastPreview||e[10]!==t.orgSlug||e[11]!==t.publishPolicy||e[12]!==t.virtualMcpId||e[13]!==n.allPaths||e[14]!==n.diff||e[15]!==n.status||e[16]!==o||e[17]!==s?(d={orgSlug:t.orgSlug,virtualMcpId:t.virtualMcpId,branch:t.branch,threadId:s,fastPreview:t.fastPreview,status:n.status,diff:n.diff,paths:n.allPaths,policy:t.publishPolicy,judgeEnabled:o},e[8]=t.branch,e[9]=t.fastPreview,e[10]=t.orgSlug,e[11]=t.publishPolicy,e[12]=t.virtualMcpId,e[13]=n.allPaths,e[14]=n.diff,e[15]=n.status,e[16]=o,e[17]=s,e[18]=d):d=e[18];const{gate:l}=ka(d),i=n.discardablePaths;let c;e[19]!==i?(c=P=>i===null||P.every(y=>i.has(y)),e[19]=i,e[20]=c):c=e[20];const u=c;let h;e[21]!==u?(h=P=>u(P.filepaths),e[21]=u,e[22]=h):h=e[22];let m;e[23]!==u||e[24]!==n.allPaths||e[25]!==n.changedFilesTruncated?(m=!n.changedFilesTruncated&&u(n.allPaths),e[23]=u,e[24]=n.allPaths,e[25]=n.changedFilesTruncated,e[26]=m):m=e[26];let b;e[27]!==t.branch||e[28]!==n.status?(b=xn(n.status)??t.branch,e[27]=t.branch,e[28]=n.status,e[29]=b):b=e[29];const f=n.headSha??void 0;let p;e[30]!==t.fastPreview||e[31]!==n.diff?(p=!t.fastPreview&&n.diff?{expectedDiffSignature:Ns(n.diff)}:{},e[30]=t.fastPreview,e[31]=n.diff,e[32]=p):p=e[32];let x;e[33]!==l||e[34]!==n.allPaths||e[35]!==n.bodiesFailed||e[36]!==n.bodiesPending||e[37]!==n.cardsPending||e[38]!==n.changedFilesTotal||e[39]!==n.changedFilesTruncated||e[40]!==n.diff||e[41]!==n.refresh||e[42]!==n.summary||e[43]!==h||e[44]!==m||e[45]!==b||e[46]!==f||e[47]!==p?(x={summary:n.summary,allPaths:n.allPaths,canDiscard:h,canDiscardAll:m,changedFilesTotal:n.changedFilesTotal,changedFilesTruncated:n.changedFilesTruncated,diff:n.diff,bodiesPending:n.bodiesPending,bodiesFailed:n.bodiesFailed,cardsPending:n.cardsPending,refresh:n.refresh,gate:l,headBranch:b,expectedHeadSha:f,...p,hosted:!1,otherWork:!1},e[33]=l,e[34]=n.allPaths,e[35]=n.bodiesFailed,e[36]=n.bodiesPending,e[37]=n.cardsPending,e[38]=n.changedFilesTotal,e[39]=n.changedFilesTruncated,e[40]=n.diff,e[41]=n.refresh,e[42]=n.summary,e[43]=h,e[44]=m,e[45]=b,e[46]=f,e[47]=p,e[48]=x):x=e[48];let g;return e[49]!==t||e[50]!==x?(g=a.jsx(An,{...t,source:x}),e[49]=t,e[50]=x,e[51]=g):g=e[51],g}function Aa(t,e){return{summary:t.summary,allPaths:[],canDiscard:()=>!0,canDiscardAll:!0,changedFilesTotal:t.summary.count,changedFilesTruncated:!1,diff:null,bodiesPending:t.sidesPending,bodiesFailed:t.sidesFailed,cardsPending:!1,refresh:t.refresh,protocol:{backend:e,entries:t.entries},v8:{blocks:t.blocks}}}function bc(t){const e=M.c(23);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);let o;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(o={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=o):o=e[7];let d;e[8]!==s||e[9]!==r||e[10]!==o?(d={backend:s,cacheKey:r,scope:o},e[8]=s,e[9]=r,e[10]=o,e[11]=d):d=e[11];const l=Sn(d);let i;e[12]!==s||e[13]!==l?(i=Aa(l,s),e[12]=s,e[13]=l,e[14]=i):i=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c={allowed:!0,reason:null},e[15]=c):c=e[15];const u=s.source==="github";let h;e[16]!==n.branch||e[17]!==i||e[18]!==u?(h={...i,gate:c,headBranch:n.branch,hosted:u,otherWork:!1},e[16]=n.branch,e[17]=i,e[18]=u,e[19]=h):h=e[19];let m;return e[20]!==n||e[21]!==h?(m=a.jsx(An,{...n,source:h}),e[20]=n,e[21]=h,e[22]=m):m=e[22],m}function gc(t){const e=M.c(58);let s,r,n;e[0]!==t?({backend:s,cacheKey:r,...n}=t,e[0]=t,e[1]=s,e[2]=r,e[3]=n):(s=e[1],r=e[2],n=e[3]);const o=Vt()?.taskId??null;let d;e[4]!==n.branch||e[5]!==n.orgSlug||e[6]!==n.virtualMcpId?(d={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[4]=n.branch,e[5]=n.orgSlug,e[6]=n.virtualMcpId,e[7]=d):d=e[7];let l;e[8]!==s||e[9]!==r||e[10]!==d?(l={backend:s,cacheKey:r,scope:d},e[8]=s,e[9]=r,e[10]=d,e[11]=l):l=e[11];const i=Sn(l);let c;e[12]!==n.baseBranch||e[13]!==n.branch||e[14]!==n.fastPreview||e[15]!==n.orgSlug||e[16]!==n.recoverSandbox||e[17]!==n.virtualMcpId||e[18]!==o?(c={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,baseBranch:n.baseBranch,fastPreview:n.fastPreview,recoverSandbox:n.recoverSandbox},e[12]=n.baseBranch,e[13]=n.branch,e[14]=n.fastPreview,e[15]=n.orgSlug,e[16]=n.recoverSandbox,e[17]=n.virtualMcpId,e[18]=o,e[19]=c):c=e[19];const u=Sa(c),h=n.mode!=="review";let m;e[20]!==u.allPaths||e[21]!==u.diff||e[22]!==u.status||e[23]!==n.branch||e[24]!==n.fastPreview||e[25]!==n.orgSlug||e[26]!==n.publishPolicy||e[27]!==n.virtualMcpId||e[28]!==h||e[29]!==o?(m={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,threadId:o,fastPreview:n.fastPreview,status:u.status,diff:u.diff,paths:u.allPaths,policy:n.publishPolicy,judgeEnabled:h},e[20]=u.allPaths,e[21]=u.diff,e[22]=u.status,e[23]=n.branch,e[24]=n.fastPreview,e[25]=n.orgSlug,e[26]=n.publishPolicy,e[27]=n.virtualMcpId,e[28]=h,e[29]=o,e[30]=m):m=e[30];const{gate:b}=ka(m);let f;if(e[31]!==u.allPaths||e[32]!==i){let N;e[34]!==i?(N=k=>{const A=wn(k);return A===null?!gn(k):!Object.hasOwn(i.changes.changes,A)},e[34]=i,e[35]=N):N=e[35],f=u.allPaths.some(N),e[31]=u.allPaths,e[32]=i,e[33]=f}else f=e[33];const p=f;let x;e[36]!==s||e[37]!==i?(x=Aa(i,s),e[36]=s,e[37]=i,e[38]=x):x=e[38];let g;e[39]!==u||e[40]!==i?(g=()=>Promise.all([i.refresh(),u.refresh()]),e[39]=u,e[40]=i,e[41]=g):g=e[41];let P;e[42]!==u.status||e[43]!==n.branch?(P=xn(u.status)??n.branch,e[42]=u.status,e[43]=n.branch,e[44]=P):P=e[44];const y=u.headSha??void 0;let v;e[45]!==u.diff?(v=u.diff?{expectedDiffSignature:Ns(u.diff)}:{},e[45]=u.diff,e[46]=v):v=e[46];let j;e[47]!==b||e[48]!==p||e[49]!==y||e[50]!==v||e[51]!==x||e[52]!==g||e[53]!==P?(j={...x,refresh:g,gate:b,headBranch:P,expectedHeadSha:y,...v,hosted:!1,otherWork:p},e[47]=b,e[48]=p,e[49]=y,e[50]=v,e[51]=x,e[52]=g,e[53]=P,e[54]=j):j=e[54];let w;return e[55]!==n||e[56]!==j?(w=a.jsx(An,{...n,source:j}),e[55]=n,e[56]=j,e[57]=w):w=e[57],w}function An(t){const e=M.c(122),{source:s,publishLockRef:r,onOpenChange:n,mode:o,fastPreview:d,orgSlug:l,virtualMcpId:i,branch:c,baseBranch:u,repoTarget:h,owner:m,repo:b,draftPreviewUrl:f,destinationHost:p,previewServerUrl:x,compareDraft:g,lastPublishedPr:P,onRequestApproval:y,openPullRequest:v,onPullRequestChanged:j,onPublished:w}=t,N=o===void 0?"publish":o,k=P===void 0?null:P,A=v===void 0?null:v,S=ve(),[R]=ir(),{language:T}=R,B=Vt()?.taskId??null,{data:D}=ws.useSession(),F=pr(br(l,i,c)),{summary:C,allPaths:I,changedFilesTotal:$,changedFilesTruncated:Z,diff:ee,bodiesPending:H,bodiesFailed:J,cardsPending:_,refresh:G,gate:ie,hosted:X,otherWork:V}=s,[ae,W]=q.useState(null),[z,de]=q.useState(!1),[me,re]=q.useState(xc);let oe;e[0]===Symbol.for("react.memo_cache_sentinel")?(oe=K=>re(ce=>ce.has(K)?ce:new Set(ce).add(K)),e[0]=oe):oe=e[0];const Y=oe,[ue,je]=q.useState(null);let O;e[1]===Symbol.for("react.memo_cache_sentinel")?(O=[],e[1]=O):O=e[1];const[U,L]=q.useState(O);let Pe;e[2]!==s.v8?(Pe=K=>{je(K),L(ce=>[K,...ce.filter(pe=>pe!==K)]),s.v8&&setTimeout(()=>Y(K),cc)},e[2]=s.v8,e[3]=Pe):Pe=e[3];const he=Pe,[te,fe]=q.useState(null);let $e;e[4]!==ae||e[5]!==C?($e=oo(ae,ho(C)),e[4]=ae,e[5]=C,e[6]=$e):$e=e[6];const ge=$e,Te=[...C.pages,...C.blocks,...C.other],De=Te.find(K=>Re(K)===ue)??Te[0]??null,Ne=De?Re(De):null,Ee=[...new Set([...Ne?[Ne]:[],...U,...Te.map(Re)])].filter(K=>Te.some(ce=>Re(ce)===K)).slice(0,uc),Ie=!!s.v8,[Me,ut]=q.useState(null),Ce=Ie?dc({selectedId:Ne,readyIds:me,lastShownId:Me,liveIds:Ee}):Ne;Ie&&Ce===Ne&&Ce!==Me&&ut(Ce);const le=N==="review"&&!X,Se=_?"loading":H?"manifest":"ready",ht=A?.state==="open",E=s.headBranch,xe=D?.user;let be;e[7]!==xe?(be=ta(xe),e[7]=xe,e[8]=be):be=e[8];let ye;e[9]!==s.expectedDiffSignature?(ye=s.expectedDiffSignature?{expectedDiffSignature:s.expectedDiffSignature}:{},e[9]=s.expectedDiffSignature,e[10]=ye):ye=e[10];let Be;e[11]!==u||e[12]!==c||e[13]!==d||e[14]!==l||e[15]!==m||e[16]!==b||e[17]!==h||e[18]!==s.expectedHeadSha||e[19]!==s.headBranch||e[20]!==be||e[21]!==ye||e[22]!==B||e[23]!==i?(Be={orgSlug:l,virtualMcpId:i,branch:c,threadId:B,fastPreview:d,baseBranch:u,target:h,owner:m,repo:b,headBranch:E,coAuthor:be,expectedHeadSha:s.expectedHeadSha,...ye},e[11]=u,e[12]=c,e[13]=d,e[14]=l,e[15]=m,e[16]=b,e[17]=h,e[18]=s.expectedHeadSha,e[19]=s.headBranch,e[20]=be,e[21]=ye,e[22]=B,e[23]=i,e[24]=Be):Be=e[24];const ft=Be,mt=le?"review":"publish",Ge=D?.user?.name;let Ze;e[25]!==I||e[26]!==p||e[27]!==X||e[28]!==ge||e[29]!==n||e[30]!==w||e[31]!==j||e[32]!==r||e[33]!==G||e[34]!==s.protocol||e[35]!==mt||e[36]!==Ge||e[37]!==ft?(Ze={mode:mt,target:ft,note:ge,allPaths:I,destinationHost:p,publishLockRef:r,onOpenChange:n,refresh:G,onPullRequestChanged:j,onPublished:w,hosted:X,authorName:Ge,protocol:s.protocol},e[25]=I,e[26]=p,e[27]=X,e[28]=ge,e[29]=n,e[30]=w,e[31]=j,e[32]=r,e[33]=G,e[34]=s.protocol,e[35]=mt,e[36]=Ge,e[37]=ft,e[38]=Ze):Ze=e[38];const{isPublishing:ke,publishError:et,publishErrorDetail:tt,submit:Qe,discardChange:kt,discardAll:st}=Jo(Ze),We=wr(l,i).phase==="saving",Je=C.count>0||V,pt=!ke&&Je&&(le||ie.allowed);let nt;e[39]!==u||e[40]!==le||e[41]!==s.v8||e[42]!==C.count||e[43]!==S?(nt=le?C.count===0?S("thread.publishPopover.submitForReview"):C.count===1?S("thread.publishPopover.submitOneForReview"):S("thread.publishPopover.submitCountForReview",{count:C.count}):oc(C.count,u,!!s.v8,S),e[39]=u,e[40]=le,e[41]=s.v8,e[42]=C.count,e[43]=S,e[44]=nt):nt=e[44];const bt=nt;let rt;e:{if(le&&ht){let pe;e[45]!==A.number||e[46]!==S?(pe=S("thread.publishPopover.updatesPullRequest",{number:A.number}),e[45]=A.number,e[46]=S,e[47]=pe):pe=e[47],rt=pe;break e}const K=k;if(!K?.mergedAt){rt=null;break e}let ce;if(e[48]!==T||e[49]!==K||e[50]!==S){const pe=ql(new Date(K.mergedAt),T),Ae=Go(K);ce=Ae?S("thread.publishPopover.lastPublishedBy",{when:pe,name:Ae}):S("thread.publishPopover.lastPublished",{when:pe}),e[48]=T,e[49]=K,e[50]=S,e[51]=ce}else ce=e[51];rt=ce}const gt=rt;let at;e[52]!==le||e[53]!==C.count||e[54]!==S?(at=le?S("thread.publishPopover.submitForReview"):C.count===1?S("thread.publishPopover.publishOne"):C.count>1?S("thread.publishPopover.publishCount",{count:C.count}):S("thread.publishPopover.publish"),e[52]=le,e[53]=C.count,e[54]=S,e[55]=at):at=e[55];const xt=at,Ct=(K,ce)=>ce.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:K}),ce.map(pe=>{const Ae=Re(pe);return a.jsx(ga,{change:pe,bodyPending:H,selected:De!==null&&Re(De)===Ae,onSelect:()=>he(Ae),confirming:te===Ae,onConfirmingChange:se=>fe(se?Ae:null),onDiscard:s.canDiscard(pe)?()=>{kt(pe)}:void 0,isPublishing:ke,isDiscarding:We,v8:!!s.v8},Ae)})]});let Xe;e:{if(le||!Je){Xe=null;break e}if(ie.pending){let Ae;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ae=a.jsx(Lt,{className:"size-3.5 motion-reduce:animate-none"}),e[56]=Ae):Ae=e[56];let se;e[57]!==S?(se=S("thread.publishPopover.reviewing"),e[57]=S,e[58]=se):se=e[58];let yt;e[59]!==se?(yt=a.jsxs("div",{className:"flex items-center gap-2 border-t px-4 py-2.5 text-xs text-muted-foreground",children:[Ae,se]}),e[59]=se,e[60]=yt):yt=e[60],Xe=yt;break e}if(ie.allowed){Xe=null;break e}let K;e[61]===Symbol.for("react.memo_cache_sentinel")?(K=a.jsx(mr,{className:"mt-0.5 size-3.5 shrink-0"}),e[61]=K):K=e[61];let ce;e[62]!==ie.reason||e[63]!==S?(ce=ie.reason??S("thread.publishPopover.needsReviewGeneric"),e[62]=ie.reason,e[63]=S,e[64]=ce):ce=e[64];let pe;e[65]!==ce?(pe=a.jsxs("div",{className:"flex items-start gap-2 border-t px-4 py-2.5 text-xs text-warning",children:[K,a.jsx("span",{children:ce})]}),e[65]=ce,e[66]=pe):pe=e[66],Xe=pe}const vt=Xe;let lt;e[67]!==st||e[68]!==z||e[69]!==We||e[70]!==ke||e[71]!==s.canDiscardAll||e[72]!==C.count||e[73]!==S?(lt=C.count<=1||!s.canDiscardAll?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>de(!0),disabled:ke||We,children:S("thread.publishPopover.discardAll")}),a.jsx(an,{open:z,onOpenChange:de,children:a.jsxs(rn,{children:[a.jsxs(en,{children:[a.jsx(Ys,{children:S("thread.publishPopover.discardAllTitle")}),a.jsx(Zs,{children:S("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(nn,{children:[a.jsx(tn,{children:S("thread.publishDialog.cancel")}),a.jsx(sn,{onClick:()=>{st()},disabled:We,className:Q(fr({variant:"destructive"})),children:S("thread.publishPopover.discardAll")})]})]})})]}),e[67]=st,e[68]=z,e[69]=We,e[70]=ke,e[71]=s.canDiscardAll,e[72]=C.count,e[73]=S,e[74]=lt):lt=e[74];const Nt=lt,Tt=_?a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{})]})}):C.count===0&&V?a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:S("thread.publishPopover.onlyOtherWork")}):C.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(pn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:S(le?"thread.publishPopover.nothingToSubmit":"thread.publishPopover.everythingLive")}),a.jsx("p",{className:"text-xs text-muted-foreground",children:S(le?"thread.publishPopover.submitEmptyHint":"thread.publishPopover.emptyHint")})]}):a.jsxs(Kt,{children:[Z?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.showingFirst",{shown:C.count,total:$})}):null,Ct(S("thread.publishPopover.pagesGroup"),C.pages),Ct(S("thread.publishPopover.blocksGroup"),C.blocks),Ct(S("thread.publishPopover.otherGroup"),C.other),J?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.detailsUnavailable")}):null,V?a.jsx("p",{className:"text-2xs text-muted-foreground",children:S("thread.publishPopover.alsoOtherWork")}):null]}),It=_?a.jsx(kn,{}):De?a.jsx("div",{className:Q(zt,"relative"),children:Te.filter(K=>Ee.includes(Re(K))).map(K=>a.jsx("div",{className:Q("absolute inset-0 flex",Ie?Re(K)===Ce?"z-10":"pointer-events-none opacity-0":Re(K)!==Ne&&"hidden"),inert:Ie&&Re(K)!==Ce,"aria-hidden":Ie&&Re(K)!==Ce?!0:void 0,children:a.jsx(ja,{change:K,diff:ee,bodyPending:H,previewServerUrl:x,draft:g,lastPage:F,v8:s.v8,onReady:Ie?()=>Y(Re(K)):void 0})},Re(K)))}):a.jsx("div",{className:Q(zt,"bg-muted/40")});let it;e[75]!==bt?(it=a.jsx("span",{className:"truncate",children:bt}),e[75]=bt,e[76]=it):it=e[76];let Oe;e[77]!==Nt||e[78]!==N||e[79]!==gt||e[80]!==it?(Oe=a.jsx(Cn,{mode:N,title:it,subLine:gt,trailing:Nt}),e[77]=Nt,e[78]=N,e[79]=gt,e[80]=it,e[81]=Oe):Oe=e[81];let Le;e[82]!==ke||e[83]!==le||e[84]!==ge||e[85]!==C.count||e[86]!==S?(Le=C.count===0?null:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-sm font-medium",children:S(le?"thread.publishPopover.reviewNote":"thread.publishPopover.versionNote")}),a.jsx(Ul,{value:ge,onChange:K=>W(K.target.value),placeholder:S(le?"thread.publishPopover.reviewNotePlaceholder":"thread.publishPopover.versionNotePlaceholder"),rows:2,maxLength:ps,className:"resize-none text-sm",disabled:ke})]}),e[82]=ke,e[83]=le,e[84]=ge,e[85]=C.count,e[86]=S,e[87]=Le):Le=e[87];let Ue;e[88]!==f||e[89]!==S?(Ue=a.jsx(Nn,{draftPreviewUrl:f,t:S}),e[88]=f,e[89]=S,e[90]=Ue):Ue=e[90];let qe;e[91]!==pt||e[92]!==ie||e[93]!==Je||e[94]!==X||e[95]!==ke||e[96]!==le||e[97]!==y||e[98]!==xt||e[99]!==Qe||e[100]!==S?(qe=!le&&!X&&Je&&!ie.allowed&&!ie.pending?a.jsx(we,{type:"button",className:"flex-1",onClick:y,disabled:ke,children:S("thread.publishPopover.requestApproval")}):a.jsxs(we,{type:"button",variant:le?"default":"brand",className:"flex-1",onClick:()=>{Qe()},disabled:!pt,children:[ke?a.jsx(Lt,{className:"size-4 motion-reduce:animate-none"}):null,ke?S(le?"thread.publishPopover.submitting":"thread.publishPopover.publishing"):xt]}),e[91]=pt,e[92]=ie,e[93]=Je,e[94]=X,e[95]=ke,e[96]=le,e[97]=y,e[98]=xt,e[99]=Qe,e[100]=S,e[101]=qe):qe=e[101];let ze;e[102]!==Ue||e[103]!==qe?(ze=a.jsxs("div",{className:"flex gap-2",children:[Ue,qe]}),e[102]=Ue,e[103]=qe,e[104]=ze):ze=e[104];let He;e[105]!==et||e[106]!==tt||e[107]!==S?(He=et?a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-destructive",children:et}),tt?a.jsx(sl,{label:S("siteEditor.details"),detail:tt}):null]}):null,e[105]=et,e[106]=tt,e[107]=S,e[108]=He):He=e[108];let Ke;e[109]!==ze||e[110]!==He?(Ke=a.jsxs(a.Fragment,{children:[ze,He]}),e[109]=ze,e[110]=He,e[111]=Ke):Ke=e[111];let Ve;e[112]!==Tt||e[113]!==vt||e[114]!==Se||e[115]!==Oe||e[116]!==Le||e[117]!==Ke?(Ve=a.jsx(Rs,{state:Se,header:Oe,body:Tt,note:Le,gate:vt,footer:Ke}),e[112]=Tt,e[113]=vt,e[114]=Se,e[115]=Oe,e[116]=Le,e[117]=Ke,e[118]=Ve):Ve=e[118];let ot;return e[119]!==It||e[120]!==Ve?(ot=a.jsx(Gt,{pane:It,list:Ve}),e[119]=It,e[120]=Ve,e[121]=ot):ot=e[121],ot}function xc(){return new Set}function vc(t){if(!(t==="claiming"||t==="ready"||t==="failed"))return Ol[t].short}const yc=new Set(["failure","timed_out","cancelled","action_required"]);function Ra(t){return t.status==="completed"&&yc.has(t.conclusion)}function Rn(t){return t.status==="queued"||t.status==="in_progress"}function us(t){return t.isPending&&t.fetchStatus!=="idle"}function wc(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr-page"}}function St(t,e,s){return e?[...t,wc(s)]:t}function ct(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"sync",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function Yn(t){return{key:"submit-for-review",label:t("thread.headerActions.submitForReview"),action:"create-pr"}}function os(t,e,s){if(e.filter(Rn).length===0)return t;const n=e.filter(o=>o.status==="completed").length;return{...t,tooltip:s("thread.cmsActions.checksRunning",{done:n,total:e.length})}}function jc(t){const{lifecycle:e,branch:s,pr:r,checks:n,reviews:o,loading:d,t:l}=t;if(d)return{label:l("thread.headerActions.loading"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.loadingBranchTooltip"),menu:[]};switch(e.phase){case"idle":return{label:t.claimPhase&&vc(t.claimPhase.kind)||l("thread.headerActions.startingSandbox"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForDaemonTooltip"),menu:[]};case"cloning":return{label:l("thread.headerActions.cloningRepo"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.cloningRepoTooltip"),menu:[]};case"clone-failed":return{label:l("thread.headerActions.cloneFailed"),disabled:!0,variant:"outline",tooltip:e.error||l("thread.headerActions.cloneFailedDefaultTooltip"),menu:[]};case"checking-out":return{label:l("thread.headerActions.switchingTo",{branch:e.to}),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.checkingOutTooltip",{branch:e.to}),menu:[]};case"installing":return{label:l("thread.headerActions.installingPackages"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.installingPackagesTooltip"),menu:[]};case"starting":{if(!(s.kind==="ready"&&(s.workingTreeDirty||s.aheadOfBase>0||s.unpushed>0))&&!t.noReviewableDiff)return{label:l("thread.headerActions.startingApp"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.startingAppTooltip"),menu:[]};break}}if(s.kind!=="ready")return{label:l("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:l("thread.headerActions.waitingForBranchTooltip"),menu:[]};const i=s,c=i.unpushed>0&&!(r&&i.headSha&&r.headSha&&i.headSha===r.headSha);if(t.noReviewableDiff&&!r)return{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:ct([],i,l)};if(i.workingTreeDirty||c)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:ct(St([Yn(l)],r,l),i,l)};if(Yr("no local work — checking PR/sync state",{workingTreeDirty:i.workingTreeDirty,unpushed:i.unpushed,aheadOfBase:i.aheadOfBase,behindBase:i.behindBase,branch:i.branch,base:i.base,prMerged:r?.merged??null,prState:r?.state??null}),r?.merged)return!!i.headSha&&!!r.headSha&&i.headSha!==r.headSha?{label:l("thread.headerActions.continue"),action:"create-pr",variant:"special",tooltip:l("thread.headerActions.openNewPrTooltip"),menu:ct(St([],r,l),i,l)}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.prMergedTooltip",{prNumber:String(r.number),base:r.base}),menu:ct(St([],r,l),i,l)};if(i.aheadOfBase>0){if(r&&r.state==="closed"&&!r.merged)return{label:l("thread.headerActions.reopenPr"),action:"reopen",variant:"default",tooltip:l("thread.headerActions.reopenPrTooltip",{prNumber:String(r.number)}),menu:ct(St([],r,l),i,l)};if(!r)return{label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:ct([Yn(l)],i,l)};if((o?.mergeableState??"unknown")==="dirty")return{label:l("thread.cmsActions.getLatest"),action:"rebase",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:l("thread.cmsActions.resolveOnProvider"),action:"open-pr-page"}]};const h=n.filter(Rn).length,m=n.filter(Ra).map(f=>f.name);if(h===0&&m.length>0)return{label:l("thread.headerActions.fixChecks"),action:"fix-checks",variant:"default",tooltip:l("thread.headerActions.failingChecksTooltip",{checks:m.join(", ")}),meta:{failingChecks:m},menu:ct(St([{key:"publish-anyway",label:l("thread.headerActions.publishAnyway"),action:"merge",tooltip:l("thread.headerActions.squashMergeTooltip",{prNumber:String(r.number),base:r.base})}],r,l),i,l)};if(o?.draft)return os({label:l("thread.headerActions.markReady"),action:"mark-ready",variant:"default",tooltip:l("thread.headerActions.markDraftReadyTooltip"),menu:ct(St([],r,l),i,l)},n,l);const b=o?.unresolvedConversations??0;return b>0?os({label:l("thread.headerActions.addressFeedback"),action:"resolve-comments",variant:"default",tooltip:l("thread.headerActions.unresolvedConversationsTooltip",{count:String(b)}),menu:ct(St([],r,l),i,l)},n,l):o?.missingRequiredApprovals?os({label:l("thread.cmsActions.waitingForReview"),action:"open-pr-page",variant:"outline",tooltip:l("thread.headerActions.waitingForApprovalsTooltip"),menu:ct(St([],r,l),i,l)},n,l):os({label:l("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",meta:{publishPolicyOverride:"open"},menu:ct(St([{key:"review",label:l("thread.headerActions.review"),action:"review"}],r,l),i,l)},n,l)}return i.behindBase>0?{label:l("thread.cmsActions.getLatest"),action:"sync",variant:"default",tooltip:l("thread.cmsActions.getLatestTooltip"),menu:[]}:{label:l("thread.headerActions.upToDate"),disabled:!0,variant:"outline",tooltip:l("thread.headerActions.branchInSyncTooltip",{base:i.base}),menu:[]}}function Zn(t){return{key:"view-change-request",label:t("thread.cmsActions.viewOnProvider"),action:"open-pr"}}function cs(t,e,s){return e.kind!=="ready"||e.behindBase<=0?t:[...t,{key:"get-latest",label:s("thread.cmsActions.getLatest"),action:"get-latest",tooltip:s("thread.cmsActions.getLatestTooltip")}]}function er(t,e,s,r){const n=e.length;if(n===0)return t;if(e.filter(Rn).length>0){const l=e.filter(c=>c.status==="completed").length,i=r("thread.cmsActions.checksRunning",{done:l,total:n});return s==="loading"?{...t,loading:!0,tooltip:i}:{...t,tooltip:i}}const d=e.filter(Ra).length;return d>0?{...t,variant:"warning",tooltip:r("thread.cmsActions.checksFailing",{failed:d,total:n})}:t}function Pc(t,e){return!!(t?.merged&&t.headSha&&e.kind==="ready"&&!e.workingTreeDirty&&e.headSha===t.headSha)}function Sc(t){return us(t.prQuery)?!0:t.pr?.state!=="open"||t.pr.merged?!1:us(t.checksQuery)||us(t.reviewsQuery)}function kc(t,e){return t.workingTreeDirty?!0:e!==null?e>0:t.aheadOfBase>0}function Cc(t,e){if(!t)return{branchMeta:{kind:"unknown"},publishableChangeCount:null};const s=Object.keys(t.changes).length;return{branchMeta:{kind:"ready",branch:e,base:t.base.resolvedRef??"main",workingTreeDirty:!1,unpushed:0,aheadOfBase:s,behindBase:0,headSha:t.revision},publishableChangeCount:s}}function Nc(t){return{...t,menu:[]}}function Ac(t){const{branch:e,pr:s,checks:r,reviews:n,publishing:o,saving:d,loading:l,publishableChangeCount:i,t:c}=t;if(e.kind!=="ready"&&t.statusError)return{label:c("thread.cmsActions.retry"),action:"retry-status",variant:"outline",disabled:t.statusRetrying,loading:t.statusRetrying,tooltip:t.statusError,menu:[]};if(l||e.kind!=="ready")return{label:c("thread.headerActions.loading"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(o)return{label:c("thread.cmsActions.publishing"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(t.syncing)return{label:c("thread.cmsActions.gettingLatest"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(d)return{label:c("thread.headerActions.saving"),variant:"outline",disabled:!0,loading:!0,menu:[]};if(s&&s.state==="open"&&!s.merged?s:null){const h=n?.mergeableState??"unknown";return h==="dirty"?{label:c("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:c("thread.cmsActions.getLatestTooltip"),menu:[{key:"resolve-on-provider",label:c("thread.cmsActions.resolveOnProvider"),action:"open-pr"}]}:h==="blocked"||n?.draft?er({label:c("thread.cmsActions.waitingForReview"),action:"open-pr",variant:"outline",menu:cs([Zn(c)],e,c)},r,"loading",c):er({label:c("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([Zn(c)],e,c)},r,"none",c)}return Pc(s,e)?{label:c("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:cs([],e,c)}:kc(e,i)?{label:c("thread.cmsActions.reviewAndPublish"),action:"publish",variant:"brand",menu:cs([{key:"request-approval",label:c("thread.headerActions.submitForReview"),action:"request-approval"}],e,c)}:e.behindBase>0?{label:c("thread.cmsActions.getLatest"),action:"get-latest",variant:"default",tooltip:c("thread.cmsActions.getLatestTooltip"),menu:[],autoRun:e.aheadOfBase===0}:{label:c("thread.headerActions.upToDate"),variant:"outline",disabled:!0,menu:[]}}function Rc(t){return t.conflicting===!0?"dirty":t.conflicting===null?"unknown":t.reviewBlocked||t.unresolvedConversations>0?"blocked":"clean"}function Ta(t){const e=M.c(4);let s;e[0]!==t?(s=Cl(t),e[0]=t,e[1]=s):s=e[1];let r;return e[2]!==s?(r={...s,select:Tc},e[2]=s,e[3]=r):r=e[3],Rt(r)}function Tc(t){const e=t.changeRequest;return e?{draft:e.draft,mergeableState:Rc(e),unresolvedConversations:e.unresolvedConversations,missingRequiredApprovals:e.reviewBlocked}:null}function tr(t,e){return t==="open-pr"||e==="resolve-on-provider"?a.jsx(Lr,{size:16}):t==="publish"?a.jsx(Rr,{className:"size-4"}):t==="get-latest"||t==="retry-status"?a.jsx(Ws,{className:"size-4"}):a.jsx(ks,{className:"size-4"})}function Ic(t){const e=M.c(70),{virtualMcpId:s}=t,r=ve(),{org:n}=js(),o=Ps(),d=dn(s),{data:l}=ws.useSession(),{deleteRelease:i}=ln(s),{currentBranch:c,setCurrentTaskBranch:u,taskId:h,createTask:m}=gr();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={open:!1,mode:"publish"},e[0]=b):b=e[0];const[f,p]=q.useState(b);let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=E=>p({open:!0,mode:E}),e[1]=x):x=e[1];const g=x,P=Fr(d),y=P.status==="attached"||P.status==="public-clone"?P.repo:null,{previewServerUrl:v}=un(s);let j;if(e[2]!==c||e[3]!==n.slug||e[4]!==s){const E=c?pr(br(n.slug,s,c)):null;j=E?mn(E.path,E.params):"/",e[2]=c,e[3]=n.slug,e[4]=s,e[5]=j}else j=e[5];const w=j;let N;e[6]!==c||e[7]!==w||e[8]!==n.slug||e[9]!==v||e[10]!==s?(N=c?{orgSlug:n.slug,virtualMcpId:s,branch:c,previewServerUrl:v,path:w}:null,e[6]=c,e[7]=w,e[8]=n.slug,e[9]=v,e[10]=s,e[11]=N):N=e[11];const k=Rl(N);let A;e[12]!==c||e[13]!==n.slug||e[14]!==s?(A=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[12]=c,e[13]=n.slug,e[14]=s,e[15]=A):A=e[15];const S=Tl(A),R=Ht(s,c),T=R.kind==="protocol"&&R.source==="github";let B;e[16]!==c||e[17]!==n.slug||e[18]!==s?(B=c?{orgSlug:n.slug,virtualMcpId:s,branch:c}:null,e[16]=c,e[17]=n.slug,e[18]=s,e[19]=B):B=e[19];const D=Xs(B),F=jr(T?R:null,D),C=c??"",I=h??null;let $;e[20]!==n.slug||e[21]!==C||e[22]!==I||e[23]!==s?($=Gr({orgSlug:n.slug,virtualMcpId:s,branch:C,threadId:I}),e[20]=n.slug,e[21]=C,e[22]=I,e[23]=s,e[24]=$):$=e[24];const Z=!!c&&R.kind!=="pending"&&!T;let ee;e[25]!==Z||e[26]!==$?(ee={...$,enabled:Z},e[25]=Z,e[26]=$,e[27]=ee):ee=e[27];const H=Rt(ee),J=T?null:H.data??null,_=T?Cc(F.data,c??""):null,G=_?_.branchMeta:J?{kind:"ready",branch:xn(J)??c??"",base:J.base??"main",workingTreeDirty:ni(J),unpushed:J.unpushed??0,aheadOfBase:J.aheadOfBase??0,behindBase:J.behindBase??0,headSha:J.headSha??""}:{kind:"unknown"},ie=_?_.publishableChangeCount:J?.changedFiles?ma({files:J.changedFiles}).count:null,X=T?F:H,V=(G.kind==="ready"?G.branch:null)??c??null,ae=G.kind==="ready"?G.base:"main",W=$r({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V}),z=W.data??null,de=Er({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",base:ae}),me=_r({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V}),re=Ta({orgId:n.id,orgSlug:n.slug,target:Ye(y),owner:y?.owner??"",repo:y?.name??"",branch:V});let oe;e[28]!==me||e[29]!==z||e[30]!==W||e[31]!==re?(oe=Sc({pr:z,prQuery:W,checksQuery:me,reviewsQuery:re}),e[28]=me,e[29]=z,e[30]=W,e[31]=re,e[32]=oe):oe=e[32];const Y=oe;let ue;e[33]!==W?(ue=async()=>{await W.refetch()},e[33]=W,e[34]=ue):ue=e[34];const je=ue,O=Tn({mutationFn:async()=>{const E=c;await u(on(cn(l?.user))),E&&E!==ae&&await i(E)},onError:Mc});let U;e[35]!==n.slug||e[36]!==h||e[37]!==s?(U=async E=>(await Vr({orgSlug:n.slug,virtualMcpId:s,branch:E.branch,threadId:h??null},E.base),E),e[35]=n.slug,e[36]=h,e[37]=s,e[38]=U):U=e[38];let L;e[39]!==c||e[40]!==n.slug||e[41]!==o||e[42]!==r||e[43]!==h||e[44]!==s?(L=async E=>{_e.success(r("thread.headerActions.syncedWithBase",{base:E.base})),await Promise.all([o.invalidateQueries({queryKey:Jr({orgSlug:n.slug,virtualMcpId:s,branch:c??E.branch,threadId:h??null})}),o.invalidateQueries({queryKey:Ft.decofile(`${n.slug}/${s}/${E.branch}`)})])},e[39]=c,e[40]=n.slug,e[41]=o,e[42]=r,e[43]=h,e[44]=s,e[45]=L):L=e[45];let Pe;e[46]!==U||e[47]!==L?(Pe={mutationFn:U,onSuccess:L,onError:Dc},e[46]=U,e[47]=L,e[48]=Pe):Pe=e[48];const he=Tn(Pe),te=Pr(n.slug,s),fe=O.isPending,$e=Ac({branch:G,pr:z,checks:me.data??[],reviews:re.data??null,publishing:fe,saving:te,syncing:he.isPending,statusRetrying:X.isFetching&&!!X.error,statusError:X.error instanceof Error?X.error.message:X.error?String(X.error):null,loading:!!Y,publishableChangeCount:ie,t:r}),ge=T?Nc($e):$e,Te=ge.autoRun&&G.kind==="ready"&&y&&v?`${V}@${G.headSha}`:null,De=q.useRef(null);if(q.useEffect(()=>{!Te||!V||De.current!==Te&&(De.current=Te,he.mutate({branch:V,base:ae}))},[Te,V,ae,he]),P.status==="detached"){let E;e[49]!==r?(E=r("thread.headerActions.reconnectGithub"),e[49]=r,e[50]=E):E=e[50];let xe;e[51]!==E?(xe=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:a.jsx(we,{size:"sm",variant:"outline",disabled:!0,children:E})})}),e[51]=E,e[52]=xe):xe=e[52];let be;e[53]!==r?(be=r("thread.headerActions.githubConnectionRemoved"),e[53]=r,e[54]=be):be=e[54];let ye;e[55]!==be?(ye=a.jsx(Pt,{children:be}),e[55]=be,e[56]=ye):ye=e[56];let Be;return e[57]!==xe||e[58]!==ye?(Be=a.jsx(Ss,{children:a.jsxs(wt,{children:[xe,ye]})}),e[57]=xe,e[58]=ye,e[59]=Be):Be=e[59],Be}if(!d)return null;if(!y||!v){const E=y?"noPreviewServer":"noRepo";let xe;e[60]!==c||e[61]!==m?(xe=c?()=>{const ye=m?.({runtime:"sandbox",branch:c});ye&&La("coding_session_started",{thread_id:ye})}:void 0,e[60]=c,e[61]=m,e[62]=xe):xe=e[62];let be;return e[63]!==E||e[64]!==xe?(be=a.jsx(Fc,{reason:E,onStartCodingSession:xe}),e[63]=E,e[64]=xe,e[65]=be):be=e[65],be}if(!c)return null;const Ne=E=>{switch(E){case"publish":{g("publish");return}case"request-approval":{g("review");return}case"get-latest":{if(!V||he.isPending)return;he.mutate({branch:V,base:ae});return}case"retry-status":{X.refetch();return}case"open-pr":{z?.htmlUrl&&window.open(z.htmlUrl,"_blank","noopener,noreferrer");return}}};let Ee;e[66]!==Ne?(Ee=E=>({key:E.key,label:E.label,icon:tr(E.action,E.key),...E.tooltip?{tooltip:E.tooltip}:{},onSelect:()=>Ne(E.action)}),e[66]=Ne,e[67]=Ee):Ee=e[67];const Ie=ge.menu.map(Ee),Me=ge.action,ut=ge.label,Ce=ge.variant,le=!!ge.loading;let Se;e[68]!==r?(Se=r("thread.cmsActions.moreActionsAriaLabel"),e[68]=r,e[69]=Se):Se=e[69];const ht=a.jsx(ea,{size:"sm",label:ut,variant:Ce,disabled:!!ge.disabled||!Me,loading:le,...Me&&!ge.loading?{icon:tr(Me)}:{},...ge.tooltip?{tooltip:ge.tooltip}:{},items:Ie,menuAriaLabel:Se,onClick:Me?()=>Ne(Me):void 0});return a.jsxs(a.Fragment,{children:[ht,c?a.jsx(Ca,{open:f.open,mode:f.mode,fastPreview:!0,onOpenChange:E=>{E||p(Bc)},orgSlug:n.slug,virtualMcpId:s,branch:c,baseBranch:ae,repoTarget:Ye(y),owner:y.owner,repo:y.name,publishPolicy:Wr(d?.metadata?.publishPolicy),draftPreviewUrl:k.url,destinationHost:k.host,previewServerUrl:v,compareDraft:S?{kind:"pointer",pointer:S}:null,lastPublishedPr:de.data??null,onRequestApproval:()=>g("review"),openPullRequest:z?.state==="open"?z:null,onPullRequestChanged:je,onPublished:()=>O.mutateAsync()}):null]})}function Bc(t){return{...t,open:!1}}function Dc(t){_e.error(t instanceof Error?t.message:String(t))}function Mc(t){console.error("site editor: settling after publish failed",t)}function Fc(t){const e=M.c(14),{reason:s,onStartCodingSession:r}=t,n=ve(),o=!r;let d;e[0]!==n?(d=n("sandbox.cmsUnavailable.startCodingSession"),e[0]=n,e[1]=d):d=e[1];let l;e[2]!==r||e[3]!==o||e[4]!==d?(l=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:a.jsx(we,{size:"sm",variant:"outline",disabled:o,onClick:r,children:d})})}),e[2]=r,e[3]=o,e[4]=d,e[5]=l):l=e[5];let i;e[6]!==s||e[7]!==n?(i=n(s==="noPreviewServer"?"sandbox.cmsUnavailable.noPreviewServer":"sandbox.cmsUnavailable.noRepo"),e[6]=s,e[7]=n,e[8]=i):i=e[8];let c;e[9]!==i?(c=a.jsx(Pt,{children:i}),e[9]=i,e[10]=c):c=e[10];let u;return e[11]!==l||e[12]!==c?(u=a.jsx(Ss,{children:a.jsxs(wt,{children:[l,c]})}),e[11]=l,e[12]=c,e[13]=u):u=e[13],u}const $t="The user clicked this action deliberately — execute directly. Do not call user_ask unless you hit an actual problem outside the scope of this intent (missing auth, unresolvable conflict, a check with multiple plausible fixes).";function $c(t){return`Reopen PR #${t.prNumber}. ${$t}`}function Ec(t){return`Rebase \`${t.branch}\` on the latest base and force-push with --force-with-lease. ${$t}`}function _c(t){return`Sync \`${t.branch}\` with everyone else's work: \`git add -A\`, commit any pending local changes with a concise conventional-commit message (skip if the working tree is clean), \`git pull --rebase\` to bring in anything pushed directly to \`origin/${t.branch}\`, then \`git rebase origin/${t.base}\` to catch up with the base branch. Resolve any conflicts that come up, then push the result (force-with-lease only if the rebase rewrote commits already on the remote). ${$t}`}function Oc(t){const e=(t.failingChecks??[]).map(s=>`\`${s}\``).join(", ");return`PR #${t.prNumber} has failing checks: ${e}. For each: read the logs, diagnose the root cause, apply the smallest fix that makes it pass, commit, and push. ${$t}`}function Lc(t){return`Mark PR #${t.prNumber} ready for review. ${$t}`}function Uc(t){return`Read the unresolved review threads on PR #${t.prNumber}. For each thread: understand the reviewer's ask, apply the needed changes, commit, push, reply explaining what changed, and resolve the thread. If a comment is a question that doesn't need a code change, reply with the answer and resolve. ${$t}`}function qc(t){return`Review PR #${t.prNumber}. Read the full diff, analyze every changed file for correctness, security, code quality, and alignment with the repo's patterns. Post specific line-level review comments on concerns, then submit an overall review (approve / request changes / comment) with a concise summary. Do not modify the code — this is a read-and-comment pass. ${$t}`}function sr(t){switch(t){case"publish":return a.jsx(Rr,{className:"size-4"});case"create-pr":case"reopen":return a.jsx(ks,{className:"size-4"});case"rebase":case"sync":return a.jsx(Ws,{className:"size-4"});case"fix-checks":return a.jsx(mr,{className:"size-4"});case"mark-ready":return a.jsx(pn,{className:"size-4"});case"resolve-comments":return a.jsx(ml,{className:"size-4"});case"merge":return a.jsx(Hl,{className:"size-4"});case"review":return a.jsx(ms,{className:"size-4"});case"open-pr-page":return a.jsx(Lr,{size:16})}}const nr=new Set(["reopen","rebase","fix-checks","mark-ready","resolve-comments","review","sync"]),rr=new Set(["publish","create-pr"]);function zc(t){const e=M.c(44),{t:s,button:r,actionBusy:n,changeRequestPending:o,savePending:d,onAction:l}=t,i=r.action;let c;e[0]!==i||e[1]!==n?(c=n&&i!==void 0&&nr.has(i),e[0]=i,e[1]=n,e[2]=c):c=e[2];const u=c,h=o&&i==="merge";let m;e[3]!==i||e[4]!==d?(m=d&&i!==void 0&&rr.has(i),e[3]=i,e[4]=d,e[5]=m):m=e[5];const b=m,f=!!r.disabled||u||h||b||!i,p=!!r.loading||h;let x;e[6]!==r.tooltip||e[7]!==u||e[8]!==b||e[9]!==s?(x=u?s("thread.headerActions.chatIsRunning"):b?s("thread.headerActions.saving"):r.tooltip,e[6]=r.tooltip,e[7]=u,e[8]=b,e[9]=s,e[10]=x):x=e[10];const g=x;let P;if(e[11]!==n||e[12]!==r.menu||e[13]!==o||e[14]!==l||e[15]!==d||e[16]!==s){let R;e[18]!==n||e[19]!==o||e[20]!==l||e[21]!==d||e[22]!==s?(R=T=>{const B=n&&nr.has(T.action),D=d&&rr.has(T.action),F=T.action==="merge"&&o,C=D?s("thread.headerActions.saving"):B?s("thread.headerActions.chatIsRunning"):T.tooltip;return{key:T.key,label:T.label,icon:sr(T.action),disabled:!!(B||D||F),...C?{tooltip:C}:{},onSelect:()=>l(T.action)}},e[18]=n,e[19]=o,e[20]=l,e[21]=d,e[22]=s,e[23]=R):R=e[23],P=r.menu.map(R),e[11]=n,e[12]=r.menu,e[13]=o,e[14]=l,e[15]=d,e[16]=s,e[17]=P}else P=e[17];const y=P,v=r.label,j=r.variant;let w;e[24]!==i||e[25]!==p?(w=i&&!p?{icon:sr(i)}:{},e[24]=i,e[25]=p,e[26]=w):w=e[26];let N;e[27]!==g?(N=g?{tooltip:g}:{},e[27]=g,e[28]=N):N=e[28];let k;e[29]!==s?(k=s("thread.headerActions.moreActionsAriaLabel"),e[29]=s,e[30]=k):k=e[30];let A;e[31]!==i||e[32]!==l?(A=i?()=>l(i):void 0,e[31]=i,e[32]=l,e[33]=A):A=e[33];let S;return e[34]!==r.label||e[35]!==r.variant||e[36]!==f||e[37]!==y||e[38]!==p||e[39]!==w||e[40]!==N||e[41]!==k||e[42]!==A?(S=a.jsx(ea,{size:"sm",label:v,variant:j,disabled:f,loading:p,...w,...N,items:y,menuAriaLabel:k,onClick:A}),e[34]=r.label,e[35]=r.variant,e[36]=f,e[37]=y,e[38]=p,e[39]=w,e[40]=N,e[41]=k,e[42]=A,e[43]=S):S=e[43],S}function Hc(t){const e=M.c(9),{label:s,children:r}=t;if(!s){let l;return e[0]!==r?(l=a.jsx(a.Fragment,{children:r}),e[0]=r,e[1]=l):l=e[1],l}let n;e[2]!==r?(n=a.jsx(jt,{asChild:!0,children:a.jsx("span",{children:r})}),e[2]=r,e[3]=n):n=e[3];let o;e[4]!==s?(o=a.jsx(Pt,{children:s}),e[4]=s,e[5]=o):o=e[5];let d;return e[6]!==n||e[7]!==o?(d=a.jsx(Ss,{children:a.jsxs(wt,{children:[n,o]})}),e[6]=n,e[7]=o,e[8]=d):d=e[8],d}function Kc(t){return{label:t("thread.headerActions.loadingBranch"),disabled:!0,loading:!0,variant:"outline",tooltip:t("thread.headerActions.waitingForSandboxBranchTooltip"),menu:[]}}function Vc({virtualMcpId:t}){const e=ve(),{org:s}=js(),{data:r}=ws.useSession(),n=dn(t),{deleteRelease:o}=ln(t),{currentBranch:d,setCurrentTaskBranch:l,createTask:i,taskId:c}=gr(),u=Ha(),{openSidePanel:h}=rl(),[m,b]=q.useState({open:!1,mode:"publish",policyOverride:null}),f=pi({connectionId:Ua,orgId:s.id,orgSlug:s.slug}),p=bi(f),[x,g]=q.useState(!1),P=q.useRef(""),y=Fr(n),v=y.status==="attached"||y.status==="public-clone"?y.repo:null,{lifecycle:j,branch:w,phase:N}=Ll(),k={orgSlug:s.slug,virtualMcpId:t,branch:d??"",threadId:c??null},S=Rt({queryKey:Jr(k),queryFn:()=>bn(k),enabled:!!d,staleTime:15e3,refetchInterval:U=>$s(U.state.data)?5e3:!1}).data??null,R=w,T=j,B=R.kind==="ready"?R.branch:null,D=d??B??void 0,F=(R.kind==="ready"?R.branch:null)??D??null,C=$r({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),I=C.data??null,$=_r({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),Z=Ta({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",branch:F}),ee=Er({orgId:s.id,orgSlug:s.slug,target:Ye(v),owner:v?.owner??"",repo:v?.name??"",base:R.kind==="ready"?R.base:null}),H=R,J=Wr(n?.metadata?.publishPolicy),_=Pr(s.slug,t),{previewUrl:G}=gi(),{previewServerUrl:ie,projectDefault:X}=un(t);if(y.status==="detached")return a.jsx(Hc,{label:e("thread.headerActions.githubConnectionRemoved"),children:a.jsx(we,{size:"sm",variant:"outline",disabled:!0,children:e("thread.headerActions.reconnectGithub")})});if(!v)return null;const V=F?jc({lifecycle:T,branch:H,claimPhase:N,pr:I,checks:$.data??[],reviews:Z.data??null,noReviewableDiff:$s(S),loading:us(C),t:e}):Kc(e),ae=JSON.stringify({label:V.label,branchKind:H.kind,workingTreeDirty:H.kind==="ready"?H.workingTreeDirty:null,unpushed:H.kind==="ready"?H.unpushed:null,aheadOfBase:H.kind==="ready"?H.aheadOfBase:null,lifecycle:T.phase,headBranch:F,noReviewableDiff:$s(S)});P.current!==ae&&(P.current=ae,Yr("header button",{label:V.label,tooltip:V.tooltip,action:V.action,chatBranch:d,sandboxBranch:B,sandboxRouteBranch:D,headBranch:F,branchMeta:R,effectiveBranchMeta:H,lifecyclePhase:T.phase,prNumber:I?.number??null,prState:I?.state??null}));const W=U=>(h(),u.sendMessage({parts:[{type:"text",text:U}]})),z=u.isStreaming,de=H.kind==="ready"?H.base:"main",me=async()=>{await C.refetch()},re=async()=>{const U=d,L=on(cn(r?.user));X==="cms"?i({runtime:"cms",branch:L}):await l(L),U&&U!==de&&await o(U)},oe=async U=>{if(!(!v||x)){g(!0);try{const L=ta(r?.user);await ra(s.slug,Ye(v),{number:U,coAuthor:L}),_e.success(e("thread.headerActions.publishedPr",{prNumber:String(U)})),await me(),await re()}catch(L){_e.error(L instanceof na?L.detail??Gi(L.reason,e):L instanceof Error?L.message:e("thread.headerActions.failedToMergePullRequest"))}finally{g(!1)}}},Y=(U,L)=>b({open:!0,mode:U,policyOverride:L}),ue=U=>{if(F)switch(U){case"publish":Y("publish",V.meta?.publishPolicyOverride??null);return;case"create-pr":Y("review",null);return;case"merge":I&&oe(I.number);return;case"sync":if(z)return;W(_c({branch:F,base:de}));return;case"open-pr-page":I?.htmlUrl&&window.open(I.htmlUrl,"_blank","noopener,noreferrer");return;case"review":if(z)return;I&&W(qc({prNumber:I.number}));return;case"reopen":if(z)return;I&&W($c({prNumber:I.number}));return;case"rebase":if(z)return;W(Ec({branch:F}));return;case"fix-checks":if(z)return;I&&W(Oc({prNumber:I.number,failingChecks:V.meta?.failingChecks??[]}));return;case"mark-ready":if(z)return;I&&W(Lc({prNumber:I.number}));return;case"resolve-comments":if(z)return;I&&W(Uc({prNumber:I.number}));return}},je=x||z,O=a.jsx(zc,{t:e,button:V,actionBusy:je,changeRequestPending:x,savePending:_,onAction:ue});return D?a.jsxs(a.Fragment,{children:[O,a.jsx(Ca,{open:m.open,mode:m.mode,fastPreview:!1,recoverSandbox:()=>p.mutateAsync({virtualMcpId:t,branch:D,...c?{threadId:c}:{}}),onOpenChange:U=>{U||b(L=>({...L,open:!1}))},orgSlug:s.slug,virtualMcpId:t,branch:D,baseBranch:de,repoTarget:Ye(v),owner:v.owner,repo:v.name,publishPolicy:m.policyOverride??J,draftPreviewUrl:G,destinationHost:null,previewServerUrl:ie,compareDraft:G?{kind:"sandbox",previewUrl:G}:null,lastPublishedPr:ee.data??null,onRequestApproval:()=>b(U=>({...U,open:!0,mode:"review"})),openPullRequest:I?.state==="open"?I:null,onPullRequestChanged:me,onPublished:re})]}):O}function Gc(t){const e=M.c(33),{orgSlug:s,virtualMcpId:r,branch:n}=t,o=ve(),[d,l]=q.useState(!1),i=Ht(r,n),c=i.kind==="protocol"&&i.source==="local"?i:null;let u;e[0]!==n||e[1]!==s||e[2]!==r?(u=n?{orgSlug:s,virtualMcpId:r,branch:n}:null,e[0]=n,e[1]=s,e[2]=r,e[3]=u):u=e[3];const h=Xs(u),{data:m}=jr(c,h);if(!c||!h||!n)return null;let b;e[4]!==m?(b=m?Object.keys(m.changes).length:0,e[4]=m,e[5]=b):b=e[5];const f=b;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(!0),e[6]=p):p=e[6];let x;e[7]!==f||e[8]!==o?(x=f>0?o("decoServe.changes.buttonCount",{count:f}):o("decoServe.changes.button"),e[7]=f,e[8]=o,e[9]=x):x=e[9];let g;e[10]!==x?(g=a.jsx(we,{size:"sm",variant:"outline","data-testid":"local-changes-button",onClick:p,children:x}),e[10]=x,e[11]=g):g=e[11];let P;e[12]!==o?(P=o("decoServe.changes.title"),e[12]=o,e[13]=P):P=e[13];let y;e[14]!==P?(y=a.jsx(cr,{className:"sr-only",children:P}),e[14]=P,e[15]=y):y=e[15];let v;e[16]!==n||e[17]!==h||e[18]!==c||e[19]!==d||e[20]!==s||e[21]!==o||e[22]!==r?(v=d?a.jsx(ur,{children:k=>{const{reset:A}=k;return a.jsx(hr,{fallback:S=>{const{resetError:R}=S;return a.jsx(Vs,{title:o("decoServe.changes.title"),body:a.jsx("p",{className:"px-4 py-6 text-xs text-muted-foreground",children:o("decoServe.changes.loadFailed")}),onClose:()=>{A(),R(),l(!1)}})},children:a.jsx(q.Suspense,{fallback:a.jsx(Gt,{pane:a.jsx(kn,{}),list:a.jsx(Vs,{title:o("decoServe.changes.title"),loading:!0,body:a.jsx(Kt,{children:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx(Mt,{}),a.jsx(Mt,{})]})}),onClose:()=>l(!1)})}),children:a.jsx(Qc,{orgSlug:s,virtualMcpId:r,branch:n,backend:c,cacheKey:h,onClose:()=>l(!1)})})})}}):null,e[16]=n,e[17]=h,e[18]=c,e[19]=d,e[20]=s,e[21]=o,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==y||e[25]!==v?(j=a.jsxs(dr,{"aria-describedby":void 0,className:"flex h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col md:flex-row md:h-[calc(100dvh-6rem)] md:w-[calc(100vw-6rem)] gap-0 overflow-hidden p-0 sm:max-w-none",closeButtonClassName:"top-3.5 right-3.5",children:[y,v]}),e[24]=y,e[25]=v,e[26]=j):j=e[26];let w;e[27]!==d||e[28]!==j?(w=a.jsx(or,{open:d,onOpenChange:l,children:j}),e[27]=d,e[28]=j,e[29]=w):w=e[29];let N;return e[30]!==w||e[31]!==g?(N=a.jsxs(a.Fragment,{children:[g,w]}),e[30]=w,e[31]=g,e[32]=N):N=e[32],N}function Vs(t){const e=M.c(22),{title:s,trailing:r,body:n,loading:o,onClose:d}=t,l=o===void 0?!1:o,i=ve(),c=l?"loading":"ready";let u;e[0]!==s?(u=a.jsx("span",{className:"truncate",children:s}),e[0]=s,e[1]=u):u=e[1];let h;e[2]!==u||e[3]!==r?(h=a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[u,r]}),e[2]=u,e[3]=r,e[4]=h):h=e[4];let m;e[5]!==i?(m=i("decoServe.changes.hint"),e[5]=i,e[6]=m):m=e[6];let b;e[7]!==m?(b=a.jsx("p",{className:"text-2xs text-muted-foreground",children:a.jsx(Hr,{text:m})}),e[7]=m,e[8]=b):b=e[8];let f;e[9]!==i?(f=i("decoServe.changes.close"),e[9]=i,e[10]=f):f=e[10];let p;e[11]!==d||e[12]!==f?(p=a.jsx(we,{type:"button",variant:"outline",className:"w-full",onClick:d,children:f}),e[11]=d,e[12]=f,e[13]=p):p=e[13];let x;e[14]!==b||e[15]!==p?(x=a.jsxs(a.Fragment,{children:[b,p]}),e[14]=b,e[15]=p,e[16]=x):x=e[16];let g;return e[17]!==n||e[18]!==c||e[19]!==h||e[20]!==x?(g=a.jsx(Rs,{state:c,header:h,body:n,footer:x}),e[17]=n,e[18]=c,e[19]=h,e[20]=x,e[21]=g):g=e[21],g}function Qc(t){const e=M.c(54),{orgSlug:s,virtualMcpId:r,branch:n,backend:o,cacheKey:d,onClose:l}=t,i=ve();let c;e[0]!==n||e[1]!==s||e[2]!==r?(c={orgSlug:s,virtualMcpId:r,branch:n},e[0]=n,e[1]=s,e[2]=r,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==d||e[6]!==c?(u={backend:o,cacheKey:d,scope:c},e[4]=o,e[5]=d,e[6]=c,e[7]=u):u=e[7];const h=Sn(u);let m;e[8]!==n||e[9]!==s||e[10]!==h.refresh||e[11]!==r?(m={orgSlug:s,virtualMcpId:r,branch:n,refresh:h.refresh},e[8]=n,e[9]=s,e[10]=h.refresh,e[11]=r,e[12]=m):m=e[12];const b=Pa(m),f=wr(s,r).phase==="saving",p=o.describe.readOnly,[x,g]=q.useState(null),[P,y]=q.useState(null),[v,j]=q.useState(!1),{summary:w}=h;let N,k,A,S,R;if(e[13]!==x||e[14]!==o||e[15]!==P||e[16]!==b||e[17]!==v||e[18]!==f||e[19]!==p||e[20]!==h.blocks||e[21]!==h.entries||e[22]!==h.sidesFailed||e[23]!==h.sidesPending||e[24]!==w.blocks||e[25]!==w.count||e[26]!==w.pages||e[27]!==i){const D=[...w.pages,...w.blocks],F=D.find(Z=>Re(Z)===x)??D[0]??null;let C;e[33]!==w.count||e[34]!==i?(C=w.count===0?i("decoServe.changes.title"):w.count===1?i("decoServe.changes.titleOne"):i("decoServe.changes.titleCount",{count:w.count}),e[33]=w.count,e[34]=i,e[35]=C):C=e[35],R=C;const I=(Z,ee)=>ee.length===0?null:a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("div",{className:"px-0.5 text-2xs font-medium text-muted-foreground",children:Z}),ee.map(H=>{const J=Re(H);return a.jsx(ga,{change:H,bodyPending:h.sidesPending,v8:!0,selected:F!==null&&Re(F)===J,onSelect:()=>g(J),confirming:P===J,onConfirmingChange:_=>y(_?J:null),onDiscard:p||!H.entry?void 0:()=>{b(o,[H.entry],i("thread.publishPopover.discarded",{name:H.name}))},isPublishing:!1,isDiscarding:f},J)})]});let $;e[36]!==o||e[37]!==b||e[38]!==v||e[39]!==f||e[40]!==p||e[41]!==h.entries||e[42]!==w.count||e[43]!==i?($=p||w.count<=1?null:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"ml-auto shrink-0 text-2xs text-muted-foreground transition-colors hover:text-destructive disabled:opacity-50",onClick:()=>j(!0),disabled:f,children:i("thread.publishPopover.discardAll")}),a.jsx(an,{open:v,onOpenChange:j,children:a.jsxs(rn,{children:[a.jsxs(en,{children:[a.jsx(Ys,{children:i("thread.publishPopover.discardAllTitle")}),a.jsx(Zs,{children:i("thread.publishPopover.discardAllConfirm")})]}),a.jsxs(nn,{children:[a.jsx(tn,{children:i("thread.publishDialog.cancel")}),a.jsx(sn,{onClick:()=>{b(o,h.entries,i("thread.publishDialog.allChangesDiscarded"))},disabled:f,className:Q(fr({variant:"destructive"})),children:i("thread.publishPopover.discardAll")})]})]})})]}),e[36]=o,e[37]=b,e[38]=v,e[39]=f,e[40]=p,e[41]=h.entries,e[42]=w.count,e[43]=i,e[44]=$):$=e[44],A=$,k=w.count===0?a.jsxs("div",{className:"flex flex-col items-center gap-1 py-10 text-center",children:[a.jsx(pn,{className:"mb-1 size-5 text-success"}),a.jsx("p",{className:"text-sm font-medium",children:i("decoServe.changes.empty")})]}):a.jsxs(Kt,{children:[I(i("thread.publishPopover.pagesGroup"),w.pages),I(i("thread.publishPopover.blocksGroup"),w.blocks),h.sidesFailed?a.jsx("p",{className:"text-2xs text-muted-foreground",children:i("thread.publishPopover.detailsUnavailable")}):null]}),N=Gt,S=F?a.jsx("div",{className:Q(zt,"relative flex"),children:a.jsx(ja,{change:F,diff:null,bodyPending:h.sidesPending,previewServerUrl:null,draft:null,lastPage:null,v8:{blocks:h.blocks}},Re(F))}):a.jsx("div",{className:Q(zt,"bg-muted/40")}),e[13]=x,e[14]=o,e[15]=P,e[16]=b,e[17]=v,e[18]=f,e[19]=p,e[20]=h.blocks,e[21]=h.entries,e[22]=h.sidesFailed,e[23]=h.sidesPending,e[24]=w.blocks,e[25]=w.count,e[26]=w.pages,e[27]=i,e[28]=N,e[29]=k,e[30]=A,e[31]=S,e[32]=R}else N=e[28],k=e[29],A=e[30],S=e[31],R=e[32];let T;e[45]!==k||e[46]!==A||e[47]!==l||e[48]!==R?(T=a.jsx(Vs,{title:R,trailing:A,body:k,onClose:l}),e[45]=k,e[46]=A,e[47]=l,e[48]=R,e[49]=T):T=e[49];let B;return e[50]!==N||e[51]!==S||e[52]!==T?(B=a.jsx(N,{pane:S,list:T}),e[50]=N,e[51]=S,e[52]=T,e[53]=B):B=e[53],B}function Wc(t){const e=M.c(5),{virtualMcpId:s,branch:r}=t,n=ve(),o=Ht(s,r);if(!Jc(o))return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(jt,{asChild:!0,children:a.jsx("span",{"data-testid":"content-version-badge",className:"shrink-0 rounded border border-border px-1.5 py-px font-mono text-2xs leading-4 text-muted-foreground",children:"v8"})}),e[0]=d):d=e[0];let l;e[1]!==n?(l=n("decoServe.version.v8"),e[1]=n,e[2]=l):l=e[2];let i;return e[3]!==l?(i=a.jsxs(wt,{children:[d,a.jsx(Pt,{side:"bottom",className:"max-w-xs",children:l})]}),e[3]=l,e[4]=i):i=e[4],i}function Jc(t){return t.kind==="protocol"?t.hasSchema!==!1:t.kind==="unavailable"&&t.source!=="local"}function Xc(t){const e=M.c(11),{virtualMcpId:s,branch:r}=t,n=ve(),o=Ht(s,r);if(!(o.kind==="protocol"&&o.source==="local"&&o.describe.readOnly))return null;let l;e[0]!==n?(l=n("decoServe.readOnly.label"),e[0]=n,e[1]=l):l=e[1];let i;e[2]!==l?(i=a.jsx(jt,{asChild:!0,children:a.jsx("span",{tabIndex:0,"data-testid":"deco-serve-read-only",className:"shrink-0 rounded-full bg-warning/10 px-2 py-0.5 text-xs font-medium text-foreground",children:l})}),e[2]=l,e[3]=i):i=e[3];let c;e[4]!==n?(c=n("decoServe.readOnly.tooltip"),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==c?(u=a.jsx(Pt,{side:"bottom",className:"max-w-xs",children:a.jsx(Hr,{text:c})}),e[6]=c,e[7]=u):u=e[7];let h;return e[8]!==i||e[9]!==u?(h=a.jsxs(wt,{children:[i,u]}),e[8]=i,e[9]=u,e[10]=h):h=e[10],h}function Yc(t){const e=!t.hasEntity&&!t.servingLocally,s=t.hasEntity&&!t.localPreview&&!t.tunnelUndecided&&!t.servingLocally&&t.showsRepositoryActions;return{hidden:e,localFiles:!e&&t.servingLocally,draftSelect:!e&&t.hasEntity,publish:e||!s?null:t.runtime==="cms"?"cms":"code"}}function Jd(t){const e=M.c(2),{blocksOnly:s}=t;let r;return e[0]!==s?(r=s?a.jsx(Zc,{}):a.jsx(Ia,{}),e[0]=s,e[1]=r):r=e[1],r}function Zc(){const t=M.c(2),e=Or(xi());let s;return t[0]!==e?(s=Al(e)?a.jsx(ya,{value:!1,children:a.jsx(Ia,{})}):null,t[0]=e,t[1]=s):s=t[1],s}function Ia(){const t=M.c(32),e=Vt(),{org:s}=js(),r=dn(e?.virtualMcpId),n=e?.currentBranch??null,o=un(r?.id).runtime,{url:d,undecided:l}=xr(r?.id),{connection:i}=vr(r?.id??e?.virtualMcpId),c=r?.id??e?.virtualMcpId,u=!!r,h=!!i,m=!!d,b=!!l;let f;t[0]!==r||t[1]!==o||t[2]!==u||t[3]!==h||t[4]!==m||t[5]!==b?(f=Yc({hasEntity:u,servingLocally:h,localPreview:m,tunnelUndecided:b,showsRepositoryActions:!!r&&Nl(r),runtime:o}),t[0]=r,t[1]=o,t[2]=u,t[3]=h,t[4]=m,t[5]=b,t[6]=f):f=t[6];const p=f;if(!c||p.hidden)return null;let x;t[7]!==n||t[8]!==c?(x=a.jsx(Wc,{virtualMcpId:c,branch:n}),t[7]=n,t[8]=c,t[9]=x):x=t[9];let g;t[10]!==n||t[11]!==p.localFiles||t[12]!==c?(g=p.localFiles&&a.jsx(Xc,{virtualMcpId:c,branch:n}),t[10]=n,t[11]=p.localFiles,t[12]=c,t[13]=g):g=t[13];let P;t[14]!==n||t[15]!==s||t[16]!==p.localFiles||t[17]!==c?(P=p.localFiles&&a.jsx(Gc,{orgSlug:s.slug,virtualMcpId:c,branch:n}),t[14]=n,t[15]=s,t[16]=p.localFiles,t[17]=c,t[18]=P):P=t[18];let y;t[19]!==n||t[20]!==r||t[21]!==p.draftSelect?(y=r&&p.draftSelect&&a.jsx("div",{className:"flex min-w-0 shrink items-center justify-end",children:a.jsx(Ui,{virtualMcp:r,currentBranch:n})}),t[19]=n,t[20]=r,t[21]=p.draftSelect,t[22]=y):y=t[22];let v;t[23]!==r||t[24]!==p.publish?(v=r&&p.publish&&a.jsxs(a.Fragment,{children:[a.jsx(qa,{orientation:"vertical",className:"mx-1 data-[orientation=vertical]:h-4"}),a.jsx("div",{className:"flex shrink-0 items-center justify-end gap-1",children:p.publish==="cms"?a.jsx(Ic,{virtualMcpId:r.id}):a.jsx(Vc,{virtualMcpId:r.id})})]}),t[23]=r,t[24]=p.publish,t[25]=v):v=t[25];let j;return t[26]!==x||t[27]!==g||t[28]!==P||t[29]!==y||t[30]!==v?(j=a.jsxs(a.Fragment,{children:[x,g,P,y,v]}),t[26]=x,t[27]=g,t[28]=P,t[29]=y,t[30]=v,t[31]=j):j=t[31],j}export{Jd as S};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-site-editor-BML41A1E.js","assets/index-ifZGovK1.js","assets/index-EoMx4WDO.css","assets/chat-context-DXm8btNS.js","assets/use-panel-navigate-Bghh8kV3.js","assets/thread-route-C7RSGMhP.js","assets/use-project-scope-DH5nL_oD.js","assets/repository-binding-DtIeSvDY.js","assets/use-mcp-client-D1kFCZ4v.js","assets/auth-C_nDagDA.js","assets/autosend-xoWUmECR.js","assets/thread-intent-7GmQH5mt.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-BoG6Bqps.js","assets/task-board-BrTYr-oE.js","assets/schema-Cn4x5iT-.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-Cp8NaBPU.js","assets/use-ai-providers-CAt_9H4n.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-laAOR3Cm.js","assets/site-draft-actions-Dpnw67Ug.js","assets/separator-Bk_a4cod.js","assets/use-content-sync-D_qyLHCv.js","assets/sandbox-url-D3mC8qhT.js","assets/index-j4NUsiRT.js","assets/ArrowUp-EL0FBv9C.js","assets/tool-namespace-DIE_8J9o.js","assets/tooltip-gMeEuHtO.js","assets/index-DNa7Epd0.js","assets/drawer-0sYDH2mt.js","assets/collection-search--9d0M5sc.js","assets/SearchMd-Cp6J-1Iu.js","assets/use-mobile-CKoO3XSk.js","assets/use-mcp-prompts-wKDmQlGB.js","assets/usage-stats-BecGIkLk.js","assets/form-D4PspedZ.js","assets/label-Dhoh3DcI.js","assets/utils-CVEq3hMx.js","assets/markdown-prFeEkT4.js","assets/use-copy-Cn8Org7G.js","assets/Copy01-OBSYmimV.js","assets/ZoomOut-DytgoG2i.js","assets/agent-icon--EtIPqub.js","assets/AlertCircle-CUAx3A4b.js","assets/Tool01-BsK9c3-e.js","assets/ArrowLeft-BWCsylYe.js","assets/LinkBroken01-DcsqjBuj.js","assets/ShoppingBag01-aJuRSlBz.js","assets/Building02-PifDTlhb.js","assets/CheckCircle-CMGqXocs.js","assets/ChevronUp-x46FJEcD.js","assets/ChevronSelectorVertical-BSRBjpBn.js","assets/UserSquare-BBEl_BxL.js","assets/CreditCard01-DWsSThAm.js","assets/DotsVertical-jkvtcdek.js","assets/Image01-BCnLFq1D.js","assets/Globe04-blkS_Kfg.js","assets/SwitchHorizontal01-B5WFt7_0.js","assets/Key01-CG7Kua6O.js","assets/Link01-8aKNfNRw.js","assets/Minus-B38cW2ZC.js","assets/Monitor01-DQEkUL3d.js","assets/Sun-k4hypx5Q.js","assets/Play-Ns9aRVTY.js","assets/Plus-vkM1FxVr.js","assets/Trash01-Z1ezoy3S.js","assets/Upload01-B3-nlnKa.js","assets/User01-C2Sw39bs.js","assets/Users01-DMFeioyM.js","assets/XClose-BdwIxxCT.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/input-DIcILgWd.js","assets/icon-button-HZwQKD3a.js","assets/file-type-icon-DHFVwXjA.js","assets/shell-layout-U7D4A6nk.js","assets/avatar-DHKJiyOX.js","assets/use-clock-tick-DflKMAWl.js","assets/command-BlBQgQPI.js","assets/index-BCHFFeZZ.js","assets/integration-icon-D1aQLe0v.js","assets/project-icon-ZadU5ZjL.js","assets/new-project-dialog-DFsG79bb.js","assets/repository-import-picker-C2sQ94O1.js","assets/use-navigate-to-agent-DLX1nkvn.js","assets/repository-picker-BXaWFfDW.js","assets/useInfiniteQuery-wCORGPw3.js","assets/infiniteQueryObserver-DvmMaiCa.js","assets/use-debounced-value-c5JdkW89.js","assets/required-auth-layout-4jyUcmCy.js","assets/use-org-sso-B_zXOLDA.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-WGnppXw7.js","assets/select-DUEGSJco.js","assets/index-BdQq_4o_.js","assets/tabs-C7f3nqQx.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-D8w-JIDW.js","assets/toggle-group-CXUKmPFr.js","assets/use-open-billing-url-C5lEsbaH.js","assets/index-B32YFtAw.js","assets/checkbox-vFQy8MvV.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-DaReiQzV.js","assets/input-BeDIlaby.js","assets/suggestion-BNEVVm5c.js","assets/use-org-fs-49a1bhbu.js","assets/question-004-sINsf4GQ.js","assets/use-members-0ZBHc0S5.js","assets/use-org-auth-client-t4l-TKT1.js","assets/feature-paywall-hsFyGLR_.js","assets/plan-ladder-BKLU8eo8.js","assets/add-connection-dialog-F6QQAEZv.js","assets/extract-connection-data-CBAyhzk-.js","assets/metadata-D72DunRR.js","assets/connection-Bo3v2rj5.js","assets/url-slug-D37s8EDd.js","assets/connection-card-DMfcnulT.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-Bbbnnl4r.js","assets/use-connection-CBKH8IwL.js","assets/schema-Dvc5tPTN.js","assets/connection-form-helpers-A3QfJozi.js","assets/authenticate-and-persist-oauth-CpcQdSQ-.js","assets/mcp-oauth-CNKUkWMd.js","assets/mcp-oauth-CTJ5Iw4i.js","assets/collection-tabs-BfpnVdlQ.js","assets/badge-ux-RK1YK.js","assets/use-infinite-scroll-Cuyf7850.js","assets/useSuspenseInfiniteQuery-JvpRoEFG.js","assets/use-task-board-events-BARWSwfj.js","assets/use-chat-layout-state-24wCHq_-.js","assets/input-Bwd_JSM8.css","assets/pair-Ck7rgrik.js","assets/collapsible-CnlVGt-G.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-fHjuxWIZ.js","assets/types-CHFSNT7a.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-Dhe0uPV2.js","assets/use-thread-outputs-CoFWg3_v.js","assets/experiments-tab-choice-CMHPX5ZC.js","assets/utils-CduIoZ0d.js","assets/sandbox-git-api-CH_-QFpD.js","assets/toolbar-icon-button-DzJeqLa2.js","assets/alert-dialog-C-DaggA1.js","assets/use-releases-G0pirYfu.js","assets/serial-task-queue-CGOeQgpr.js","assets/virtual-mcp-Xd6PvE5_.js","assets/use-fast-preview-draft-url-CSz1rYUo.js","assets/section-preview-url-7zfngvgW.js","assets/parse-sections-YhOUxu7l.js","assets/alert-BDbwlXZm.js","assets/named-rule-uses-Mu_Msc9v.js","assets/device-hint-SeLRi17j.js","assets/editor-BctLuJLS.js","assets/hosted-publish-api-CK3ZnEoi.js","assets/hosted-publish-feedback-BG4t8HgW.js","assets/save-changes-debug-nBi-n9eV.js","assets/sandbox-lifecycle-context-DdMgF1Lv.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/index-BjrJaWD9.js","assets/use-sidebar-collapsed-CuPY8XXm.js","assets/resizable-CQyxQjcn.js","assets/agent-site-editor-DDGTF8rc.css","assets/agent-site-editor-content-Bt6vrV5b.js","assets/agent-view-guard-BuPewEB-.js","assets/use-main-panel-tabs-CVsgtXg7.js","assets/use-mcp-tools-I-kpM305.js","assets/resolve-tab-icon-56O81FJc.js","assets/use-task-metadata-Dd-9Qkoq.js","assets/preview-source-BsRLGWUP.js","assets/use-project-native-view-presence-C3Vtd78t.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-DW0hmZjE.js","assets/site-slug-DebpOoQq.js","assets/feature-gate-DQ0ZaDj1.js","assets/content-tab-CaoAhPSw.js","assets/blocks-tab-states-Chq5j0oT.js","assets/slider-CLUaEqdg.js","assets/index-Bxkd37dZ.js","assets/tooltipContext-BQS7kWxi.js","assets/CategoricalChart-QwBn7EzX.js","assets/index-gqp4B5qj.js","assets/ActiveShapeUtils-CHmxGMIj.js","assets/Sector-BeXkYaJv.js","assets/symbol-BQLM2_V8.js","assets/empty-state-D6RWdvUz.js","assets/runnable-block-editor-CqYgijVY.js","assets/switch-ByCU93P4.js","assets/scroll-area-9wUBmncr.js","assets/monaco-editor-Wx_2qGOP.js","assets/calendar-qN6CeKGa.js","assets/editor-classes-BnPaf--r.js","assets/core.esm-DJ5llHMe.js","assets/sortable.esm-CkqHW6-y.js","assets/combobox-BMxhMbUn.js","assets/search-input-1DLvCYgl.js","assets/asset-utils-Cb8p2lKk.js","assets/mustache-BzHjgnm5.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-Dm4etxGk.js","assets/empty-state-DeArX05X.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{k as O,l as V,m as H}from"./named-rule-view-CN2yeHp5.js";import{h as N}from"./named-rule-uses-Mu_Msc9v.js";import{aY as A,b9 as L}from"./parse-sections-YhOUxu7l.js";import{aX as y,c as _,b as T,a2 as U,j as c,n as F}from"./index-ifZGovK1.js";import{E as B}from"./empty-state-DeArX05X.js";import{u as K}from"./chat-context-DXm8btNS.js";import{u as M,l as $}from"./use-content-sync-D_qyLHCv.js";import{i as q,u as Q,S as G}from"./blocks-tab-states-Chq5j0oT.js";import{a as X}from"./use-panel-navigate-Bghh8kV3.js";const P={running:0,everyone:1,off:2};function ae(s,e){const i=A(s,"experiments");if(i.kind==="conflict")return[];const o=e?.published??null;return Object.entries(i.values).map(([n,l],a)=>{const m=O(o,"experiments",n,l),x=m==="changed"?V(o,"experiments",n):void 0;return{order:a,row:{name:n,share:l,status:L(l),uses:e?N(e,"experiments",n):0,entryState:m,...x!==void 0?{publishedShare:x}:{}}}}).sort((n,l)=>P[n.row.status]-P[l.row.status]||n.order-l.order).map(n=>n.row)}function ce(s,e){return H(s,e?.published??null,"experiments")}function de(s){const e={contentPageVariant:s.focus?.pageVariant,contentSection:s.focus?.section,contentVariant:s.focus?.variant};return s.blockKind==="page"?{contentPageId:s.blockKey,contentCollection:void 0,contentItem:void 0,...e}:{contentPageId:void 0,contentCollection:"sections",contentItem:s.blockKey,...e}}let I=null;function Y(){return I??=Promise.all([y(()=>import("./agent-site-editor-BML41A1E.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166])),y(()=>import("./agent-site-editor-content-Bt6vrV5b.js"),__vite__mapDeps([167,1,2,168,169,133,5,4,6,7,8,9,11,12,13,14,15,16,17,44,45,46,27,47,48,49,43,50,51,52,53,54,42,55,56,57,58,59,60,61,62,63,64,65,66,33,67,68,69,70,71,122,170,139,39,143,26,3,10,18,19,20,21,25,28,29,30,31,32,34,35,36,37,38,40,41,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,123,124,125,126,127,128,129,130,131,132,134,135,136,137,138,140,141,142,171,172,173,174,175,176,177,150,178,179,180,181,182,183,184,185,186,187,188,153,154,24,144,145,189,190,162,191,192,193,157,194,195,196,197,198,147,199,200,201,161,202,203,204]))]).catch(s=>{throw I=null,s}),I}function z(s){return e=>{if(!e)return;const i=()=>{s().catch(()=>{})};if(typeof requestIdleCallback=="function"){const t=requestIdleCallback(i,{timeout:2e3});return()=>cancelIdleCallback(t)}const o=setTimeout(i,200);return()=>clearTimeout(o)}}const J=z(Y);function R(s){const e=_.c(7),{icon:i,title:o,description:t,action:n}=s;let l;e[0]!==n?(l=n?{children:n.label,onClick:n.onClick}:void 0,e[0]=n,e[1]=l):l=e[1];let a;return e[2]!==t||e[3]!==i||e[4]!==l||e[5]!==o?(a=c.jsx(F,{children:c.jsx(F.Content,{children:c.jsx(F.Container,{children:c.jsx(B,{icon:i,title:o,description:t,buttonProps:l})})})}),e[2]=t,e[3]=i,e[4]=l,e[5]=o,e[6]=a):a=e[6],a}function ue(s){const e=_.c(28),{virtualMcpId:i,icon:o,copy:t,skeleton:n,children:l}=s,a=T(),{org:m}=U(),x=K(),p=x?.currentBranch??null,g=M(i,p),{openPanel:k}=X();if(!p){const r=t.noDraftTitle,v=t.noDraftDesc;let d;e[0]!==a?(d=a("sectionsEditor.namedRules.openEditor"),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==k?(u=()=>k("content"),e[2]=k,e[3]=u):u=e[3];let f;e[4]!==d||e[5]!==u?(f={label:d,onClick:u},e[4]=d,e[5]=u,e[6]=f):f=e[6];let b;return e[7]!==t.noDraftDesc||e[8]!==t.noDraftTitle||e[9]!==o||e[10]!==f?(b=c.jsx(R,{icon:o,title:r,description:v,action:f}),e[7]=t.noDraftDesc,e[8]=t.noDraftTitle,e[9]=o,e[10]=f,e[11]=b):b=e[11],b}if(q(g)){let r;return e[12]===Symbol.for("react.memo_cache_sentinel")?(r=c.jsx(G,{}),e[12]=r):r=e[12],r}if(g.kind==="pending"){let r;return e[13]!==n?(r=c.jsx(c.Fragment,{children:n}),e[13]=n,e[14]=r):r=e[14],r}if(g.kind!=="protocol"){let r;return e[15]!==t.loadFailed||e[16]!==t.loadFailedHint||e[17]!==o?(r=c.jsx(R,{icon:o,title:t.loadFailed,description:t.loadFailedHint}),e[15]=t.loadFailed,e[16]=t.loadFailedHint,e[17]=o,e[18]=r):r=e[18],r}const S=x?.taskId??null;let h;return e[19]!==p||e[20]!==l||e[21]!==t||e[22]!==o||e[23]!==m.slug||e[24]!==n||e[25]!==S||e[26]!==i?(h=c.jsx(W,{orgSlug:m.slug,virtualMcpId:i,branch:p,threadId:S,icon:o,copy:t,skeleton:n,children:l},p),e[19]=p,e[20]=l,e[21]=t,e[22]=o,e[23]=m.slug,e[24]=n,e[25]=S,e[26]=i,e[27]=h):h=e[27],h}function W(s){const e=_.c(30),{orgSlug:i,virtualMcpId:o,branch:t,threadId:n,icon:l,copy:a,skeleton:m,children:x}=s,p=T();let g;e[0]!==t||e[1]!==i||e[2]!==n||e[3]!==o?(g={orgSlug:i,virtualMcpId:o,branch:t,threadId:n,previewUrl:null},e[0]=t,e[1]=i,e[2]=n,e[3]=o,e[4]=g):g=e[4];const k=g,S=$(k),h=Q(k),r=S.data,v=h.data;if(!r||!v){if(S.isError||h.isError){const b=a.loadFailed,w=a.loadFailedHint;let E;e[5]!==p?(E=p("sectionsEditor.namedRules.tryAgain"),e[5]=p,e[6]=E):E=e[6];let C;e[7]!==S||e[8]!==h?(C=()=>{S.refetch(),h.refetch()},e[7]=S,e[8]=h,e[9]=C):C=e[9];let D;e[10]!==E||e[11]!==C?(D={label:E,onClick:C},e[10]=E,e[11]=C,e[12]=D):D=e[12];let j;return e[13]!==a.loadFailed||e[14]!==a.loadFailedHint||e[15]!==l||e[16]!==D?(j=c.jsx(R,{icon:l,title:b,description:w,action:D}),e[13]=a.loadFailed,e[14]=a.loadFailedHint,e[15]=l,e[16]=D,e[17]=j):j=e[17],j}let f;return e[18]!==m?(f=c.jsx(c.Fragment,{children:m}),e[18]=m,e[19]=f):f=e[19],f}let d;e[20]!==t||e[21]!==x||e[22]!==r||e[23]!==v||e[24]!==i||e[25]!==n||e[26]!==o?(d=x({orgSlug:i,virtualMcpId:o,branch:t,threadId:n,decofile:r,meta:v}),e[20]=t,e[21]=x,e[22]=r,e[23]=v,e[24]=i,e[25]=n,e[26]=o,e[27]=d):d=e[27];let u;return e[28]!==d?(u=c.jsx("div",{className:"contents",ref:J,children:d}),e[28]=d,e[29]=u):u=e[29],u}export{ue as S,R as a,de as c,ae as e,ce as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as u,r as g,j as n,F,Z as G,_ as H,a as E,k as P,b as O,n as y,L as M}from"./index-ifZGovK1.js";import{C as V}from"./chat-context-DXm8btNS.js";import{C as x}from"./index-BjrJaWD9.js";import{L}from"./index-DgfcOEet.js";import{B as K}from"./blocks-preview-workspace-context-CCLLqfhM.js";import{e as T,p as W,s as J,a as U,r as z,T as $,u as R,b as Z}from"./use-content-sync-D_qyLHCv.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-CzS9kIxI.js";import{C as Y}from"./content-tab-CaoAhPSw.js";import{T as tt}from"./tab-icon-glyph-Cz_BoFAU.js";import{r as et}from"./resolve-tab-icon-56O81FJc.js";import ot from"./agent-site-editor-BML41A1E.js";import"./use-panel-navigate-Bghh8kV3.js";import"./thread-route-C7RSGMhP.js";import"./use-project-scope-DH5nL_oD.js";import"./repository-binding-DtIeSvDY.js";import"./use-mcp-client-D1kFCZ4v.js";import"./auth-C_nDagDA.js";import"./autosend-xoWUmECR.js";import"./thread-intent-7GmQH5mt.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BoG6Bqps.js";import"./task-board-BrTYr-oE.js";import"./schema-Cn4x5iT-.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-Cp8NaBPU.js";import"./use-ai-providers-CAt_9H4n.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-laAOR3Cm.js";import"./use-mobile-CKoO3XSk.js";import"./use-sidebar-collapsed-CuPY8XXm.js";import"./use-chat-layout-state-24wCHq_-.js";import"./agent-icon--EtIPqub.js";import"./AlertCircle-CUAx3A4b.js";import"./Tool01-BsK9c3-e.js";import"./ArrowUp-EL0FBv9C.js";import"./ArrowLeft-BWCsylYe.js";import"./LinkBroken01-DcsqjBuj.js";import"./ShoppingBag01-aJuRSlBz.js";import"./ZoomOut-DytgoG2i.js";import"./Building02-PifDTlhb.js";import"./CheckCircle-CMGqXocs.js";import"./ChevronUp-x46FJEcD.js";import"./ChevronSelectorVertical-BSRBjpBn.js";import"./UserSquare-BBEl_BxL.js";import"./Copy01-OBSYmimV.js";import"./CreditCard01-DWsSThAm.js";import"./DotsVertical-jkvtcdek.js";import"./Image01-BCnLFq1D.js";import"./Globe04-blkS_Kfg.js";import"./SwitchHorizontal01-B5WFt7_0.js";import"./Key01-CG7Kua6O.js";import"./Link01-8aKNfNRw.js";import"./Minus-B38cW2ZC.js";import"./Monitor01-DQEkUL3d.js";import"./Sun-k4hypx5Q.js";import"./Play-Ns9aRVTY.js";import"./Plus-vkM1FxVr.js";import"./SearchMd-Cp6J-1Iu.js";import"./Trash01-Z1ezoy3S.js";import"./Upload01-B3-nlnKa.js";import"./User01-C2Sw39bs.js";import"./Users01-DMFeioyM.js";import"./XClose-BdwIxxCT.js";import"./tooltip-gMeEuHtO.js";import"./index-DNa7Epd0.js";import"./toolbar-icon-button-DzJeqLa2.js";import"./shell-layout-U7D4A6nk.js";import"./avatar-DHKJiyOX.js";import"./use-clock-tick-DflKMAWl.js";import"./command-BlBQgQPI.js";import"./index-BCHFFeZZ.js";import"./integration-icon-D1aQLe0v.js";import"./project-icon-ZadU5ZjL.js";import"./new-project-dialog-DFsG79bb.js";import"./label-Dhoh3DcI.js";import"./repository-import-picker-C2sQ94O1.js";import"./use-navigate-to-agent-DLX1nkvn.js";import"./repository-picker-BXaWFfDW.js";import"./useInfiniteQuery-wCORGPw3.js";import"./infiniteQueryObserver-DvmMaiCa.js";import"./collection-search--9d0M5sc.js";import"./use-debounced-value-c5JdkW89.js";import"./required-auth-layout-4jyUcmCy.js";import"./use-org-sso-B_zXOLDA.js";import"./sheet-Dhe0uPV2.js";import"./resizable-CQyxQjcn.js";import"./core.esm-DJ5llHMe.js";import"./sortable.esm-CkqHW6-y.js";import"./context-menu-BD833dh0.js";import"./create-organization-dialog-nhhaUNZK.js";import"./alert-dialog-C-DaggA1.js";import"./form-D4PspedZ.js";import"./project-apps-CG2eY1ZZ.js";import"./use-recent-apps-D6yVH6-8.js";import"./sandbox-url-D3mC8qhT.js";import"./index-j4NUsiRT.js";import"./tool-namespace-DIE_8J9o.js";import"./drawer-0sYDH2mt.js";import"./use-mcp-prompts-wKDmQlGB.js";import"./usage-stats-BecGIkLk.js";import"./utils-CVEq3hMx.js";import"./markdown-prFeEkT4.js";import"./use-copy-Cn8Org7G.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-DIcILgWd.js";import"./icon-button-HZwQKD3a.js";import"./file-type-icon-DHFVwXjA.js";import"./chat-draft-WGnppXw7.js";import"./select-DUEGSJco.js";import"./index-BdQq_4o_.js";import"./tabs-C7f3nqQx.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-D8w-JIDW.js";import"./toggle-group-CXUKmPFr.js";import"./use-open-billing-url-C5lEsbaH.js";import"./index-B32YFtAw.js";import"./checkbox-vFQy8MvV.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DaReiQzV.js";import"./input-BeDIlaby.js";import"./suggestion-BNEVVm5c.js";import"./use-org-fs-49a1bhbu.js";import"./question-004-sINsf4GQ.js";import"./use-members-0ZBHc0S5.js";import"./use-org-auth-client-t4l-TKT1.js";import"./feature-paywall-hsFyGLR_.js";import"./plan-ladder-BKLU8eo8.js";import"./add-connection-dialog-F6QQAEZv.js";import"./extract-connection-data-CBAyhzk-.js";import"./metadata-D72DunRR.js";import"./connection-Bo3v2rj5.js";import"./url-slug-D37s8EDd.js";import"./connection-card-DMfcnulT.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Bbbnnl4r.js";import"./use-connection-CBKH8IwL.js";import"./schema-Dvc5tPTN.js";import"./connection-form-helpers-A3QfJozi.js";import"./authenticate-and-persist-oauth-CpcQdSQ-.js";import"./mcp-oauth-CNKUkWMd.js";import"./mcp-oauth-CTJ5Iw4i.js";import"./collection-tabs-BfpnVdlQ.js";import"./badge-ux-RK1YK.js";import"./use-infinite-scroll-Cuyf7850.js";import"./useSuspenseInfiniteQuery-JvpRoEFG.js";import"./use-task-board-events-BARWSwfj.js";import"./pair-Ck7rgrik.js";import"./collapsible-CnlVGt-G.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-fHjuxWIZ.js";import"./types-CHFSNT7a.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-CoFWg3_v.js";import"./experiments-tab-choice-CMHPX5ZC.js";import"./utils-CduIoZ0d.js";import"./sandbox-git-api-CH_-QFpD.js";import"./runnable-block-editor-CqYgijVY.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./parse-sections-YhOUxu7l.js";import"./alert-BDbwlXZm.js";import"./switch-ByCU93P4.js";import"./blocks-tab-states-Chq5j0oT.js";import"./slider-CLUaEqdg.js";import"./index-Bxkd37dZ.js";import"./tooltipContext-BQS7kWxi.js";import"./CategoricalChart-QwBn7EzX.js";import"./index-gqp4B5qj.js";import"./ActiveShapeUtils-CHmxGMIj.js";import"./Sector-BeXkYaJv.js";import"./symbol-BQLM2_V8.js";import"./empty-state-D6RWdvUz.js";import"./scroll-area-9wUBmncr.js";import"./monaco-editor-Wx_2qGOP.js";import"./editor-BctLuJLS.js";import"./calendar-qN6CeKGa.js";import"./editor-classes-BnPaf--r.js";import"./combobox-BMxhMbUn.js";import"./search-input-1DLvCYgl.js";import"./use-file-configs-DW0hmZjE.js";import"./asset-utils-Cb8p2lKk.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-lifecycle-context-DdMgF1Lv.js";import"./variant-draft-pointer-HWAlFj6Z.js";import"./section-preview-url-7zfngvgW.js";import"./use-fast-preview-draft-url-CSz1rYUo.js";import"./useQueries-_Urb_S-y.js";import"./device-hint-SeLRi17j.js";import"./releases-api-q3AffL1J.js";import"./hosted-publish-api-CK3ZnEoi.js";import"./virtual-mcp-Xd6PvE5_.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-Dd-9Qkoq.js";import"./mustache-BzHjgnm5.js";import"./date-utils-CrvIKg-s.js";import"./use-move-blocks-Dm4etxGk.js";import"./empty-state-DeArX05X.js";import"./site-draft-actions-Dpnw67Ug.js";import"./separator-Bk_a4cod.js";import"./use-releases-G0pirYfu.js";import"./serial-task-queue-CGOeQgpr.js";import"./named-rule-uses-Mu_Msc9v.js";import"./hosted-publish-feedback-BG4t8HgW.js";import"./save-changes-debug-nBi-n9eV.js";function I(e){return e.kind==="unavailable"&&e.source==="local"&&(e.problem?.reason??"not-answering")==="not-answering"}const it=e=>e;function rt(e){const t=u.c(10),{candidates:o,invalidLink:c,shell:m,editor:i}=e,r=c===void 0?!1:c,s=m===void 0?it:m,[p,l]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==i?(h=i(p,f),t[1]=p,t[2]=i,t[3]=h):h=t[3],h}let a;t[4]!==o||t[5]!==r?(a=n.jsx(nt,{candidates:o,invalidLink:r,onConnect:l}),t[4]=o,t[5]=r,t[6]=a):a=t[6];let d;return t[7]!==s||t[8]!==a?(d=s(a),t[7]=s,t[8]=a,t[9]=d):d=t[9],d}function nt(e){const t=u.c(17),{candidates:o,invalidLink:c,onConnect:m}=e,i=c===void 0?!1:c,[r]=F(),{language:s}=r;let p;t[0]!==m?(p=D=>m({endpoint:D}),t[0]=m,t[1]=p):p=t[1];let l;t[2]!==o||t[3]!==p?(l={candidates:o,onFound:p},t[2]=o,t[3]=p,t[4]=l):l=t[4];const a=q(l),{state:d,access:f,needsGesture:h}=a;let k;t[5]!==o||t[6]!==s?(k=new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(o.map(T)),t[5]=o,t[6]=s,t[7]=k):k=t[7];const C=k;let j;t[8]!==f||t[9]!==a.start||t[10]!==h||t[11]!==d?(j=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:a.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=a.start,t[10]=h,t[11]=d,t[12]=j):j=t[12];const _=j;let S;return t[13]!==C||t[14]!==i||t[15]!==_?(S=n.jsx(B,{wait:_,hosts:C,invalidLink:i}),t[13]=C,t[14]=i,t[15]=_,t[16]=S):S=t[16],S}const v="deco-serve",w="working-tree",st={id:"",slug:"",name:"",logo:null},mt={id:v,slug:v},pt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function at(){const e=window.location.hash,t=new URLSearchParams(e.replace(/^#/,"")).has("endpoint"),o=t?W(e):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),o&&J(o),{candidates:U(o,z()),invalidLink:t&&!o}}const ct=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function lt(){const e=u.c(6),t=O();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:dt},e[0]=o):o=e[0];const c=P(o);let m;e[1]!==t||e[2]!==c?(m=ct.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(M,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(tt,{icon:et({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),e[1]=t,e[2]=c,e[3]=m):m=e[3];let i;return e[4]!==m?(i=n.jsx(y.Tabs,{children:m}),e[4]=m,e[5]=i):i=e[5],i}function dt(e){return e.matches.at(-1)?.staticData.siteEditorView}function N(e){const t=u.c(14),{children:o}=e,c=O(),{connection:m}=Z(v),i=R(v,w);let r,s;if(t[0]!==i||t[1]!==o||t[2]!==m||t[3]!==c){s=Symbol.for("react.early_return_sentinel");t:{if(r=m?T(m.endpoint):"",i.kind==="protocol"){s=o;break t}if(i.kind!=="unavailable"||I(i)){s=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=i,t[1]=o,t[2]=m,t[3]=c,t[4]=r,t[5]=s}else r=t[4],s=t[5];if(s!==Symbol.for("react.early_return_sentinel"))return s;let p;t[6]!==i.problem?(p=i.problem??{reason:"not-answering"},t[6]=i.problem,t[7]=p):p=t[7];let l;t[8]!==r||t[9]!==p?(l={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==l?(a=n.jsx(B,{wait:l,hosts:r}),t[11]=r,t[12]=l,t[13]=a):a=t[13],a}function ut(e){const t=u.c(6),{onLost:o}=e,c=R(v,w);let m;t[0]!==c?(m=I(c),t[0]=c,t[1]=m):m=t[1];const i=m;let r,s;return t[2]!==i||t[3]!==o?(r=()=>{i&&o()},s=[i,o],t[2]=i,t[3]=o,t[4]=r,t[5]=s):(r=t[4],s=t[5]),g.useEffect(r,s),null}const A={threadOpen:!1,contentOpen:!0,threadVisibilityExplicit:!1,toggleThread:()=>{},toggleContent:()=>{}};function ft(){const e=u.c(11),{data:t}=E.useSession();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={select:ht},e[0]=o):o=e[0];const c=P(o),m=!!t?.user;let i;e[1]!==m?(i={rail:m},e[1]=m,e[2]=i):i=e[2];const r=c??"preview";let s,p,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(lt,{}),p=n.jsx(x.Thread,{children:null}),l=n.jsx(ot,{}),e[3]=s,e[4]=p,e[5]=l):(s=e[3],p=e[4],l=e[5]);let a;e[6]!==r?(a=n.jsx(L.Content,{children:n.jsxs(x,{...A,threadless:!0,contentKey:r,contentNavigation:s,children:[p,l]})}),e[6]=r,e[7]=a):a=e[7];let d;return e[8]!==i||e[9]!==a?(d=n.jsx(L,{outsideOrg:i,children:a}),e[8]=i,e[9]=a,e[10]=d):d=e[10],d}function ht(e){return e.matches.at(-1)?.staticData.siteEditorView}function vt(e){const t=u.c(8),{children:o}=e,{data:c}=E.useSession(),m=!!c?.user;let i;t[0]!==m?(i={rail:m},t[0]=m,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(x.Thread,{children:null}),t[2]=r):r=t[2];let s;t[3]!==o?(s=n.jsx(L.Content,{children:n.jsxs(x,{...A,threadless:!0,contentKey:"guide",children:[r,n.jsx(x.Content,{children:o})]})}),t[3]=o,t[4]=s):s=t[4];let p;return t[5]!==i||t[6]!==s?(p=n.jsx(L,{outsideOrg:i,children:s}),t[5]=i,t[6]=s,t[7]=p):p=t[7],p}const b=()=>{},xt={connection:null,set:b,clear:b};function cr(){const e=u.c(3),[t]=g.useState(at);let o;return e[0]!==t.candidates||e[1]!==t.invalidLink?(o=n.jsx(G,{value:!0,children:n.jsx(H,{org:st,project:mt,children:n.jsx(rt,{candidates:t.candidates,invalidLink:t.invalidLink,shell:jt,editor:kt})})}),e[0]=t.candidates,e[1]=t.invalidLink,e[2]=o):o=e[2],o}function kt(e,t){return n.jsxs($.Provider,{value:{connection:e,set:b,clear:b},children:[n.jsx(ut,{onLost:t}),n.jsx(V,{value:pt,children:n.jsx(K,{children:n.jsx(ft,{})})})]})}function jt(e){return n.jsx($.Provider,{value:xt,children:n.jsx(vt,{children:e})})}function lr(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(Q,{virtualMcpId:v})}),e[0]=t):t=e[0],t}function dr(){const e=u.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(Y,{virtualMcpId:v})}),e[0]=t):t=e[0],t}export{dr as SiteEditorContent,lr as SiteEditorPreview,cr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as te,a2 as se,o as ae,r as T,aa as ce,j as t,B as U,n as $,b2 as de,a3 as me,t as D,az as ue,c as ie,l as pe,X as ge,T as fe,V as he,U as xe,K as Q,eZ as je}from"./index-CaH7O3hJ.js";import{i as ke}from"./DotsVertical-BvwGTDkC.js";import{i as le,a as ve}from"./ZoomOut-BfQx-fBr.js";import{s as ye}from"./Trash01-D92WhXf2.js";import{i as Se}from"./Upload01-BSDy4f7m.js";import{S as be}from"./search-input-CXQLMhKZ.js";import{S as we}from"./search-toggle-DxUZFRWy.js";import{f as Ce,e as De,b as Ne,A as Pe,a as Ae,d as Ee,c as Te,g as Me}from"./alert-dialog-CKDHmJ-l.js";import{E as Y}from"./empty-state-Bok1L2hc.js";import{C as Oe}from"./collection-tabs-DIFXv7hR.js";import{p as Ie,S as ze,F as Fe}from"./folder-icon-qexQSaYN.js";import{h as Re,i as $e,r as _e}from"./use-org-fs-D_4Q985K.js";import{S as Le,H as Z,f as Be}from"./location-V0VwTJTt.js";import"./SearchMd-Cuf45jFP.js";import"./icon-button-CwrVRVUS.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./badge-Cnnepvq1.js";import"./markdown-CA3yd3L6.js";import"./use-copy-d7X6hrKI.js";import"./Copy01-DC8f0fwU.js";import"./use-mobile-DCpa1RnA.js";import"./use-panel-navigate-DoD4Atgz.js";import"./thread-route-CQ0phZyI.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./file-preview-DSIiiWjA.js";import"./utils-DzhKsxx8.js";import"./Image01-D7F4wuKx.js";import"./editor-BFHySd1K.js";import"./file-type-icon-DPqHd815.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";const J=200,Ke=new Set(["node_modules","__pycache__"]);function q(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function He(s){return q(s).split("/").every(e=>!e.startsWith(".")&&!Ke.has(e))}function Qe(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ue(s,e){const l=new Map;for(const r of s){const c=q(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function qe(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function Ge(s,e){const l=Ie(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,disableModelInvocation:l.disableModelInvocation,source:"home",volume:Z,path:r,sandboxPath:`${Le}/${Z}/${r}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:le}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?ue:ve}}function Xe(s){const e=ie.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=te(),{org:m}=se();let S;e[0]!==l.source||e[1]!==m.name?(S=re(l.source,m.name),e[0]=l.source,e[1]=m.name,e[2]=S):S=e[2];const{label:M,glyph:O}=S;let I;e[3]!==l?(I=B(l),e[3]=l,e[4]=I):I=e[4];const F=I,z=r?"opacity-60":"hover:bg-accent";let u;e[5]!==z?(u=pe("relative transition-colors group overflow-hidden flex flex-col h-full",z),e[5]=z,e[6]=u):u=e[6];let f;e[7]!==l.name||e[8]!==c||e[9]!==r?(f=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=f):f=e[10];const b=F?"default":"system",N=!F;let w;e[11]!==O||e[12]!==b||e[13]!==N?(w=t.jsx(Fe,{glyph:O,tone:b,readOnly:N,className:"size-8 shrink-0"}),e[11]=O,e[12]=b,e[13]=N,e[14]=w):w=e[14];let h;e[15]!==a||e[16]!==o?(h=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ge,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",children:t.jsx(ke,{size:16})})}),t.jsx(he,{align:"end",children:t.jsxs(xe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ye,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=h):h=e[17];let x;e[18]!==w||e[19]!==h?(x=t.jsxs("div",{className:"flex items-start justify-between",children:[w,h]}),e[18]=w,e[19]=h,e[20]=x):x=e[20];let j;e[21]!==l.name?(j=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=j):j=e[22];let C;e[23]!==l.description||e[24]!==o?(C=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=C):C=e[25];let k;e[26]!==C?(k=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:C}),e[26]=C,e[27]=k):k=e[27];let d;e[28]!==j||e[29]!==k?(d=t.jsxs("div",{className:"flex flex-col gap-1",children:[j,k]}),e[28]=j,e[29]=k,e[30]=d):d=e[30];let v;e[31]!==x||e[32]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,d]}),e[31]=x,e[32]=d,e[33]=v):v=e[33];let p;e[34]!==M||e[35]!==r||e[36]!==o?(p=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=p):p=e[37];let y;e[38]!==p?(y=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:p})})}),e[38]=p,e[39]=y):y=e[39];let g;e[40]!==v||e[41]!==y?(g=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,y]}),e[40]=v,e[41]=y,e[42]=g):g=e[42];let P;return e[43]!==r||e[44]!==g||e[45]!==u||e[46]!==f?(P=t.jsxs(je,{size:"flush","aria-busy":r,className:u,children:[f,g]}),e[43]=r,e[44]=g,e[45]=u,e[46]=f,e[47]=P):P=e[47],P}function ee(s){const e=ie.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Et(){const s=te(),{org:e}=se(),l=Re(),{remove:r,upload:c}=$e("home"),a=ae(),o=T.useRef(null),[m,S]=T.useState(""),M=ce(),[O,I]=T.useState(L),[F,z]=T.useState(!1),[u,f]=T.useState(null),[b,N]=T.useState(null),[w,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:Q.slashSkills(e.id)}),a.invalidateQueries({queryKey:Q.orgFsSkills(e.id)})},j=i=>a.setQueryData(Q.slashSkills(e.id),n=>i(n??[]));async function C(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const A=n[0]?.webkitRelativePath??"";if(!A){D.error(s("settings.skills.importNeedsFolder"));return}const H=A.split("/")[0]??"",_=n.filter(He),X=_.find(E=>q(E)==="SKILL.md");if(!X){D.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>J){D.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(J)}));return}const R=Qe(H),W=`skills/${R}`;let V=!1;z(!0);try{if(await _e(e.slug,"home",W)){D.error(s("settings.skills.importSlugTaken",{slug:R}));return}V=!0;const E=Ge(R,await X.text());j(oe=>[E,...oe]),h(E.id),await qe(Ue(_,R),c.mutateAsync),D.success(s("settings.skills.importSuccess",{name:R}))}catch(E){V&&await r.mutateAsync(W).catch(()=>{}),D.error(E instanceof Error?E.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=m.toLowerCase(),d=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),p=new Map;for(const i of d)p.set(i.source,(p.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:d.length},...[...v].map(i=>({id:i,label:re(i,e.name).label,count:p.get(i)??0}))],g=v.has(O)?O:L,P=g===L?d:d.filter(i=>i.source===g),K=i=>f(Be(i.volume,i.path)),ne=async()=>{if(!b)return;const{id:i,path:n}=b;N(null),j(A=>A.filter(H=>H.id!==i));try{await r.mutateAsync(n),D.success(s("settings.skills.deleteSuccess"))}catch(A){D.error(A instanceof Error?A.message:s("settings.skills.deleteError"))}finally{x()}},G=t.jsxs(U,{size:"sm",disabled:F,onClick:()=>o.current?.click(),children:[t.jsx(Se,{size:14}),s(F?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs($,{children:[t.jsx($.Content,{children:t.jsx($.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[M?t.jsx($.Actions,{secondary:t.jsx(we,{value:m,onChange:S,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:G}):t.jsx($.Title,{actions:G,children:s("settings.skills.pageTitle")}),t.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3 empty:hidden",children:!M&&t.jsx(be,{value:m,onChange:S,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(S(""),i.target.blur())}})}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{C(i.target.files)}}),y.length>2&&t.jsx(Oe,{placement:"page",tabs:y,activeTab:g,onTabChange:I}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(i,n)=>t.jsx(de,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(me,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(U,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):P.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:s(m?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:m?s("settings.skills.noResultsDescription",{search:m}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:P.map(i=>{const n=i.id===w;return t.jsx(Xe,{entry:i,pending:n,onOpen:()=>K(i),onDelete:B(i)&&!n?()=>N(i):void 0},i.id)})})})]})})}),u&&t.jsx(ze,{skillPath:u,onClose:()=>f(null)},u),t.jsx(Ce,{open:b!==null,onOpenChange:i=>!i&&N(null),children:t.jsxs(De,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(Ae,{children:s("settings.skills.deleteDialogDescription",{name:b?.name??""})})]}),t.jsxs(Ee,{children:[t.jsx(Te,{children:s("settings.skills.cancel")}),t.jsx(Me,{onClick:ne,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Et as default};
|
|
1
|
+
import{b as te,a2 as se,o as ae,r as T,aa as ce,j as t,B as U,n as $,b1 as de,a3 as me,t as D,az as ue,c as ie,l as pe,X as ge,T as fe,V as he,U as xe,K as Q,f0 as je}from"./index-ifZGovK1.js";import{i as ke}from"./DotsVertical-jkvtcdek.js";import{i as le,a as ve}from"./ZoomOut-DytgoG2i.js";import{s as ye}from"./Trash01-Z1ezoy3S.js";import{i as Se}from"./Upload01-B3-nlnKa.js";import{S as be}from"./search-input-1DLvCYgl.js";import{S as we}from"./search-toggle-BnK2KHqJ.js";import{f as Ce,e as De,b as Ne,A as Pe,a as Ae,d as Ee,c as Te,g as Me}from"./alert-dialog-C-DaggA1.js";import{E as Y}from"./empty-state-D6RWdvUz.js";import{C as Oe}from"./collection-tabs-BfpnVdlQ.js";import{p as Ie,S as ze,F as Fe}from"./folder-icon-BwmfzM1C.js";import{h as Re,i as $e,r as _e}from"./use-org-fs-49a1bhbu.js";import{S as Le,H as J,f as Be}from"./location-V0VwTJTt.js";import"./SearchMd-Cp6J-1Iu.js";import"./icon-button-HZwQKD3a.js";import"./tooltip-gMeEuHtO.js";import"./index-DNa7Epd0.js";import"./badge-ux-RK1YK.js";import"./markdown-prFeEkT4.js";import"./use-copy-Cn8Org7G.js";import"./Copy01-OBSYmimV.js";import"./use-mobile-CKoO3XSk.js";import"./use-panel-navigate-Bghh8kV3.js";import"./thread-route-C7RSGMhP.js";import"./use-project-scope-DH5nL_oD.js";import"./repository-binding-DtIeSvDY.js";import"./use-mcp-client-D1kFCZ4v.js";import"./auth-C_nDagDA.js";import"./file-preview-Bcawxb03.js";import"./utils-CduIoZ0d.js";import"./Image01-BCnLFq1D.js";import"./editor-BctLuJLS.js";import"./file-type-icon-DHFVwXjA.js";import"./useInfiniteQuery-wCORGPw3.js";import"./infiniteQueryObserver-DvmMaiCa.js";const Z=200,Ke=new Set(["node_modules","__pycache__"]);function q(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function He(s){return q(s).split("/").every(e=>!e.startsWith(".")&&!Ke.has(e))}function Qe(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ue(s,e){const l=new Map;for(const r of s){const c=q(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function qe(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function Ge(s,e){const l=Ie(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,disableModelInvocation:l.disableModelInvocation,source:"home",volume:J,path:r,sandboxPath:`${Le}/${J}/${r}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:le}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?ue:ve}}function Xe(s){const e=ie.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=te(),{org:m}=se();let S;e[0]!==l.source||e[1]!==m.name?(S=re(l.source,m.name),e[0]=l.source,e[1]=m.name,e[2]=S):S=e[2];const{label:M,glyph:O}=S;let I;e[3]!==l?(I=B(l),e[3]=l,e[4]=I):I=e[4];const F=I,z=r?"opacity-60":"hover:bg-accent";let u;e[5]!==z?(u=pe("relative transition-colors group overflow-hidden flex flex-col h-full",z),e[5]=z,e[6]=u):u=e[6];let f;e[7]!==l.name||e[8]!==c||e[9]!==r?(f=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=f):f=e[10];const b=F?"default":"system",N=!F;let w;e[11]!==O||e[12]!==b||e[13]!==N?(w=t.jsx(Fe,{glyph:O,tone:b,readOnly:N,className:"size-8 shrink-0"}),e[11]=O,e[12]=b,e[13]=N,e[14]=w):w=e[14];let h;e[15]!==a||e[16]!==o?(h=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ge,{children:[t.jsx(fe,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",children:t.jsx(ke,{size:16})})}),t.jsx(he,{align:"end",children:t.jsxs(xe,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(ye,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=h):h=e[17];let x;e[18]!==w||e[19]!==h?(x=t.jsxs("div",{className:"flex items-start justify-between",children:[w,h]}),e[18]=w,e[19]=h,e[20]=x):x=e[20];let j;e[21]!==l.name?(j=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=j):j=e[22];let C;e[23]!==l.description||e[24]!==o?(C=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=C):C=e[25];let k;e[26]!==C?(k=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:C}),e[26]=C,e[27]=k):k=e[27];let d;e[28]!==j||e[29]!==k?(d=t.jsxs("div",{className:"flex flex-col gap-1",children:[j,k]}),e[28]=j,e[29]=k,e[30]=d):d=e[30];let v;e[31]!==x||e[32]!==d?(v=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,d]}),e[31]=x,e[32]=d,e[33]=v):v=e[33];let p;e[34]!==M||e[35]!==r||e[36]!==o?(p=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=p):p=e[37];let y;e[38]!==p?(y=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:p})})}),e[38]=p,e[39]=y):y=e[39];let g;e[40]!==v||e[41]!==y?(g=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,y]}),e[40]=v,e[41]=y,e[42]=g):g=e[42];let P;return e[43]!==r||e[44]!==g||e[45]!==u||e[46]!==f?(P=t.jsxs(je,{size:"flush","aria-busy":r,className:u,children:[f,g]}),e[43]=r,e[44]=g,e[45]=u,e[46]=f,e[47]=P):P=e[47],P}function ee(s){const e=ie.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function Et(){const s=te(),{org:e}=se(),l=Re(),{remove:r,upload:c}=$e("home"),a=ae(),o=T.useRef(null),[m,S]=T.useState(""),M=ce(),[O,I]=T.useState(L),[F,z]=T.useState(!1),[u,f]=T.useState(null),[b,N]=T.useState(null),[w,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:Q.slashSkills(e.id)}),a.invalidateQueries({queryKey:Q.orgFsSkills(e.id)})},j=i=>a.setQueryData(Q.slashSkills(e.id),n=>i(n??[]));async function C(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const A=n[0]?.webkitRelativePath??"";if(!A){D.error(s("settings.skills.importNeedsFolder"));return}const H=A.split("/")[0]??"",_=n.filter(He),X=_.find(E=>q(E)==="SKILL.md");if(!X){D.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>Z){D.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(Z)}));return}const R=Qe(H),W=`skills/${R}`;let V=!1;z(!0);try{if(await _e(e.slug,"home",W)){D.error(s("settings.skills.importSlugTaken",{slug:R}));return}V=!0;const E=Ge(R,await X.text());j(oe=>[E,...oe]),h(E.id),await qe(Ue(_,R),c.mutateAsync),D.success(s("settings.skills.importSuccess",{name:R}))}catch(E){V&&await r.mutateAsync(W).catch(()=>{}),D.error(E instanceof Error?E.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=m.toLowerCase(),d=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),p=new Map;for(const i of d)p.set(i.source,(p.get(i.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:d.length},...[...v].map(i=>({id:i,label:re(i,e.name).label,count:p.get(i)??0}))],g=v.has(O)?O:L,P=g===L?d:d.filter(i=>i.source===g),K=i=>f(Be(i.volume,i.path)),ne=async()=>{if(!b)return;const{id:i,path:n}=b;N(null),j(A=>A.filter(H=>H.id!==i));try{await r.mutateAsync(n),D.success(s("settings.skills.deleteSuccess"))}catch(A){D.error(A instanceof Error?A.message:s("settings.skills.deleteError"))}finally{x()}},G=t.jsxs(U,{size:"sm",disabled:F,onClick:()=>o.current?.click(),children:[t.jsx(Se,{size:14}),s(F?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs($,{children:[t.jsx($.Content,{children:t.jsx($.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[M?t.jsx($.Actions,{secondary:t.jsx(we,{value:m,onChange:S,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:G}):t.jsx($.Title,{actions:G,children:s("settings.skills.pageTitle")}),t.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3 empty:hidden",children:!M&&t.jsx(be,{value:m,onChange:S,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(S(""),i.target.blur())}})}),t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{C(i.target.files)}}),y.length>2&&t.jsx(Oe,{placement:"page",tabs:y,activeTab:g,onTabChange:I}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(i,n)=>t.jsx(de,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(me,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(U,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):P.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:s(m?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:m?s("settings.skills.noResultsDescription",{search:m}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:P.map(i=>{const n=i.id===w;return t.jsx(Xe,{entry:i,pending:n,onOpen:()=>K(i),onDelete:B(i)&&!n?()=>N(i):void 0},i.id)})})})]})})}),u&&t.jsx(ze,{skillPath:u,onClose:()=>f(null)},u),t.jsx(Ce,{open:b!==null,onOpenChange:i=>!i&&N(null),children:t.jsxs(De,{children:[t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(Ae,{children:s("settings.skills.deleteDialogDescription",{name:b?.name??""})})]}),t.jsxs(Ee,{children:[t.jsx(Te,{children:s("settings.skills.cancel")}),t.jsx(Me,{onClick:ne,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Et as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as _,l as N,j}from"./index-ifZGovK1.js";import{T as k,R as z,a as D,b as S}from"./index-Bxkd37dZ.js";function V(T){const e=_.c(41);let i,t,n,s,c,b,g,o,r,a;e[0]!==T?({className:i,defaultValue:t,value:a,min:b,max:g,onPointerDown:s,onKeyDown:n,thumbLabel:o,thumbValueText:r,...c}=T,e[0]=T,e[1]=i,e[2]=t,e[3]=n,e[4]=s,e[5]=c,e[6]=b,e[7]=g,e[8]=o,e[9]=r,e[10]=a):(i=e[1],t=e[2],n=e[3],s=e[4],c=e[5],b=e[6],g=e[7],o=e[8],r=e[9],a=e[10]);const d=b===void 0?0:b,u=g===void 0?100:g;let p;e[11]!==t||e[12]!==u||e[13]!==d||e[14]!==a?(p=Array.isArray(a)?a:Array.isArray(t)?t:[d,u],e[11]=t,e[12]=u,e[13]=d,e[14]=a,e[15]=p):p=e[15];const A=p;let f;e[16]!==i?(f=N("relative flex w-full touch-none items-center py-2 select-none data-[disabled]:opacity-50 data-[orientation=vertical]:px-2 data-[orientation=vertical]:py-0 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",i),e[16]=i,e[17]=f):f=e[17];let m;e[18]!==s?(m=l=>{l.currentTarget.dataset.pointer="",s?.(l)},e[18]=s,e[19]=m):m=e[19];let h;e[20]!==n?(h=l=>{delete l.currentTarget.dataset.pointer,n?.(l)},e[20]=n,e[21]=h):h=e[21];let x;e[22]===Symbol.for("react.memo_cache_sentinel")?(x=N("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1"),e[22]=x):x=e[22];let w;e[23]===Symbol.for("react.memo_cache_sentinel")?(w=j.jsx(k,{"data-slot":"slider-track",className:x,children:j.jsx(z,{"data-slot":"slider-range",className:N("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),e[23]=w):w=e[23];let v;if(e[24]!==A.length||e[25]!==o||e[26]!==r){let l;e[28]!==o||e[29]!==r?(l=(E,R)=>j.jsx(S,{"data-slot":"slider-thumb",...o!==void 0?{"aria-label":o}:{},...r!==void 0?{"aria-valuetext":r}:{},className:"relative block size-4 shrink-0 cursor-grab rounded-full bg-white shadow-edge transition-transform duration-150 after:absolute after:-inset-3 after:rounded-full after:content-[''] hover:scale-110 focus-ring in-data-pointer:outline-none! active:scale-110 active:cursor-grabbing disabled:pointer-events-none motion-reduce:transition-none"},R),e[28]=o,e[29]=r,e[30]=l):l=e[30],v=Array.from({length:A.length},l),e[24]=A.length,e[25]=o,e[26]=r,e[27]=v}else v=e[27];let y;return e[31]!==t||e[32]!==u||e[33]!==d||e[34]!==c||e[35]!==f||e[36]!==m||e[37]!==h||e[38]!==v||e[39]!==a?(y=j.jsxs(D,{"data-slot":"slider",defaultValue:t,value:a,min:d,max:u,className:f,...c,onPointerDown:m,onKeyDown:h,children:[w,v]}),e[31]=t,e[32]=u,e[33]=d,e[34]=c,e[35]=f,e[36]=m,e[37]=h,e[38]=v,e[39]=a,e[40]=y):y=e[40],y}export{V as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,e2 as K}from"./index-
|
|
1
|
+
import{r as v,e2 as K}from"./index-ifZGovK1.js";import{d as de,e as fe,f as U,g as ge,h as pe,i as be,j as ve,C as Y,k as he,l as y,m as me,n as xe,o as Ie,s as ye}from"./core.esm-DJ5llHMe.js";function q(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Re(e,t){return e.reduce((n,r,s)=>{const a=t.get(r);return a&&(n[s]=a),n},Array(e.length))}function O(e){return e!==null&&e>=0}function Ce(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function we(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const B=e=>{let{rects:t,activeIndex:n,overIndex:r,index:s}=e;const a=q(t,r,n),o=t[s],c=a[s];return!c||!o?null:{x:c.left-o.left,y:c.top-o.top,scaleX:c.width/o.width,scaleY:c.height/o.height}},L={scaleX:1,scaleY:1},Xe=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:s,rects:a,overIndex:o}=e;const c=(t=a[n])!=null?t:r;if(!c)return null;if(s===n){const u=a[o];return u?{x:0,y:n<o?u.top+u.height-(c.top+c.height):u.top-c.top,...L}:null}const f=De(a,s,n);return s>n&&s<=o?{x:0,y:-c.height-f,...L}:s<n&&s>=o?{x:0,y:c.height+f,...L}:{x:0,y:0,...L}};function De(e,t,n){const r=e[t],s=e[t-1],a=e[t+1];return r?n<t?s?r.top-(s.top+s.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const H="Sortable",V=K.createContext({activeIndex:-1,containerId:H,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:B,disabled:{draggable:!1,droppable:!1}});function _e(e){let{children:t,id:n,items:r,strategy:s=B,disabled:a=!1}=e;const{active:o,dragOverlay:c,droppableRects:f,over:u,measureDroppableContainers:i}=de(),l=fe(H,n),d=c.rect!==null,g=v.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),R=o!=null,C=o?g.indexOf(o.id):-1,h=u?g.indexOf(u.id):-1,w=v.useRef(g),x=!Ce(g,w.current),m=h!==-1&&C===-1||x,b=we(a);U(()=>{x&&R&&i(g)},[x,g,R,i]),v.useEffect(()=>{w.current=g},[g]);const D=v.useMemo(()=>({activeIndex:C,containerId:l,disabled:b,disableTransforms:m,items:g,overIndex:h,useDragOverlay:d,sortedRects:Re(g,f),strategy:s}),[C,l,b.draggable,b.droppable,m,g,h,f,d,s]);return K.createElement(V.Provider,{value:D},t)}const Se=e=>{let{id:t,items:n,activeIndex:r,overIndex:s}=e;return q(n,r,s).indexOf(t)},Ae=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:s,items:a,newIndex:o,previousItems:c,previousContainerId:f,transition:u}=e;return!u||!r||c!==a&&s===o?!1:n?!0:o!==s&&t===f},Te={duration:200,easing:"ease"},J="transform",Ee=Y.Transition.toString({property:J,duration:0,easing:"linear"}),Ne={roleDescription:"sortable"};function Oe(e){let{disabled:t,index:n,node:r,rect:s}=e;const[a,o]=v.useState(null),c=v.useRef(n);return U(()=>{if(!t&&n!==c.current&&r.current){const f=s.current;if(f){const u=he(r.current,{ignoreTransform:!0}),i={x:f.left-u.left,y:f.top-u.top,scaleX:f.width/u.width,scaleY:f.height/u.height};(i.x||i.y)&&o(i)}}n!==c.current&&(c.current=n)},[t,n,r,s]),v.useEffect(()=>{a&&o(null)},[a]),a}function je(e){let{animateLayoutChanges:t=Ae,attributes:n,disabled:r,data:s,getNewIndex:a=Se,id:o,strategy:c,resizeObserverConfig:f,transition:u=Te}=e;const{items:i,containerId:l,activeIndex:d,disabled:g,disableTransforms:R,sortedRects:C,overIndex:h,useDragOverlay:w,strategy:x}=v.useContext(V),m=Le(r,g),b=i.indexOf(o),D=v.useMemo(()=>({sortable:{containerId:l,index:b,items:i},...s}),[l,s,b,i]),I=v.useMemo(()=>i.slice(i.indexOf(o)),[i,o]),{rect:N,node:z,isOver:W,setNodeRef:P}=ge({id:o,data:D,disabled:m.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...f}}),{active:T,activatorEvent:Z,activeNodeRect:ee,attributes:te,setNodeRef:X,listeners:re,isDragging:M,over:ne,setActivatorNodeRef:se,transform:oe}=pe({id:o,data:D,attributes:{...Ne,...n},disabled:m.draggable}),ae=be(P,X),S=!!T,_=S&&!R&&O(d)&&O(h),j=!w&&M,F=j&&_?oe:null,ie=_?F??(c??x)({rects:C,activeNodeRect:ee,activeIndex:d,overIndex:h,index:b}):null,E=O(d)&&O(h)?a({id:o,items:i,activeIndex:d,overIndex:h}):b,A=T?.id,p=v.useRef({activeId:A,items:i,newIndex:E,containerId:l}),ce=i!==p.current.items,G=t({active:T,containerId:l,isDragging:M,isSorting:S,id:o,index:b,items:i,newIndex:p.current.newIndex,previousItems:p.current.items,previousContainerId:p.current.containerId,transition:u,wasDragging:p.current.activeId!=null}),$=Oe({disabled:!G,index:b,node:z,rect:N});return v.useEffect(()=>{S&&p.current.newIndex!==E&&(p.current.newIndex=E),l!==p.current.containerId&&(p.current.containerId=l),i!==p.current.items&&(p.current.items=i)},[S,E,l,i]),v.useEffect(()=>{if(A===p.current.activeId)return;if(A!=null&&p.current.activeId==null){p.current.activeId=A;return}const ue=setTimeout(()=>{p.current.activeId=A},50);return()=>clearTimeout(ue)},[A]),{active:T,activeIndex:d,attributes:te,data:D,rect:N,index:b,newIndex:E,items:i,isOver:W,isSorting:S,isDragging:M,listeners:re,node:z,overIndex:h,over:ne,setNodeRef:ae,setActivatorNodeRef:se,setDroppableNodeRef:P,setDraggableNodeRef:X,transform:$??ie,transition:le()};function le(){if($||ce&&p.current.newIndex===b)return Ee;if(!(j&&!ve(Z)||!u)&&(S||G))return Y.Transition.toString({...u,property:J})}}function Le(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function k(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ke=[y.Down,y.Right,y.Up,y.Left],Fe=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:a,over:o,scrollableAncestors:c}}=t;if(ke.includes(e.code)){if(e.preventDefault(),!n||!r)return;const f=[];a.getEnabled().forEach(l=>{if(!l||l!=null&&l.disabled)return;const d=s.get(l.id);if(d)switch(e.code){case y.Down:r.top<d.top&&f.push(l);break;case y.Up:r.top>d.top&&f.push(l);break;case y.Left:r.left>d.left&&f.push(l);break;case y.Right:r.left<d.left&&f.push(l);break}});const u=me({collisionRect:r,droppableRects:s,droppableContainers:f});let i=xe(u,"id");if(i===o?.id&&u.length>1&&(i=u[1].id),i!=null){const l=a.get(n.id),d=a.get(i),g=d?s.get(d.id):null,R=d?.node.current;if(R&&g&&l&&d){const h=Ie(R).some((I,N)=>c[N]!==I),w=Q(l,d),x=Me(l,d),m=h||!w?{x:0,y:0}:{x:x?r.width-g.width:0,y:x?r.height-g.height:0},b={x:g.left,y:g.top};return m.x&&m.y?b:ye(b,m)}}}};function Q(e,t){return!k(e)||!k(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Me(e,t){return!k(e)||!k(t)||!Q(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}export{_e as S,q as a,B as r,Fe as s,je as u,Xe as v};
|