@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
|
@@ -333,23 +333,23 @@ function ve(e) {
|
|
|
333
333
|
}
|
|
334
334
|
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, g(t, e) ? e : t;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ye(e) {
|
|
337
337
|
let t = ve(e);
|
|
338
338
|
if (t.type === "wrapper") {
|
|
339
|
-
let e = t.children.map(
|
|
339
|
+
let e = t.children.map(ye);
|
|
340
340
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
341
341
|
...t,
|
|
342
342
|
children: e
|
|
343
343
|
} : t;
|
|
344
344
|
}
|
|
345
345
|
if (t.type !== "section") return t;
|
|
346
|
-
let n = t.children.map((e) => e.map(
|
|
346
|
+
let n = t.children.map((e) => e.map(ye));
|
|
347
347
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
348
348
|
...t,
|
|
349
349
|
children: n
|
|
350
350
|
} : t;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function be(e, t, n) {
|
|
353
353
|
if (e.type === "custom") return !1;
|
|
354
354
|
if (e.type === "section") return t === "columns";
|
|
355
355
|
let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
|
|
@@ -370,10 +370,10 @@ function ye(e, t, n) {
|
|
|
370
370
|
}
|
|
371
371
|
return !1;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function xe(e) {
|
|
374
374
|
return ve(e);
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function x(e, t, n) {
|
|
377
377
|
if (!y(t)) return !1;
|
|
378
378
|
let r = t.split("."), i = r.pop(), a = r.reduce(_e, e);
|
|
379
379
|
if (Array.isArray(a)) {
|
|
@@ -382,21 +382,21 @@ function S(e, t, n) {
|
|
|
382
382
|
}
|
|
383
383
|
return v(a) ? (n === null ? delete a[i] : a[i] = h(n), !0) : !1;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Se(e, t) {
|
|
386
386
|
let [n, ...r] = t.split(".");
|
|
387
387
|
if (n === void 0) return [""];
|
|
388
388
|
let i = [];
|
|
389
389
|
if (n === "*") {
|
|
390
390
|
let t = Array.isArray(e) ? e : [];
|
|
391
|
-
for (let e of t) if (v(e) && typeof e.id == "string") for (let t of r.length ?
|
|
391
|
+
for (let e of t) if (v(e) && typeof e.id == "string") for (let t of r.length ? Se(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
|
|
392
392
|
return i;
|
|
393
393
|
}
|
|
394
394
|
let a = v(e) ? e[n] : void 0;
|
|
395
395
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
396
|
-
for (let e of
|
|
396
|
+
for (let e of Se(a, r.join("."))) i.push(`${n}.${e}`);
|
|
397
397
|
return i;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function S(e, t = []) {
|
|
400
400
|
if (e.type === "custom") {
|
|
401
401
|
let n = t.find((t) => t.type === e.customType), r = new Set((n?.fields ?? []).filter((e) => e.type === "text" || e.type === "textarea").map((e) => e.key)), i = e.fieldValues;
|
|
402
402
|
return v(i) ? Object.keys(i).filter((e) => r.has(e)).map((e) => `fieldValues.${e}`) : [];
|
|
@@ -411,9 +411,9 @@ function C(e, t = []) {
|
|
|
411
411
|
cells: e.cells.filter(n)
|
|
412
412
|
}))
|
|
413
413
|
} : e;
|
|
414
|
-
return (me[e.type] ?? []).flatMap((e) =>
|
|
414
|
+
return (me[e.type] ?? []).flatMap((e) => Se(r, e));
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function C(e, t) {
|
|
417
417
|
return (me[e] ?? []).some((e) => {
|
|
418
418
|
let n = e.split("."), r = t.split(".");
|
|
419
419
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
@@ -436,8 +436,8 @@ function we(e, t, n) {
|
|
|
436
436
|
if (t === n) return i;
|
|
437
437
|
let a = r.l10n?.[t];
|
|
438
438
|
if (!a) return i;
|
|
439
|
-
for (let [e, t] of T(a.set))
|
|
440
|
-
for (let [t, n] of Object.entries(a.text ?? {})) b(e, t) !== void 0 &&
|
|
439
|
+
for (let [e, t] of T(a.set)) x(i, e, t);
|
|
440
|
+
for (let [t, n] of Object.entries(a.text ?? {})) b(e, t) !== void 0 && x(i, t, n.value);
|
|
441
441
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete i.renderedHtml, i;
|
|
442
442
|
}
|
|
443
443
|
function Te(e, t) {
|
|
@@ -462,8 +462,8 @@ function De(e, t, n) {
|
|
|
462
462
|
return n.type === "section" && Array.isArray(n.children) ? n.children = n.children.map((e) => a(e)) : n.type === "wrapper" && Array.isArray(n.children) && (n.children = a(n.children)), [n];
|
|
463
463
|
}), o = h(Ee(e.settings)), s = e.settings?.l10n?.[t];
|
|
464
464
|
if (t !== r && s) {
|
|
465
|
-
for (let [e, t] of T(s.set))
|
|
466
|
-
for (let [t, n] of Object.entries(s.text ?? {})) b(e.settings, t) !== void 0 &&
|
|
465
|
+
for (let [e, t] of T(s.set)) x(o, e, t);
|
|
466
|
+
for (let [t, n] of Object.entries(s.text ?? {})) b(e.settings, t) !== void 0 && x(o, t, n.value);
|
|
467
467
|
}
|
|
468
468
|
return o.locale = t, {
|
|
469
469
|
blocks: a(e.blocks),
|
|
@@ -486,7 +486,7 @@ function Oe(e, t, n = []) {
|
|
|
486
486
|
for (let r of e) {
|
|
487
487
|
if (Te(r, t)) continue;
|
|
488
488
|
let e = r.l10n?.[t];
|
|
489
|
-
i(r.id, r,
|
|
489
|
+
i(r.id, r, S(r, n), e?.text);
|
|
490
490
|
let o = r.children;
|
|
491
491
|
if (r.type === "section" && Array.isArray(o)) for (let e of o) a(e);
|
|
492
492
|
else r.type === "wrapper" && Array.isArray(o) && a(o);
|
|
@@ -506,7 +506,7 @@ function Ae(e, t, n = []) {
|
|
|
506
506
|
let r = [], i = (e, n, i) => {
|
|
507
507
|
r.push(...je(n, t, i).map((t) => `${e}/${t}`));
|
|
508
508
|
}, a = (e) => {
|
|
509
|
-
for (let t of e) i(t.id, t,
|
|
509
|
+
for (let t of e) i(t.id, t, S(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
|
|
510
510
|
};
|
|
511
511
|
return a(e.blocks), i("settings", e.settings, _), r;
|
|
512
512
|
}
|
|
@@ -521,8 +521,8 @@ function Me(e, t, n = {}) {
|
|
|
521
521
|
let r = E(e), i = (e, n, i) => {
|
|
522
522
|
let a = je(e, t, i), o = h(e.l10n ?? {}), s = o[t] ?? {}, c = h(e);
|
|
523
523
|
delete c.l10n;
|
|
524
|
-
for (let [e, t] of T(s.set))
|
|
525
|
-
for (let [t, n] of Object.entries(s.text ?? {})) b(e, t) !== void 0 &&
|
|
524
|
+
for (let [e, t] of T(s.set)) x(c, e, t);
|
|
525
|
+
for (let [t, n] of Object.entries(s.text ?? {})) b(e, t) !== void 0 && x(c, t, n.value);
|
|
526
526
|
delete o[t];
|
|
527
527
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
528
528
|
...Object.keys(s.set ?? {}),
|
|
@@ -560,8 +560,8 @@ function Me(e, t, n = {}) {
|
|
|
560
560
|
};
|
|
561
561
|
for (let t of Object.values(o)) {
|
|
562
562
|
let n = h(e);
|
|
563
|
-
for (let [e, r] of T(t.set))
|
|
564
|
-
for (let [r, i] of Object.entries(t.text ?? {})) b(e, r) !== void 0 &&
|
|
563
|
+
for (let [e, r] of T(t.set)) x(n, e, r);
|
|
564
|
+
for (let [r, i] of Object.entries(t.text ?? {})) b(e, r) !== void 0 && x(n, r, i.value);
|
|
565
565
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
566
566
|
let i = b(c, n);
|
|
567
567
|
if (typeof i != "string") (t.set ??= {})[n] = r.value, delete t.text[n];
|
|
@@ -574,7 +574,7 @@ function Me(e, t, n = {}) {
|
|
|
574
574
|
}
|
|
575
575
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
576
576
|
}, a = (e) => e.map((e) => {
|
|
577
|
-
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] :
|
|
577
|
+
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : S(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : C(e.type, n), t);
|
|
578
578
|
return e.type === "custom" && r.type === "custom" && !g(e.fieldValues, r.fieldValues) && delete r.renderedHtml, r.type === "section" ? r.children = r.children.map(a) : r.type === "wrapper" && (r.children = a(r.children)), r;
|
|
579
579
|
}), o = i(e.settings, (e) => _.includes(e), _);
|
|
580
580
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
@@ -585,7 +585,7 @@ function Me(e, t, n = {}) {
|
|
|
585
585
|
function Ne(e, t, n = []) {
|
|
586
586
|
let r = Object.fromEntries(F(e.blocks).flatMap((e) => {
|
|
587
587
|
if (e.type !== "custom") return [];
|
|
588
|
-
let t =
|
|
588
|
+
let t = S(e, n).filter((t) => typeof b(e, t) == "string");
|
|
589
589
|
return t.length && ze.has(e.id) && k("invalid_operation", 0, Be), t.length ? [[e.id, t]] : [];
|
|
590
590
|
}));
|
|
591
591
|
return {
|
|
@@ -603,7 +603,7 @@ var D = class extends Error {
|
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
605
|
function Pe(e) {
|
|
606
|
-
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
606
|
+
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
607
607
|
}
|
|
608
608
|
function Fe(e, t, n = {}) {
|
|
609
609
|
let r = h(e);
|
|
@@ -639,15 +639,15 @@ function A(e) {
|
|
|
639
639
|
function j(e) {
|
|
640
640
|
return e.type === "section";
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function M(e) {
|
|
643
643
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Ve(e) {
|
|
646
646
|
let t = e.children;
|
|
647
647
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
let n =
|
|
649
|
+
function N(e, t) {
|
|
650
|
+
let n = M(e);
|
|
651
651
|
for (let e = 0; e < n.length; e++) {
|
|
652
652
|
let r = n[e];
|
|
653
653
|
if (!A(r)) continue;
|
|
@@ -677,33 +677,33 @@ function M(e, t) {
|
|
|
677
677
|
}
|
|
678
678
|
return null;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function He(e) {
|
|
681
681
|
let t = typeof e.id == "string" ? [e.id] : [];
|
|
682
|
-
if (j(e)) for (let n of
|
|
682
|
+
if (j(e)) for (let n of Ve(e)) t.push(...Ue(n));
|
|
683
683
|
return t;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return e.flatMap((e) => A(e) ?
|
|
685
|
+
function Ue(e) {
|
|
686
|
+
return e.flatMap((e) => A(e) ? He(e) : []);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function We(e, t) {
|
|
689
689
|
return typeof e.blockId != "string" || e.blockId === "" ? k("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function Ge(e, t) {
|
|
692
692
|
let n = e.parent;
|
|
693
693
|
return n === null ? null : A(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
694
694
|
sectionId: n.sectionId,
|
|
695
695
|
column: n.column
|
|
696
696
|
} : k("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Ke(e, t) {
|
|
699
699
|
let n = e.after;
|
|
700
700
|
return n === null ? null : typeof n == "string" && n !== "" ? n : k("invalid_operation", t, "after must be null or a block id.");
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function P(e, t) {
|
|
703
703
|
let n = e.expect;
|
|
704
704
|
return n == null ? null : A(n) ? n : k("invalid_operation", t, "expect must be an object.");
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function qe(e, t, n) {
|
|
707
707
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
708
708
|
(r === null || A(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || k("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
709
709
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
@@ -715,29 +715,29 @@ function Je(e, t, n) {
|
|
|
715
715
|
unset: i
|
|
716
716
|
};
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Je(e, t, n) {
|
|
719
719
|
if (A(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || k("invalid_operation", t, "A block needs a non-empty string id and a string type."), !j(e)) return;
|
|
720
720
|
n && k("invalid_operation", t, "Sections can only be placed at the top level.");
|
|
721
721
|
let r = e.children;
|
|
722
722
|
Array.isArray(r) && r.every((e) => Array.isArray(e)) || k("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
723
|
-
for (let e of r) for (let n of e)
|
|
723
|
+
for (let e of r) for (let n of e) Je(n, t, !0);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Ye(e, t) {
|
|
726
726
|
return e.session === null || t.sessionId !== e.session;
|
|
727
727
|
}
|
|
728
728
|
function Xe(e, t, n) {
|
|
729
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
729
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && Ye(e, n));
|
|
730
730
|
r && k("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
731
731
|
}
|
|
732
732
|
function Ze(e, t, n, r) {
|
|
733
|
-
e.locks.find((r) =>
|
|
733
|
+
e.locks.find((r) => Ye(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && k("lock_held", r, `Block "${t}" is being edited in another session.`, t);
|
|
734
734
|
}
|
|
735
735
|
function Qe(e, t, n, r) {
|
|
736
736
|
for (let [i, a] of Object.entries(t)) a !== void 0 && (g(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || k("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
737
737
|
}
|
|
738
738
|
function $e(e, t, n) {
|
|
739
739
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
740
|
-
let r =
|
|
740
|
+
let r = N(e, t.sectionId);
|
|
741
741
|
if (!r) return k("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
742
742
|
if (!j(r.block)) return k("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
743
743
|
let i = r.block.children;
|
|
@@ -798,20 +798,20 @@ function at(e, t, n, r) {
|
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
800
|
function ot(e, t, n) {
|
|
801
|
-
let r =
|
|
802
|
-
|
|
801
|
+
let r = Ge(t, n), i = Ke(t, n), a = t.block;
|
|
802
|
+
Je(a, n, r !== null), it({
|
|
803
803
|
blocks: [a],
|
|
804
804
|
settings: e.settings
|
|
805
805
|
}, n);
|
|
806
|
-
let o = new Set(
|
|
807
|
-
for (let e of
|
|
806
|
+
let o = new Set(Ue(M(e))), s = /* @__PURE__ */ new Set();
|
|
807
|
+
for (let e of He(a)) (o.has(e) || s.has(e)) && k("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
808
808
|
let c = $e(e, r, n), l = et(c, i, n);
|
|
809
809
|
St(e, a, r, n, !0), c.splice(l, 0, h(a));
|
|
810
810
|
}
|
|
811
811
|
function st(e, t, n, r) {
|
|
812
|
-
let i =
|
|
812
|
+
let i = We(t, n), a = Ge(t, n), o = Ke(t, n), s = P(t, n), c = N(e, i);
|
|
813
813
|
if (!c) return k("block_missing", n, `No block with id "${i}".`, i);
|
|
814
|
-
if (Xe(r,
|
|
814
|
+
if (Xe(r, He(c.block), n), s) {
|
|
815
815
|
let e = c.index > 0 ? c.list[c.index - 1] : null, t = A(e) ? e.id ?? null : null;
|
|
816
816
|
g(c.parent, s.parent ?? null) && g(t, s.after ?? null) || k("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
817
817
|
}
|
|
@@ -820,12 +820,12 @@ function st(e, t, n, r) {
|
|
|
820
820
|
et(l.filter((e) => e !== c.block), o, n), St(e, c.block, a, n, !1), c.list.splice(c.index, 1), l.splice(et(l, o, n), 0, c.block);
|
|
821
821
|
}
|
|
822
822
|
function ct(e, t, n, r) {
|
|
823
|
-
let i =
|
|
823
|
+
let i = We(t, n), a = P(t, n), o = N(e, i);
|
|
824
824
|
if (!o) return k("block_missing", n, `No block with id "${i}".`, i);
|
|
825
|
-
Xe(r,
|
|
825
|
+
Xe(r, He(o.block), n), a && !g(o.block, a.block ?? null) && k("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
826
826
|
}
|
|
827
827
|
function lt(e, t, n, r) {
|
|
828
|
-
let i =
|
|
828
|
+
let i = We(t, n), { set: a, unset: o } = qe(t, n, Ie), s = P(t, n), c = N(e, i);
|
|
829
829
|
if (!c) return k("block_missing", n, `No block with id "${i}".`, i);
|
|
830
830
|
let l = c.block, u = j(l);
|
|
831
831
|
u && o.includes("columns") && k("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Xe(r, [i], n), s && Qe(l, s, n, i);
|
|
@@ -837,15 +837,15 @@ function lt(e, t, n, r) {
|
|
|
837
837
|
blocks: [l],
|
|
838
838
|
settings: e.settings
|
|
839
839
|
}), u && Object.hasOwn(a, "columns") && tt(l, a.columns, n, i), nt(l, a, o);
|
|
840
|
-
let f =
|
|
840
|
+
let f = ye(l);
|
|
841
841
|
g(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), u && f.type === "section" && !g(l.children, f.children) && (l.children = f.children);
|
|
842
842
|
}
|
|
843
843
|
function ut(e, t, n) {
|
|
844
|
-
let { set: r, unset: i } =
|
|
844
|
+
let { set: r, unset: i } = qe(t, n, Le), a = P(t, n);
|
|
845
845
|
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && k("invalid_operation", n, "The default locale can't change while language versions exist."), A(e.settings) || (e.settings = {});
|
|
846
846
|
let o = e.settings;
|
|
847
847
|
a && Qe(o, a, n), nt(o, r, i);
|
|
848
|
-
let s =
|
|
848
|
+
let s = xe(e.settings);
|
|
849
849
|
g(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
850
850
|
}
|
|
851
851
|
function dt(e, t) {
|
|
@@ -861,16 +861,16 @@ function pt(e, t, n) {
|
|
|
861
861
|
(E(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && k("invalid_operation", n, "The locale already exists or its insertion position is invalid."), e.settings.locales || (e.settings.locales = []), e.settings.locales.splice(o, 0, r);
|
|
862
862
|
}
|
|
863
863
|
function F(e) {
|
|
864
|
-
return e.flatMap((e) => A(e) ? [e, ...j(e) ?
|
|
864
|
+
return e.flatMap((e) => A(e) ? [e, ...j(e) ? Ve(e).flatMap(F) : e.type === "wrapper" && Array.isArray(e.children) ? F(e.children) : []] : []);
|
|
865
865
|
}
|
|
866
866
|
function mt(e, t) {
|
|
867
867
|
let n = e.l10n;
|
|
868
868
|
return A(n) && A(n[t]) ? n[t] : {};
|
|
869
869
|
}
|
|
870
870
|
function ht(e, t, n) {
|
|
871
|
-
let r = ft(e, t, n), i =
|
|
871
|
+
let r = ft(e, t, n), i = P(t, n);
|
|
872
872
|
i && (!A(i.blocks) || i.settings !== void 0 && !A(i.settings)) && k("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
|
|
873
|
-
let a = e.settings, o = F(
|
|
873
|
+
let a = e.settings, o = F(M(e)), s = Object.fromEntries(o.flatMap((e) => A(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
|
|
874
874
|
!i || g(s, i.blocks) && g(A(a.l10n) ? a.l10n[r] : void 0, i.settings) || k("precondition_failed", n, `Locale "${r}" has changed since.`);
|
|
875
875
|
for (let e of [...o, a]) A(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
876
876
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
@@ -882,7 +882,7 @@ function gt(e, t, n) {
|
|
|
882
882
|
"unset",
|
|
883
883
|
...n ? [] : ["hidden"]
|
|
884
884
|
].some((t) => e[t] !== void 0) || k("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
|
|
885
|
-
let r =
|
|
885
|
+
let r = P(e, t);
|
|
886
886
|
return r && (r.text !== void 0 && !A(r.text) || r.set !== void 0 && !A(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && k("invalid_operation", t, "The locale layer expect is malformed."), {
|
|
887
887
|
text: e.text ?? {},
|
|
888
888
|
set: e.set ?? {},
|
|
@@ -892,10 +892,10 @@ function gt(e, t, n) {
|
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function _t(e, t, n, r) {
|
|
895
|
-
for (let i of Object.keys(t.text)) y(i) && (r ? _.includes(i) :
|
|
895
|
+
for (let i of Object.keys(t.text)) y(i) && (r ? _.includes(i) : C(String(e.type), i)) && b(e, i) !== void 0 || k("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
|
|
896
896
|
for (let i of Object.keys(t.set)) {
|
|
897
897
|
let a = i.split("."), o = r ? Re : Ie, s = a.length === 1 ? e : b(e, a.slice(0, -1).join("."));
|
|
898
|
-
(!y(i) || o.has(a[0]) || !r &&
|
|
898
|
+
(!y(i) || o.has(a[0]) || !r && be(e, i, t.set[i]) || b(e, i) === void 0 && !A(s)) && k("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
function vt(e, t, n, r) {
|
|
@@ -925,11 +925,11 @@ function xt(e) {
|
|
|
925
925
|
}
|
|
926
926
|
function St(e, t, n, r, i) {
|
|
927
927
|
if (!I(t)) return;
|
|
928
|
-
let a = n === null ? null :
|
|
928
|
+
let a = n === null ? null : N(e, n.sectionId);
|
|
929
929
|
(a !== null && bt(a.block) || i && xt(t)) && k("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", A(t) && typeof t.id == "string" ? t.id : void 0);
|
|
930
930
|
}
|
|
931
931
|
function Ct(e, t, n, r) {
|
|
932
|
-
let i = ft(e, t, n), a =
|
|
932
|
+
let i = ft(e, t, n), a = We(t, n), o = gt(t, n, !1), s = F(M(e)).find((e) => e.id === a);
|
|
933
933
|
s || k("block_missing", n, `No block with id "${a}".`, a), _t(s, o, n, !1), Ze(r, a, i, n), vt(mt(s, i), o.expect, n, a), o.hidden === !0 && I(s) && k("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), yt(s, i, o);
|
|
934
934
|
}
|
|
935
935
|
function wt(e, t, n) {
|
|
@@ -940,7 +940,7 @@ function Tt(e, t, n, r) {
|
|
|
940
940
|
let i = t.content;
|
|
941
941
|
if (!A(i) || !Array.isArray(i.blocks) || !A(i.settings)) return k("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
942
942
|
it(i, n, e);
|
|
943
|
-
let a = r.locks.find((e) =>
|
|
943
|
+
let a = r.locks.find((e) => Ye(r, e));
|
|
944
944
|
a && k("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = h(i.blocks), e.settings = h(i.settings);
|
|
945
945
|
}
|
|
946
946
|
function Et(e, t, n, r) {
|
|
@@ -948,7 +948,7 @@ function Et(e, t, n, r) {
|
|
|
948
948
|
e.settings.locales?.includes(i) || k("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
949
949
|
let a = ke(e, i);
|
|
950
950
|
a.length && k("invalid_operation", n, a.length === 1 ? `1 block is hidden in "${i}". Show it before making it the default.` : `${a.length} blocks are hidden in "${i}". Show them before making it the default.`, a[0]);
|
|
951
|
-
let o = r.locks.find((e) =>
|
|
951
|
+
let o = r.locks.find((e) => Ye(r, e));
|
|
952
952
|
o && k("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
953
953
|
let s = t.customTextFields;
|
|
954
954
|
if (s !== void 0) {
|
|
@@ -956,7 +956,7 @@ function Et(e, t, n, r) {
|
|
|
956
956
|
(!A(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
957
957
|
if (ze.has(e)) return !0;
|
|
958
958
|
let n = s[e], r = t.find((t) => t.id === e);
|
|
959
|
-
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !y(e) || !
|
|
959
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !y(e) || !C("custom", e) || typeof b(r, e) != "string");
|
|
960
960
|
})) && k("invalid_operation", n, Be);
|
|
961
961
|
}
|
|
962
962
|
let c = Me(e, i, t.customTextFields);
|
|
@@ -1342,14 +1342,14 @@ function on(e) {
|
|
|
1342
1342
|
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : an(e.locale) ? "rtl" : "ltr";
|
|
1343
1343
|
}
|
|
1344
1344
|
var sn = 2e4, cn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1345
|
-
function
|
|
1345
|
+
function ln(e, t) {
|
|
1346
1346
|
let n = null, r = "tag";
|
|
1347
1347
|
for (let i = t; i < e.length; i++) {
|
|
1348
1348
|
let t = e[i];
|
|
1349
1349
|
if (n !== null) t === n && (n = null);
|
|
1350
1350
|
else {
|
|
1351
1351
|
if (r === "beforeValue") {
|
|
1352
|
-
if (
|
|
1352
|
+
if (H(t)) continue;
|
|
1353
1353
|
if (cn.has(t)) {
|
|
1354
1354
|
n = t, r = "tag";
|
|
1355
1355
|
continue;
|
|
@@ -1358,14 +1358,14 @@ function H(e, t) {
|
|
|
1358
1358
|
}
|
|
1359
1359
|
if (r === "unquotedValue") {
|
|
1360
1360
|
if (t === ">") return i;
|
|
1361
|
-
|
|
1361
|
+
H(t) && (r = "tag");
|
|
1362
1362
|
} else if (t === "=") r = "beforeValue";
|
|
1363
1363
|
else if (t === ">") return i;
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
return -1;
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function un(e, t) {
|
|
1369
1369
|
let n = null;
|
|
1370
1370
|
for (let r = t; r < e.length; r++) {
|
|
1371
1371
|
let t = e[r];
|
|
@@ -1385,13 +1385,13 @@ function ln(e, t) {
|
|
|
1385
1385
|
nextSpan: -1
|
|
1386
1386
|
};
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function dn(e) {
|
|
1389
1389
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function H(e) {
|
|
1392
1392
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1393
1393
|
}
|
|
1394
|
-
var
|
|
1394
|
+
var fn = {
|
|
1395
1395
|
AMP: "&",
|
|
1396
1396
|
COPY: "©",
|
|
1397
1397
|
GT: ">",
|
|
@@ -1652,50 +1652,50 @@ var dn = {
|
|
|
1652
1652
|
zwj: "",
|
|
1653
1653
|
zwnj: ""
|
|
1654
1654
|
};
|
|
1655
|
-
function
|
|
1655
|
+
function U(e) {
|
|
1656
1656
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
1657
1657
|
if (t[0] === "#") {
|
|
1658
1658
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1659
1659
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1660
1660
|
}
|
|
1661
|
-
return Object.hasOwn(
|
|
1661
|
+
return Object.hasOwn(fn, t) ? fn[t] : e;
|
|
1662
1662
|
}) : e;
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function pn(e, t) {
|
|
1665
1665
|
let n = t.toLowerCase(), r = 0;
|
|
1666
1666
|
for (; r < e.length;) {
|
|
1667
|
-
for (; r < e.length && (
|
|
1667
|
+
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1668
1668
|
if (r >= e.length) break;
|
|
1669
1669
|
let t = r;
|
|
1670
|
-
for (; r < e.length &&
|
|
1670
|
+
for (; r < e.length && dn(e[r]);) r++;
|
|
1671
1671
|
let i = e.substring(t, r).toLowerCase();
|
|
1672
1672
|
if (i === "") {
|
|
1673
1673
|
r++;
|
|
1674
1674
|
continue;
|
|
1675
1675
|
}
|
|
1676
|
-
for (; r < e.length &&
|
|
1676
|
+
for (; r < e.length && H(e[r]);) r++;
|
|
1677
1677
|
if (e[r] !== "=") continue;
|
|
1678
|
-
for (r++; r < e.length &&
|
|
1678
|
+
for (r++; r < e.length && H(e[r]);) r++;
|
|
1679
1679
|
let a = e[r];
|
|
1680
1680
|
if (cn.has(a)) {
|
|
1681
1681
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1682
1682
|
if (o === -1) return null;
|
|
1683
|
-
if (i === n) return
|
|
1683
|
+
if (i === n) return U(e.substring(t, o));
|
|
1684
1684
|
r = o + 1;
|
|
1685
1685
|
continue;
|
|
1686
1686
|
}
|
|
1687
1687
|
let o = r;
|
|
1688
|
-
for (; r < e.length && !
|
|
1689
|
-
if (i === n) return
|
|
1688
|
+
for (; r < e.length && !H(e[r]) && e[r] !== ">";) r++;
|
|
1689
|
+
if (i === n) return U(e.substring(o, r));
|
|
1690
1690
|
}
|
|
1691
1691
|
return null;
|
|
1692
1692
|
}
|
|
1693
|
-
function
|
|
1694
|
-
return
|
|
1693
|
+
function mn(e, t) {
|
|
1694
|
+
return gn(e, t, !0);
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function hn(e) {
|
|
1697
1697
|
let t = [];
|
|
1698
|
-
return
|
|
1698
|
+
return gn(e, (n, r, i) => {
|
|
1699
1699
|
let a = e.slice(r, i);
|
|
1700
1700
|
return t.push({
|
|
1701
1701
|
start: r,
|
|
@@ -1704,7 +1704,7 @@ function mn(e) {
|
|
|
1704
1704
|
}), a;
|
|
1705
1705
|
}, !0), t;
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function gn(e, t, n) {
|
|
1708
1708
|
let r = "", i = 0;
|
|
1709
1709
|
for (; i < e.length;) {
|
|
1710
1710
|
let a = e.indexOf("<span", i);
|
|
@@ -1717,7 +1717,7 @@ function hn(e, t, n) {
|
|
|
1717
1717
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1718
1718
|
continue;
|
|
1719
1719
|
}
|
|
1720
|
-
let { end: s, nextSpan: c } =
|
|
1720
|
+
let { end: s, nextSpan: c } = un(e, a + 5);
|
|
1721
1721
|
if (c !== -1) {
|
|
1722
1722
|
r += e.substring(i, c), i = c;
|
|
1723
1723
|
continue;
|
|
@@ -1726,12 +1726,12 @@ function hn(e, t, n) {
|
|
|
1726
1726
|
r += e.substring(i);
|
|
1727
1727
|
break;
|
|
1728
1728
|
}
|
|
1729
|
-
let l = e.substring(a + 5, s), u =
|
|
1729
|
+
let l = e.substring(a + 5, s), u = vn(l, "data-merge-tag") ?? vn(l, "data-logic-merge-tag");
|
|
1730
1730
|
if (u === null) {
|
|
1731
1731
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1732
1732
|
continue;
|
|
1733
1733
|
}
|
|
1734
|
-
let d =
|
|
1734
|
+
let d = _n(e, s + 1, n);
|
|
1735
1735
|
if (d === -1) {
|
|
1736
1736
|
r += e.substring(i);
|
|
1737
1737
|
break;
|
|
@@ -1740,7 +1740,7 @@ function hn(e, t, n) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return r;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function _n(e, t, n) {
|
|
1744
1744
|
if (!n) {
|
|
1745
1745
|
let n = e.indexOf("</span>", t);
|
|
1746
1746
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1749,7 +1749,7 @@ function gn(e, t, n) {
|
|
|
1749
1749
|
for (; i < e.length;) {
|
|
1750
1750
|
let t = e.indexOf("<", i);
|
|
1751
1751
|
if (t === -1) return -1;
|
|
1752
|
-
let n =
|
|
1752
|
+
let n = ln(e, t + 1);
|
|
1753
1753
|
if (n === -1) return -1;
|
|
1754
1754
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1755
1755
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1757,10 +1757,10 @@ function gn(e, t, n) {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
return -1;
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1761
|
-
return
|
|
1760
|
+
function vn(e, t) {
|
|
1761
|
+
return pn(e, t);
|
|
1762
1762
|
}
|
|
1763
|
-
var
|
|
1763
|
+
var W = {
|
|
1764
1764
|
liquid: {
|
|
1765
1765
|
value: /\{\{.+?\}\}/g,
|
|
1766
1766
|
logic: /\{%-?\s*(\w+).*?-?%\}/g,
|
|
@@ -1786,7 +1786,13 @@ var G = {
|
|
|
1786
1786
|
closer: "=%%"
|
|
1787
1787
|
}
|
|
1788
1788
|
};
|
|
1789
|
-
function
|
|
1789
|
+
function G(e) {
|
|
1790
|
+
return Object.keys(W).find((t) => {
|
|
1791
|
+
let n = W[t];
|
|
1792
|
+
return (e.value === n.value || e.value.source === n.value.source && e.value.flags.replace(/[gy]/g, "") === n.value.flags.replace(/[gy]/g, "")) && (e.logic === n.logic || e.logic.source === n.logic.source && e.logic.flags.replace(/[gy]/g, "") === n.logic.flags.replace(/[gy]/g, ""));
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
function yn(e, t, n) {
|
|
1790
1796
|
for (let r = n; r < e.length; r++) {
|
|
1791
1797
|
let n = e.charCodeAt(r);
|
|
1792
1798
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1804,7 +1810,7 @@ function vn(e, t, n) {
|
|
|
1804
1810
|
};
|
|
1805
1811
|
}
|
|
1806
1812
|
function K(e, t, n, r = 0, i = Infinity) {
|
|
1807
|
-
let a =
|
|
1813
|
+
let a = G(t);
|
|
1808
1814
|
if (!a) {
|
|
1809
1815
|
let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
|
|
1810
1816
|
return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
|
|
@@ -1828,7 +1834,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1828
1834
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1829
1835
|
close: e.startsWith(c, r) ? r : -1,
|
|
1830
1836
|
lineBreak: -1
|
|
1831
|
-
} :
|
|
1837
|
+
} : yn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1832
1838
|
if (i.lineBreak >= 0) {
|
|
1833
1839
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1834
1840
|
p = o > t ? o : r + 1;
|
|
@@ -1850,16 +1856,17 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1850
1856
|
}
|
|
1851
1857
|
return f;
|
|
1852
1858
|
}
|
|
1853
|
-
function
|
|
1854
|
-
|
|
1859
|
+
function bn(e, t) {
|
|
1860
|
+
let n = G(t);
|
|
1861
|
+
if (!n) {
|
|
1855
1862
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
1856
1863
|
return [...e.matchAll(n)].map((e) => ({
|
|
1857
1864
|
index: e.index,
|
|
1858
1865
|
value: e[0]
|
|
1859
1866
|
}));
|
|
1860
1867
|
}
|
|
1861
|
-
if (
|
|
1862
|
-
if (
|
|
1868
|
+
if (n === "handlebars") return K(e, t, "value");
|
|
1869
|
+
if (n === "mailchimp") {
|
|
1863
1870
|
let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
|
|
1864
1871
|
for (; o < e.length;) {
|
|
1865
1872
|
let t = e.indexOf("*|", o);
|
|
@@ -1877,7 +1884,7 @@ function yn(e, t) {
|
|
|
1877
1884
|
o = t + 2;
|
|
1878
1885
|
continue;
|
|
1879
1886
|
}
|
|
1880
|
-
let c =
|
|
1887
|
+
let c = yn(e, "|*", a.lastIndex);
|
|
1881
1888
|
if (c.lineBreak >= 0) {
|
|
1882
1889
|
o = c.lineBreak + 1;
|
|
1883
1890
|
continue;
|
|
@@ -1892,78 +1899,78 @@ function yn(e, t) {
|
|
|
1892
1899
|
}
|
|
1893
1900
|
return n;
|
|
1894
1901
|
}
|
|
1895
|
-
let
|
|
1896
|
-
for (;
|
|
1897
|
-
let
|
|
1898
|
-
|
|
1902
|
+
let r = [], i = 0, a = K(e, t, "value", i, 1)[0], o = K(e, t, "logic", i, 1)[0];
|
|
1903
|
+
for (; a || o;) {
|
|
1904
|
+
let n = !o || a && a.index <= o.index ? a : o;
|
|
1905
|
+
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = K(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = K(e, t, "logic", i, 1)[0]);
|
|
1899
1906
|
}
|
|
1900
|
-
return
|
|
1901
|
-
}
|
|
1902
|
-
function bn(e) {
|
|
1903
|
-
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1907
|
+
return r;
|
|
1904
1908
|
}
|
|
1905
1909
|
function xn(e) {
|
|
1906
|
-
return
|
|
1910
|
+
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1907
1911
|
}
|
|
1908
1912
|
function Sn(e) {
|
|
1909
|
-
return
|
|
1913
|
+
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1910
1914
|
}
|
|
1911
1915
|
function Cn(e) {
|
|
1912
|
-
return
|
|
1916
|
+
return xn(e.opener) ?? Sn(e)?.opener ?? null;
|
|
1913
1917
|
}
|
|
1914
1918
|
function wn(e) {
|
|
1915
|
-
return e
|
|
1919
|
+
return xn(e.closer) ?? Sn(e)?.closer ?? null;
|
|
1916
1920
|
}
|
|
1917
1921
|
function Tn(e) {
|
|
1922
|
+
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
1923
|
+
}
|
|
1924
|
+
function En(e) {
|
|
1918
1925
|
let t = e.source, n = e.flags.replace("g", "");
|
|
1919
1926
|
return RegExp(`^${t}$`, n);
|
|
1920
1927
|
}
|
|
1921
|
-
function
|
|
1928
|
+
function Dn(e, t) {
|
|
1922
1929
|
let n = e?.trim() || "";
|
|
1923
|
-
return !
|
|
1930
|
+
return !En(t.logic).test(n) && En(t.value).test(n);
|
|
1924
1931
|
}
|
|
1925
|
-
function
|
|
1932
|
+
function On(e, t) {
|
|
1926
1933
|
let n = t.find((t) => t.value === e);
|
|
1927
1934
|
return n ? n.label : e;
|
|
1928
1935
|
}
|
|
1929
|
-
function On(e, t) {
|
|
1930
|
-
return Rn(e, "data-merge-tag", (e) => Dn(e, t));
|
|
1931
|
-
}
|
|
1932
1936
|
function kn(e, t) {
|
|
1933
|
-
return
|
|
1937
|
+
return zn(e, "data-merge-tag", (e) => On(e, t));
|
|
1934
1938
|
}
|
|
1935
1939
|
function An(e, t) {
|
|
1936
|
-
return
|
|
1940
|
+
return t.find((t) => t.value === e)?.sample;
|
|
1941
|
+
}
|
|
1942
|
+
function jn(e, t) {
|
|
1943
|
+
return zn(e, "data-merge-tag", (e) => Pn(An(e, t) ?? On(e, t)), { unwrap: (e) => An(e, t) !== void 0 });
|
|
1937
1944
|
}
|
|
1938
|
-
function
|
|
1945
|
+
function Mn(e) {
|
|
1939
1946
|
return e.some((e) => e.sample !== void 0);
|
|
1940
1947
|
}
|
|
1941
|
-
function
|
|
1948
|
+
function Nn(e, t) {
|
|
1942
1949
|
if (!e) return e;
|
|
1943
1950
|
let n = e;
|
|
1944
1951
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
1945
1952
|
return n;
|
|
1946
1953
|
}
|
|
1947
|
-
function
|
|
1954
|
+
function Pn(e) {
|
|
1948
1955
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1949
1956
|
}
|
|
1950
|
-
function
|
|
1957
|
+
function Fn(e, t) {
|
|
1951
1958
|
if (!e) return !1;
|
|
1952
|
-
if (
|
|
1959
|
+
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
1953
1960
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
1954
1961
|
return n.test(e) || r.test(e);
|
|
1955
1962
|
}
|
|
1956
|
-
function Fn(e, t) {
|
|
1957
|
-
return Tn(t.logic).test(e?.trim() || "");
|
|
1958
|
-
}
|
|
1959
1963
|
function In(e, t) {
|
|
1964
|
+
return En(t.logic).test(e?.trim() || "");
|
|
1965
|
+
}
|
|
1966
|
+
function Ln(e, t) {
|
|
1960
1967
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
1961
1968
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
1962
1969
|
}
|
|
1963
|
-
function
|
|
1964
|
-
return
|
|
1970
|
+
function Rn(e, t) {
|
|
1971
|
+
return zn(e, "data-logic-merge-tag", (e) => Ln(e, t));
|
|
1965
1972
|
}
|
|
1966
|
-
function
|
|
1973
|
+
function zn(e, t, n, r) {
|
|
1967
1974
|
let i = "", a = 0;
|
|
1968
1975
|
for (; a < e.length;) {
|
|
1969
1976
|
let o = e.indexOf("<span", a);
|
|
@@ -1976,7 +1983,7 @@ function Rn(e, t, n, r) {
|
|
|
1976
1983
|
i += e.substring(a, o + 5), a = o + 5;
|
|
1977
1984
|
continue;
|
|
1978
1985
|
}
|
|
1979
|
-
let { end: c, nextSpan: l } =
|
|
1986
|
+
let { end: c, nextSpan: l } = un(e, o + 5);
|
|
1980
1987
|
if (l !== -1) {
|
|
1981
1988
|
i += e.substring(a, l), a = l;
|
|
1982
1989
|
continue;
|
|
@@ -1985,7 +1992,7 @@ function Rn(e, t, n, r) {
|
|
|
1985
1992
|
i += e.substring(a);
|
|
1986
1993
|
break;
|
|
1987
1994
|
}
|
|
1988
|
-
let u =
|
|
1995
|
+
let u = pn(e.substring(o + 5, c), t);
|
|
1989
1996
|
if (u === null) {
|
|
1990
1997
|
i += e.substring(a, c + 1), a = c + 1;
|
|
1991
1998
|
continue;
|
|
@@ -2000,14 +2007,14 @@ function Rn(e, t, n, r) {
|
|
|
2000
2007
|
}
|
|
2001
2008
|
return i;
|
|
2002
2009
|
}
|
|
2003
|
-
var
|
|
2010
|
+
var Bn = {
|
|
2004
2011
|
title: ["content"],
|
|
2005
2012
|
paragraph: ["content"]
|
|
2006
2013
|
};
|
|
2007
|
-
function
|
|
2014
|
+
function Vn(e) {
|
|
2008
2015
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2009
2016
|
for (; n.exec(e);) {
|
|
2010
|
-
let r =
|
|
2017
|
+
let r = ln(e, n.lastIndex);
|
|
2011
2018
|
if (r < 0) break;
|
|
2012
2019
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2013
2020
|
for (let e; e = o.exec(a);) {
|
|
@@ -2021,17 +2028,17 @@ function Bn(e) {
|
|
|
2021
2028
|
}
|
|
2022
2029
|
return t;
|
|
2023
2030
|
}
|
|
2024
|
-
function
|
|
2025
|
-
let r = n === "html" ?
|
|
2031
|
+
function Hn(e, t, n) {
|
|
2032
|
+
let r = n === "html" ? hn(e) : [], i = n === "html" ? Vn(e) : [], a = r.map((e) => ({
|
|
2026
2033
|
...e,
|
|
2027
2034
|
attribute: !1
|
|
2028
|
-
})), o = 0, s = (n, r) => {
|
|
2029
|
-
let
|
|
2030
|
-
for (; f <
|
|
2031
|
-
let e =
|
|
2035
|
+
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
2036
|
+
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => K(c, t, e, 0, 1)[0]) : null, d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
|
|
2037
|
+
for (; f < c.length;) {
|
|
2038
|
+
let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e) => {
|
|
2032
2039
|
e.lastIndex = f;
|
|
2033
|
-
let t = e.exec(
|
|
2034
|
-
for (; t && t[0].length === 0;) e.lastIndex = t.index + 1, t = e.exec(
|
|
2040
|
+
let t = e.exec(c);
|
|
2041
|
+
for (; t && t[0].length === 0;) e.lastIndex = t.index + 1, t = e.exec(c);
|
|
2035
2042
|
return t ? [{
|
|
2036
2043
|
index: t.index,
|
|
2037
2044
|
value: t[0]
|
|
@@ -2047,20 +2054,20 @@ function Vn(e, t, n) {
|
|
|
2047
2054
|
end: m,
|
|
2048
2055
|
markup: r.value,
|
|
2049
2056
|
attribute: i[o] !== void 0 && p >= i[o].start && m <= i[o].end
|
|
2050
|
-
}), f = r.index + r.value.length,
|
|
2057
|
+
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = K(c, t, l[e], f, 1)[0]);
|
|
2051
2058
|
}
|
|
2052
|
-
},
|
|
2053
|
-
for (let e of r)
|
|
2054
|
-
return
|
|
2059
|
+
}, l = 0;
|
|
2060
|
+
for (let e of r) c(l, e.start), l = e.end;
|
|
2061
|
+
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2055
2062
|
}
|
|
2056
|
-
function
|
|
2063
|
+
function Un(e) {
|
|
2057
2064
|
if (!e.includes("&")) return { text: e };
|
|
2058
2065
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2059
2066
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
2060
2067
|
};
|
|
2061
2068
|
for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
|
|
2062
2069
|
i(a.index);
|
|
2063
|
-
let e =
|
|
2070
|
+
let e = U(a[0]);
|
|
2064
2071
|
t += e;
|
|
2065
2072
|
for (let t = 1; t < e.length; t++) n.push(-1);
|
|
2066
2073
|
r = a.index + a[0].length, n.push(r);
|
|
@@ -2070,17 +2077,17 @@ function Hn(e) {
|
|
|
2070
2077
|
offsets: n
|
|
2071
2078
|
};
|
|
2072
2079
|
}
|
|
2073
|
-
var q = /* @__PURE__ */ new Map(),
|
|
2074
|
-
function
|
|
2080
|
+
var q = /* @__PURE__ */ new Map(), Wn = 32;
|
|
2081
|
+
function Gn(e) {
|
|
2075
2082
|
let t = JSON.stringify(e), n = q.get(t);
|
|
2076
2083
|
if (n === void 0) {
|
|
2077
2084
|
let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2078
|
-
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, q.size >=
|
|
2085
|
+
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, q.size >= Wn && q.delete(q.keys().next().value), q.set(t, n);
|
|
2079
2086
|
}
|
|
2080
2087
|
return n;
|
|
2081
2088
|
}
|
|
2082
|
-
function
|
|
2083
|
-
let r = n.length ?
|
|
2089
|
+
function Kn(e, t, n) {
|
|
2090
|
+
let r = n.length ? Gn(n) : null;
|
|
2084
2091
|
if (!r) return [];
|
|
2085
2092
|
let i = [];
|
|
2086
2093
|
if (t === "text") i.push({
|
|
@@ -2089,7 +2096,7 @@ function Gn(e, t, n) {
|
|
|
2089
2096
|
attribute: !1
|
|
2090
2097
|
});
|
|
2091
2098
|
else {
|
|
2092
|
-
i.push(...
|
|
2099
|
+
i.push(...Vn(e).map((e) => ({
|
|
2093
2100
|
...e,
|
|
2094
2101
|
attribute: !0
|
|
2095
2102
|
})));
|
|
@@ -2100,7 +2107,7 @@ function Gn(e, t, n) {
|
|
|
2100
2107
|
end: r.index,
|
|
2101
2108
|
attribute: !1
|
|
2102
2109
|
});
|
|
2103
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2110
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : ln(e, t.lastIndex);
|
|
2104
2111
|
if (a < 0) return [];
|
|
2105
2112
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2106
2113
|
}
|
|
@@ -2113,7 +2120,7 @@ function Gn(e, t, n) {
|
|
|
2113
2120
|
let a = [];
|
|
2114
2121
|
for (let n of i) {
|
|
2115
2122
|
r.lastIndex = 0;
|
|
2116
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2123
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? Un(i) : {
|
|
2117
2124
|
text: i,
|
|
2118
2125
|
offsets: void 0
|
|
2119
2126
|
};
|
|
@@ -2132,40 +2139,40 @@ function Gn(e, t, n) {
|
|
|
2132
2139
|
}
|
|
2133
2140
|
return a;
|
|
2134
2141
|
}
|
|
2135
|
-
function
|
|
2136
|
-
let i =
|
|
2142
|
+
function qn(e, t, n, r) {
|
|
2143
|
+
let i = Hn(e, t, n), a = Kn(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
|
|
2137
2144
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2138
2145
|
}
|
|
2139
|
-
function
|
|
2146
|
+
function Jn(e, t, n) {
|
|
2140
2147
|
let r = "", i = 0;
|
|
2141
2148
|
return t.forEach((t, a) => {
|
|
2142
2149
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2143
2150
|
}), r + e.slice(i);
|
|
2144
2151
|
}
|
|
2145
|
-
function
|
|
2146
|
-
let i =
|
|
2152
|
+
function Yn(e, t, n, r) {
|
|
2153
|
+
let i = qn(e, t, n, r);
|
|
2147
2154
|
return {
|
|
2148
|
-
text:
|
|
2155
|
+
text: Jn(e, i, i.map((e, t) => t + 1)),
|
|
2149
2156
|
tokens: i.map((e) => e.markup)
|
|
2150
2157
|
};
|
|
2151
2158
|
}
|
|
2152
|
-
function
|
|
2159
|
+
function Xn(e, t) {
|
|
2153
2160
|
let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
|
|
2154
2161
|
let s = Number(i ?? a ?? o);
|
|
2155
2162
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2156
2163
|
});
|
|
2157
2164
|
return r && n.size === t.length ? i : null;
|
|
2158
2165
|
}
|
|
2159
|
-
function
|
|
2160
|
-
let a =
|
|
2166
|
+
function Zn(e, t, n, r, i) {
|
|
2167
|
+
let a = qn(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2161
2168
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2162
2169
|
return n >= 0 && o.add(n), n;
|
|
2163
2170
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2164
2171
|
return a.forEach((e, t) => {
|
|
2165
|
-
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) =>
|
|
2166
|
-
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null :
|
|
2172
|
+
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
|
|
2173
|
+
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : Jn(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2167
2174
|
}
|
|
2168
|
-
function
|
|
2175
|
+
function Qn(e, t, n = []) {
|
|
2169
2176
|
let r = /* @__PURE__ */ new Map();
|
|
2170
2177
|
if (t === E(e) || !e.settings.locales?.includes(t)) return r;
|
|
2171
2178
|
let i = (e, n, i, a) => {
|
|
@@ -2178,7 +2185,7 @@ function Zn(e, t, n = []) {
|
|
|
2178
2185
|
target: e,
|
|
2179
2186
|
path: t,
|
|
2180
2187
|
source: i,
|
|
2181
|
-
format: a &&
|
|
2188
|
+
format: a && Bn[a]?.includes(t) ? "html" : "text",
|
|
2182
2189
|
text: o?.text?.[t]
|
|
2183
2190
|
});
|
|
2184
2191
|
}
|
|
@@ -2187,17 +2194,17 @@ function Zn(e, t, n = []) {
|
|
|
2187
2194
|
if (r.type !== "html" && i({
|
|
2188
2195
|
kind: "block",
|
|
2189
2196
|
blockId: r.id
|
|
2190
|
-
}, r,
|
|
2197
|
+
}, r, S(r, n), r.type), r.type === "section") for (let e of r.children) a(e);
|
|
2191
2198
|
else r.type === "wrapper" && a(r.children);
|
|
2192
2199
|
}
|
|
2193
2200
|
};
|
|
2194
2201
|
return a(e.blocks), i({ kind: "settings" }, e.settings, _), r;
|
|
2195
2202
|
}
|
|
2196
|
-
function
|
|
2203
|
+
function $n(e, t, n) {
|
|
2197
2204
|
let r = n.only === "all" ? null : Oe(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2198
|
-
for (let [r, s] of
|
|
2205
|
+
for (let [r, s] of Qn(e, t, n.definitions)) {
|
|
2199
2206
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2200
|
-
let e =
|
|
2207
|
+
let e = Yn(s.source, n.syntax, s.format, n), t = s.text ? Zn(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
2201
2208
|
a.push({
|
|
2202
2209
|
id: r,
|
|
2203
2210
|
format: s.format,
|
|
@@ -2211,8 +2218,8 @@ function Qn(e, t, n) {
|
|
|
2211
2218
|
tokens: o
|
|
2212
2219
|
};
|
|
2213
2220
|
}
|
|
2214
|
-
function
|
|
2215
|
-
let i =
|
|
2221
|
+
function er(e, t, n, r) {
|
|
2222
|
+
let i = Qn(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2216
2223
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2217
2224
|
else t.type === "wrapper" && o(t.children);
|
|
2218
2225
|
};
|
|
@@ -2228,8 +2235,8 @@ function $n(e, t, n, r) {
|
|
|
2228
2235
|
});
|
|
2229
2236
|
continue;
|
|
2230
2237
|
}
|
|
2231
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2232
|
-
if (!o || u === null ||
|
|
2238
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? Xn(t.text, o) : null;
|
|
2239
|
+
if (!o || u === null || Zn(u, o, r.syntax, n.format, r) === null) {
|
|
2233
2240
|
l.push({
|
|
2234
2241
|
id: t.id,
|
|
2235
2242
|
reason: "tags_changed"
|
|
@@ -2258,7 +2265,7 @@ function $n(e, t, n, r) {
|
|
|
2258
2265
|
rejected: l
|
|
2259
2266
|
};
|
|
2260
2267
|
}
|
|
2261
|
-
function
|
|
2268
|
+
function tr(e) {
|
|
2262
2269
|
return new e.Liquid({
|
|
2263
2270
|
strictVariables: !1,
|
|
2264
2271
|
strictFilters: !1,
|
|
@@ -2276,7 +2283,7 @@ function Y(e) {
|
|
|
2276
2283
|
function X() {
|
|
2277
2284
|
return crypto.randomUUID();
|
|
2278
2285
|
}
|
|
2279
|
-
function
|
|
2286
|
+
function nr(e = 0) {
|
|
2280
2287
|
return {
|
|
2281
2288
|
top: e,
|
|
2282
2289
|
right: e,
|
|
@@ -2285,9 +2292,9 @@ function tr(e = 0) {
|
|
|
2285
2292
|
};
|
|
2286
2293
|
}
|
|
2287
2294
|
function Z(e = 10) {
|
|
2288
|
-
return { padding:
|
|
2295
|
+
return { padding: nr(e) };
|
|
2289
2296
|
}
|
|
2290
|
-
function
|
|
2297
|
+
function rr(e = {}) {
|
|
2291
2298
|
return J({
|
|
2292
2299
|
id: X(),
|
|
2293
2300
|
type: "title",
|
|
@@ -2295,7 +2302,7 @@ function nr(e = {}) {
|
|
|
2295
2302
|
styles: Z()
|
|
2296
2303
|
}, e);
|
|
2297
2304
|
}
|
|
2298
|
-
function
|
|
2305
|
+
function ir(e = {}) {
|
|
2299
2306
|
return J({
|
|
2300
2307
|
id: X(),
|
|
2301
2308
|
type: "paragraph",
|
|
@@ -2303,7 +2310,7 @@ function rr(e = {}) {
|
|
|
2303
2310
|
styles: Z()
|
|
2304
2311
|
}, e);
|
|
2305
2312
|
}
|
|
2306
|
-
function
|
|
2313
|
+
function ar(e = {}) {
|
|
2307
2314
|
return J({
|
|
2308
2315
|
id: X(),
|
|
2309
2316
|
type: "image",
|
|
@@ -2311,7 +2318,7 @@ function ir(e = {}) {
|
|
|
2311
2318
|
styles: Z()
|
|
2312
2319
|
}, e);
|
|
2313
2320
|
}
|
|
2314
|
-
function
|
|
2321
|
+
function or(e = {}) {
|
|
2315
2322
|
return J({
|
|
2316
2323
|
id: X(),
|
|
2317
2324
|
type: "button",
|
|
@@ -2319,7 +2326,7 @@ function ar(e = {}) {
|
|
|
2319
2326
|
styles: Z()
|
|
2320
2327
|
}, e);
|
|
2321
2328
|
}
|
|
2322
|
-
function
|
|
2329
|
+
function sr(e = {}) {
|
|
2323
2330
|
return J({
|
|
2324
2331
|
id: X(),
|
|
2325
2332
|
type: "divider",
|
|
@@ -2327,7 +2334,7 @@ function or(e = {}) {
|
|
|
2327
2334
|
styles: Z(20)
|
|
2328
2335
|
}, e);
|
|
2329
2336
|
}
|
|
2330
|
-
function
|
|
2337
|
+
function cr(e = {}) {
|
|
2331
2338
|
return J({
|
|
2332
2339
|
id: X(),
|
|
2333
2340
|
type: "section",
|
|
@@ -2336,7 +2343,7 @@ function sr(e = {}) {
|
|
|
2336
2343
|
styles: Z(20)
|
|
2337
2344
|
}, e);
|
|
2338
2345
|
}
|
|
2339
|
-
function
|
|
2346
|
+
function lr(e = {}) {
|
|
2340
2347
|
return J({
|
|
2341
2348
|
id: X(),
|
|
2342
2349
|
type: "video",
|
|
@@ -2344,7 +2351,7 @@ function cr(e = {}) {
|
|
|
2344
2351
|
styles: Z()
|
|
2345
2352
|
}, e);
|
|
2346
2353
|
}
|
|
2347
|
-
function
|
|
2354
|
+
function ur(e = {}) {
|
|
2348
2355
|
return J({
|
|
2349
2356
|
id: X(),
|
|
2350
2357
|
type: "social",
|
|
@@ -2353,7 +2360,7 @@ function lr(e = {}) {
|
|
|
2353
2360
|
styles: Z()
|
|
2354
2361
|
}, e);
|
|
2355
2362
|
}
|
|
2356
|
-
function
|
|
2363
|
+
function dr(e = {}) {
|
|
2357
2364
|
return J({
|
|
2358
2365
|
id: X(),
|
|
2359
2366
|
type: "spacer",
|
|
@@ -2361,7 +2368,7 @@ function ur(e = {}) {
|
|
|
2361
2368
|
styles: Z(0)
|
|
2362
2369
|
}, e);
|
|
2363
2370
|
}
|
|
2364
|
-
function
|
|
2371
|
+
function fr(e = {}) {
|
|
2365
2372
|
return J({
|
|
2366
2373
|
id: X(),
|
|
2367
2374
|
type: "html",
|
|
@@ -2369,7 +2376,7 @@ function dr(e = {}) {
|
|
|
2369
2376
|
styles: Z()
|
|
2370
2377
|
}, e);
|
|
2371
2378
|
}
|
|
2372
|
-
function
|
|
2379
|
+
function pr(e = {}) {
|
|
2373
2380
|
return J({
|
|
2374
2381
|
id: X(),
|
|
2375
2382
|
type: "menu",
|
|
@@ -2378,7 +2385,7 @@ function fr(e = {}) {
|
|
|
2378
2385
|
styles: Z()
|
|
2379
2386
|
}, e);
|
|
2380
2387
|
}
|
|
2381
|
-
function
|
|
2388
|
+
function mr(e, t) {
|
|
2382
2389
|
return Array.from({ length: t }, () => ({
|
|
2383
2390
|
id: X(),
|
|
2384
2391
|
cells: Array.from({ length: e }, () => ({
|
|
@@ -2387,16 +2394,16 @@ function pr(e, t) {
|
|
|
2387
2394
|
}))
|
|
2388
2395
|
}));
|
|
2389
2396
|
}
|
|
2390
|
-
function
|
|
2397
|
+
function hr(e = {}) {
|
|
2391
2398
|
return J({
|
|
2392
2399
|
id: X(),
|
|
2393
2400
|
type: "table",
|
|
2394
|
-
rows:
|
|
2401
|
+
rows: mr(3, 3),
|
|
2395
2402
|
...Xt,
|
|
2396
2403
|
styles: Z()
|
|
2397
2404
|
}, e);
|
|
2398
2405
|
}
|
|
2399
|
-
function
|
|
2406
|
+
function gr(e = {}) {
|
|
2400
2407
|
return J({
|
|
2401
2408
|
id: X(),
|
|
2402
2409
|
type: "countdown",
|
|
@@ -2404,12 +2411,12 @@ function hr(e = {}) {
|
|
|
2404
2411
|
styles: Z()
|
|
2405
2412
|
}, e);
|
|
2406
2413
|
}
|
|
2407
|
-
function
|
|
2414
|
+
function _r(e) {
|
|
2408
2415
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2409
2416
|
}
|
|
2410
|
-
function
|
|
2417
|
+
function vr(e) {
|
|
2411
2418
|
let t = {};
|
|
2412
|
-
for (let n of e.fields) t[n.key] = Y(
|
|
2419
|
+
for (let n of e.fields) t[n.key] = Y(_r(n));
|
|
2413
2420
|
let n = J(Z(), Y(e.defaultStyles));
|
|
2414
2421
|
return {
|
|
2415
2422
|
id: X(),
|
|
@@ -2420,14 +2427,14 @@ function _r(e) {
|
|
|
2420
2427
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2421
2428
|
};
|
|
2422
2429
|
}
|
|
2423
|
-
function
|
|
2430
|
+
function yr() {
|
|
2424
2431
|
return {
|
|
2425
2432
|
id: X(),
|
|
2426
2433
|
type: "slot",
|
|
2427
2434
|
styles: Z(0)
|
|
2428
2435
|
};
|
|
2429
2436
|
}
|
|
2430
|
-
function
|
|
2437
|
+
function br(e = {}) {
|
|
2431
2438
|
return J({
|
|
2432
2439
|
id: X(),
|
|
2433
2440
|
type: "wrapper",
|
|
@@ -2435,27 +2442,27 @@ function yr(e = {}) {
|
|
|
2435
2442
|
styles: Z(0)
|
|
2436
2443
|
}, e);
|
|
2437
2444
|
}
|
|
2438
|
-
function
|
|
2445
|
+
function xr(e, t) {
|
|
2439
2446
|
switch (e) {
|
|
2440
|
-
case "section": return
|
|
2441
|
-
case "title": return
|
|
2442
|
-
case "paragraph": return
|
|
2443
|
-
case "image": return
|
|
2444
|
-
case "button": return
|
|
2445
|
-
case "divider": return
|
|
2446
|
-
case "video": return
|
|
2447
|
-
case "social": return
|
|
2448
|
-
case "spacer": return
|
|
2449
|
-
case "html": return
|
|
2450
|
-
case "menu": return
|
|
2451
|
-
case "table": return
|
|
2452
|
-
case "countdown": return
|
|
2447
|
+
case "section": return cr(Y(t?.section));
|
|
2448
|
+
case "title": return rr(Y(t?.title));
|
|
2449
|
+
case "paragraph": return ir(Y(t?.paragraph));
|
|
2450
|
+
case "image": return ar(Y(t?.image));
|
|
2451
|
+
case "button": return or(Y(t?.button));
|
|
2452
|
+
case "divider": return sr(Y(t?.divider));
|
|
2453
|
+
case "video": return lr(Y(t?.video));
|
|
2454
|
+
case "social": return ur(Y(t?.social));
|
|
2455
|
+
case "spacer": return dr(Y(t?.spacer));
|
|
2456
|
+
case "html": return fr(Y(t?.html));
|
|
2457
|
+
case "menu": return pr(Y(t?.menu));
|
|
2458
|
+
case "table": return hr(Y(t?.table));
|
|
2459
|
+
case "countdown": return gr(Y(t?.countdown));
|
|
2453
2460
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2454
2461
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2455
2462
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2456
2463
|
}
|
|
2457
2464
|
}
|
|
2458
|
-
function
|
|
2465
|
+
function Sr(e, t) {
|
|
2459
2466
|
let n = e.l10n;
|
|
2460
2467
|
if (!n || t.size === 0) return;
|
|
2461
2468
|
let r = (n) => {
|
|
@@ -2485,51 +2492,51 @@ function Q(e) {
|
|
|
2485
2492
|
}
|
|
2486
2493
|
if (t.type === "menu") for (let e of t.items) r(e, "items");
|
|
2487
2494
|
if (t.type === "social") for (let e of t.icons) r(e, "icons");
|
|
2488
|
-
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))),
|
|
2495
|
+
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))), Sr(t, n), t;
|
|
2489
2496
|
}
|
|
2490
|
-
var
|
|
2497
|
+
var Cr = "[Templatical] layout: must contain exactly one slot block", wr = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Tr = "[Templatical] layout: a wrapper cannot contain a wrapper", Er = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Dr = "[Templatical] slot is not a valid content block", Or = "[Templatical] wrapper is not a valid content block";
|
|
2491
2498
|
function $(e, t, n = null, r = !1) {
|
|
2492
2499
|
for (let i of e) if (t(i, n, r), Lt(i)) for (let e of i.children) $(e, t, i, !0);
|
|
2493
2500
|
else V(i) && $(i.children, t, i, r);
|
|
2494
2501
|
}
|
|
2495
|
-
function
|
|
2502
|
+
function kr(e) {
|
|
2496
2503
|
let t = 0;
|
|
2497
2504
|
if ($(e.blocks, (e, n, r) => {
|
|
2498
|
-
if (B(e) && (t += 1, r)) throw Error(
|
|
2505
|
+
if (B(e) && (t += 1, r)) throw Error(wr);
|
|
2499
2506
|
if (V(e)) {
|
|
2500
|
-
if (r) throw Error(
|
|
2501
|
-
if (e.children.some(V)) throw Error(
|
|
2507
|
+
if (r) throw Error(wr);
|
|
2508
|
+
if (e.children.some(V)) throw Error(Tr);
|
|
2502
2509
|
}
|
|
2503
|
-
}), t !== 1) throw Error(
|
|
2510
|
+
}), t !== 1) throw Error(Cr);
|
|
2504
2511
|
}
|
|
2505
|
-
function
|
|
2512
|
+
function Ar(e) {
|
|
2506
2513
|
$(e.blocks, (e) => {
|
|
2507
|
-
if (B(e)) throw Error(
|
|
2514
|
+
if (B(e)) throw Error(Dr);
|
|
2508
2515
|
});
|
|
2509
2516
|
}
|
|
2510
|
-
function
|
|
2517
|
+
function jr(e) {
|
|
2511
2518
|
$(e.blocks, (e) => {
|
|
2512
|
-
if (V(e)) throw Error(
|
|
2519
|
+
if (V(e)) throw Error(Or);
|
|
2513
2520
|
});
|
|
2514
2521
|
}
|
|
2515
|
-
function
|
|
2522
|
+
function Mr(e) {
|
|
2516
2523
|
let t = !1;
|
|
2517
2524
|
return $(e.blocks, (e, n) => {
|
|
2518
2525
|
B(e) && n !== null && V(n) && (t = !0);
|
|
2519
2526
|
}), t;
|
|
2520
2527
|
}
|
|
2521
|
-
function
|
|
2528
|
+
function Nr(e) {
|
|
2522
2529
|
if (B(e)) return e;
|
|
2523
2530
|
if (V(e)) {
|
|
2524
2531
|
let t = Q({
|
|
2525
2532
|
...e,
|
|
2526
2533
|
children: []
|
|
2527
2534
|
});
|
|
2528
|
-
return t.children = e.children.map(
|
|
2535
|
+
return t.children = e.children.map(Nr), t;
|
|
2529
2536
|
}
|
|
2530
2537
|
return Q(e);
|
|
2531
2538
|
}
|
|
2532
|
-
function
|
|
2539
|
+
function Pr(e) {
|
|
2533
2540
|
for (let t = 0; t < e.length; t++) {
|
|
2534
2541
|
let n = e[t];
|
|
2535
2542
|
if (B(n)) return {
|
|
@@ -2537,23 +2544,23 @@ function Nr(e) {
|
|
|
2537
2544
|
index: t
|
|
2538
2545
|
};
|
|
2539
2546
|
if (V(n)) {
|
|
2540
|
-
let e =
|
|
2547
|
+
let e = Pr(n.children);
|
|
2541
2548
|
if (e) return e;
|
|
2542
2549
|
}
|
|
2543
2550
|
}
|
|
2544
2551
|
return null;
|
|
2545
2552
|
}
|
|
2546
|
-
function
|
|
2553
|
+
function Fr(e) {
|
|
2547
2554
|
for (let t of e) if (Lt(t)) {
|
|
2548
2555
|
if (t.wrapper) return !0;
|
|
2549
|
-
for (let e of t.children) if (
|
|
2556
|
+
for (let e of t.children) if (Fr(e)) return !0;
|
|
2550
2557
|
}
|
|
2551
2558
|
return !1;
|
|
2552
2559
|
}
|
|
2553
|
-
function
|
|
2554
|
-
if (
|
|
2555
|
-
let n = e.blocks.map(
|
|
2556
|
-
if (!r) throw Error(
|
|
2560
|
+
function Ir(e, t) {
|
|
2561
|
+
if (kr(e), Ar(t), jr(t), Mr(e) && Fr(t.blocks)) throw Error(Er);
|
|
2562
|
+
let n = e.blocks.map(Nr), r = Pr(n);
|
|
2563
|
+
if (!r) throw Error(Cr);
|
|
2557
2564
|
return r.parent.splice(r.index, 1, ...h(t.blocks)), {
|
|
2558
2565
|
blocks: n,
|
|
2559
2566
|
settings: {
|
|
@@ -2562,7 +2569,7 @@ function Fr(e, t) {
|
|
|
2562
2569
|
}
|
|
2563
2570
|
};
|
|
2564
2571
|
}
|
|
2565
|
-
var
|
|
2572
|
+
var Lr = Object.freeze([
|
|
2566
2573
|
"http",
|
|
2567
2574
|
"https",
|
|
2568
2575
|
"mailto",
|
|
@@ -2578,37 +2585,37 @@ Object.freeze([
|
|
|
2578
2585
|
"data",
|
|
2579
2586
|
"vbscript"
|
|
2580
2587
|
]);
|
|
2581
|
-
function
|
|
2588
|
+
function Rr(e) {
|
|
2582
2589
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2583
2590
|
}
|
|
2584
|
-
function
|
|
2585
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2591
|
+
function zr(e) {
|
|
2592
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(Rr(e));
|
|
2586
2593
|
return t ? t[1].toLowerCase() : null;
|
|
2587
2594
|
}
|
|
2588
|
-
var
|
|
2595
|
+
var Br = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, Vr = Object.freeze([
|
|
2589
2596
|
"href",
|
|
2590
2597
|
"xlink:href",
|
|
2591
2598
|
"background",
|
|
2592
2599
|
"poster",
|
|
2593
2600
|
"src"
|
|
2594
|
-
]),
|
|
2601
|
+
]), Hr = Object.freeze([
|
|
2595
2602
|
"srcdoc",
|
|
2596
2603
|
"ping",
|
|
2597
2604
|
"formaction",
|
|
2598
2605
|
"action"
|
|
2599
2606
|
]);
|
|
2600
|
-
function
|
|
2601
|
-
let n =
|
|
2602
|
-
return r === null ||
|
|
2603
|
-
}
|
|
2604
|
-
var Ur = /<\/?p\b[^<>]*>/gi, Wr = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2605
|
-
function Gr(e) {
|
|
2606
|
-
return e.replace(Ur, "").trim() === "";
|
|
2607
|
+
function Ur(e, t) {
|
|
2608
|
+
let n = Rr(e), r = zr(n);
|
|
2609
|
+
return r === null || Lr.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && Br.test(n);
|
|
2607
2610
|
}
|
|
2611
|
+
var Wr = /<\/?p\b[^<>]*>/gi, Gr = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2608
2612
|
function Kr(e) {
|
|
2609
|
-
return
|
|
2613
|
+
return e.replace(Wr, "").trim() === "";
|
|
2610
2614
|
}
|
|
2611
|
-
|
|
2615
|
+
function qr(e) {
|
|
2616
|
+
return Kr(e) ? e : e.replace(Gr, "<p$1> </p>");
|
|
2617
|
+
}
|
|
2618
|
+
var Jr = {
|
|
2612
2619
|
arial: "Arial, sans-serif",
|
|
2613
2620
|
helvetica: "Helvetica, sans-serif",
|
|
2614
2621
|
georgia: "Georgia, serif",
|
|
@@ -2617,13 +2624,13 @@ var qr = {
|
|
|
2617
2624
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2618
2625
|
"courier new": "'Courier New', monospace",
|
|
2619
2626
|
tahoma: "Tahoma, sans-serif"
|
|
2620
|
-
},
|
|
2627
|
+
}, Yr = /* @__PURE__ */ new Set([
|
|
2621
2628
|
"inherit",
|
|
2622
2629
|
"initial",
|
|
2623
2630
|
"unset",
|
|
2624
2631
|
"revert",
|
|
2625
2632
|
"revert-layer"
|
|
2626
|
-
]),
|
|
2633
|
+
]), Xr = /* @__PURE__ */ new Set([
|
|
2627
2634
|
"serif",
|
|
2628
2635
|
"sans-serif",
|
|
2629
2636
|
"monospace",
|
|
@@ -2638,14 +2645,14 @@ var qr = {
|
|
|
2638
2645
|
"math",
|
|
2639
2646
|
"fangsong"
|
|
2640
2647
|
]);
|
|
2641
|
-
function
|
|
2648
|
+
function Zr(e) {
|
|
2642
2649
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2643
2650
|
}
|
|
2644
|
-
function
|
|
2651
|
+
function Qr(e) {
|
|
2645
2652
|
if (typeof e != "string") return [];
|
|
2646
2653
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2647
2654
|
for (;;) {
|
|
2648
|
-
for (; r < t.length &&
|
|
2655
|
+
for (; r < t.length && Zr(t[r]);) r++;
|
|
2649
2656
|
if (r >= t.length) return [];
|
|
2650
2657
|
let e = t[r];
|
|
2651
2658
|
if (e === "\"" || e === "'") {
|
|
@@ -2662,7 +2669,7 @@ function Zr(e) {
|
|
|
2662
2669
|
}
|
|
2663
2670
|
}
|
|
2664
2671
|
if (!o) return [];
|
|
2665
|
-
for (; a < t.length &&
|
|
2672
|
+
for (; a < t.length && Zr(t[a]);) a++;
|
|
2666
2673
|
if (a < t.length && t[a] !== ",") return [];
|
|
2667
2674
|
n.push({
|
|
2668
2675
|
name: i,
|
|
@@ -2670,7 +2677,7 @@ function Zr(e) {
|
|
|
2670
2677
|
}), r = a;
|
|
2671
2678
|
} else {
|
|
2672
2679
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2673
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2680
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Yr.has(a.toLowerCase())) return [];
|
|
2674
2681
|
n.push({
|
|
2675
2682
|
name: a,
|
|
2676
2683
|
quoted: !1
|
|
@@ -2680,26 +2687,26 @@ function Zr(e) {
|
|
|
2680
2687
|
r++;
|
|
2681
2688
|
}
|
|
2682
2689
|
}
|
|
2683
|
-
function Qr(e) {
|
|
2684
|
-
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2685
|
-
}
|
|
2686
2690
|
function $r(e) {
|
|
2687
|
-
return
|
|
2691
|
+
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2688
2692
|
}
|
|
2689
2693
|
function ei(e) {
|
|
2690
|
-
return
|
|
2694
|
+
return !e.quoted && Xr.has(e.name.toLowerCase());
|
|
2695
|
+
}
|
|
2696
|
+
function ti(e) {
|
|
2697
|
+
return Qr(e)[0]?.name ?? "";
|
|
2691
2698
|
}
|
|
2692
|
-
function
|
|
2693
|
-
let n = (e) => `${
|
|
2699
|
+
function ni(e, t) {
|
|
2700
|
+
let n = (e) => `${$r(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2694
2701
|
if (i) return n(i);
|
|
2695
|
-
let a =
|
|
2702
|
+
let a = Qr(e);
|
|
2696
2703
|
if (a.length !== 1) return e;
|
|
2697
2704
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2698
|
-
return c ? n(c) :
|
|
2705
|
+
return c ? n(c) : Jr[s] || (ei(o) ? e : `${$r(o.name)}, ${t.defaultFallback}`);
|
|
2699
2706
|
}
|
|
2700
|
-
function
|
|
2707
|
+
function ri(e) {
|
|
2701
2708
|
if (typeof e != "object" || !e) return !1;
|
|
2702
2709
|
let t = e;
|
|
2703
2710
|
return Array.isArray(t.blocks);
|
|
2704
2711
|
}
|
|
2705
|
-
export {
|
|
2712
|
+
export { tn as $, w as $t, p as A, Oe as At, pr as B, on as Bt, Fe as C, y as Ct, G as D, C as Dt, jr as E, be as Et, tr as F, ye as Ft, ur as G, De as Gt, cr as H, ne as Ht, nn as I, xe as It, rr as J, bn as Jt, dr as K, Tn as Kt, sr as L, b as Lt, or as M, $n as Mt, gr as N, we as Nt, Q as O, V as Ot, vr as P, Qr as Pt, g as Q, le as Qt, fr as R, mn as Rt, er as S, Ur as St, Ar as T, B as Tt, Ne as U, Rn as Ut, ir as V, ni as Vt, yr as W, kn as Wt, br as X, ce as Xt, lr as Y, K as Yt, U as Z, ue as Zt, pe as _, Rt as _t, It as a, S as an, ln as at, sn as b, Dn as bt, s as c, kr as cn, Pe as ct, D as d, An as dt, jn as en, Ae as et, l as f, wn as ft, W as g, Pt as gt, ae as h, ie as ht, e as i, o as in, qr as it, xr as j, ke as jt, Fn as k, Mr as kt, Hr as l, Ln as lt, _ as m, Mn as mt, f as n, n as nn, m as nt, Qt as o, t as on, ti as ot, Lr as p, Cn as pt, hr as q, h as qt, i as r, r as rn, zr as rt, $t as s, Xn as sn, X as st, d as t, Nn as tn, E as tt, Vr as u, On as ut, c as v, he as vt, O as w, Lt as wt, Ir as x, ri as xt, Bn as y, In as yt, ar as z, ee as zt };
|