decocms 4.521.0 → 4.523.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-NiXAWNnI.js → ActiveShapeUtils-DFQm8e1Y.js} +1 -1
- package/dist/client/assets/{AlertCircle-DGVmeswV.js → AlertCircle-BA2QScAs.js} +1 -1
- package/dist/client/assets/{AreaChart-DL7RX4W6.js → AreaChart-ClrQt6jf.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DDWHto_R.js → ArrowLeft-_xxDQTdX.js} +1 -1
- package/dist/client/assets/{ArrowUp-bm_9Fp5i.js → ArrowUp-DmTmdisJ.js} +1 -1
- package/dist/client/assets/{BarChart-DmTON82J.js → BarChart-CA5rp-M1.js} +1 -1
- package/dist/client/assets/{Building02-p3_mZ-E2.js → Building02-B6-7Dcc4.js} +1 -1
- package/dist/client/assets/{CartesianChart-oH_IqMjj.js → CartesianChart-C28Ew3_Y.js} +1 -1
- package/dist/client/assets/{CategoricalChart-Dy74bBD9.js → CategoricalChart-BhrWWlP9.js} +1 -1
- package/dist/client/assets/{CheckCircle-Bx5iI6Lz.js → CheckCircle-DhEJCbmL.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CtVpNCaH.js → ChevronSelectorVertical-jTXK7pCA.js} +1 -1
- package/dist/client/assets/{ChevronUp-ojSOtVX2.js → ChevronUp-TdPYqe3f.js} +1 -1
- package/dist/client/assets/{Copy01-CixCoZek.js → Copy01-7T2u11TN.js} +1 -1
- package/dist/client/assets/{CreditCard01-D0K-VlXU.js → CreditCard01-Bh4Xntzj.js} +1 -1
- package/dist/client/assets/{DotsVertical-DzE0Ijkk.js → DotsVertical-BSltXJxd.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DRS3e7xk.js → ErrorBarContext-C8fMO8MO.js} +1 -1
- package/dist/client/assets/{Globe04-CE15ScrO.js → Globe04-ZetgXMJl.js} +1 -1
- package/dist/client/assets/{Image01-Bks737AT.js → Image01-Ck0HrQIi.js} +1 -1
- package/dist/client/assets/{Key01-CxbATohw.js → Key01-CiAU22Ss.js} +1 -1
- package/dist/client/assets/{Link01-DCdDhO7H.js → Link01-DByQNRHy.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ZF7OlrXq.js → LinkBroken01-CHqvYaqa.js} +1 -1
- package/dist/client/assets/{Minus-DqMKpYLh.js → Minus-oTJkI1L_.js} +1 -1
- package/dist/client/assets/{Monitor01-B-_Pl3qs.js → Monitor01-CSVPDFy2.js} +1 -1
- package/dist/client/assets/{Play-B6eaz3Uv.js → Play-BnvS6etf.js} +1 -1
- package/dist/client/assets/{Plus-B28tKNm1.js → Plus-hR9qqg7F.js} +1 -1
- package/dist/client/assets/{ReferenceLine-C5aqWs1r.js → ReferenceLine-C1OFxgQn.js} +1 -1
- package/dist/client/assets/{SearchMd-OCyidoZI.js → SearchMd-CipODP3M.js} +1 -1
- package/dist/client/assets/{Sector-CtNXSnWN.js → Sector-TDWn4NBe.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DHyiQNjO.js → ShoppingBag01-C6zQQ-g_.js} +1 -1
- package/dist/client/assets/{Sun-BUl5hUgs.js → Sun-fxjuDx85.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BKu4aB4V.js → SwitchHorizontal01-qZTU6RHM.js} +1 -1
- package/dist/client/assets/{Tool01-CnZckhqi.js → Tool01-CZyq1C-m.js} +1 -1
- package/dist/client/assets/{Trash01-C34kFeWG.js → Trash01-kzymRLEh.js} +1 -1
- package/dist/client/assets/{Upload01-sDXthFWJ.js → Upload01-aGlTSryk.js} +1 -1
- package/dist/client/assets/{User01-2Hx1yZRb.js → User01-B_8hWFtQ.js} +1 -1
- package/dist/client/assets/{UserSquare-UeuSXkL4.js → UserSquare-C-ypPx1C.js} +1 -1
- package/dist/client/assets/{Users01-D78JG135.js → Users01-u8O34kVf.js} +1 -1
- package/dist/client/assets/{XClose-BbuvN9Qp.js → XClose-Ct2xtw32.js} +1 -1
- package/dist/client/assets/{ZoomOut-DnRMz8gp.js → ZoomOut-HEpqy_Rp.js} +1 -1
- package/dist/client/assets/{access-gate-B-XccyUi.js → access-gate-DW2Edo-Q.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-3BCYyOlq.js → add-connection-dialog-BReu9nVa.js} +1 -1
- package/dist/client/assets/agent-analytics-B2ZbF2AM.js +1 -0
- package/dist/client/assets/agent-app-QifMzTD_.js +1 -0
- package/dist/client/assets/{agent-assets-BX70IHOT.js → agent-assets-D5cDJYp0.js} +1 -1
- package/dist/client/assets/{agent-automation-DSOT91yw.js → agent-automation-B-E62t6B.js} +1 -1
- package/dist/client/assets/{agent-automations-DELrtNmQ.js → agent-automations-BL2C9TJL.js} +1 -1
- package/dist/client/assets/agent-calendar-CQld1sbX.js +1 -0
- package/dist/client/assets/{agent-connect-sources-EYRSBit6.js → agent-connect-sources-qn3tzZdI.js} +1 -1
- package/dist/client/assets/agent-deck-fozZKigY.js +1 -0
- package/dist/client/assets/{agent-e2e-DgDrdrOU.js → agent-e2e-Bf8zroDu.js} +1 -1
- package/dist/client/assets/agent-experiments-QiLJ_N-u.js +1 -0
- package/dist/client/assets/agent-file-BY1HvP3E.js +1 -0
- package/dist/client/assets/{agent-hosting-COv9KqxJ.js → agent-hosting-CcFwtsum.js} +1 -1
- package/dist/client/assets/{agent-icon-2Sd6TPJR.js → agent-icon-BA86cT1F.js} +1 -1
- package/dist/client/assets/agent-library-5o95T8yf.js +1 -0
- package/dist/client/assets/agent-library-file-idrkATAh.js +1 -0
- package/dist/client/assets/agent-monitor-DJgUYxeE.js +1 -0
- package/dist/client/assets/{agent-overview-jQR56ImR.js → agent-overview-DevZ1Jrh.js} +1 -1
- package/dist/client/assets/{agent-releases-1LcFLBWb.js → agent-releases-BUHCKd6G.js} +1 -1
- package/dist/client/assets/agent-settings-Pbf2Mc2F.js +1 -0
- package/dist/client/assets/{agent-site-editor-FH5rkph4.js → agent-site-editor-BW85UVF0.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CZeHtQ74.js +2 -0
- package/dist/client/assets/agent-site-editor-content-n5wHkwXf.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-B0ciYMqr.js +1 -0
- package/dist/client/assets/agent-view-BpG9TuQz.js +1 -0
- package/dist/client/assets/{agent-view-guard-BtSTYr3f.js → agent-view-guard-2TzKbzeA.js} +1 -1
- package/dist/client/assets/{agents-list-BciltAjT.js → agents-list-BwXuDqFm.js} +1 -1
- package/dist/client/assets/{ai-providers-1_g2-YFO.js → ai-providers-nhDcrO0Z.js} +1 -1
- package/dist/client/assets/{alert-B6jt7ehz.js → alert-DSxecoEb.js} +1 -1
- package/dist/client/assets/{alert-dialog-C6IuYhIc.js → alert-dialog-CoKTwgLR.js} +1 -1
- package/dist/client/assets/{analytics-sections-CMbHJdjJ.js → analytics-sections-C6zIWiEG.js} +1 -1
- package/dist/client/assets/{analytics-tab-BptBREH9.js → analytics-tab-BhckQtVJ.js} +1 -1
- package/dist/client/assets/api-keys-DIDWd1pe.js +1 -0
- package/dist/client/assets/{api-keys-DNoVGHBL.js → api-keys-DkqXMpCO.js} +1 -1
- package/dist/client/assets/{app-editor-DIGpXnGi.js → app-editor-BMl1vUHn.js} +1 -1
- package/dist/client/assets/app-preview-url-9Od4s8Sz.js +1 -0
- package/dist/client/assets/{asset-utils-BaoKrfcS.js → asset-utils-DpcfUfN3.js} +1 -1
- package/dist/client/assets/{auth-MbbNpK0f.js → auth-BlDoW38W.js} +1 -1
- package/dist/client/assets/{auth-catchall-CQhqMFI7.js → auth-catchall-DR3otXf1.js} +1 -1
- package/dist/client/assets/{auth-entry-BytQWBJH.js → auth-entry-BxpXYhRz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BLy72f6M.js → auth-split-layout-Fc-cVSGU.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ChOS0TQ8.js → authenticate-and-persist-oauth-21zrOYvF.js} +1 -1
- package/dist/client/assets/{automation-list-row-CDTQ4wXs.js → automation-list-row-T3iavNt4.js} +1 -1
- package/dist/client/assets/{automation-runs-uGIsi6Hf.js → automation-runs-NtetJ09w.js} +1 -1
- package/dist/client/assets/{automations-CYPV9xM6.js → automations-B_NJD1pO.js} +1 -1
- package/dist/client/assets/{autosend-nr-hPbHj.js → autosend-B6NLiS3O.js} +1 -1
- package/dist/client/assets/{avatar-DarGMVT9.js → avatar-DSM67DGz.js} +1 -1
- package/dist/client/assets/{badge-7nY_ai7T.js → badge-ZmtxdQUh.js} +1 -1
- package/dist/client/assets/{block-document-BFjSBfhL.js → block-document-tsUrGmxY.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CPEN608S.js → blocks-preview-workspace-context-BnKyZHKG.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DEKXC5rW.js → blocks-tab-states-FyWYETtF.js} +1 -1
- package/dist/client/assets/{blog-schema-DXeDEF-x.js → blog-schema-Dk-4n46g.js} +1 -1
- package/dist/client/assets/{buckets-Fnw-QnpR.js → buckets-CSV3bOI_.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BNyp6j2d.js → build-improve-prompt-doc-Fo2wVAPr.js} +1 -1
- package/dist/client/assets/{calendar-D8eqk8F_.js → calendar-yCl419IQ.js} +1 -1
- package/dist/client/assets/{campaigns-view-DwenRJ4m.js → campaigns-view-C9kIpIu5.js} +1 -1
- package/dist/client/assets/{capability-load-error-DK8yJwbi.js → capability-load-error-8bv2L0sr.js} +1 -1
- package/dist/client/assets/{category-editor-CvvoknG-.js → category-editor-D4LgqAzF.js} +1 -1
- package/dist/client/assets/{cdn-tab-DGngqFre.js → cdn-tab-wHu7QG-h.js} +1 -1
- package/dist/client/assets/{chart-BVOKVwol.js → chart-CPyUT0RR.js} +1 -1
- package/dist/client/assets/{chat-context-4LDKQ9-8.js → chat-context-Dc5oH6pi.js} +1 -1
- package/dist/client/assets/{chat-draft-DtnFj70R.js → chat-draft-C9nL8Pk0.js} +1 -1
- package/dist/client/assets/{checkbox--QGg9JL6.js → checkbox-DbbYgeFA.js} +1 -1
- package/dist/client/assets/{choose-editor-Co3gZPYu.js → choose-editor-UJ-gtxPM.js} +1 -1
- package/dist/client/assets/{cli-auth-success-PhyGH5OW.js → cli-auth-success-iEdPT4UY.js} +1 -1
- package/dist/client/assets/{client-icons-C_ct3pd0.js → client-icons-DL--j1Qy.js} +1 -1
- package/dist/client/assets/cms-settings-editor-C9_tmAy_.js +1 -0
- package/dist/client/assets/{collapsible-DGVOZrNj.js → collapsible-BUE85wJF.js} +1 -1
- package/dist/client/assets/{collection-detail-BAmfEJxU.js → collection-detail-DWaZ_g9N.js} +1 -1
- package/dist/client/assets/{collection-display-button-ClKK9pYP.js → collection-display-button-Bkr-LiZM.js} +1 -1
- package/dist/client/assets/{collection-search-DRo1WmLT.js → collection-search-Cx9S1oXM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dgqpnsq8.js → collection-table-wrapper-YMAxzRT1.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dc2dImyc.js → collection-tabs-BnuQtSEJ.js} +1 -1
- package/dist/client/assets/{column-rules-DiqfCnEN.js → column-rules-DMBckJ6i.js} +1 -1
- package/dist/client/assets/{combobox-DZgmK343.js → combobox-DcCEsf4T.js} +1 -1
- package/dist/client/assets/{command-CPx9UwtG.js → command-BMeHNtVi.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CLb76BIo.js → companion-mcps-section-BiitCmdB.js} +1 -1
- package/dist/client/assets/{config-CxVvKo3A.js → config-D648BlRF.js} +1 -1
- package/dist/client/assets/{connect-A3Avs8Pl.js → connect-CuE4jRCA.js} +1 -1
- package/dist/client/assets/{connect-layout-BksXTmdN.js → connect-layout-CC4cWnyH.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DSaPW3-r.js → connect-source-dialog-BiGD6DO5.js} +1 -1
- package/dist/client/assets/{connection-GML1C2tu.js → connection-B2tV09M0.js} +1 -1
- package/dist/client/assets/{connection-card-ZvVd_UVc.js → connection-card-CHjef_mF.js} +1 -1
- package/dist/client/assets/{connection-detail-DtbzbTIM.js → connection-detail-DJhbdGg7.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CGyT85pi.js → connection-form-helpers-Clo6EVG8.js} +1 -1
- package/dist/client/assets/{connections-D4x-lAFA.js → connections-CBPCozbq.js} +1 -1
- package/dist/client/assets/{content-tab-DgdEt3c6.js → content-tab-Dr4AuU0k.js} +3 -3
- package/dist/client/assets/{context-BcuOiE0n.js → context-kzIuWQxd.js} +1 -1
- package/dist/client/assets/{context-menu-BPat3chT.js → context-menu-C3zBSIII.js} +1 -1
- package/dist/client/assets/{context-shell-BpD_TiZV.js → context-shell-BvowvaCU.js} +3 -3
- package/dist/client/assets/{core.esm-CumN7OYl.js → core.esm-CNaSMIsh.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C7cTp33N.js → create-organization-dialog-DjXlvOd0.js} +1 -1
- package/dist/client/assets/{daily-pulse-DIdfLtIG.js → daily-pulse-BEsurtoW.js} +1 -1
- package/dist/client/assets/{discover-CG4C5Odc.js → discover-CShJ8r_Z.js} +1 -1
- package/dist/client/assets/{domain-settings-DkAHUlQw.js → domain-settings-BoC_8zZq.js} +1 -1
- package/dist/client/assets/{drawer-Bp7WNOCz.js → drawer-CEu4XYUC.js} +1 -1
- package/dist/client/assets/{editor-CmZJbc4Z.js → editor-DXW7e4iJ.js} +1 -1
- package/dist/client/assets/{editor-classes-DYddjmhz.js → editor-classes-BdNlvhC1.js} +1 -1
- package/dist/client/assets/{empty-state-vh9cmtA2.js → empty-state-Bn_4dokb.js} +1 -1
- package/dist/client/assets/{empty-state-DBHadTD8.js → empty-state-C-YNJpvC.js} +1 -1
- package/dist/client/assets/{experiments-tab-BaB_Zi0V.js → experiments-tab-ITpv3Hb7.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-p3E1pILX.js → experiments-tab-choice-CzMyCRWv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C2lA8ZOm.js → extract-connection-data-BSmELWAh.js} +1 -1
- package/dist/client/assets/{feature-gate-D8HHU_kV.js → feature-gate-Dbk02DlS.js} +1 -1
- package/dist/client/assets/{feature-paywall-CRRIPYfS.js → feature-paywall-C0BZtk6d.js} +1 -1
- package/dist/client/assets/{file-explorer-BTIbvupP.js → file-explorer-C8AgRGWc.js} +1 -1
- package/dist/client/assets/{file-preview-CsDpTAv6.js → file-preview-B-P1RNv6.js} +1 -1
- package/dist/client/assets/{file-share-button-BmWv4msr.js → file-share-button-B_h1cOOn.js} +1 -1
- package/dist/client/assets/{file-type-icon-Ixvc6_bA.js → file-type-icon-BhPSNmF1.js} +1 -1
- package/dist/client/assets/{folder-icon-ByIjnQde.js → folder-icon-CveQvMDR.js} +1 -1
- package/dist/client/assets/{form-CIAWZjuP.js → form-BNjCXF3D.js} +1 -1
- package/dist/client/assets/{general-DEusZ5JT.js → general-CCTHK69K.js} +1 -1
- package/dist/client/assets/{home-B9bSA6tC.js → home-BTMqJc9f.js} +1 -1
- package/dist/client/assets/{icon-button-7F5Toil2.js → icon-button-CmGsKWR5.js} +1 -1
- package/dist/client/assets/{index-CYGV5ggz.js → index-6y1Sf6ES.js} +1 -1
- package/dist/client/assets/{index-MrGr5MGL.js → index-8bVudnk7.js} +1 -1
- package/dist/client/assets/{index-BZ3kN-UW.js → index-BDRbBnqE.js} +1 -1
- package/dist/client/assets/{index-CRYNJjMc.js → index-BdqusYnn.js} +1 -1
- package/dist/client/assets/{index-B0ZOlWzX.js → index-BqRVXKOo.js} +1 -1
- package/dist/client/assets/{index-xD4K2nG7.js → index-C2bPHVSX.js} +1 -1
- package/dist/client/assets/{index-CblLVDuN.js → index-CvmAn50Q.js} +1 -1
- package/dist/client/assets/{index-DrxFcbdt.js → index-DEf6PGup.js} +1 -1
- package/dist/client/assets/{index-BEqT-aNW.js → index-DVz4glXO.js} +1 -1
- package/dist/client/assets/{index-DiKBQ93t.js → index-DXiTALSr.js} +1 -1
- package/dist/client/assets/{index-CfHLnaAs.js → index-IJ0i3_Bq.js} +1 -1
- package/dist/client/assets/{index-DxIuEmxM.js → index-SlwW1O22.js} +1 -1
- package/dist/client/assets/{index-B1T14RYF.js → index-dHHL3Zav.js} +1 -1
- package/dist/client/assets/{index-DJCD1T3p.js → index-q-618IQ-.js} +5 -5
- package/dist/client/assets/{index-4NUDq9UX.js → index-qMO1DbDN.js} +1 -1
- package/dist/client/assets/{index-redirect-BSxSh5S-.js → index-redirect-DHg2Wh6I.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-5dM4o4Hf.js → infiniteQueryObserver-BxhHPCd6.js} +1 -1
- package/dist/client/assets/{infra-billing-BW0f21OW.js → infra-billing-D46exrRI.js} +1 -1
- package/dist/client/assets/{input-2QjNp7qX.js → input-BAfAmphP.js} +1 -1
- package/dist/client/assets/{input-Di5PUIe8.js → input-BCOWi0dj.js} +3 -3
- package/dist/client/assets/{integration-icon-CMGBZM9F.js → integration-icon-Etc4pEBG.js} +1 -1
- package/dist/client/assets/{jira-icon-DZrAPkCR.js → jira-icon-Dq_9ZKBF.js} +1 -1
- package/dist/client/assets/{label-CBlQ82Fk.js → label-BYq7iTEq.js} +1 -1
- package/dist/client/assets/{layout-jno9iSY1.js → layout-B-gUqpwn.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-C-JHuDVd.js → legacy-agents-deep-BXEfwbcO.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BjKbMolf.js → legacy-main-redirect-wl2gQaaJ.js} +1 -1
- package/dist/client/assets/library-B0c3-Omq.js +1 -0
- package/dist/client/assets/{login-DrbMDqlp.js → login-BpxtJGt9.js} +1 -1
- package/dist/client/assets/{markdown-BU6g98sq.js → markdown-QKXgHF9A.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B6MBkXrw.js → mcp-app-renderer-Cj3lXdns.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CFQzR34b.js → mcp-oauth-DLAsSQZT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DHXkg8Ce.js → mcp-oauth-DLUSwNvb.js} +1 -1
- package/dist/client/assets/{members-D1907SI-.js → members-D8Jt2YCt.js} +1 -1
- package/dist/client/assets/{memory-CaQIwNtK.js → memory-CdGwc3Jm.js} +1 -1
- package/dist/client/assets/{mini-report-page-5Lry2_1Y.js → mini-report-page-D0MzG6Lw.js} +1 -1
- package/dist/client/assets/{mock-board-Dfc7Zn2k.js → mock-board-D4mCZyM7.js} +3 -3
- package/dist/client/assets/{monaco-editor-D1yDvJd3.js → monaco-editor-Ck-_LV7G.js} +1 -1
- package/dist/client/assets/{monitoring-CvGmGp-w.js → monitoring-DZd5tupQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C-A-doof.js → monitoring-stats-row-lenFv4lK.js} +1 -1
- package/dist/client/assets/{multi-select-BNUkLp8H.js → multi-select-DgItXuuD.js} +1 -1
- package/dist/client/assets/{mustache-CksHv2Dr.js → mustache-Cv4rYUlz.js} +1 -1
- package/dist/client/assets/{named-rule-uses-BBl065fe.js → named-rule-uses-CD6nIT9T.js} +1 -1
- package/dist/client/assets/{named-rule-view-BXK5sJ8X.js → named-rule-view-DNNA5f8j.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CYkF5k4O.js → new-project-dialog-C-7bvRFw.js} +1 -1
- package/dist/client/assets/{oauth-callback-BPlDpCVw.js → oauth-callback-B34YZeGD.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C-kNRGr2.js → oauth-callback-ai-provider-DDdZWy16.js} +1 -1
- package/dist/client/assets/{onboarding-81KXiaqI.js → onboarding-DySq8aiN.js} +1 -1
- package/dist/client/assets/{openai-conversation-Bi9e1sKc.js → openai-conversation-BktR2-O4.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CVVwXn2X.js → optimistic-project-sidebar-views-B1Cqr4Oo.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BVSLADXz.js → order-monitor-day-DWMNtj3h.js} +1 -1
- package/dist/client/assets/{organization-choice-DmteYBAc.js → organization-choice-BGlktHCU.js} +1 -1
- package/dist/client/assets/{orgs-BFPSbb2q.js → orgs-BqBzB2uK.js} +1 -1
- package/dist/client/assets/{page-seo-form-VA7wIeJU.js → page-seo-form-TsVrH-qQ.js} +1 -1
- package/dist/client/assets/{pair-Cjnol9_x.js → pair-dxV6ej0q.js} +1 -1
- package/dist/client/assets/{parse-sections-7Tm_vjpy.js → parse-sections-Do5UnsNt.js} +1 -1
- package/dist/client/assets/{plan-KARVWZDV.js → plan-CJ_SMMMJ.js} +1 -1
- package/dist/client/assets/{plan-ladder-C-o1aFSi.js → plan-ladder-B4h2BKGq.js} +1 -1
- package/dist/client/assets/{popover-BsX8gIsV.js → popover-C6au3PKl.js} +1 -1
- package/dist/client/assets/{post-calendar-B6fP7Sp3.js → post-calendar-B8zpuWko.js} +1 -1
- package/dist/client/assets/{post-editor-B530kxYZ.js → post-editor--_oa7-Gu.js} +1 -1
- package/dist/client/assets/{preview-content-IEhLMW40.js → preview-content-06JKPfni.js} +1 -1
- package/dist/client/assets/{preview-dialog-B8MUF8yg.js → preview-dialog-DHb11A8X.js} +1 -1
- package/dist/client/assets/{preview-panel-C3yGSsCn.js → preview-panel-BWkvRuKu.js} +1 -1
- package/dist/client/assets/preview-tab-DEHoNKX9.js +551 -0
- package/dist/client/assets/{product-picker-dialog-Duu5EFXJ.js → product-picker-dialog-eLnaDTe5.js} +1 -1
- package/dist/client/assets/{profile-SgKnnlOX.js → profile-DAulvU2z.js} +1 -1
- package/dist/client/assets/{project-app-view-69GUddZy.js → project-app-view-BVbqeA4W.js} +1 -1
- package/dist/client/assets/{project-apps-DxvrGikA.js → project-apps-411o8qLo.js} +1 -1
- package/dist/client/assets/{project-feed-Dkn186cj.js → project-feed-B9dkJKJr.js} +1 -1
- package/dist/client/assets/{project-icon-DozUqz8V.js → project-icon-C3Ox6Caa.js} +1 -1
- package/dist/client/assets/project-reports-98lKoGNz.js +1 -0
- package/dist/client/assets/project-tasks-CI7fz9Zv.js +1 -0
- package/dist/client/assets/{projects-BvtnS4il.js → projects-D1GqaIOa.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Bd8sqs2o.js → projects-empty-state-C9Ik6rSd.js} +1 -1
- package/dist/client/assets/{prompts-CfiuzCI2.js → prompts-DyBUJdlu.js} +1 -1
- package/dist/client/assets/record-editor-CIgydw17.js +1 -0
- package/dist/client/assets/{redirect-editor-Cq58-dw7.js → redirect-editor-BHdXK0mw.js} +1 -1
- package/dist/client/assets/{releases-api-toiaosbq.js → releases-api-DrtmjXFf.js} +1 -1
- package/dist/client/assets/reports-B8rc0QMx.js +1 -0
- package/dist/client/assets/{reports-X-r24zwl.js → reports-CXTTxiAH.js} +1 -1
- package/dist/client/assets/{reports-onboarding-B1eQP37P.js → reports-onboarding-DHBp3ggN.js} +1 -1
- package/dist/client/assets/{reports-tab-BqceAQel.js → reports-tab-z4I8GWDf.js} +2 -2
- package/dist/client/assets/repositories-B6WldW36.js +1 -0
- package/dist/client/assets/{repositories-CkzQSY8F.js → repositories-Cy9cJgcq.js} +1 -1
- package/dist/client/assets/{repository-binding-CiDG0Cr0.js → repository-binding-C0A3g3ic.js} +1 -1
- package/dist/client/assets/{repository-import-picker-TlIvK00I.js → repository-import-picker-BVv_4ssq.js} +1 -1
- package/dist/client/assets/{repository-picker-BrjMgENb.js → repository-picker-CbquvVC4.js} +1 -1
- package/dist/client/assets/{require-capability-D5vaDJ6i.js → require-capability-BbJ_zgSQ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CLsGddT6.js → required-auth-layout-aFnMpQjr.js} +1 -1
- package/dist/client/assets/{reset-password-BDTPUkZZ.js → reset-password-BptB3qlu.js} +1 -1
- package/dist/client/assets/{resizable-LNv9WlFU.js → resizable-De_LCGFM.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DDEl8WpS.js → resolve-tab-icon-DbyMzKPR.js} +1 -1
- package/dist/client/assets/{review-settings-CR1udLwz.js → review-settings-DdjxqsNj.js} +1 -1
- package/dist/client/assets/roles-YWuESZ7D.js +1 -0
- package/dist/client/assets/{route-DiDqKVTg.js → route-BNtBEGPf.js} +1 -1
- package/dist/client/assets/route-BX1QTCGi.js +1 -0
- package/dist/client/assets/{route-CwE5K4wd.js → route-BdCXGQeQ.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-D9HAcpIU.js → runnable-block-editor-ctOq1VIZ.js} +3 -3
- package/dist/client/assets/{sandbox-lifecycle-context-BKUYq7kP.js → sandbox-lifecycle-context-f2cAubPM.js} +1 -1
- package/dist/client/assets/{schema-BbiQjr1e.js → schema-B25S-GgM.js} +1 -1
- package/dist/client/assets/{schema-6JU3flf4.js → schema-C32lanR6.js} +1 -1
- package/dist/client/assets/{scroll-area-CCVLtkoB.js → scroll-area-CXwhuGwJ.js} +1 -1
- package/dist/client/assets/{search-input-43leKkGn.js → search-input-BvAvpDoX.js} +1 -1
- package/dist/client/assets/{search-toggle-Ds25LhLA.js → search-toggle-PtT_W_SW.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-BrIiDgyd.js → secret-ciphertext-CNTEN9F7.js} +1 -1
- package/dist/client/assets/{secret-picker-aJPnp_F5.js → secret-picker-CdSEx4gG.js} +1 -1
- package/dist/client/assets/{secrets-CfWgVKjc.js → secrets-A7z68vj3.js} +1 -1
- package/dist/client/assets/{sections-Dvgo02ra.js → sections-ZYU9dCBO.js} +1 -1
- package/dist/client/assets/{sections-editor-BSfFPyUU.js → sections-editor-BIWCjEN3.js} +1 -1
- package/dist/client/assets/{select-CHmq3OGd.js → select-Krip_YcH.js} +1 -1
- package/dist/client/assets/{select-model-CvpLn49w.js → select-model-CQ8IaTVI.js} +1 -1
- package/dist/client/assets/{seo-editor-BQ3pdKQv.js → seo-editor-BlWlYV77.js} +1 -1
- package/dist/client/assets/{separator-vkFvxZ8m.js → separator-__N3AJ1s.js} +1 -1
- package/dist/client/assets/settings-tab-BrLSePO_.js +1 -0
- package/dist/client/assets/{sheet-C_qetF7d.js → sheet-B77hAbHG.js} +1 -1
- package/dist/client/assets/{shell-layout-Bb-Bk8Da.js → shell-layout-Bk5zjsiR.js} +1 -1
- package/dist/client/assets/{site-draft-actions-GBt56z1o.js → site-draft-actions-dFxJSGuI.js} +1 -1
- package/dist/client/assets/site-draft-view-BLdO4Cur.js +2 -0
- package/dist/client/assets/site-editor-SoxoEuqd.js +1 -0
- package/dist/client/assets/{site-editor-toast-Dvaha1qd.js → site-editor-toast-x2o25PRm.js} +1 -1
- package/dist/client/assets/{skills-CNP2yKUA.js → skills-CusI0mca.js} +1 -1
- package/dist/client/assets/{slider-Dt2pZuy0.js → slider-DQgWIvSM.js} +1 -1
- package/dist/client/assets/{sortable.esm-Dgy_5_Gq.js → sortable.esm-DC3R5oj8.js} +1 -1
- package/dist/client/assets/{sso-BwMXXLZ-.js → sso-C_Z9cuaX.js} +1 -1
- package/dist/client/assets/{suggestion-DUWht7S9.js → suggestion-Dk6VaiUy.js} +1 -1
- package/dist/client/assets/{switch-BKqScyl8.js → switch-CHl68DVL.js} +1 -1
- package/dist/client/assets/{symbol-Bw5pneOj.js → symbol-XOtEOrCL.js} +1 -1
- package/dist/client/assets/{synced-repos-DhRHDr6D.js → synced-repos-C6zBMFU3.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-ALHCeulj.js → tab-icon-glyph-D5slU1rC.js} +1 -1
- package/dist/client/assets/{table-DSiO4Kq6.js → table-D3cFFE4t.js} +1 -1
- package/dist/client/assets/{tabs-BcHqdI-j.js → tabs-C2JmAUZB.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-CwyY8xOb.js → task-assignee-avatar-I4RHFl4r.js} +1 -1
- package/dist/client/assets/{task-board-ICmHlMKj.js → task-board-D4Nw_s8-.js} +1 -1
- package/dist/client/assets/{task-route-SvQTR3TJ.js → task-route-CKBAWEoL.js} +1 -1
- package/dist/client/assets/{task-status-Dk0B9E0G.js → task-status-k0tSKBnY.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-vr9mjCEM.js → taskboard-analytics-BHESe3UM.js} +1 -1
- package/dist/client/assets/tasks-B8afabsQ.js +1 -0
- package/dist/client/assets/{tasks-DUtkLCHD.js → tasks-DsF_igJL.js} +1 -1
- package/dist/client/assets/{textarea-CTbC00Fo.js → textarea-CHun69Fm.js} +1 -1
- package/dist/client/assets/{thread-analytics-CYtiXz-Q.js → thread-analytics-gZ_8g-EI.js} +1 -1
- package/dist/client/assets/{thread-intent-DcKV1aEK.js → thread-intent-c_70Hol6.js} +1 -1
- package/dist/client/assets/{thread-route-DlbP9X8e.js → thread-route-D2eectVN.js} +1 -1
- package/dist/client/assets/{thread-route-D05ck8nv.js → thread-route-RbgOHi54.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DXSUCFvU.js → thread-sheet-body-DrHlHlId.js} +1 -1
- package/dist/client/assets/{time-range-picker-cljXExVl.js → time-range-picker-CcaY-BqG.js} +1 -1
- package/dist/client/assets/{toggle-group-cK7x-LaG.js → toggle-group-D7gKDBgo.js} +1 -1
- package/dist/client/assets/{tool-namespace-CFMdc33T.js → tool-namespace-B9K08vIi.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-AJC8O64v.js → toolbar-icon-button-BjvueZkG.js} +1 -1
- package/dist/client/assets/{tooltip-oRr5C_aw.js → tooltip-CDMB2U3c.js} +1 -1
- package/dist/client/assets/{tooltipContext-DBLuHkF3.js → tooltipContext-Rp5AgmYK.js} +1 -1
- package/dist/client/assets/{track-D3xYnfew.js → track-BZwcQJ9f.js} +1 -1
- package/dist/client/assets/{types-BnGn2ply.js → types-BnCWAkPU.js} +1 -1
- package/dist/client/assets/{url-slug-CiQKnf5R.js → url-slug-BM2dtTs_.js} +1 -1
- package/dist/client/assets/{usage-stats-BFNP5B9b.js → usage-stats-D6hkaKnz.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DB7Q0SBY.js → use-ai-providers-kjmCQIF8.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DW6Wbxy3.js → use-apply-named-rule-O_s41mZX.js} +1 -1
- package/dist/client/assets/{use-automations-BXbY6ysU.js → use-automations-B-OfkKhy.js} +1 -1
- package/dist/client/assets/{use-autosave-BB3cf8aT.js → use-autosave-i-hbQ7zh.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-KA32sUXt.js → use-chat-layout-state-D3dQifRA.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CmSlUOB2.js → use-clock-tick-CYRwHcOP.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Dzb46un3.js → use-connect-companion-7hf1GqJL.js} +1 -1
- package/dist/client/assets/{use-connection-PJ_l98GU.js → use-connection-B6jt9ZtX.js} +1 -1
- package/dist/client/assets/{use-content-sync-9tvG-lut.js → use-content-sync-BZIxiJbA.js} +1 -1
- package/dist/client/assets/{use-copy-D4R9cJ_t.js → use-copy-0Bo2EjeH.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-cYnUmw5j.js → use-create-virtual-mcp-DE5IoEeB.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BgdR-wYC.js → use-date-fns-locale-DFriUkVE.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CL6P-Lri.js → use-debounced-autosave-CVAuV3Go.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BdOjhsVi.js → use-debounced-value-BC-umw0u.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DHNd5iXt.js → use-deco-credits-CW8U1zhz.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CDLwP1Su.js → use-decopilot-events-D6QOvaPg.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CkSINryc.js → use-delete-connection-CjQOlFH6.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BZATCf2q.js → use-deployment-admin-DoXzo53F.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CGwz_fku.js → use-fast-preview-draft-url-6Fk4iZHx.js} +1 -1
- package/dist/client/assets/{use-file-configs-nRV9S9D0.js → use-file-configs-xW5CmWH8.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CMEIMGZ6.js → use-inbox-feed-Bp0ORJQm.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CNz9_Nor.js → use-infinite-scroll-C7iujdXv.js} +1 -1
- package/dist/client/assets/{use-join-requests-oCznfTNy.js → use-join-requests-iA4ohlH6.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BKmILeUa.js → use-main-panel-tabs-FHHySOWP.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BlkUCjXO.js → use-mcp-auth-status-CT2aMdu8.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DKIfKwpJ.js → use-mcp-client-D_XhrMKB.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-MhXPkujh.js → use-mcp-prompts-DGRKWbH1.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CTl2xkGk.js → use-mcp-tools-CQtzcVcJ.js} +1 -1
- package/dist/client/assets/{use-members-BiXVclqd.js → use-members-BQDwvEcY.js} +1 -1
- package/dist/client/assets/{use-mobile-CCkX9zL-.js → use-mobile-60icaV9O.js} +1 -1
- package/dist/client/assets/{use-move-blocks-C6LWTkiD.js → use-move-blocks-dSB4cF-o.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CEb5-IwU.js → use-navigate-to-agent-CrdmIeWG.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-D-NQ16Mb.js → use-open-billing-url-FMYdcOAg.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-xXOFDOL1.js → use-org-auth-client-B0mhbcn1.js} +1 -1
- package/dist/client/assets/{use-org-fs-DRaVeNa6.js → use-org-fs-BI5EkFW5.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-LHzk4Keo.js → use-org-repo-syncs-CrMnx8ds.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bx0Susbk.js → use-org-sso-BfTdIXeQ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CbO1bQ_O.js → use-organization-roles-K9hfseDL.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bf2WDJz9.js → use-organization-settings-B89O37Zo.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CYYYdsdC.js → use-panel-navigate-Dk9O7v3V.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-B2rH_d27.js → use-project-native-view-presence-DSxdwR_K.js} +1 -1
- package/dist/client/assets/{use-project-scope-C66L_LKx.js → use-project-scope-DhFriM2O.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DaFNVa3y.js → use-recent-apps-CtmPlnH5.js} +1 -1
- package/dist/client/assets/{use-releases-DwpIDRIp.js → use-releases-B53xPFCZ.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DnLCgooz.js → use-reports-diagnostic-DkoqzAqJ.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CioHBl5Q.js → use-sandbox-events-CClTu039.js} +1 -1
- package/dist/client/assets/{use-secrets-BrDaOgAh.js → use-secrets-Dp3EZ-32.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DxyD_MVI.js → use-section-preview-base-jc6NIC2s.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DgSb1tZ1.js → use-session-runtime-Uk5CLXJw.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Lbn9i3wJ.js → use-sidebar-collapsed-Dp50DVIA.js} +1 -1
- package/dist/client/assets/{use-tags-DxXXXYXQ.js → use-tags-0MkABi9W.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-B_lpE6sk.js → use-task-board-analytics-CQ0ct8Qs.js} +1 -1
- package/dist/client/assets/{use-task-board-events-Ciu9fgM5.js → use-task-board-events-CImsNTAg.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BXiZI60U.js → use-task-board-item-prs-BCIts_7I.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DXSFycil.js → use-task-metadata-Mhw6b7vU.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BBBfMO-x.js → use-thread-analytics-Cy9BBC3-.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Be0M4DCF.js → use-thread-outputs-BA_xcVxX.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-bzHYf-E2.js +1 -0
- package/dist/client/assets/{useQueries-CjLpsE8j.js → useQueries-Do7etGHx.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CzPa8eFg.js +1 -0
- package/dist/client/assets/{users-DhWYm0Ur.js → users-C8yi0-T5.js} +1 -1
- package/dist/client/assets/{utils-BlqF72Vj.js → utils-C46I50E5.js} +1 -1
- package/dist/client/assets/{variant-calendar-Z__DuHea.js → variant-calendar-CWGAaAhj.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BcEAaLIA.js → variant-matcher-override-CUQbYeZI.js} +1 -1
- package/dist/client/assets/virtual-mcp-XnXLGU30.js +1 -0
- package/dist/client/assets/{watch-sse-pool-9GQSHr-W.js → watch-sse-pool-CtzlXHKJ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +741 -741
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-CwuUduKr.js +0 -1
- package/dist/client/assets/agent-app-Dd83t7Jr.js +0 -1
- package/dist/client/assets/agent-calendar-DAFHiZ7t.js +0 -1
- package/dist/client/assets/agent-deck-19EIpeOv.js +0 -1
- package/dist/client/assets/agent-experiments-CDIR-vBl.js +0 -1
- package/dist/client/assets/agent-file-Crkwe1n0.js +0 -1
- package/dist/client/assets/agent-library-6vXi0pmB.js +0 -1
- package/dist/client/assets/agent-library-file-D_31XTpy.js +0 -1
- package/dist/client/assets/agent-monitor-DZGhzZ5b.js +0 -1
- package/dist/client/assets/agent-settings-BJW57Xya.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Dp5l17ta.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BIwmC0as.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DJt8FppE.js +0 -1
- package/dist/client/assets/agent-view-DuXo8UyN.js +0 -1
- package/dist/client/assets/api-keys-YdF23sAO.js +0 -1
- package/dist/client/assets/app-preview-url-DmK5uokM.js +0 -1
- package/dist/client/assets/cms-settings-editor-VrhsAjtC.js +0 -1
- package/dist/client/assets/library-DC_yyIum.js +0 -1
- package/dist/client/assets/preview-tab-DZ2jzEbi.js +0 -551
- package/dist/client/assets/project-reports-6uzfgJoN.js +0 -1
- package/dist/client/assets/project-tasks-BLcB7Cwc.js +0 -1
- package/dist/client/assets/record-editor-DD-1yqpv.js +0 -1
- package/dist/client/assets/reports-VJqlTUDX.js +0 -1
- package/dist/client/assets/repositories-DRGtDHym.js +0 -1
- package/dist/client/assets/roles-DIBxviRh.js +0 -1
- package/dist/client/assets/route-CMp29IPi.js +0 -1
- package/dist/client/assets/settings-tab-B_bx6QgP.js +0 -1
- package/dist/client/assets/site-draft-view-CZq-6QXP.js +0 -2
- package/dist/client/assets/site-editor-Dw86EYnX.js +0 -1
- package/dist/client/assets/tasks-DzLAZqT6.js +0 -1
- package/dist/client/assets/useInfiniteQuery-C9OOM3iT.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DC4aZJSW.js +0 -1
- package/dist/client/assets/virtual-mcp-DQmDpfRM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,a1 as Ne,r as b,e as ae,y as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-DJCD1T3p.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
1
|
+
import{a as $,a1 as Ne,r as b,e as ae,y as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-q-618IQ-.js";import{e as qe}from"./backoff-CrEUbyZT.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=qe(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(Ue,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Xe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Xe as a};
|
|
@@ -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-q-618IQ-.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-DLAsSQZT.js";import{i as p}from"./mcp-oauth-DLUSwNvb.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-CDTQ4wXs.js → automation-list-row-T3iavNt4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,b as Y,r as ee,l as J,j as t,T as te,B as se,X as ie,V as ne,U as ae}from"./index-
|
|
1
|
+
import{c as Q,b as Y,r as ee,l as J,j as t,T as te,B as se,X as ie,V as ne,U as ae}from"./index-q-618IQ-.js";import{B as oe}from"./badge-ZmtxdQUh.js";import{A as le,a as re,b as ce,c as me,g as ue,d as de,e as fe,f as ge}from"./alert-dialog-CoKTwgLR.js";import{A as xe,W as pe}from"./agent-icon-BA86cT1F.js";import{i as he}from"./DotsVertical-BSltXJxd.js";import{s as je}from"./Trash01-kzymRLEh.js";import{i as we}from"./ZoomOut-HEpqy_Rp.js";import{c as _e}from"./repository-binding-C0A3g3ic.js";import{a as ve}from"./use-automations-B-OfkKhy.js";function Be(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=Y(),{remove:a}=ve(),[r,H]=ee.useState(!1),l=_e(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),H(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const U=F;let O;e[3]!==n?(O=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=O):O=e[4];const W=O,X=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==X?(u=J("inline-block size-2 rounded-full shrink-0",X),e[5]=X,e[6]=u):u=e[6];const q=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==q?(d=i(q),e[7]=i,e[8]=q,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(oe,{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 G=s.system_key&&"invisible";let v;e[36]!==G?(v=J("shrink-0",G),e[36]=G,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]!==W||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:W,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]=W,e[49]=n,e[50]=_,e[51]=D,e[52]=f,e[53]=g,e[54]=R):R=e[54];let k;e[55]!==i?(k=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=k):k=e[56];let N;e[57]!==k?(N=t.jsx(le,{children:k}),e[57]=k,e[58]=N):N=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(re,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==N||e[65]!==L?(C=t.jsxs(ce,{children:[N,L]}),e[64]=N,e[65]=L,e[66]=C):C=e[66];let T;e[67]!==i?(T=i("automations.automationListRow.cancel"),e[67]=i,e[68]=T):T=e[68];let P;e[69]!==T?(P=t.jsx(me,{children:T}),e[69]=T,e[70]=P):P=e[70];const Z=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]!==U||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(ue,{onClick:U,disabled:Z,variant:"destructive",children:z}),e[73]=U,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==P||e[78]!==B?(M=t.jsxs(de,{children:[P,B]}),e[77]=P,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(fe,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==r||e[84]!==S?(E=t.jsx(ge,{open:r,onOpenChange:H,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let V;return e[86]!==R||e[87]!==E?(V=t.jsxs(t.Fragment,{children:[R,E]}),e[86]=R,e[87]=E,e[88]=V):V=e[88],V}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.c(8),{triggerCount:s,nextRunAt:o}=c,n=Y();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{Be as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,r as ot,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as mt,f0 as dt}from"./index-DJCD1T3p.js";import{u as ft}from"./useInfiniteQuery-C9OOM3iT.js";import{u as xt}from"./use-connection-PJ_l98GU.js";import{u as pt}from"./use-mcp-client-DKIfKwpJ.js";import{b as gt}from"./repository-binding-CiDG0Cr0.js";import{b as ht,a as Rt}from"./sheet-C_qetF7d.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-DSiO4Kq6.js";import{E as et}from"./empty-state-vh9cmtA2.js";import{u as Tt}from"./use-infinite-scroll-CNz9_Nor.js";import{u as St}from"./use-members-BiXVclqd.js";import{g as vt}from"./task-status-Dk0B9E0G.js";import{e as Ct}from"./use-automations-BXbY6ysU.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-DXSUCFvU.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(dt,{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=ut("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 Bt(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=pt(o),f=ct(),x=xt(),d=gt(),{data:u}=St(),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:z}=M,lt=z===void 0?0:z;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}=ft(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=mt,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=Tt(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(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{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(bt,{children:m.map((M,z)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===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 K;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?(K=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]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=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]=J):J=t[72],J}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{Bt as A,wt as u};
|
|
1
|
+
import{c as V,r as ot,b as X,a2 as it,J as rt,an as ct,K as tt,j as s,l as ut,m as mt,f0 as dt}from"./index-q-618IQ-.js";import{u as ft}from"./useInfiniteQuery-bzHYf-E2.js";import{u as xt}from"./use-connection-B6jt9ZtX.js";import{u as pt}from"./use-mcp-client-D_XhrMKB.js";import{b as gt}from"./repository-binding-C0A3g3ic.js";import{b as ht,a as Rt}from"./sheet-B77hAbHG.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as Q}from"./table-D3cFFE4t.js";import{E as et}from"./empty-state-Bn_4dokb.js";import{u as Tt}from"./use-infinite-scroll-C7iujdXv.js";import{u as St}from"./use-members-BQDwvEcY.js";import{g as vt}from"./task-status-k0tSKBnY.js";import{e as Ct}from"./use-automations-B-OfkKhy.js";import{T as It,f as at,a as nt}from"./thread-sheet-body-DrHlHlId.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(dt,{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=ut("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 Bt(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=pt(o),f=ct(),x=xt(),d=gt(),{data:u}=St(),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:z}=M,lt=z===void 0?0:z;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}=ft(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=mt,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=Tt(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(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{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(bt,{children:m.map((M,z)=>s.jsx(_t,{run:M,usage:k.get(M.id),onClick:()=>b.select(M.id),lastRowRef:z===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 K;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?(K=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]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let J;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(J=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]=J):J=t[72],J}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{Bt as A,wt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fy as F,y as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a2 as D,d as M,r as q,n as d,B as V,fy as F,y as R}from"./index-q-618IQ-.js";import{s as G}from"./Plus-hR9qqg7F.js";import{i as S}from"./ZoomOut-HEpqy_Rp.js";import{S as H}from"./search-input-BvAvpDoX.js";import{E as T}from"./empty-state-Bn_4dokb.js";import{u as J}from"./use-automations-B-OfkKhy.js";import{u as K}from"./use-navigate-to-agent-CrdmIeWG.js";import{A as O}from"./automation-list-row-T3iavNt4.js";import{b as Q}from"./repository-binding-C0A3g3ic.js";import{R as U}from"./require-capability-BbJ_zgSQ.js";import"./SearchMd-CipODP3M.js";import"./use-mcp-client-D_XhrMKB.js";import"./auth-BlDoW38W.js";import"./thread-intent-c_70Hol6.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CtzlXHKJ.js";import"./task-board-D4Nw_s8-.js";import"./schema-B25S-GgM.js";import"./slugify-CEUa2lfQ.js";import"./badge-ZmtxdQUh.js";import"./alert-dialog-CoKTwgLR.js";import"./agent-icon-BA86cT1F.js";import"./AlertCircle-BA2QScAs.js";import"./Tool01-CZyq1C-m.js";import"./ArrowUp-DmTmdisJ.js";import"./ArrowLeft-_xxDQTdX.js";import"./LinkBroken01-CHqvYaqa.js";import"./ShoppingBag01-C6zQQ-g_.js";import"./Building02-B6-7Dcc4.js";import"./CheckCircle-DhEJCbmL.js";import"./ChevronUp-TdPYqe3f.js";import"./ChevronSelectorVertical-jTXK7pCA.js";import"./UserSquare-C-ypPx1C.js";import"./Copy01-7T2u11TN.js";import"./CreditCard01-Bh4Xntzj.js";import"./DotsVertical-BSltXJxd.js";import"./Image01-Ck0HrQIi.js";import"./Globe04-ZetgXMJl.js";import"./SwitchHorizontal01-qZTU6RHM.js";import"./Key01-CiAU22Ss.js";import"./Link01-DByQNRHy.js";import"./Minus-oTJkI1L_.js";import"./Monitor01-CSVPDFy2.js";import"./Sun-fxjuDx85.js";import"./Play-BnvS6etf.js";import"./Trash01-kzymRLEh.js";import"./Upload01-aGlTSryk.js";import"./User01-B_8hWFtQ.js";import"./Users01-u8O34kVf.js";import"./XClose-Ct2xtw32.js";import"./access-gate-DW2Edo-Q.js";import"./capability-load-error-8bv2L0sr.js";function W(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),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:F(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,w=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 C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,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(G,{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(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.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 X(t){return[t.id,t]}function Xt(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{Xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aw as d}from"./index-
|
|
1
|
+
import{aw as d}from"./index-q-618IQ-.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{l as o,j as n,c as i,br as g,bs as h,bt as c,bu as z}from"./index-
|
|
1
|
+
import{l as o,j as n,c as i,br as g,bs as h,bt as c,bu as z}from"./index-q-618IQ-.js";import{s as v}from"./User01-B_8hWFtQ.js";function j(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(g,{"data-slot":"avatar",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}function k(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("aspect-square size-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(h,{"data-slot":"avatar-image",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}function q(r){const e=i.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let a;e[3]!==s?(a=o("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=a):a=e[4];let l;return e[5]!==t||e[6]!==a?(l=n.jsx(z,{"data-slot":"avatar-fallback",className:a,...t}),e[5]=t,e[6]=a,e[7]=l):l=e[7],l}const A={tint:["bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand","bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple","bg-brand-yellow-tint text-brand-yellow-dark dark:bg-brand-yellow/20 dark:text-brand-yellow","bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue"],solid:["bg-brand text-brand-green-dark","bg-brand-purple text-brand-purple-dark","bg-brand-yellow text-brand-yellow-dark","bg-brand-blue text-brand-blue-dark"]},y="bg-muted text-muted-foreground";function N(r,e){let s=0;for(let a=0;a<r.length;a++)s=r.charCodeAt(a)+((s<<5)-s);const t=A[e];return t[Math.abs(s)%t.length]}function w(r){const e=r.trim().split(/\s+/).filter(Boolean),s=e[0]?.charAt(0)??"",t=e.length>1?e.at(-1)?.charAt(0)??"":"";return(s+t).toUpperCase()||"?"}const u=c("font-medium",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"size-3 text-[0.4375rem]","2xs":"size-4 text-[0.5625rem]",xs:"size-6 text-[0.625rem]",sm:"size-8 text-xs",md:"size-9 text-sm",base:"size-10 text-sm",lg:"size-12 text-lg",xl:"size-16 text-2xl","2xl":"size-20 text-3xl","3xl":"size-32 text-5xl"}},compoundVariants:[{shape:"square",size:"3xs",class:"rounded-[0.1875rem]"},{shape:"square",size:"2xs",class:"rounded-sm"},{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-[0.625rem]"},{shape:"square",size:"md",class:"rounded-[0.6875rem]"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-[0.875rem]"},{shape:"square",size:"xl",class:"rounded-[1.125rem]"},{shape:"square",size:"2xl",class:"rounded-[1.375rem]"},{shape:"square",size:"3xl",class:"rounded-[2.25rem]"}],defaultVariants:{shape:"square",size:"base"}}),R=c("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),C={"3xs":8,"2xs":8,xs:12,sm:16,md:18,base:20,lg:24,xl:32,"2xl":40,"3xl":64};function F({shape:r="square",size:e="base",url:s,fallback:t,objectFit:a="cover",className:l,muted:x=!1,tone:b=r==="circle"?"solid":"tint",selected:m=!1,...f}){const p=x?y:N(typeof t=="string"?t:"",b),d=o("flex size-full items-center justify-center",p);return n.jsx(j,{className:o(u({shape:r,size:e}),s&&"outline-1 -outline-offset-1 outline-hairline",m&&"outline-2 outline-offset-0 outline-foreground",l),...f,children:s?.startsWith("icon://")?n.jsx("div",{className:d,children:n.jsx(v,{size:C[e??"base"]})}):n.jsxs(n.Fragment,{children:[s&&n.jsx(k,{src:s,loading:"lazy",alt:"Avatar",className:R({objectFit:a})}),n.jsx(q,{className:o(d,"rounded-none"),delayMs:s?600:0,children:typeof t=="string"?w(t):t})]})})}F.Skeleton=function({shape:e="square",size:s="base",className:t}){return n.jsx("div",{className:o(u({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{F as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l,j as u,bv as c,bt as v}from"./index-
|
|
1
|
+
import{c as b,l,j as u,bv as c,bt as v}from"./index-q-618IQ-.js";const p=v("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(p({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 I,l as ne,j as s,I as Ht,b as O,r as G,K as Gt,m as qt,af as Kt,h as Vt,B as Oe}from"./index-DJCD1T3p.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-CumN7OYl.js";import{s as pt,a as gt,S as ht,r as Jt,u as bt,v as Yt}from"./sortable.esm-Dgy_5_Gq.js";import{s as Fe}from"./Plus-B28tKNm1.js";import{x as Wt,y as Qt,e as E,z as Xt,l as Zt,F as Me,I as ae,B as he,R as ue,A as fe,D as vt,G as jt,H as el,c as tl,J as ll,K as de,L as sl,M as ol}from"./content-tab-DgdEt3c6.js";import{a as Qe,b as nl,e as rl,C as il,c as al,d as cl}from"./command-CPx9UwtG.js";import{a as dl,b as ul,P as fl}from"./popover-BsX8gIsV.js";import{aI as ml,aK as xl,aq as pl,a2 as gl,a9 as hl,M as He,ai as kt,aj as yt,ak as Nt,al as bl,ap as Ct}from"./agent-icon-2Sd6TPJR.js";import{a as vl}from"./Copy01-CixCoZek.js";import{s as Ue}from"./Trash01-C34kFeWG.js";import{u as Ge,s as qe,a as Ke,b as Ve}from"./usage-stats-BFNP5B9b.js";import{s as Je}from"./suggestion-DUWht7S9.js";import{E as Ye,T as Ae,R as Bt}from"./editor-classes-DYddjmhz.js";import{b as jl,i as kl,a as yl}from"./ZoomOut-DnRMz8gp.js";import{w as St}from"./section-preview-url-7zfngvgW.js";import{L as Nl,z as Cl,q as Bl}from"./parse-sections-7Tm_vjpy.js";import{r as Sl,b as wl,i as Pl,p as _l,u as wt,P as Pt}from"./product-picker-dialog-Duu5EFXJ.js";import{B as $l}from"./index-B1T14RYF.js";import{T as Tl,a as Ll,c as Il}from"./tooltip-oRr5C_aw.js";import{a as _t}from"./Image01-Bks737AT.js";import{i as Rl}from"./Link01-DCdDhO7H.js";import{i as El}from"./Monitor01-B-_Pl3qs.js";import{L as be}from"./label-CBlQ82Fk.js";import{O as Xe,Q as Al,T as zl,U as Ol,V as Ul,W as Dl,X as Fl,Y as Ml}from"./runnable-block-editor-D9HAcpIU.js";import{s as Hl}from"./XClose-BbuvN9Qp.js";import{S as Gl}from"./blog-schema-DXeDEF-x.js";function ee(g){const e=I.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=I.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=I.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=I.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 L;e[3]!==l||e[4]!==p||e[5]!==o?(L=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=L):L=e[6];const T=L,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 Le=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Ie=M&&"ring-2 ring-primary/40",Re=A&&"pointer-events-none opacity-60";let xe;e[50]!==Le||e[51]!==Ie||e[52]!==Re?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Le,Ie,Re),e[50]=Le,e[51]=Ie,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 Lt(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 It(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=Lt(g,l);if(!o)return null;const i=ts(e),a=It(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=I.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=I.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=I.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 L;return e[37]!==m||e[38]!==B||e[39]!==j?(L=s.jsxs(fl,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=L):L=e[40],L}function Ot(g){const e=I.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=I.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=I.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=Lt(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?It(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=I.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=I.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 I,l as ne,j as s,I as Ht,b as O,r as G,K as Gt,m as qt,af as Kt,h as Vt,B as Oe}from"./index-q-618IQ-.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-CNaSMIsh.js";import{s as pt,a as gt,S as ht,r as Jt,u as bt,v as Yt}from"./sortable.esm-DC3R5oj8.js";import{s as Fe}from"./Plus-hR9qqg7F.js";import{x as Wt,y as Qt,e as E,z as Xt,l as Zt,F as Me,I as ae,B as he,R as ue,A as fe,D as vt,G as jt,H as el,c as tl,J as ll,K as de,L as sl,M as ol}from"./content-tab-Dr4AuU0k.js";import{a as Qe,b as nl,e as rl,C as il,c as al,d as cl}from"./command-BMeHNtVi.js";import{a as dl,b as ul,P as fl}from"./popover-C6au3PKl.js";import{aI as ml,aK as xl,aq as pl,a2 as gl,a9 as hl,M as He,ai as kt,aj as yt,ak as Nt,al as bl,ap as Ct}from"./agent-icon-BA86cT1F.js";import{a as vl}from"./Copy01-7T2u11TN.js";import{s as Ue}from"./Trash01-kzymRLEh.js";import{u as Ge,s as qe,a as Ke,b as Ve}from"./usage-stats-D6hkaKnz.js";import{s as Je}from"./suggestion-Dk6VaiUy.js";import{E as Ye,T as Ae,R as Bt}from"./editor-classes-BdNlvhC1.js";import{b as jl,i as kl,a as yl}from"./ZoomOut-HEpqy_Rp.js";import{w as St}from"./section-preview-url-7zfngvgW.js";import{L as Nl,z as Cl,q as Bl}from"./parse-sections-Do5UnsNt.js";import{r as Sl,b as wl,i as Pl,p as _l,u as wt,P as Pt}from"./product-picker-dialog-eLnaDTe5.js";import{B as $l}from"./index-dHHL3Zav.js";import{T as Tl,a as Ll,c as Il}from"./tooltip-CDMB2U3c.js";import{a as _t}from"./Image01-Ck0HrQIi.js";import{i as Rl}from"./Link01-DByQNRHy.js";import{i as El}from"./Monitor01-CSVPDFy2.js";import{L as be}from"./label-BYq7iTEq.js";import{O as Xe,Q as Al,T as zl,U as Ol,V as Ul,W as Dl,X as Fl,Y as Ml}from"./runnable-block-editor-ctOq1VIZ.js";import{s as Hl}from"./XClose-Ct2xtw32.js";import{S as Gl}from"./blog-schema-Dk-4n46g.js";function ee(g){const e=I.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=I.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=I.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=I.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 L;e[3]!==l||e[4]!==p||e[5]!==o?(L=Z=>(p?o:l)(Z||void 0),e[3]=l,e[4]=p,e[5]=o,e[6]=L):L=e[6];const T=L,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 Le=!S&&"border border-dashed border-border/60 bg-muted/30 hover:bg-accent",Ie=M&&"ring-2 ring-primary/40",Re=A&&"pointer-events-none opacity-60";let xe;e[50]!==Le||e[51]!==Ie||e[52]!==Re?(xe=ne("relative block w-full cursor-pointer overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] transition",Le,Ie,Re),e[50]=Le,e[51]=Ie,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 Lt(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 It(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=Lt(g,l);if(!o)return null;const i=ts(e),a=It(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=I.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=I.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=I.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 L;return e[37]!==m||e[38]!==B||e[39]!==j?(L=s.jsxs(fl,{open:m,onOpenChange:h,children:[j,B]}),e[37]=m,e[38]=B,e[39]=j,e[40]=L):L=e[40],L}function Ot(g){const e=I.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=I.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=I.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=Lt(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?It(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=I.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=I.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=I.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=I.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=I.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=I.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=I.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=I.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=I.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=I.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=I.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=I.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(Ll,{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(Il,{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 L;e[56]!==t.alt?(L=E(t.alt),e[56]=t.alt,e[57]=L):L=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]!==L||e[64]!==T||e[65]!==z?(U=s.jsx(ae,{value:L,onChange:T,placeholder:z,className:"text-xs"}),e[63]=L,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=I.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=I.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=I.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=I.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=I.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 Ls=["normal","h1","h2","h3"],Is=/^<(h[1-3])>([\s\S]*)<\/\1>$/i;function Rs(g){const e=g.match(Is);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=I.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=Ls.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=I.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=I.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=I.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 L;e[41]!==_||e[42]!==B?(L=s.jsxs("div",{className:"flex flex-col gap-0.5 p-2",children:[_,B]}),e[41]=_,e[42]=B,e[43]=L):L=e[43];let T;return e[44]!==u||e[45]!==C||e[46]!==L||e[47]!==c||e[48]!==x?(T=s.jsxs("div",{ref:u,style:c,className:x,children:[C,L]}),e[44]=u,e[45]=C,e[46]=L,e[47]=c,e[48]=x,e[49]=T):T=e[49],T}function Os(g){const e=I.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=I.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=I.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=I.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=I.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=I.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 L;e[47]!==o?(L=o("sandbox.productBlocks.productField"),e[47]=o,e[48]=L):L=e[48];let T;e[49]!==L?(T=s.jsx(be,{className:"text-xs text-muted-foreground",children:L}),e[49]=L,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=I.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 L;e[48]!==P||e[49]!==B?(L=s.jsxs("div",{className:"flex gap-2",children:[P,B]}),e[48]=P,e[49]=B,e[50]=L):L=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]!==L||e[54]!==N?(z=s.jsxs("div",{className:N,children:[S,L,T]}),e[52]=S,e[53]=L,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=I.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 L;return e[7]!==B?(L=s.jsx("p",{className:"text-xs text-muted-foreground",children:B}),e[7]=B,e[8]=L):L=e[8],L}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=I.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=I.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 L;e[22]!==b?(L=b("sandbox.blockRow.deleteBlock"),e[22]=b,e[23]=L):L=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]!==L?(z=s.jsx(Oe,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":L,onClick:i,children:T}),e[25]=i,e[26]=L,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=I.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=I.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 L;e[17]!==d||e[18]!==C?(L=D=>{C(d.filter((K,q)=>q!==D))},e[17]=d,e[18]=C,e[19]=L):L=e[19];const T=L;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,It as a,Ao as b,zo as c,Eo as d,Lt as f};
|