@templatical/editor 0.55.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-D5QosKvB.js → AiAltTextPopover-CpZ7UeAZ.js} +4 -4
- package/dist/{AiAltTextReview-D1W_lrI_.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
- package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-Cy05P-iO.js} +56 -56
- package/dist/{AiPanels-CR6zphjP.js → AiPanels-CwKmXzyr.js} +1 -1
- package/dist/{AiRewriteMenu-BwztoMov.js → AiRewriteMenu-DgqJHnza.js} +13 -13
- package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-CxHJmuOh.js} +5 -5
- package/dist/BlockPreviewCanvas-DEmNZkEG.js +154 -0
- package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
- package/dist/{CloudPanels-Baoaj6Xf.js → CloudPanels-Bmlf05Il.js} +12 -12
- package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-C27GCMvK.js} +8 -8
- package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
- package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-B5NqPMmY.js} +1 -1
- package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-BDrcrDxS.js} +42 -42
- package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-D8dqjm3F.js} +6 -6
- package/dist/{CountdownToolbar-CA_gDIdZ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
- package/dist/{IssuesPanel-nmFhWG1p.js → IssuesPanel-uwuzeMSW.js} +89 -89
- package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
- package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CDK_9D7P.js} +10 -10
- package/dist/{LogicTagInsertButton-qZ82VMFx.js → LogicTagInsertButton-BSolF7Fd.js} +24 -24
- package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-C8yc9dxt.js} +7 -7
- package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-FI4I8asn.js} +1 -1
- package/dist/{MergeTagInput-JJeZbFkD.js → MergeTagInput-B1nl2ZMT.js} +12 -12
- package/dist/{MergeTagModeToggle-DDucd1eC.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
- package/dist/{MergeTagTextarea-dQ2LRrNB.js → MergeTagTextarea-DJlf3VbS.js} +5 -5
- package/dist/{ParagraphEditor-VXYwGoz_.js → ParagraphEditor-Dqco128s.js} +173 -173
- package/dist/{RestoreVersionDialog-BibNvAaJ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
- package/dist/{RichTextEditorContent-CU5EOlM_.js → RichTextEditorContent-xIEF0Y3Z.js} +8 -8
- package/dist/{SaveBlockDialog-S9aFi0cy.js → SaveBlockDialog-CQlCP_XC.js} +47 -47
- package/dist/{SavedBlocksBrowserModal-DIdn6B0J.js → SavedBlocksBrowserModal-BXA32Fx6.js} +24 -24
- package/dist/{SavedBlocksPanels-Cme2M6u8.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
- package/dist/{SavedBlocksPickBar-BDmA7r3m.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
- package/dist/{TemplateSettings-C_LHLm5M.js → TemplateSettings-CYFtR8zv.js} +41 -41
- package/dist/{TestEmailModal-CLIRn7eL.js → TestEmailModal-BbaL17HO.js} +20 -20
- package/dist/{TestEmailPanel-frdtjC8h.js → TestEmailPanel-DhB1CSpg.js} +1 -1
- package/dist/{TitleEditor-D5kC56Jl.js → TitleEditor-3BRl8u5l.js} +22 -22
- package/dist/{Toolbar-D904Yw_R.js → Toolbar-pzNIakGM.js} +1090 -856
- package/dist/{TplModal-BBdotDf1.js → TplModal-WNuWhHZm.js} +4 -4
- package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu--T-Qp_mH.js} +17 -17
- package/dist/{VersionHistoryPanels-DhagEgOk.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
- package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
- package/dist/WrapperBlock-CjfCPceb.js +56 -0
- package/dist/{blockTypeIcons-CoRQV_hP.js → blockTypeIcons-12OMwVyN.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +8 -0
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js → AiAltTextPopover-PFjTrl0y.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js → AiAltTextReview-BMjzvApH.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-C2gpq4kP.js} +107 -107
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-Cx3PE2mE.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js → AiRewriteMenu-CnkyjPEu.js} +13 -13
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-DncZ-HDf.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js → CloudPanels-CRztnw4M.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-IuLYT2x7.js} +9 -9
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-lgjJNrrY.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-DTold7iy.js} +214 -214
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-8aPSExrv.js} +7 -7
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js → CountdownToolbar-CnWQEW5g.js} +50 -50
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js → IssuesPanel-CrplCzo8.js} +13 -13
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js → LanguageMenu-B6MNInCL.js} +57 -57
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-TxeAl8Iq.js} +10 -10
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-Bt2PXbQ0.js → LogicTagInsertButton-DvSVx2DB.js} +30 -30
- package/dist/cdn/chunks/LogicTagInsertButton-DvSVx2DB.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-tGK6htBl.js} +8 -8
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-BVrQYz2C.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js → MergeTagInput-DeuNH3re.js} +13 -13
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js → MergeTagTextarea-B2xxIU3e.js} +6 -6
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js → RichTextEditorContent-Dze4C9VI.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js → TemplateSettings-YwwRbxPc.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js → TestEmailModal-BiFP2Cbx.js} +20 -20
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js → TestEmailPanel-BrivPMk2.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js → TitleEditor-CzPkkL2s.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-NEE8qxYh.js → Toolbar-VH07SzX7.js} +1153 -919
- package/dist/cdn/chunks/Toolbar-VH07SzX7.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js → TplModal-DMe6J811.js} +6 -6
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js.map → TplModal-DMe6J811.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-DkwbKhBl.js} +16 -16
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-CCCIcqe2.js +58 -0
- package/dist/cdn/chunks/WrapperBlock-CCCIcqe2.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +9 -1
- package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
- package/dist/cdn/chunks/composables-D3lsO7Io.js +3101 -0
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js → createCloudRuntime-CE79GB1H.js} +16 -16
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
- package/dist/{de-Cc6Ue0UD.js → cdn/chunks/de-BLFp3nWx.js} +10 -0
- package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
- package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-CN69NlOK.js} +187 -187
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-CN69NlOK.js.map} +1 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
- package/dist/cdn/chunks/{en-BX4FujAQ.js → en-DGGQJGbm.js} +9 -1
- package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
- package/dist/cdn/chunks/{es-Do5b-MKU.js → es-DTY9qgLv.js} +9 -1
- package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BcwkOjVq.js → extensions-8dlM-fU4.js} +112 -112
- package/dist/cdn/chunks/extensions-8dlM-fU4.js.map +1 -0
- package/dist/{fr-S1n2Ebzp.js → cdn/chunks/fr-L4FqO9Gp.js} +10 -0
- package/dist/cdn/chunks/{fr-S1n2Ebzp.js.map → fr-L4FqO9Gp.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
- package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
- package/dist/cdn/chunks/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +9 -1
- package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
- package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
- package/dist/{nl-0JSWaZpT.js → cdn/chunks/nl-DCxuxwNq.js} +10 -0
- package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-BrGw5jxk.js → normalizeMergeTagMarkup-aWjkotui.js} +67 -67
- package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js → preRenderCustomBlocks-Dn6dFUwx.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
- package/dist/{pt-BR-D3VlIMDZ.js → cdn/chunks/pt-BR-CBkcrebr.js} +10 -0
- package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js → sanitizeHtml-B3njfkSy.js} +11 -11
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js → socialIcons-BFgc3qqJ.js} +354 -341
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Diw9SLIe.js → src-C9JWWxAk.js} +419 -423
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
- package/dist/cdn/chunks/src-GgKlXNxy.js +710 -0
- package/dist/cdn/chunks/src-GgKlXNxy.js.map +1 -0
- package/dist/cdn/chunks/{src-v47QHNmB.js → src-mXG-Of9A.js} +669 -662
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js → useLocalizedDisplay-Bgg4qpev.js} +6 -6
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js → useLogicTag-B0PDeDxl.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js → useMergeTag-BSU75bKk.js} +8 -8
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js → withCurrentFont-QqBilClC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +814 -817
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
- package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
- package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
- package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
- package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
- package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
- package/dist/{composables-DPgNn9GZ.js → composables-DreAt_0A.js} +1660 -1620
- package/dist/{createCloudRuntime-Bw8TLmQ8.js → createCloudRuntime-CL4tUlDC.js} +15 -15
- package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
- package/dist/{cdn/chunks/de-Cc6Ue0UD.js → de-BLFp3nWx.js} +8 -2
- package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
- package/dist/{dist-CBdk1Vcb.js → dist-BMUUt3zJ.js} +284 -277
- package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
- package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
- package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
- package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
- package/dist/dist-CiYotUR8.js +406 -0
- package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
- package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
- package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
- package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
- package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
- package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
- package/dist/{editor-modal-BeX6otLk.js → editor-modal-BD32TXws.js} +107 -107
- package/dist/{en-BX4FujAQ.js → en-DGGQJGbm.js} +8 -0
- package/dist/en-Dgs_-NBw.js +1 -0
- package/dist/{es-Do5b-MKU.js → es-DTY9qgLv.js} +8 -0
- package/dist/{extensions-QFAARrjF.js → extensions-DKxHlSd7.js} +385 -385
- package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
- package/dist/{cdn/chunks/fr-S1n2Ebzp.js → fr-L4FqO9Gp.js} +8 -2
- package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
- package/dist/index.d.ts +60 -12
- package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
- package/dist/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +8 -0
- package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
- package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
- package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
- package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
- package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
- package/dist/{cdn/chunks/nl-0JSWaZpT.js → nl-DCxuxwNq.js} +8 -2
- package/dist/{normalizeMergeTagMarkup-BS0nRvhq.js → normalizeMergeTagMarkup-Da9JAgx7.js} +75 -75
- package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
- package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
- package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
- package/dist/{preRenderCustomBlocks-CiKvKd8V.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
- package/dist/{cdn/chunks/pt-BR-D3VlIMDZ.js → pt-BR-CBkcrebr.js} +8 -2
- package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
- package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
- package/dist/{sanitizeHtml-USjTyALR.js → sanitizeHtml-wBibnBF4.js} +6 -6
- package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
- package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
- package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
- package/dist/{socialIcons-NvIg5ahU.js → socialIcons-oo4uL16Y.js} +427 -414
- package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
- package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +922 -925
- package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
- package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
- package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
- package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
- package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
- package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
- package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
- package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
- package/dist/{useLogicTag-D8zgkXfb.js → useLogicTag-B4Zpk3eo.js} +4 -4
- package/dist/{useMergeTag-k7Kr0nMd.js → useMergeTag-B5qlq8px.js} +8 -8
- package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
- package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
- package/dist/{withCurrentFont-Bzeg_gfH.js → withCurrentFont-m_PHcOD0.js} +1 -1
- package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
- package/package.json +10 -10
- package/dist/BlockPreviewCanvas-C23A6FRm.js +0 -140
- package/dist/LanguageMenu-DcABUYop.js +0 -403
- package/dist/WrapperBlock-BAT3T0Cz.js +0 -44
- package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js +0 -142
- package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js.map +0 -1
- package/dist/cdn/chunks/ca-DIkMxYCN.js.map +0 -1
- package/dist/cdn/chunks/composables-nyxwrM27.js +0 -3061
- package/dist/cdn/chunks/composables-nyxwrM27.js.map +0 -1
- package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
- package/dist/cdn/chunks/en-BX4FujAQ.js.map +0 -1
- package/dist/cdn/chunks/es-Do5b-MKU.js.map +0 -1
- package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +0 -1
- package/dist/cdn/chunks/ja-DLwcq4bA.js.map +0 -1
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
- package/dist/cdn/chunks/nl-0JSWaZpT.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +0 -1
- package/dist/cdn/chunks/src-Diw9SLIe.js.map +0 -1
- package/dist/cdn/chunks/src-UR3AQocX.js +0 -683
- package/dist/cdn/chunks/src-UR3AQocX.js.map +0 -1
- package/dist/cdn/chunks/src-v47QHNmB.js.map +0 -1
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/en-Do0SU6tR.js +0 -1
- package/dist/useLocalizedDisplay-LdjosX4w.js +0 -31
|
@@ -0,0 +1,3101 @@
|
|
|
1
|
+
import { a as e, c as t, i as n, l as r } from "./dist-Cf1pSluo.js";
|
|
2
|
+
import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, W as x, X as S, Y as C, _ as w, b as T, c as E, ct as D, dt as O, f as ee, g as k, h as A, j, l as M, m as N, mt as P, ot as F, p as I, pt as L, rt as R, s as z, st as B, t as te, tt as V, u as H, x as U } from "./draggable-DepKdldn.js";
|
|
3
|
+
import { t as ne } from "./useEditorRoot-Beau2Z_T.js";
|
|
4
|
+
import { t as W } from "./useI18n-D8s7HtTn.js";
|
|
5
|
+
import "./useCloudI18n-Xsih9yRH.js";
|
|
6
|
+
import { t as G } from "./useMergeTag-BSU75bKk.js";
|
|
7
|
+
import { _ as re, h as K, v as ie, y as ae } from "./dist-BzXULHvI.js";
|
|
8
|
+
import { $ as oe, A as se, B as q, C as J, Cn as Y, D as X, E as ce, G as le, H as ue, I as de, K as Z, Kt as fe, L as pe, M as me, N as Q, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, W as Ce, X as we, Y as Te, Z as Ee, Zt as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dt as Fe, et as Ie, hn as Le, ht as Re, i as ze, it as Be, j as Ve, jt as He, lt as Ue, mn as We, mt as Ge, nt as Ke, on as qe, p as Je, pt as Ye, q as Xe, rn as Ze, rt as Qe, sn as $e, st as et, t as tt, tt as nt, u as rt, un as it, vn as at, vt as ot, w as st, x as ct, xn as lt, y as ut, yn as dt } from "./src-mXG-Of9A.js";
|
|
9
|
+
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
10
|
+
import { a as ft, c as pt, i as mt, n as ht, o as gt, t as _t } from "./usePopoverPosition-esO6wjvU.js";
|
|
11
|
+
import { n as vt } from "./useLocalizedDisplay-Bgg4qpev.js";
|
|
12
|
+
import { $ as yt, A as bt, B as xt, C as St, D as Ct, F as wt, G as Tt, H as Et, I as Dt, J as Ot, K as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, R as Ft, S as It, T as Lt, U as Rt, V as zt, W as Bt, Y as Vt, Z as Ht, _ as Ut, a as Wt, at as Gt, b as Kt, c as qt, d as Jt, et as Yt, g as Xt, h as Zt, i as Qt, it as $t, j as en, k as tn, l as nn, m as rn, nt as an, ot as on, p as sn, q as cn, r as ln, rt as un, s as dn, st as fn, tt as pn, u as mn, v as hn, w as gn, x as _n, y as vn, z as yn } from "./keys-BUmIvYy3.js";
|
|
13
|
+
import { t as bn } from "./useLogicTag-B0PDeDxl.js";
|
|
14
|
+
import { B as xn, C as Sn, F as Cn, I as wn, P as Tn, R as En, T as Dn, _ as On, a as kn, f as An, h as jn, n as Mn, o as Nn, t as Pn, u as Fn, v as In, w as Ln, x as Rn, y as zn, z as Bn } from "./socialIcons-BFgc3qqJ.js";
|
|
15
|
+
import { r as Vn, t as Hn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
16
|
+
import { n as Un, t as Wn } from "./sanitizeHtml-B3njfkSy.js";
|
|
17
|
+
import { At as Gn, G as Kn, Mt as qn, Nt as Jn, Ot as Yn, St as Xn, Ut as Zn, V as Qn, Wt as $n, X as er, _t as tr, d as nr, f as rr, k as ir, mt as ar, nt as or, o as sr, y as cr, yt as lr } from "./icons-DHExFLlT.js";
|
|
18
|
+
import { t as ur } from "./LoadingTrack-DUYcDHOV.js";
|
|
19
|
+
import { t as dr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { t as fr } from "./plural-CyxrJXL1.js";
|
|
21
|
+
import { m as pr, w as mr, x as hr } from "./styleConstants-CgiNKdnc.js";
|
|
22
|
+
import { t as gr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
23
|
+
import { t as _r } from "./readableTextColor-BfZUGnVj.js";
|
|
24
|
+
// src/composables/useFocusTrap.ts
|
|
25
|
+
var vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
+
function yr(t, n) {
|
|
27
|
+
let r = ne(), i = null, a = null, o = null;
|
|
28
|
+
function s() {
|
|
29
|
+
return t.value ? Array.from(t.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
|
|
30
|
+
}
|
|
31
|
+
function c(e) {
|
|
32
|
+
if (e.key !== "Tab") return;
|
|
33
|
+
let t = s();
|
|
34
|
+
if (t.length === 0) return;
|
|
35
|
+
let n = t[0], i = t[t.length - 1];
|
|
36
|
+
e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
|
|
37
|
+
}
|
|
38
|
+
function l() {
|
|
39
|
+
let n = a !== null || o !== null;
|
|
40
|
+
n && d({ restoreFocus: !1 }), n || (i = r.activeElement), o = requestAnimationFrame(() => {
|
|
41
|
+
o = null;
|
|
42
|
+
let e = s();
|
|
43
|
+
e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
|
|
44
|
+
}), a = e(t, "keydown", c);
|
|
45
|
+
}
|
|
46
|
+
function d(e = {}) {
|
|
47
|
+
let t = e.restoreFocus !== !1;
|
|
48
|
+
o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
|
|
49
|
+
}
|
|
50
|
+
let f = u([n, t], ([e, t]) => {
|
|
51
|
+
e && t ? l() : d();
|
|
52
|
+
}, { flush: "post" });
|
|
53
|
+
v(() => {
|
|
54
|
+
f(), d();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
// src/composables/useEmoji.ts
|
|
58
|
+
function br() {
|
|
59
|
+
let [e, t] = ie(!1), n = R([]), r = !1;
|
|
60
|
+
v(() => {
|
|
61
|
+
r = !0;
|
|
62
|
+
}), u(e, async (e) => {
|
|
63
|
+
if (e && n.value.length === 0) {
|
|
64
|
+
let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
|
|
65
|
+
if (r) return;
|
|
66
|
+
n.value = e;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function i() {
|
|
70
|
+
t();
|
|
71
|
+
}
|
|
72
|
+
function a() {
|
|
73
|
+
e.value = !1;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
categories: n,
|
|
77
|
+
isOpen: e,
|
|
78
|
+
toggle: i,
|
|
79
|
+
close: a
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// src/composables/useBlockRegistry.ts
|
|
83
|
+
function xr() {
|
|
84
|
+
let e = R(/* @__PURE__ */ new Map());
|
|
85
|
+
function t(t, n) {
|
|
86
|
+
e.value.set(t, n), B(e);
|
|
87
|
+
}
|
|
88
|
+
function n(t, n) {
|
|
89
|
+
let r = `custom:${t.type}`;
|
|
90
|
+
e.value.set(r, {
|
|
91
|
+
component: n,
|
|
92
|
+
createBlock: () => be(t),
|
|
93
|
+
definition: t
|
|
94
|
+
}), B(e);
|
|
95
|
+
}
|
|
96
|
+
function r(t) {
|
|
97
|
+
if (t.type === "custom") {
|
|
98
|
+
let n = `custom:${t.customType}`;
|
|
99
|
+
return e.value.get(n)?.component;
|
|
100
|
+
}
|
|
101
|
+
return e.value.get(t.type)?.component;
|
|
102
|
+
}
|
|
103
|
+
function i(t) {
|
|
104
|
+
return e.value.get(t)?.createBlock();
|
|
105
|
+
}
|
|
106
|
+
function a(t) {
|
|
107
|
+
let n = `custom:${t}`;
|
|
108
|
+
return e.value.get(n)?.definition;
|
|
109
|
+
}
|
|
110
|
+
function o(e) {
|
|
111
|
+
return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
|
|
112
|
+
}
|
|
113
|
+
async function s(e) {
|
|
114
|
+
let t = a(e.customType);
|
|
115
|
+
if (!t) return o("Block definition not found");
|
|
116
|
+
try {
|
|
117
|
+
return await pe(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
|
|
118
|
+
} catch (t) {
|
|
119
|
+
return $.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function c(t) {
|
|
123
|
+
return e.value.has(t);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
registerBuiltIn: t,
|
|
127
|
+
registerCustom: n,
|
|
128
|
+
getComponent: r,
|
|
129
|
+
createBlock: i,
|
|
130
|
+
getDefinition: a,
|
|
131
|
+
renderCustomBlock: s,
|
|
132
|
+
isRegistered: c
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// src/composables/useFonts.ts
|
|
136
|
+
var Sr = [
|
|
137
|
+
{
|
|
138
|
+
value: "Arial",
|
|
139
|
+
label: "Arial"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
value: "Helvetica",
|
|
143
|
+
label: "Helvetica"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: "Georgia",
|
|
147
|
+
label: "Georgia"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: "Times New Roman",
|
|
151
|
+
label: "Times New Roman"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
value: "Verdana",
|
|
155
|
+
label: "Verdana"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
value: "Trebuchet MS",
|
|
159
|
+
label: "Trebuchet MS"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
value: "Courier New",
|
|
163
|
+
label: "Courier New"
|
|
164
|
+
}
|
|
165
|
+
], Cr = "Arial, sans-serif";
|
|
166
|
+
function wr(e) {
|
|
167
|
+
if (e === void 0 || e === !0) return [...Sr];
|
|
168
|
+
if (e === !1) return [];
|
|
169
|
+
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
170
|
+
for (let i of e) {
|
|
171
|
+
let e = i.toLowerCase(), a = Sr.find((t) => t.value.toLowerCase() === e);
|
|
172
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Sr.map((e) => e.value).join(", ")}.`));
|
|
173
|
+
}
|
|
174
|
+
return t;
|
|
175
|
+
}
|
|
176
|
+
function Tr(e) {
|
|
177
|
+
let t = V(e?.customFonts ?? []), n = V(!1), r = wr(e?.builtIns), i = I(() => e?.defaultFallback ?? Cr), a = I(() => {
|
|
178
|
+
let e = [...r], n = t.value.map((e) => ({
|
|
179
|
+
value: e.name,
|
|
180
|
+
label: e.name,
|
|
181
|
+
isCustom: !0
|
|
182
|
+
})), i = [...e, ...n];
|
|
183
|
+
return i.sort((e, t) => e.label.localeCompare(t.label)), i;
|
|
184
|
+
});
|
|
185
|
+
function o(e) {
|
|
186
|
+
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
187
|
+
}
|
|
188
|
+
let s = e?.defaultFont ?? Cr.split(",")[0].trim();
|
|
189
|
+
o(s) || $.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
190
|
+
function c() {
|
|
191
|
+
if (e?.defaultFont && o(e.defaultFont)) {
|
|
192
|
+
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
193
|
+
if (t) return t.value;
|
|
194
|
+
}
|
|
195
|
+
return Cr;
|
|
196
|
+
}
|
|
197
|
+
let l = I(() => c());
|
|
198
|
+
function u(e) {
|
|
199
|
+
return ze(e, {
|
|
200
|
+
customFonts: t.value,
|
|
201
|
+
defaultFallback: i.value
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
let d = [], f = !1;
|
|
205
|
+
async function p() {
|
|
206
|
+
if (t.value.length === 0) {
|
|
207
|
+
f || (n.value = !0);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
let e = t.value.map(async (e) => {
|
|
211
|
+
try {
|
|
212
|
+
if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
|
|
213
|
+
let t = document.createElement("link");
|
|
214
|
+
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), d.push(t), await new Promise((n, r) => {
|
|
215
|
+
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
216
|
+
});
|
|
217
|
+
} catch (t) {
|
|
218
|
+
$.warn(`Failed to load custom font "${e.name}":`, t);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
await Promise.allSettled(e), f || (n.value = !0);
|
|
222
|
+
}
|
|
223
|
+
function m() {
|
|
224
|
+
for (let e of d) e.remove();
|
|
225
|
+
d.length = 0;
|
|
226
|
+
}
|
|
227
|
+
return C() && v(() => {
|
|
228
|
+
f = !0, m();
|
|
229
|
+
}), {
|
|
230
|
+
fonts: a,
|
|
231
|
+
defaultFont: l,
|
|
232
|
+
defaultFallback: i,
|
|
233
|
+
customFonts: t,
|
|
234
|
+
isLoaded: n,
|
|
235
|
+
loadCustomFonts: p,
|
|
236
|
+
cleanupFontLinks: m,
|
|
237
|
+
resolveFontFamily: u,
|
|
238
|
+
getDefaultFont: c
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
// src/composables/useThemeStyles.ts
|
|
242
|
+
var Er = {
|
|
243
|
+
bg: "--tpl-bg",
|
|
244
|
+
bgElevated: "--tpl-bg-elevated",
|
|
245
|
+
bgHover: "--tpl-bg-hover",
|
|
246
|
+
bgActive: "--tpl-bg-active",
|
|
247
|
+
border: "--tpl-border",
|
|
248
|
+
borderLight: "--tpl-border-light",
|
|
249
|
+
text: "--tpl-text",
|
|
250
|
+
textMuted: "--tpl-text-muted",
|
|
251
|
+
textDim: "--tpl-text-dim",
|
|
252
|
+
primary: "--tpl-primary",
|
|
253
|
+
primaryHover: "--tpl-primary-hover",
|
|
254
|
+
primaryLight: "--tpl-primary-light",
|
|
255
|
+
secondary: "--tpl-secondary",
|
|
256
|
+
secondaryHover: "--tpl-secondary-hover",
|
|
257
|
+
secondaryLight: "--tpl-secondary-light",
|
|
258
|
+
success: "--tpl-success",
|
|
259
|
+
successLight: "--tpl-success-light",
|
|
260
|
+
warning: "--tpl-warning",
|
|
261
|
+
warningLight: "--tpl-warning-light",
|
|
262
|
+
danger: "--tpl-danger",
|
|
263
|
+
dangerLight: "--tpl-danger-light",
|
|
264
|
+
canvasBg: "--tpl-canvas-bg"
|
|
265
|
+
};
|
|
266
|
+
function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
|
+
return { themeStyles: I(() => {
|
|
268
|
+
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
269
|
+
if (a) for (let [e, t] of Object.entries(Er)) {
|
|
270
|
+
let n = a[e];
|
|
271
|
+
n && (r[t] = n);
|
|
272
|
+
}
|
|
273
|
+
return n && Object.assign(r, n()), r;
|
|
274
|
+
}) };
|
|
275
|
+
}
|
|
276
|
+
// src/utils/mergeTagNodeSpec.ts
|
|
277
|
+
function Or(e, t, n) {
|
|
278
|
+
return Ee(e, n) ? {
|
|
279
|
+
type: "logicMergeTagNode",
|
|
280
|
+
attrs: {
|
|
281
|
+
value: e,
|
|
282
|
+
keyword: le(e, n)
|
|
283
|
+
}
|
|
284
|
+
} : {
|
|
285
|
+
type: "mergeTagNode",
|
|
286
|
+
attrs: {
|
|
287
|
+
label: t,
|
|
288
|
+
value: e
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
// src/utils/insertLogicTag.ts
|
|
293
|
+
function kr(e) {
|
|
294
|
+
return "before" in e && "after" in e;
|
|
295
|
+
}
|
|
296
|
+
function Ar(e, t, n) {
|
|
297
|
+
if (!kr(t)) {
|
|
298
|
+
e.chain().focus().insertContent(Or(t.value, t.label, n)).run();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
let r = Or(t.before, t.label, n), i = Or(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
302
|
+
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
303
|
+
}
|
|
304
|
+
// src/utils/linkColorExtension.ts
|
|
305
|
+
function jr(e) {
|
|
306
|
+
if (!e) return null;
|
|
307
|
+
let t = e.trim();
|
|
308
|
+
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
309
|
+
}
|
|
310
|
+
function Mr(e) {
|
|
311
|
+
return e.extend({ addAttributes() {
|
|
312
|
+
return {
|
|
313
|
+
...this.parent?.(),
|
|
314
|
+
color: {
|
|
315
|
+
default: null,
|
|
316
|
+
parseHTML: (e) => jr(gt(e.style.color)),
|
|
317
|
+
renderHTML: (e) => {
|
|
318
|
+
let t = jr(e.color);
|
|
319
|
+
return t ? { style: `color: ${t}` } : {};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
} });
|
|
324
|
+
}
|
|
325
|
+
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
+
function Nr(e, t = ue.liquid, n = () => !0) {
|
|
327
|
+
let r = V(!1), i = V(""), a = V(""), o = V(null);
|
|
328
|
+
yr(o, r);
|
|
329
|
+
function s() {
|
|
330
|
+
if (!n()) return;
|
|
331
|
+
let t = e.value?.getAttributes("link") ?? {};
|
|
332
|
+
i.value = t.href || "", a.value = t.color || "", r.value = !0;
|
|
333
|
+
}
|
|
334
|
+
function c() {
|
|
335
|
+
if (n()) {
|
|
336
|
+
if (i.value) {
|
|
337
|
+
let t = d(i.value);
|
|
338
|
+
if (t !== null) {
|
|
339
|
+
let n = jr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
340
|
+
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
p();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
let l = /^(?:\/|\.{1,2}\/|\?)/;
|
|
347
|
+
function u(e) {
|
|
348
|
+
return RegExp(`^(?:${t.value.source})`).test(e);
|
|
349
|
+
}
|
|
350
|
+
function d(e) {
|
|
351
|
+
let t = e.trim();
|
|
352
|
+
if (!t) return null;
|
|
353
|
+
if (t.startsWith("#")) return t;
|
|
354
|
+
if (t.startsWith("//")) return `https:${t}`;
|
|
355
|
+
if (l.test(t)) return t;
|
|
356
|
+
let n = Pe(t);
|
|
357
|
+
return n ? rt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
358
|
+
}
|
|
359
|
+
function f() {
|
|
360
|
+
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
361
|
+
}
|
|
362
|
+
function p() {
|
|
363
|
+
r.value = !1, i.value = "", a.value = "";
|
|
364
|
+
}
|
|
365
|
+
function m(e) {
|
|
366
|
+
e.key === "Enter" ? (e.preventDefault(), c()) : e.key === "Escape" && p();
|
|
367
|
+
}
|
|
368
|
+
return {
|
|
369
|
+
showLinkDialog: r,
|
|
370
|
+
linkUrl: i,
|
|
371
|
+
linkColor: a,
|
|
372
|
+
linkDialogRef: o,
|
|
373
|
+
openLinkDialog: s,
|
|
374
|
+
insertLink: c,
|
|
375
|
+
removeLink: f,
|
|
376
|
+
closeLinkDialog: p,
|
|
377
|
+
handleLinkKeydown: m
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
// src/composables/useRichTextEditor.ts
|
|
381
|
+
function Pr(t) {
|
|
382
|
+
let n = g(hn, null), r = pt(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: c, autocomplete: l } = G(), { canInsertLogicTag: d, isRequesting: f, requestLogicTag: p } = bn(), h = g(an, null), _ = (S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = Te(c), y = R(null), b = n?.content ? vt(n) : null, x = () => Fe(b?.settings.value ?? { locale: "en" });
|
|
383
|
+
u(x, (e) => {
|
|
384
|
+
let t = y.value?.view.dom;
|
|
385
|
+
t && t.setAttribute("dir", e);
|
|
386
|
+
});
|
|
387
|
+
let { showLinkDialog: C, linkUrl: w, linkColor: T, linkDialogRef: E, openLinkDialog: D, insertLink: O, removeLink: ee, closeLinkDialog: k, handleLinkKeydown: A } = Nr(y, c, () => r.value);
|
|
388
|
+
u(r, (e) => {
|
|
389
|
+
if (y.value?.setEditable(e, !1), !e) {
|
|
390
|
+
k();
|
|
391
|
+
let e = y.value;
|
|
392
|
+
e && e.view.dispatch(e.state.tr);
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
let { start: j, stop: M } = re(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = R(null), P = V(!0), F = V(null), I = !1, L = null;
|
|
396
|
+
async function z() {
|
|
397
|
+
F.value = null, P.value = !0;
|
|
398
|
+
try {
|
|
399
|
+
let { TiptapEditor: e, EC: a, extensions: o } = await t.loadExtensions({
|
|
400
|
+
mergeTags: i,
|
|
401
|
+
syntax: c,
|
|
402
|
+
triggerChar: v,
|
|
403
|
+
autocompleteEnabled: l,
|
|
404
|
+
suggestionEmptyText: _
|
|
405
|
+
});
|
|
406
|
+
if (I) return;
|
|
407
|
+
N.value = a;
|
|
408
|
+
let s = /* @__PURE__ */ new Map();
|
|
409
|
+
o.forEach((e, t) => s.set(e.name, t));
|
|
410
|
+
let u = new e({
|
|
411
|
+
extensions: o.filter((e, t) => s.get(e.name) === t),
|
|
412
|
+
content: t.blockContent(),
|
|
413
|
+
editable: r.value,
|
|
414
|
+
editorProps: { attributes: { dir: x() } },
|
|
415
|
+
onUpdate: ({ editor: e }) => {
|
|
416
|
+
!I && r.value && n && (L = e.getHTML(), n.updateBlock(t.blockId(), { content: L }));
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
if (I) {
|
|
420
|
+
u.destroy();
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
y.value = u, P.value = !1, j();
|
|
424
|
+
} catch (e) {
|
|
425
|
+
if (I) return;
|
|
426
|
+
$.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function B() {
|
|
430
|
+
y.value?.destroy(), y.value = null, z();
|
|
431
|
+
}
|
|
432
|
+
z();
|
|
433
|
+
let te = u(() => t.blockContent(), (e) => {
|
|
434
|
+
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
435
|
+
});
|
|
436
|
+
function H(e) {
|
|
437
|
+
if (o.value || f.value) return;
|
|
438
|
+
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
439
|
+
if (!r) return;
|
|
440
|
+
t.onClickOutsideSideEffect?.(r);
|
|
441
|
+
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
442
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
443
|
+
}
|
|
444
|
+
e(document, "mousedown", H), m(() => {
|
|
445
|
+
I = !0, te(), M(), y.value?.destroy();
|
|
446
|
+
});
|
|
447
|
+
async function U() {
|
|
448
|
+
if (!r.value) return;
|
|
449
|
+
let e = await s();
|
|
450
|
+
!I && r.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
451
|
+
label: e.label,
|
|
452
|
+
value: e.value
|
|
453
|
+
}).run() : y.value?.commands.focus());
|
|
454
|
+
}
|
|
455
|
+
async function ne() {
|
|
456
|
+
if (!r.value) return;
|
|
457
|
+
let e = await p();
|
|
458
|
+
!I && r.value && (e && y.value ? Ar(y.value, e, c) : y.value?.commands.focus());
|
|
459
|
+
}
|
|
460
|
+
return {
|
|
461
|
+
editor: y,
|
|
462
|
+
EditorContent: N,
|
|
463
|
+
isLoading: P,
|
|
464
|
+
isEditable: r,
|
|
465
|
+
initError: F,
|
|
466
|
+
retry: B,
|
|
467
|
+
showLinkDialog: C,
|
|
468
|
+
linkUrl: w,
|
|
469
|
+
linkColor: T,
|
|
470
|
+
linkDialogRef: E,
|
|
471
|
+
mergeTags: i,
|
|
472
|
+
canRequestMergeTag: a,
|
|
473
|
+
isRequestingMergeTag: o,
|
|
474
|
+
syntax: c,
|
|
475
|
+
canInsertLogicTag: d,
|
|
476
|
+
isRequestingLogicTag: f,
|
|
477
|
+
openLinkDialog: D,
|
|
478
|
+
insertLink: O,
|
|
479
|
+
removeLink: ee,
|
|
480
|
+
closeLinkDialog: k,
|
|
481
|
+
handleLinkKeydown: A,
|
|
482
|
+
handleAddMergeTag: U,
|
|
483
|
+
handleAddLogicTag: ne
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
// src/utils/activeEditorTracker.ts
|
|
487
|
+
var Fr = /* @__PURE__ */ new Set(), Ir = 0, Lr = 0;
|
|
488
|
+
function Rr() {
|
|
489
|
+
let e = ++Lr;
|
|
490
|
+
return Fr.add(e), Ir === 0 && (Ir = e), {
|
|
491
|
+
id: e,
|
|
492
|
+
isActive: () => Fr.size <= 1 || Ir === e,
|
|
493
|
+
claim: () => {
|
|
494
|
+
Ir = e;
|
|
495
|
+
},
|
|
496
|
+
dispose: () => {
|
|
497
|
+
if (Fr.delete(e), Ir === e) {
|
|
498
|
+
let e = Array.from(Fr);
|
|
499
|
+
Ir = e[e.length - 1] ?? 0;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
// src/utils/resolveLintOptions.ts
|
|
505
|
+
function zr(e) {
|
|
506
|
+
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
507
|
+
return {
|
|
508
|
+
...e.lint,
|
|
509
|
+
locale: e.locale,
|
|
510
|
+
...t === void 0 ? {} : { contentLocale: t }
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
// src/composables/usePreviewResolution.ts
|
|
514
|
+
var Br = 500;
|
|
515
|
+
function Vr(e) {
|
|
516
|
+
let t = typeof e.resolvePreview == "function", n = V(null), r = V(!1), i = V(!1), a = 0, o = null;
|
|
517
|
+
function s() {
|
|
518
|
+
o !== null && (clearTimeout(o), o = null);
|
|
519
|
+
}
|
|
520
|
+
async function c() {
|
|
521
|
+
let t = e.resolvePreview;
|
|
522
|
+
if (!t) return;
|
|
523
|
+
let o = ++a;
|
|
524
|
+
r.value = !0;
|
|
525
|
+
let s = {
|
|
526
|
+
content: Ze(e.getContent()),
|
|
527
|
+
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
528
|
+
};
|
|
529
|
+
try {
|
|
530
|
+
let e = await t(s);
|
|
531
|
+
if (o !== a) return;
|
|
532
|
+
if (!tt(e)) {
|
|
533
|
+
i.value = !0;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
n.value = e, i.value = !1;
|
|
537
|
+
} catch {
|
|
538
|
+
if (o !== a) return;
|
|
539
|
+
i.value = !0;
|
|
540
|
+
} finally {
|
|
541
|
+
o === a && (r.value = !1);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function l() {
|
|
545
|
+
t && (s(), n.value === null ? c() : o = setTimeout(() => {
|
|
546
|
+
o = null, c();
|
|
547
|
+
}, Br));
|
|
548
|
+
}
|
|
549
|
+
return u(() => [
|
|
550
|
+
e.isActive(),
|
|
551
|
+
e.getRecipient?.(),
|
|
552
|
+
e.getLocale?.()
|
|
553
|
+
], ([e, , t], o) => {
|
|
554
|
+
o && t !== o[2] && (s(), a++, n.value = null, r.value = !1, i.value = !1), e ? l() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
555
|
+
}, {
|
|
556
|
+
immediate: !0,
|
|
557
|
+
flush: "sync"
|
|
558
|
+
}), v(() => {
|
|
559
|
+
s(), a++;
|
|
560
|
+
}), {
|
|
561
|
+
isConfigured: t,
|
|
562
|
+
content: I(() => n.value ?? e.getContent()),
|
|
563
|
+
isResolving: r,
|
|
564
|
+
isInitialResolve: I(() => r.value && n.value === null),
|
|
565
|
+
hasFailed: i,
|
|
566
|
+
supersedesSamples: I(() => t)
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
// src/composables/useMergeTagPicker.ts
|
|
570
|
+
function Hr() {
|
|
571
|
+
let e = V(!1), t = V([]), n = V(null), r = null;
|
|
572
|
+
function i(i, a) {
|
|
573
|
+
if (r) {
|
|
574
|
+
let e = r;
|
|
575
|
+
r = null, e(null);
|
|
576
|
+
}
|
|
577
|
+
return t.value = i, n.value = a?.current ?? null, e.value = !0, new Promise((e) => {
|
|
578
|
+
r = e;
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
function a(i) {
|
|
582
|
+
let a = r;
|
|
583
|
+
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
584
|
+
}
|
|
585
|
+
return C() && v(() => {
|
|
586
|
+
if (r) {
|
|
587
|
+
let e = r;
|
|
588
|
+
r = null, e(null);
|
|
589
|
+
}
|
|
590
|
+
e.value = !1, t.value = [], n.value = null;
|
|
591
|
+
}), {
|
|
592
|
+
isOpen: e,
|
|
593
|
+
tags: t,
|
|
594
|
+
current: n,
|
|
595
|
+
open: i,
|
|
596
|
+
resolve: a
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
// src/composables/useLogicTagPicker.ts
|
|
600
|
+
function Ur() {
|
|
601
|
+
let e = V(!1), t = V([]), n = V([]), r = null;
|
|
602
|
+
function i(i, a) {
|
|
603
|
+
if (r) {
|
|
604
|
+
let e = r;
|
|
605
|
+
r = null, e(null);
|
|
606
|
+
}
|
|
607
|
+
return t.value = i, n.value = a, e.value = !0, new Promise((e) => {
|
|
608
|
+
r = e;
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
function a(i) {
|
|
612
|
+
let a = r;
|
|
613
|
+
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
614
|
+
}
|
|
615
|
+
return C() && v(() => {
|
|
616
|
+
if (r) {
|
|
617
|
+
let e = r;
|
|
618
|
+
r = null, e(null);
|
|
619
|
+
}
|
|
620
|
+
e.value = !1, t.value = [], n.value = [];
|
|
621
|
+
}), {
|
|
622
|
+
isOpen: e,
|
|
623
|
+
tags: t,
|
|
624
|
+
pairs: n,
|
|
625
|
+
open: i,
|
|
626
|
+
resolve: a
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
// src/composables/useTemplateLint.ts
|
|
630
|
+
function Wr(e) {
|
|
631
|
+
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
632
|
+
}
|
|
633
|
+
var Gr = !1;
|
|
634
|
+
function Kr(e) {
|
|
635
|
+
let t = V([]), n = V(0), r = V(-1), i = u(e.content, () => {
|
|
636
|
+
n.value++;
|
|
637
|
+
}, { deep: !0 }), a = V(!1), o = V(!1), s = R(null), c = Wr(e.options), l = null, d = !1;
|
|
638
|
+
c || f();
|
|
639
|
+
async function f() {
|
|
640
|
+
try {
|
|
641
|
+
let t = await import("./src-C9JWWxAk.js");
|
|
642
|
+
if (d) return;
|
|
643
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = ae(n, p, { debounce: e.debounce ?? 500 });
|
|
644
|
+
} catch {
|
|
645
|
+
if (d) return;
|
|
646
|
+
o.value = !0, Gr || (Gr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function p() {
|
|
650
|
+
if (!s.value) return;
|
|
651
|
+
let i = s.value.lintTemplate(e.content.value, {
|
|
652
|
+
...e.options,
|
|
653
|
+
...e.customBlocks === void 0 ? {} : { customBlocks: e.customBlocks },
|
|
654
|
+
...e.mergeTagSyntax === void 0 ? {} : { mergeTagSyntax: e.mergeTagSyntax }
|
|
655
|
+
});
|
|
656
|
+
r.value = n.value, t.value = i;
|
|
657
|
+
}
|
|
658
|
+
let m = u(() => e.options, () => {
|
|
659
|
+
s.value && p();
|
|
660
|
+
}, { deep: !0 });
|
|
661
|
+
function h(t) {
|
|
662
|
+
t.fix && t.fix.apply({
|
|
663
|
+
updateBlock: e.updateBlock,
|
|
664
|
+
updateSettings: e.updateSettings,
|
|
665
|
+
removeBlock: (t) => {
|
|
666
|
+
let n = e.content.value.settings.locale ?? "en";
|
|
667
|
+
(e.options.contentLocale ?? n) === n && e.removeBlock(t);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
function g() {
|
|
672
|
+
d = !0, l?.(), i(), m();
|
|
673
|
+
}
|
|
674
|
+
return {
|
|
675
|
+
issues: t,
|
|
676
|
+
contentVersion: n,
|
|
677
|
+
lintVersion: r,
|
|
678
|
+
ready: a,
|
|
679
|
+
unavailable: o,
|
|
680
|
+
applyFix: h,
|
|
681
|
+
destroy: g
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
// src/composables/useKeyboardReorder.ts
|
|
685
|
+
function qr(e, t, n = []) {
|
|
686
|
+
let r = V(null), i = V(""), a = null;
|
|
687
|
+
function o(t) {
|
|
688
|
+
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
689
|
+
if (r !== -1) return {
|
|
690
|
+
index: r,
|
|
691
|
+
total: n.length
|
|
692
|
+
};
|
|
693
|
+
for (let e of n) {
|
|
694
|
+
if (e.type !== "section") continue;
|
|
695
|
+
let n = e;
|
|
696
|
+
for (let e = 0; e < n.children.length; e++) {
|
|
697
|
+
let r = n.children[e], i = r.findIndex((e) => e.id === t);
|
|
698
|
+
if (i !== -1) return {
|
|
699
|
+
index: i,
|
|
700
|
+
total: r.length,
|
|
701
|
+
sectionId: n.id,
|
|
702
|
+
columnIndex: e
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
function s(r) {
|
|
709
|
+
let i = o(r);
|
|
710
|
+
if (!i) return "";
|
|
711
|
+
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
712
|
+
return a ? zn(a, t.t, n) : "";
|
|
713
|
+
}
|
|
714
|
+
function c(t, n) {
|
|
715
|
+
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
716
|
+
}
|
|
717
|
+
function l(e) {
|
|
718
|
+
i.value = "", queueMicrotask(() => {
|
|
719
|
+
i.value = e;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
function u(e) {
|
|
723
|
+
return r.value === e;
|
|
724
|
+
}
|
|
725
|
+
function d(e) {
|
|
726
|
+
let n = o(e);
|
|
727
|
+
n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
|
|
728
|
+
block: s(e),
|
|
729
|
+
position: String(n.index + 1),
|
|
730
|
+
total: String(n.total)
|
|
731
|
+
})));
|
|
732
|
+
}
|
|
733
|
+
function f(n, r) {
|
|
734
|
+
let i = o(n);
|
|
735
|
+
if (!i) return;
|
|
736
|
+
let a = i.index + r;
|
|
737
|
+
a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
|
|
738
|
+
block: s(n),
|
|
739
|
+
position: String(a + 1),
|
|
740
|
+
total: String(i.total)
|
|
741
|
+
})));
|
|
742
|
+
}
|
|
743
|
+
function p(e) {
|
|
744
|
+
f(e, -1);
|
|
745
|
+
}
|
|
746
|
+
function m(e) {
|
|
747
|
+
f(e, 1);
|
|
748
|
+
}
|
|
749
|
+
function h(e) {
|
|
750
|
+
let n = o(e);
|
|
751
|
+
n && l(t.format(t.t.blockActions.dropped, {
|
|
752
|
+
block: s(e),
|
|
753
|
+
position: String(n.index + 1),
|
|
754
|
+
total: String(n.total)
|
|
755
|
+
})), r.value = null, a = null;
|
|
756
|
+
}
|
|
757
|
+
function g() {
|
|
758
|
+
let n = r.value;
|
|
759
|
+
if (n && a) {
|
|
760
|
+
let r = o(n);
|
|
761
|
+
r && (r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex) || r && r.index !== a.index) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
|
|
762
|
+
block: s(n),
|
|
763
|
+
position: String(a.index + 1)
|
|
764
|
+
}));
|
|
765
|
+
}
|
|
766
|
+
r.value = null, a = null;
|
|
767
|
+
}
|
|
768
|
+
return {
|
|
769
|
+
liftedBlockId: r,
|
|
770
|
+
announcement: i,
|
|
771
|
+
isLifted: u,
|
|
772
|
+
lift: d,
|
|
773
|
+
cancel: g,
|
|
774
|
+
moveUp: p,
|
|
775
|
+
moveDown: m,
|
|
776
|
+
drop: h
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
// src/composables/useUiTheme.ts
|
|
780
|
+
function Jr(e) {
|
|
781
|
+
let n = t("(prefers-color-scheme: dark)");
|
|
782
|
+
return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
783
|
+
}
|
|
784
|
+
// src/composables/useCustomBlockStylesheets.ts
|
|
785
|
+
function Yr(e, t) {
|
|
786
|
+
return I(() => {
|
|
787
|
+
let n = Xr(e.value.blocks);
|
|
788
|
+
if (n.size === 0) return [];
|
|
789
|
+
let r = /* @__PURE__ */ new Set(), i = [];
|
|
790
|
+
for (let e of n) {
|
|
791
|
+
let n = t.getDefinition(e)?.stylesheet;
|
|
792
|
+
if (!n) continue;
|
|
793
|
+
let a = n.trim();
|
|
794
|
+
a === "" || r.has(a) || (r.add(a), i.push(a));
|
|
795
|
+
}
|
|
796
|
+
return i;
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
function Xr(e) {
|
|
800
|
+
let t = /* @__PURE__ */ new Set();
|
|
801
|
+
return Zr(e, t), t;
|
|
802
|
+
}
|
|
803
|
+
function Zr(e, t) {
|
|
804
|
+
for (let n of e) if (ot(n)) t.add(n.customType);
|
|
805
|
+
else if (n.type === "section") {
|
|
806
|
+
let e = n.children;
|
|
807
|
+
if (!e) continue;
|
|
808
|
+
for (let n of e) Zr(n, t);
|
|
809
|
+
} else He(n) && Zr(n.children, t);
|
|
810
|
+
}
|
|
811
|
+
// src/utils/registerBuiltInBlocks.ts
|
|
812
|
+
var Qr = [
|
|
813
|
+
{
|
|
814
|
+
type: "section",
|
|
815
|
+
createBlock: he
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
type: "title",
|
|
819
|
+
createBlock: Q
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
type: "paragraph",
|
|
823
|
+
createBlock: X
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
type: "image",
|
|
827
|
+
createBlock: Se
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
type: "button",
|
|
831
|
+
createBlock: Ae
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
type: "divider",
|
|
835
|
+
createBlock: J
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
type: "video",
|
|
839
|
+
createBlock: ge
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
type: "social",
|
|
843
|
+
createBlock: se
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
type: "menu",
|
|
847
|
+
createBlock: ce
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
type: "table",
|
|
851
|
+
createBlock: me
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
type: "spacer",
|
|
855
|
+
createBlock: Ve
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
type: "html",
|
|
859
|
+
createBlock: st
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
type: "countdown",
|
|
863
|
+
createBlock: ct
|
|
864
|
+
}
|
|
865
|
+
];
|
|
866
|
+
function $r(e, t) {
|
|
867
|
+
for (let n of Qr) {
|
|
868
|
+
let r = t[n.type];
|
|
869
|
+
r && e.registerBuiltIn(n.type, {
|
|
870
|
+
component: r,
|
|
871
|
+
createBlock: n.createBlock
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
// src/utils/resolveHtmlBlockPreview.ts
|
|
876
|
+
function ei(e) {
|
|
877
|
+
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
878
|
+
}
|
|
879
|
+
// src/utils/collectOffPaletteDefaults.ts
|
|
880
|
+
function ti(e) {
|
|
881
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
882
|
+
}
|
|
883
|
+
function ni(e, t, n) {
|
|
884
|
+
let r = new Set(e.map((e) => ft(e))), i = [], a = (e, t) => {
|
|
885
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ft(o)) && i.push(`${t}.${n}: ${o}`) : ti(o) && a(o, `${t}.${n}`);
|
|
886
|
+
}, o = t;
|
|
887
|
+
for (let [e, t] of Object.entries(Ye)) {
|
|
888
|
+
let n = o?.[e];
|
|
889
|
+
a({
|
|
890
|
+
...t,
|
|
891
|
+
...ti(n) ? n : {}
|
|
892
|
+
}, e);
|
|
893
|
+
}
|
|
894
|
+
return a({
|
|
895
|
+
...Ge,
|
|
896
|
+
...n ?? {}
|
|
897
|
+
}, "template"), i;
|
|
898
|
+
}
|
|
899
|
+
// src/utils/localizedBlockDefaults.ts
|
|
900
|
+
function ri(e) {
|
|
901
|
+
return {
|
|
902
|
+
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
903
|
+
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
904
|
+
button: { text: e.blockDefaults.button }
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
// src/i18n/index.ts
|
|
908
|
+
var ii = /* #__PURE__ */ Object.assign({
|
|
909
|
+
"./locales/ca.ts": () => import("./ca-BJn8lcJx.js"),
|
|
910
|
+
"./locales/de.ts": () => import("./de-BLFp3nWx.js"),
|
|
911
|
+
"./locales/en.ts": () => import("./en-DGGQJGbm.js"),
|
|
912
|
+
"./locales/es.ts": () => import("./es-DTY9qgLv.js"),
|
|
913
|
+
"./locales/fr.ts": () => import("./fr-L4FqO9Gp.js"),
|
|
914
|
+
"./locales/ja.ts": () => import("./ja-6uOXkh4v.js"),
|
|
915
|
+
"./locales/nl.ts": () => import("./nl-DCxuxwNq.js"),
|
|
916
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CBkcrebr.js")
|
|
917
|
+
}), ai = /* #__PURE__ */ Object.assign({
|
|
918
|
+
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
919
|
+
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
920
|
+
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
921
|
+
});
|
|
922
|
+
function oi(e) {
|
|
923
|
+
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
924
|
+
}
|
|
925
|
+
var si = oi(ii), ci = oi(ai);
|
|
926
|
+
function li(e) {
|
|
927
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
928
|
+
}
|
|
929
|
+
function ui(e, t) {
|
|
930
|
+
let n = li(e);
|
|
931
|
+
return t.find((e) => li(e) === n);
|
|
932
|
+
}
|
|
933
|
+
function di(e) {
|
|
934
|
+
return li(e).split("-")[0];
|
|
935
|
+
}
|
|
936
|
+
function fi(e, t) {
|
|
937
|
+
return ui(e, t) ?? ui(di(e), t);
|
|
938
|
+
}
|
|
939
|
+
function pi(e, t) {
|
|
940
|
+
return fi(e, t) ?? "en";
|
|
941
|
+
}
|
|
942
|
+
async function mi(e) {
|
|
943
|
+
let t = ii[`./locales/${pi(e, si)}.ts`];
|
|
944
|
+
return (await t()).default;
|
|
945
|
+
}
|
|
946
|
+
async function hi(e) {
|
|
947
|
+
let t = ai[`./locales/cloud/${pi(e, ci)}.ts`];
|
|
948
|
+
return (await t()).default;
|
|
949
|
+
}
|
|
950
|
+
function gi(e) {
|
|
951
|
+
return fi(e, si) !== void 0;
|
|
952
|
+
}
|
|
953
|
+
function _i(e) {
|
|
954
|
+
return fi(e, ci) !== void 0;
|
|
955
|
+
}
|
|
956
|
+
function vi() {
|
|
957
|
+
return [...si];
|
|
958
|
+
}
|
|
959
|
+
function yi() {
|
|
960
|
+
return [...ci];
|
|
961
|
+
}
|
|
962
|
+
// src/i18n/contentDefaults.ts
|
|
963
|
+
var bi = {
|
|
964
|
+
en: {
|
|
965
|
+
video: "Video",
|
|
966
|
+
days: "Days",
|
|
967
|
+
hours: "Hours",
|
|
968
|
+
minutes: "Minutes",
|
|
969
|
+
seconds: "Seconds",
|
|
970
|
+
expired: "This offer has expired"
|
|
971
|
+
},
|
|
972
|
+
de: {
|
|
973
|
+
video: "Video",
|
|
974
|
+
days: "Tage",
|
|
975
|
+
hours: "Stunden",
|
|
976
|
+
minutes: "Minuten",
|
|
977
|
+
seconds: "Sekunden",
|
|
978
|
+
expired: "Dieses Angebot ist abgelaufen"
|
|
979
|
+
},
|
|
980
|
+
es: {
|
|
981
|
+
video: "Vídeo",
|
|
982
|
+
days: "Días",
|
|
983
|
+
hours: "Horas",
|
|
984
|
+
minutes: "Minutos",
|
|
985
|
+
seconds: "Segundos",
|
|
986
|
+
expired: "Esta oferta ha expirado"
|
|
987
|
+
},
|
|
988
|
+
fr: {
|
|
989
|
+
video: "Vidéo",
|
|
990
|
+
days: "Jours",
|
|
991
|
+
hours: "Heures",
|
|
992
|
+
minutes: "Minutes",
|
|
993
|
+
seconds: "Secondes",
|
|
994
|
+
expired: "Cette offre a expiré"
|
|
995
|
+
},
|
|
996
|
+
nl: {
|
|
997
|
+
video: "Video",
|
|
998
|
+
days: "Dagen",
|
|
999
|
+
hours: "Uren",
|
|
1000
|
+
minutes: "Minuten",
|
|
1001
|
+
seconds: "Seconden",
|
|
1002
|
+
expired: "Deze aanbieding is verlopen"
|
|
1003
|
+
},
|
|
1004
|
+
"pt-BR": {
|
|
1005
|
+
video: "Vídeo",
|
|
1006
|
+
days: "Dias",
|
|
1007
|
+
hours: "Horas",
|
|
1008
|
+
minutes: "Minutos",
|
|
1009
|
+
seconds: "Segundos",
|
|
1010
|
+
expired: "Esta oferta expirou"
|
|
1011
|
+
},
|
|
1012
|
+
ca: {
|
|
1013
|
+
video: "Vídeo",
|
|
1014
|
+
days: "Dies",
|
|
1015
|
+
hours: "Hores",
|
|
1016
|
+
minutes: "Minuts",
|
|
1017
|
+
seconds: "Segons",
|
|
1018
|
+
expired: "Aquesta oferta ha caducat"
|
|
1019
|
+
},
|
|
1020
|
+
ja: {
|
|
1021
|
+
video: "動画",
|
|
1022
|
+
days: "日",
|
|
1023
|
+
hours: "時間",
|
|
1024
|
+
minutes: "分",
|
|
1025
|
+
seconds: "秒",
|
|
1026
|
+
expired: "このオファーは終了しました"
|
|
1027
|
+
}
|
|
1028
|
+
}, xi = new Map(Object.keys(bi).map((e) => [e.toLowerCase(), e]));
|
|
1029
|
+
function Si(e) {
|
|
1030
|
+
if (!e) return bi.en;
|
|
1031
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = xi.get(t);
|
|
1032
|
+
if (n) return bi[n];
|
|
1033
|
+
let r = xi.get(di(t));
|
|
1034
|
+
return r ? bi[r] : bi.en;
|
|
1035
|
+
}
|
|
1036
|
+
function Ci(e) {
|
|
1037
|
+
let t = Si(e);
|
|
1038
|
+
return {
|
|
1039
|
+
video: { alt: t.video },
|
|
1040
|
+
countdown: {
|
|
1041
|
+
labelDays: t.days,
|
|
1042
|
+
labelHours: t.hours,
|
|
1043
|
+
labelMinutes: t.minutes,
|
|
1044
|
+
labelSeconds: t.seconds,
|
|
1045
|
+
expiredMessage: t.expired
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
// src/utils/collectColorFieldIssues.ts
|
|
1050
|
+
function wi(e, t) {
|
|
1051
|
+
let n = [], r = (r, i) => {
|
|
1052
|
+
let a = In(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1053
|
+
if (a.invalidPresets.length > 0 && n.push({
|
|
1054
|
+
id: s("invalid-presets"),
|
|
1055
|
+
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
1056
|
+
}), a.emptyPresets && n.push({
|
|
1057
|
+
id: s("empty-presets"),
|
|
1058
|
+
message: `${o}: presets is empty — a field palette can only narrow the editor's, so an empty list is ignored and the field inherits colors.presets.`
|
|
1059
|
+
}), a.allowCustomIgnored && n.push({
|
|
1060
|
+
id: s("allow-custom-ignored"),
|
|
1061
|
+
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1062
|
+
}), !a.allowCustom && a.presets.length > 0) {
|
|
1063
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => ft(e)));
|
|
1064
|
+
e !== "" && !t.has(ft(e)) && n.push({
|
|
1065
|
+
id: s("off-palette-default"),
|
|
1066
|
+
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
for (let t of e.fields) if (t.type === "color") r(t, t.key);
|
|
1071
|
+
else if (t.type === "repeatable") for (let e of t.fields) e.type === "color" && r(e, `${t.key}[].${e.key}`);
|
|
1072
|
+
return n;
|
|
1073
|
+
}
|
|
1074
|
+
// src/utils/keyboardShortcuts.ts
|
|
1075
|
+
function Ti(e) {
|
|
1076
|
+
for (let t of e.composedPath()) {
|
|
1077
|
+
if (!(t instanceof HTMLElement)) continue;
|
|
1078
|
+
if (t.isContentEditable) return !0;
|
|
1079
|
+
let e = t.tagName;
|
|
1080
|
+
if (e === "INPUT" || e === "TEXTAREA" || e === "SELECT") return !0;
|
|
1081
|
+
}
|
|
1082
|
+
return !1;
|
|
1083
|
+
}
|
|
1084
|
+
function Ei(e, t) {
|
|
1085
|
+
let n = e.metaKey || e.ctrlKey;
|
|
1086
|
+
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1087
|
+
else if (n && e.key.toLowerCase() === "z") {
|
|
1088
|
+
if (Ti(e)) return;
|
|
1089
|
+
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1090
|
+
} else {
|
|
1091
|
+
if (t.isPicking?.() && !Ti(e)) {
|
|
1092
|
+
if (e.key === "Escape") {
|
|
1093
|
+
e.preventDefault(), t.onCancelPick?.();
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
if (e.key === "Enter") {
|
|
1097
|
+
e.preventDefault(), t.onConfirmPick?.();
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
1101
|
+
e.preventDefault();
|
|
1102
|
+
return;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ti(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
// src/utils/blockComponentResolver.ts
|
|
1109
|
+
function Di(e, t) {
|
|
1110
|
+
let n = { fontFamily: t(e.fontFamily) };
|
|
1111
|
+
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1112
|
+
}
|
|
1113
|
+
function Oi(e, t, n) {
|
|
1114
|
+
if (t) {
|
|
1115
|
+
let n = t.getComponent(e);
|
|
1116
|
+
if (n) return n;
|
|
1117
|
+
}
|
|
1118
|
+
return n[e.type] ?? null;
|
|
1119
|
+
}
|
|
1120
|
+
var ki = "--tpl-block-bg-layer", Ai = "--tpl-email-frame-width", ji = "tpl-has-bg-image";
|
|
1121
|
+
function Mi(e, t) {
|
|
1122
|
+
if (t === null) return {};
|
|
1123
|
+
let n = Le(e);
|
|
1124
|
+
if (n === null) return {};
|
|
1125
|
+
let r = t?.trim(), i = r ? We(r) : n.url;
|
|
1126
|
+
return {
|
|
1127
|
+
backgroundImage: `url("${i}")`,
|
|
1128
|
+
backgroundSize: n.size,
|
|
1129
|
+
backgroundPosition: n.position,
|
|
1130
|
+
backgroundRepeat: n.repeat,
|
|
1131
|
+
[ki]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
function Ni(e) {
|
|
1135
|
+
return e && ki in e ? ji : void 0;
|
|
1136
|
+
}
|
|
1137
|
+
var Pi = {
|
|
1138
|
+
top: "flex-start",
|
|
1139
|
+
middle: "center",
|
|
1140
|
+
bottom: "flex-end"
|
|
1141
|
+
};
|
|
1142
|
+
function Fi(e, t) {
|
|
1143
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Ii(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1144
|
+
return {
|
|
1145
|
+
display: "flex",
|
|
1146
|
+
flexDirection: "column",
|
|
1147
|
+
justifyContent: Pi[e.verticalAlign],
|
|
1148
|
+
boxSizing: "border-box",
|
|
1149
|
+
...n
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
function Ii(e, t) {
|
|
1153
|
+
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1154
|
+
}
|
|
1155
|
+
function Li(e, t = {}) {
|
|
1156
|
+
if (e.type === "wrapper") return {};
|
|
1157
|
+
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1158
|
+
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1159
|
+
backgroundColor: r || "transparent"
|
|
1160
|
+
};
|
|
1161
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? dt.paragraphGap : dt.paragraphGap}px`), e.type === "section") {
|
|
1162
|
+
let n = Y(e.borderRadius);
|
|
1163
|
+
n !== null && (i.borderRadius = n);
|
|
1164
|
+
let r = it(e);
|
|
1165
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Fi(r, t.heroBoxWidth)), Object.assign(i, Mi({
|
|
1166
|
+
...e.backgroundImage,
|
|
1167
|
+
size: "cover",
|
|
1168
|
+
repeat: !1
|
|
1169
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, zi(e.border)), Object.assign(i, Mi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1170
|
+
}
|
|
1171
|
+
return i;
|
|
1172
|
+
}
|
|
1173
|
+
function Ri(e, t, n, r) {
|
|
1174
|
+
return e.type === "section" ? Li(e, {
|
|
1175
|
+
backgroundImageUrl: Sn(t, e.backgroundImage, n),
|
|
1176
|
+
heroBoxWidth: r
|
|
1177
|
+
}) : Li(e);
|
|
1178
|
+
}
|
|
1179
|
+
function zi(e) {
|
|
1180
|
+
let t = {};
|
|
1181
|
+
for (let [n, r] of Object.entries(xe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1182
|
+
return t;
|
|
1183
|
+
}
|
|
1184
|
+
var Bi = {
|
|
1185
|
+
width: "100cqw",
|
|
1186
|
+
maxWidth: "none",
|
|
1187
|
+
marginInline: "calc(50% - 50cqw)",
|
|
1188
|
+
boxSizing: "border-box"
|
|
1189
|
+
};
|
|
1190
|
+
function Vi(e) {
|
|
1191
|
+
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1192
|
+
}
|
|
1193
|
+
function Hi(e) {
|
|
1194
|
+
let t = {
|
|
1195
|
+
width: "var(--tpl-email-frame-width)",
|
|
1196
|
+
maxWidth: "100%",
|
|
1197
|
+
marginInline: "auto",
|
|
1198
|
+
boxSizing: "border-box"
|
|
1199
|
+
};
|
|
1200
|
+
return e && (t.padding = Vi(e)), t;
|
|
1201
|
+
}
|
|
1202
|
+
function Ui(e, t = {}) {
|
|
1203
|
+
if (e.type !== "section" || !e.wrapper) return null;
|
|
1204
|
+
let n = e.wrapper, r = {};
|
|
1205
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Vi(n.padding)), !n.fullWidth) {
|
|
1206
|
+
let e = Y(n.borderRadius);
|
|
1207
|
+
e !== null && (r.borderRadius = e);
|
|
1208
|
+
}
|
|
1209
|
+
return Object.assign(r, Mi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Bi), r;
|
|
1210
|
+
}
|
|
1211
|
+
function Wi(e, t = {}) {
|
|
1212
|
+
if (e.type !== "wrapper") return null;
|
|
1213
|
+
let n = {};
|
|
1214
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = Vi(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Mi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, Bi), n;
|
|
1215
|
+
}
|
|
1216
|
+
// src/utils/mergeTagLabelSegments.ts
|
|
1217
|
+
function Gi(e, t, n, r = !1) {
|
|
1218
|
+
if (!e) return [];
|
|
1219
|
+
let i = [], a = 0;
|
|
1220
|
+
for (let o of Ke(e, n)) {
|
|
1221
|
+
o.index > a && i.push({
|
|
1222
|
+
type: "text",
|
|
1223
|
+
value: e.slice(a, o.index)
|
|
1224
|
+
});
|
|
1225
|
+
let s = o.value;
|
|
1226
|
+
if (_e(s, n)) {
|
|
1227
|
+
let e = r ? Xe(s, t) : void 0;
|
|
1228
|
+
i.push(e === void 0 ? {
|
|
1229
|
+
type: "tag",
|
|
1230
|
+
value: Z(s, t)
|
|
1231
|
+
} : {
|
|
1232
|
+
type: "text",
|
|
1233
|
+
value: e
|
|
1234
|
+
});
|
|
1235
|
+
} else Ee(s, n) ? i.push({
|
|
1236
|
+
type: "tag",
|
|
1237
|
+
value: le(s, n)
|
|
1238
|
+
}) : i.push({
|
|
1239
|
+
type: "text",
|
|
1240
|
+
value: s
|
|
1241
|
+
});
|
|
1242
|
+
a = o.index + s.length;
|
|
1243
|
+
}
|
|
1244
|
+
return a < e.length && i.push({
|
|
1245
|
+
type: "text",
|
|
1246
|
+
value: e.slice(a)
|
|
1247
|
+
}), i;
|
|
1248
|
+
}
|
|
1249
|
+
// src/components/MergeTagPreviewText.vue
|
|
1250
|
+
var Ki = o({
|
|
1251
|
+
name: "MergeTagPreviewText",
|
|
1252
|
+
props: { text: {
|
|
1253
|
+
type: String,
|
|
1254
|
+
required: !0
|
|
1255
|
+
} },
|
|
1256
|
+
setup(e) {
|
|
1257
|
+
let t = g(Pt, zt), n = g(xt, ue.liquid), r = g(on, null), i = I(() => Gi(e.text, t.value, n, r?.value ?? !1));
|
|
1258
|
+
return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
|
|
1259
|
+
key: t,
|
|
1260
|
+
class: "tpl-merge-tag-label"
|
|
1261
|
+
}, e.value) : e.value);
|
|
1262
|
+
}
|
|
1263
|
+
}), qi = ["href"], Ji = /* @__PURE__ */ o({
|
|
1264
|
+
__name: "ButtonBlock",
|
|
1265
|
+
props: {
|
|
1266
|
+
block: {},
|
|
1267
|
+
viewport: {}
|
|
1268
|
+
},
|
|
1269
|
+
setup(e) {
|
|
1270
|
+
let t = e, n = fn(Kt, "ButtonBlock");
|
|
1271
|
+
function r(e) {
|
|
1272
|
+
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1273
|
+
}
|
|
1274
|
+
let i = I(() => {
|
|
1275
|
+
let e = {
|
|
1276
|
+
display: "inline-block",
|
|
1277
|
+
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
1278
|
+
backgroundColor: t.block.backgroundColor,
|
|
1279
|
+
color: t.block.textColor,
|
|
1280
|
+
fontSize: `${t.block.fontSize}px`,
|
|
1281
|
+
fontWeight: r(t.block.fontWeight),
|
|
1282
|
+
textDecoration: "none",
|
|
1283
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : Y(t.block.borderRadius) ?? "0px",
|
|
1284
|
+
textAlign: "center"
|
|
1285
|
+
};
|
|
1286
|
+
return Object.assign(e, zi(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1287
|
+
}), a = I(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1288
|
+
return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
|
|
1289
|
+
href: e.block.url || "#",
|
|
1290
|
+
style: L(i.value),
|
|
1291
|
+
class: "tpl:cursor-default",
|
|
1292
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1293
|
+
}, [U(Ki, { text: e.block.text }, null, 8, ["text"])], 12, qi)], 4));
|
|
1294
|
+
}
|
|
1295
|
+
}), Yi = ["innerHTML"], Xi = [
|
|
1296
|
+
"src",
|
|
1297
|
+
"width",
|
|
1298
|
+
"height"
|
|
1299
|
+
], Zi = /* @__PURE__ */ o({
|
|
1300
|
+
__name: "CustomBlockIcon",
|
|
1301
|
+
props: {
|
|
1302
|
+
icon: {},
|
|
1303
|
+
size: {}
|
|
1304
|
+
},
|
|
1305
|
+
setup(e) {
|
|
1306
|
+
let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ? Un(t.icon ?? "") : "");
|
|
1307
|
+
return (t, o) => r.value ? (c(), w("span", {
|
|
1308
|
+
key: 0,
|
|
1309
|
+
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
1310
|
+
style: L({
|
|
1311
|
+
width: `${n.value}px`,
|
|
1312
|
+
height: `${n.value}px`
|
|
1313
|
+
}),
|
|
1314
|
+
innerHTML: a.value
|
|
1315
|
+
}, null, 12, Yi)) : i.value ? (c(), w("img", {
|
|
1316
|
+
key: 1,
|
|
1317
|
+
src: e.icon,
|
|
1318
|
+
width: n.value,
|
|
1319
|
+
height: n.value,
|
|
1320
|
+
class: "tpl:inline-block",
|
|
1321
|
+
alt: ""
|
|
1322
|
+
}, null, 8, Xi)) : (c(), A(D(Zn), {
|
|
1323
|
+
key: 2,
|
|
1324
|
+
size: n.value,
|
|
1325
|
+
"stroke-width": 1.5
|
|
1326
|
+
}, null, 8, ["size"]));
|
|
1327
|
+
}
|
|
1328
|
+
}), Qi = { class: "tpl:w-full" }, $i = {
|
|
1329
|
+
key: 0,
|
|
1330
|
+
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1331
|
+
}, ea = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ta = {
|
|
1332
|
+
key: 1,
|
|
1333
|
+
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1334
|
+
}, na = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ra = {
|
|
1335
|
+
key: 2,
|
|
1336
|
+
class: "tpl:relative"
|
|
1337
|
+
}, ia = ["innerHTML"], aa = {
|
|
1338
|
+
key: 0,
|
|
1339
|
+
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1340
|
+
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1341
|
+
}, oa = /* @__PURE__ */ o({
|
|
1342
|
+
__name: "CustomBlock",
|
|
1343
|
+
props: {
|
|
1344
|
+
block: {},
|
|
1345
|
+
viewport: {}
|
|
1346
|
+
},
|
|
1347
|
+
emits: ["fetchData"],
|
|
1348
|
+
setup(e, { emit: t }) {
|
|
1349
|
+
let n = e, r = t, { t: i } = W(), a = g(nn, null), o = V(""), s = I(() => Wn(o.value)), l = V(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = Cn({
|
|
1350
|
+
definition: d,
|
|
1351
|
+
block: p,
|
|
1352
|
+
onUpdate: (e, t) => {
|
|
1353
|
+
r("fetchData", {
|
|
1354
|
+
fieldValues: e,
|
|
1355
|
+
dataSourceFetched: t
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
}), b = g(Pt, zt), x = g(on, null), S = I(() => {
|
|
1359
|
+
if (!x?.value) return n.block;
|
|
1360
|
+
let e = {};
|
|
1361
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ke(r, b.value) : r;
|
|
1362
|
+
return {
|
|
1363
|
+
...n.block,
|
|
1364
|
+
fieldValues: e
|
|
1365
|
+
};
|
|
1366
|
+
});
|
|
1367
|
+
async function C() {
|
|
1368
|
+
if (a) {
|
|
1369
|
+
l.value = !1;
|
|
1370
|
+
try {
|
|
1371
|
+
let e = await a.renderCustomBlock(S.value);
|
|
1372
|
+
e.includes("Template render error:") && (l.value = !0), o.value = e;
|
|
1373
|
+
} catch {
|
|
1374
|
+
l.value = !0, o.value = "";
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
let E = K(C, 150);
|
|
1379
|
+
return h(() => {
|
|
1380
|
+
C();
|
|
1381
|
+
}), u(() => n.block.fieldValues, () => {
|
|
1382
|
+
E();
|
|
1383
|
+
}, { deep: !0 }), u(() => x?.value, () => {
|
|
1384
|
+
E();
|
|
1385
|
+
}), (e, t) => (c(), w("div", Qi, [f.value ? l.value ? (c(), w("div", ta, [U(D(nr), {
|
|
1386
|
+
size: 24,
|
|
1387
|
+
class: "tpl:text-[var(--tpl-danger)]"
|
|
1388
|
+
}), N("span", na, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", ra, [N("div", { innerHTML: s.value }, null, 8, ia), D(y) && D(v) ? (c(), w("div", aa, [D(m) ? (c(), A(ur, {
|
|
1389
|
+
key: 1,
|
|
1390
|
+
class: "tpl:w-48"
|
|
1391
|
+
})) : (c(), w("button", {
|
|
1392
|
+
key: 0,
|
|
1393
|
+
type: "button",
|
|
1394
|
+
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1395
|
+
onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
|
|
1396
|
+
}, [d.value?.icon ? (c(), A(Zi, {
|
|
1397
|
+
key: 0,
|
|
1398
|
+
icon: d.value.icon,
|
|
1399
|
+
size: 16
|
|
1400
|
+
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", $i, [U(D(Qn), {
|
|
1401
|
+
size: 24,
|
|
1402
|
+
class: "tpl:text-[var(--tpl-warning)]"
|
|
1403
|
+
}), N("span", ea, P(D(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1404
|
+
}
|
|
1405
|
+
}), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */ o({
|
|
1406
|
+
__name: "DividerBlock",
|
|
1407
|
+
props: {
|
|
1408
|
+
block: {},
|
|
1409
|
+
viewport: {}
|
|
1410
|
+
},
|
|
1411
|
+
setup(e) {
|
|
1412
|
+
let t = e, n = I(() => ({
|
|
1413
|
+
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1414
|
+
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1415
|
+
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1416
|
+
}));
|
|
1417
|
+
return (e, t) => (c(), w("div", sa, [N("hr", {
|
|
1418
|
+
class: "tpl:m-0 tpl:border-none",
|
|
1419
|
+
style: L(n.value)
|
|
1420
|
+
}, null, 4)]));
|
|
1421
|
+
}
|
|
1422
|
+
}), la = { class: "tpl:w-full" }, ua = ["srcdoc", "title"], da = {
|
|
1423
|
+
key: 1,
|
|
1424
|
+
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1425
|
+
}, fa = {
|
|
1426
|
+
key: 0,
|
|
1427
|
+
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1428
|
+
}, pa = {
|
|
1429
|
+
key: 1,
|
|
1430
|
+
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1431
|
+
}, ma = /* @__PURE__ */ o({
|
|
1432
|
+
__name: "HtmlBlock",
|
|
1433
|
+
props: {
|
|
1434
|
+
block: {},
|
|
1435
|
+
viewport: {}
|
|
1436
|
+
},
|
|
1437
|
+
setup(e) {
|
|
1438
|
+
let t = e, { t: n } = W(), r = g(It, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(Pt, zt), s = g(on, null), l = I(() => s?.value ? ke(t.block.content, o.value) : t.block.content), d = V(null), f = V(60), p = null;
|
|
1439
|
+
function h() {
|
|
1440
|
+
let e = d.value?.contentDocument;
|
|
1441
|
+
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1442
|
+
}
|
|
1443
|
+
function _() {
|
|
1444
|
+
p?.disconnect(), p = null, h();
|
|
1445
|
+
let e = d.value?.contentDocument?.documentElement;
|
|
1446
|
+
e && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => h()), p.observe(e));
|
|
1447
|
+
}
|
|
1448
|
+
return u(a, (e) => {
|
|
1449
|
+
e || (p?.disconnect(), p = null);
|
|
1450
|
+
}), m(() => {
|
|
1451
|
+
p?.disconnect(), p = null;
|
|
1452
|
+
}), (e, t) => (c(), w("div", la, [a.value ? (c(), w("iframe", {
|
|
1453
|
+
key: 0,
|
|
1454
|
+
ref_key: "iframeRef",
|
|
1455
|
+
ref: d,
|
|
1456
|
+
srcdoc: l.value,
|
|
1457
|
+
sandbox: "allow-same-origin",
|
|
1458
|
+
title: D(n).html.preview,
|
|
1459
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1460
|
+
style: L({ height: `${f.value}px` }),
|
|
1461
|
+
onLoad: _
|
|
1462
|
+
}, null, 44, ua)) : (c(), w("div", da, [U(D(qn), {
|
|
1463
|
+
size: 24,
|
|
1464
|
+
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1465
|
+
}), i.value ? (c(), w("span", fa, P(D(n).html.preview), 1)) : (c(), w("span", pa, P(D(n).html.empty), 1))]))]));
|
|
1466
|
+
}
|
|
1467
|
+
}), ha = ["data-drop-enabled"], ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
|
|
1468
|
+
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1469
|
+
style: { opacity: "0.7" }
|
|
1470
|
+
}, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
1471
|
+
key: 4,
|
|
1472
|
+
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1473
|
+
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ o({
|
|
1474
|
+
__name: "ImageBlock",
|
|
1475
|
+
props: {
|
|
1476
|
+
block: {},
|
|
1477
|
+
viewport: {}
|
|
1478
|
+
},
|
|
1479
|
+
emits: ["update"],
|
|
1480
|
+
setup(e, { emit: t }) {
|
|
1481
|
+
let n = e, r = t, { t: i } = W(), { syntax: a } = G(), o = I(() => Ce(n.block.src, a));
|
|
1482
|
+
function s(e) {
|
|
1483
|
+
let t = {
|
|
1484
|
+
src: e.url,
|
|
1485
|
+
...jn(On(e.width, e.height))
|
|
1486
|
+
};
|
|
1487
|
+
e.alt && (t.alt = e.alt), r("update", t);
|
|
1488
|
+
}
|
|
1489
|
+
let l = V(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Fn({
|
|
1490
|
+
target: l,
|
|
1491
|
+
blocked: o,
|
|
1492
|
+
apply: s
|
|
1493
|
+
}), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
|
|
1494
|
+
let e = n.block.border, t = ["left", "right"].map((t) => lt(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1495
|
+
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1496
|
+
}), _ = I(() => {
|
|
1497
|
+
let e = n.block.align;
|
|
1498
|
+
return {
|
|
1499
|
+
maxWidth: "100%",
|
|
1500
|
+
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1501
|
+
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1502
|
+
borderRadius: Y(n.block.borderRadius) ?? void 0,
|
|
1503
|
+
...zi(n.block.border),
|
|
1504
|
+
display: "block",
|
|
1505
|
+
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1506
|
+
marginRight: e === "center" ? "auto" : void 0
|
|
1507
|
+
};
|
|
1508
|
+
}), v = Dn(() => o.value ? void 0 : n.block.src), y = Dn(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1509
|
+
return (t, n) => (c(), w("div", {
|
|
1510
|
+
ref_key: "dropZoneRef",
|
|
1511
|
+
ref: l,
|
|
1512
|
+
"data-testid": "image-drop-zone",
|
|
1513
|
+
"data-drop-enabled": D(d),
|
|
1514
|
+
class: "tpl:relative tpl:w-full",
|
|
1515
|
+
style: L(h.value)
|
|
1516
|
+
}, [D(p) ? (c(), A(An, {
|
|
1517
|
+
key: 0,
|
|
1518
|
+
uploading: D(f),
|
|
1519
|
+
size: "canvas"
|
|
1520
|
+
}, null, 8, ["uploading"])) : k("", !0), e.block.src && o.value && e.block.placeholderUrl ? (c(), w(H, { key: 1 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1521
|
+
key: 0,
|
|
1522
|
+
href: e.block.linkUrl,
|
|
1523
|
+
target: "_blank",
|
|
1524
|
+
rel: "noopener noreferrer",
|
|
1525
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1526
|
+
}, [N("img", {
|
|
1527
|
+
class: "tpl:border-0",
|
|
1528
|
+
loading: "lazy",
|
|
1529
|
+
src: D(y),
|
|
1530
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1531
|
+
style: L(_.value)
|
|
1532
|
+
}, null, 12, _a)], 8, ga)) : (c(), w("img", {
|
|
1533
|
+
key: 1,
|
|
1534
|
+
class: "tpl:border-0",
|
|
1535
|
+
src: D(y),
|
|
1536
|
+
alt: e.block.alt,
|
|
1537
|
+
style: L(_.value)
|
|
1538
|
+
}, null, 12, va))], 64)) : e.block.src && o.value ? (c(), w("div", {
|
|
1539
|
+
key: 2,
|
|
1540
|
+
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1541
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1542
|
+
}, [U(D(tr), {
|
|
1543
|
+
size: 32,
|
|
1544
|
+
"stroke-width": 1.5,
|
|
1545
|
+
class: "tpl:text-[var(--tpl-primary)]",
|
|
1546
|
+
style: { opacity: "0.5" }
|
|
1547
|
+
}), N("span", ya, [U(Ki, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(H, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1548
|
+
key: 0,
|
|
1549
|
+
href: e.block.linkUrl,
|
|
1550
|
+
target: "_blank",
|
|
1551
|
+
rel: "noopener noreferrer",
|
|
1552
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
1553
|
+
}, [N("img", {
|
|
1554
|
+
class: "tpl:border-0",
|
|
1555
|
+
loading: "lazy",
|
|
1556
|
+
src: D(v),
|
|
1557
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1558
|
+
style: L(_.value)
|
|
1559
|
+
}, null, 12, xa)], 8, ba)) : (c(), w("img", {
|
|
1560
|
+
key: 1,
|
|
1561
|
+
class: "tpl:border-0",
|
|
1562
|
+
src: D(v),
|
|
1563
|
+
alt: e.block.alt,
|
|
1564
|
+
style: L(_.value)
|
|
1565
|
+
}, null, 12, Sa))], 64)) : (c(), w("div", Ca, [D(u) ? (c(), w("button", {
|
|
1566
|
+
key: 0,
|
|
1567
|
+
"aria-label": D(i).image.browseMedia,
|
|
1568
|
+
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1569
|
+
onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
|
|
1570
|
+
}, [U(D(tr), {
|
|
1571
|
+
size: 14,
|
|
1572
|
+
"stroke-width": 1.5
|
|
1573
|
+
}), T(" " + P(D(i).image.browseMedia), 1)], 8, wa)) : (c(), w("span", Ta, P(D(i).image.clickToAdd), 1))]))], 12, ha));
|
|
1574
|
+
}
|
|
1575
|
+
}), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
|
|
1576
|
+
key: 1,
|
|
1577
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1578
|
+
}, Aa = /* @__PURE__ */ o({
|
|
1579
|
+
__name: "MenuBlock",
|
|
1580
|
+
props: {
|
|
1581
|
+
block: {},
|
|
1582
|
+
viewport: {}
|
|
1583
|
+
},
|
|
1584
|
+
setup(e) {
|
|
1585
|
+
let t = e, { t: n } = W(), r = fn(Kt, "MenuBlock"), i = I(() => ({
|
|
1586
|
+
display: "flex",
|
|
1587
|
+
flexWrap: "wrap",
|
|
1588
|
+
gap: `0 ${t.block.spacing}px`,
|
|
1589
|
+
justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
|
|
1590
|
+
fontSize: `${t.block.fontSize}px`,
|
|
1591
|
+
fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1592
|
+
alignItems: "center"
|
|
1593
|
+
})), a = I(() => t.block.items.length > 0);
|
|
1594
|
+
function o(e) {
|
|
1595
|
+
return e || t.block.linkColor || t.block.color;
|
|
1596
|
+
}
|
|
1597
|
+
return (t, r) => (c(), w("div", Da, [a.value ? (c(), w("div", {
|
|
1598
|
+
key: 0,
|
|
1599
|
+
style: L(i.value)
|
|
1600
|
+
}, [(c(!0), w(H, null, p(e.block.items, (t, n) => (c(), w(H, { key: t.id }, [N("a", {
|
|
1601
|
+
href: t.url || "#",
|
|
1602
|
+
class: "tpl:cursor-default tpl:no-underline",
|
|
1603
|
+
style: L({
|
|
1604
|
+
color: o(t.color),
|
|
1605
|
+
fontWeight: t.bold ? "bold" : "normal",
|
|
1606
|
+
textDecoration: t.underline ? "underline" : "none"
|
|
1607
|
+
}),
|
|
1608
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1609
|
+
}, [U(Ki, { text: t.text || "..." }, null, 8, ["text"])], 12, Oa), n < e.block.items.length - 1 ? (c(), w("span", {
|
|
1610
|
+
key: 0,
|
|
1611
|
+
style: L({
|
|
1612
|
+
color: e.block.separatorColor,
|
|
1613
|
+
padding: `0 ${e.block.spacing}px`
|
|
1614
|
+
})
|
|
1615
|
+
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", ka, [U(D(er), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
// src/composables/useEditableTextBlock.ts
|
|
1619
|
+
function ja(e) {
|
|
1620
|
+
let t = g(Pt, zt), r = g(on, null), { syntax: i } = G(), a = I(() => r?.value ? Be(e(), t.value) : Ie(e(), t.value)), o = I(() => Oe(Wn(oe(a.value, i)))), s = V(!1), c = V(null), { top: l, left: u } = n(c), { toLocal: d } = _t(), f = I(() => d({
|
|
1621
|
+
top: l.value - 8,
|
|
1622
|
+
left: u.value
|
|
1623
|
+
}));
|
|
1624
|
+
function p() {
|
|
1625
|
+
s.value = !0;
|
|
1626
|
+
}
|
|
1627
|
+
function m() {
|
|
1628
|
+
s.value = !1;
|
|
1629
|
+
}
|
|
1630
|
+
return {
|
|
1631
|
+
isEditing: s,
|
|
1632
|
+
blockRef: c,
|
|
1633
|
+
toolbarPosition: f,
|
|
1634
|
+
resolvedContent: o,
|
|
1635
|
+
handleDoubleClick: p,
|
|
1636
|
+
handleEditorDone: m
|
|
1637
|
+
};
|
|
1638
|
+
}
|
|
1639
|
+
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1640
|
+
var Ma = ["innerHTML"], Na = /* @__PURE__ */ o({
|
|
1641
|
+
__name: "ParagraphBlock",
|
|
1642
|
+
props: {
|
|
1643
|
+
block: {},
|
|
1644
|
+
viewport: {}
|
|
1645
|
+
},
|
|
1646
|
+
setup(e) {
|
|
1647
|
+
let t = e, n = b(() => import("./ParagraphEditor-Bx_Hlw8d.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = ja(() => t.block.content);
|
|
1648
|
+
return (t, u) => (c(), w("div", {
|
|
1649
|
+
ref_key: "blockRef",
|
|
1650
|
+
ref: i,
|
|
1651
|
+
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1652
|
+
onDblclick: u[0] ||= (...e) => D(s) && D(s)(...e)
|
|
1653
|
+
}, [D(r) ? (c(), A(D(n), {
|
|
1654
|
+
key: 0,
|
|
1655
|
+
block: e.block,
|
|
1656
|
+
"toolbar-position": D(a),
|
|
1657
|
+
onDone: D(l)
|
|
1658
|
+
}, null, 8, [
|
|
1659
|
+
"block",
|
|
1660
|
+
"toolbar-position",
|
|
1661
|
+
"onDone"
|
|
1662
|
+
])) : (c(), w("div", {
|
|
1663
|
+
key: 1,
|
|
1664
|
+
class: "tpl-text-content tpl:outline-none",
|
|
1665
|
+
innerHTML: D(o)
|
|
1666
|
+
}, null, 8, Ma))], 544));
|
|
1667
|
+
}
|
|
1668
|
+
});
|
|
1669
|
+
// src/utils/updateBlockList.ts
|
|
1670
|
+
function Pa(e, t, n, r = 0, i) {
|
|
1671
|
+
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1672
|
+
if (o.some((e) => !s.includes(e.id))) return;
|
|
1673
|
+
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
1674
|
+
if (c.length === 1) l = c[0], u = s.indexOf(l.id);
|
|
1675
|
+
else if (c.length === 0 && i) {
|
|
1676
|
+
let e = i.oldDraggableIndex ?? i.oldIndex, t = i.newDraggableIndex ?? i.newIndex;
|
|
1677
|
+
if (t === void 0 || !Number.isInteger(t) || t < 0 || t >= o.length || (l = i.data?.id ? o.find((e) => e.id === i.data.id) : e === void 0 ? void 0 : o[e], !l || o.indexOf(l) === t)) return;
|
|
1678
|
+
u = t;
|
|
1679
|
+
}
|
|
1680
|
+
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1681
|
+
}
|
|
1682
|
+
// src/utils/mergeTagTokens.ts
|
|
1683
|
+
function Fa(e, t, n) {
|
|
1684
|
+
let r = [], i = "\0MT";
|
|
1685
|
+
for (; e.includes(i);) i += "_";
|
|
1686
|
+
let a = n === "html" ? et(e, (e) => {
|
|
1687
|
+
let t = r.push(e) - 1;
|
|
1688
|
+
return `${i}${t}\u0000`;
|
|
1689
|
+
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1690
|
+
start: e.index,
|
|
1691
|
+
end: e.index + e[0].length
|
|
1692
|
+
})), s = [], c = Qe(a, t, "logic"), l = [], u = 0;
|
|
1693
|
+
for (let e of ["logic", "value"]) {
|
|
1694
|
+
let r = 0;
|
|
1695
|
+
for (let i of e === "logic" ? c : Qe(a, t, "value")) {
|
|
1696
|
+
let t = i.index, a = t + i.value.length;
|
|
1697
|
+
for (; o[r]?.end <= t;) r++;
|
|
1698
|
+
let c = o[r];
|
|
1699
|
+
if (!(c && t < c.end && a > c.start)) {
|
|
1700
|
+
if (e === "value") {
|
|
1701
|
+
for (; l[u]?.end <= t;) u++;
|
|
1702
|
+
let e = l[u];
|
|
1703
|
+
if (e && t < e.end && a > e.start) continue;
|
|
1704
|
+
}
|
|
1705
|
+
e === "logic" && l.push({
|
|
1706
|
+
start: t,
|
|
1707
|
+
end: a
|
|
1708
|
+
}), s.push({
|
|
1709
|
+
start: t,
|
|
1710
|
+
end: a,
|
|
1711
|
+
value: n === "html" ? Ne(i.value) : i.value
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
return [...r, ...s.map((e) => e.value)].sort();
|
|
1717
|
+
}
|
|
1718
|
+
function Ia(e, t, n, r) {
|
|
1719
|
+
return JSON.stringify(Fa(e, n, r)) !== JSON.stringify(Fa(t, n, r));
|
|
1720
|
+
}
|
|
1721
|
+
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1722
|
+
var La = [
|
|
1723
|
+
"data-state",
|
|
1724
|
+
"aria-label",
|
|
1725
|
+
"title",
|
|
1726
|
+
"aria-expanded",
|
|
1727
|
+
"aria-controls",
|
|
1728
|
+
"onKeydown"
|
|
1729
|
+
], Ra = [
|
|
1730
|
+
"aria-label",
|
|
1731
|
+
"aria-labelledby",
|
|
1732
|
+
"aria-describedby",
|
|
1733
|
+
"onKeydown"
|
|
1734
|
+
], za = ["id"], Ba = ["id"], Va = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, Ha = ["disabled"], Ua = {
|
|
1735
|
+
key: 0,
|
|
1736
|
+
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1737
|
+
}, Wa = {
|
|
1738
|
+
key: 1,
|
|
1739
|
+
class: "tpl:m-0"
|
|
1740
|
+
}, Ga = { class: "tpl:m-0" }, Ka = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, qa = {
|
|
1741
|
+
key: 3,
|
|
1742
|
+
class: "tpl:m-0"
|
|
1743
|
+
}, Ja = {
|
|
1744
|
+
key: 4,
|
|
1745
|
+
class: "tpl:m-0"
|
|
1746
|
+
}, Ya = {
|
|
1747
|
+
key: 5,
|
|
1748
|
+
class: "tpl:m-0"
|
|
1749
|
+
}, Xa = {
|
|
1750
|
+
key: 6,
|
|
1751
|
+
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1752
|
+
}, Za = ["onClick"], Qa = {
|
|
1753
|
+
key: 7,
|
|
1754
|
+
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1755
|
+
}, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
1756
|
+
__name: "LocaleStatusChip",
|
|
1757
|
+
props: {
|
|
1758
|
+
blockId: {},
|
|
1759
|
+
state: {},
|
|
1760
|
+
count: {},
|
|
1761
|
+
popoverState: {},
|
|
1762
|
+
popoverCount: {},
|
|
1763
|
+
stale: {},
|
|
1764
|
+
tagsDiffer: {},
|
|
1765
|
+
setPaths: {},
|
|
1766
|
+
staleLocales: {},
|
|
1767
|
+
excerpt: {},
|
|
1768
|
+
eligibleGaps: { type: Boolean },
|
|
1769
|
+
translationCount: {},
|
|
1770
|
+
replacesCurrent: { type: Boolean },
|
|
1771
|
+
editable: { type: Boolean }
|
|
1772
|
+
},
|
|
1773
|
+
emits: ["target"],
|
|
1774
|
+
setup(e, { emit: t }) {
|
|
1775
|
+
let n = e, r = t, i = g(hn, null), o = g(un, null), s = g(Ct, null), l = g($t, "en") ?? "en", { t: d, format: f } = W(), m = ne(), h = ht(), { toLocal: v } = _t(), y = V(null), b = V(null), x = V(!1), S = V(!1), C = V(null), T = V(null), F = null, R = V({
|
|
1776
|
+
top: 0,
|
|
1777
|
+
left: 0
|
|
1778
|
+
}), z = V({
|
|
1779
|
+
maxHeight: 0,
|
|
1780
|
+
maxWidth: 0
|
|
1781
|
+
}), B = `tpl-locale-popover-${de()}`, te = I(() => dr(i?.activeLocale?.value ?? "")), U = I(() => dr(i?.content.value.settings.locale ?? "en"));
|
|
1782
|
+
function G(e, t) {
|
|
1783
|
+
switch (e) {
|
|
1784
|
+
case "tags-differ": return d.localization.tagsDiffer;
|
|
1785
|
+
case "hidden": return f(d.localization.hidden, { language: te.value });
|
|
1786
|
+
case "changed": return f(d.localization.changed, { language: te.value });
|
|
1787
|
+
case "default-stale": return fr(d.localization.staleLanguages, t, l);
|
|
1788
|
+
case "missing": return t === 1 ? d.localization.notTranslated : fr(d.localization.notTranslatedCount, t, l);
|
|
1789
|
+
default: return t === 1 ? d.localization.outOfDate : fr(d.localization.staleCount, t, l);
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
let re = I(() => G(n.state, n.count)), K = I(() => n.popoverState ?? n.state), ie = I(() => n.popoverCount ?? n.count), ae = I(() => G(K.value, ie.value)), oe = I(() => n.state === "hidden" ? Yn : n.state === "changed" ? Kn : n.state === "default-stale" ? ar : n.state === "stale" ? Jn : nr), se = I(() => K.value === "default-stale" || (K.value === "missing" || K.value === "stale") && ie.value > 1), q = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
|
|
1793
|
+
function J(e = !1) {
|
|
1794
|
+
x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1795
|
+
}
|
|
1796
|
+
async function Y() {
|
|
1797
|
+
if (x.value) return J();
|
|
1798
|
+
h.value && (x.value = !0, await X());
|
|
1799
|
+
}
|
|
1800
|
+
async function X() {
|
|
1801
|
+
let e = h.value;
|
|
1802
|
+
if (!e || !x.value) return;
|
|
1803
|
+
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
1804
|
+
z.value = {
|
|
1805
|
+
maxHeight: u - c,
|
|
1806
|
+
maxWidth: d - l
|
|
1807
|
+
};
|
|
1808
|
+
let f = y.value.getBoundingClientRect();
|
|
1809
|
+
if (F = f, R.value = v({
|
|
1810
|
+
top: c,
|
|
1811
|
+
left: l
|
|
1812
|
+
}), await j(), !x.value || !b.value) return;
|
|
1813
|
+
let p = b.value.getBoundingClientRect(), m = Math.min(p.height, z.value.maxHeight), g = Math.min(p.width, z.value.maxWidth), _ = f.bottom + 4, C = _ + m <= u ? _ : f.top - m - 4;
|
|
1814
|
+
R.value = v({
|
|
1815
|
+
top: Math.max(c, Math.min(C, u - m)),
|
|
1816
|
+
left: Math.max(l, Math.min(f.left, d - g))
|
|
1817
|
+
}), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
|
|
1818
|
+
}
|
|
1819
|
+
u(S, async () => {
|
|
1820
|
+
x.value && (await X(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
|
|
1821
|
+
});
|
|
1822
|
+
function ce(e) {
|
|
1823
|
+
let t = e.composedPath();
|
|
1824
|
+
!t.includes(y.value) && !t.includes(b.value) && J();
|
|
1825
|
+
}
|
|
1826
|
+
function le(e) {
|
|
1827
|
+
if (e.composedPath().includes(b.value)) return;
|
|
1828
|
+
let t = y.value?.getBoundingClientRect();
|
|
1829
|
+
t && F && t.top === F.top && t.right === F.right || J();
|
|
1830
|
+
}
|
|
1831
|
+
function ue() {
|
|
1832
|
+
m.removeEventListener("click", ce, !0), m.removeEventListener("scroll", le, !0);
|
|
1833
|
+
}
|
|
1834
|
+
u(x, (e) => {
|
|
1835
|
+
ue(), e ? (m.addEventListener("click", ce, !0), m.addEventListener("scroll", le, !0)) : r("target", null);
|
|
1836
|
+
}, { flush: "sync" }), u(K, () => {
|
|
1837
|
+
S.value = !1, x.value && X();
|
|
1838
|
+
}), u([
|
|
1839
|
+
() => n.blockId,
|
|
1840
|
+
() => n.state,
|
|
1841
|
+
() => i?.activeLocale?.value,
|
|
1842
|
+
() => i?.state.template?.id,
|
|
1843
|
+
() => i?.loadVersion?.value
|
|
1844
|
+
], () => J()), _(ue);
|
|
1845
|
+
let Z = (e) => {
|
|
1846
|
+
(x.value || h.value) && (r("target", e ?? null), x.value || Y());
|
|
1847
|
+
};
|
|
1848
|
+
u(() => n.blockId, (e, t) => {
|
|
1849
|
+
t && s?.get(t) === Z && s.delete(t), s?.set(e, Z);
|
|
1850
|
+
}, { immediate: !0 }), _(() => {
|
|
1851
|
+
s?.get(n.blockId) === Z && s.delete(n.blockId);
|
|
1852
|
+
});
|
|
1853
|
+
function fe() {
|
|
1854
|
+
i?.keepTranslations?.(n.blockId, n.stale), J(!0);
|
|
1855
|
+
}
|
|
1856
|
+
function pe(e) {
|
|
1857
|
+
i?.resetLocaleFields?.(n.blockId, e), J(!0);
|
|
1858
|
+
}
|
|
1859
|
+
function me() {
|
|
1860
|
+
i?.setBlockHidden?.(n.blockId, !1), J(!0);
|
|
1861
|
+
}
|
|
1862
|
+
function Q(e) {
|
|
1863
|
+
i?.setActiveLocale?.(e), J();
|
|
1864
|
+
}
|
|
1865
|
+
function he() {
|
|
1866
|
+
q.value && !o?.running.value && (K.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
|
|
1867
|
+
only: K.value === "tags-differ" ? "all" : "gaps",
|
|
1868
|
+
blockId: n.blockId
|
|
1869
|
+
}));
|
|
1870
|
+
}
|
|
1871
|
+
function ge() {
|
|
1872
|
+
S.value = !1;
|
|
1873
|
+
}
|
|
1874
|
+
function _e() {
|
|
1875
|
+
S.value ? ge() : J(!0);
|
|
1876
|
+
}
|
|
1877
|
+
function ve() {
|
|
1878
|
+
q.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
|
|
1879
|
+
only: "all",
|
|
1880
|
+
blockId: n.blockId
|
|
1881
|
+
}));
|
|
1882
|
+
}
|
|
1883
|
+
return (t, n) => (c(), w(H, null, [N("button", {
|
|
1884
|
+
ref_key: "trigger",
|
|
1885
|
+
ref: y,
|
|
1886
|
+
type: "button",
|
|
1887
|
+
"data-testid": "locale-chip",
|
|
1888
|
+
"data-state": e.state,
|
|
1889
|
+
"aria-label": re.value,
|
|
1890
|
+
title: re.value,
|
|
1891
|
+
"aria-expanded": x.value,
|
|
1892
|
+
"aria-controls": x.value ? B : void 0,
|
|
1893
|
+
"aria-haspopup": "dialog",
|
|
1894
|
+
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
1895
|
+
onClick: M(Y, ["stop"]),
|
|
1896
|
+
onKeydown: [E(M(Y, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
|
|
1897
|
+
}, [(c(), A(a(oe.value), {
|
|
1898
|
+
size: 12,
|
|
1899
|
+
"stroke-width": 2,
|
|
1900
|
+
"aria-hidden": "true"
|
|
1901
|
+
}))], 40, La), D(h) && x.value ? (c(), A(ee, {
|
|
1902
|
+
key: 0,
|
|
1903
|
+
to: D(h)
|
|
1904
|
+
}, [N("div", {
|
|
1905
|
+
id: B,
|
|
1906
|
+
ref_key: "popover",
|
|
1907
|
+
ref: b,
|
|
1908
|
+
role: "dialog",
|
|
1909
|
+
"aria-label": S.value ? void 0 : ae.value,
|
|
1910
|
+
"aria-labelledby": S.value ? `${B}-question` : void 0,
|
|
1911
|
+
"aria-describedby": S.value ? `${B}-warning` : void 0,
|
|
1912
|
+
tabindex: "-1",
|
|
1913
|
+
"data-testid": "locale-popover",
|
|
1914
|
+
class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
|
|
1915
|
+
style: L({
|
|
1916
|
+
top: `${R.value.top}px`,
|
|
1917
|
+
left: `${R.value.left}px`,
|
|
1918
|
+
maxHeight: `${z.value.maxHeight}px`,
|
|
1919
|
+
maxWidth: `${z.value.maxWidth}px`
|
|
1920
|
+
}),
|
|
1921
|
+
onClick: n[2] ||= M(() => {}, ["stop"]),
|
|
1922
|
+
onKeydown: E(M(_e, ["stop", "prevent"]), ["esc"])
|
|
1923
|
+
}, [S.value ? (c(), w(H, { key: 0 }, [
|
|
1924
|
+
N("h3", {
|
|
1925
|
+
id: `${B}-question`,
|
|
1926
|
+
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1927
|
+
}, P(D(fr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, za),
|
|
1928
|
+
N("p", {
|
|
1929
|
+
id: `${B}-warning`,
|
|
1930
|
+
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1931
|
+
}, P(D(f)(D(d).localization.translationDescription, { language: te.value })), 9, Ba),
|
|
1932
|
+
N("div", Va, [N("button", {
|
|
1933
|
+
ref_key: "confirmationCancel",
|
|
1934
|
+
ref: T,
|
|
1935
|
+
type: "button",
|
|
1936
|
+
"data-testid": "translation-confirm-cancel",
|
|
1937
|
+
class: O(D(mr)),
|
|
1938
|
+
onClick: ge
|
|
1939
|
+
}, P(D(d).localization.cancel), 3), N("button", {
|
|
1940
|
+
type: "button",
|
|
1941
|
+
"data-testid": "translation-confirm",
|
|
1942
|
+
class: O(D(hr)),
|
|
1943
|
+
disabled: !q.value || !!D(o)?.running.value || !e.translationCount,
|
|
1944
|
+
onClick: ve
|
|
1945
|
+
}, P(D(fr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Ha)])
|
|
1946
|
+
], 64)) : (c(), w(H, { key: 1 }, [
|
|
1947
|
+
se.value ? (c(), w("p", Ua, P(ae.value), 1)) : k("", !0),
|
|
1948
|
+
K.value === "missing" ? (c(), w("p", Wa, P(D(f)(D(d).localization.missingExplanation, { default: U.value })), 1)) : K.value === "stale" ? (c(), w(H, { key: 2 }, [N("p", Ga, P(D(f)(D(d).localization.staleExplanation, { default: U.value })), 1), N("p", Ka, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : K.value === "tags-differ" ? (c(), w("p", qa, P(D(f)(D(d).localization.tagsDifferExplanation, { default: U.value })), 1)) : K.value === "changed" ? (c(), w("p", Ja, P(D(fr)(D(d).localization.changedProperties, ie.value, D(l), { default: U.value })), 1)) : K.value === "hidden" ? (c(), w("p", Ya, P(D(f)(D(d).localization.hiddenExplanation, { language: te.value })), 1)) : (c(), w("ul", Xa, [(c(!0), w(H, null, p(e.staleLocales, (e) => (c(), w("li", {
|
|
1949
|
+
key: e,
|
|
1950
|
+
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1951
|
+
}, [N("span", null, P(D(dr)(e)), 1), N("button", {
|
|
1952
|
+
type: "button",
|
|
1953
|
+
class: O(D(pr)),
|
|
1954
|
+
onClick: (t) => Q(e)
|
|
1955
|
+
}, P(D(d).localization.open), 11, Za)]))), 128))])),
|
|
1956
|
+
e.editable && K.value !== "default-stale" ? (c(), w("div", Qa, [
|
|
1957
|
+
q.value && (K.value === "missing" || K.value === "stale" || K.value === "tags-differ") ? (c(), w("button", {
|
|
1958
|
+
key: 0,
|
|
1959
|
+
type: "button",
|
|
1960
|
+
ref_key: "retranslate",
|
|
1961
|
+
ref: C,
|
|
1962
|
+
"data-testid": K.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1963
|
+
class: O(D(mr)),
|
|
1964
|
+
disabled: !!D(o)?.running.value,
|
|
1965
|
+
onClick: he
|
|
1966
|
+
}, P(K.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, $a)) : k("", !0),
|
|
1967
|
+
K.value === "stale" || K.value === "tags-differ" ? (c(), w(H, { key: 1 }, [K.value === "stale" ? (c(), w("button", {
|
|
1968
|
+
key: 0,
|
|
1969
|
+
type: "button",
|
|
1970
|
+
"data-testid": "locale-keep",
|
|
1971
|
+
class: O(D(q.value ? pr : mr)),
|
|
1972
|
+
onClick: fe
|
|
1973
|
+
}, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
|
|
1974
|
+
type: "button",
|
|
1975
|
+
"data-testid": "locale-use-default",
|
|
1976
|
+
class: O(D(K.value === "tags-differ" && !q.value ? mr : pr)),
|
|
1977
|
+
onClick: n[0] ||= (t) => pe(K.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
1978
|
+
}, P(D(f)(D(d).localization.useDefaultLanguage, { default: U.value })), 3)], 64)) : k("", !0),
|
|
1979
|
+
K.value === "changed" ? (c(), w("button", {
|
|
1980
|
+
key: 2,
|
|
1981
|
+
type: "button",
|
|
1982
|
+
"data-testid": "locale-reset",
|
|
1983
|
+
class: O(D(mr)),
|
|
1984
|
+
onClick: n[1] ||= (t) => pe(e.setPaths)
|
|
1985
|
+
}, P(D(d).localization.resetChanges), 3)) : k("", !0),
|
|
1986
|
+
K.value === "hidden" ? (c(), w("button", {
|
|
1987
|
+
key: 3,
|
|
1988
|
+
type: "button",
|
|
1989
|
+
"data-testid": "locale-show",
|
|
1990
|
+
class: O(D(mr)),
|
|
1991
|
+
onClick: me
|
|
1992
|
+
}, P(D(d).localization.show), 3)) : k("", !0)
|
|
1993
|
+
])) : k("", !0)
|
|
1994
|
+
], 64))], 44, Ra)], 8, ["to"])) : k("", !0)], 64));
|
|
1995
|
+
}
|
|
1996
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */ o({
|
|
1997
|
+
__name: "LocaleMarkers",
|
|
1998
|
+
props: { block: {} },
|
|
1999
|
+
setup(e) {
|
|
2000
|
+
let t = e, n = g(hn, null), r = g(Nt, void 0), i = g(Zt, []), a = g(xt, ue.liquid), o = g(Qt, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
|
|
2001
|
+
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2002
|
+
...t.block,
|
|
2003
|
+
children: []
|
|
2004
|
+
} : t.block],
|
|
2005
|
+
settings: {
|
|
2006
|
+
locale: n.content.value.settings.locale,
|
|
2007
|
+
locales: n.content.value.settings.locales
|
|
2008
|
+
}
|
|
2009
|
+
})), f = I(() => n && s.value && !o.value.has(s.value) ? fe(d.value, s.value, i) : {
|
|
2010
|
+
missing: [],
|
|
2011
|
+
stale: [],
|
|
2012
|
+
translated: []
|
|
2013
|
+
}), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
|
|
2014
|
+
let n = e.slice(t.block.id.length + 1), r = De(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || ye[t.block.type]?.includes(n) ? "html" : "text";
|
|
2015
|
+
return typeof r == "string" && i !== void 0 && Ia(r, i, a, o) ? [n] : [];
|
|
2016
|
+
})), h = V(null), _ = I(() => n && s.value && !o.value.has(s.value) ? q(d.value, s.value, {
|
|
2017
|
+
syntax: a,
|
|
2018
|
+
definitions: i,
|
|
2019
|
+
doNotTranslate: r?.doNotTranslate,
|
|
2020
|
+
blockId: t.block.id,
|
|
2021
|
+
only: w.value === "tags-differ" ? "all" : "gaps"
|
|
2022
|
+
}).strings : []), v = I(() => _.value.some(({ id: e }) => {
|
|
2023
|
+
let n = e.slice(t.block.id.length + 1);
|
|
2024
|
+
return f.value.translated.includes(e) && !m.value.includes(n);
|
|
2025
|
+
})), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2026
|
+
let n = e.split("."), r = n.pop(), i = n.length ? De(t.block, n.join(".")) : t.block;
|
|
2027
|
+
return Array.isArray(i) ? De(i, r) !== void 0 : i !== void 0;
|
|
2028
|
+
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && fe(d.value, e, i).stale.length > 0) : []), x = I(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
|
|
2029
|
+
function S(e) {
|
|
2030
|
+
return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? b.value.length : y.value.length;
|
|
2031
|
+
}
|
|
2032
|
+
let C = I(() => S(x.value)), w = I(() => h.value && S(h.value) > 0 ? h.value : x.value), T = I(() => S(w.value));
|
|
2033
|
+
u([x, () => w.value !== (h.value ?? x.value)], () => {
|
|
2034
|
+
h.value = null;
|
|
2035
|
+
});
|
|
2036
|
+
let E = I(() => {
|
|
2037
|
+
let e = De(t.block, p.value[0] ?? "");
|
|
2038
|
+
if (typeof e != "string") return "";
|
|
2039
|
+
let n = e.split(/<[^>]*>/).join("");
|
|
2040
|
+
return Array.from(n).slice(0, 60).join("");
|
|
2041
|
+
});
|
|
2042
|
+
return (t, n) => D(r) && x.value ? (c(), A(eo, {
|
|
2043
|
+
key: 0,
|
|
2044
|
+
"block-id": e.block.id,
|
|
2045
|
+
state: x.value,
|
|
2046
|
+
count: C.value,
|
|
2047
|
+
"popover-state": w.value ?? void 0,
|
|
2048
|
+
"popover-count": T.value,
|
|
2049
|
+
stale: p.value,
|
|
2050
|
+
"tags-differ": m.value,
|
|
2051
|
+
"set-paths": y.value,
|
|
2052
|
+
"stale-locales": b.value,
|
|
2053
|
+
excerpt: E.value,
|
|
2054
|
+
"eligible-gaps": _.value.length > 0,
|
|
2055
|
+
"translation-count": _.value.length,
|
|
2056
|
+
"replaces-current": v.value,
|
|
2057
|
+
editable: !!s.value && D(r).locales.includes(s.value),
|
|
2058
|
+
onTarget: n[0] ||= (e) => h.value = e
|
|
2059
|
+
}, null, 8, [
|
|
2060
|
+
"block-id",
|
|
2061
|
+
"state",
|
|
2062
|
+
"count",
|
|
2063
|
+
"popover-state",
|
|
2064
|
+
"popover-count",
|
|
2065
|
+
"stale",
|
|
2066
|
+
"tags-differ",
|
|
2067
|
+
"set-paths",
|
|
2068
|
+
"stale-locales",
|
|
2069
|
+
"excerpt",
|
|
2070
|
+
"eligible-gaps",
|
|
2071
|
+
"translation-count",
|
|
2072
|
+
"replaces-current",
|
|
2073
|
+
"editable"
|
|
2074
|
+
])) : k("", !0);
|
|
2075
|
+
}
|
|
2076
|
+
}), no = [
|
|
2077
|
+
"data-block-id",
|
|
2078
|
+
"data-block-type",
|
|
2079
|
+
"data-tpl-picked"
|
|
2080
|
+
], ro = ["aria-label"], io = ["data-lock-holder"], ao = ["aria-label"], oo = [
|
|
2081
|
+
"aria-label",
|
|
2082
|
+
"aria-pressed",
|
|
2083
|
+
"title"
|
|
2084
|
+
], so = ["aria-label", "title"], co = ["aria-label", "title"], lo = ["aria-label", "title"], uo = {
|
|
2085
|
+
key: 3,
|
|
2086
|
+
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2087
|
+
}, fo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, po = {
|
|
2088
|
+
key: 4,
|
|
2089
|
+
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2090
|
+
}, mo = ["aria-label", "title"], ho = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
2091
|
+
__name: "BlockWrapper",
|
|
2092
|
+
props: {
|
|
2093
|
+
block: {},
|
|
2094
|
+
displayBlock: {},
|
|
2095
|
+
isSelected: { type: Boolean },
|
|
2096
|
+
viewport: {},
|
|
2097
|
+
previewMode: { type: Boolean },
|
|
2098
|
+
nested: { type: Boolean },
|
|
2099
|
+
picked: { type: Boolean }
|
|
2100
|
+
},
|
|
2101
|
+
emits: ["select"],
|
|
2102
|
+
setup(t, { emit: n }) {
|
|
2103
|
+
let i = b(() => import("./BlockIssueBadge-DncZ-HDf.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = W(), f = g(gn, null), p = V(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
|
|
2104
|
+
async function _() {
|
|
2105
|
+
await j(), p.value?.focus();
|
|
2106
|
+
}
|
|
2107
|
+
function v(e) {
|
|
2108
|
+
f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
|
|
2109
|
+
}
|
|
2110
|
+
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(Z?.activeLocale?.value && a.block.l10n?.[Z.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
|
|
2111
|
+
desktop: l.viewport.desktop,
|
|
2112
|
+
mobile: l.viewport.mobile
|
|
2113
|
+
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(dn, null), z = g(rn, null), B = g(Jt, {}), te = I(() => B.savedBlocks?.isPicking.value === !0), H = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), ne = I(() => a.isSelected && !te.value), G = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), re = V(null), K = V(null), ie = V(null), ae = V(null), oe = V({
|
|
2114
|
+
left: "calc(100% + 8px)",
|
|
2115
|
+
top: "50%"
|
|
2116
|
+
}), se = V(!1), q = I(() => K.value ?? ae.value), J = I(() => q.value?.closest(".tpl-body"));
|
|
2117
|
+
function Y() {
|
|
2118
|
+
let e = se.value, t = K.value, n = ae.value, r = re.value;
|
|
2119
|
+
if (!t && !n || !r?.offsetWidth) return;
|
|
2120
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = J.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2121
|
+
if (n?.offsetWidth) {
|
|
2122
|
+
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2123
|
+
if (e === i) {
|
|
2124
|
+
se.value = !i, j(Y);
|
|
2125
|
+
return;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
if (!t?.offsetWidth) return;
|
|
2129
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = ie.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2130
|
+
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2131
|
+
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2132
|
+
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
2133
|
+
}
|
|
2134
|
+
if (u < r.offsetWidth && m === "50%") {
|
|
2135
|
+
let e = d?.getBoundingClientRect();
|
|
2136
|
+
if (e?.width) {
|
|
2137
|
+
let n = l ? (e.right - i.left) / a + 8 : (e.left - i.left) / a - t.offsetWidth - 8;
|
|
2138
|
+
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
(oe.value.left !== `${u}px` || oe.value.top !== m) && (oe.value = {
|
|
2142
|
+
left: `${u}px`,
|
|
2143
|
+
top: m
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
x(Y), r(I(() => q.value ? [
|
|
2147
|
+
re.value,
|
|
2148
|
+
K.value,
|
|
2149
|
+
ie.value,
|
|
2150
|
+
ae.value,
|
|
2151
|
+
J.value
|
|
2152
|
+
].filter((e) => !!e) : []), Y), e(J, "scroll", Y, { passive: !0 });
|
|
2153
|
+
let X = I(() => B.collaboration?.lockOf(a.block.id) ?? null), ce = I(() => X.value?.holder.type === "guest" ? l.collaboration.guest : X.value?.holder.name ?? ""), le = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ue = Ln(() => o.value.type === "section" ? o.value.backgroundImage : void 0), de = Ln(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), Z = g(hn, null), fe = Z ? vt(Z) : null, pe = g(tn, null) ?? fe?.content ?? null;
|
|
2154
|
+
u([() => Z?.activeLocale?.value, () => fe && Fe(fe.settings.value)], Y, { flush: "post" });
|
|
2155
|
+
let me = g(Lt, void 0), Q = I(() => Li(o.value, {
|
|
2156
|
+
backgroundImageUrl: ue.value,
|
|
2157
|
+
heroBoxWidth: kn(o.value) ? Nn(o.value, pe?.value, me) : void 0
|
|
2158
|
+
})), he = I(() => Ui(o.value, { backgroundImageUrl: de.value })), ge = I(() => {
|
|
2159
|
+
let e = o.value;
|
|
2160
|
+
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2161
|
+
}), _e = I(() => Hi(ge.value?.wrapper?.padding));
|
|
2162
|
+
function ve(e) {
|
|
2163
|
+
a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2164
|
+
}
|
|
2165
|
+
function ye() {
|
|
2166
|
+
R?.deleteBlock(a.block.id);
|
|
2167
|
+
}
|
|
2168
|
+
function be() {
|
|
2169
|
+
R?.duplicateBlock(a.block);
|
|
2170
|
+
}
|
|
2171
|
+
function xe() {
|
|
2172
|
+
B.savedBlocks?.startPicking(a.block.id);
|
|
2173
|
+
}
|
|
2174
|
+
function Se() {
|
|
2175
|
+
z?.toggleBlock(a.block.id);
|
|
2176
|
+
}
|
|
2177
|
+
return (e, n) => E.value ? k("", !0) : (c(), w("div", {
|
|
2178
|
+
key: 0,
|
|
2179
|
+
ref_key: "blockElement",
|
|
2180
|
+
ref: re,
|
|
2181
|
+
class: O(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2182
|
+
"tpl-block--selected": t.isSelected,
|
|
2183
|
+
"tpl-block--locale-hidden": C.value,
|
|
2184
|
+
"tpl-block--picked": t.picked,
|
|
2185
|
+
"tpl-block--idle": !t.isSelected && !t.picked,
|
|
2186
|
+
"tpl-block--lifted": m.value
|
|
2187
|
+
}]),
|
|
2188
|
+
"data-block-id": t.block.id,
|
|
2189
|
+
"data-block-type": t.block.type,
|
|
2190
|
+
"data-tpl-picked": t.picked || void 0,
|
|
2191
|
+
onClick: ve
|
|
2192
|
+
}, [
|
|
2193
|
+
N("div", {
|
|
2194
|
+
ref_key: "badgesElement",
|
|
2195
|
+
ref: ie,
|
|
2196
|
+
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2197
|
+
}, [
|
|
2198
|
+
G.value > 0 && !S.value ? (c(), w("button", {
|
|
2199
|
+
key: 0,
|
|
2200
|
+
ref_key: "commentElement",
|
|
2201
|
+
ref: ae,
|
|
2202
|
+
class: O(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", se.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2203
|
+
"aria-label": D(d)(D(l).blockActions.comments, { count: String(G.value) }),
|
|
2204
|
+
onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
|
|
2205
|
+
}, [U(D(or), {
|
|
2206
|
+
size: 12,
|
|
2207
|
+
"stroke-width": 2.5
|
|
2208
|
+
}), T(" " + P(G.value), 1)], 10, ro)) : k("", !0),
|
|
2209
|
+
U(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2210
|
+
t.previewMode ? k("", !0) : (c(), A(to, {
|
|
2211
|
+
key: 1,
|
|
2212
|
+
block: t.block
|
|
2213
|
+
}, null, 8, ["block"]))
|
|
2214
|
+
], 512),
|
|
2215
|
+
X.value ? (c(), w("div", {
|
|
2216
|
+
key: 0,
|
|
2217
|
+
"data-testid": "block-lock",
|
|
2218
|
+
"data-lock-holder": X.value.holder.sessionId,
|
|
2219
|
+
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2220
|
+
style: L({
|
|
2221
|
+
outline: `2px solid ${X.value.holder.color}`,
|
|
2222
|
+
outlineOffset: "-1px"
|
|
2223
|
+
})
|
|
2224
|
+
}, [N("span", {
|
|
2225
|
+
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2226
|
+
style: L({
|
|
2227
|
+
backgroundColor: X.value.holder.color,
|
|
2228
|
+
color: D(_r)(X.value.holder.color)
|
|
2229
|
+
})
|
|
2230
|
+
}, P(D(d)(D(l).collaboration.editing, { name: ce.value })), 5)], 12, io)) : k("", !0),
|
|
2231
|
+
le.value === null ? k("", !0) : (c(), w("div", {
|
|
2232
|
+
key: le.value,
|
|
2233
|
+
"data-testid": "block-agent-highlight",
|
|
2234
|
+
"aria-hidden": "true",
|
|
2235
|
+
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
2236
|
+
})),
|
|
2237
|
+
ne.value ? (c(), w("div", {
|
|
2238
|
+
key: 2,
|
|
2239
|
+
ref_key: "actionsElement",
|
|
2240
|
+
ref: K,
|
|
2241
|
+
style: L(oe.value),
|
|
2242
|
+
role: "toolbar",
|
|
2243
|
+
"aria-label": D(l).blockActions.drag,
|
|
2244
|
+
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2245
|
+
}, [
|
|
2246
|
+
N("button", {
|
|
2247
|
+
ref_key: "dragButtonRef",
|
|
2248
|
+
ref: p,
|
|
2249
|
+
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
2250
|
+
"aria-label": h.value,
|
|
2251
|
+
"aria-pressed": m.value,
|
|
2252
|
+
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2253
|
+
title: D(l).blockActions.drag,
|
|
2254
|
+
onKeydown: v
|
|
2255
|
+
}, [U(D(lr), {
|
|
2256
|
+
size: 14,
|
|
2257
|
+
"stroke-width": 1.5
|
|
2258
|
+
})], 40, oo),
|
|
2259
|
+
N("button", {
|
|
2260
|
+
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2261
|
+
"aria-label": D(l).blockActions.duplicate,
|
|
2262
|
+
title: D(l).blockActions.duplicate,
|
|
2263
|
+
onClick: M(be, ["stop"])
|
|
2264
|
+
}, [U(D(Gn), {
|
|
2265
|
+
size: 14,
|
|
2266
|
+
"stroke-width": 1.5
|
|
2267
|
+
})], 8, so),
|
|
2268
|
+
H.value ? (c(), w("button", {
|
|
2269
|
+
key: 0,
|
|
2270
|
+
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2271
|
+
"aria-label": D(l).blockActions.saveAsBlock,
|
|
2272
|
+
title: D(l).blockActions.saveAsBlock,
|
|
2273
|
+
onClick: M(xe, ["stop"])
|
|
2274
|
+
}, [U(D($n), {
|
|
2275
|
+
size: 14,
|
|
2276
|
+
"stroke-width": 1.5
|
|
2277
|
+
})], 8, co)) : k("", !0),
|
|
2278
|
+
N("button", {
|
|
2279
|
+
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2280
|
+
"aria-label": D(l).blockActions.delete,
|
|
2281
|
+
title: D(l).blockActions.delete,
|
|
2282
|
+
onClick: M(ye, ["stop"])
|
|
2283
|
+
}, [U(D(rr), {
|
|
2284
|
+
size: 14,
|
|
2285
|
+
"stroke-width": 1.5
|
|
2286
|
+
})], 8, lo)
|
|
2287
|
+
], 12, ao)) : k("", !0),
|
|
2288
|
+
S.value ? (c(), w("div", uo, [N("span", fo, [U(D(Yn), {
|
|
2289
|
+
size: 12,
|
|
2290
|
+
"stroke-width": 1.5
|
|
2291
|
+
}), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
|
|
2292
|
+
F.value && !S.value ? (c(), w("div", po, [N("button", {
|
|
2293
|
+
"data-testid": "condition-toggle",
|
|
2294
|
+
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2295
|
+
"aria-label": D(l).blockActions.conditionToggle,
|
|
2296
|
+
title: t.block.displayCondition?.label,
|
|
2297
|
+
onClick: M(Se, ["stop"])
|
|
2298
|
+
}, [U(D(Xn), {
|
|
2299
|
+
size: 12,
|
|
2300
|
+
"stroke-width": 2
|
|
2301
|
+
})], 8, mo)])) : k("", !0),
|
|
2302
|
+
he.value ? (c(), w("div", {
|
|
2303
|
+
key: 5,
|
|
2304
|
+
class: O(["tpl-section-wrapper tpl-email-surface", D(Ni)(he.value)]),
|
|
2305
|
+
style: L(he.value)
|
|
2306
|
+
}, [ge.value ? (c(), w("div", {
|
|
2307
|
+
key: 0,
|
|
2308
|
+
class: "tpl-band-frame",
|
|
2309
|
+
style: L(_e.value)
|
|
2310
|
+
}, [N("div", {
|
|
2311
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2312
|
+
style: L(Q.value)
|
|
2313
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
|
|
2314
|
+
key: 1,
|
|
2315
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2316
|
+
style: L(Q.value)
|
|
2317
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
|
|
2318
|
+
key: 6,
|
|
2319
|
+
class: O(["tpl-block-content tpl-email-surface", D(Ni)(Q.value)]),
|
|
2320
|
+
style: L(Q.value)
|
|
2321
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2322
|
+
], 10, no));
|
|
2323
|
+
}
|
|
2324
|
+
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2325
|
+
// src/utils/unwrapParagraph.ts
|
|
2326
|
+
function go(e) {
|
|
2327
|
+
let t = /^\s*<p\b/.exec(e);
|
|
2328
|
+
if (!t) return e;
|
|
2329
|
+
let n = Ue(e, t[0].length);
|
|
2330
|
+
if (n === -1) return e;
|
|
2331
|
+
let r = /<\/p>\s*$/.exec(e);
|
|
2332
|
+
if (!r || r.index <= n) return e;
|
|
2333
|
+
let i = e.slice(n + 1, r.index);
|
|
2334
|
+
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2335
|
+
}
|
|
2336
|
+
// src/components/blocks/TitleBlock.vue
|
|
2337
|
+
var _o = /* @__PURE__ */ o({
|
|
2338
|
+
__name: "TitleBlock",
|
|
2339
|
+
props: {
|
|
2340
|
+
block: {},
|
|
2341
|
+
viewport: {}
|
|
2342
|
+
},
|
|
2343
|
+
setup(e) {
|
|
2344
|
+
let t = e, n = b(() => import("./TitleEditor-CzPkkL2s.js")), r = fn(Kt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = ja(() => t.block.content), f = I(() => {
|
|
2345
|
+
let e = {
|
|
2346
|
+
fontSize: `${at[t.block.level]}px`,
|
|
2347
|
+
lineHeight: String(je),
|
|
2348
|
+
fontWeight: "700",
|
|
2349
|
+
textAlign: t.block.textAlign
|
|
2350
|
+
};
|
|
2351
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2352
|
+
}), p = I(() => `h${t.block.level}`), m = I(() => Wn(go(l.value)));
|
|
2353
|
+
return (t, r) => (c(), w("div", {
|
|
2354
|
+
ref_key: "blockRef",
|
|
2355
|
+
ref: o,
|
|
2356
|
+
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2357
|
+
style: L(f.value),
|
|
2358
|
+
onDblclick: r[0] ||= (...e) => D(u) && D(u)(...e)
|
|
2359
|
+
}, [D(i) ? (c(), A(D(n), {
|
|
2360
|
+
key: 0,
|
|
2361
|
+
block: e.block,
|
|
2362
|
+
"toolbar-position": D(s),
|
|
2363
|
+
onDone: D(d)
|
|
2364
|
+
}, null, 8, [
|
|
2365
|
+
"block",
|
|
2366
|
+
"toolbar-position",
|
|
2367
|
+
"onDone"
|
|
2368
|
+
])) : (c(), A(a(p.value), {
|
|
2369
|
+
key: 1,
|
|
2370
|
+
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2371
|
+
style: {
|
|
2372
|
+
color: "inherit",
|
|
2373
|
+
fontWeight: "inherit"
|
|
2374
|
+
},
|
|
2375
|
+
innerHTML: m.value
|
|
2376
|
+
}, null, 8, ["innerHTML"]))], 36));
|
|
2377
|
+
}
|
|
2378
|
+
}), vo = "hero", yo = "#1f2937", bo = "#ffffff";
|
|
2379
|
+
function xo(e, t) {
|
|
2380
|
+
let n = ut("title", e);
|
|
2381
|
+
n.color = bo, n.textAlign = "center";
|
|
2382
|
+
let r = ut("paragraph", e);
|
|
2383
|
+
r.content = `<p style="text-align: center"><span style="color: ${bo}">${So(t)}</span></p>`;
|
|
2384
|
+
let i = ut("button", e);
|
|
2385
|
+
return i.align = "center", he({
|
|
2386
|
+
columns: "1",
|
|
2387
|
+
children: [[
|
|
2388
|
+
n,
|
|
2389
|
+
r,
|
|
2390
|
+
i
|
|
2391
|
+
]],
|
|
2392
|
+
hero: {
|
|
2393
|
+
height: "image",
|
|
2394
|
+
verticalAlign: "middle"
|
|
2395
|
+
},
|
|
2396
|
+
styles: {
|
|
2397
|
+
padding: {
|
|
2398
|
+
top: 48,
|
|
2399
|
+
right: 24,
|
|
2400
|
+
bottom: 48,
|
|
2401
|
+
left: 24
|
|
2402
|
+
},
|
|
2403
|
+
backgroundColor: yo
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
function So(e) {
|
|
2408
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2409
|
+
}
|
|
2410
|
+
// src/utils/sectionColumnDrop.ts
|
|
2411
|
+
var Co = /* @__PURE__ */ new Set(["section", vo]);
|
|
2412
|
+
function wo(e) {
|
|
2413
|
+
return e.dataset.blockType !== "section" && !Co.has(e.dataset.paletteType ?? "");
|
|
2414
|
+
}
|
|
2415
|
+
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2416
|
+
var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
2417
|
+
key: 0,
|
|
2418
|
+
"data-testid": "hero-image-hint",
|
|
2419
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2420
|
+
}, Do = {
|
|
2421
|
+
key: 0,
|
|
2422
|
+
"data-testid": "section-drop-hint",
|
|
2423
|
+
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2424
|
+
}, Oo = /* @__PURE__ */ o({
|
|
2425
|
+
__name: "SectionBlock",
|
|
2426
|
+
props: {
|
|
2427
|
+
block: {},
|
|
2428
|
+
sourceBlock: {},
|
|
2429
|
+
viewport: {}
|
|
2430
|
+
},
|
|
2431
|
+
setup(e) {
|
|
2432
|
+
let t = {
|
|
2433
|
+
title: _o,
|
|
2434
|
+
paragraph: Na,
|
|
2435
|
+
image: Ea,
|
|
2436
|
+
button: Ji,
|
|
2437
|
+
divider: ca,
|
|
2438
|
+
custom: oa
|
|
2439
|
+
}, n = e, { t: r } = W(), o = fn(hn, "SectionBlock"), { displayBlock: s } = vt(o), u = I(() => n.sourceBlock ?? n.block), m = g(Qt, I(() => /* @__PURE__ */ new Set()));
|
|
2440
|
+
d(Qt, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2441
|
+
let h = g(rn, null), _ = g(nn, null), v = g(Jt, {}), y = g(Wt, null);
|
|
2442
|
+
function b(e) {
|
|
2443
|
+
let t = v.savedBlocks;
|
|
2444
|
+
t?.isPicking.value ? t.togglePick(n.block.id) : o.selectBlock(e);
|
|
2445
|
+
}
|
|
2446
|
+
let x = I(() => {
|
|
2447
|
+
switch (n.block.columns) {
|
|
2448
|
+
case "2": return ["50%", "50%"];
|
|
2449
|
+
case "3": return [
|
|
2450
|
+
"33.33%",
|
|
2451
|
+
"33.33%",
|
|
2452
|
+
"33.33%"
|
|
2453
|
+
];
|
|
2454
|
+
case "4": return [
|
|
2455
|
+
"25%",
|
|
2456
|
+
"25%",
|
|
2457
|
+
"25%",
|
|
2458
|
+
"25%"
|
|
2459
|
+
];
|
|
2460
|
+
case "1-2": return ["33.33%", "66.67%"];
|
|
2461
|
+
case "2-1": return ["66.67%", "33.33%"];
|
|
2462
|
+
case "1-3": return ["25%", "75%"];
|
|
2463
|
+
case "3-1": return ["75%", "25%"];
|
|
2464
|
+
case "1-2-1": return [
|
|
2465
|
+
"25%",
|
|
2466
|
+
"50%",
|
|
2467
|
+
"25%"
|
|
2468
|
+
];
|
|
2469
|
+
default: return ["100%"];
|
|
2470
|
+
}
|
|
2471
|
+
}), S = I(() => {
|
|
2472
|
+
let e = x.value.length, t = [...(o.state.previewMode ? n.block : u.value).children];
|
|
2473
|
+
for (; t.length < e;) t.push([]);
|
|
2474
|
+
return t.slice(0, e);
|
|
2475
|
+
}), C = I(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
2476
|
+
function T(e) {
|
|
2477
|
+
return S.value[e] || [];
|
|
2478
|
+
}
|
|
2479
|
+
function E(e) {
|
|
2480
|
+
return y?.value === !1 || !h?.isHidden(e);
|
|
2481
|
+
}
|
|
2482
|
+
function ee(e) {
|
|
2483
|
+
return !T(e).some((e) => E(e.id));
|
|
2484
|
+
}
|
|
2485
|
+
let j = V(null);
|
|
2486
|
+
function M(e) {
|
|
2487
|
+
return o.state.previewMode ? !1 : ee(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
2488
|
+
}
|
|
2489
|
+
let F = I(() => {
|
|
2490
|
+
if (o.state.previewMode) return !1;
|
|
2491
|
+
let e = it(n.block);
|
|
2492
|
+
return e !== null && !e.applied && e.reason === "image";
|
|
2493
|
+
});
|
|
2494
|
+
function R(e) {
|
|
2495
|
+
return T(e).length === 0 && !o.state.previewMode;
|
|
2496
|
+
}
|
|
2497
|
+
function B(e) {
|
|
2498
|
+
return T(e).length === 0 && o.state.previewMode;
|
|
2499
|
+
}
|
|
2500
|
+
function ne(e, t) {
|
|
2501
|
+
Pa(o, t, n.block.id, e);
|
|
2502
|
+
}
|
|
2503
|
+
function G(e) {
|
|
2504
|
+
return Oi(e, _, t);
|
|
2505
|
+
}
|
|
2506
|
+
function re(e, t) {
|
|
2507
|
+
e.type === "custom" && o.updateBlock(e.id, {
|
|
2508
|
+
fieldValues: t.fieldValues,
|
|
2509
|
+
dataSourceFetched: t.dataSourceFetched
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
return (t, u) => (c(), w("div", To, [F.value ? (c(), w("div", Eo, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": C.value }]) }, [(c(!0), w(H, null, p(S.value, (t, d) => (c(), w("div", {
|
|
2513
|
+
key: d,
|
|
2514
|
+
class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", R(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2515
|
+
style: L({ width: C.value ? "100%" : x.value[d] })
|
|
2516
|
+
}, [U(D(te), {
|
|
2517
|
+
"model-value": T(d),
|
|
2518
|
+
group: {
|
|
2519
|
+
name: "blocks",
|
|
2520
|
+
pull: !0,
|
|
2521
|
+
put: (e, t, n) => D(wo)(n)
|
|
2522
|
+
},
|
|
2523
|
+
animation: 150,
|
|
2524
|
+
"ghost-class": "tpl-ghost",
|
|
2525
|
+
"drag-class": "tpl-dragging",
|
|
2526
|
+
handle: ".tpl-block-btn",
|
|
2527
|
+
"invert-swap": !0,
|
|
2528
|
+
"inverted-swap-threshold": .65,
|
|
2529
|
+
"empty-insert-threshold": 20,
|
|
2530
|
+
"force-fallback": !0,
|
|
2531
|
+
class: O(["tpl:grow", {
|
|
2532
|
+
"tpl:min-h-[60px]": M(d),
|
|
2533
|
+
"tpl:min-h-[34px]": B(d)
|
|
2534
|
+
}]),
|
|
2535
|
+
onUpdate: (e) => D(Pa)(D(o), T(d), n.block.id, d, e),
|
|
2536
|
+
onStart: (e) => j.value = d,
|
|
2537
|
+
onEnd: u[0] ||= (e) => j.value = null,
|
|
2538
|
+
"onUpdate:modelValue": (e) => ne(d, e)
|
|
2539
|
+
}, {
|
|
2540
|
+
default: l(() => [(c(!0), w(H, null, p(T(d), (t) => f((c(), w("div", { key: t.id }, [U(ho, {
|
|
2541
|
+
block: t,
|
|
2542
|
+
"display-block": D(s)(t),
|
|
2543
|
+
"is-selected": D(o).state.selectedBlockId === t.id,
|
|
2544
|
+
viewport: e.viewport,
|
|
2545
|
+
"preview-mode": D(o).state.previewMode,
|
|
2546
|
+
nested: "",
|
|
2547
|
+
onSelect: (e) => b(t.id)
|
|
2548
|
+
}, {
|
|
2549
|
+
default: l(() => [(c(), A(a(G(t)), i({ block: D(s)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
2550
|
+
viewport: e.viewport,
|
|
2551
|
+
onFetchData: (e) => re(t, e),
|
|
2552
|
+
onUpdate: (e) => D(o).updateBlock(t.id, e)
|
|
2553
|
+
}), null, 16, [
|
|
2554
|
+
"block",
|
|
2555
|
+
"viewport",
|
|
2556
|
+
"onFetchData",
|
|
2557
|
+
"onUpdate"
|
|
2558
|
+
]))]),
|
|
2559
|
+
_: 2
|
|
2560
|
+
}, 1032, [
|
|
2561
|
+
"block",
|
|
2562
|
+
"display-block",
|
|
2563
|
+
"is-selected",
|
|
2564
|
+
"viewport",
|
|
2565
|
+
"preview-mode",
|
|
2566
|
+
"onSelect"
|
|
2567
|
+
])])), [[z, E(t.id)]])), 128))]),
|
|
2568
|
+
_: 2
|
|
2569
|
+
}, 1032, [
|
|
2570
|
+
"model-value",
|
|
2571
|
+
"group",
|
|
2572
|
+
"class",
|
|
2573
|
+
"onUpdate",
|
|
2574
|
+
"onStart",
|
|
2575
|
+
"onUpdate:modelValue"
|
|
2576
|
+
]), R(d) ? (c(), w("div", Do, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
|
|
2577
|
+
}
|
|
2578
|
+
}), ko = ["width", "height"], Ao = [
|
|
2579
|
+
"d",
|
|
2580
|
+
"stroke",
|
|
2581
|
+
"stroke-opacity",
|
|
2582
|
+
"stroke-width"
|
|
2583
|
+
], jo = ["d", "fill"], Mo = /* @__PURE__ */ o({
|
|
2584
|
+
__name: "SocialIconSvg",
|
|
2585
|
+
props: {
|
|
2586
|
+
platform: {},
|
|
2587
|
+
iconStyle: {},
|
|
2588
|
+
iconTone: {},
|
|
2589
|
+
iconSize: {}
|
|
2590
|
+
},
|
|
2591
|
+
setup(e) {
|
|
2592
|
+
let t = e, n = I(() => Mn[t.platform]), r = I(() => Pn[t.iconSize]), i = I(() => qe(t.platform, t.iconTone)), a = I(() => Me(t.iconStyle, t.iconTone)), o = I(() => {
|
|
2593
|
+
let e = {
|
|
2594
|
+
display: "inline-flex",
|
|
2595
|
+
alignItems: "center",
|
|
2596
|
+
justifyContent: "center",
|
|
2597
|
+
width: `${r.value}px`,
|
|
2598
|
+
height: `${r.value}px`
|
|
2599
|
+
}, n = i.value.fill;
|
|
2600
|
+
switch (t.iconStyle) {
|
|
2601
|
+
case "solid": return {
|
|
2602
|
+
...e,
|
|
2603
|
+
backgroundColor: n,
|
|
2604
|
+
borderRadius: "4px"
|
|
2605
|
+
};
|
|
2606
|
+
case "outlined": return {
|
|
2607
|
+
...e,
|
|
2608
|
+
backgroundColor: "transparent",
|
|
2609
|
+
border: `2px solid ${n}`,
|
|
2610
|
+
borderRadius: "4px",
|
|
2611
|
+
...a.value && { boxShadow: u(a.value) }
|
|
2612
|
+
};
|
|
2613
|
+
case "rounded": return {
|
|
2614
|
+
...e,
|
|
2615
|
+
backgroundColor: n,
|
|
2616
|
+
borderRadius: "8px"
|
|
2617
|
+
};
|
|
2618
|
+
case "square": return {
|
|
2619
|
+
...e,
|
|
2620
|
+
backgroundColor: n,
|
|
2621
|
+
borderRadius: "0"
|
|
2622
|
+
};
|
|
2623
|
+
case "circle": return {
|
|
2624
|
+
...e,
|
|
2625
|
+
backgroundColor: n,
|
|
2626
|
+
borderRadius: "50%"
|
|
2627
|
+
};
|
|
2628
|
+
default: return e;
|
|
2629
|
+
}
|
|
2630
|
+
}), s = I(() => $e(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
|
|
2631
|
+
function u(e) {
|
|
2632
|
+
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2633
|
+
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
2634
|
+
}
|
|
2635
|
+
let d = I(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
2636
|
+
return (e, t) => (c(), w("span", { style: L(o.value) }, [(c(), w("svg", {
|
|
2637
|
+
width: l.value,
|
|
2638
|
+
height: l.value,
|
|
2639
|
+
viewBox: "0 0 24 24",
|
|
2640
|
+
overflow: "visible",
|
|
2641
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2642
|
+
}, [a.value ? (c(), w("path", {
|
|
2643
|
+
key: 0,
|
|
2644
|
+
"data-testid": "social-icon-halo",
|
|
2645
|
+
d: n.value.path,
|
|
2646
|
+
fill: "none",
|
|
2647
|
+
stroke: a.value.color,
|
|
2648
|
+
"stroke-opacity": a.value.opacity,
|
|
2649
|
+
"stroke-width": a.value.width / s.value,
|
|
2650
|
+
"stroke-linejoin": "round"
|
|
2651
|
+
}, null, 8, Ao)) : k("", !0), N("path", {
|
|
2652
|
+
d: n.value.path,
|
|
2653
|
+
fill: d.value
|
|
2654
|
+
}, null, 8, jo)], 8, ko))], 4));
|
|
2655
|
+
}
|
|
2656
|
+
}), No = { class: "tpl:w-full" }, Po = ["href"], Fo = {
|
|
2657
|
+
key: 1,
|
|
2658
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2659
|
+
}, Io = /* @__PURE__ */ o({
|
|
2660
|
+
__name: "SocialIconsBlock",
|
|
2661
|
+
props: {
|
|
2662
|
+
block: {},
|
|
2663
|
+
viewport: {}
|
|
2664
|
+
},
|
|
2665
|
+
setup(e) {
|
|
2666
|
+
let t = e, { t: n } = W(), r = I(() => ({
|
|
2667
|
+
display: "flex",
|
|
2668
|
+
flexWrap: "wrap",
|
|
2669
|
+
gap: `${t.block.spacing}px`,
|
|
2670
|
+
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2671
|
+
})), i = I(() => t.block.icons.length > 0);
|
|
2672
|
+
return (t, a) => (c(), w("div", No, [i.value ? (c(), w("div", {
|
|
2673
|
+
key: 0,
|
|
2674
|
+
style: L(r.value)
|
|
2675
|
+
}, [(c(!0), w(H, null, p(e.block.icons, (t) => (c(), w("a", {
|
|
2676
|
+
key: t.id,
|
|
2677
|
+
href: t.url || "#",
|
|
2678
|
+
class: "tpl:cursor-default",
|
|
2679
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
2680
|
+
}, [U(Mo, {
|
|
2681
|
+
platform: t.platform,
|
|
2682
|
+
"icon-style": e.block.iconStyle,
|
|
2683
|
+
"icon-tone": e.block.iconTone,
|
|
2684
|
+
"icon-size": e.block.iconSize
|
|
2685
|
+
}, null, 8, [
|
|
2686
|
+
"platform",
|
|
2687
|
+
"icon-style",
|
|
2688
|
+
"icon-tone",
|
|
2689
|
+
"icon-size"
|
|
2690
|
+
])], 8, Po))), 128))], 4)) : (c(), w("div", Fo, [U(D(ir), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
|
|
2691
|
+
}
|
|
2692
|
+
}), Lo = { class: "tpl:w-full" }, Ro = {
|
|
2693
|
+
key: 0,
|
|
2694
|
+
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2695
|
+
style: {
|
|
2696
|
+
"background-color": "var(--tpl-bg-hover)",
|
|
2697
|
+
color: "var(--tpl-text-dim)"
|
|
2698
|
+
}
|
|
2699
|
+
}, zo = /* @__PURE__ */ o({
|
|
2700
|
+
__name: "SpacerBlock",
|
|
2701
|
+
props: {
|
|
2702
|
+
block: {},
|
|
2703
|
+
viewport: {}
|
|
2704
|
+
},
|
|
2705
|
+
setup(e) {
|
|
2706
|
+
let t = e, n = fn(hn, "SpacerBlock"), r = I(() => ({
|
|
2707
|
+
height: `${t.block.height}px`,
|
|
2708
|
+
minHeight: `${t.block.height}px`,
|
|
2709
|
+
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2710
|
+
}));
|
|
2711
|
+
return (t, i) => (c(), w("div", Lo, [N("div", {
|
|
2712
|
+
style: L(r.value),
|
|
2713
|
+
class: O(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !D(n).state.previewMode }])
|
|
2714
|
+
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Ro, P(e.block.height) + "px ", 1))], 6)]));
|
|
2715
|
+
}
|
|
2716
|
+
}), Bo = { class: "tpl:w-full" }, Vo = { key: 0 }, Ho = [
|
|
2717
|
+
"aria-label",
|
|
2718
|
+
"data-placeholder",
|
|
2719
|
+
"onBlur"
|
|
2720
|
+
], Uo = [
|
|
2721
|
+
"aria-label",
|
|
2722
|
+
"data-placeholder",
|
|
2723
|
+
"onBlur"
|
|
2724
|
+
], Wo = {
|
|
2725
|
+
key: 1,
|
|
2726
|
+
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2727
|
+
}, Go = /*#__PURE__*/ gr(/* @__PURE__ */ o({
|
|
2728
|
+
__name: "TableBlock",
|
|
2729
|
+
props: {
|
|
2730
|
+
block: {},
|
|
2731
|
+
viewport: {}
|
|
2732
|
+
},
|
|
2733
|
+
setup(e) {
|
|
2734
|
+
let t = {
|
|
2735
|
+
mounted(e, t) {
|
|
2736
|
+
e.textContent = t.value ?? "";
|
|
2737
|
+
},
|
|
2738
|
+
updated(e, t) {
|
|
2739
|
+
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2740
|
+
}
|
|
2741
|
+
}, n = e, { t: r } = W(), i = fn(hn, "TableBlock"), a = fn(Kt, "TableBlock"), o = I(() => n.block.rows.length > 0), s = I(() => {
|
|
2742
|
+
let e = {
|
|
2743
|
+
width: "100%",
|
|
2744
|
+
borderCollapse: "collapse",
|
|
2745
|
+
fontSize: `${n.block.fontSize}px`,
|
|
2746
|
+
textAlign: n.block.textAlign,
|
|
2747
|
+
fontFamily: n.block.fontFamily ? a.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2748
|
+
};
|
|
2749
|
+
return n.block.color && (e.color = n.block.color), e;
|
|
2750
|
+
}), l = I(() => ({
|
|
2751
|
+
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2752
|
+
padding: `${n.block.cellPadding}px`,
|
|
2753
|
+
textAlign: n.block.textAlign
|
|
2754
|
+
})), u = I(() => ({
|
|
2755
|
+
...l.value,
|
|
2756
|
+
fontWeight: "bold",
|
|
2757
|
+
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2758
|
+
})), d = I(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = I(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
2759
|
+
function h() {
|
|
2760
|
+
i.selectBlock(n.block.id);
|
|
2761
|
+
}
|
|
2762
|
+
function g(e, t, r) {
|
|
2763
|
+
let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
2764
|
+
...n,
|
|
2765
|
+
cells: n.cells.map((e) => e.id === t ? {
|
|
2766
|
+
...e,
|
|
2767
|
+
content: a
|
|
2768
|
+
} : e)
|
|
2769
|
+
} : n);
|
|
2770
|
+
i.updateBlock(n.block.id, { rows: o });
|
|
2771
|
+
}
|
|
2772
|
+
return (e, n) => (c(), w("div", Bo, [o.value ? (c(), w("table", {
|
|
2773
|
+
key: 0,
|
|
2774
|
+
style: L(s.value),
|
|
2775
|
+
class: "tpl-table-editable"
|
|
2776
|
+
}, [d.value ? (c(), w("thead", Vo, [N("tr", null, [(c(!0), w(H, null, p(d.value.cells, (e) => f((c(), w("th", {
|
|
2777
|
+
key: e.id,
|
|
2778
|
+
style: L(u.value),
|
|
2779
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2780
|
+
contenteditable: "true",
|
|
2781
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2782
|
+
onBlur: (t) => g(d.value.id, e.id, t),
|
|
2783
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2784
|
+
onClick: M(h, ["stop"])
|
|
2785
|
+
}, null, 44, Ho)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(H, null, p(m.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(H, null, p(e.cells, (i) => f((c(), w("td", {
|
|
2786
|
+
key: i.id,
|
|
2787
|
+
style: L(l.value),
|
|
2788
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2789
|
+
contenteditable: "true",
|
|
2790
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2791
|
+
onBlur: (t) => g(e.id, i.id, t),
|
|
2792
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2793
|
+
onClick: M(h, ["stop"])
|
|
2794
|
+
}, null, 44, Uo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", Wo, [U(D(cr), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
|
|
2795
|
+
}
|
|
2796
|
+
}), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */ o({
|
|
2797
|
+
__name: "VideoPlayButton",
|
|
2798
|
+
props: { hoverEffect: {
|
|
2799
|
+
type: Boolean,
|
|
2800
|
+
default: !1
|
|
2801
|
+
} },
|
|
2802
|
+
setup(e) {
|
|
2803
|
+
return (t, n) => (c(), w("div", { class: O(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [N("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [N("svg", {
|
|
2804
|
+
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
2805
|
+
width: "28",
|
|
2806
|
+
height: "28",
|
|
2807
|
+
viewBox: "0 0 24 24",
|
|
2808
|
+
fill: "currentColor"
|
|
2809
|
+
}, [N("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
2810
|
+
}
|
|
2811
|
+
});
|
|
2812
|
+
// src/utils/videoThumbnail.ts
|
|
2813
|
+
function qo(e) {
|
|
2814
|
+
if (!e) return {
|
|
2815
|
+
platform: "unknown",
|
|
2816
|
+
videoId: null,
|
|
2817
|
+
thumbnailUrl: null
|
|
2818
|
+
};
|
|
2819
|
+
for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/i, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/i]) {
|
|
2820
|
+
let n = e.match(t);
|
|
2821
|
+
if (n) {
|
|
2822
|
+
let e = n[1];
|
|
2823
|
+
return {
|
|
2824
|
+
platform: "youtube",
|
|
2825
|
+
videoId: e,
|
|
2826
|
+
thumbnailUrl: `https://img.youtube.com/vi/${e}/maxresdefault.jpg`
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/i);
|
|
2831
|
+
if (t) {
|
|
2832
|
+
let e = t[1];
|
|
2833
|
+
return {
|
|
2834
|
+
platform: "vimeo",
|
|
2835
|
+
videoId: e,
|
|
2836
|
+
thumbnailUrl: `https://vumbnail.com/${e}.jpg`
|
|
2837
|
+
};
|
|
2838
|
+
}
|
|
2839
|
+
return {
|
|
2840
|
+
platform: "unknown",
|
|
2841
|
+
videoId: null,
|
|
2842
|
+
thumbnailUrl: null
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
function Jo(e, t) {
|
|
2846
|
+
return t || qo(e).thumbnailUrl;
|
|
2847
|
+
}
|
|
2848
|
+
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2849
|
+
var Yo = ["src", "alt"], Xo = {
|
|
2850
|
+
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2851
|
+
style: { opacity: "0.7" }
|
|
2852
|
+
}, Zo = ["href"], Qo = ["src", "alt"], $o = ["src", "alt"], es = {
|
|
2853
|
+
key: 3,
|
|
2854
|
+
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2855
|
+
}, ts = /* @__PURE__ */ o({
|
|
2856
|
+
__name: "VideoBlock",
|
|
2857
|
+
props: {
|
|
2858
|
+
block: {},
|
|
2859
|
+
viewport: {}
|
|
2860
|
+
},
|
|
2861
|
+
setup(e) {
|
|
2862
|
+
let t = e, { t: n } = W(), { syntax: r } = G(), i = I(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), a = Dn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Dn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Jo(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
|
|
2863
|
+
let e = t.block.align;
|
|
2864
|
+
return {
|
|
2865
|
+
maxWidth: "100%",
|
|
2866
|
+
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2867
|
+
height: t.block.height ? `${t.block.height}px` : void 0,
|
|
2868
|
+
display: "block",
|
|
2869
|
+
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2870
|
+
marginRight: e === "center" ? "auto" : void 0
|
|
2871
|
+
};
|
|
2872
|
+
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2873
|
+
return (t, r) => (c(), w("div", {
|
|
2874
|
+
class: "tpl:w-full",
|
|
2875
|
+
style: L(l.value)
|
|
2876
|
+
}, [i.value && e.block.placeholderUrl ? (c(), w("div", {
|
|
2877
|
+
key: 0,
|
|
2878
|
+
class: "tpl:relative tpl:inline-block",
|
|
2879
|
+
style: L(u.value)
|
|
2880
|
+
}, [N("img", {
|
|
2881
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2882
|
+
src: D(o),
|
|
2883
|
+
alt: e.block.alt,
|
|
2884
|
+
style: L(d.value)
|
|
2885
|
+
}, null, 12, Yo), U(Ko)], 4)) : i.value ? (c(), w("div", {
|
|
2886
|
+
key: 1,
|
|
2887
|
+
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2888
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2889
|
+
}, [U(D(sr), {
|
|
2890
|
+
size: 36,
|
|
2891
|
+
"stroke-width": 1.5,
|
|
2892
|
+
class: "tpl:text-[var(--tpl-primary)]",
|
|
2893
|
+
style: { opacity: "0.5" }
|
|
2894
|
+
}), N("span", Xo, [U(Ki, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(H, { key: 2 }, [e.block.url ? (c(), w("a", {
|
|
2895
|
+
key: 0,
|
|
2896
|
+
href: e.block.url,
|
|
2897
|
+
target: "_blank",
|
|
2898
|
+
rel: "noopener noreferrer",
|
|
2899
|
+
class: "tpl:group tpl:relative tpl:inline-block",
|
|
2900
|
+
style: L(u.value),
|
|
2901
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
2902
|
+
}, [N("img", {
|
|
2903
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2904
|
+
src: s.value,
|
|
2905
|
+
alt: e.block.alt,
|
|
2906
|
+
style: L(d.value)
|
|
2907
|
+
}, null, 12, Qo), U(Ko, { "hover-effect": "" })], 12, Zo)) : (c(), w("div", {
|
|
2908
|
+
key: 1,
|
|
2909
|
+
class: "tpl:relative tpl:inline-block",
|
|
2910
|
+
style: L(u.value)
|
|
2911
|
+
}, [N("img", {
|
|
2912
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2913
|
+
src: s.value,
|
|
2914
|
+
alt: e.block.alt,
|
|
2915
|
+
style: L(d.value)
|
|
2916
|
+
}, null, 12, $o), U(Ko)], 4))], 64)) : (c(), w("div", es, [U(D(sr), {
|
|
2917
|
+
size: 40,
|
|
2918
|
+
"stroke-width": 1.5,
|
|
2919
|
+
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2920
|
+
}), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
|
|
2921
|
+
}
|
|
2922
|
+
}), ns = {
|
|
2923
|
+
section: Oo,
|
|
2924
|
+
title: _o,
|
|
2925
|
+
paragraph: Na,
|
|
2926
|
+
image: Ea,
|
|
2927
|
+
button: Ji,
|
|
2928
|
+
divider: ca,
|
|
2929
|
+
video: ts,
|
|
2930
|
+
social: Io,
|
|
2931
|
+
menu: Aa,
|
|
2932
|
+
table: Go,
|
|
2933
|
+
spacer: zo,
|
|
2934
|
+
html: ma,
|
|
2935
|
+
countdown: b(() => import("./CountdownBlock-8aPSExrv.js"))
|
|
2936
|
+
};
|
|
2937
|
+
function rs(t) {
|
|
2938
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = W(i), c = I(() => Re(Re(Re(ri(i), Ci(n.content.value.settings?.locale)), Fe(n.content.value.settings) === "rtl" ? {
|
|
2939
|
+
title: { textAlign: "right" },
|
|
2940
|
+
table: { textAlign: "right" }
|
|
2941
|
+
} : {}), r.blockDefaults ?? {}));
|
|
2942
|
+
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2943
|
+
let { resolvedTheme: l } = Jr(I(() => n.state.uiTheme)), f = V(r.theme ?? {}), { themeStyles: p } = Dr({
|
|
2944
|
+
themeOverrides: f,
|
|
2945
|
+
resolvedTheme: l,
|
|
2946
|
+
extraStyles: () => ({
|
|
2947
|
+
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2948
|
+
...t.themeExtraStyles?.()
|
|
2949
|
+
})
|
|
2950
|
+
}), m = t.history ?? xn({
|
|
2951
|
+
content: n.content,
|
|
2952
|
+
setContent: (e, t) => n.setContent(e, t)
|
|
2953
|
+
});
|
|
2954
|
+
t.history || Tn(n, m);
|
|
2955
|
+
let h = Bn({
|
|
2956
|
+
addBlock: n.addBlock,
|
|
2957
|
+
removeBlock: n.removeBlock,
|
|
2958
|
+
updateBlock: n.updateBlock,
|
|
2959
|
+
selectBlock: n.selectBlock,
|
|
2960
|
+
findBlockLocation: n.findBlockLocation,
|
|
2961
|
+
blockDefaults: () => c.value
|
|
2962
|
+
}), g = wn(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? En({
|
|
2963
|
+
content: n.content,
|
|
2964
|
+
isDirty: () => n.state.isDirty,
|
|
2965
|
+
...t.autoSaveOptions
|
|
2966
|
+
}) : null, y = null;
|
|
2967
|
+
_ && (y = u(m.isNavigating, (e) => {
|
|
2968
|
+
e ? _.pause() : _.resume();
|
|
2969
|
+
}));
|
|
2970
|
+
let b = qr(n, {
|
|
2971
|
+
t: o,
|
|
2972
|
+
format: s
|
|
2973
|
+
}, r.customBlocks ?? []), x = mt(r.colors);
|
|
2974
|
+
if (x.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
2975
|
+
let e = ni(x.presets, r.blockDefaults, r.templateDefaults);
|
|
2976
|
+
e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
2977
|
+
}
|
|
2978
|
+
let S = Vn(r.templateSettings);
|
|
2979
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Hn.join(", ")}) — skipping it.`);
|
|
2980
|
+
let w = xr();
|
|
2981
|
+
$r(w, ns);
|
|
2982
|
+
let T = /* @__PURE__ */ new Set();
|
|
2983
|
+
function E(e) {
|
|
2984
|
+
for (let t of e) {
|
|
2985
|
+
w.registerCustom(t, oa);
|
|
2986
|
+
for (let e of wi(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
r.customBlocks?.length && E(r.customBlocks);
|
|
2990
|
+
let D = Rr();
|
|
2991
|
+
if (C() && v(D.dispose), t.containerEl) {
|
|
2992
|
+
let n = t.containerEl;
|
|
2993
|
+
e(document, "pointerdown", (e) => {
|
|
2994
|
+
let t = n.value;
|
|
2995
|
+
t && (e.composedPath?.() ?? []).includes(t) && D.claim();
|
|
2996
|
+
}, { capture: !0 });
|
|
2997
|
+
}
|
|
2998
|
+
function O() {
|
|
2999
|
+
let e = t.capabilities?.templates;
|
|
3000
|
+
e ? e.save() : _?.flush();
|
|
3001
|
+
}
|
|
3002
|
+
function ee(e) {
|
|
3003
|
+
D.isActive() && Ei(e, {
|
|
3004
|
+
history: m,
|
|
3005
|
+
selectBlock: (e) => n.selectBlock(e),
|
|
3006
|
+
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
3007
|
+
removeBlock: (e) => n.removeBlock(e),
|
|
3008
|
+
onSave: O,
|
|
3009
|
+
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
3010
|
+
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
3011
|
+
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
e(document, "keydown", ee);
|
|
3015
|
+
let k = V(null), A = t.editorRoot ?? document;
|
|
3016
|
+
d(vn, A), d(cn, k), d(Ct, /* @__PURE__ */ new Map()), d(an, i), d(hn, n), d(_n, m), d(dn, h), d(rn, g), d(Kt, a), d(pn, p), d(Gt, l), d(qt, c), d($t, r.locale), d(nn, w), d(Zt, r.customBlocks ?? []), d(kt, r.paletteBlocks), d(It, ei(r.htmlBlockPreview)), d(Lt, r.layout), d(Ht, r.sectionWrapper), d(sn, x), d(Yt, S.fields), d(Xt, Yr(n.content, w));
|
|
3017
|
+
let j = nt(r.mergeTags?.syntax);
|
|
3018
|
+
for (let e of ["opener", "closer"]) {
|
|
3019
|
+
let t = j[e];
|
|
3020
|
+
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3021
|
+
}
|
|
3022
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Te(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3023
|
+
let M = R(r.mergeTags?.tags ?? []);
|
|
3024
|
+
function N(e) {
|
|
3025
|
+
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3026
|
+
}
|
|
3027
|
+
d(Pt, M), d(xt, j), d(Tt, r.mergeTags?.onRequest ?? null), d(wt, r.mergeTags?.autocomplete !== !1), d(yn, r.mergeTags?.showRawValue !== !1);
|
|
3028
|
+
let P = V(we(r.mergeTags?.tags ?? []));
|
|
3029
|
+
d(Ft, P);
|
|
3030
|
+
let F = Vr({
|
|
3031
|
+
resolvePreview: r.resolvePreview,
|
|
3032
|
+
getContent: () => {
|
|
3033
|
+
let e = n.content.value;
|
|
3034
|
+
if (!n.state.previewMode) return e;
|
|
3035
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = ve(e, t);
|
|
3036
|
+
return r.layout ? Je(ve(r.layout, t, { missing: "default" }), i) : i;
|
|
3037
|
+
},
|
|
3038
|
+
isActive: () => n.state.previewMode,
|
|
3039
|
+
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
3040
|
+
});
|
|
3041
|
+
d(Ot, F), d(Vt, r.resolvePreview);
|
|
3042
|
+
let L = I(() => !(n.state.previewMode && F.isConfigured));
|
|
3043
|
+
d(Wt, L);
|
|
3044
|
+
let z = Hr();
|
|
3045
|
+
d(Dt, z), d(At, V(!1)), d(Mt, V(!1)), d(en, r.logicTags?.tags ?? []), d(bt, r.logicTags?.pairs ?? []), d(Rt, r.logicTags?.onRequest ?? null), d(jt, Ur()), d(Bt, r.onRequestMedia ?? null), d(mn, r.canDropMedia ?? null), d(St, r.resolveImageUrl ? Rn(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), d(Ut, r.displayConditions?.conditions ?? []), d(ln, r.displayConditions?.allowCustom ?? !1), d(Et, r.displayConditions?.onRequest ?? null), d(Jt, t.capabilities ?? {}), d(gn, b);
|
|
3046
|
+
let B = Wr(r.lint) ? null : Kr({
|
|
3047
|
+
content: n.content,
|
|
3048
|
+
get options() {
|
|
3049
|
+
return zr({
|
|
3050
|
+
...r,
|
|
3051
|
+
content: n.content.value,
|
|
3052
|
+
contentLocale: n.activeLocale?.value ?? void 0
|
|
3053
|
+
});
|
|
3054
|
+
},
|
|
3055
|
+
customBlocks: r.customBlocks,
|
|
3056
|
+
mergeTagSyntax: j,
|
|
3057
|
+
updateBlock: n.updateBlock,
|
|
3058
|
+
updateSettings: n.updateSettings,
|
|
3059
|
+
removeBlock: n.removeBlock
|
|
3060
|
+
});
|
|
3061
|
+
d(yt, B);
|
|
3062
|
+
function te() {
|
|
3063
|
+
y?.(), B?.destroy(), _?.destroy(), m.destroy();
|
|
3064
|
+
}
|
|
3065
|
+
return {
|
|
3066
|
+
t: o,
|
|
3067
|
+
format: s,
|
|
3068
|
+
editorRoot: A,
|
|
3069
|
+
history: m,
|
|
3070
|
+
blockActions: h,
|
|
3071
|
+
conditionPreview: g,
|
|
3072
|
+
autoSave: _,
|
|
3073
|
+
resolvedTheme: l,
|
|
3074
|
+
themeStyles: p,
|
|
3075
|
+
themeOverrides: f,
|
|
3076
|
+
registry: w,
|
|
3077
|
+
keyboardReorder: b,
|
|
3078
|
+
templateLint: B,
|
|
3079
|
+
popoverRoot: k,
|
|
3080
|
+
mergeTagSampleMode: P,
|
|
3081
|
+
previewResolution: F,
|
|
3082
|
+
appliesConditionFilter: L,
|
|
3083
|
+
registerCustomBlocks: E,
|
|
3084
|
+
setMergeTags: N,
|
|
3085
|
+
mergeTags: M,
|
|
3086
|
+
mergeTagSyntax: j,
|
|
3087
|
+
destroy: te
|
|
3088
|
+
};
|
|
3089
|
+
}
|
|
3090
|
+
// src/composables/useSmallScreenNotice.ts
|
|
3091
|
+
var is = "(max-width: 767px)";
|
|
3092
|
+
function as(e) {
|
|
3093
|
+
let n = t(is);
|
|
3094
|
+
return {
|
|
3095
|
+
isSmallScreen: n,
|
|
3096
|
+
showNotice: I(() => (F(e) ?? !0) && n.value)
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
export { yi as A, Tr as B, Hi as C, Wi as D, Di as E, mi as F, yr as H, Vr as I, zr as L, _i as M, gi as N, Oi as O, hi as P, Pr as R, Ni as S, Ri as T, br as V, ca as _, zo as a, Ji as b, vo as c, ho as d, Pa as f, ma as g, Ea as h, Go as i, vi as j, di as k, xo as l, Aa as m, rs as n, Io as o, Na as p, ts as r, Oo as s, as as t, _o as u, oa as v, Li as w, Ai as x, Zi as y, Mr as z };
|
|
3100
|
+
|
|
3101
|
+
//# sourceMappingURL=composables-D3lsO7Io.js.map
|