decocms 4.529.0 → 4.531.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-DemHm_Wd.js → ActiveShapeUtils-CUGYcOGt.js} +1 -1
- package/dist/client/assets/{AlertCircle-COvusPgV.js → AlertCircle-C0U53qC5.js} +1 -1
- package/dist/client/assets/{AreaChart-DyTNutvb.js → AreaChart-vwsYBH1z.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DLvj60sB.js → ArrowLeft-BVJNIiuT.js} +1 -1
- package/dist/client/assets/{ArrowUp-BUXNFn6K.js → ArrowUp-BnowdRj-.js} +1 -1
- package/dist/client/assets/{BarChart-pUJx5RZM.js → BarChart-CwsIHr2J.js} +1 -1
- package/dist/client/assets/{Building02-GTlj-q2W.js → Building02-CcI-P3yL.js} +1 -1
- package/dist/client/assets/{CartesianChart-GHKU27xx.js → CartesianChart-Cwfb2Obv.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BYHLRXHR.js → CategoricalChart-CukPvNkf.js} +1 -1
- package/dist/client/assets/{CheckCircle-C512y-MG.js → CheckCircle-fAPMl2yd.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BsYzg3zS.js → ChevronSelectorVertical-C-CIIDml.js} +1 -1
- package/dist/client/assets/{ChevronUp-krQUb2vU.js → ChevronUp-BMY88wXt.js} +1 -1
- package/dist/client/assets/{Copy01-DMa3yAGL.js → Copy01-DGy0Absz.js} +1 -1
- package/dist/client/assets/{CreditCard01-B64VnM4Z.js → CreditCard01-DsjBhiEj.js} +1 -1
- package/dist/client/assets/{DotsVertical-DcrZktRa.js → DotsVertical-Bfe9a_On.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-4lCbO0nP.js → ErrorBarContext-hs9d9Up0.js} +1 -1
- package/dist/client/assets/{Globe04-wvLOPSBv.js → Globe04-B-sNlZxN.js} +1 -1
- package/dist/client/assets/{Image01-C1LM4LI_.js → Image01-DtpDUrwF.js} +1 -1
- package/dist/client/assets/{Key01-DBOKyeyp.js → Key01-DifqnYu0.js} +1 -1
- package/dist/client/assets/{Link01-C15xvQCb.js → Link01-oZZyGItc.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C-j1r45F.js → LinkBroken01-BZrnscWF.js} +1 -1
- package/dist/client/assets/{Minus-pd7IxdG4.js → Minus-Dc5wow6R.js} +1 -1
- package/dist/client/assets/{Monitor01-DkBo0gFa.js → Monitor01-Bmn1BV5T.js} +1 -1
- package/dist/client/assets/{Play-BG4TP59z.js → Play-IViIK9Vy.js} +1 -1
- package/dist/client/assets/{Plus-CZXpdtEH.js → Plus-Bh_xMwh7.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D8vPnc2l.js → ReferenceLine-DDRDnZWn.js} +1 -1
- package/dist/client/assets/{SearchMd-7uzgB_fN.js → SearchMd-DB3np2ti.js} +1 -1
- package/dist/client/assets/{Sector-BoQZLv3P.js → Sector-BbL3mZ4i.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-fwBzMipi.js → ShoppingBag01-BaMIB-e_.js} +1 -1
- package/dist/client/assets/{Sun-BndYhLEq.js → Sun-BZlKwpGn.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C8FHYpzr.js → SwitchHorizontal01-fMsLFMs0.js} +1 -1
- package/dist/client/assets/{Tool01-D6wuoLhW.js → Tool01-CTKnipD_.js} +1 -1
- package/dist/client/assets/{Trash01-fFkz00Bo.js → Trash01-BqP8uw7k.js} +1 -1
- package/dist/client/assets/{Upload01-B7NXMv4U.js → Upload01-CpPArzNK.js} +1 -1
- package/dist/client/assets/{UserSquare-Dy6q7vGw.js → UserSquare-D4xudMmb.js} +1 -1
- package/dist/client/assets/{Users01-Bzd23uge.js → Users01-buCmBl1X.js} +1 -1
- package/dist/client/assets/{XClose-Bl8OQypT.js → XClose-D48r2tDo.js} +1 -1
- package/dist/client/assets/{ZoomOut-CbRHTtaG.js → ZoomOut-BVuJZ-2t.js} +1 -1
- package/dist/client/assets/{access-gate-BUmBK35t.js → access-gate-DBOVcx9J.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-EKB9ifd5.js → add-connection-dialog-o9V9M7_d.js} +1 -1
- package/dist/client/assets/agent-analytics-37IFZCDX.js +1 -0
- package/dist/client/assets/agent-app-Br31NfCV.js +1 -0
- package/dist/client/assets/{agent-assets-CLaEj6EO.js → agent-assets-OoRFrJh4.js} +1 -1
- package/dist/client/assets/{agent-automation-DjrvgxKz.js → agent-automation-ChlL7V0d.js} +1 -1
- package/dist/client/assets/{agent-automations-B_j3JMK5.js → agent-automations-CFZ5G-rN.js} +1 -1
- package/dist/client/assets/{agent-calendar-BYK51o6p.js → agent-calendar-C-B6ze0O.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CEHAzyyH.js → agent-connect-sources-tJUoo5_M.js} +1 -1
- package/dist/client/assets/agent-deck-W1uVi0Qe.js +1 -0
- package/dist/client/assets/{agent-e2e-DC8qsIOa.js → agent-e2e-BJxS0re0.js} +1 -1
- package/dist/client/assets/agent-experiments-DOcx29VX.js +1 -0
- package/dist/client/assets/{agent-file-B2uxKC-F.js → agent-file-C9s_RWk1.js} +1 -1
- package/dist/client/assets/{agent-hosting-RnWuRGIL.js → agent-hosting-Bn-lQ-QN.js} +1 -1
- package/dist/client/assets/{agent-icon-D8I51g86.js → agent-icon-B7Q7dFXY.js} +1 -1
- package/dist/client/assets/agent-library-BSF2E1JT.js +1 -0
- package/dist/client/assets/agent-library-file-auwmTzQK.js +1 -0
- package/dist/client/assets/agent-monitor-DvzxtFAJ.js +1 -0
- package/dist/client/assets/{agent-overview-C5NgXH7s.js → agent-overview-BQZTWcdd.js} +1 -1
- package/dist/client/assets/{agent-releases-BC4vHFHk.js → agent-releases-BbYl9Mwf.js} +1 -1
- package/dist/client/assets/agent-settings-Uir88FPs.js +1 -0
- package/dist/client/assets/{agent-site-editor-DxPxTcxt.js → agent-site-editor-C0ubqGd6.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CMk_fLsh.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DTsWdPHL.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Br0J113j.js +1 -0
- package/dist/client/assets/agent-view-DSlQoDfx.js +1 -0
- package/dist/client/assets/{agent-view-guard-DGYTrdB6.js → agent-view-guard-CzZjL776.js} +1 -1
- package/dist/client/assets/{agents-list-B3GTSyKF.js → agents-list-ImvzEVvr.js} +1 -1
- package/dist/client/assets/{ai-providers-kbqqFGXw.js → ai-providers-Bw8nDtTM.js} +1 -1
- package/dist/client/assets/{alert-Co4rQNsj.js → alert-CHj-Usrj.js} +1 -1
- package/dist/client/assets/{analytics-sections-sv8ClgZ6.js → analytics-sections-CGcyhwwe.js} +1 -1
- package/dist/client/assets/analytics-tab-DnWN6v6x.js +2 -0
- package/dist/client/assets/api-keys-D17ng_fK.js +1 -0
- package/dist/client/assets/{api-keys-C1HeQnUq.js → api-keys-DSNlUnpn.js} +1 -1
- package/dist/client/assets/{app-editor-6n0QxI7G.js → app-editor-BBiKxRJS.js} +1 -1
- package/dist/client/assets/{asset-utils-BVjUn7sv.js → asset-utils-BvYMWLJK.js} +1 -1
- package/dist/client/assets/{auth-catchall-CNcTLbQH.js → auth-catchall-Yn8u2UhP.js} +1 -1
- package/dist/client/assets/{auth-entry-B00ENnh_.js → auth-entry-DF0YJ4h7.js} +1 -1
- package/dist/client/assets/{auth-D095ELC6.js → auth-fndLm_KR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BygL4T3m.js → auth-split-layout-NNmGhYbT.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BWNvTNl4.js → authenticate-and-persist-oauth-D7QWYyhR.js} +1 -1
- package/dist/client/assets/{automation-list-row-D74lyjQr.js → automation-list-row-CTExE_83.js} +1 -1
- package/dist/client/assets/{automation-runs-CBMsjgBs.js → automation-runs-BO9rScSe.js} +1 -1
- package/dist/client/assets/{automations-jj-tbLkb.js → automations-CHWjvK4W.js} +1 -1
- package/dist/client/assets/{autosend-CBkC989z.js → autosend-VKc1dW3G.js} +1 -1
- package/dist/client/assets/{badge-NOwFVf79.js → badge-AFOqFwvQ.js} +1 -1
- package/dist/client/assets/{block-document-BHzrJZOA.js → block-document-C22TRUSp.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BXnXIitx.js → blocks-preview-workspace-context-Dd8qSyOR.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-B1baLGbh.js → blocks-tab-states-BUek9Urr.js} +1 -1
- package/dist/client/assets/{blog-schema-BfjxCL-D.js → blog-schema-DclHtzEx.js} +1 -1
- package/dist/client/assets/{buckets-DuxgHXni.js → buckets-Dq_X_gmQ.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DfrXi7V7.js → build-improve-prompt-doc-Pe8zfELh.js} +1 -1
- package/dist/client/assets/{calendar-r-ZqwkU5.js → calendar-BZJL1q0i.js} +1 -1
- package/dist/client/assets/{capability-load-error-C_z_eZxA.js → capability-load-error-Bn9e6-bb.js} +1 -1
- package/dist/client/assets/{category-editor-BVzHX2Tl.js → category-editor-Cklcuc6l.js} +1 -1
- package/dist/client/assets/{cdn-tab-CqrDuE12.js → cdn-tab-CJ55RYwI.js} +1 -1
- package/dist/client/assets/{chart-CpZD0pzF.js → chart-bf024hGa.js} +1 -1
- package/dist/client/assets/{chat-context-CFRPrQEn.js → chat-context-BI1yxU4R.js} +1 -1
- package/dist/client/assets/{chat-draft-CookMc2A.js → chat-draft-B9Sz9SQX.js} +1 -1
- package/dist/client/assets/{checkbox-CHAX1Xck.js → checkbox-BGiVnH_E.js} +1 -1
- package/dist/client/assets/{choose-editor-agHDRvWe.js → choose-editor-BpSB586s.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DiUqDmOP.js → cli-auth-success-CDHZN1Zi.js} +1 -1
- package/dist/client/assets/{client-icons-CbLac6SE.js → client-icons-FDKXeHgM.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-osH6UqMf.js → cms-settings-editor-bw2d5qFj.js} +1 -1
- package/dist/client/assets/{collapsible-B0-dgkow.js → collapsible-B5J2aUd-.js} +1 -1
- package/dist/client/assets/{collection-detail-DMhjkfO0.js → collection-detail-BRa2jvXK.js} +1 -1
- package/dist/client/assets/{collection-display-button-VpsslNFN.js → collection-display-button-VDPf0fxx.js} +1 -1
- package/dist/client/assets/{collection-search-CfEbdS6s.js → collection-search-B_n3Ea8A.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bmq1UECe.js → collection-table-wrapper-Dms92TX1.js} +1 -1
- package/dist/client/assets/{collection-tabs-CKvYpxHT.js → collection-tabs-CRfyt8-K.js} +1 -1
- package/dist/client/assets/{column-rules-DLuTKpTB.js → column-rules-C7sxa0a0.js} +1 -1
- package/dist/client/assets/{combobox-B2ABYNJF.js → combobox-BBB78IeP.js} +1 -1
- package/dist/client/assets/{command-yWHdaNhz.js → command-jlI8eprh.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CzTfnHtf.js → companion-mcps-section-C8ZRnbHV.js} +1 -1
- package/dist/client/assets/{config-BWRujj0b.js → config-CEPjuV4B.js} +1 -1
- package/dist/client/assets/{connect-Dd7mHJ3b.js → connect-D7sTLKym.js} +1 -1
- package/dist/client/assets/{connect-layout-CuMi_Lil.js → connect-layout-DEhdoMeD.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CEGXiNKG.js → connect-source-dialog-CTDwzNbD.js} +1 -1
- package/dist/client/assets/{connection-BLQ_zE4V.js → connection-_BLwZIho.js} +1 -1
- package/dist/client/assets/{connection-card-By3c6kjU.js → connection-card-DOb0qtir.js} +1 -1
- package/dist/client/assets/{connection-detail-shznFsHq.js → connection-detail-6FLkb2KJ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Z8pfNB14.js → connection-form-helpers-Do-juNEt.js} +1 -1
- package/dist/client/assets/{connections-BPuzvSmY.js → connections-m8uo2l1C.js} +1 -1
- package/dist/client/assets/{content-tab-DneBUwU0.js → content-tab-CxqGwsRS.js} +3 -3
- package/dist/client/assets/{context-CFpk-Oj4.js → context-bZenUCWc.js} +1 -1
- package/dist/client/assets/{context-menu-DJBtOK1b.js → context-menu-Ckmk21Ru.js} +1 -1
- package/dist/client/assets/{context-shell-BmoIxzr5.js → context-shell-7YO8Ahul.js} +3 -3
- package/dist/client/assets/{core.esm-n2M8kvjD.js → core.esm-CfGX-VCE.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CQRec3jk.js → create-organization-dialog-Byea9wm5.js} +1 -1
- package/dist/client/assets/{daily-pulse-BbNgROp9.js → daily-pulse-DWbRk6Tj.js} +1 -1
- package/dist/client/assets/{discover-C-nnI3od.js → discover-DqVrbNaN.js} +1 -1
- package/dist/client/assets/{domain-settings-Cc13IWEI.js → domain-settings-D4GbzAgH.js} +1 -1
- package/dist/client/assets/{drawer-CiMnESz2.js → drawer-9GcYCTZT.js} +1 -1
- package/dist/client/assets/{editor-DmuvoJYA.js → editor-CVSwKg6T.js} +1 -1
- package/dist/client/assets/{editor-classes-BnQ0j7aI.js → editor-classes-Dkk1S2M6.js} +1 -1
- package/dist/client/assets/{empty-state-usXK3Xda.js → empty-state-BdJInz6a.js} +1 -1
- package/dist/client/assets/{empty-state-TJAbP9DT.js → empty-state-CUanQ9Sm.js} +1 -1
- package/dist/client/assets/{experiments-tab-BP2V1ct9.js → experiments-tab-NqV4EeCU.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-0iIRb8Mb.js → experiments-tab-choice-D5E9lbe8.js} +1 -1
- package/dist/client/assets/{extract-connection-data-w2KZjBRz.js → extract-connection-data-BH85Ecx-.js} +1 -1
- package/dist/client/assets/{feature-gate-CL9DvP9Y.js → feature-gate-BaIBNMzy.js} +1 -1
- package/dist/client/assets/{feature-paywall-DSpW8aNd.js → feature-paywall-BIJDHy8g.js} +1 -1
- package/dist/client/assets/{file-explorer-p0qSIvAq.js → file-explorer-B-ye_-97.js} +1 -1
- package/dist/client/assets/{file-preview-BnfIAfXR.js → file-preview-DVCjmYnL.js} +1 -1
- package/dist/client/assets/{file-share-button-D0fIsSP3.js → file-share-button-B0trNLFa.js} +1 -1
- package/dist/client/assets/{file-type-icon-BMJ3eu8C.js → file-type-icon-CLdhbOMq.js} +1 -1
- package/dist/client/assets/{folder-icon-AsglkwKY.js → folder-icon-B4yVMgUj.js} +1 -1
- package/dist/client/assets/{form-B15LRu36.js → form-DmKuBQlJ.js} +1 -1
- package/dist/client/assets/{general-jGb_G4uN.js → general-CzhpbJkY.js} +1 -1
- package/dist/client/assets/{held-block-view-OUun6HKW.js → held-block-view-BCUOCB3X.js} +3 -3
- package/dist/client/assets/{home-T15wg8dw.js → home-CD9j4UYU.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-CpPg0deS.js → hosted-publish-feedback-BX6h3oNP.js} +1 -1
- package/dist/client/assets/{icon-button-CdKw1JM7.js → icon-button-Rp_ZDDhs.js} +1 -1
- package/dist/client/assets/{index-suEm9Jo8.js → index-B-980lL8.js} +1 -1
- package/dist/client/assets/{index-BCVYESVO.js → index-B0Rg86vv.js} +1 -1
- package/dist/client/assets/{index-BJ0i7OFb.js → index-BM9HifS6.js} +1 -1
- package/dist/client/assets/{index-Ba639kg_.js → index-C6KhNCz4.js} +1 -1
- package/dist/client/assets/{index-D6lKvaoF.js → index-C8YP0XfX.js} +48 -48
- package/dist/client/assets/{index-Cdp3CJ7S.js → index-CPu0T3g-.js} +1 -1
- package/dist/client/assets/{index-DgseJSFR.js → index-CjhVW3Ft.js} +1 -1
- package/dist/client/assets/{index-BfJfM0M5.js → index-CzZ16hae.js} +1 -1
- package/dist/client/assets/{index-CPx4iDWN.js → index-DG18LLWo.js} +1 -1
- package/dist/client/assets/{index-Cv-yBusP.js → index-DJmej5q-.js} +1 -1
- package/dist/client/assets/{index-DdjqsLVd.js → index-DJxkEvYw.js} +1 -1
- package/dist/client/assets/{index-DTPm19J5.js → index-Dc2A9bLg.js} +1 -1
- package/dist/client/assets/{index-CYkDIirY.js → index-EfujrlRm.js} +1 -1
- package/dist/client/assets/{index-ke7VZu6f.js → index-Q6SZwjyp.js} +1 -1
- package/dist/client/assets/{index-Du8mxU6I.js → index-_MLEN3sq.js} +1 -1
- package/dist/client/assets/{index-redirect-DPkf2M1r.js → index-redirect-uK6MukHm.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DoO1tFcg.js → infiniteQueryObserver-C8Tx1h_G.js} +1 -1
- package/dist/client/assets/{infra-billing-AOTF4BF9.js → infra-billing-XXUCrKTj.js} +1 -1
- package/dist/client/assets/{input-CGPBEV3I.js → input-DRaRHcY2.js} +1 -1
- package/dist/client/assets/{input-BjDpMhiP.js → input-DjstRX-_.js} +3 -3
- package/dist/client/assets/{integration-icon-DsUtWvNG.js → integration-icon-03FWmed-.js} +1 -1
- package/dist/client/assets/{jira-icon-ClDodO3R.js → jira-icon-Dwf32Q1t.js} +1 -1
- package/dist/client/assets/{label-G1B1MWwD.js → label-BZDtWIcv.js} +1 -1
- package/dist/client/assets/{layout-txEP7eBz.js → layout-rILzLvlD.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DPRz-ztQ.js → legacy-agents-deep-BASczG03.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-D4h2lZ1C.js → legacy-main-redirect-BJoW2swu.js} +1 -1
- package/dist/client/assets/library-PZbd-Doo.js +1 -0
- package/dist/client/assets/{login-BLrZZn8v.js → login-9fIx9llO.js} +1 -1
- package/dist/client/assets/{markdown-qzRhqGiE.js → markdown-DuoP9xIE.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BEchnhBH.js → mcp-app-renderer-DWv_y82s.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DB3Ehq2l.js → mcp-oauth-CsfxxKaN.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C5j0dGpY.js → mcp-oauth-D-fSN__A.js} +1 -1
- package/dist/client/assets/{members-UnOmDr74.js → members-DLnkLpsh.js} +1 -1
- package/dist/client/assets/{memory-DDcdJq0f.js → memory-4CHY9Qs2.js} +1 -1
- package/dist/client/assets/{mini-report-page-0MJL6jaw.js → mini-report-page-MBlPP32_.js} +1 -1
- package/dist/client/assets/mock-board-BtdGtIDb.js +81 -0
- package/dist/client/assets/{monaco-editor-f9CmyWiW.js → monaco-editor-a3IVCcn2.js} +1 -1
- package/dist/client/assets/{monitoring-BcfPBOT_.js → monitoring-D6l4I6f5.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DbGeX6M1.js → monitoring-stats-row-DBelPaxz.js} +1 -1
- package/dist/client/assets/{multi-select-DDgBvcml.js → multi-select-082YyRUR.js} +1 -1
- package/dist/client/assets/{mustache-Dlytn5tt.js → mustache-BBa51FCf.js} +1 -1
- package/dist/client/assets/{named-rule-uses-Ce5M9wic.js → named-rule-uses-Yzjx02p5.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CMq12kc2.js → new-project-dialog-BuE_SqTn.js} +1 -1
- package/dist/client/assets/{oauth-callback-CHDXWkE_.js → oauth-callback-DDoefwF9.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-UMPeP62o.js → oauth-callback-ai-provider-C9SrnNuM.js} +1 -1
- package/dist/client/assets/{onboarding-M__h_Gjj.js → onboarding-DSfiLpX3.js} +1 -1
- package/dist/client/assets/{openai-conversation-CaIhAnt3.js → openai-conversation-sk-C_Dmb.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CdaXFXXA.js → optimistic-project-sidebar-views-DJIKQ8kN.js} +1 -1
- package/dist/client/assets/{order-monitor-day-EdsSjGDV.js → order-monitor-day-BTTTp937.js} +1 -1
- package/dist/client/assets/{organization-choice-nAa_gubo.js → organization-choice-BnprMn5W.js} +1 -1
- package/dist/client/assets/{orgs-Bf_omTy9.js → orgs-BwLgPyhv.js} +1 -1
- package/dist/client/assets/{page-seo-form-bDCctB_4.js → page-seo-form-DcpwPyQd.js} +1 -1
- package/dist/client/assets/{pair-DAGOA-DW.js → pair-DEJAc3iG.js} +1 -1
- package/dist/client/assets/{parse-sections-CQtk5pOz.js → parse-sections-B8Xcvgnu.js} +1 -1
- package/dist/client/assets/{plan-B6ZUDARY.js → plan-DWTPbA95.js} +1 -1
- package/dist/client/assets/{plan-ladder-lTkei0Ti.js → plan-ladder-B0TVgJ_-.js} +1 -1
- package/dist/client/assets/{popover-0uuKFwAZ.js → popover-C0DIKe_3.js} +1 -1
- package/dist/client/assets/{post-calendar-EZk2hClJ.js → post-calendar-CsYHka8d.js} +1 -1
- package/dist/client/assets/{post-editor-DBjNxHSS.js → post-editor-BAL8WHQL.js} +1 -1
- package/dist/client/assets/{preview-content-QwLJXUTL.js → preview-content-4PKjfy6d.js} +1 -1
- package/dist/client/assets/{preview-dialog-COkKtKSn.js → preview-dialog-B5Sh6VdD.js} +1 -1
- package/dist/client/assets/{preview-panel-CYvbBECE.js → preview-panel-CdgtAcKr.js} +1 -1
- package/dist/client/assets/{preview-tab-CevrXu6o.js → preview-tab-W7cmZoDH.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-C4MqsCUp.js → product-picker-dialog-BMgJeJTt.js} +1 -1
- package/dist/client/assets/{profile-BpyEXZc8.js → profile-BGrTACfK.js} +1 -1
- package/dist/client/assets/{project-app-view-Be6CnjoI.js → project-app-view-BJ5Jx_gM.js} +1 -1
- package/dist/client/assets/{project-apps-B0ovyypF.js → project-apps-CTDjuD3G.js} +1 -1
- package/dist/client/assets/{project-feed-C21rLNuW.js → project-feed-BoWXBRyy.js} +1 -1
- package/dist/client/assets/{project-icon-DSVUD72l.js → project-icon-BSrEdWN1.js} +1 -1
- package/dist/client/assets/project-reports-VHT6QaEg.js +1 -0
- package/dist/client/assets/project-tasks-CJNYdN6D.js +1 -0
- package/dist/client/assets/{projects-DVL140KR.js → projects-BN2XX-Mk.js} +1 -1
- package/dist/client/assets/{projects-empty-state--1SkJcww.js → projects-empty-state-DE8FaVtJ.js} +1 -1
- package/dist/client/assets/{prompts-BB-mkKBu.js → prompts-CPwtUzza.js} +1 -1
- package/dist/client/assets/record-editor-DTffX4wj.js +1 -0
- package/dist/client/assets/{redirect-editor-MSkonkYZ.js → redirect-editor-BmKYzmzW.js} +1 -1
- package/dist/client/assets/{releases-api-XsGA4Jqp.js → releases-api-DGMi80FZ.js} +1 -1
- package/dist/client/assets/reports-Bj3OCHyV.js +1 -0
- package/dist/client/assets/{reports-Bs2cZ7-f.js → reports-DqVaZWmt.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CQDYROlT.js → reports-onboarding-D7aXc-w2.js} +1 -1
- package/dist/client/assets/{reports-tab-unD6Cc73.js → reports-tab-DqVp7xB2.js} +2 -2
- package/dist/client/assets/{repositories-D4uDVy59.js → repositories-BdofaJQO.js} +1 -1
- package/dist/client/assets/repositories-eo_EMvPJ.js +1 -0
- package/dist/client/assets/{repository-binding-DG0YfJ0p.js → repository-binding-B-4PI1n3.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DmsHSDsT.js → repository-import-picker-BfMMau5M.js} +1 -1
- package/dist/client/assets/{repository-picker-DtHxD0oz.js → repository-picker-CbWFb7rK.js} +1 -1
- package/dist/client/assets/{require-capability-Coznh-2O.js → require-capability-C7aMGT2m.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D6rVgMVl.js → required-auth-layout-ofmCqqpc.js} +1 -1
- package/dist/client/assets/{reset-password-T1aKmDxe.js → reset-password-VX3IBezM.js} +1 -1
- package/dist/client/assets/{resizable-BToK-_9q.js → resizable-KZ7XhVXp.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BZcs-4Ej.js → resolve-tab-icon-BZyAXpM2.js} +1 -1
- package/dist/client/assets/{review-settings-D8DTqrlS.js → review-settings-BmkypttR.js} +1 -1
- package/dist/client/assets/{roles-BjZzPNJU.js → roles-DWAAM1uf.js} +1 -1
- package/dist/client/assets/{route-ZKQ_kRmZ.js → route-BFmFTSop.js} +1 -1
- package/dist/client/assets/route-BVH9iZ3P.js +1 -0
- package/dist/client/assets/{route-CGlwPlVk.js → route-D-yMUgac.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DmhDA6t4.js → sandbox-lifecycle-context-DQ3bjzwr.js} +1 -1
- package/dist/client/assets/{schema-DNxvjoV7.js → schema-CFje17_E.js} +1 -1
- package/dist/client/assets/{schema-DnX2JCBp.js → schema-nUWXGpCy.js} +1 -1
- package/dist/client/assets/{scroll-area-DuxlLjxF.js → scroll-area-BSd3TrLZ.js} +1 -1
- package/dist/client/assets/{search-input-D-Pyf_-v.js → search-input-CIT_dMpA.js} +1 -1
- package/dist/client/assets/{search-toggle-Dtmn6N5P.js → search-toggle-BYErJl4G.js} +1 -1
- package/dist/client/assets/{secret-picker-DVVZ5bEr.js → secret-picker-CczM3F7L.js} +1 -1
- package/dist/client/assets/{secrets-cTi-1KGY.js → secrets-DGc21qBv.js} +1 -1
- package/dist/client/assets/{section-array-field-D7M_bj6e.js → section-array-field-CWeYHp0D.js} +1 -1
- package/dist/client/assets/{sections-editor-Cp3o1WEu.js → sections-editor-BxjGUtMX.js} +1 -1
- package/dist/client/assets/{sections-DoIjBnkB.js → sections-f1UrHc1E.js} +1 -1
- package/dist/client/assets/{select-WYGhjx6Y.js → select-EVDcG5Hl.js} +1 -1
- package/dist/client/assets/{select-model-7YJABjjD.js → select-model-CxALqwJ6.js} +1 -1
- package/dist/client/assets/{seo-editor-DxqL4dEA.js → seo-editor-Pqi1uTMV.js} +1 -1
- package/dist/client/assets/{separator-CAQrypmQ.js → separator-Czsq0Xe-.js} +1 -1
- package/dist/client/assets/settings-tab-CG7k6yYL.js +1 -0
- package/dist/client/assets/{sheet-BXLIoGMZ.js → sheet-ko7a2Uwq.js} +1 -1
- package/dist/client/assets/{shell-layout-DIzvUuq-.js → shell-layout-uDYSTXA5.js} +1 -1
- package/dist/client/assets/{site-draft-actions-L6qNX2KR.js → site-draft-actions-PtNrOTTk.js} +1 -1
- package/dist/client/assets/{site-draft-view-CFpMP26D.js → site-draft-view-Bnegh8Bv.js} +2 -2
- package/dist/client/assets/site-editor-hILYo6nq.js +1 -0
- package/dist/client/assets/{site-editor-toast-DYuw8EYm.js → site-editor-toast-D9ddy9a_.js} +1 -1
- package/dist/client/assets/{skills-Bs4GOdTG.js → skills-CZmhtPN_.js} +1 -1
- package/dist/client/assets/{slider-CViVuHCu.js → slider-Bg5y5q23.js} +1 -1
- package/dist/client/assets/{sortable.esm-DEhQR8uW.js → sortable.esm-Bk2g_Gbz.js} +1 -1
- package/dist/client/assets/{sso-RbRiEKa0.js → sso-Bb3b2KOU.js} +1 -1
- package/dist/client/assets/{suggestion-Bx_JdcJG.js → suggestion-Bl_JrZPN.js} +1 -1
- package/dist/client/assets/{switch-BByo6038.js → switch-DbWQrL2t.js} +1 -1
- package/dist/client/assets/{symbol-Dxfa7ArY.js → symbol-DLC3ejqz.js} +1 -1
- package/dist/client/assets/{synced-repos-COUZBGua.js → synced-repos-CIyIp6th.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Bk-ZO6Ik.js → tab-icon-glyph-D22-rmWX.js} +1 -1
- package/dist/client/assets/{table-CSNuDYSH.js → table-CIbHZF2_.js} +1 -1
- package/dist/client/assets/{tabs-D3JiC-AY.js → tabs-BbA4-8ma.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-BmM5P6_t.js → task-assignee-avatar-8Sp4Z4mk.js} +1 -1
- package/dist/client/assets/{task-board-9JuNZBWk.js → task-board-u5TablbK.js} +1 -1
- package/dist/client/assets/{task-route-8N1kEUR4.js → task-route-B7ChywKT.js} +1 -1
- package/dist/client/assets/{task-status-CqFVxY8B.js → task-status-Ch8fGpdY.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CJlU-oAO.js → taskboard-analytics-DrH4N_FR.js} +1 -1
- package/dist/client/assets/{tasks-gqaInVx6.js → tasks-B-1EpIoB.js} +1 -1
- package/dist/client/assets/tasks-BJ_C2gVP.js +1 -0
- package/dist/client/assets/{textarea-L_ZRNMiO.js → textarea-BeCs38v-.js} +1 -1
- package/dist/client/assets/{thread-analytics-BcGg7DjZ.js → thread-analytics-BQ0AO_kH.js} +1 -1
- package/dist/client/assets/{thread-intent-B7fQ4X9a.js → thread-intent-Cl7xa7dA.js} +1 -1
- package/dist/client/assets/{thread-route-P1MEabq1.js → thread-route-BCRCqPZe.js} +1 -1
- package/dist/client/assets/{thread-route-qfZwEURL.js → thread-route-JcxEqRgq.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Brz-5Xzp.js → thread-sheet-body-BZhXd8vN.js} +1 -1
- package/dist/client/assets/{time-range-picker-D-N-klXR.js → time-range-picker-D99DN923.js} +1 -1
- package/dist/client/assets/{toggle-group-DGrVpPy5.js → toggle-group-CWnjwOku.js} +1 -1
- package/dist/client/assets/{tool-namespace-D6LarB3P.js → tool-namespace-ChbHxLTp.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DA7DTn0f.js → toolbar-icon-button-BUMG5B6x.js} +1 -1
- package/dist/client/assets/{tooltip-LAilTl9w.js → tooltip-CJHeHoSn.js} +1 -1
- package/dist/client/assets/{tooltipContext-BD4z8QR3.js → tooltipContext-CL92GCVz.js} +1 -1
- package/dist/client/assets/{track-BDBNTOtn.js → track-B2jTEYXL.js} +1 -1
- package/dist/client/assets/{types-B-ck70wq.js → types-Cwtot2FB.js} +1 -1
- package/dist/client/assets/{url-slug-hCw666fV.js → url-slug-Dxr7jq0i.js} +1 -1
- package/dist/client/assets/{usage-stats-C7wY64zK.js → usage-stats-CNcWehA3.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CCh3hgye.js → use-ai-providers-DzWzPq_c.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-C3ZZJzlV.js → use-apply-named-rule-QplWW5Pw.js} +1 -1
- package/dist/client/assets/{use-automations-CRFTJK4f.js → use-automations-DO79ln3M.js} +1 -1
- package/dist/client/assets/{use-autosave-DCyEvO0j.js → use-autosave-Bz5jGLfF.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-wJjkzkeX.js → use-chat-layout-state-DIXRUqxC.js} +1 -1
- package/dist/client/assets/{use-clock-tick-N15XxKsH.js → use-clock-tick-DxI4Q15z.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Ba42J8md.js → use-cms-publish-actions-B4udZvVh.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DnBPIlmE.js → use-connect-companion--zaBR_LA.js} +1 -1
- package/dist/client/assets/{use-connection-BBWQ1upy.js → use-connection-ClhLV4Ep.js} +1 -1
- package/dist/client/assets/{use-copy-Bnv2yRR0.js → use-copy-BCht-61u.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CLc8yu5S.js → use-create-virtual-mcp-8KmID2cx.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Br988cT0.js → use-date-fns-locale-U4hMTG7h.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-GFM4KrwH.js → use-debounced-autosave-ffUOSkED.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DLa-riOh.js → use-debounced-value-ZtANdTDD.js} +1 -1
- package/dist/client/assets/{use-deco-credits-3I0Gmtle.js → use-deco-credits-D7afhnU-.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C6bScbXe.js → use-decopilot-events-hbubA99f.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BZQtBcN0.js → use-delete-connection-bB2dgA1j.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D2xZ3EVY.js → use-deployment-admin-Cjac4tJB.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DRBVlysi.js → use-fast-preview-draft-url-CoOfoUO_.js} +1 -1
- package/dist/client/assets/{use-file-configs-EhGCWGKO.js → use-file-configs-DI3WjDeq.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-MI8GAssc.js → use-inbox-feed-SND00l1M.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Dl4ppp1T.js → use-infinite-scroll-CuF9Fnt8.js} +1 -1
- package/dist/client/assets/{use-join-requests-D0RX0KVp.js → use-join-requests-BwDlu4Gp.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Dy6OYkJL.js → use-main-panel-tabs-D5k7CyBc.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BLS8Hv4S.js → use-mcp-auth-status-BwPujbq3.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DwqRqgyq.js → use-mcp-client-CkAT8dMu.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-l19k-bhU.js → use-mcp-prompts-BoifdA0D.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CNG9BIav.js → use-mcp-tools-CIUeYaBw.js} +1 -1
- package/dist/client/assets/{use-mobile-BwQy16Q6.js → use-mobile-tv6dKHC3.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Crj0de_N.js → use-move-blocks-BaNRn466.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BK5-GF4Q.js → use-navigate-to-agent-BiKQMaG5.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BQr-ZtMF.js → use-open-billing-url-6v7Ht1P5.js} +1 -1
- package/dist/client/assets/{use-org-fs-DLZ1-PTn.js → use-org-fs-ao97Epgk.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CDoF8IOA.js → use-org-repo-syncs-DOPL9gym.js} +1 -1
- package/dist/client/assets/{use-org-sso-C-qEDq8K.js → use-org-sso-BK4EESlq.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D0H2tUJi.js → use-organization-roles-CohiN23I.js} +1 -1
- package/dist/client/assets/{use-organization-settings-kq9jLGY0.js → use-organization-settings-6EqlUT2Y.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BECpOul-.js → use-panel-navigate-CTWNyrxK.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-1uAz-ylt.js → use-project-native-view-presence-B6fZ68Vq.js} +1 -1
- package/dist/client/assets/{use-project-scope-DQZacSdf.js → use-project-scope-BgLQY0Uk.js} +1 -1
- package/dist/client/assets/{use-recent-apps-ujQcGW4R.js → use-recent-apps-Bpx38utr.js} +1 -1
- package/dist/client/assets/{use-releases-Brr6nY5b.js → use-releases-t7sfkrxl.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CSbUL_Ki.js → use-reports-diagnostic-B3Bb0bBM.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DDEe74Lx.js → use-sandbox-events-Ccm6tkYH.js} +1 -1
- package/dist/client/assets/{use-secrets-B-wd58Sw.js → use-secrets-Cu0JnUiZ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CyvlvXKC.js → use-section-preview-base-DFCMtdhN.js} +1 -1
- package/dist/client/assets/{use-session-runtime-oQf5p7F0.js → use-session-runtime-pkeEtIbf.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CQxN5Dgl.js → use-sidebar-collapsed-BwFu6Qgg.js} +1 -1
- package/dist/client/assets/{use-tags-Ckwl5Ic8.js → use-tags-M_iZ_HOI.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CxJm3obr.js → use-task-board-analytics-BjOmg5HS.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C11vdnOU.js → use-task-board-events-DGIxUFSu.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-OoBVrY5e.js → use-task-board-item-prs-BHe2zSmu.js} +1 -1
- package/dist/client/assets/{use-task-metadata-B5vxvrwt.js → use-task-metadata-D2I0K9KW.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Ccey92kA.js → use-thread-analytics-Bq-Ku2nN.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-AtJj5nDf.js → use-thread-outputs-am5Vd3rC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-LBIaZPt-.js +1 -0
- package/dist/client/assets/{useQueries-DwNBQmnp.js → useQueries-Chr0IN_s.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ClnVveRy.js +1 -0
- package/dist/client/assets/{users-47U5EmUY.js → users-CfXhQF2t.js} +1 -1
- package/dist/client/assets/{utils-CLU7TQYj.js → utils-Chh_XkCj.js} +1 -1
- package/dist/client/assets/{variant-calendar-8QsQaZXX.js → variant-calendar-DXW-UB5g.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-VqVKqAN8.js → variant-matcher-override-DV7ZKzex.js} +1 -1
- package/dist/client/assets/{view-header-C8Yesx7u.js → view-header-ECu4qrb6.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BO25j0IY.js → virtual-mcp-2K3oYMwm.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DZPVglNq.js → watch-sse-pool-B-0VhxE7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-BIR7Elpu.js +0 -1
- package/dist/client/assets/agent-app-BY_sxPgf.js +0 -1
- package/dist/client/assets/agent-deck-O9lG5hoA.js +0 -1
- package/dist/client/assets/agent-experiments-BI2FazYu.js +0 -1
- package/dist/client/assets/agent-library-CkANn3L_.js +0 -1
- package/dist/client/assets/agent-library-file-WsrEoVuH.js +0 -1
- package/dist/client/assets/agent-monitor-B02h5NLr.js +0 -1
- package/dist/client/assets/agent-settings-LRXrMwgi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CkH40Rf7.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Cr-1q_qf.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BtO7VQJF.js +0 -1
- package/dist/client/assets/agent-view-JeA7v4l-.js +0 -1
- package/dist/client/assets/analytics-tab-CZkiyMbX.js +0 -2
- package/dist/client/assets/api-keys-D5vUfJru.js +0 -1
- package/dist/client/assets/library-DG80ymId.js +0 -1
- package/dist/client/assets/mock-board-BMi5jY8O.js +0 -81
- package/dist/client/assets/project-reports-B-dKM4cz.js +0 -1
- package/dist/client/assets/project-tasks-CQ6MOp0o.js +0 -1
- package/dist/client/assets/record-editor-CHzxFRQb.js +0 -1
- package/dist/client/assets/reports-CDn9xmoF.js +0 -1
- package/dist/client/assets/repositories-jqcTJr-Z.js +0 -1
- package/dist/client/assets/route-JsLO4TKF.js +0 -1
- package/dist/client/assets/settings-tab-DBT9iC5q.js +0 -1
- package/dist/client/assets/site-editor-CFIZ4rer.js +0 -1
- package/dist/client/assets/tasks-BVwsk6i_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B3ME351M.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdTGZQmz.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-D6lKvaoF.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
1
|
+
import{c9 as v,ca as $,cb as W,cc as H,cd as D,ce as y,cf as V,cg as x,ch as L,ci as j,cj as q,ck as N,cl as B,cm as Z,cn as F}from"./index-C8YP0XfX.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-C8YP0XfX.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./mcp-oauth-
|
|
1
|
+
import{a as u}from"./mcp-oauth-CsfxxKaN.js";import{i as p}from"./mcp-oauth-D-fSN__A.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await p({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await u({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-D74lyjQr.js → automation-list-row-CTExE_83.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,b as J,r as ee,l as q,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-
|
|
1
|
+
import{c as G,b as J,r as ee,l as q,j as t,V as te,B as se,Z as ie,Y as ne,X as ae,aM as oe,aN as le,aO as re,aP as ce,bm as me,aQ as ue,aR as de,aS as fe}from"./index-C8YP0XfX.js";import{B as ge}from"./badge-AFOqFwvQ.js";import{A as xe,U as pe}from"./agent-icon-B7Q7dFXY.js";import{i as he}from"./DotsVertical-Bfe9a_On.js";import{s as je}from"./Trash01-BqP8uw7k.js";import{i as we}from"./ZoomOut-BVuJZ-2t.js";import{c as _e}from"./repository-binding-B-4PI1n3.js";import{a as ve}from"./use-automations-DO79ln3M.js";function ze(c){const e=G.c(89),{automation:s,showAgent:o,onClick:n}=c,i=J(),{remove:a}=ve(),[r,H]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let E;e[0]!==s.id||e[1]!==a?(E=()=>{a.mutate(s.id),H(!1)},e[0]=s.id,e[1]=a,e[2]=E):E=e[2];const Q=E;let F;e[3]!==n?(F=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=F):F=e[4];const U=F,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=q("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const Y=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Y?(d=i(Y),e[7]=i,e[8]=Y,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(xe,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let w;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(w=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=w):w=e[32];let _;e[33]!==j||e[34]!==w?(_=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,w]}),e[33]=j,e[34]=w,e[35]=_):_=e[35];const Z=s.system_key&&"invisible";let v;e[36]!==Z?(v=q("shrink-0",Z),e[36]=Z,e[37]=v):v=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=$):$=e[38];let K,I;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),H(!0)},I=t.jsx(je,{size:16}),e[39]=K,e[40]=I):(K=e[39],I=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[$,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:K,children:[I,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let R;e[48]!==U||e[49]!==n||e[50]!==_||e[51]!==D||e[52]!==f||e[53]!==g?(R=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:U,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,_,D]}),e[48]=U,e[49]=n,e[50]=_,e[51]=D,e[52]=f,e[53]=g,e[54]=R):R=e[54];let N;e[55]!==i?(N=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=N):N=e[56];let k;e[57]!==N?(k=t.jsx(oe,{children:N}),e[57]=N,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==Q||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:Q,disabled:W,variant:"destructive",children:z}),e[73]=Q,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let O;e[83]!==r||e[84]!==S?(O=t.jsx(fe,{open:r,onOpenChange:H,children:S}),e[83]=r,e[84]=S,e[85]=O):O=e[85];let V;return e[86]!==R||e[87]!==O?(V=t.jsxs(t.Fragment,{children:[R,O]}),e[86]=R,e[87]=O,e[88]=V):V=e[88],V}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=G.c(8),{triggerCount:s,nextRunAt:o}=c,n=J();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:o?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(we,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ze as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-D6lKvaoF.js";import{u as xt}from"./useInfiniteQuery-B3ME351M.js";import{u as pt}from"./use-connection-BBWQ1upy.js";import{u as gt}from"./use-mcp-client-DwqRqgyq.js";import{b as ht}from"./repository-binding-DG0YfJ0p.js";import{b as Rt,a as jt}from"./sheet-BXLIoGMZ.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-CSNuDYSH.js";import{E as et}from"./empty-state-TJAbP9DT.js";import{u as St}from"./use-infinite-scroll-Dl4ppp1T.js";import{g as vt}from"./task-status-CqFVxY8B.js";import{e as Ct}from"./use-automations-CRFTJK4f.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-Brz-5Xzp.js";function wt(c){const t=V.c(15),[i,r]=ot.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
1
|
+
import{c as V,r as ot,b as X,a4 as it,R as rt,aq as ct,b4 as ut,K as tt,j as s,l as mt,m as dt,gn as ft}from"./index-C8YP0XfX.js";import{u as xt}from"./useInfiniteQuery-LBIaZPt-.js";import{u as pt}from"./use-connection-ClhLV4Ep.js";import{u as gt}from"./use-mcp-client-CkAT8dMu.js";import{b as ht}from"./repository-binding-B-4PI1n3.js";import{b as Rt,a as jt}from"./sheet-ko7a2Uwq.js";import{e as Nt,a as bt,b as st,T as G,d as Tt,c as Q}from"./table-CIbHZF2_.js";import{E as et}from"./empty-state-CUanQ9Sm.js";import{u as St}from"./use-infinite-scroll-CuF9Fnt8.js";import{g as vt}from"./task-status-Ch8fGpdY.js";import{e as Ct}from"./use-automations-DO79ln3M.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-BZhXd8vN.js";function wt(c){const t=V.c(15),[i,r]=ot.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,l=a!==-1?c[a]:null,n=l!==null;let o,C;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=u=>r(u),C=()=>r(null),t[3]=o,t[4]=C):(o=t[3],C=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let d;return t[9]!==a||t[10]!==l||t[11]!==n||t[12]!==f||t[13]!==x?(d={selected:l,index:a,isOpen:n,select:o,close:C,prev:f,next:x},t[9]=a,t[10]=l,t[11]=n,t[12]=f,t[13]=x,t[14]=d):d=t[14],d}const W=50;function Y(c){const t=V.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let l;t[2]!==r?(l=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=l):l=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let o;return t[6]!==a||t[7]!==l||t[8]!==n?(o=s.jsxs(ft,{className:"pt-4 px-4 pb-5 gap-1",children:[a,l,n]}),t[6]=a,t[7]=l,t[8]=n,t[9]=o):o=t[9],o}function yt(c){const t=V.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:l}=Ct(i,r),n=a?.runs,o=a?.usage;let C;t[0]!==n?(C=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=C):C=t[1];const f=C;let x;t[2]!==e||t[3]!==o?(x=o&&o.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:o.sampledRuns}):void 0,t[2]=e,t[3]=o,t[4]=x):x=t[4];const d=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==l||t[8]!==n?.total?(g=l?"…":n?.total.toLocaleString()??"0",t[7]=l,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const y=l?"…":f;let I;t[19]!==T||t[20]!==y?(I=s.jsx(Y,{title:T,value:y}),t[19]=T,t[20]=y,t[21]=I):I=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==l||t[25]!==o?.totalTokens?(p=l?"…":at(o?.totalTokens??0),t[24]=l,t[25]=o?.totalTokens,t[26]=p):p=t[26];let w;t[27]!==S||t[28]!==p||t[29]!==d?(w=s.jsx(Y,{title:S,value:p,subtitle:d}),t[27]=S,t[28]=p,t[29]=d,t[30]=w):w=t[30];let m;t[31]!==e?(m=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=m):m=t[32];let j;t[33]!==l||t[34]!==o?(j=l?"…":o&&o.costUsd>0?nt(o.costUsd):"—",t[33]=l,t[34]=o,t[35]=j):j=t[35];let v;t[36]!==m||t[37]!==j||t[38]!==d?(v=s.jsx(Y,{title:m,value:j,subtitle:d}),t[36]=m,t[37]=j,t[38]=d,t[39]=v):v=t[39];let N;return t[40]!==w||t[41]!==v||t[42]!==R||t[43]!==I?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,I,w,v]}),t[40]=w,t[41]=v,t[42]=R,t[43]=I,t[44]=N):N=t[44],N}function _t(c){const t=V.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,l=X();let n,o;if(t[0]!==i.created_at){const k=new Date(i.created_at);n=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),o=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=o}else n=t[1],o=t[2];const C=o;let f,x,d,u,g,h,R,T,y,I,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==l){const k=vt(i.status),U=k.icon;x=st,y=a,I="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",S=e,t[19]!==i.title?(d=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=d):d=t[20],f=Q,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:k.iconClassName}),u=mt("text-sm",k.labelColor),g=l(k.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=l,t[8]=f,t[9]=x,t[10]=d,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=y,t[17]=I,t[18]=S}else f=t[8],x=t[9],d=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],y=t[16],I=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let w;t[24]!==p||t[25]!==h||t[26]!==R?(w=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=w):w=t[27];let m;t[28]!==f||t[29]!==w||t[30]!==T?(m=s.jsx(f,{className:T,children:w}),t[28]=f,t[29]=w,t[30]=T,t[31]=m):m=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let _;t[38]!==N?(_=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=_):_=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let P;t[42]!==C?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:C}),t[42]=C,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let $;return t[47]!==x||t[48]!==d||t[49]!==m||t[50]!==v||t[51]!==_||t[52]!==E||t[53]!==y||t[54]!==I||t[55]!==S?($=s.jsxs(x,{ref:y,className:I,onClick:S,children:[d,m,v,_,E]}),t[47]=x,t[48]=d,t[49]=m,t[50]=v,t[51]=_,t[52]=E,t[53]=y,t[54]=I,t[55]=S,t[56]=$):$=t[56],$}function Vt(c){const t=V.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:l,locator:n}=it();let o;t[0]!==l.id||t[1]!==l.slug?(o={connectionId:rt,orgId:l.id,orgSlug:l.slug},t[0]=l.id,t[1]=l.slug,t[2]=o):o=t[2];const C=gt(o),f=ct(),x=pt(),d=ht(),{data:u}=ut(),g=r.length>0;let h;t[3]!==i||t[4]!==l.id||t[5]!==r?(h=tt.automationRuns(l.id,i,r),t[3]=i,t[4]=l.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async M=>{const{pageParam:J}=M,lt=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:lt,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:y,fetchNextPage:I,hasNextPage:S,isFetchingNextPage:p,isLoading:w}=xt(T);let m,j,v,N;t[14]!==y?.pages||t[15]!==n||t[16]!==e?(m=(y?.pages??[]).flatMap(Dt),N=m.map(kt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=y?.pages,t[15]=n,t[16]=e,t[17]=m,t[18]=j,t[19]=v,t[20]=N):(m=t[17],j=t[18],v=t[19],N=t[20]);let _;t[21]!==e||t[22]!==f||t[23]!==N?(_=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=_):_=t[24];const D=N.length>0;let P;t[25]!==j||t[26]!==_||t[27]!==D?(P={queryKey:j,queryFn:_,enabled:D,staleTime:3e4},t[25]=j,t[26]=_,t[27]=D,t[28]=P):P=t[28];const{data:E}=v(P);let $;t[29]!==E?.items?($=new Map((E?.items??[]).map(Pt)),t[29]=E?.items,t[30]=$):$=t[30];const k=$;let U;t[31]!==I||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&I()},t[31]=I,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=St(U,S??!1,p),b=wt(m),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(yt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==w||t[40]!==Z||t[41]!==m||t[42]!==b||t[43]!==a||t[44]!==k?(O=g?w?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):m.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(Nt,{className:"w-full border-collapse",children:[s.jsx(bt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 font-normal text-meta",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:m.map((M,J)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:J===m.length-1?Z:void 0},M.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=w,t[40]=Z,t[41]=m,t[42]=b,t[43]=a,t[44]=k,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=M=>{M||b.close()},t[49]=b,t[50]=H):H=t[50];let q;t[51]!==x||t[52]!==d||t[53]!==C||t[54]!==n||t[55]!==u||t[56]!==m||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(q=B&&s.jsx(It,{thread:B,client:C,locator:n,connections:x,virtualMcps:d,members:u,nav:{index:b.index,total:m.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=d,t[53]=C,t[54]=n,t[55]=u,t[56]=m,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=q):q=t[61];let K;t[62]!==q?(K=s.jsx(jt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:q}),t[62]=q,t[63]=K):K=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==K?(F=s.jsx(Rt,{open:b.isOpen,onOpenChange:H,children:K}),t[64]=b.isOpen,t[65]=H,t[66]=K,t[67]=F):F=t[67];let z;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(z=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=z):z=t[72],z}function Pt(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function kt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Vt as A,wt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a4 as D,d as M,r as q,n as d,B as V,gX as X,C as R}from"./index-C8YP0XfX.js";import{s as F}from"./Plus-Bh_xMwh7.js";import{i as S}from"./ZoomOut-BVuJZ-2t.js";import{S as G}from"./search-input-CIT_dMpA.js";import{E as T}from"./empty-state-CUanQ9Sm.js";import{u as H}from"./use-automations-DO79ln3M.js";import{u as J}from"./use-navigate-to-agent-BiKQMaG5.js";import{A as K}from"./automation-list-row-CTExE_83.js";import{b as O}from"./repository-binding-B-4PI1n3.js";import{R as Q}from"./require-capability-C7aMGT2m.js";import"./SearchMd-DB3np2ti.js";import"./use-mcp-client-CkAT8dMu.js";import"./auth-fndLm_KR.js";import"./thread-intent-Cl7xa7dA.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-B-0VhxE7.js";import"./task-board-u5TablbK.js";import"./schema-CFje17_E.js";import"./slugify-CEUa2lfQ.js";import"./badge-AFOqFwvQ.js";import"./agent-icon-B7Q7dFXY.js";import"./AlertCircle-C0U53qC5.js";import"./Tool01-CTKnipD_.js";import"./ArrowUp-BnowdRj-.js";import"./ArrowLeft-BVJNIiuT.js";import"./LinkBroken01-BZrnscWF.js";import"./ShoppingBag01-BaMIB-e_.js";import"./Building02-CcI-P3yL.js";import"./CheckCircle-fAPMl2yd.js";import"./ChevronUp-BMY88wXt.js";import"./ChevronSelectorVertical-C-CIIDml.js";import"./UserSquare-D4xudMmb.js";import"./Copy01-DGy0Absz.js";import"./CreditCard01-DsjBhiEj.js";import"./DotsVertical-Bfe9a_On.js";import"./Image01-DtpDUrwF.js";import"./Globe04-B-sNlZxN.js";import"./SwitchHorizontal01-fMsLFMs0.js";import"./Key01-DifqnYu0.js";import"./Link01-oZZyGItc.js";import"./Minus-Dc5wow6R.js";import"./Monitor01-Bmn1BV5T.js";import"./Sun-BZlKwpGn.js";import"./Play-IViIK9Vy.js";import"./Trash01-BqP8uw7k.js";import"./Upload01-CpPArzNK.js";import"./Users01-buCmBl1X.js";import"./XClose-D48r2tDo.js";import"./access-gate-DBOVcx9J.js";import"./capability-load-error-Bn9e6-bb.js";function U(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=H(void 0),g=y===void 0?[]:y,E=O(),P=J(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(W)),b=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const l=A.get(i.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(i,l)=>{const N=l&&A.has(l)?l:X(c.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),P(N,{panel:`automation:${i}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,v=d,C=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(G,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(F,{size:14}),o("settings.automations.browseAgentsButton")]})})}):b.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:b.map(i=>e.jsx(K,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==C.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(C.Container,{children:[n,_]}),t[10]=C.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function W(t){return[t.id,t]}function Qt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(Q,{capability:"automations:manage",area:"automations",children:e.jsx(U,{})}),t[0]=o):o=t[0],o}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{az as d}from"./index-
|
|
1
|
+
import{az as d}from"./index-C8YP0XfX.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l,j as u,cr as c,cs as p}from"./index-
|
|
1
|
+
import{c as b,l,j as u,cr as c,cs as p}from"./index-C8YP0XfX.js";const v=p("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=l(v({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=u.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as L,l as ne,j as s,I as Ht,b as O,r as G,K as Gt,m as qt,ai as Kt,h as Vt,B as Oe}from"./index-D6lKvaoF.js";import{u as ct,a as _e,K as dt,P as ut,D as ft,c as mt,C as xt}from"./core.esm-n2M8kvjD.js";import{s as pt,a as gt,S as ht,r as Jt,u as bt,v as Yt}from"./sortable.esm-DEhQR8uW.js";import{s as Fe}from"./Plus-CZXpdtEH.js";import{v as Wt,w as Qt,c as E,x as Xt,l as Zt,F as Me,I as ae,y as he,R as ue,A as fe,z as vt,B as jt,D as el,b as tl,G as ll,H as de,J as sl,K as ol}from"./content-tab-DneBUwU0.js";import{a as Qe,b as nl,e as rl,C as il,c as al,d as cl}from"./command-yWHdaNhz.js";import{a as dl,b as ul,P as fl}from"./popover-0uuKFwAZ.js";import{aG as ml,aI as xl,ao as pl,a0 as gl,a7 as hl,M as He,ag as kt,ah as yt,ai as Nt,aj as bl,an as Ct}from"./agent-icon-D8I51g86.js";import{a as vl}from"./Copy01-DMa3yAGL.js";import{s as Ue}from"./Trash01-fFkz00Bo.js";import{u as Ge,s as qe,a as Ke,b as Ve}from"./usage-stats-C7wY64zK.js";import{s as Je}from"./suggestion-Bx_JdcJG.js";import{E as Ye,T as Ae,R as Bt}from"./editor-classes-BnQ0j7aI.js";import{b as jl,i as kl,a as yl}from"./ZoomOut-CbRHTtaG.js";import{w as St}from"./section-preview-url-7zfngvgW.js";import{I as Nl,u as Cl,k as Bl}from"./parse-sections-CQtk5pOz.js";import{r as Sl,b as wl,i as Pl,p as _l,u as wt,P as Pt}from"./product-picker-dialog-C4MqsCUp.js";import{B as $l}from"./index-CPx4iDWN.js";import{T as Tl,a as Il,c as Ll}from"./tooltip-LAilTl9w.js";import{a as _t}from"./Image01-C1LM4LI_.js";import{i as Rl}from"./Link01-C15xvQCb.js";import{i as El}from"./Monitor01-DkBo0gFa.js";import{L as be}from"./label-G1B1MWwD.js";import{U as Xe,V as Al,W as zl,X as Ol,Y as Ul,Z as Dl,_ as Fl,$ as Ml}from"./held-block-view-OUun6HKW.js";import{s as Hl}from"./XClose-Bl8OQypT.js";import{S as Gl}from"./blog-schema-BfjxCL-D.js";function ee(g){const e=L.c(8),{active:t,label:r,onClick:l,children:o}=g,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground";let a;e[0]!==i?(a=ne("flex h-7 min-w-7 items-center justify-center px-1.5 text-sm transition-colors cursor-pointer rounded-[var(--studio-control-radius,var(--radius))]",i),e[0]=i,e[1]=a):a=e[1];let m;return e[2]!==t||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==a?(m=s.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:ql,onClick:l,className:a,children:o}),e[2]=t,e[3]=o,e[4]=r,e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function ql(g){return g.preventDefault()}function Ze(){const g=L.c(1);let e;return g[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{"aria-hidden":!0,className:"mx-0.5 h-5 w-px bg-border"}),g[0]=e):e=g[0],e}function Kl(g){const e=L.c(17),{draft:t,notice:r,label:l,placeholder:o,onDraftChange:i,onCommit:a,onCancel:m}=g;let f;e[0]!==i?(f=n=>i(n.target.value),e[0]=i,e[1]=f):f=e[1];let u;e[2]!==m||e[3]!==a?(u=n=>{n.key==="Escape"&&m(),n.key==="Enter"&&a()},e[2]=m,e[3]=a,e[4]=u):u=e[4];let p;e[5]!==t||e[6]!==l||e[7]!==a||e[8]!==o||e[9]!==f||e[10]!==u?(p=s.jsx(Ht,{autoFocus:!0,type:"url",value:t,onChange:f,onBlur:a,onKeyDown:u,placeholder:o,spellCheck:!1,"aria-label":l,className:"h-8 w-full text-xs"}),e[5]=t,e[6]=l,e[7]=a,e[8]=o,e[9]=f,e[10]=u,e[11]=p):p=e[11];let b;e[12]!==r?(b=r&&s.jsx("p",{role:"alert",className:"px-1 pb-0.5 pt-1.5 text-xs text-destructive",children:r}),e[12]=r,e[13]=b):b=e[13];let h;return e[14]!==p||e[15]!==b?(h=s.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 w-96 rounded-[var(--studio-surface-radius,var(--radius-md))] bg-popover p-1 shadow-soft",children:[p,b]}),e[14]=p,e[15]=b,e[16]=h):h=e[16],h}function Vl(g){const e=L.c(74),{value:t,mobileValue:r,onChange:l,onMobileChange:o,label:i,alt:a,toolbarExtras:m,sandbox:f}=g,u=O(),[p,b]=G.useState(!1),[h,n]=G.useState(!1),[c,d]=G.useState(null),[x,v]=G.useState(null),j=c!==null,[N,k]=G.useState(null),y=Jl,w=y(r),S=p?w:y(t),C=Xe(S),P=!!S&&(N===S||!C),_=Al(C);let $;e[0]!==p||e[1]!==u?($=u(p?"sectionsEditor.imageField.mobileUrlLabel":"sectionsEditor.imageField.urlLabel"),e[0]=p,e[1]=u,e[2]=$):$=e[2];const B=$;let I;e[3]!==l||e[4]!==p||e[5]!==o?(I=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=I):I=e[6];const T=I,z=`${p?"mobile":"desktop"}:${S}`,[U,F]=G.useState(z);U!==z&&(F(z),c!==null&&(d(S),v(null)));let H;e[7]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{d(null),v(null)},e[7]=H):H=e[7];const R=H,Y=()=>{const Z=c??"",Ee=Xe(Z);return!Ee&&Z.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Ee!==S&&T(Ee||void 0),!0)};let J;e[8]!==R||e[9]!==Y?(J=()=>{Y()&&R()},e[8]=R,e[9]=Y,e[10]=J):J=e[10];const W=J,re=()=>{j?W():d(S)};let se;e[11]!==Y||e[12]!==j?(se=Z=>{j&&!Y()||b(Z)},e[11]=Y,e[12]=j,e[13]=se):se=e[13];const Q=se,ie=f?.siteSlug;let te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=()=>n(!0),e[14]=te):te=e[14];let X;e[15]!==T||e[16]!==ie?(X={siteSlug:ie,onUploaded:T,onNeedsPicker:te},e[15]=T,e[16]=ie,e[17]=X):X=e[17];const{isDragging:M,isPending:A,lockedConfigId:V,dropProps:D}=zl(X);let K;e[18]!==i?(K=i&&s.jsx(be,{className:"text-muted-foreground",children:i}),e[18]=i,e[19]=K):K=e[19];let q;e[20]!==m?(q=m&&s.jsx(Ze,{}),e[20]=m,e[21]=q):q=e[21];const oe=!p;let ce;e[22]!==u?(ce=u("sectionsEditor.imageField.desktopSlot"),e[22]=u,e[23]=ce):ce=e[23];let le;e[24]!==Q?(le=()=>Q(!1),e[24]=Q,e[25]=le):le=e[25];let ve;e[26]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(El,{size:14}),e[26]=ve):ve=e[26];let je;e[27]!==oe||e[28]!==ce||e[29]!==le?(je=s.jsx(ee,{active:oe,label:ce,onClick:le,children:ve}),e[27]=oe,e[28]=ce,e[29]=le,e[30]=je):je=e[30];let ke;e[31]!==u?(ke=u("sectionsEditor.imageField.mobileSlot"),e[31]=u,e[32]=ke):ke=e[32];let ye;e[33]!==Q?(ye=()=>Q(!0),e[33]=Q,e[34]=ye):ye=e[34];let Ne;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(Rl,{size:14}),e[35]=Ne):Ne=e[35];let Ce;e[36]!==re||e[37]!==B||e[38]!==j?(Ce=s.jsx(ee,{active:j,label:B,onClick:re,children:Ne}),e[36]=re,e[37]=B,e[38]=j,e[39]=Ce):Ce=e[39];let Be;e[40]!==R||e[41]!==W||e[42]!==u||e[43]!==c||e[44]!==B||e[45]!==x?(Be=c!==null&&s.jsx(Kl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:Z=>{v(null),d(Z)},onCommit:W,onCancel:R}),e[40]=R,e[41]=W,e[42]=u,e[43]=c,e[44]=B,e[45]=x,e[46]=Be):Be=e[46];let Se;e[47]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>n(!0),e[47]=Se):Se=e[47];let me;e[48]!==u?(me=u("sectionsEditor.imageField.replaceImage"),e[48]=u,e[49]=me):me=e[49];const Ie=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Le=M&&"ring-2 ring-primary/40",Re=A&&"pointer-events-none opacity-60";let xe;e[50]!==Ie||e[51]!==Le||e[52]!==Re?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Ie,Le,Re),e[50]=Ie,e[51]=Le,e[52]=Re,e[53]=xe):xe=e[53];let pe;e[54]!==S||e[55]!==a||e[56]!==P||e[57]!==A||e[58]!==p||e[59]!==C||e[60]!==u?(pe=C&&!P?s.jsx("img",{src:C,alt:a??"",onError:()=>k(S),className:"block h-auto w-full"}):s.jsxs("span",{className:"flex h-32 w-full flex-col items-center justify-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(_t,{size:20}),u(A?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[54]=S,e[55]=a,e[56]=P,e[57]=A,e[58]=p,e[59]=C,e[60]=u,e[61]=pe):pe=e[61];let ge;e[62]!==M||e[63]!==u?(ge=M&&s.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:s.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:u("sectionsEditor.imageField.dropToUpload")})}),e[62]=M,e[63]=u,e[64]=ge):ge=e[64];let we;e[65]!==me||e[66]!==xe||e[67]!==pe||e[68]!==ge?(we=s.jsxs("button",{type:"button",onClick:Se,"aria-label":me,className:xe,children:[pe,ge]}),e[65]=me,e[66]=xe,e[67]=pe,e[68]=ge,e[69]=we):we=e[69];let Pe;return e[70]!==V||e[71]!==h||e[72]!==T?(Pe=s.jsx(Dl,{open:h,onOpenChange:n,mode:"image",onSelect:T,lockedConfigId:V}),e[70]=V,e[71]=h,e[72]=T,e[73]=Pe):Pe=e[73],s.jsxs("div",{...D,className:"group/image relative space-y-2",children:[K,s.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center",children:s.jsxs("div",{className:"pointer-events-none relative flex items-center gap-0.5 rounded-md bg-popover p-0.5 opacity-0 shadow-soft transition-opacity group-hover/image:pointer-events-auto group-hover/image:opacity-100 group-focus-within/image:pointer-events-auto group-focus-within/image:opacity-100",children:[m,q,je,s.jsx(ee,{active:p,label:ke,onClick:ye,children:s.jsx(ml,{size:14,className:ne(w&&"text-primary")})}),Ce,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Ze,{}),Ol.map(Z=>s.jsx(ee,{active:_===Z,label:Z,onClick:()=>T(Ul(C,_===Z?void 0:Z)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:Z})},Z))]}),Be]})}),we,Pe]})}function Jl(g){return typeof g=="string"?g:""}const Te=g=>typeof g=="string"?g:"",Yl=/\/blog\.tsx?$/;function $t(g,e){for(const[t,r]of Object.entries(g)){if(t.includes("/")||!r||typeof r!="object"||Array.isArray(r))continue;const l=r;if(typeof l.__resolveType!="string"||!Yl.test(l.__resolveType))continue;const o=Te(l[e]);if(o)return o}return null}function Wl(g,e){if(!g||typeof g!="object"||Array.isArray(g))return null;const t=g;return typeof t.__resolveType!="string"||!Nl(t.__resolveType,e)?null:typeof t.path=="string"?t.path:null}function Ql(g){return Cl(g).filter(e=>e!=="*").length}function Tt(g,e,t){let r=null,l=Number.POSITIVE_INFINITY;for(const o of Object.values(g)){const i=Wl(o,t);if(!i||!e.test(JSON.stringify(o)))continue;const a=Ql(i);a<l&&(r=i,l=a)}return r}const Xl=/blogpostpage/i,Zl=/blogcategorypage/i;function It(g,e){return $t(g,"pageSlug")??Tt(g,Xl,e)}function es(g,e){return $t(g,"categorySlug")??Tt(g,Zl,e)}function ts(g){const e=g.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return Te(t?.slug)}function Lt(g,e){let t=g;if(/:category[*?]?/.test(t)){if(!e.category)return null;t=t.replace(/:category[*?]?/g,De(e.category))}if(/:slug[*?]?/.test(t)){if(!e.slug)return null;t=t.replace(/:slug[*?]?/g,encodeURIComponent(e.slug))}return t}const et=/:(?:categorySlug|categoria|category|slug)[*?]?/,ls=/:(?:categorySlug|categoria|category|slug)[*?]?/g;function Rt(g,e=!1){return/:(?:categorySlug|categoria|category)\*|\/\*$/.test(g)?!0:e&&/:slug\*/.test(g)&&!/:(?:categorySlug|categoria|category)[*?]?/.test(g)}function De(g){return g.split("/").filter(e=>e!=="."&&e!=="..").map(encodeURIComponent).join("/")}function Et(g,e){if(!e)return"";const t=Wt(g).categories;return Qt(e,t).join("/")}function ss(g,e){return/\/\*$/.test(g)&&!et.test(g)?e?g.replace(/\/\*$/,`/${De(e)}`):null:et.test(g)?e?g.replace(ls,De(e)):null:g}function Eo({decofile:g,category:e,previewBaseUrl:t,draftPointer:r,meta:l}){if(!t)return null;const o=es(g,l);if(!o)return null;const i=Te(e.slug),a=ss(o,Rt(o,!0)?Et(g,i):i);if(!a)return null;try{return St(new URL(a,t).href,r)}catch{return null}}function Ao({decofile:g,post:e,previewBaseUrl:t,draftPointer:r,meta:l}){if(!t)return null;const o=It(g,l);if(!o)return null;const i=ts(e),a=Lt(o,{category:Rt(o)?Et(g,i):i,slug:Te(e.slug)});if(!a)return null;try{return St(new URL(a,t).href,r)}catch{return null}}function At(g){const e=L.c(12),{iconName:t,iconUrl:r,alt:l,className:o,size:i}=g,a=i===void 0?16:i;let m;e[0]!==t?(m=pl(t)??xl,e[0]=t,e[1]=m):m=e[1];const f=m;let u;e[2]!==o?(u=ne("flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",o),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==f||e[5]!==l||e[6]!==r||e[7]!==a?(p=r?s.jsx("img",{src:r,alt:l,className:"size-5 object-contain"}):s.jsx(f,{size:a,className:"text-muted-foreground"}),e[4]=f,e[5]=l,e[6]=r,e[7]=a,e[8]=p):p=e[8];let b;return e[9]!==u||e[10]!==p?(b=s.jsx("div",{className:u,children:p}),e[9]=u,e[10]=p,e[11]=b):b=e[11],b}const tt={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function lt(g){const e=L.c(19),{type:t,onInsert:r}=g,l=`${t.title} ${t.resolveType} ${t.description??""}`;let o;e[0]!==r||e[1]!==t.resolveType?(o=()=>r(t.resolveType),e[0]=r,e[1]=t.resolveType,e[2]=o):o=e[2];let i;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(i=s.jsx(At,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=i):i=e[6];let a;e[7]!==t.title?(a=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=a):a=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==m?(f=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a,m]}),e[11]=a,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l||e[15]!==o||e[16]!==i||e[17]!==f?(u=s.jsxs(nl,{value:l,onSelect:o,className:"flex items-center gap-2.5",children:[i,f]}),e[14]=l,e[15]=o,e[16]=i,e[17]=f,e[18]=u):u=e[18],u}function zt(g){const e=L.c(41),{blockTypes:t,onInsert:r,children:l,align:o}=g,i=o===void 0?"start":o,a=O(),[m,f]=G.useState(!1),[u,p]=G.useState(null);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=T=>{T&&typeof document<"u"&&p(document.querySelector('[data-slot="dialog-content"][data-state="open"]')),f(T)},e[0]=b):b=e[0];const h=b;let n,c;if(e[1]!==t){n=[],c=[];for(const T of t)(T.source==="site"?c:n).push(T);e[1]=t,e[2]=n,e[3]=c}else n=e[2],c=e[3];let d;e[4]!==r?(d=T=>{r(T),f(!1)},e[4]=r,e[5]=d):d=e[5];const x=d,v=n.length>0&&c.length>0;let j;e[6]!==l?(j=s.jsx(dl,{asChild:!0,children:l}),e[6]=l,e[7]=j):j=e[7];const N=u??void 0;let k;e[8]!==a?(k=a("sandbox.blockPicker.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let y;e[10]!==k?(y=s.jsx(rl,{placeholder:k}),e[10]=k,e[11]=y):y=e[11];let w;e[12]!==a?(w=a("sandbox.blockPicker.noBlocksFound"),e[12]=a,e[13]=w):w=e[13];let S;e[14]!==w?(S=s.jsx(il,{children:w}),e[14]=w,e[15]=S):S=e[15];let C;e[16]!==x||e[17]!==v||e[18]!==c||e[19]!==a?(C=c.length>0&&s.jsx(Qe,{heading:v?a(tt.site):void 0,children:c.map(T=>s.jsx(lt,{type:T,onInsert:x},T.resolveType))}),e[16]=x,e[17]=v,e[18]=c,e[19]=a,e[20]=C):C=e[20];let P;e[21]!==n||e[22]!==x||e[23]!==v||e[24]!==a?(P=n.length>0&&s.jsx(Qe,{heading:v?a(tt.app):void 0,children:n.map(T=>s.jsx(lt,{type:T,onInsert:x},T.resolveType))}),e[21]=n,e[22]=x,e[23]=v,e[24]=a,e[25]=P):P=e[25];let _;e[26]!==C||e[27]!==P||e[28]!==S?(_=s.jsxs(al,{className:"min-h-0 flex-1",children:[S,C,P]}),e[26]=C,e[27]=P,e[28]=S,e[29]=_):_=e[29];let $;e[30]!==_||e[31]!==y?($=s.jsxs(cl,{className:"min-h-0 flex-1",children:[y,_]}),e[30]=_,e[31]=y,e[32]=$):$=e[32];let B;e[33]!==i||e[34]!==$||e[35]!==N?(B=s.jsx(ul,{container:N,className:"flex max-h-(--radix-popover-content-available-height) w-80 flex-col p-0",align:i,children:$}),e[33]=i,e[34]=$,e[35]=N,e[36]=B):B=e[36];let I;return e[37]!==m||e[38]!==B||e[39]!==j?(I=s.jsxs(fl,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=I):I=e[40],I}function Ot(g){const e=L.c(12),{value:t,onChange:r,placeholder:l,children:o}=g;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(He,{size:13,className:"shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let a;e[1]!==r?(a=p=>r(p.target.value),e[1]=r,e[2]=a):a=e[2];let m;e[3]!==l||e[4]!==a||e[5]!==t?(m=s.jsxs("div",{className:"flex items-center gap-1.5 rounded border px-2",children:[i,s.jsx("input",{autoFocus:!0,type:"text",value:t,placeholder:l,onChange:a,className:"h-7 flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"})]}),e[3]=l,e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==o?(f=s.jsx("div",{className:"max-h-56 overflow-y-auto",children:o}),e[7]=o,e[8]=f):f=e[8];let u;return e[9]!==m||e[10]!==f?(u=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11],u}function Ut(g){const e=L.c(13),{label:t,sublabel:r,image:l,onPick:o}=g;let i;e[0]!==l?(i=l!==void 0&&s.jsx("img",{src:l,alt:"",className:"h-7 w-7 shrink-0 rounded object-cover"}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==t?(a=s.jsx("span",{className:"block truncate text-sm",children:t}),e[2]=t,e[3]=a):a=e[3];let m;e[4]!==r?(m=r&&s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==m?(f=s.jsxs("span",{className:"min-w-0 flex-1",children:[a,m]}),e[6]=a,e[7]=m,e[8]=f):f=e[8];let u;return e[9]!==o||e[10]!==i||e[11]!==f?(u=s.jsxs("button",{type:"button",onMouseDown:os,onClick:o,className:"flex w-full items-center gap-2 rounded px-1.5 py-1.5 text-left transition-colors hover:bg-accent",children:[i,f]}),e[9]=o,e[10]=i,e[11]=f,e[12]=u):u=e[12],u}function os(g){return g.preventDefault()}function ns(g){const e=L.c(7),{decofile:t,onPick:r}=g,l=O(),[o,i]=G.useState("");let a;if(e[0]!==t||e[1]!==r||e[2]!==l||e[3]!==o){const m=It(t),f=o.trim().toLowerCase(),u=Zt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?Lt(m,{category:h.categorySlugs[0]??"",slug:h.slug}):null;let b;e[5]!==l?(b=l("sandbox.linkPicker.searchPosts"),e[5]=l,e[6]=b):b=e[6],a=s.jsx(Ot,{value:o,onChange:i,placeholder:b,children:u.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:l("sandbox.linkPicker.noPosts")}):u.map(h=>{const n=p(h);return n?s.jsx(Ut,{label:h.title||h.slug,sublabel:n,onPick:()=>r(n)},h.key):null})}),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=a}else a=e[4];return a}function rs(g){const e=L.c(26),{sandboxRef:t,storeUrl:r,onPick:l}=g,o=O(),[i,a]=G.useState(""),[m,f]=G.useState(""),u=G.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=y=>{a(y),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>f(y.trim()),300)},e[0]=p):p=e[0];const b=p;let h;e[1]!==m||e[2]!==t.branch||e[3]!==t.orgSlug||e[4]!==t.virtualMcpId?(h=Gt.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`product-link:${m}`),e[1]=m,e[2]=t.branch,e[3]=t.orgSlug,e[4]=t.virtualMcpId,e[5]=h):h=e[5];let n;e[6]!==m||e[7]!==t?(n=async()=>{const[y]=wl("search",m);if(!y)return[];const w=await Pl(t,y);return _l(w).filter(is)},e[6]=m,e[7]=t,e[8]=n):n=e[8];let c;e[9]!==h||e[10]!==n?(c={queryKey:h,queryFn:n},e[9]=h,e[10]=n,e[11]=c):c=e[11];const d=qt(c);let x;e[12]!==d.data?(x=d.data??[],e[12]=d.data,e[13]=x):x=e[13];const v=x;let j;e[14]!==o?(j=o("sandbox.linkPicker.searchProducts"),e[14]=o,e[15]=j):j=e[15];let N;e[16]!==l||e[17]!==v||e[18]!==d.isFetching||e[19]!==r||e[20]!==o?(N=d.isFetching?s.jsxs("p",{className:"flex items-center justify-center gap-1.5 px-1.5 py-3 text-xs text-muted-foreground",children:[s.jsx(hl,{size:12,className:"animate-spin"}),o("sandbox.linkPicker.searching")]}):v.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:o("sandbox.linkPicker.noProducts")}):v.map(y=>s.jsx(Ut,{label:y.label,image:y.image??"",onPick:()=>{const w=Sl(y.url,r);w&&l(w)}},y.id)),e[16]=l,e[17]=v,e[18]=d.isFetching,e[19]=r,e[20]=o,e[21]=N):N=e[21];let k;return e[22]!==j||e[23]!==N||e[24]!==i?(k=s.jsx(Ot,{value:i,onChange:b,placeholder:j,children:N}),e[22]=j,e[23]=N,e[24]=i,e[25]=k):k=e[25],k}function is(g){return g.url}function We(g){const e=L.c(24),{decofile:t,sandboxRef:r}=g,l=O();let o;e[0]!==t?(o=t?E(Xt(t).merged.storeUrl):"",e[0]=t,e[1]=o):o=e[1];const i=o;let a;if(e[2]!==t||e[3]!==r||e[4]!==i||e[5]!==l){if(a=[],t){let m;e[7]!==l?(m=l("sandbox.linkPicker.tabPost"),e[7]=l,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(jl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=b=>s.jsx(ns,{decofile:t,onPick:b}),e[10]=t,e[11]=u):u=e[11];let p;e[12]!==m||e[13]!==u?(p={id:"post",label:m,icon:f,render:u},e[12]=m,e[13]=u,e[14]=p):p=e[14],a.push(p)}if(r){let m;e[15]!==l?(m=l("sandbox.linkPicker.tabProduct"),e[15]=l,e[16]=m):m=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(gl,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==i?(u=b=>s.jsx(rs,{sandboxRef:r,storeUrl:i,onPick:b}),e[18]=r,e[19]=i,e[20]=u):u=e[20];let p;e[21]!==m||e[22]!==u?(p={id:"product",label:m,icon:f,render:u},e[21]=m,e[22]=u,e[23]=p):p=e[23],a.push(p)}e[2]=t,e[3]=r,e[4]=i,e[5]=l,e[6]=a}else a=e[6];return a}function as({html:g,placeholder:e,onChange:t,decofile:r,sandboxRef:l}){const o=G.useRef(t);o.current=t;const[i,a]=G.useState(!1),m=Ge({extensions:[qe.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Je.configure({placeholder:e??"Write something…"})],content:g||"",editorProps:{attributes:{class:ne("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0",Ye)}},onUpdate:({editor:p})=>{const b=p.getHTML();o.current(b==="<p></p>"?"":b)}}),f=Ke({editor:m,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bold:p?.isActive("bold")??!1,italic:p?.isActive("italic")??!1,underline:p?.isActive("underline")??!1,link:p?.isActive("link")??!1})}),u=We({decofile:r,sandboxRef:l});return m?s.jsxs("div",{className:"relative",children:[(f.isFocused||i)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(Ae,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(kt,{size:14})}),s.jsx(Ae,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(yt,{size:14})}),s.jsx(Ae,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(Nt,{size:14})}),s.jsx(Bt,{editor:m,active:f.link,open:i,onOpenChange:a,sources:u})]}),s.jsx(Ve,{editor:m,className:"text-[15px] text-foreground"})]}):null}function cs(g,e){const t=g.length?g.split(`
|
|
1
|
+
import{c as L,l as ne,j as s,I as Ht,b as O,r as G,K as Gt,m as qt,ai as Kt,h as Vt,B as Oe}from"./index-C8YP0XfX.js";import{u as ct,a as _e,K as dt,P as ut,D as ft,c as mt,C as xt}from"./core.esm-CfGX-VCE.js";import{s as pt,a as gt,S as ht,r as Jt,u as bt,v as Yt}from"./sortable.esm-Bk2g_Gbz.js";import{s as Fe}from"./Plus-Bh_xMwh7.js";import{v as Wt,w as Qt,c as E,x as Xt,l as Zt,F as Me,I as ae,y as he,R as ue,A as fe,z as vt,B as jt,D as el,b as tl,G as ll,H as de,J as sl,K as ol}from"./content-tab-CxqGwsRS.js";import{a as Qe,b as nl,e as rl,C as il,c as al,d as cl}from"./command-jlI8eprh.js";import{a as dl,b as ul,P as fl}from"./popover-C0DIKe_3.js";import{aG as ml,aI as xl,ao as pl,a0 as gl,a7 as hl,M as He,ag as kt,ah as yt,ai as Nt,aj as bl,an as Ct}from"./agent-icon-B7Q7dFXY.js";import{a as vl}from"./Copy01-DGy0Absz.js";import{s as Ue}from"./Trash01-BqP8uw7k.js";import{u as Ge,s as qe,a as Ke,b as Ve}from"./usage-stats-CNcWehA3.js";import{s as Je}from"./suggestion-Bl_JrZPN.js";import{E as Ye,T as Ae,R as Bt}from"./editor-classes-Dkk1S2M6.js";import{b as jl,i as kl,a as yl}from"./ZoomOut-BVuJZ-2t.js";import{w as St}from"./section-preview-url-7zfngvgW.js";import{I as Nl,u as Cl,k as Bl}from"./parse-sections-B8Xcvgnu.js";import{r as Sl,b as wl,i as Pl,p as _l,u as wt,P as Pt}from"./product-picker-dialog-BMgJeJTt.js";import{B as $l}from"./index-DG18LLWo.js";import{T as Tl,a as Il,c as Ll}from"./tooltip-CJHeHoSn.js";import{a as _t}from"./Image01-DtpDUrwF.js";import{i as Rl}from"./Link01-oZZyGItc.js";import{i as El}from"./Monitor01-Bmn1BV5T.js";import{L as be}from"./label-BZDtWIcv.js";import{U as Xe,V as Al,W as zl,X as Ol,Y as Ul,Z as Dl,_ as Fl,$ as Ml}from"./held-block-view-BCUOCB3X.js";import{s as Hl}from"./XClose-D48r2tDo.js";import{S as Gl}from"./blog-schema-DclHtzEx.js";function ee(g){const e=L.c(8),{active:t,label:r,onClick:l,children:o}=g,i=t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground";let a;e[0]!==i?(a=ne("flex h-7 min-w-7 items-center justify-center px-1.5 text-sm transition-colors cursor-pointer rounded-[var(--studio-control-radius,var(--radius))]",i),e[0]=i,e[1]=a):a=e[1];let m;return e[2]!==t||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==a?(m=s.jsx("button",{type:"button","aria-label":r,"aria-pressed":t,onMouseDown:ql,onClick:l,className:a,children:o}),e[2]=t,e[3]=o,e[4]=r,e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function ql(g){return g.preventDefault()}function Ze(){const g=L.c(1);let e;return g[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{"aria-hidden":!0,className:"mx-0.5 h-5 w-px bg-border"}),g[0]=e):e=g[0],e}function Kl(g){const e=L.c(17),{draft:t,notice:r,label:l,placeholder:o,onDraftChange:i,onCommit:a,onCancel:m}=g;let f;e[0]!==i?(f=n=>i(n.target.value),e[0]=i,e[1]=f):f=e[1];let u;e[2]!==m||e[3]!==a?(u=n=>{n.key==="Escape"&&m(),n.key==="Enter"&&a()},e[2]=m,e[3]=a,e[4]=u):u=e[4];let p;e[5]!==t||e[6]!==l||e[7]!==a||e[8]!==o||e[9]!==f||e[10]!==u?(p=s.jsx(Ht,{autoFocus:!0,type:"url",value:t,onChange:f,onBlur:a,onKeyDown:u,placeholder:o,spellCheck:!1,"aria-label":l,className:"h-8 w-full text-xs"}),e[5]=t,e[6]=l,e[7]=a,e[8]=o,e[9]=f,e[10]=u,e[11]=p):p=e[11];let b;e[12]!==r?(b=r&&s.jsx("p",{role:"alert",className:"px-1 pb-0.5 pt-1.5 text-xs text-destructive",children:r}),e[12]=r,e[13]=b):b=e[13];let h;return e[14]!==p||e[15]!==b?(h=s.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 w-96 rounded-[var(--studio-surface-radius,var(--radius-md))] bg-popover p-1 shadow-soft",children:[p,b]}),e[14]=p,e[15]=b,e[16]=h):h=e[16],h}function Vl(g){const e=L.c(74),{value:t,mobileValue:r,onChange:l,onMobileChange:o,label:i,alt:a,toolbarExtras:m,sandbox:f}=g,u=O(),[p,b]=G.useState(!1),[h,n]=G.useState(!1),[c,d]=G.useState(null),[x,v]=G.useState(null),j=c!==null,[N,k]=G.useState(null),y=Jl,w=y(r),S=p?w:y(t),C=Xe(S),P=!!S&&(N===S||!C),_=Al(C);let $;e[0]!==p||e[1]!==u?($=u(p?"sectionsEditor.imageField.mobileUrlLabel":"sectionsEditor.imageField.urlLabel"),e[0]=p,e[1]=u,e[2]=$):$=e[2];const B=$;let I;e[3]!==l||e[4]!==p||e[5]!==o?(I=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=I):I=e[6];const T=I,z=`${p?"mobile":"desktop"}:${S}`,[U,F]=G.useState(z);U!==z&&(F(z),c!==null&&(d(S),v(null)));let H;e[7]===Symbol.for("react.memo_cache_sentinel")?(H=()=>{d(null),v(null)},e[7]=H):H=e[7];const R=H,Y=()=>{const Z=c??"",Ee=Xe(Z);return!Ee&&Z.trim()?(v(u("sectionsEditor.imageField.unsafeUrl")),!1):(Ee!==S&&T(Ee||void 0),!0)};let J;e[8]!==R||e[9]!==Y?(J=()=>{Y()&&R()},e[8]=R,e[9]=Y,e[10]=J):J=e[10];const W=J,re=()=>{j?W():d(S)};let se;e[11]!==Y||e[12]!==j?(se=Z=>{j&&!Y()||b(Z)},e[11]=Y,e[12]=j,e[13]=se):se=e[13];const Q=se,ie=f?.siteSlug;let te;e[14]===Symbol.for("react.memo_cache_sentinel")?(te=()=>n(!0),e[14]=te):te=e[14];let X;e[15]!==T||e[16]!==ie?(X={siteSlug:ie,onUploaded:T,onNeedsPicker:te},e[15]=T,e[16]=ie,e[17]=X):X=e[17];const{isDragging:M,isPending:A,lockedConfigId:V,dropProps:D}=zl(X);let K;e[18]!==i?(K=i&&s.jsx(be,{className:"text-muted-foreground",children:i}),e[18]=i,e[19]=K):K=e[19];let q;e[20]!==m?(q=m&&s.jsx(Ze,{}),e[20]=m,e[21]=q):q=e[21];const oe=!p;let ce;e[22]!==u?(ce=u("sectionsEditor.imageField.desktopSlot"),e[22]=u,e[23]=ce):ce=e[23];let le;e[24]!==Q?(le=()=>Q(!1),e[24]=Q,e[25]=le):le=e[25];let ve;e[26]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(El,{size:14}),e[26]=ve):ve=e[26];let je;e[27]!==oe||e[28]!==ce||e[29]!==le?(je=s.jsx(ee,{active:oe,label:ce,onClick:le,children:ve}),e[27]=oe,e[28]=ce,e[29]=le,e[30]=je):je=e[30];let ke;e[31]!==u?(ke=u("sectionsEditor.imageField.mobileSlot"),e[31]=u,e[32]=ke):ke=e[32];let ye;e[33]!==Q?(ye=()=>Q(!0),e[33]=Q,e[34]=ye):ye=e[34];let Ne;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(Rl,{size:14}),e[35]=Ne):Ne=e[35];let Ce;e[36]!==re||e[37]!==B||e[38]!==j?(Ce=s.jsx(ee,{active:j,label:B,onClick:re,children:Ne}),e[36]=re,e[37]=B,e[38]=j,e[39]=Ce):Ce=e[39];let Be;e[40]!==R||e[41]!==W||e[42]!==u||e[43]!==c||e[44]!==B||e[45]!==x?(Be=c!==null&&s.jsx(Kl,{draft:c,notice:x,label:B,placeholder:u("sectionsEditor.imageField.urlPlaceholder"),onDraftChange:Z=>{v(null),d(Z)},onCommit:W,onCancel:R}),e[40]=R,e[41]=W,e[42]=u,e[43]=c,e[44]=B,e[45]=x,e[46]=Be):Be=e[46];let Se;e[47]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>n(!0),e[47]=Se):Se=e[47];let me;e[48]!==u?(me=u("sectionsEditor.imageField.replaceImage"),e[48]=u,e[49]=me):me=e[49];const Ie=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Le=M&&"ring-2 ring-primary/40",Re=A&&"pointer-events-none opacity-60";let xe;e[50]!==Ie||e[51]!==Le||e[52]!==Re?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Ie,Le,Re),e[50]=Ie,e[51]=Le,e[52]=Re,e[53]=xe):xe=e[53];let pe;e[54]!==S||e[55]!==a||e[56]!==P||e[57]!==A||e[58]!==p||e[59]!==C||e[60]!==u?(pe=C&&!P?s.jsx("img",{src:C,alt:a??"",onError:()=>k(S),className:"block h-auto w-full"}):s.jsxs("span",{className:"flex h-32 w-full flex-col items-center justify-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(_t,{size:20}),u(A?"sectionsEditor.imageField.uploading":P?"sectionsEditor.imageField.previewUnavailable":p?"sectionsEditor.imageField.dropMobileImage":"sectionsEditor.imageField.dropImageOrClickToBrowse")]}),e[54]=S,e[55]=a,e[56]=P,e[57]=A,e[58]=p,e[59]=C,e[60]=u,e[61]=pe):pe=e[61];let ge;e[62]!==M||e[63]!==u?(ge=M&&s.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:s.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:u("sectionsEditor.imageField.dropToUpload")})}),e[62]=M,e[63]=u,e[64]=ge):ge=e[64];let we;e[65]!==me||e[66]!==xe||e[67]!==pe||e[68]!==ge?(we=s.jsxs("button",{type:"button",onClick:Se,"aria-label":me,className:xe,children:[pe,ge]}),e[65]=me,e[66]=xe,e[67]=pe,e[68]=ge,e[69]=we):we=e[69];let Pe;return e[70]!==V||e[71]!==h||e[72]!==T?(Pe=s.jsx(Dl,{open:h,onOpenChange:n,mode:"image",onSelect:T,lockedConfigId:V}),e[70]=V,e[71]=h,e[72]=T,e[73]=Pe):Pe=e[73],s.jsxs("div",{...D,className:"group/image relative space-y-2",children:[K,s.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-2 z-10 flex justify-center",children:s.jsxs("div",{className:"pointer-events-none relative flex items-center gap-0.5 rounded-md bg-popover p-0.5 opacity-0 shadow-soft transition-opacity group-hover/image:pointer-events-auto group-hover/image:opacity-100 group-focus-within/image:pointer-events-auto group-focus-within/image:opacity-100",children:[m,q,je,s.jsx(ee,{active:p,label:ke,onClick:ye,children:s.jsx(ml,{size:14,className:ne(w&&"text-primary")})}),Ce,C&&!C.toLowerCase().startsWith("data:")&&s.jsxs(s.Fragment,{children:[s.jsx(Ze,{}),Ol.map(Z=>s.jsx(ee,{active:_===Z,label:Z,onClick:()=>T(Ul(C,_===Z?void 0:Z)),children:s.jsx("span",{className:"px-0.5 text-xs capitalize",children:Z})},Z))]}),Be]})}),we,Pe]})}function Jl(g){return typeof g=="string"?g:""}const Te=g=>typeof g=="string"?g:"",Yl=/\/blog\.tsx?$/;function $t(g,e){for(const[t,r]of Object.entries(g)){if(t.includes("/")||!r||typeof r!="object"||Array.isArray(r))continue;const l=r;if(typeof l.__resolveType!="string"||!Yl.test(l.__resolveType))continue;const o=Te(l[e]);if(o)return o}return null}function Wl(g,e){if(!g||typeof g!="object"||Array.isArray(g))return null;const t=g;return typeof t.__resolveType!="string"||!Nl(t.__resolveType,e)?null:typeof t.path=="string"?t.path:null}function Ql(g){return Cl(g).filter(e=>e!=="*").length}function Tt(g,e,t){let r=null,l=Number.POSITIVE_INFINITY;for(const o of Object.values(g)){const i=Wl(o,t);if(!i||!e.test(JSON.stringify(o)))continue;const a=Ql(i);a<l&&(r=i,l=a)}return r}const Xl=/blogpostpage/i,Zl=/blogcategorypage/i;function It(g,e){return $t(g,"pageSlug")??Tt(g,Xl,e)}function es(g,e){return $t(g,"categorySlug")??Tt(g,Zl,e)}function ts(g){const e=g.categories;if(!Array.isArray(e)||e.length===0)return"";const t=e[0];return Te(t?.slug)}function Lt(g,e){let t=g;if(/:category[*?]?/.test(t)){if(!e.category)return null;t=t.replace(/:category[*?]?/g,De(e.category))}if(/:slug[*?]?/.test(t)){if(!e.slug)return null;t=t.replace(/:slug[*?]?/g,encodeURIComponent(e.slug))}return t}const et=/:(?:categorySlug|categoria|category|slug)[*?]?/,ls=/:(?:categorySlug|categoria|category|slug)[*?]?/g;function Rt(g,e=!1){return/:(?:categorySlug|categoria|category)\*|\/\*$/.test(g)?!0:e&&/:slug\*/.test(g)&&!/:(?:categorySlug|categoria|category)[*?]?/.test(g)}function De(g){return g.split("/").filter(e=>e!=="."&&e!=="..").map(encodeURIComponent).join("/")}function Et(g,e){if(!e)return"";const t=Wt(g).categories;return Qt(e,t).join("/")}function ss(g,e){return/\/\*$/.test(g)&&!et.test(g)?e?g.replace(/\/\*$/,`/${De(e)}`):null:et.test(g)?e?g.replace(ls,De(e)):null:g}function Eo({decofile:g,category:e,previewBaseUrl:t,draftPointer:r,meta:l}){if(!t)return null;const o=es(g,l);if(!o)return null;const i=Te(e.slug),a=ss(o,Rt(o,!0)?Et(g,i):i);if(!a)return null;try{return St(new URL(a,t).href,r)}catch{return null}}function Ao({decofile:g,post:e,previewBaseUrl:t,draftPointer:r,meta:l}){if(!t)return null;const o=It(g,l);if(!o)return null;const i=ts(e),a=Lt(o,{category:Rt(o)?Et(g,i):i,slug:Te(e.slug)});if(!a)return null;try{return St(new URL(a,t).href,r)}catch{return null}}function At(g){const e=L.c(12),{iconName:t,iconUrl:r,alt:l,className:o,size:i}=g,a=i===void 0?16:i;let m;e[0]!==t?(m=pl(t)??xl,e[0]=t,e[1]=m):m=e[1];const f=m;let u;e[2]!==o?(u=ne("flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-md border bg-muted",o),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==f||e[5]!==l||e[6]!==r||e[7]!==a?(p=r?s.jsx("img",{src:r,alt:l,className:"size-5 object-contain"}):s.jsx(f,{size:a,className:"text-muted-foreground"}),e[4]=f,e[5]=l,e[6]=r,e[7]=a,e[8]=p):p=e[8];let b;return e[9]!==u||e[10]!==p?(b=s.jsx("div",{className:u,children:p}),e[9]=u,e[10]=p,e[11]=b):b=e[11],b}const tt={app:"sandbox.blockPicker.blocksLabel",site:"sandbox.blockPicker.customBlocksLabel"};function lt(g){const e=L.c(19),{type:t,onInsert:r}=g,l=`${t.title} ${t.resolveType} ${t.description??""}`;let o;e[0]!==r||e[1]!==t.resolveType?(o=()=>r(t.resolveType),e[0]=r,e[1]=t.resolveType,e[2]=o):o=e[2];let i;e[3]!==t.iconName||e[4]!==t.iconUrl||e[5]!==t.title?(i=s.jsx(At,{iconName:t.iconName,iconUrl:t.iconUrl,alt:t.title}),e[3]=t.iconName,e[4]=t.iconUrl,e[5]=t.title,e[6]=i):i=e[6];let a;e[7]!==t.title?(a=s.jsx("span",{className:"text-sm font-medium",children:t.title}),e[7]=t.title,e[8]=a):a=e[8];let m;e[9]!==t.description?(m=t.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[9]=t.description,e[10]=m):m=e[10];let f;e[11]!==a||e[12]!==m?(f=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a,m]}),e[11]=a,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l||e[15]!==o||e[16]!==i||e[17]!==f?(u=s.jsxs(nl,{value:l,onSelect:o,className:"flex items-center gap-2.5",children:[i,f]}),e[14]=l,e[15]=o,e[16]=i,e[17]=f,e[18]=u):u=e[18],u}function zt(g){const e=L.c(41),{blockTypes:t,onInsert:r,children:l,align:o}=g,i=o===void 0?"start":o,a=O(),[m,f]=G.useState(!1),[u,p]=G.useState(null);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b=T=>{T&&typeof document<"u"&&p(document.querySelector('[data-slot="dialog-content"][data-state="open"]')),f(T)},e[0]=b):b=e[0];const h=b;let n,c;if(e[1]!==t){n=[],c=[];for(const T of t)(T.source==="site"?c:n).push(T);e[1]=t,e[2]=n,e[3]=c}else n=e[2],c=e[3];let d;e[4]!==r?(d=T=>{r(T),f(!1)},e[4]=r,e[5]=d):d=e[5];const x=d,v=n.length>0&&c.length>0;let j;e[6]!==l?(j=s.jsx(dl,{asChild:!0,children:l}),e[6]=l,e[7]=j):j=e[7];const N=u??void 0;let k;e[8]!==a?(k=a("sandbox.blockPicker.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let y;e[10]!==k?(y=s.jsx(rl,{placeholder:k}),e[10]=k,e[11]=y):y=e[11];let w;e[12]!==a?(w=a("sandbox.blockPicker.noBlocksFound"),e[12]=a,e[13]=w):w=e[13];let S;e[14]!==w?(S=s.jsx(il,{children:w}),e[14]=w,e[15]=S):S=e[15];let C;e[16]!==x||e[17]!==v||e[18]!==c||e[19]!==a?(C=c.length>0&&s.jsx(Qe,{heading:v?a(tt.site):void 0,children:c.map(T=>s.jsx(lt,{type:T,onInsert:x},T.resolveType))}),e[16]=x,e[17]=v,e[18]=c,e[19]=a,e[20]=C):C=e[20];let P;e[21]!==n||e[22]!==x||e[23]!==v||e[24]!==a?(P=n.length>0&&s.jsx(Qe,{heading:v?a(tt.app):void 0,children:n.map(T=>s.jsx(lt,{type:T,onInsert:x},T.resolveType))}),e[21]=n,e[22]=x,e[23]=v,e[24]=a,e[25]=P):P=e[25];let _;e[26]!==C||e[27]!==P||e[28]!==S?(_=s.jsxs(al,{className:"min-h-0 flex-1",children:[S,C,P]}),e[26]=C,e[27]=P,e[28]=S,e[29]=_):_=e[29];let $;e[30]!==_||e[31]!==y?($=s.jsxs(cl,{className:"min-h-0 flex-1",children:[y,_]}),e[30]=_,e[31]=y,e[32]=$):$=e[32];let B;e[33]!==i||e[34]!==$||e[35]!==N?(B=s.jsx(ul,{container:N,className:"flex max-h-(--radix-popover-content-available-height) w-80 flex-col p-0",align:i,children:$}),e[33]=i,e[34]=$,e[35]=N,e[36]=B):B=e[36];let I;return e[37]!==m||e[38]!==B||e[39]!==j?(I=s.jsxs(fl,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=I):I=e[40],I}function Ot(g){const e=L.c(12),{value:t,onChange:r,placeholder:l,children:o}=g;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(He,{size:13,className:"shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let a;e[1]!==r?(a=p=>r(p.target.value),e[1]=r,e[2]=a):a=e[2];let m;e[3]!==l||e[4]!==a||e[5]!==t?(m=s.jsxs("div",{className:"flex items-center gap-1.5 rounded border px-2",children:[i,s.jsx("input",{autoFocus:!0,type:"text",value:t,placeholder:l,onChange:a,className:"h-7 flex-1 bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"})]}),e[3]=l,e[4]=a,e[5]=t,e[6]=m):m=e[6];let f;e[7]!==o?(f=s.jsx("div",{className:"max-h-56 overflow-y-auto",children:o}),e[7]=o,e[8]=f):f=e[8];let u;return e[9]!==m||e[10]!==f?(u=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,f]}),e[9]=m,e[10]=f,e[11]=u):u=e[11],u}function Ut(g){const e=L.c(13),{label:t,sublabel:r,image:l,onPick:o}=g;let i;e[0]!==l?(i=l!==void 0&&s.jsx("img",{src:l,alt:"",className:"h-7 w-7 shrink-0 rounded object-cover"}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==t?(a=s.jsx("span",{className:"block truncate text-sm",children:t}),e[2]=t,e[3]=a):a=e[3];let m;e[4]!==r?(m=r&&s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:r}),e[4]=r,e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==m?(f=s.jsxs("span",{className:"min-w-0 flex-1",children:[a,m]}),e[6]=a,e[7]=m,e[8]=f):f=e[8];let u;return e[9]!==o||e[10]!==i||e[11]!==f?(u=s.jsxs("button",{type:"button",onMouseDown:os,onClick:o,className:"flex w-full items-center gap-2 rounded px-1.5 py-1.5 text-left transition-colors hover:bg-accent",children:[i,f]}),e[9]=o,e[10]=i,e[11]=f,e[12]=u):u=e[12],u}function os(g){return g.preventDefault()}function ns(g){const e=L.c(7),{decofile:t,onPick:r}=g,l=O(),[o,i]=G.useState("");let a;if(e[0]!==t||e[1]!==r||e[2]!==l||e[3]!==o){const m=It(t),f=o.trim().toLowerCase(),u=Zt(t).filter(h=>!f||h.title.toLowerCase().includes(f)||h.slug.toLowerCase().includes(f)).slice(0,30),p=h=>m?Lt(m,{category:h.categorySlugs[0]??"",slug:h.slug}):null;let b;e[5]!==l?(b=l("sandbox.linkPicker.searchPosts"),e[5]=l,e[6]=b):b=e[6],a=s.jsx(Ot,{value:o,onChange:i,placeholder:b,children:u.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:l("sandbox.linkPicker.noPosts")}):u.map(h=>{const n=p(h);return n?s.jsx(Ut,{label:h.title||h.slug,sublabel:n,onPick:()=>r(n)},h.key):null})}),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=a}else a=e[4];return a}function rs(g){const e=L.c(26),{sandboxRef:t,storeUrl:r,onPick:l}=g,o=O(),[i,a]=G.useState(""),[m,f]=G.useState(""),u=G.useRef(null);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=y=>{a(y),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>f(y.trim()),300)},e[0]=p):p=e[0];const b=p;let h;e[1]!==m||e[2]!==t.branch||e[3]!==t.orgSlug||e[4]!==t.virtualMcpId?(h=Gt.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`product-link:${m}`),e[1]=m,e[2]=t.branch,e[3]=t.orgSlug,e[4]=t.virtualMcpId,e[5]=h):h=e[5];let n;e[6]!==m||e[7]!==t?(n=async()=>{const[y]=wl("search",m);if(!y)return[];const w=await Pl(t,y);return _l(w).filter(is)},e[6]=m,e[7]=t,e[8]=n):n=e[8];let c;e[9]!==h||e[10]!==n?(c={queryKey:h,queryFn:n},e[9]=h,e[10]=n,e[11]=c):c=e[11];const d=qt(c);let x;e[12]!==d.data?(x=d.data??[],e[12]=d.data,e[13]=x):x=e[13];const v=x;let j;e[14]!==o?(j=o("sandbox.linkPicker.searchProducts"),e[14]=o,e[15]=j):j=e[15];let N;e[16]!==l||e[17]!==v||e[18]!==d.isFetching||e[19]!==r||e[20]!==o?(N=d.isFetching?s.jsxs("p",{className:"flex items-center justify-center gap-1.5 px-1.5 py-3 text-xs text-muted-foreground",children:[s.jsx(hl,{size:12,className:"animate-spin"}),o("sandbox.linkPicker.searching")]}):v.length===0?s.jsx("p",{className:"px-1.5 py-3 text-center text-xs text-muted-foreground",children:o("sandbox.linkPicker.noProducts")}):v.map(y=>s.jsx(Ut,{label:y.label,image:y.image??"",onPick:()=>{const w=Sl(y.url,r);w&&l(w)}},y.id)),e[16]=l,e[17]=v,e[18]=d.isFetching,e[19]=r,e[20]=o,e[21]=N):N=e[21];let k;return e[22]!==j||e[23]!==N||e[24]!==i?(k=s.jsx(Ot,{value:i,onChange:b,placeholder:j,children:N}),e[22]=j,e[23]=N,e[24]=i,e[25]=k):k=e[25],k}function is(g){return g.url}function We(g){const e=L.c(24),{decofile:t,sandboxRef:r}=g,l=O();let o;e[0]!==t?(o=t?E(Xt(t).merged.storeUrl):"",e[0]=t,e[1]=o):o=e[1];const i=o;let a;if(e[2]!==t||e[3]!==r||e[4]!==i||e[5]!==l){if(a=[],t){let m;e[7]!==l?(m=l("sandbox.linkPicker.tabPost"),e[7]=l,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(jl,{size:12}),e[9]=f):f=e[9];let u;e[10]!==t?(u=b=>s.jsx(ns,{decofile:t,onPick:b}),e[10]=t,e[11]=u):u=e[11];let p;e[12]!==m||e[13]!==u?(p={id:"post",label:m,icon:f,render:u},e[12]=m,e[13]=u,e[14]=p):p=e[14],a.push(p)}if(r){let m;e[15]!==l?(m=l("sandbox.linkPicker.tabProduct"),e[15]=l,e[16]=m):m=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(gl,{size:12}),e[17]=f):f=e[17];let u;e[18]!==r||e[19]!==i?(u=b=>s.jsx(rs,{sandboxRef:r,storeUrl:i,onPick:b}),e[18]=r,e[19]=i,e[20]=u):u=e[20];let p;e[21]!==m||e[22]!==u?(p={id:"product",label:m,icon:f,render:u},e[21]=m,e[22]=u,e[23]=p):p=e[23],a.push(p)}e[2]=t,e[3]=r,e[4]=i,e[5]=l,e[6]=a}else a=e[6];return a}function as({html:g,placeholder:e,onChange:t,decofile:r,sandboxRef:l}){const o=G.useRef(t);o.current=t;const[i,a]=G.useState(!1),m=Ge({extensions:[qe.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),Je.configure({placeholder:e??"Write something…"})],content:g||"",editorProps:{attributes:{class:ne("prose prose-sm dark:prose-invert max-w-none focus:outline-none","leading-relaxed [&_p]:my-0",Ye)}},onUpdate:({editor:p})=>{const b=p.getHTML();o.current(b==="<p></p>"?"":b)}}),f=Ke({editor:m,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bold:p?.isActive("bold")??!1,italic:p?.isActive("italic")??!1,underline:p?.isActive("underline")??!1,link:p?.isActive("link")??!1})}),u=We({decofile:r,sandboxRef:l});return m?s.jsxs("div",{className:"relative",children:[(f.isFocused||i)&&s.jsxs("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(Ae,{active:f.bold,label:"Bold",onClick:()=>m.chain().focus().toggleBold().run(),children:s.jsx(kt,{size:14})}),s.jsx(Ae,{active:f.italic,label:"Italic",onClick:()=>m.chain().focus().toggleItalic().run(),children:s.jsx(yt,{size:14})}),s.jsx(Ae,{active:f.underline,label:"Underline",onClick:()=>m.chain().focus().toggleUnderline().run(),children:s.jsx(Nt,{size:14})}),s.jsx(Bt,{editor:m,active:f.link,open:i,onOpenChange:a,sources:u})]}),s.jsx(Ve,{editor:m,className:"text-[15px] text-foreground"})]}):null}function cs(g,e){const t=g.length?g.split(`
|
|
2
2
|
`):[""],r=e?"ol":"ul",l=t.map(o=>`<li><p>${o}</p></li>`).join("");return`<${r}>${l}</${r}>`}function ds(g){const e=new DOMParser().parseFromString(g,"text/html").body,t=Array.from(e.querySelectorAll(":scope > ul > li, :scope > ol > li")),r=t.length?t:Array.from(e.children);return r.length===0?[""]:r.map(l=>{const o=l.children.length===1?l.children[0]:null;return(o?.tagName==="P"?o.innerHTML:l.innerHTML).trim()})}const us=({editor:g,state:e})=>g.isEditable&&(g.isFocused||!e.selection.empty),fs={placement:"bottom-start",offset:8};function Dt(g){const e=L.c(11),{editor:t,appendTo:r,sources:l}=g,o=O(),[i,a]=G.useState(!1),[m,f]=G.useState(null),u=r??m;let p;e[0]!==t?(p={editor:t,selector:ms},e[0]=t,e[1]=p):p=e[1];const b=Ke(p);let h;e[2]!==t||e[3]!==i||e[4]!==b||e[5]!==l||e[6]!==o||e[7]!==u?(h=u&&s.jsxs($l,{editor:t,appendTo:u,shouldShow:us,options:fs,className:"z-50 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:[s.jsx(ee,{active:b.bold,label:o("sectionsEditor.richTextField.bold"),onClick:()=>t.chain().focus().toggleBold().run(),children:s.jsx(kt,{size:14})}),s.jsx(ee,{active:b.italic,label:o("sectionsEditor.richTextField.italic"),onClick:()=>t.chain().focus().toggleItalic().run(),children:s.jsx(yt,{size:14})}),s.jsx(ee,{active:b.underline,label:o("sectionsEditor.richTextField.underline"),onClick:()=>t.chain().focus().toggleUnderline().run(),children:s.jsx(Nt,{size:14})}),s.jsx(ee,{active:b.strike,label:o("sectionsEditor.richTextField.strikethrough"),onClick:()=>t.chain().focus().toggleStrike().run(),children:s.jsx(bl,{size:14})}),s.jsx(Bt,{editor:t,active:b.link,open:i,onOpenChange:a,sources:l})]}),e[2]=t,e[3]=i,e[4]=b,e[5]=l,e[6]=o,e[7]=u,e[8]=h):h=e[8];let n;return e[9]!==h?(n=s.jsx("div",{ref:f,className:"relative z-20",children:h}),e[9]=h,e[10]=n):n=e[10],n}function ms(g){const{editor:e}=g;return{bold:e.isActive("bold"),italic:e.isActive("italic"),underline:e.isActive("underline"),strike:e.isActive("strike"),link:e.isActive("link")}}const xs=["1","2","3","4"],ps={1:"sandbox.plainBlocks.headingLevel1",2:"sandbox.plainBlocks.headingLevel2",3:"sandbox.plainBlocks.headingLevel3",4:"sandbox.plainBlocks.headingLevel4"},st={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function gs(g){const e=L.c(23),{text:t,level:r,onChange:l}=g,[o,i]=G.useState(!1),a=O(),m=r||"2";let f;e[0]!==o||e[1]!==m||e[2]!==l||e[3]!==a||e[4]!==t?(f=o&&s.jsx(Me,{children:xs.map(v=>s.jsxs(ee,{active:m===v,label:a(ps[v]),onClick:()=>l({text:t,level:v}),children:["H",v]},v))}),e[0]=o,e[1]=m,e[2]=l,e[3]=a,e[4]=t,e[5]=f):f=e[5];let u;e[6]!==m||e[7]!==l?(u=v=>l({text:v,level:m}),e[6]=m,e[7]=l,e[8]=u):u=e[8];let p,b;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=()=>i(!0),b=()=>i(!1),e[9]=p,e[10]=b):(p=e[9],b=e[10]);let h;e[11]!==a?(h=a("sandbox.plainBlocks.headingPlaceholder"),e[11]=a,e[12]=h):h=e[12];const n=st[m]??st[2];let c;e[13]!==n?(c=ne("text-foreground",n),e[13]=n,e[14]=c):c=e[14];let d;e[15]!==u||e[16]!==h||e[17]!==c||e[18]!==t?(d=s.jsx(ae,{value:t,onChange:u,onFocus:p,onBlur:b,placeholder:h,className:c}),e[15]=u,e[16]=h,e[17]=c,e[18]=t,e[19]=d):d=e[19];let x;return e[20]!==f||e[21]!==d?(x=s.jsxs("div",{className:"relative",children:[f,d]}),e[20]=f,e[21]=d,e[22]=x):x=e[22],x}function hs(g){const e=L.c(6),{quote:t,onChange:r}=g,l=O();let o;e[0]!==l?(o=l("sandbox.plainBlocks.quotePlaceholder"),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==r||e[3]!==t||e[4]!==o?(i=s.jsx("div",{className:"border-l-2 border-foreground/30 pl-4",children:s.jsx(ae,{value:t,onChange:r,placeholder:o,className:"text-lg italic text-foreground/90"})}),e[2]=r,e[3]=t,e[4]=o,e[5]=i):i=e[5],i}function bs(g){const e=L.c(21),{code:t,language:r,onChange:l}=g,o=O();let i;e[0]!==t||e[1]!==l?(i=h=>l({code:t,language:h.target.value}),e[0]=t,e[1]=l,e[2]=i):i=e[2];let a;e[3]!==o?(a=o("sandbox.plainBlocks.languagePlaceholder"),e[3]=o,e[4]=a):a=e[4];let m;e[5]!==r||e[6]!==i||e[7]!==a?(m=s.jsx("input",{value:r,onChange:i,placeholder:a,className:"w-full border-b bg-transparent px-3 py-1.5 font-mono text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50"}),e[5]=r,e[6]=i,e[7]=a,e[8]=m):m=e[8];let f;e[9]!==r||e[10]!==l?(f=h=>l({code:h,language:r}),e[9]=r,e[10]=l,e[11]=f):f=e[11];let u;e[12]!==o?(u=o("sandbox.plainBlocks.codePlaceholder"),e[12]=o,e[13]=u):u=e[13];let p;e[14]!==t||e[15]!==f||e[16]!==u?(p=s.jsx(ae,{value:t,onChange:f,placeholder:u,spellCheck:!1,className:"px-3 py-2.5 font-mono text-sm text-foreground"}),e[14]=t,e[15]=f,e[16]=u,e[17]=p):p=e[17];let b;return e[18]!==m||e[19]!==p?(b=s.jsxs("div",{className:"overflow-hidden rounded-md border bg-muted/50",children:[m,p]}),e[18]=m,e[19]=p,e[20]=b):b=e[20],b}function vs({items:g,style:e,onChange:t,decofile:r,sandboxRef:l}){const o=O(),i=We({decofile:r,sandboxRef:l}),a=G.useRef(t);a.current=t;const m=G.useRef(e);m.current=e;const f=Ge({extensions:[qe.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1,gapcursor:!1}),Je.configure({placeholder:o("sandbox.plainBlocks.listItemPlaceholder")})],content:cs(g,e==="ordered"),editorProps:{attributes:{class:ne("focus:outline-none text-[15px] leading-relaxed","[&_ul]:list-disc [&_ol]:list-decimal [&_ul]:pl-7 [&_ol]:pl-7","[&_ul]:my-0 [&_ol]:my-0 [&_li]:pl-1.5 [&_li]:my-1 [&_p]:my-0","marker:text-muted-foreground marker:tabular-nums",Ye)},handleKeyDown:(p,b)=>b.key==="Tab"},onUpdate:({editor:p})=>{a.current({items:ds(p.getHTML()).join(`
|
|
3
3
|
`),style:p.isActive("orderedList")?"ordered":p.isActive("bulletList")?"unordered":m.current})}}),u=Ke({editor:f,selector:({editor:p})=>({isFocused:p?.isFocused??!1,bullet:p?.isActive("bulletList")??!1,ordered:p?.isActive("orderedList")??!1})});return f?s.jsxs("div",{className:"relative",children:[u.isFocused&&s.jsxs(Me,{children:[s.jsx(ee,{active:u.bullet,label:o("sandbox.plainBlocks.bulletedLabel"),onClick:()=>!u.bullet&&f.chain().focus().toggleBulletList().run(),children:"•"}),s.jsx(ee,{active:u.ordered,label:o("sandbox.plainBlocks.numberedLabel"),onClick:()=>!u.ordered&&f.chain().focus().toggleOrderedList().run(),children:"1."})]}),s.jsx(Dt,{editor:f,sources:i}),s.jsx(Ve,{editor:f,className:"text-foreground"})]}):null}function js(g){const e=g.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([\w-]{11})/);if(e)return`https://www.youtube.com/embed/${e[1]}`;const t=g.match(/vimeo\.com\/(\d+)/);return t?`https://player.vimeo.com/video/${t[1]}`:null}function ks(g){const e=L.c(28),{url:t,caption:r,onChange:l}=g,o=O();let i;e[0]!==t?(i=js(t),e[0]=t,e[1]=i):i=e[1];const a=i;let m;e[2]!==r||e[3]!==a||e[4]!==o?(m=a?s.jsx("div",{className:"relative aspect-video overflow-hidden rounded-md border bg-muted",children:s.jsx("iframe",{src:a,title:r||o("sandbox.mediaBlocks.video"),sandbox:"allow-scripts allow-same-origin allow-presentation",className:"absolute inset-0 h-full w-full border-0",allowFullScreen:!0})}):s.jsx("div",{className:"flex aspect-video items-center justify-center rounded-md border border-dashed bg-muted/40 text-xs text-muted-foreground",children:o("sandbox.mediaBlocks.pasteVideoUrl")}),e[2]=r,e[3]=a,e[4]=o,e[5]=m):m=e[5];let f;e[6]!==r||e[7]!==l?(f=d=>l({url:d.target.value,caption:r}),e[6]=r,e[7]=l,e[8]=f):f=e[8];let u;e[9]!==o?(u=o("sandbox.mediaBlocks.videoUrlPlaceholder"),e[9]=o,e[10]=u):u=e[10];let p;e[11]!==f||e[12]!==u||e[13]!==t?(p=s.jsx("input",{value:t,onChange:f,placeholder:u,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[11]=f,e[12]=u,e[13]=t,e[14]=p):p=e[14];let b;e[15]!==l||e[16]!==t?(b=d=>l({url:t,caption:d}),e[15]=l,e[16]=t,e[17]=b):b=e[17];let h;e[18]!==o?(h=o("sandbox.mediaBlocks.addCaption"),e[18]=o,e[19]=h):h=e[19];let n;e[20]!==r||e[21]!==b||e[22]!==h?(n=s.jsx(ae,{value:r,onChange:b,placeholder:h,className:"text-center text-sm italic text-muted-foreground"}),e[20]=r,e[21]=b,e[22]=h,e[23]=n):n=e[23];let c;return e[24]!==m||e[25]!==p||e[26]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,p,n]}),e[24]=m,e[25]=p,e[26]=n,e[27]=c):c=e[27],c}function ys(){const g=L.c(5),e=O();let t;g[0]!==e?(t=e("sandbox.mediaBlocks.divider"),g[0]=e,g[1]=t):t=g[1];let r;g[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("span",{className:"h-px flex-1 bg-border"}),g[2]=r):r=g[2];let l;return g[3]!==t?(l=s.jsx("div",{className:"flex items-center py-3","aria-label":t,children:r}),g[3]=t,g[4]=l):l=g[4],l}function Ns(g){const e=L.c(22),{text:t,href:r,onChange:l}=g,o=O();let i;e[0]!==r||e[1]!==l?(i=n=>l({text:n.target.value,href:r}),e[0]=r,e[1]=l,e[2]=i):i=e[2];let a;e[3]!==o?(a=o("sandbox.mediaBlocks.buttonLabel"),e[3]=o,e[4]=a):a=e[4];const m=Math.max(t.length||11,8);let f;e[5]!==i||e[6]!==a||e[7]!==m||e[8]!==t?(f=s.jsx("div",{className:"inline-flex items-center rounded-full bg-primary px-6 py-2 text-sm font-semibold text-primary-foreground",children:s.jsx("input",{value:t,onChange:i,placeholder:a,size:m,className:"border-0 bg-transparent p-0 text-center text-sm font-semibold text-primary-foreground outline-none placeholder:text-primary-foreground/60 focus:ring-0"})}),e[5]=i,e[6]=a,e[7]=m,e[8]=t,e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==t?(u=n=>l({text:t,href:n.target.value}),e[10]=l,e[11]=t,e[12]=u):u=e[12];let p;e[13]!==o?(p=o("sandbox.mediaBlocks.destinationUrlPlaceholder"),e[13]=o,e[14]=p):p=e[14];let b;e[15]!==r||e[16]!==u||e[17]!==p?(b=s.jsx("input",{value:r,onChange:u,placeholder:p,className:"w-full max-w-sm border-0 bg-transparent p-0 text-center text-xs text-muted-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[15]=r,e[16]=u,e[17]=p,e[18]=b):b=e[18];let h;return e[19]!==f||e[20]!==b?(h=s.jsxs("div",{className:"flex flex-col items-center gap-2 py-2",children:[f,b]}),e[19]=f,e[20]=b,e[21]=h):h=e[21],h}const ze=[{value:"info",icon:"ℹ",color:"oklch(0.62 0.19 250)"},{value:"tip",icon:"✓",color:"oklch(0.65 0.17 150)"},{value:"warning",icon:"⚠",color:"oklch(0.75 0.15 75)"},{value:"product",icon:"★",color:"oklch(0.62 0.21 300)"}];function Cs(g){const e=L.c(51),{title:t,body:r,variant:l,onChange:o}=g,i=O(),[a,m]=G.useState(!1);let f;e[0]!==l?(f=ze.find(B=>B.value===l)??ze[0],e[0]=l,e[1]=f):f=e[1];const u=f;let p,b;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>m(!0),b=B=>{B.currentTarget.contains(B.relatedTarget)||m(!1)},e[2]=p,e[3]=b):(p=e[2],b=e[3]);let h;e[4]!==r||e[5]!==a||e[6]!==o||e[7]!==t||e[8]!==u.value?(h=a&&s.jsx(Me,{children:ze.map(B=>s.jsx(ee,{active:u.value===B.value,label:B.value,onClick:()=>o({title:t,body:r,variant:B.value}),children:s.jsx("span",{style:{color:B.color},children:B.icon})},B.value))}),e[4]=r,e[5]=a,e[6]=o,e[7]=t,e[8]=u.value,e[9]=h):h=e[9];const n=`3px solid ${u.color}`,c=`color-mix(in oklch, ${u.color} 8%, transparent)`;let d;e[10]!==n||e[11]!==c?(d={borderLeft:n,backgroundColor:c},e[10]=n,e[11]=c,e[12]=d):d=e[12];let x;e[13]!==u.color?(x={color:u.color},e[13]=u.color,e[14]=x):x=e[14];let v;e[15]!==u.icon?(v=s.jsx("span",{"aria-hidden":!0,className:"text-sm font-bold leading-none",children:u.icon}),e[15]=u.icon,e[16]=v):v=e[16];let j;e[17]!==r||e[18]!==o||e[19]!==l?(j=B=>o({title:B.target.value,body:r,variant:l}),e[17]=r,e[18]=o,e[19]=l,e[20]=j):j=e[20];let N;e[21]!==i?(N=i("sandbox.mediaBlocks.calloutTitle"),e[21]=i,e[22]=N):N=e[22];let k;e[23]!==u.color?(k={color:u.color},e[23]=u.color,e[24]=k):k=e[24];let y;e[25]!==j||e[26]!==N||e[27]!==k||e[28]!==t?(y=s.jsx("input",{value:t,onChange:j,placeholder:N,className:"flex-1 border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none focus:ring-0",style:k}),e[25]=j,e[26]=N,e[27]=k,e[28]=t,e[29]=y):y=e[29];let w;e[30]!==y||e[31]!==x||e[32]!==v?(w=s.jsxs("div",{className:"mb-1.5 flex items-center gap-2",style:x,children:[v,y]}),e[30]=y,e[31]=x,e[32]=v,e[33]=w):w=e[33];let S;e[34]!==o||e[35]!==t||e[36]!==l?(S=B=>o({title:t,body:B,variant:l}),e[34]=o,e[35]=t,e[36]=l,e[37]=S):S=e[37];let C;e[38]!==i?(C=i("sandbox.mediaBlocks.calloutText"),e[38]=i,e[39]=C):C=e[39];let P;e[40]!==r||e[41]!==S||e[42]!==C?(P=s.jsx(ae,{value:r,onChange:S,placeholder:C,className:"text-[15px] leading-relaxed text-foreground"}),e[40]=r,e[41]=S,e[42]=C,e[43]=P):P=e[43];let _;e[44]!==w||e[45]!==P||e[46]!==d?(_=s.jsxs("div",{className:"rounded-md py-4 pl-5 pr-4",style:d,children:[w,P]}),e[44]=w,e[45]=P,e[46]=d,e[47]=_):_=e[47];let $;return e[48]!==_||e[49]!==h?($=s.jsxs("div",{className:"relative",onFocus:p,onBlur:b,children:[h,_]}),e[48]=_,e[49]=h,e[50]=$):$=e[50],$}function Bs(g){const e=L.c(34),{value:t,label:r,description:l,onChange:o}=g,i=O();let a;e[0]!==l||e[1]!==r||e[2]!==o?(a=x=>o({value:x.target.value,label:r,description:l}),e[0]=l,e[1]=r,e[2]=o,e[3]=a):a=e[3];let m;e[4]!==i?(m=i("sandbox.mediaBlocks.statValuePlaceholder"),e[4]=i,e[5]=m):m=e[5];let f;e[6]!==a||e[7]!==m||e[8]!==t?(f=s.jsx("input",{value:t,onChange:a,placeholder:m,className:"w-full border-0 bg-transparent p-0 text-center text-4xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[6]=a,e[7]=m,e[8]=t,e[9]=f):f=e[9];let u;e[10]!==l||e[11]!==o||e[12]!==t?(u=x=>o({value:t,label:x.target.value,description:l}),e[10]=l,e[11]=o,e[12]=t,e[13]=u):u=e[13];let p;e[14]!==i?(p=i("sandbox.mediaBlocks.label"),e[14]=i,e[15]=p):p=e[15];let b;e[16]!==r||e[17]!==u||e[18]!==p?(b=s.jsx("input",{value:r,onChange:u,placeholder:p,className:"w-full border-0 bg-transparent p-0 text-center text-xs font-semibold uppercase tracking-wide text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),e[16]=r,e[17]=u,e[18]=p,e[19]=b):b=e[19];let h;e[20]!==r||e[21]!==o||e[22]!==t?(h=x=>o({value:t,label:r,description:x}),e[20]=r,e[21]=o,e[22]=t,e[23]=h):h=e[23];let n;e[24]!==i?(n=i("sandbox.mediaBlocks.optionalDescription"),e[24]=i,e[25]=n):n=e[25];let c;e[26]!==l||e[27]!==h||e[28]!==n?(c=s.jsx(ae,{value:l,onChange:h,placeholder:n,className:"max-w-md text-center text-sm text-muted-foreground"}),e[26]=l,e[27]=h,e[28]=n,e[29]=c):c=e[29];let d;return e[30]!==f||e[31]!==b||e[32]!==c?(d=s.jsxs("div",{className:"flex flex-col items-center gap-1.5 border-y border-border/60 py-8 text-center",children:[f,b,c]}),e[30]=f,e[31]=b,e[32]=c,e[33]=d):d=e[33],d}function Ss(g){const e=L.c(74),{block:t,onChange:r}=g,l=O();let o;e[0]!==t.size?(o=E(t.size)||"normal",e[0]=t.size,e[1]=o):o=e[1];const i=o,a=t.url,m=t.mobileUrl;let f,u;e[2]!==t||e[3]!==r?(f=R=>r({...t,url:R}),u=R=>r({...t,mobileUrl:R}),e[2]=t,e[3]=r,e[4]=f,e[5]=u):(f=e[4],u=e[5]);let p;e[6]!==t.alt?(p=E(t.alt),e[6]=t.alt,e[7]=p):p=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=["normal","full"],e[8]=b):b=e[8];let h;e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==l?(h=b.map(R=>s.jsx(ee,{active:i===R,label:R,onClick:()=>r({...t,size:R}),children:s.jsx("span",{className:"px-0.5 text-xs",children:l(R==="full"?"sandbox.mediaBlocks.fullWidth":"sandbox.mediaBlocks.normal")})},R)),e[9]=t,e[10]=r,e[11]=i,e[12]=l,e[13]=h):h=e[13];const n=t.highPriority===!0;let c;e[14]!==l?(c=l("sandbox.mediaBlocks.highPriority"),e[14]=l,e[15]=c):c=e[15];let d;e[16]!==t||e[17]!==r?(d=()=>r({...t,highPriority:t.highPriority?void 0:!0}),e[16]=t,e[17]=r,e[18]=d):d=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(kl,{size:14}),e[19]=x):x=e[19];let v;e[20]!==c||e[21]!==d||e[22]!==n?(v=s.jsx(Tl,{asChild:!0,children:s.jsx("span",{children:s.jsx(ee,{active:n,label:c,onClick:d,children:x})})}),e[20]=c,e[21]=d,e[22]=n,e[23]=v):v=e[23];let j;e[24]!==l?(j=l("sandbox.mediaBlocks.highPriorityHint"),e[24]=l,e[25]=j):j=e[25];let N;e[26]!==j?(N=s.jsx(Il,{className:"max-w-64",children:j}),e[26]=j,e[27]=N):N=e[27];let k;e[28]!==v||e[29]!==N?(k=s.jsxs(Ll,{children:[v,N]}),e[28]=v,e[29]=N,e[30]=k):k=e[30];let y;e[31]!==k||e[32]!==h?(y=s.jsxs(s.Fragment,{children:[h,k]}),e[31]=k,e[32]=h,e[33]=y):y=e[33];let w;e[34]!==t.mobileUrl||e[35]!==t.url||e[36]!==y||e[37]!==f||e[38]!==u||e[39]!==p?(w=s.jsx(Vl,{value:a,mobileValue:m,onChange:f,onMobileChange:u,alt:p,toolbarExtras:y}),e[34]=t.mobileUrl,e[35]=t.url,e[36]=y,e[37]=f,e[38]=u,e[39]=p,e[40]=w):w=e[40];let S;e[41]!==t.caption?(S=E(t.caption),e[41]=t.caption,e[42]=S):S=e[42];let C;e[43]!==t||e[44]!==r?(C=R=>r({...t,caption:R}),e[43]=t,e[44]=r,e[45]=C):C=e[45];let P;e[46]!==l?(P=l("sandbox.mediaBlocks.addCaption"),e[46]=l,e[47]=P):P=e[47];let _;e[48]!==S||e[49]!==C||e[50]!==P?(_=s.jsx(ae,{value:S,onChange:C,placeholder:P,className:"text-center text-sm italic text-muted-foreground"}),e[48]=S,e[49]=C,e[50]=P,e[51]=_):_=e[51];let $;e[52]!==l?($=l("sandbox.mediaBlocks.altLabel"),e[52]=l,e[53]=$):$=e[53];let B;e[54]!==$?(B=s.jsx("span",{className:"shrink-0 font-medium",children:$}),e[54]=$,e[55]=B):B=e[55];let I;e[56]!==t.alt?(I=E(t.alt),e[56]=t.alt,e[57]=I):I=e[57];let T;e[58]!==t||e[59]!==r?(T=R=>r({...t,alt:R}),e[58]=t,e[59]=r,e[60]=T):T=e[60];let z;e[61]!==l?(z=l("sandbox.mediaBlocks.altText"),e[61]=l,e[62]=z):z=e[62];let U;e[63]!==I||e[64]!==T||e[65]!==z?(U=s.jsx(ae,{value:I,onChange:T,placeholder:z,className:"text-xs"}),e[63]=I,e[64]=T,e[65]=z,e[66]=U):U=e[66];let F;e[67]!==B||e[68]!==U?(F=s.jsxs("div",{className:"flex items-baseline gap-1.5 text-xs text-muted-foreground",children:[B,U]}),e[67]=B,e[68]=U,e[69]=F):F=e[69];let H;return e[70]!==w||e[71]!==_||e[72]!==F?(H=s.jsxs("div",{className:"space-y-2",children:[w,_,F]}),e[70]=w,e[71]=_,e[72]=F,e[73]=H):H=e[73],H}function ws(g){const e=L.c(21),{cards:t,onChange:r}=g,l=O();let o,i,a,m,f;if(e[0]!==t||e[1]!==r||e[2]!==l){i=he(t);let h;e[8]!==r?(h=c=>r(JSON.stringify(c)),e[8]=r,e[9]=h):h=e[9],o=h;const n=(c,d)=>o(i.map((x,v)=>v===c?{...x,...d}:x));f="space-y-2",a="grid grid-cols-1 gap-3 sm:grid-cols-3",m=i.slice(0,3).map((c,d)=>s.jsxs("div",{className:"group/item relative flex flex-col gap-2 rounded-lg border bg-card p-4",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(ue,{label:l("sandbox.listBlocks.removeCard"),onClick:()=>o(i.filter((x,v)=>v!==d))})}),s.jsx("input",{value:E(c.icon),onChange:x=>n(d,{icon:x.target.value}),placeholder:"🎴",className:"flex h-9 w-9 items-center justify-center rounded-md border bg-background text-center text-lg outline-none focus:ring-0"}),s.jsx("input",{value:E(c.title),onChange:x=>n(d,{title:x.target.value}),placeholder:l("sandbox.listBlocks.cardTitle"),className:"border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ae,{value:E(c.body),onChange:x=>n(d,{body:x}),placeholder:l("sandbox.listBlocks.cardBody"),className:"text-sm text-muted-foreground"})]},d)),e[0]=t,e[1]=r,e[2]=l,e[3]=o,e[4]=i,e[5]=a,e[6]=m,e[7]=f}else o=e[3],i=e[4],a=e[5],m=e[6],f=e[7];let u;e[10]!==a||e[11]!==m?(u=s.jsx("div",{className:a,children:m}),e[10]=a,e[11]=m,e[12]=u):u=e[12];let p;e[13]!==o||e[14]!==i||e[15]!==l?(p=i.length<3&&s.jsx(fe,{label:l("sandbox.listBlocks.addCard"),onClick:()=>o([...i,{title:"",body:""}])}),e[13]=o,e[14]=i,e[15]=l,e[16]=p):p=e[16];let b;return e[17]!==f||e[18]!==u||e[19]!==p?(b=s.jsxs("div",{className:f,children:[u,p]}),e[17]=f,e[18]=u,e[19]=p,e[20]=b):b=e[20],b}function Ps(g){const e=L.c(36),{title:t,items:r,onChange:l}=g,o=O();let i,a,m,f,u;if(e[0]!==r||e[1]!==l||e[2]!==o||e[3]!==t){a=he(r);let d;e[9]!==l||e[10]!==t?(d=j=>l({title:t,items:JSON.stringify(j)}),e[9]=l,e[10]=t,e[11]=d):d=e[11],i=d,f="space-y-2";let x;e[12]!==r||e[13]!==l?(x=j=>l({title:j.target.value,items:r}),e[12]=r,e[13]=l,e[14]=x):x=e[14];let v;e[15]!==o?(v=o("sandbox.listBlocks.checklistTitle"),e[15]=o,e[16]=v):v=e[16],e[17]!==x||e[18]!==v||e[19]!==t?(u=s.jsx("input",{value:t,onChange:x,placeholder:v,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[17]=x,e[18]=v,e[19]=t,e[20]=u):u=e[20],m=a.map((j,N)=>s.jsxs("li",{className:"group/item flex items-start gap-3 border-b border-border/50 py-2.5",children:[s.jsx("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center text-primary",children:s.jsx(Kt,{size:15})}),s.jsx(ae,{value:j,onChange:k=>i(a.map((y,w)=>w===N?k:y)),placeholder:o("sandbox.listBlocks.checklistItem"),className:"text-[15px] text-foreground"}),s.jsx(ue,{label:o("sandbox.listBlocks.removeItem"),onClick:()=>i(a.filter((k,y)=>y!==N))})]},N)),e[0]=r,e[1]=l,e[2]=o,e[3]=t,e[4]=i,e[5]=a,e[6]=m,e[7]=f,e[8]=u}else i=e[4],a=e[5],m=e[6],f=e[7],u=e[8];let p;e[21]!==m?(p=s.jsx("ul",{children:m}),e[21]=m,e[22]=p):p=e[22];let b;e[23]!==o?(b=o("sandbox.listBlocks.addItem"),e[23]=o,e[24]=b):b=e[24];let h;e[25]!==i||e[26]!==a?(h=()=>i([...a,""]),e[25]=i,e[26]=a,e[27]=h):h=e[27];let n;e[28]!==b||e[29]!==h?(n=s.jsx(fe,{label:b,onClick:h}),e[28]=b,e[29]=h,e[30]=n):n=e[30];let c;return e[31]!==f||e[32]!==u||e[33]!==p||e[34]!==n?(c=s.jsxs("div",{className:f,children:[u,p,n]}),e[31]=f,e[32]=u,e[33]=p,e[34]=n,e[35]=c):c=e[35],c}function _s(g){const e=L.c(21),{stats:t,onChange:r}=g,l=O();let o,i,a,m,f;if(e[0]!==r||e[1]!==t||e[2]!==l){i=he(t);let h;e[8]!==r?(h=c=>r(JSON.stringify(c)),e[8]=r,e[9]=h):h=e[9],o=h;const n=(c,d)=>o(i.map((x,v)=>v===c?{...x,...d}:x));f="space-y-2",a="grid grid-cols-1 gap-3 sm:grid-cols-3",m=i.slice(0,3).map((c,d)=>s.jsxs("div",{className:"group/item relative rounded-lg border p-5 text-center",children:[s.jsx("div",{className:"absolute right-1 top-1",children:s.jsx(ue,{label:l("sandbox.listBlocks.removeStat"),onClick:()=>o(i.filter((x,v)=>v!==d))})}),s.jsx("input",{value:E(c.value),onChange:x=>n(d,{value:x.target.value}),placeholder:l("sandbox.listBlocks.statValuePlaceholder"),className:"w-full border-0 bg-transparent p-0 text-center text-3xl font-bold tabular-nums text-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"}),s.jsx("input",{value:E(c.label),onChange:x=>n(d,{label:x.target.value}),placeholder:l("sandbox.listBlocks.label"),className:"mt-1 w-full border-0 bg-transparent p-0 text-center text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/40 focus:ring-0"})]},d)),e[0]=r,e[1]=t,e[2]=l,e[3]=o,e[4]=i,e[5]=a,e[6]=m,e[7]=f}else o=e[3],i=e[4],a=e[5],m=e[6],f=e[7];let u;e[10]!==a||e[11]!==m?(u=s.jsx("div",{className:a,children:m}),e[10]=a,e[11]=m,e[12]=u):u=e[12];let p;e[13]!==o||e[14]!==i||e[15]!==l?(p=i.length<3&&s.jsx(fe,{label:l("sandbox.listBlocks.addStat"),onClick:()=>o([...i,{value:"",label:""}])}),e[13]=o,e[14]=i,e[15]=l,e[16]=p):p=e[16];let b;return e[17]!==f||e[18]!==u||e[19]!==p?(b=s.jsxs("div",{className:f,children:[u,p]}),e[17]=f,e[18]=u,e[19]=p,e[20]=b):b=e[20],b}function $s(g){const e=L.c(38),{title:t,steps:r,onChange:l}=g,o=O();let i,a,m,f,u,p;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==t){a=he(r);let x;e[10]!==l||e[11]!==t?(x=k=>l({title:t,steps:JSON.stringify(k)}),e[10]=l,e[11]=t,e[12]=x):x=e[12],i=x;const v=(k,y)=>i(a.map((w,S)=>S===k?{...w,...y}:w));u="space-y-2";let j;e[13]!==l||e[14]!==r?(j=k=>l({title:k.target.value,steps:r}),e[13]=l,e[14]=r,e[15]=j):j=e[15];let N;e[16]!==o?(N=o("sandbox.listBlocks.stepsTitle"),e[16]=o,e[17]=N):N=e[17],e[18]!==j||e[19]!==N||e[20]!==t?(p=s.jsx("input",{value:t,onChange:j,placeholder:N,className:"w-full border-0 bg-transparent p-0 text-lg font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[18]=j,e[19]=N,e[20]=t,e[21]=p):p=e[21],m="space-y-3",f=a.map((k,y)=>s.jsxs("li",{className:"group/item flex gap-4",children:[s.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border text-sm font-semibold text-muted-foreground",children:y+1}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-1 pt-0.5",children:[s.jsx("input",{value:E(k.title),onChange:w=>v(y,{title:w.target.value}),placeholder:o("sandbox.listBlocks.stepTitle"),className:"w-full border-0 bg-transparent p-0 text-[15px] font-semibold outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ae,{value:E(k.description),onChange:w=>v(y,{description:w}),placeholder:o("sandbox.listBlocks.stepDescription"),className:"text-sm text-muted-foreground"})]}),s.jsx(ue,{label:o("sandbox.listBlocks.removeStep"),onClick:()=>i(a.filter((w,S)=>S!==y))})]},y)),e[0]=l,e[1]=r,e[2]=o,e[3]=t,e[4]=i,e[5]=a,e[6]=m,e[7]=f,e[8]=u,e[9]=p}else i=e[4],a=e[5],m=e[6],f=e[7],u=e[8],p=e[9];let b;e[22]!==m||e[23]!==f?(b=s.jsx("ol",{className:m,children:f}),e[22]=m,e[23]=f,e[24]=b):b=e[24];let h;e[25]!==o?(h=o("sandbox.listBlocks.addStep"),e[25]=o,e[26]=h):h=e[26];let n;e[27]!==i||e[28]!==a?(n=()=>i([...a,{title:"",description:""}]),e[27]=i,e[28]=a,e[29]=n):n=e[29];let c;e[30]!==h||e[31]!==n?(c=s.jsx(fe,{label:h,onClick:n}),e[30]=h,e[31]=n,e[32]=c):c=e[32];let d;return e[33]!==u||e[34]!==p||e[35]!==b||e[36]!==c?(d=s.jsxs("div",{className:u,children:[p,b,c]}),e[33]=u,e[34]=p,e[35]=b,e[36]=c,e[37]=d):d=e[37],d}function ot(g,e){try{const t=JSON.parse(g||"{}");return{title:typeof t?.title=="string"?t.title:e,items:Array.isArray(t?.items)?t.items.map(E):[]}}catch{return{title:e,items:[]}}}function Ts(g){const e=L.c(13),{left:t,right:r,onChange:l}=g,o=O();let i;if(e[0]!==t||e[1]!==l||e[2]!==r||e[3]!==o){const a={left:ot(t,o("sandbox.listBlocks.optionA")),right:ot(r,o("sandbox.listBlocks.optionB"))};let m;e[5]!==t||e[6]!==l||e[7]!==r?(m=(h,n)=>l({left:h==="left"?JSON.stringify(n):t,right:h==="right"?JSON.stringify(n):r}),e[5]=t,e[6]=l,e[7]=r,e[8]=m):m=e[8];const f=m;let u;e[9]!==f||e[10]!==o?(u=(h,n,c)=>{const d=n.items??[];return s.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[s.jsx("input",{value:E(n.title),onChange:x=>f(h,{...n,title:x.target.value}),placeholder:o("sandbox.listBlocks.columnTitle"),className:"w-full border-0 bg-transparent p-0 text-xs font-semibold uppercase tracking-wide outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx("ul",{className:"space-y-1.5",children:d.map((x,v)=>s.jsxs("li",{className:"group/item flex items-start gap-2",children:[s.jsx("span",{"aria-hidden":!0,className:"mt-0.5 shrink-0 text-sm font-bold",style:{color:c},children:"✓"}),s.jsx(ae,{value:x,onChange:j=>f(h,{...n,items:d.map((N,k)=>k===v?j:N)}),placeholder:o("sandbox.listBlocks.item"),className:"text-sm text-foreground"}),s.jsx(ue,{label:o("sandbox.listBlocks.removeItem"),onClick:()=>f(h,{...n,items:d.filter((j,N)=>N!==v)})})]},v))}),s.jsx(fe,{label:o("sandbox.listBlocks.addItem"),onClick:()=>f(h,{...n,items:[...d,""]})})]})},e[9]=f,e[10]=o,e[11]=u):u=e[11];const p=u;let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=ne("grid grid-cols-1 gap-3 sm:grid-cols-2"),e[12]=b):b=e[12],i=s.jsxs("div",{className:b,children:[p("left",a.left,"oklch(0.65 0.17 150)"),p("right",a.right,"oklch(0.75 0.15 75)")]}),e[0]=t,e[1]=l,e[2]=r,e[3]=o,e[4]=i}else i=e[4];return i}const Is=["normal","h1","h2","h3"],Ls=/^<(h[1-3])>([\s\S]*)<\/\1>$/i;function Rs(g){const e=g.match(Ls);return e?{level:e[1].toLowerCase(),text:e[2]}:{level:"normal",text:g}}function nt(g,e){return e?g==="normal"?e:`<${g}>${e}</${g}>`:""}const rt={normal:"sandbox.productBlocks.headingNormal",h1:"sandbox.productBlocks.headingH1",h2:"sandbox.productBlocks.headingH2",h3:"sandbox.productBlocks.headingH3"},Es={normal:"text-lg font-semibold",h1:"text-3xl font-bold",h2:"text-2xl font-bold",h3:"text-xl font-semibold"};function As(g){const e=L.c(27),{value:t,onChange:r}=g,l=O();let o,i,a,m,f;e[0]!==r||e[1]!==l||e[2]!==t?({level:o,text:f}=Rs(t),m="space-y-1.5",i="flex items-center gap-0.5",a=Is.map(x=>s.jsx(ee,{active:o===x,label:l(rt[x]),onClick:()=>r(nt(x,f)),children:l(rt[x])},x)),e[0]=r,e[1]=l,e[2]=t,e[3]=o,e[4]=i,e[5]=a,e[6]=m,e[7]=f):(o=e[3],i=e[4],a=e[5],m=e[6],f=e[7]);let u;e[8]!==i||e[9]!==a?(u=s.jsx("div",{className:i,children:a}),e[8]=i,e[9]=a,e[10]=u):u=e[10];let p;e[11]!==o||e[12]!==r?(p=x=>r(nt(o,x.target.value)),e[11]=o,e[12]=r,e[13]=p):p=e[13];let b;e[14]!==l?(b=l("sandbox.productBlocks.shelfTitlePlaceholder"),e[14]=l,e[15]=b):b=e[15];const h=Es[o];let n;e[16]!==h?(n=ne("w-full border-0 bg-transparent p-0 outline-none placeholder:text-muted-foreground/50 focus:ring-0",h),e[16]=h,e[17]=n):n=e[17];let c;e[18]!==p||e[19]!==b||e[20]!==n||e[21]!==f?(c=s.jsx("input",{value:f,onChange:p,placeholder:b,className:n}),e[18]=p,e[19]=b,e[20]=n,e[21]=f,e[22]=c):c=e[22];let d;return e[23]!==m||e[24]!==u||e[25]!==c?(d=s.jsxs("div",{className:m,children:[u,c]}),e[23]=m,e[24]=u,e[25]=c,e[26]=d):d=e[26],d}function Ft(g){const e=L.c(4),{label:t,onClick:r}=g;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(He,{size:13}),e[0]=l):l=e[0];let o;return e[1]!==t||e[2]!==r?(o=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[l,t]}),e[1]=t,e[2]=r,e[3]=o):o=e[3],o}function Mt(g){const e=L.c(9),{option:t,loading:r,className:l,iconSize:o}=g,i=o===void 0?18:o;let a;e[0]!==l?(a=ne("flex items-center justify-center overflow-hidden bg-muted text-muted-foreground",l),e[0]=l,e[1]=a):a=e[1];let m;e[2]!==i||e[3]!==r||e[4]!==t?(m=t?.image?s.jsx("img",{src:t.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-contain p-1.5"}):r?s.jsx(Vt,{size:"xs"}):s.jsx(_t,{size:i}),e[2]=i,e[3]=r,e[4]=t,e[5]=m):m=e[5];let f;return e[6]!==a||e[7]!==m?(f=s.jsx("span",{className:a,children:m}),e[6]=a,e[7]=m,e[8]=f):f=e[8],f}function zs(g){const e=L.c(50),{id:t,option:r,loading:l,onRemove:o}=g,i=O();let a;e[0]!==t?(a={id:t},e[0]=t,e[1]=a):a=e[1];const{attributes:m,listeners:f,setNodeRef:u,transform:p,transition:b,isDragging:h}=bt(a);let n;e[2]!==p?(n=xt.Transform.toString(p),e[2]=p,e[3]=n):n=e[3];let c;e[4]!==n||e[5]!==b?(c={transform:n,transition:b},e[4]=n,e[5]=b,e[6]=c):c=e[6];const d=h&&"z-10 opacity-60";let x;e[7]!==d?(x=ne("group/card relative flex flex-col overflow-hidden rounded-md border bg-background",d),e[7]=d,e[8]=x):x=e[8];let v;e[9]!==l||e[10]!==r?(v=s.jsx(Mt,{option:r,loading:l,className:"h-full w-full"}),e[9]=l,e[10]=r,e[11]=v):v=e[11];let j;e[12]!==i?(j=i("sandbox.productBlocks.dragToReorderLabel"),e[12]=i,e[13]=j):j=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ct,{size:13}),e[14]=N):N=e[14];let k;e[15]!==m||e[16]!==f||e[17]!==j?(k=s.jsx("button",{type:"button","aria-label":j,...m,...f,className:"absolute left-1 top-1 flex h-6 w-6 cursor-grab items-center justify-center bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-foreground active:cursor-grabbing group-hover/card:opacity-100 rounded-lg",children:N}),e[15]=m,e[16]=f,e[17]=j,e[18]=k):k=e[18];let y;e[19]!==i?(y=i("sandbox.productBlocks.removeProductLabel"),e[19]=i,e[20]=y):y=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Hl,{size:13}),e[21]=w):w=e[21];let S;e[22]!==o||e[23]!==y?(S=s.jsx("button",{type:"button","aria-label":y,onClick:o,className:"absolute right-1 top-1 flex h-6 w-6 items-center justify-center bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-opacity hover:text-destructive group-hover/card:opacity-100 cursor-pointer rounded-lg",children:w}),e[22]=o,e[23]=y,e[24]=S):S=e[24];let C;e[25]!==S||e[26]!==v||e[27]!==k?(C=s.jsxs("div",{className:"relative aspect-square",children:[v,k,S]}),e[25]=S,e[26]=v,e[27]=k,e[28]=C):C=e[28];let P;e[29]!==t||e[30]!==l||e[31]!==r?.label||e[32]!==i?(P=r?.label??(l?i("sandbox.productBlocks.loadingEllipsis"):i("sandbox.productBlocks.productWithId",{id:t})),e[29]=t,e[30]=l,e[31]=r?.label,e[32]=i,e[33]=P):P=e[33];let _;e[34]!==P?(_=s.jsx("p",{className:"line-clamp-2 text-xs leading-tight text-foreground",children:P}),e[34]=P,e[35]=_):_=e[35];let $;e[36]!==t||e[37]!==i?($=i("sandbox.productBlocks.idLabel",{id:t}),e[36]=t,e[37]=i,e[38]=$):$=e[38];let B;e[39]!==$?(B=s.jsx("p",{className:"text-2xs text-muted-foreground",children:$}),e[39]=$,e[40]=B):B=e[40];let I;e[41]!==_||e[42]!==B?(I=s.jsxs("div",{className:"flex flex-col gap-0.5 p-2",children:[_,B]}),e[41]=_,e[42]=B,e[43]=I):I=e[43];let T;return e[44]!==u||e[45]!==C||e[46]!==I||e[47]!==c||e[48]!==x?(T=s.jsxs("div",{ref:u,style:c,className:x,children:[C,I]}),e[44]=u,e[45]=C,e[46]=I,e[47]=c,e[48]=x,e[49]=T):T=e[49],T}function Os(g){const e=L.c(21),{ids:t,lookup:r,onReorder:l,onRemove:o}=g;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={activationConstraint:{distance:6}},e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:pt},e[1]=a):a=e[1];const m=ct(_e(ut,i),_e(dt,a));let f;e[2]!==t||e[3]!==l?(f=c=>{const{active:d,over:x}=c;if(!x||d.id===x.id)return;const v=t.indexOf(String(d.id)),j=t.indexOf(String(x.id));v===-1||j===-1||l(gt(t,v,j))},e[2]=t,e[3]=l,e[4]=f):f=e[4];const u=f;let p;if(e[5]!==t||e[6]!==r||e[7]!==o){let c;e[9]!==r||e[10]!==o?(c=d=>s.jsx(zs,{id:d,option:r.byId.get(d),loading:r.isLoading&&!r.byId.get(d),onRemove:()=>o(d)},d),e[9]=r,e[10]=o,e[11]=c):c=e[11],p=t.map(c),e[5]=t,e[6]=r,e[7]=o,e[8]=p}else p=e[8];let b;e[12]!==p?(b=s.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:p}),e[12]=p,e[13]=b):b=e[13];let h;e[14]!==t||e[15]!==b?(h=s.jsx(ht,{items:t,strategy:Jt,children:b}),e[14]=t,e[15]=b,e[16]=h):h=e[16];let n;return e[17]!==u||e[18]!==m||e[19]!==h?(n=s.jsx(ft,{sensors:m,collisionDetection:mt,onDragEnd:u,children:h}),e[17]=u,e[18]=m,e[19]=h,e[20]=n):n=e[20],n}function Us(g){const e=L.c(13),{onBrowse:t}=g,r=O();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted text-muted-foreground",children:s.jsx(yl,{size:16})}),e[0]=l):l=e[0];let o;e[1]!==r?(o=r("sandbox.productBlocks.addProductsButton"),e[1]=r,e[2]=o):o=e[2];let i;e[3]!==o?(i=s.jsx("span",{className:"text-sm font-medium text-foreground",children:o}),e[3]=o,e[4]=i):i=e[4];let a;e[5]!==r?(a=r("sandbox.productBlocks.addProductsDescription"),e[5]=r,e[6]=a):a=e[6];let m;e[7]!==a?(m=s.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[7]=a,e[8]=m):m=e[8];let f;return e[9]!==t||e[10]!==i||e[11]!==m?(f=s.jsxs("button",{type:"button",onClick:t,className:"flex w-full flex-col items-center justify-center gap-1.5 rounded-lg border border-dashed py-8 text-center transition-colors hover:border-foreground/30 hover:bg-accent cursor-pointer",children:[l,i,m]}),e[9]=t,e[10]=i,e[11]=m,e[12]=f):f=e[12],f}function Ds(g){const e=L.c(30),{ids:t,onChange:r}=g,l=O();let o;e[0]!==t||e[1]!==r?(o=(d,x)=>r(t.map((v,j)=>j===d?x:v)),e[0]=t,e[1]=r,e[2]=o):o=e[2];const i=o;let a;e[3]!==l?(a=l("sandbox.productBlocks.vtexProductIds"),e[3]=l,e[4]=a):a=e[4];let m;e[5]!==a?(m=s.jsx(be,{className:"text-xs text-muted-foreground",children:a}),e[5]=a,e[6]=m):m=e[6];let f;e[7]!==t.length||e[8]!==l?(f=t.length===0&&s.jsx("p",{className:"text-xs text-muted-foreground",children:l("sandbox.productBlocks.startDevServerDescription")}),e[7]=t.length,e[8]=l,e[9]=f):f=e[9];let u;e[10]!==t||e[11]!==r||e[12]!==i||e[13]!==l?(u=t.map((d,x)=>s.jsxs("li",{className:"group/item flex items-center gap-3",children:[s.jsx("input",{value:d,onChange:v=>i(x,v.target.value),placeholder:l("sandbox.productBlocks.skuIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),s.jsx(ue,{label:l("sandbox.productBlocks.removeProductIdButton"),onClick:()=>r(t.filter((v,j)=>j!==x))})]},x)),e[10]=t,e[11]=r,e[12]=i,e[13]=l,e[14]=u):u=e[14];let p;e[15]!==u?(p=s.jsx("ul",{className:"space-y-2",children:u}),e[15]=u,e[16]=p):p=e[16];let b;e[17]!==l?(b=l("sandbox.productBlocks.addProductIdButton"),e[17]=l,e[18]=b):b=e[18];let h;e[19]!==t||e[20]!==r?(h=()=>r([...t,""]),e[19]=t,e[20]=r,e[21]=h):h=e[21];let n;e[22]!==b||e[23]!==h?(n=s.jsx(fe,{label:b,onClick:h}),e[22]=b,e[23]=h,e[24]=n):n=e[24];let c;return e[25]!==m||e[26]!==f||e[27]!==p||e[28]!==n?(c=s.jsxs("div",{className:"space-y-2",children:[m,f,p,n]}),e[25]=m,e[26]=f,e[27]=p,e[28]=n,e[29]=c):c=e[29],c}function Fs(g){const e=L.c(32),{block:t,onChange:r,sandboxRef:l}=g,o=O();let i,a;e[0]!==t.products?(i=vt(t.products),a=new Set(i.filter(Boolean)),e[0]=t.products,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let m;e[3]!==a?(m=[...a],e[3]=a,e[4]=m):m=e[4];const f=m,[u,p]=G.useState(!1),b=wt(l,f);let h;e[5]!==t||e[6]!==r?(h=k=>r({...t,products:jt(t.products,k)}),e[5]=t,e[6]=r,e[7]=h):h=e[7];const n=h;let c;e[8]!==t.title?(c=E(t.title),e[8]=t.title,e[9]=c):c=e[9];let d;e[10]!==t||e[11]!==r?(d=k=>r({...t,title:k}),e[10]=t,e[11]=r,e[12]=d):d=e[12];let x;e[13]!==c||e[14]!==d?(x=s.jsx(As,{value:c,onChange:d}),e[13]=c,e[14]=d,e[15]=x):x=e[15];let v;e[16]!==f||e[17]!==b||e[18]!==i||e[19]!==l||e[20]!==n||e[21]!==o?(v=l?s.jsxs("div",{className:"space-y-3",children:[f.length>0&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[f.length," ",o(f.length===1?"sandbox.productBlocks.productSingular":"sandbox.productBlocks.productPlural")]}),s.jsx(Ft,{label:o("sandbox.productBlocks.browseProductsButton"),onClick:()=>p(!0)})]}),f.length===0?s.jsx(Us,{onBrowse:()=>p(!0)}):s.jsx(Os,{ids:f,lookup:b,onReorder:n,onRemove:k=>n(f.filter(y=>y!==k))})]}):s.jsx(Ds,{ids:i,onChange:n}),e[16]=f,e[17]=b,e[18]=i,e[19]=l,e[20]=n,e[21]=o,e[22]=v):v=e[22];let j;e[23]!==f||e[24]!==u||e[25]!==l||e[26]!==n?(j=l&&s.jsx(Pt,{open:u,onOpenChange:p,sandboxRef:l,selectedIds:f,onChange:n}),e[23]=f,e[24]=u,e[25]=l,e[26]=n,e[27]=j):j=e[27];let N;return e[28]!==x||e[29]!==v||e[30]!==j?(N=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[x,v,j]}),e[28]=x,e[29]=v,e[30]=j,e[31]=N):N=e[31],N}function Ms(g){const e=L.c(27),{id:t,option:r,loading:l,onRemove:o}=g,i=O();let a;e[0]!==l||e[1]!==r?(a=s.jsx(Mt,{option:r,loading:l,className:"h-11 w-11 shrink-0 rounded",iconSize:16}),e[0]=l,e[1]=r,e[2]=a):a=e[2];let m;e[3]!==t||e[4]!==l||e[5]!==r?.label||e[6]!==i?(m=r?.label??(l?i("sandbox.productBlocks.loadingEllipsis"):i("sandbox.productBlocks.productWithId",{id:t})),e[3]=t,e[4]=l,e[5]=r?.label,e[6]=i,e[7]=m):m=e[7];let f;e[8]!==m?(f=s.jsx("p",{className:"truncate text-sm text-foreground",children:m}),e[8]=m,e[9]=f):f=e[9];let u;e[10]!==t||e[11]!==i?(u=i("sandbox.productBlocks.idLabel",{id:t}),e[10]=t,e[11]=i,e[12]=u):u=e[12];let p;e[13]!==u?(p=s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),e[13]=u,e[14]=p):p=e[14];let b;e[15]!==f||e[16]!==p?(b=s.jsxs("div",{className:"min-w-0 flex-1",children:[f,p]}),e[15]=f,e[16]=p,e[17]=b):b=e[17];let h;e[18]!==i?(h=i("sandbox.productBlocks.removeProductButton"),e[18]=i,e[19]=h):h=e[19];let n;e[20]!==o||e[21]!==h?(n=s.jsx(ue,{label:h,onClick:o}),e[20]=o,e[21]=h,e[22]=n):n=e[22];let c;return e[23]!==a||e[24]!==b||e[25]!==n?(c=s.jsxs("div",{className:"group/item flex items-center gap-3 rounded-md border bg-background p-2",children:[a,b,n]}),e[23]=a,e[24]=b,e[25]=n,e[26]=c):c=e[26],c}function Hs(g){const e=L.c(78),{block:t,onChange:r,sandboxRef:l}=g,o=O();let i;e[0]!==t.product?(i=vt(t.product).filter(Boolean)[0]??"",e[0]=t.product,e[1]=i):i=e[1];const a=i,[m,f]=G.useState(!1);let u;e[2]!==a?(u=a?[a]:[],e[2]=a,e[3]=u):u=e[3];const p=wt(l,u);let b;e[4]!==t||e[5]!==r?(b=J=>r({...t,product:jt(t.product,J)}),e[4]=t,e[5]=r,e[6]=b):b=e[6];const h=b;let n;e[7]!==o?(n=o("sandbox.productBlocks.productCardLabel"),e[7]=o,e[8]=n):n=e[8];let c;e[9]!==n?(c=s.jsx("div",{className:"text-xs font-semibold text-muted-foreground",children:n}),e[9]=n,e[10]=c):c=e[10];let d;e[11]!==o?(d=o("sandbox.productBlocks.ctaLabelField"),e[11]=o,e[12]=d):d=e[12];let x;e[13]!==d?(x=s.jsx(be,{htmlFor:"product-card-cta",className:"text-xs text-muted-foreground",children:d}),e[13]=d,e[14]=x):x=e[14];let v;e[15]!==t.textCta?(v=E(t.textCta),e[15]=t.textCta,e[16]=v):v=e[16];let j;e[17]!==t||e[18]!==r?(j=J=>r({...t,textCta:J.target.value}),e[17]=t,e[18]=r,e[19]=j):j=e[19];let N;e[20]!==o?(N=o("sandbox.productBlocks.ctaLabelPlaceholder"),e[20]=o,e[21]=N):N=e[21];let k;e[22]!==N||e[23]!==v||e[24]!==j?(k=s.jsx("input",{id:"product-card-cta",value:v,onChange:j,placeholder:N,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[22]=N,e[23]=v,e[24]=j,e[25]=k):k=e[25];let y;e[26]!==k||e[27]!==x?(y=s.jsxs("div",{className:"space-y-2",children:[x,k]}),e[26]=k,e[27]=x,e[28]=y):y=e[28];let w;e[29]!==o?(w=o("sandbox.productBlocks.productSlugField"),e[29]=o,e[30]=w):w=e[30];let S;e[31]!==w?(S=s.jsx(be,{htmlFor:"product-card-slug",className:"text-xs text-muted-foreground",children:w}),e[31]=w,e[32]=S):S=e[32];let C;e[33]!==t.productSlug?(C=E(t.productSlug),e[33]=t.productSlug,e[34]=C):C=e[34];let P;e[35]!==t||e[36]!==r?(P=J=>r({...t,productSlug:J.target.value}),e[35]=t,e[36]=r,e[37]=P):P=e[37];let _;e[38]!==o?(_=o("sandbox.productBlocks.productSlugPlaceholder"),e[38]=o,e[39]=_):_=e[39];let $;e[40]!==C||e[41]!==P||e[42]!==_?($=s.jsx("input",{id:"product-card-slug",value:C,onChange:P,placeholder:_,className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[40]=C,e[41]=P,e[42]=_,e[43]=$):$=e[43];let B;e[44]!==S||e[45]!==$?(B=s.jsxs("div",{className:"space-y-2",children:[S,$]}),e[44]=S,e[45]=$,e[46]=B):B=e[46];let I;e[47]!==o?(I=o("sandbox.productBlocks.productField"),e[47]=o,e[48]=I):I=e[48];let T;e[49]!==I?(T=s.jsx(be,{className:"text-xs text-muted-foreground",children:I}),e[49]=I,e[50]=T):T=e[50];let z;e[51]!==a||e[52]!==l||e[53]!==o?(z=l&&a&&s.jsx(Ft,{label:o("sandbox.productBlocks.changeButton"),onClick:()=>f(!0)}),e[51]=a,e[52]=l,e[53]=o,e[54]=z):z=e[54];let U;e[55]!==T||e[56]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[T,z]}),e[55]=T,e[56]=z,e[57]=U):U=e[57];let F;e[58]!==p||e[59]!==a||e[60]!==l||e[61]!==h||e[62]!==o?(F=l?a?s.jsx(Ms,{id:a,option:p.byId.get(a),loading:p.isLoading,onRemove:()=>h([])}):s.jsxs("button",{type:"button",onClick:()=>f(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed py-3 text-sm text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[s.jsx(He,{size:14}),o("sandbox.productBlocks.chooseProductButton")]}):s.jsx("input",{value:a,onChange:J=>h(J.target.value?[J.target.value]:[]),placeholder:o("sandbox.productBlocks.vtexProductIdPlaceholder"),className:"h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none placeholder:text-muted-foreground/50 focus:ring-0"}),e[58]=p,e[59]=a,e[60]=l,e[61]=h,e[62]=o,e[63]=F):F=e[63];let H;e[64]!==U||e[65]!==F?(H=s.jsxs("div",{className:"space-y-2",children:[U,F]}),e[64]=U,e[65]=F,e[66]=H):H=e[66];let R;e[67]!==m||e[68]!==a||e[69]!==l||e[70]!==h?(R=l&&s.jsx(Pt,{open:m,onOpenChange:f,sandboxRef:l,selectedIds:a?[a]:[],onChange:h,multiple:!1}),e[67]=m,e[68]=a,e[69]=l,e[70]=h,e[71]=R):R=e[71];let Y;return e[72]!==y||e[73]!==B||e[74]!==H||e[75]!==R||e[76]!==c?(Y=s.jsxs("div",{className:"space-y-4 rounded-lg border bg-card p-4",children:[c,y,B,H,R]}),e[72]=y,e[73]=B,e[74]=H,e[75]=R,e[76]=c,e[77]=Y):Y=e[77],Y}const Gs=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground/40","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function it({value:g,onChange:e,placeholder:t,className:r,menuHost:l,sources:o}){const i=G.useRef(e);i.current=e;const a=Ge({extensions:[qe.configure({link:{HTMLAttributes:{}},heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,bulletList:!1,orderedList:!1,listItem:!1,dropcursor:!1,gapcursor:!1}),...t?[Je.configure({placeholder:t})]:[]],content:g||"",editorProps:{attributes:{class:ne("focus:outline-none",Ye,Gs,r)},handleKeyDown:(m,f)=>f.key==="Enter"},onUpdate:({editor:m})=>i.current(Fl(m.getHTML()))});return a?s.jsxs("div",{className:"relative",children:[s.jsx(Dt,{editor:a,appendTo:l??void 0,sources:o}),s.jsx(Ve,{editor:a})]}):null}const qs=2,Ks=2;function Vs(g){return he(g).map(E)}function Js(g){return he(g).map(e=>Array.isArray(e)?e.map(E):[])}function at(g){return Array.from({length:g},()=>"")}function Ys(g,e){return e.reduce((t,r)=>Math.max(t,r.length),g.length)||1}function Ws(g){const e=L.c(56),{headers:t,rows:r,onChange:l,decofile:o,sandboxRef:i}=g,a=O();let m;e[0]!==o||e[1]!==i?(m={decofile:o,sandboxRef:i},e[0]=o,e[1]=i,e[2]=m):m=e[2];const f=We(m),[u,p]=G.useState(null);let b,h,n,c,d,x,v,j,N;if(e[3]!==t||e[4]!==f||e[5]!==u||e[6]!==l||e[7]!==r||e[8]!==a){const U=Vs(t),F=Js(r),H=U.length===0&&F.length===0;n=H?qs:Ys(U,F);const R=Array.from({length:n},(M,A)=>U[A]??"");c=H?Array.from({length:Ks},()=>at(n)):F.map(M=>Array.from({length:n},(A,V)=>M[V]??""));const Y=`${c.length}x${n}`;let J;e[18]!==l?(J=(M,A)=>l({headers:JSON.stringify(M.some(Xs)?M:[]),rows:JSON.stringify(A)}),e[18]=l,e[19]=J):J=e[19];const W=J,re=(M,A)=>W(R.map((V,D)=>D===M?A:V),c),se=(M,A,V)=>W(R,c.map((D,K)=>K===M?D.map((q,oe)=>oe===A?V:q):D));h=()=>W(R,[...c,at(n)]);const Q=M=>W(R,c.filter((A,V)=>V!==M));b=()=>W([...R,""],c.map(Qs));const ie=M=>W(R.filter((A,V)=>V!==M),c.map(A=>A.filter((V,D)=>D!==M)));N="relative space-y-2",j="overflow-x-auto rounded-lg border",x="w-full border-collapse";let te;e[20]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("th",{className:"w-8 border-b"}),e[20]=te):te=e[20];const X=s.jsxs("tr",{className:"bg-muted/40",children:[R.map((M,A)=>s.jsxs("th",{className:"group/col relative border-b border-r p-0 last:border-r-0 text-left align-top",children:[s.jsx(it,{value:M,onChange:V=>re(A,V),placeholder:a("sandbox.tableBlock.headerPlaceholder",{n:A+1}),className:"py-2 pl-7 pr-3 text-xs font-semibold uppercase tracking-wide [&_p]:my-0 focus:bg-background",menuHost:u,sources:f}),n>1&&s.jsx("button",{type:"button","aria-label":a("sandbox.tableBlock.removeColumn",{n:A+1}),onClick:()=>ie(A),className:"absolute left-0.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center text-muted-foreground/50 opacity-0 transition-opacity hover:text-destructive group-hover/col:opacity-100 cursor-pointer rounded-lg",children:s.jsx(Ue,{size:12})})]},`${Y}-h-${A}`)),te]});e[21]!==X?(v=s.jsx("thead",{children:X}),e[21]=X,e[22]=v):v=e[22],d=c.map((M,A)=>s.jsxs("tr",{className:"group/item border-b last:border-b-0",children:[M.map((V,D)=>s.jsx("td",{className:"border-r p-0 last:border-r-0 align-top",children:s.jsx(it,{value:V,onChange:K=>se(A,D,K),placeholder:"—",className:"px-3 py-2 text-sm [&_p]:my-0 focus:bg-muted/30",menuHost:u,sources:f})},`${Y}-${A}-${D}`)),s.jsx("td",{className:"w-8 text-center align-middle",children:c.length>1&&s.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":a("sandbox.tableBlock.removeRow",{n:A+1}),onClick:()=>Q(A),className:"opacity-0 transition-opacity group-hover/item:opacity-100",children:s.jsx(Ue,{className:"size-3.25"})})})]},`${Y}-${A}`)),e[3]=t,e[4]=f,e[5]=u,e[6]=l,e[7]=r,e[8]=a,e[9]=b,e[10]=h,e[11]=n,e[12]=c,e[13]=d,e[14]=x,e[15]=v,e[16]=j,e[17]=N}else b=e[9],h=e[10],n=e[11],c=e[12],d=e[13],x=e[14],v=e[15],j=e[16],N=e[17];let k;e[23]!==n||e[24]!==c.length||e[25]!==a?(k=c.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:n+1,className:"px-3 py-4 text-center text-xs text-muted-foreground",children:a("sandbox.tableBlock.noRowsYet")})}),e[23]=n,e[24]=c.length,e[25]=a,e[26]=k):k=e[26];let y;e[27]!==d||e[28]!==k?(y=s.jsxs("tbody",{children:[d,k]}),e[27]=d,e[28]=k,e[29]=y):y=e[29];let w;e[30]!==x||e[31]!==v||e[32]!==y?(w=s.jsxs("table",{className:x,children:[v,y]}),e[30]=x,e[31]=v,e[32]=y,e[33]=w):w=e[33];let S;e[34]!==j||e[35]!==w?(S=s.jsx("div",{className:j,children:w}),e[34]=j,e[35]=w,e[36]=S):S=e[36];let C;e[37]!==a?(C=a("sandbox.tableBlock.addRow"),e[37]=a,e[38]=C):C=e[38];let P;e[39]!==h||e[40]!==C?(P=s.jsx(fe,{label:C,onClick:h}),e[39]=h,e[40]=C,e[41]=P):P=e[41];let _;e[42]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Fe,{size:13}),e[42]=_):_=e[42];let $;e[43]!==a?($=a("sandbox.tableBlock.addColumn"),e[43]=a,e[44]=$):$=e[44];let B;e[45]!==b||e[46]!==$?(B=s.jsxs("button",{type:"button",onClick:b,className:"flex items-center gap-1.5 rounded-lg border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground cursor-pointer",children:[_,$]}),e[45]=b,e[46]=$,e[47]=B):B=e[47];let I;e[48]!==P||e[49]!==B?(I=s.jsxs("div",{className:"flex gap-2",children:[P,B]}),e[48]=P,e[49]=B,e[50]=I):I=e[50];let T;e[51]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("div",{ref:p,className:"absolute z-20"}),e[51]=T):T=e[51];let z;return e[52]!==S||e[53]!==I||e[54]!==N?(z=s.jsxs("div",{className:N,children:[S,I,T]}),e[52]=S,e[53]=I,e[54]=N,e[55]=z):z=e[55],z}function Qs(g){return[...g,""]}function Xs(g){return g.trim()!==""}function Zs(g){const e=L.c(50),{block:t,meta:r,onChange:l,decofile:o,sandbox:i,previewBaseUrl:a,onSaveReferencedBlock:m}=g,f=O();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];const[p,b]=G.useState(u),h=t.__resolveType??"";let n;e[1]!==r||e[2]!==h?(n=h?Bl(h,r):null,e[1]=r,e[2]=h,e[3]=n):n=e[3];const c=n;if(!c){let B;e[4]!==h||e[5]!==f?(B=f("sandbox.blockRegistry.unknownBlockType",{type:h}),e[4]=h,e[5]=f,e[6]=B):B=e[6];let I;return e[7]!==B?(I=s.jsx("p",{className:"text-xs text-muted-foreground",children:B}),e[7]=B,e[8]=I):I=e[8],I}let d;e[9]!==r||e[10]!==h?(d=el(h,r),e[9]=r,e[10]=h,e[11]=d):d=e[11];const x=d;let v;e[12]!==x.iconName||e[13]!==x.iconUrl||e[14]!==x.title?(v=s.jsx(At,{iconName:x.iconName,iconUrl:x.iconUrl,alt:x.title,className:"size-7",size:14}),e[12]=x.iconName,e[13]=x.iconUrl,e[14]=x.title,e[15]=v):v=e[15];let j;e[16]!==x.title?(j=s.jsx("span",{className:"truncate text-sm font-medium",children:x.title}),e[16]=x.title,e[17]=j):j=e[17];let N;e[18]!==x.description?(N=x.description&&s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:x.description}),e[18]=x.description,e[19]=N):N=e[19];let k;e[20]!==j||e[21]!==N?(k=s.jsxs("div",{className:"flex min-w-0 flex-col",children:[j,N]}),e[20]=j,e[21]=N,e[22]=k):k=e[22];let y;e[23]!==v||e[24]!==k?(y=s.jsxs("div",{className:"flex items-center gap-2.5",children:[v,k]}),e[23]=v,e[24]=k,e[25]=y):y=e[25];let w;e[26]!==f?(w=f("sandbox.blockRegistry.breadcrumbLabel"),e[26]=f,e[27]=w):w=e[27];let S;e[28]!==f?(S=f("sandbox.blockRegistry.backToFields"),e[28]=f,e[29]=S):S=e[29];let C;e[30]!==p||e[31]!==S||e[32]!==w?(C=s.jsx(Ml,{path:p,onNavigate:b,label:w,backTitle:S}),e[30]=p,e[31]=S,e[32]=w,e[33]=C):C=e[33];let P;e[34]!==l?(P=B=>l(B),e[34]=l,e[35]=P):P=e[35];let _;e[36]!==t||e[37]!==p||e[38]!==o||e[39]!==r||e[40]!==m||e[41]!==a||e[42]!==i||e[43]!==c||e[44]!==P?(_=s.jsx(Gl,{schema:c,value:t,onChange:P,basePath:"",breadcrumbPath:p,onBreadcrumbChange:b,meta:r,decofile:o,sandbox:i,previewBaseUrl:a,onSaveReferencedBlock:m}),e[36]=t,e[37]=p,e[38]=o,e[39]=r,e[40]=m,e[41]=a,e[42]=i,e[43]=c,e[44]=P,e[45]=_):_=e[45];let $;return e[46]!==C||e[47]!==_||e[48]!==y?($=s.jsxs("div",{className:"space-y-3 rounded-lg border bg-background p-3",children:[y,C,_]}),e[46]=C,e[47]=_,e[48]=y,e[49]=$):$=e[49],$}function eo(g){const e=L.c(188),{block:t,meta:r,onChange:l,decofile:o,sandboxRef:i,previewBaseUrl:a,onSaveReferencedBlock:m}=g,f=O(),u=t.__resolveType??"",p=tl(u);if(ll(u))switch(p){case"Paragraph":{let n;e[0]!==t.html?(n=E(t.html),e[0]=t.html,e[1]=n):n=e[1];let c;e[2]!==f?(c=f("sandbox.blockRegistry.writeSomethingPlaceholder"),e[2]=f,e[3]=c):c=e[3];let d;e[4]!==t||e[5]!==l?(d=v=>l({...t,html:v}),e[4]=t,e[5]=l,e[6]=d):d=e[6];let x;return e[7]!==o||e[8]!==i||e[9]!==n||e[10]!==c||e[11]!==d?(x=s.jsx(as,{html:n,placeholder:c,onChange:d,decofile:o,sandboxRef:i}),e[7]=o,e[8]=i,e[9]=n,e[10]=c,e[11]=d,e[12]=x):x=e[12],x}case"Heading":{let n;e[13]!==t.text?(n=E(t.text),e[13]=t.text,e[14]=n):n=e[14];let c;e[15]!==t.level?(c=E(t.level),e[15]=t.level,e[16]=c):c=e[16];let d;e[17]!==t||e[18]!==l?(d=v=>l({...t,...v}),e[17]=t,e[18]=l,e[19]=d):d=e[19];let x;return e[20]!==n||e[21]!==c||e[22]!==d?(x=s.jsx(gs,{text:n,level:c,onChange:d}),e[20]=n,e[21]=c,e[22]=d,e[23]=x):x=e[23],x}case"Quote":{let n;e[24]!==t.quote?(n=E(t.quote),e[24]=t.quote,e[25]=n):n=e[25];let c;e[26]!==t||e[27]!==l?(c=x=>l({...t,quote:x}),e[26]=t,e[27]=l,e[28]=c):c=e[28];let d;return e[29]!==n||e[30]!==c?(d=s.jsx(hs,{quote:n,onChange:c}),e[29]=n,e[30]=c,e[31]=d):d=e[31],d}case"Code":{let n;e[32]!==t.code?(n=E(t.code),e[32]=t.code,e[33]=n):n=e[33];let c;e[34]!==t.language?(c=E(t.language),e[34]=t.language,e[35]=c):c=e[35];let d;e[36]!==t||e[37]!==l?(d=v=>l({...t,...v}),e[36]=t,e[37]=l,e[38]=d):d=e[38];let x;return e[39]!==n||e[40]!==c||e[41]!==d?(x=s.jsx(bs,{code:n,language:c,onChange:d}),e[39]=n,e[40]=c,e[41]=d,e[42]=x):x=e[42],x}case"List":{let n;e[43]!==t.items?(n=E(t.items),e[43]=t.items,e[44]=n):n=e[44];let c;e[45]!==t.style?(c=E(t.style),e[45]=t.style,e[46]=c):c=e[46];let d;e[47]!==t||e[48]!==l?(d=v=>l({...t,...v}),e[47]=t,e[48]=l,e[49]=d):d=e[49];let x;return e[50]!==o||e[51]!==i||e[52]!==n||e[53]!==c||e[54]!==d?(x=s.jsx(vs,{items:n,style:c,onChange:d,decofile:o,sandboxRef:i}),e[50]=o,e[51]=i,e[52]=n,e[53]=c,e[54]=d,e[55]=x):x=e[55],x}case"BlockImage":{let n;return e[56]!==t||e[57]!==l?(n=s.jsx(Ss,{block:t,onChange:l}),e[56]=t,e[57]=l,e[58]=n):n=e[58],n}case"Video":{let n;e[59]!==t.url?(n=E(t.url),e[59]=t.url,e[60]=n):n=e[60];let c;e[61]!==t.caption?(c=E(t.caption),e[61]=t.caption,e[62]=c):c=e[62];let d;e[63]!==t||e[64]!==l?(d=v=>l({...t,...v}),e[63]=t,e[64]=l,e[65]=d):d=e[65];let x;return e[66]!==n||e[67]!==c||e[68]!==d?(x=s.jsx(ks,{url:n,caption:c,onChange:d}),e[66]=n,e[67]=c,e[68]=d,e[69]=x):x=e[69],x}case"Divider":{let n;return e[70]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ys,{}),e[70]=n):n=e[70],n}case"Cta":{let n;e[71]!==t.text?(n=E(t.text),e[71]=t.text,e[72]=n):n=e[72];let c;e[73]!==t.href?(c=E(t.href),e[73]=t.href,e[74]=c):c=e[74];let d;e[75]!==t||e[76]!==l?(d=v=>l({...t,...v}),e[75]=t,e[76]=l,e[77]=d):d=e[77];let x;return e[78]!==n||e[79]!==c||e[80]!==d?(x=s.jsx(Ns,{text:n,href:c,onChange:d}),e[78]=n,e[79]=c,e[80]=d,e[81]=x):x=e[81],x}case"Callout":{let n;e[82]!==t.title?(n=E(t.title),e[82]=t.title,e[83]=n):n=e[83];let c;e[84]!==t.body?(c=E(t.body),e[84]=t.body,e[85]=c):c=e[85];let d;e[86]!==t.variant?(d=E(t.variant),e[86]=t.variant,e[87]=d):d=e[87];let x;e[88]!==t||e[89]!==l?(x=j=>l({...t,...j}),e[88]=t,e[89]=l,e[90]=x):x=e[90];let v;return e[91]!==n||e[92]!==c||e[93]!==d||e[94]!==x?(v=s.jsx(Cs,{title:n,body:c,variant:d,onChange:x}),e[91]=n,e[92]=c,e[93]=d,e[94]=x,e[95]=v):v=e[95],v}case"Stat":{let n;e[96]!==t.value?(n=E(t.value),e[96]=t.value,e[97]=n):n=e[97];let c;e[98]!==t.label?(c=E(t.label),e[98]=t.label,e[99]=c):c=e[99];let d;e[100]!==t.description?(d=E(t.description),e[100]=t.description,e[101]=d):d=e[101];let x;e[102]!==t||e[103]!==l?(x=j=>l({...t,...j}),e[102]=t,e[103]=l,e[104]=x):x=e[104];let v;return e[105]!==n||e[106]!==c||e[107]!==d||e[108]!==x?(v=s.jsx(Bs,{value:n,label:c,description:d,onChange:x}),e[105]=n,e[106]=c,e[107]=d,e[108]=x,e[109]=v):v=e[109],v}case"StatGroup":{let n;e[110]!==t.stats?(n=de(t.stats),e[110]=t.stats,e[111]=n):n=e[111];let c;e[112]!==t||e[113]!==l?(c=x=>l({...t,stats:x}),e[112]=t,e[113]=l,e[114]=c):c=e[114];let d;return e[115]!==n||e[116]!==c?(d=s.jsx(_s,{stats:n,onChange:c}),e[115]=n,e[116]=c,e[117]=d):d=e[117],d}case"CardGroup":{let n;e[118]!==t.cards?(n=de(t.cards),e[118]=t.cards,e[119]=n):n=e[119];let c;e[120]!==t||e[121]!==l?(c=x=>l({...t,cards:x}),e[120]=t,e[121]=l,e[122]=c):c=e[122];let d;return e[123]!==n||e[124]!==c?(d=s.jsx(ws,{cards:n,onChange:c}),e[123]=n,e[124]=c,e[125]=d):d=e[125],d}case"Checklist":{let n;e[126]!==t.title?(n=E(t.title),e[126]=t.title,e[127]=n):n=e[127];let c;e[128]!==t.items?(c=de(t.items),e[128]=t.items,e[129]=c):c=e[129];let d;e[130]!==t||e[131]!==l?(d=v=>l({...t,...v}),e[130]=t,e[131]=l,e[132]=d):d=e[132];let x;return e[133]!==n||e[134]!==c||e[135]!==d?(x=s.jsx(Ps,{title:n,items:c,onChange:d}),e[133]=n,e[134]=c,e[135]=d,e[136]=x):x=e[136],x}case"Steps":{let n;e[137]!==t.title?(n=E(t.title),e[137]=t.title,e[138]=n):n=e[138];let c;e[139]!==t.steps?(c=de(t.steps),e[139]=t.steps,e[140]=c):c=e[140];let d;e[141]!==t||e[142]!==l?(d=v=>l({...t,...v}),e[141]=t,e[142]=l,e[143]=d):d=e[143];let x;return e[144]!==n||e[145]!==c||e[146]!==d?(x=s.jsx($s,{title:n,steps:c,onChange:d}),e[144]=n,e[145]=c,e[146]=d,e[147]=x):x=e[147],x}case"Comparison":{let n;e[148]!==t.left?(n=de(t.left,{}),e[148]=t.left,e[149]=n):n=e[149];let c;e[150]!==t.right?(c=de(t.right,{}),e[150]=t.right,e[151]=c):c=e[151];let d;e[152]!==t||e[153]!==l?(d=v=>l({...t,...v}),e[152]=t,e[153]=l,e[154]=d):d=e[154];let x;return e[155]!==n||e[156]!==c||e[157]!==d?(x=s.jsx(Ts,{left:n,right:c,onChange:d}),e[155]=n,e[156]=c,e[157]=d,e[158]=x):x=e[158],x}case"Table":{let n;e[159]!==t.headers?(n=de(t.headers),e[159]=t.headers,e[160]=n):n=e[160];let c;e[161]!==t.rows?(c=de(t.rows),e[161]=t.rows,e[162]=c):c=e[162];let d;e[163]!==t||e[164]!==l?(d=v=>l({...t,...v}),e[163]=t,e[164]=l,e[165]=d):d=e[165];let x;return e[166]!==o||e[167]!==i||e[168]!==n||e[169]!==c||e[170]!==d?(x=s.jsx(Ws,{headers:n,rows:c,onChange:d,decofile:o,sandboxRef:i}),e[166]=o,e[167]=i,e[168]=n,e[169]=c,e[170]=d,e[171]=x):x=e[171],x}case"ProductCard":{let n;return e[172]!==t||e[173]!==l||e[174]!==i?(n=s.jsx(Hs,{block:t,onChange:l,sandboxRef:i}),e[172]=t,e[173]=l,e[174]=i,e[175]=n):n=e[175],n}case"ProductShelf":{let n;return e[176]!==t||e[177]!==l||e[178]!==i?(n=s.jsx(Fs,{block:t,onChange:l,sandboxRef:i}),e[176]=t,e[177]=l,e[178]=i,e[179]=n):n=e[179],n}}let h;return e[180]!==t||e[181]!==o||e[182]!==r||e[183]!==l||e[184]!==m||e[185]!==a||e[186]!==i?(h=s.jsx(Zs,{block:t,meta:r,onChange:l,decofile:o,sandbox:i,previewBaseUrl:a,onSaveReferencedBlock:m}),e[180]=t,e[181]=o,e[182]=r,e[183]=l,e[184]=m,e[185]=a,e[186]=i,e[187]=h):h=e[187],h}function to(g){const e=L.c(46),{id:t,block:r,meta:l,onChange:o,onDelete:i,onDuplicate:a,decofile:m,sandboxRef:f,previewBaseUrl:u,onSaveReferencedBlock:p}=g,b=O();let h;e[0]!==t?(h={id:t},e[0]=t,e[1]=h):h=e[1];const{attributes:n,listeners:c,setNodeRef:d,transform:x,transition:v,isDragging:j}=bt(h);let N;e[2]!==x?(N=xt.Transform.toString(x),e[2]=x,e[3]=N):N=e[3];let k;e[4]!==N||e[5]!==v?(k={transform:N,transition:v},e[4]=N,e[5]=v,e[6]=k):k=e[6];const y=j&&"opacity-50";let w;e[7]!==y?(w=ne("group/row relative rounded-md py-1.5 pl-12 pr-2 transition-colors hover:bg-accent",y),e[7]=y,e[8]=w):w=e[8];let S;e[9]!==b?(S=b("sandbox.blockRow.dragToReorder"),e[9]=b,e[10]=S):S=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ct,{size:14}),e[11]=C):C=e[11];let P;e[12]!==n||e[13]!==c||e[14]!==S?(P=s.jsx("button",{type:"button","aria-label":S,className:"absolute left-1 top-1.5 flex h-6 w-6 cursor-grab items-center justify-center text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground active:cursor-grabbing group-hover/row:opacity-100 rounded-lg",...n,...c,children:C}),e[12]=n,e[13]=c,e[14]=S,e[15]=P):P=e[15];let _;e[16]!==b?(_=b("sandbox.blockRow.duplicateBlock"),e[16]=b,e[17]=_):_=e[17];let $;e[18]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(vl,{className:"size-3.5"}),e[18]=$):$=e[18];let B;e[19]!==a||e[20]!==_?(B=s.jsx(Oe,{variant:"ghost",size:"icon-xs",type:"button","aria-label":_,onClick:a,children:$}),e[19]=a,e[20]=_,e[21]=B):B=e[21];let I;e[22]!==b?(I=b("sandbox.blockRow.deleteBlock"),e[22]=b,e[23]=I):I=e[23];let T;e[24]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Ue,{className:"size-3.5"}),e[24]=T):T=e[24];let z;e[25]!==i||e[26]!==I?(z=s.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":I,onClick:i,children:T}),e[25]=i,e[26]=I,e[27]=z):z=e[27];let U;e[28]!==B||e[29]!==z?(U=s.jsxs("div",{className:"absolute right-1 top-1 z-10 flex flex-row gap-0.5 rounded-md bg-background/80 opacity-0 backdrop-blur-sm transition-opacity group-hover/row:opacity-100",children:[B,z]}),e[28]=B,e[29]=z,e[30]=U):U=e[30];let F;e[31]!==r||e[32]!==m||e[33]!==l||e[34]!==o||e[35]!==p||e[36]!==u||e[37]!==f?(F=s.jsx(eo,{block:r,meta:l,onChange:o,decofile:m,sandboxRef:f,previewBaseUrl:u,onSaveReferencedBlock:p}),e[31]=r,e[32]=m,e[33]=l,e[34]=o,e[35]=p,e[36]=u,e[37]=f,e[38]=F):F=e[38];let H;return e[39]!==d||e[40]!==U||e[41]!==F||e[42]!==k||e[43]!==w||e[44]!==P?(H=s.jsxs("div",{ref:d,style:k,className:w,children:[P,U,F]}),e[39]=d,e[40]=U,e[41]=F,e[42]=k,e[43]=w,e[44]=P,e[45]=H):H=e[45],H}function $e(){return crypto.randomUUID()}function lo(g){return g.map(e=>({id:$e(),block:e}))}function so(g,e){return e.map((t,r)=>{const l=g[r];return{id:l?l.id:$e(),block:t}})}function zo(g){return Array.isArray(g)?g:[]}function oo(g){const e=L.c(10),{blockTypes:t,onInsert:r}=g,l=O();let o;e[0]!==l?(o=l("sandbox.blockPicker.insertBlockButton"),e[0]=l,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"absolute inset-x-10 top-1/2 h-px -translate-y-1/2 bg-primary/30"}),e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-lg border bg-background text-muted-foreground",children:s.jsx(Fe,{size:12})}),e[3]=a):a=e[3];let m;e[4]!==o?(m=s.jsxs("button",{type:"button","aria-label":o,className:"group/ins relative flex h-2.5 w-full items-center justify-center opacity-0 transition-opacity hover:opacity-100 cursor-pointer",children:[i,a]}),e[4]=o,e[5]=m):m=e[5];let f;return e[6]!==t||e[7]!==r||e[8]!==m?(f=s.jsx(zt,{blockTypes:t,onInsert:r,align:"center",children:m}),e[6]=t,e[7]=r,e[8]=m,e[9]=f):f=e[9],f}function Oo(g){const e=L.c(77),{value:t,onChange:r,meta:l,decofile:o,sandboxRef:i,previewBaseUrl:a,onSaveReferencedBlock:m,emptyMessage:f}=g,u=f===void 0?"No content yet. Add your first block below.":f,p=O(),b=sl();let h;e[0]!==b||e[1]!==l?(h=ol(l,{hideDefaults:b}),e[0]=b,e[1]=l,e[2]=h):h=e[2];const n=h;let c;e[3]!==t?(c=()=>lo(t),e[3]=t,e[4]=c):c=e[4];const[d,x]=G.useState(c),[v,j]=G.useState(t);t!==v&&(j(t),x(so(d,t)));let N;e[5]!==d?(N=d.map(io),e[5]=d,e[6]=N):N=e[6];const k=N;let y;e[7]!==d?(y=d.map(ro),e[7]=d,e[8]=y):y=e[8];const w=y;let S;e[9]!==r?(S=D=>{x(D);const K=D.map(no);j(K),r(K)},e[9]=r,e[10]=S):S=e[10];const C=S;let P;e[11]!==d||e[12]!==C?(P=(D,K)=>{const q=[...d];q.splice(D,0,{id:$e(),block:{__resolveType:K}}),C(q)},e[11]=d,e[12]=C,e[13]=P):P=e[13];const _=P;let $;e[14]!==d||e[15]!==C?($=(D,K)=>{C(d.map((q,oe)=>oe===D?{...q,block:K}:q))},e[14]=d,e[15]=C,e[16]=$):$=e[16];const B=$;let I;e[17]!==d||e[18]!==C?(I=D=>{C(d.filter((K,q)=>q!==D))},e[17]=d,e[18]=C,e[19]=I):I=e[19];const T=I;let z;e[20]!==d||e[21]!==C?(z=D=>{const K=d[D];if(!K)return;const q=[...d];q.splice(D+1,0,{id:$e(),block:structuredClone(K.block)}),C(q)},e[20]=d,e[21]=C,e[22]=z):z=e[22];const U=z;let F;e[23]===Symbol.for("react.memo_cache_sentinel")?(F={activationConstraint:{distance:6}},e[23]=F):F=e[23];let H;e[24]===Symbol.for("react.memo_cache_sentinel")?(H={coordinateGetter:pt},e[24]=H):H=e[24];const R=ct(_e(ut,F),_e(dt,H));let Y;e[25]!==d||e[26]!==C?(Y=D=>{const{active:K,over:q}=D;if(!q||K.id===q.id)return;const oe=d.findIndex(le=>le.id===String(K.id)),ce=d.findIndex(le=>le.id===String(q.id));oe===-1||ce===-1||C(gt(d,oe,ce))},e[25]=d,e[26]=C,e[27]=Y):Y=e[27];const J=Y;let W;if(e[28]!==d||e[29]!==n||e[30]!==o||e[31]!==U||e[32]!==_||e[33]!==l||e[34]!==m||e[35]!==a||e[36]!==T||e[37]!==i||e[38]!==B){let D;e[40]!==n||e[41]!==o||e[42]!==U||e[43]!==_||e[44]!==l||e[45]!==m||e[46]!==a||e[47]!==T||e[48]!==i||e[49]!==B?(D=(K,q)=>{const{id:oe,block:ce}=K;return s.jsxs("div",{children:[s.jsx(oo,{blockTypes:n,onInsert:le=>_(q,le)}),s.jsx(to,{id:oe,block:ce,meta:l,onChange:le=>B(q,le),onDelete:()=>T(q),onDuplicate:()=>U(q),decofile:o,sandboxRef:i,previewBaseUrl:a,onSaveReferencedBlock:m})]},oe)},e[40]=n,e[41]=o,e[42]=U,e[43]=_,e[44]=l,e[45]=m,e[46]=a,e[47]=T,e[48]=i,e[49]=B,e[50]=D):D=e[50],W=d.map(D),e[28]=d,e[29]=n,e[30]=o,e[31]=U,e[32]=_,e[33]=l,e[34]=m,e[35]=a,e[36]=T,e[37]=i,e[38]=B,e[39]=W}else W=e[39];let re;e[51]!==k||e[52]!==W?(re=s.jsx(ht,{items:k,strategy:Yt,children:W}),e[51]=k,e[52]=W,e[53]=re):re=e[53];let se;e[54]!==J||e[55]!==R||e[56]!==re?(se=s.jsx(ft,{sensors:R,collisionDetection:mt,onDragEnd:J,children:re}),e[54]=J,e[55]=R,e[56]=re,e[57]=se):se=e[57];let Q;e[58]!==w.length||e[59]!==u?(Q=w.length===0&&s.jsx("p",{className:"px-3 pb-1 pt-2 text-sm text-muted-foreground",children:u}),e[58]=w.length,e[59]=u,e[60]=Q):Q=e[60];let ie;e[61]!==d.length||e[62]!==_?(ie=D=>_(d.length,D),e[61]=d.length,e[62]=_,e[63]=ie):ie=e[63];let te;e[64]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Fe,{size:16}),e[64]=te):te=e[64];let X;e[65]!==p?(X=p("sandbox.blockDocument.addBlock"),e[65]=p,e[66]=X):X=e[66];let M;e[67]!==X?(M=s.jsxs("button",{type:"button",className:"mt-1 flex w-full items-center gap-2 rounded-md py-2 pl-14 pr-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[te,X]}),e[67]=X,e[68]=M):M=e[68];let A;e[69]!==n||e[70]!==ie||e[71]!==M?(A=s.jsx(zt,{blockTypes:n,onInsert:ie,children:M}),e[69]=n,e[70]=ie,e[71]=M,e[72]=A):A=e[72];let V;return e[73]!==se||e[74]!==Q||e[75]!==A?(V=s.jsxs("div",{className:"mt-2",children:[se,Q,A]}),e[73]=se,e[74]=Q,e[75]=A,e[76]=V):V=e[76],V}function no(g){return g.block}function ro(g){return g.block}function io(g){return g.id}export{Oo as B,Vl as R,Lt as a,Ao as b,zo as c,Eo as d,It as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,r as P,j as S}from"./index-
|
|
1
|
+
import{c as w,r as P,j as S}from"./index-C8YP0XfX.js";const f={target:null,editSeoPageKey:null,variantOverride:null,focusedBlockKey:null};function W(t,e){switch(e.type){case"select":return{...t,target:e.target,variantOverride:null,editSeoPageKey:null,focusedBlockKey:null};case"edit-seo":return{...t,target:e.target,editSeoPageKey:e.target.key,variantOverride:null,focusedBlockKey:null};case"consume-edit-seo":return{...t,editSeoPageKey:null};case"variant-override":return{...t,variantOverride:e.params};case"focus-block":return{...t,focusedBlockKey:e.key}}}const K=P.createContext(null);function E(t){const e=w.c(20),{resetKey:s,children:p}=t;let d;e[0]!==s?(d={key:s,state:f},e[0]=s,e[1]=d):d=e[1];const[g,m]=P.useState(d),y=g.key===s?g.state:f;let k;e[2]!==s?(k=r=>m(B=>({key:s,state:W(B.key===s?B.state:f,r)})),e[2]=s,e[3]=k):k=e[3];const o=k;let l,c,a,i,n;e[4]!==o?(l=r=>o({type:"select",target:r}),c=r=>o({type:"edit-seo",target:r}),a=()=>o({type:"consume-edit-seo"}),i=r=>o({type:"variant-override",params:r}),n=r=>o({type:"focus-block",key:r}),e[4]=o,e[5]=l,e[6]=c,e[7]=a,e[8]=i,e[9]=n):(l=e[5],c=e[6],a=e[7],i=e[8],n=e[9]);let u;e[10]!==y||e[11]!==l||e[12]!==c||e[13]!==a||e[14]!==i||e[15]!==n?(u={state:y,selectTarget:l,editSeo:c,consumeEditSeo:a,setVariantOverride:i,setFocusedBlock:n},e[10]=y,e[11]=l,e[12]=c,e[13]=a,e[14]=i,e[15]=n,e[16]=u):u=e[16];let v;return e[17]!==p||e[18]!==u?(v=S.jsx(K,{value:u,children:p}),e[17]=p,e[18]=u,e[19]=v):v=e[19],v}function O(){const t=P.use(K);if(!t)throw new Error("useBlocksPreviewWorkspace must be used inside BlocksPreviewWorkspaceProvider");return t}export{E as B,O as u};
|