@templatical/editor 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
- package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
- package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
- package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
- package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
- package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-1hwFiJ0G.js} +39 -68
- package/dist/CollaborationNotices-BWpKzueF.js +73 -0
- package/dist/CollaboratorBar-D87phJsw.js +123 -0
- package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
- package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
- package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
- package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
- package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
- package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
- package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
- package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
- package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
- package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
- package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
- package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
- package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
- package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
- package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
- package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
- package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
- package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
- package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
- package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
- package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
- package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
- package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
- package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
- package/dist/Toolbar-BadDSkkF.js +3153 -0
- package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
- package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
- package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
- package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
- package/dist/WrapperBlock-DiiaxpMb.js +45 -0
- package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-XufhBZYF.js} +38 -67
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
- package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
- package/dist/{cloud-DwjaAdwK.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
- package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
- package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
- package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
- package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
- package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
- package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
- package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
- package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
- package/dist/{es-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
- package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
- package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
- package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
- package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
- package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
- package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
- package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
- package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -2
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
- package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
- package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
- package/dist/cdn/chunks/{src-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
- package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
- package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
- package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
- package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1328 -1069
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
- package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
- package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
- package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
- package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
- package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
- package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
- package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
- package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
- package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
- package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
- package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
- package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
- package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
- package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
- package/dist/{dist-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
- package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
- package/dist/en-BHCMzqib.js +1 -0
- package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
- package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
- package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
- package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
- package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
- package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
- package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
- package/dist/index.d.ts +356 -38
- package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
- package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
- package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
- package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
- package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
- package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
- package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
- package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
- package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
- package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
- package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
- package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
- package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
- package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-tGMRDxr8.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
- package/dist/{search-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
- package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
- package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
- package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
- package/dist/socialIcons-Bwv-49EB.js +2167 -0
- package/dist/{sparkles-CIMfFxKv.js → sparkles-a1qkBZ8X.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +1448 -1189
- package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
- package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
- package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
- package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
- package/dist/{upload-DrNFmVes.js → upload-uU2cK0Ce.js} +1 -1
- package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
- package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
- package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
- package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
- package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
- package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
- package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
- package/package.json +12 -12
- package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
- package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
- package/dist/CollaboratorBar-BazGNMqN.js +0 -103
- package/dist/Toolbar-OGakTBEg.js +0 -2851
- package/dist/WrapperBlock-BOABSX9W.js +0 -46
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
- package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
- package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
- package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
- package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
- package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
- package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
- package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
- package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
- package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
- package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/en-CC-57eC_.js +0 -1
- package/dist/socialIcons-BctavKBN.js +0 -1180
|
@@ -74,7 +74,7 @@ function te(e) {
|
|
|
74
74
|
repeat: !1
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function ne(e) {
|
|
78
78
|
let t = "";
|
|
79
79
|
for (let n of e) {
|
|
80
80
|
let e = n.charCodeAt(0);
|
|
@@ -82,18 +82,56 @@ function f(e) {
|
|
|
82
82
|
}
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function re(e) {
|
|
86
86
|
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
87
87
|
if (!e || !t) return null;
|
|
88
88
|
let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && ee.includes(r.y) ? r.y : "center";
|
|
89
89
|
return {
|
|
90
|
-
url:
|
|
90
|
+
url: ne(t),
|
|
91
91
|
size: n,
|
|
92
92
|
position: `${i} ${a}`,
|
|
93
93
|
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
|
+
//#region ../types/src/hero.ts
|
|
98
|
+
var ie = [
|
|
99
|
+
"top",
|
|
100
|
+
"middle",
|
|
101
|
+
"bottom"
|
|
102
|
+
];
|
|
103
|
+
function ae(e) {
|
|
104
|
+
let t = e.hero;
|
|
105
|
+
if (!t || typeof t != "object") return null;
|
|
106
|
+
if (e.columns !== "1") return {
|
|
107
|
+
applied: !1,
|
|
108
|
+
reason: "columns"
|
|
109
|
+
};
|
|
110
|
+
let n = re(e.backgroundImage);
|
|
111
|
+
if (n === null) return {
|
|
112
|
+
applied: !1,
|
|
113
|
+
reason: "image"
|
|
114
|
+
};
|
|
115
|
+
let r = f(e.backgroundImage), i = oe(t.height) ? Math.round(t.height) : "image";
|
|
116
|
+
return i === "image" && r === null ? {
|
|
117
|
+
applied: !1,
|
|
118
|
+
reason: "size"
|
|
119
|
+
} : {
|
|
120
|
+
applied: !0,
|
|
121
|
+
image: n,
|
|
122
|
+
height: i,
|
|
123
|
+
verticalAlign: ie.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
124
|
+
aspectRatio: r
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function oe(e) {
|
|
128
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
129
|
+
}
|
|
130
|
+
function f(e) {
|
|
131
|
+
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
132
|
+
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
97
135
|
//#region ../types/src/social.ts
|
|
98
136
|
var p = {
|
|
99
137
|
facebook: {
|
|
@@ -171,86 +209,347 @@ var p = {
|
|
|
171
209
|
function h(e) {
|
|
172
210
|
return e === "dark" || e === "light" ? e : void 0;
|
|
173
211
|
}
|
|
174
|
-
function
|
|
212
|
+
function se(e, t) {
|
|
175
213
|
let n = h(t);
|
|
176
214
|
return {
|
|
177
215
|
fill: n ? m[n] : p[e].color,
|
|
178
216
|
onFill: n === "light" ? m.dark : "#ffffff"
|
|
179
217
|
};
|
|
180
218
|
}
|
|
181
|
-
function
|
|
219
|
+
function ce(e, t) {
|
|
182
220
|
let n = h(t);
|
|
183
221
|
return n ? `${e}-${n}` : e;
|
|
184
222
|
}
|
|
185
|
-
function
|
|
223
|
+
function le(e, t) {
|
|
186
224
|
if (h(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
187
225
|
color: m.light,
|
|
188
226
|
opacity: .6,
|
|
189
227
|
width: 1.4
|
|
190
228
|
};
|
|
191
229
|
}
|
|
192
|
-
function
|
|
230
|
+
function ue(e) {
|
|
193
231
|
return e === "plain" ? .84 : .6;
|
|
194
232
|
}
|
|
195
233
|
//#endregion
|
|
196
|
-
//#region ../types/src/
|
|
234
|
+
//#region ../types/src/clone.ts
|
|
197
235
|
function g(e) {
|
|
236
|
+
let t = [];
|
|
237
|
+
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
238
|
+
if (typeof n != "object" || !n) return n;
|
|
239
|
+
for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
|
|
240
|
+
if (!t.includes(n)) return t.push(n), n;
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region ../types/src/deep-equal.ts
|
|
245
|
+
function de(e) {
|
|
246
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
247
|
+
}
|
|
248
|
+
function _(e, t) {
|
|
249
|
+
if (e === t) return !0;
|
|
250
|
+
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => _(e, t[n]));
|
|
251
|
+
if (de(e)) {
|
|
252
|
+
if (!de(t)) return !1;
|
|
253
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
254
|
+
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !_(e[r], t[r])) return !1;
|
|
255
|
+
return !0;
|
|
256
|
+
}
|
|
257
|
+
return !1;
|
|
258
|
+
}
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region ../types/src/operations.ts
|
|
261
|
+
var fe = class extends Error {
|
|
262
|
+
code;
|
|
263
|
+
opIndex;
|
|
264
|
+
blockId;
|
|
265
|
+
constructor(e, t, n, r) {
|
|
266
|
+
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
function pe(e) {
|
|
270
|
+
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
271
|
+
}
|
|
272
|
+
function me(e, t, n = {}) {
|
|
273
|
+
let r = g(e);
|
|
274
|
+
return v(r, t, n), r;
|
|
275
|
+
}
|
|
276
|
+
function v(e, t, n = {}) {
|
|
277
|
+
let r = {
|
|
278
|
+
locks: n.locks ?? [],
|
|
279
|
+
session: n.session ?? null
|
|
280
|
+
};
|
|
281
|
+
t.forEach((t, n) => be(e, t, n, r));
|
|
282
|
+
}
|
|
283
|
+
var he = /* @__PURE__ */ new Set([
|
|
284
|
+
"id",
|
|
285
|
+
"type",
|
|
286
|
+
"children"
|
|
287
|
+
]), ge = /* @__PURE__ */ new Set();
|
|
288
|
+
function y(e, t, n, r) {
|
|
289
|
+
throw new fe(e, t, n, r);
|
|
290
|
+
}
|
|
291
|
+
function b(e) {
|
|
292
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
293
|
+
}
|
|
294
|
+
function x(e) {
|
|
295
|
+
return e.type === "section";
|
|
296
|
+
}
|
|
297
|
+
function S(e) {
|
|
298
|
+
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
299
|
+
}
|
|
300
|
+
function _e(e) {
|
|
301
|
+
let t = e.children;
|
|
302
|
+
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
303
|
+
}
|
|
304
|
+
function C(e, t) {
|
|
305
|
+
let n = S(e);
|
|
306
|
+
for (let e = 0; e < n.length; e++) {
|
|
307
|
+
let r = n[e];
|
|
308
|
+
if (!b(r)) continue;
|
|
309
|
+
if (r.id === t) return {
|
|
310
|
+
block: r,
|
|
311
|
+
list: n,
|
|
312
|
+
index: e,
|
|
313
|
+
parent: null
|
|
314
|
+
};
|
|
315
|
+
if (!x(r) || typeof r.id != "string") continue;
|
|
316
|
+
let i = r.children;
|
|
317
|
+
if (Array.isArray(i)) for (let e = 0; e < i.length; e++) {
|
|
318
|
+
let n = i[e];
|
|
319
|
+
if (Array.isArray(n)) for (let i = 0; i < n.length; i++) {
|
|
320
|
+
let a = n[i];
|
|
321
|
+
if (b(a) && a.id === t) return {
|
|
322
|
+
block: a,
|
|
323
|
+
list: n,
|
|
324
|
+
index: i,
|
|
325
|
+
parent: {
|
|
326
|
+
sectionId: r.id,
|
|
327
|
+
column: e
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
function w(e) {
|
|
336
|
+
let t = typeof e.id == "string" ? [e.id] : [];
|
|
337
|
+
if (x(e)) for (let n of _e(e)) t.push(...T(n));
|
|
338
|
+
return t;
|
|
339
|
+
}
|
|
340
|
+
function T(e) {
|
|
341
|
+
return e.flatMap((e) => b(e) ? w(e) : []);
|
|
342
|
+
}
|
|
343
|
+
function E(e, t) {
|
|
344
|
+
return typeof e.blockId != "string" || e.blockId === "" ? y("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
345
|
+
}
|
|
346
|
+
function D(e, t) {
|
|
347
|
+
let n = e.parent;
|
|
348
|
+
return n === null ? null : b(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
349
|
+
sectionId: n.sectionId,
|
|
350
|
+
column: n.column
|
|
351
|
+
} : y("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
|
|
352
|
+
}
|
|
353
|
+
function O(e, t) {
|
|
354
|
+
let n = e.after;
|
|
355
|
+
return n === null ? null : typeof n == "string" && n !== "" ? n : y("invalid_operation", t, "after must be null or a block id.");
|
|
356
|
+
}
|
|
357
|
+
function k(e, t) {
|
|
358
|
+
let n = e.expect;
|
|
359
|
+
return n == null ? null : b(n) ? n : y("invalid_operation", t, "expect must be an object.");
|
|
360
|
+
}
|
|
361
|
+
function A(e, t, n) {
|
|
362
|
+
let r = e.set ?? null, i = e.unset ?? [];
|
|
363
|
+
(r !== null && !b(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && y("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
364
|
+
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
365
|
+
o.length === 0 && i.length === 0 && y("invalid_operation", t, "Set or unset at least one key.");
|
|
366
|
+
for (let e of [...o, ...i]) n.has(e) && y("invalid_operation", t, `"${e}" can't be set or unset.`);
|
|
367
|
+
let s = i.find((e) => o.includes(e));
|
|
368
|
+
return s !== void 0 && y("invalid_operation", t, `"${s}" is both set and unset.`), {
|
|
369
|
+
set: Object.fromEntries(o.map((e) => [e, a[e]])),
|
|
370
|
+
unset: i
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
function j(e, t, n) {
|
|
374
|
+
if ((!b(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && y("invalid_operation", t, "A block needs a non-empty string id and a string type."), !x(e)) return;
|
|
375
|
+
n && y("invalid_operation", t, "Sections can only be placed at the top level.");
|
|
376
|
+
let r = e.children;
|
|
377
|
+
(!Array.isArray(r) || !r.every((e) => Array.isArray(e))) && y("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
378
|
+
for (let e of r) for (let n of e) j(n, t, !0);
|
|
379
|
+
}
|
|
380
|
+
function ve(e, t) {
|
|
381
|
+
return e.session === null || t.sessionId !== e.session;
|
|
382
|
+
}
|
|
383
|
+
function M(e, t, n) {
|
|
384
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && ve(e, n));
|
|
385
|
+
r && y("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
386
|
+
}
|
|
387
|
+
function N(e, t, n, r) {
|
|
388
|
+
for (let [i, a] of Object.entries(t)) a !== void 0 && (_(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || y("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
389
|
+
}
|
|
390
|
+
function P(e, t, n) {
|
|
391
|
+
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
392
|
+
let r = C(e, t.sectionId);
|
|
393
|
+
if (!r) return y("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
394
|
+
if (!x(r.block)) return y("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
395
|
+
let i = r.block.children;
|
|
396
|
+
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? y("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
397
|
+
}
|
|
398
|
+
function F(e, t, n) {
|
|
399
|
+
if (t === null) return 0;
|
|
400
|
+
let r = e.findIndex((e) => b(e) && e.id === t);
|
|
401
|
+
return r === -1 ? y("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
402
|
+
}
|
|
403
|
+
function ye(e, t, n, r) {
|
|
404
|
+
let i = pe(t), a = Array.isArray(e.children) ? e.children : [];
|
|
405
|
+
for (let e = i; e < a.length; e++) {
|
|
406
|
+
let t = a[e];
|
|
407
|
+
Array.isArray(t) && t.length > 0 && y("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
408
|
+
}
|
|
409
|
+
let o = a.slice(0, i);
|
|
410
|
+
for (; o.length < i;) o.push([]);
|
|
411
|
+
e.children = o;
|
|
412
|
+
}
|
|
413
|
+
function I(e, t, n) {
|
|
414
|
+
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
415
|
+
value: g(r),
|
|
416
|
+
writable: !0,
|
|
417
|
+
enumerable: !0,
|
|
418
|
+
configurable: !0
|
|
419
|
+
}) : e[n] = g(r);
|
|
420
|
+
for (let t of n) delete e[t];
|
|
421
|
+
}
|
|
422
|
+
function be(e, t, n, r) {
|
|
423
|
+
let i = t;
|
|
424
|
+
switch ((!b(i) || typeof i.op != "string") && y("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
|
|
425
|
+
case "addBlock": return xe(e, i, n);
|
|
426
|
+
case "moveBlock": return Se(e, i, n, r);
|
|
427
|
+
case "deleteBlock": return Ce(e, i, n, r);
|
|
428
|
+
case "updateBlock": return we(e, i, n, r);
|
|
429
|
+
case "updateSettings": return Te(e, i, n);
|
|
430
|
+
case "setContent": return Ee(e, i, n, r);
|
|
431
|
+
default: y("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
function xe(e, t, n) {
|
|
435
|
+
let r = D(t, n), i = O(t, n), a = t.block;
|
|
436
|
+
j(a, n, r !== null);
|
|
437
|
+
let o = new Set(T(S(e))), s = /* @__PURE__ */ new Set();
|
|
438
|
+
for (let e of w(a)) (o.has(e) || s.has(e)) && y("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
439
|
+
let c = P(e, r, n);
|
|
440
|
+
c.splice(F(c, i, n), 0, g(a));
|
|
441
|
+
}
|
|
442
|
+
function Se(e, t, n, r) {
|
|
443
|
+
let i = E(t, n), a = D(t, n), o = O(t, n), s = k(t, n), c = C(e, i);
|
|
444
|
+
if (!c) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
445
|
+
if (M(r, w(c.block), n), s) {
|
|
446
|
+
let e = c.index > 0 ? c.list[c.index - 1] : null, t = b(e) ? e.id ?? null : null;
|
|
447
|
+
(!_(c.parent, s.parent ?? null) || !_(t, s.after ?? null)) && y("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
448
|
+
}
|
|
449
|
+
x(c.block) && a !== null && y("invalid_operation", n, "Sections can only be placed at the top level."), o === i && y("invalid_operation", n, "A block can't be placed after itself.");
|
|
450
|
+
let l = P(e, a, n);
|
|
451
|
+
c.list.splice(c.index, 1), l.splice(F(l, o, n), 0, c.block);
|
|
452
|
+
}
|
|
453
|
+
function Ce(e, t, n, r) {
|
|
454
|
+
let i = E(t, n), a = k(t, n), o = C(e, i);
|
|
455
|
+
if (!o) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
456
|
+
M(r, w(o.block), n), a && !_(o.block, a.block ?? null) && y("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
457
|
+
}
|
|
458
|
+
function we(e, t, n, r) {
|
|
459
|
+
let i = E(t, n), { set: a, unset: o } = A(t, n, he), s = k(t, n), c = C(e, i);
|
|
460
|
+
if (!c) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
461
|
+
let l = c.block, u = x(l);
|
|
462
|
+
u && o.includes("columns") && y("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), M(r, [i], n), s && N(l, s, n, i), u && Object.hasOwn(a, "columns") && ye(l, a.columns, n, i), I(l, a, o);
|
|
463
|
+
}
|
|
464
|
+
function Te(e, t, n) {
|
|
465
|
+
let { set: r, unset: i } = A(t, n, ge), a = k(t, n);
|
|
466
|
+
b(e.settings) || (e.settings = {});
|
|
467
|
+
let o = e.settings;
|
|
468
|
+
a && N(o, a, n), I(o, r, i);
|
|
469
|
+
}
|
|
470
|
+
function Ee(e, t, n, r) {
|
|
471
|
+
let i = t.content;
|
|
472
|
+
if (!b(i) || !Array.isArray(i.blocks) || !b(i.settings)) return y("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
473
|
+
let a = r.locks.find((e) => ve(r, e));
|
|
474
|
+
a && y("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = g(i.blocks), e.settings = g(i.settings);
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region ../types/src/config.ts
|
|
478
|
+
var De = class extends Error {
|
|
479
|
+
statusCode;
|
|
480
|
+
code;
|
|
481
|
+
constructor(e, t, n) {
|
|
482
|
+
super(e), this.statusCode = t, this.code = n, this.name = "SdkError";
|
|
483
|
+
}
|
|
484
|
+
get isNotFound() {
|
|
485
|
+
return this.statusCode === 404;
|
|
486
|
+
}
|
|
487
|
+
get isUnauthorized() {
|
|
488
|
+
return this.statusCode === 401;
|
|
489
|
+
}
|
|
490
|
+
get isServerError() {
|
|
491
|
+
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region ../types/src/guards.ts
|
|
496
|
+
function L(e) {
|
|
198
497
|
return e.type === "section";
|
|
199
498
|
}
|
|
200
|
-
function
|
|
499
|
+
function Oe(e) {
|
|
201
500
|
return e.type === "title";
|
|
202
501
|
}
|
|
203
|
-
function
|
|
502
|
+
function ke(e) {
|
|
204
503
|
return e.type === "paragraph";
|
|
205
504
|
}
|
|
206
|
-
function
|
|
505
|
+
function Ae(e) {
|
|
207
506
|
return e.type === "image";
|
|
208
507
|
}
|
|
209
|
-
function
|
|
508
|
+
function je(e) {
|
|
210
509
|
return e.type === "button";
|
|
211
510
|
}
|
|
212
|
-
function
|
|
511
|
+
function Me(e) {
|
|
213
512
|
return e.type === "divider";
|
|
214
513
|
}
|
|
215
|
-
function
|
|
514
|
+
function Ne(e) {
|
|
216
515
|
return e.type === "video";
|
|
217
516
|
}
|
|
218
|
-
function
|
|
517
|
+
function Pe(e) {
|
|
219
518
|
return e.type === "social";
|
|
220
519
|
}
|
|
221
|
-
function
|
|
520
|
+
function Fe(e) {
|
|
222
521
|
return e.type === "spacer";
|
|
223
522
|
}
|
|
224
|
-
function
|
|
523
|
+
function Ie(e) {
|
|
225
524
|
return e.type === "html";
|
|
226
525
|
}
|
|
227
|
-
function
|
|
526
|
+
function Le(e) {
|
|
228
527
|
return e.type === "menu";
|
|
229
528
|
}
|
|
230
|
-
function
|
|
529
|
+
function Re(e) {
|
|
231
530
|
return e.type === "table";
|
|
232
531
|
}
|
|
233
|
-
function
|
|
532
|
+
function ze(e) {
|
|
234
533
|
return e.type === "custom";
|
|
235
534
|
}
|
|
236
|
-
function
|
|
535
|
+
function R(e) {
|
|
237
536
|
return e.type === "slot";
|
|
238
537
|
}
|
|
239
|
-
function
|
|
538
|
+
function z(e) {
|
|
240
539
|
return e.type === "wrapper";
|
|
241
540
|
}
|
|
242
541
|
//#endregion
|
|
243
542
|
//#region ../types/src/defaults.ts
|
|
244
|
-
var
|
|
543
|
+
var Be = {
|
|
245
544
|
content: "<p>Enter your title</p>",
|
|
246
545
|
level: 2,
|
|
247
546
|
textAlign: "left"
|
|
248
|
-
},
|
|
547
|
+
}, Ve = { content: "<p>Enter your text here</p>" }, He = {
|
|
249
548
|
src: "",
|
|
250
549
|
alt: "",
|
|
251
550
|
width: "full",
|
|
252
551
|
align: "center"
|
|
253
|
-
},
|
|
552
|
+
}, Ue = {
|
|
254
553
|
text: "Click Here",
|
|
255
554
|
url: "",
|
|
256
555
|
backgroundColor: "#333333",
|
|
@@ -264,36 +563,36 @@ var ye = {
|
|
|
264
563
|
left: 24
|
|
265
564
|
},
|
|
266
565
|
align: "center"
|
|
267
|
-
},
|
|
566
|
+
}, We = {
|
|
268
567
|
lineStyle: "solid",
|
|
269
568
|
color: "#e0e0e0",
|
|
270
569
|
thickness: 1,
|
|
271
570
|
width: "full"
|
|
272
|
-
},
|
|
571
|
+
}, Ge = { columns: "1" }, Ke = {
|
|
273
572
|
url: "",
|
|
274
573
|
thumbnailUrl: "",
|
|
275
574
|
alt: "Video",
|
|
276
575
|
width: "full",
|
|
277
576
|
align: "center"
|
|
278
|
-
},
|
|
577
|
+
}, qe = {
|
|
279
578
|
iconStyle: "solid",
|
|
280
579
|
iconSize: "medium",
|
|
281
580
|
spacing: 10,
|
|
282
581
|
align: "center"
|
|
283
|
-
},
|
|
582
|
+
}, Je = { height: 24 }, Ye = { content: "" }, Xe = {
|
|
284
583
|
fontSize: 15,
|
|
285
584
|
textAlign: "center",
|
|
286
585
|
separator: "|",
|
|
287
586
|
separatorColor: "#e0e0e0",
|
|
288
587
|
spacing: 10
|
|
289
|
-
},
|
|
588
|
+
}, Ze = {
|
|
290
589
|
hasHeaderRow: !0,
|
|
291
590
|
borderColor: "#e0e0e0",
|
|
292
591
|
borderWidth: 1,
|
|
293
592
|
cellPadding: 8,
|
|
294
593
|
fontSize: 15,
|
|
295
594
|
textAlign: "left"
|
|
296
|
-
},
|
|
595
|
+
}, Qe = {
|
|
297
596
|
targetDate: "",
|
|
298
597
|
timezone: "UTC",
|
|
299
598
|
showDays: !0,
|
|
@@ -313,21 +612,21 @@ var ye = {
|
|
|
313
612
|
expiredMessage: "This offer has expired",
|
|
314
613
|
expiredImageUrl: "",
|
|
315
614
|
hideOnExpiry: !1
|
|
316
|
-
},
|
|
317
|
-
title:
|
|
318
|
-
paragraph:
|
|
319
|
-
image:
|
|
320
|
-
button:
|
|
321
|
-
divider:
|
|
322
|
-
section:
|
|
323
|
-
video:
|
|
324
|
-
social:
|
|
325
|
-
spacer:
|
|
326
|
-
html:
|
|
327
|
-
menu:
|
|
328
|
-
table:
|
|
329
|
-
countdown:
|
|
330
|
-
},
|
|
615
|
+
}, $e = {
|
|
616
|
+
title: Be,
|
|
617
|
+
paragraph: Ve,
|
|
618
|
+
image: He,
|
|
619
|
+
button: Ue,
|
|
620
|
+
divider: We,
|
|
621
|
+
section: Ge,
|
|
622
|
+
video: Ke,
|
|
623
|
+
social: qe,
|
|
624
|
+
spacer: Je,
|
|
625
|
+
html: Ye,
|
|
626
|
+
menu: Xe,
|
|
627
|
+
table: Ze,
|
|
628
|
+
countdown: Qe
|
|
629
|
+
}, et = {
|
|
331
630
|
width: 600,
|
|
332
631
|
backgroundColor: "#ffffff",
|
|
333
632
|
textColor: "#1a1a1a",
|
|
@@ -335,24 +634,24 @@ var ye = {
|
|
|
335
634
|
fontFamily: "Arial",
|
|
336
635
|
locale: "en"
|
|
337
636
|
};
|
|
338
|
-
function
|
|
637
|
+
function tt(e) {
|
|
339
638
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
340
639
|
}
|
|
341
|
-
function
|
|
640
|
+
function B(e, t) {
|
|
342
641
|
let n = { ...e };
|
|
343
642
|
for (let r of Object.keys(t)) {
|
|
344
643
|
let i = e[r], a = t[r];
|
|
345
|
-
a !== void 0 && (n[r] =
|
|
644
|
+
a !== void 0 && (n[r] = tt(i) && tt(a) ? B(i, a) : a);
|
|
346
645
|
}
|
|
347
646
|
return n;
|
|
348
647
|
}
|
|
349
648
|
//#endregion
|
|
350
649
|
//#region ../types/src/template.ts
|
|
351
|
-
function
|
|
650
|
+
function nt(e = "Arial", t) {
|
|
352
651
|
return {
|
|
353
652
|
blocks: [],
|
|
354
653
|
settings: {
|
|
355
|
-
...
|
|
654
|
+
...et,
|
|
356
655
|
fontFamily: e,
|
|
357
656
|
...t
|
|
358
657
|
}
|
|
@@ -360,7 +659,7 @@ function ke(e = "Arial", t) {
|
|
|
360
659
|
}
|
|
361
660
|
//#endregion
|
|
362
661
|
//#region ../types/src/direction.ts
|
|
363
|
-
var
|
|
662
|
+
var rt = [
|
|
364
663
|
"ar",
|
|
365
664
|
"he",
|
|
366
665
|
"iw",
|
|
@@ -374,36 +673,26 @@ var Ae = [
|
|
|
374
673
|
"ckb",
|
|
375
674
|
"ks"
|
|
376
675
|
];
|
|
377
|
-
function
|
|
676
|
+
function it(e) {
|
|
378
677
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
379
|
-
return !!t &&
|
|
380
|
-
}
|
|
381
|
-
function Me(e) {
|
|
382
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : je(e.locale) ? "rtl" : "ltr";
|
|
678
|
+
return !!t && rt.includes(t);
|
|
383
679
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
function E(e) {
|
|
387
|
-
let t = [];
|
|
388
|
-
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
389
|
-
if (typeof n != "object" || !n) return n;
|
|
390
|
-
for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
|
|
391
|
-
if (!t.includes(n)) return t.push(n), n;
|
|
392
|
-
}));
|
|
680
|
+
function at(e) {
|
|
681
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : it(e.locale) ? "rtl" : "ltr";
|
|
393
682
|
}
|
|
394
683
|
//#endregion
|
|
395
684
|
//#region ../types/src/factory.ts
|
|
396
|
-
function
|
|
397
|
-
let n =
|
|
398
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
685
|
+
function V(e, t) {
|
|
686
|
+
let n = g(e);
|
|
687
|
+
return !t || Object.keys(t).length === 0 ? n : B(n, t);
|
|
399
688
|
}
|
|
400
|
-
function
|
|
401
|
-
return e === void 0 ? void 0 :
|
|
689
|
+
function H(e) {
|
|
690
|
+
return e === void 0 ? void 0 : g(e);
|
|
402
691
|
}
|
|
403
|
-
function
|
|
692
|
+
function U() {
|
|
404
693
|
return crypto.randomUUID();
|
|
405
694
|
}
|
|
406
|
-
function
|
|
695
|
+
function ot(e = 0) {
|
|
407
696
|
return {
|
|
408
697
|
top: e,
|
|
409
698
|
right: e,
|
|
@@ -411,135 +700,135 @@ function Ne(e = 0) {
|
|
|
411
700
|
left: e
|
|
412
701
|
};
|
|
413
702
|
}
|
|
414
|
-
function
|
|
415
|
-
return { padding:
|
|
703
|
+
function W(e = 10) {
|
|
704
|
+
return { padding: ot(e) };
|
|
416
705
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
419
|
-
id:
|
|
706
|
+
function st(e = {}) {
|
|
707
|
+
return V({
|
|
708
|
+
id: U(),
|
|
420
709
|
type: "title",
|
|
421
|
-
...
|
|
422
|
-
styles:
|
|
710
|
+
...Be,
|
|
711
|
+
styles: W()
|
|
423
712
|
}, e);
|
|
424
713
|
}
|
|
425
|
-
function
|
|
426
|
-
return
|
|
427
|
-
id:
|
|
714
|
+
function ct(e = {}) {
|
|
715
|
+
return V({
|
|
716
|
+
id: U(),
|
|
428
717
|
type: "paragraph",
|
|
429
|
-
...
|
|
430
|
-
styles:
|
|
718
|
+
...Ve,
|
|
719
|
+
styles: W()
|
|
431
720
|
}, e);
|
|
432
721
|
}
|
|
433
|
-
function
|
|
434
|
-
return
|
|
435
|
-
id:
|
|
722
|
+
function lt(e = {}) {
|
|
723
|
+
return V({
|
|
724
|
+
id: U(),
|
|
436
725
|
type: "image",
|
|
437
|
-
...
|
|
438
|
-
styles:
|
|
726
|
+
...He,
|
|
727
|
+
styles: W()
|
|
439
728
|
}, e);
|
|
440
729
|
}
|
|
441
|
-
function
|
|
442
|
-
return
|
|
443
|
-
id:
|
|
730
|
+
function ut(e = {}) {
|
|
731
|
+
return V({
|
|
732
|
+
id: U(),
|
|
444
733
|
type: "button",
|
|
445
|
-
...
|
|
446
|
-
styles:
|
|
734
|
+
...Ue,
|
|
735
|
+
styles: W()
|
|
447
736
|
}, e);
|
|
448
737
|
}
|
|
449
|
-
function
|
|
450
|
-
return
|
|
451
|
-
id:
|
|
738
|
+
function dt(e = {}) {
|
|
739
|
+
return V({
|
|
740
|
+
id: U(),
|
|
452
741
|
type: "divider",
|
|
453
|
-
...
|
|
454
|
-
styles:
|
|
742
|
+
...We,
|
|
743
|
+
styles: W(20)
|
|
455
744
|
}, e);
|
|
456
745
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
459
|
-
id:
|
|
746
|
+
function ft(e = {}) {
|
|
747
|
+
return V({
|
|
748
|
+
id: U(),
|
|
460
749
|
type: "section",
|
|
461
|
-
...
|
|
750
|
+
...Ge,
|
|
462
751
|
children: [[]],
|
|
463
|
-
styles:
|
|
752
|
+
styles: W(20)
|
|
464
753
|
}, e);
|
|
465
754
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
468
|
-
id:
|
|
755
|
+
function pt(e = {}) {
|
|
756
|
+
return V({
|
|
757
|
+
id: U(),
|
|
469
758
|
type: "video",
|
|
470
|
-
...
|
|
471
|
-
styles:
|
|
759
|
+
...Ke,
|
|
760
|
+
styles: W()
|
|
472
761
|
}, e);
|
|
473
762
|
}
|
|
474
|
-
function
|
|
475
|
-
return
|
|
476
|
-
id:
|
|
763
|
+
function mt(e = {}) {
|
|
764
|
+
return V({
|
|
765
|
+
id: U(),
|
|
477
766
|
type: "social",
|
|
478
767
|
icons: [],
|
|
479
|
-
...
|
|
480
|
-
styles:
|
|
768
|
+
...qe,
|
|
769
|
+
styles: W()
|
|
481
770
|
}, e);
|
|
482
771
|
}
|
|
483
|
-
function
|
|
484
|
-
return
|
|
485
|
-
id:
|
|
772
|
+
function ht(e = {}) {
|
|
773
|
+
return V({
|
|
774
|
+
id: U(),
|
|
486
775
|
type: "spacer",
|
|
487
|
-
...
|
|
488
|
-
styles:
|
|
776
|
+
...Je,
|
|
777
|
+
styles: W(0)
|
|
489
778
|
}, e);
|
|
490
779
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
493
|
-
id:
|
|
780
|
+
function gt(e = {}) {
|
|
781
|
+
return V({
|
|
782
|
+
id: U(),
|
|
494
783
|
type: "html",
|
|
495
|
-
...
|
|
496
|
-
styles:
|
|
784
|
+
...Ye,
|
|
785
|
+
styles: W()
|
|
497
786
|
}, e);
|
|
498
787
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
501
|
-
id:
|
|
788
|
+
function _t(e = {}) {
|
|
789
|
+
return V({
|
|
790
|
+
id: U(),
|
|
502
791
|
type: "menu",
|
|
503
792
|
items: [],
|
|
504
|
-
...
|
|
505
|
-
styles:
|
|
793
|
+
...Xe,
|
|
794
|
+
styles: W()
|
|
506
795
|
}, e);
|
|
507
796
|
}
|
|
508
|
-
function
|
|
797
|
+
function vt(e, t) {
|
|
509
798
|
return Array.from({ length: t }, () => ({
|
|
510
|
-
id:
|
|
799
|
+
id: U(),
|
|
511
800
|
cells: Array.from({ length: e }, () => ({
|
|
512
|
-
id:
|
|
801
|
+
id: U(),
|
|
513
802
|
content: ""
|
|
514
803
|
}))
|
|
515
804
|
}));
|
|
516
805
|
}
|
|
517
|
-
function
|
|
518
|
-
return
|
|
519
|
-
id:
|
|
806
|
+
function yt(e = {}) {
|
|
807
|
+
return V({
|
|
808
|
+
id: U(),
|
|
520
809
|
type: "table",
|
|
521
|
-
rows:
|
|
522
|
-
...
|
|
523
|
-
styles:
|
|
810
|
+
rows: vt(3, 3),
|
|
811
|
+
...Ze,
|
|
812
|
+
styles: W()
|
|
524
813
|
}, e);
|
|
525
814
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
528
|
-
id:
|
|
815
|
+
function bt(e = {}) {
|
|
816
|
+
return V({
|
|
817
|
+
id: U(),
|
|
529
818
|
type: "countdown",
|
|
530
|
-
...
|
|
531
|
-
styles:
|
|
819
|
+
...Qe,
|
|
820
|
+
styles: W()
|
|
532
821
|
}, e);
|
|
533
822
|
}
|
|
534
|
-
function
|
|
823
|
+
function xt(e) {
|
|
535
824
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
536
825
|
}
|
|
537
|
-
function
|
|
826
|
+
function St(e) {
|
|
538
827
|
let t = {};
|
|
539
|
-
for (let n of e.fields) t[n.key] =
|
|
540
|
-
let n =
|
|
828
|
+
for (let n of e.fields) t[n.key] = H(xt(n));
|
|
829
|
+
let n = V(W(), H(e.defaultStyles));
|
|
541
830
|
return {
|
|
542
|
-
id:
|
|
831
|
+
id: U(),
|
|
543
832
|
type: "custom",
|
|
544
833
|
customType: e.type,
|
|
545
834
|
fieldValues: t,
|
|
@@ -547,148 +836,148 @@ function Ie(e) {
|
|
|
547
836
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
548
837
|
};
|
|
549
838
|
}
|
|
550
|
-
function
|
|
839
|
+
function Ct() {
|
|
551
840
|
return {
|
|
552
|
-
id:
|
|
841
|
+
id: U(),
|
|
553
842
|
type: "slot",
|
|
554
|
-
styles:
|
|
843
|
+
styles: W(0)
|
|
555
844
|
};
|
|
556
845
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
559
|
-
id:
|
|
846
|
+
function wt(e = {}) {
|
|
847
|
+
return V({
|
|
848
|
+
id: U(),
|
|
560
849
|
type: "wrapper",
|
|
561
850
|
children: [],
|
|
562
|
-
styles:
|
|
851
|
+
styles: W(0)
|
|
563
852
|
}, e);
|
|
564
853
|
}
|
|
565
|
-
function
|
|
854
|
+
function Tt(e, t) {
|
|
566
855
|
switch (e) {
|
|
567
|
-
case "section": return
|
|
568
|
-
case "title": return
|
|
569
|
-
case "paragraph": return
|
|
570
|
-
case "image": return
|
|
571
|
-
case "button": return
|
|
572
|
-
case "divider": return
|
|
573
|
-
case "video": return
|
|
574
|
-
case "social": return
|
|
575
|
-
case "spacer": return
|
|
576
|
-
case "html": return
|
|
577
|
-
case "menu": return
|
|
578
|
-
case "table": return H(
|
|
579
|
-
case "countdown": return
|
|
856
|
+
case "section": return ft(H(t?.section));
|
|
857
|
+
case "title": return st(H(t?.title));
|
|
858
|
+
case "paragraph": return ct(H(t?.paragraph));
|
|
859
|
+
case "image": return lt(H(t?.image));
|
|
860
|
+
case "button": return ut(H(t?.button));
|
|
861
|
+
case "divider": return dt(H(t?.divider));
|
|
862
|
+
case "video": return pt(H(t?.video));
|
|
863
|
+
case "social": return mt(H(t?.social));
|
|
864
|
+
case "spacer": return ht(H(t?.spacer));
|
|
865
|
+
case "html": return gt(H(t?.html));
|
|
866
|
+
case "menu": return _t(H(t?.menu));
|
|
867
|
+
case "table": return yt(H(t?.table));
|
|
868
|
+
case "countdown": return bt(H(t?.countdown));
|
|
580
869
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
581
870
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
582
871
|
default: throw Error(`Unknown block type: ${e}`);
|
|
583
872
|
}
|
|
584
873
|
}
|
|
585
|
-
function
|
|
874
|
+
function G(e) {
|
|
586
875
|
let t = JSON.parse(JSON.stringify(e));
|
|
587
|
-
if (t.id =
|
|
588
|
-
e.id =
|
|
589
|
-
for (let t of e.cells) t.id =
|
|
876
|
+
if (t.id = U(), t.type === "table") for (let e of t.rows) {
|
|
877
|
+
e.id = U();
|
|
878
|
+
for (let t of e.cells) t.id = U();
|
|
590
879
|
}
|
|
591
|
-
if (t.type === "menu") for (let e of t.items) e.id =
|
|
592
|
-
if (t.type === "social") for (let e of t.icons) e.id =
|
|
593
|
-
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) =>
|
|
880
|
+
if (t.type === "menu") for (let e of t.items) e.id = U();
|
|
881
|
+
if (t.type === "social") for (let e of t.icons) e.id = U();
|
|
882
|
+
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => G(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => G(e))), t;
|
|
594
883
|
}
|
|
595
884
|
//#endregion
|
|
596
885
|
//#region ../types/src/layout.ts
|
|
597
|
-
var
|
|
886
|
+
var Et = "[Templatical] layout: must contain exactly one slot block", Dt = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Ot = "[Templatical] layout: a wrapper cannot contain a wrapper", kt = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", At = "[Templatical] slot is not a valid content block", jt = "[Templatical] wrapper is not a valid content block";
|
|
598
887
|
function K(e, t, n = null, r = !1) {
|
|
599
|
-
for (let i of e) if (t(i, n, r),
|
|
600
|
-
else
|
|
888
|
+
for (let i of e) if (t(i, n, r), L(i)) for (let e of i.children) K(e, t, i, !0);
|
|
889
|
+
else z(i) && K(i.children, t, i, r);
|
|
601
890
|
}
|
|
602
|
-
function
|
|
891
|
+
function Mt(e) {
|
|
603
892
|
let t = 0;
|
|
604
893
|
if (K(e.blocks, (e, n, r) => {
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
if (r) throw Error(
|
|
608
|
-
if (e.children.some(
|
|
894
|
+
if (R(e) && (t += 1, r)) throw Error(Dt);
|
|
895
|
+
if (z(e)) {
|
|
896
|
+
if (r) throw Error(Dt);
|
|
897
|
+
if (e.children.some(z)) throw Error(Ot);
|
|
609
898
|
}
|
|
610
|
-
}), t !== 1) throw Error(
|
|
899
|
+
}), t !== 1) throw Error(Et);
|
|
611
900
|
}
|
|
612
|
-
function
|
|
901
|
+
function Nt(e) {
|
|
613
902
|
K(e.blocks, (e) => {
|
|
614
|
-
if (
|
|
903
|
+
if (R(e)) throw Error(At);
|
|
615
904
|
});
|
|
616
905
|
}
|
|
617
|
-
function
|
|
906
|
+
function Pt(e) {
|
|
618
907
|
K(e.blocks, (e) => {
|
|
619
|
-
if (
|
|
908
|
+
if (z(e)) throw Error(jt);
|
|
620
909
|
});
|
|
621
910
|
}
|
|
622
|
-
function
|
|
911
|
+
function Ft(e) {
|
|
623
912
|
let t = !1;
|
|
624
913
|
return K(e.blocks, (e, n) => {
|
|
625
|
-
|
|
914
|
+
R(e) && n !== null && z(n) && (t = !0);
|
|
626
915
|
}), t;
|
|
627
916
|
}
|
|
628
|
-
function
|
|
629
|
-
if (
|
|
630
|
-
if (
|
|
631
|
-
let t =
|
|
917
|
+
function It(e) {
|
|
918
|
+
if (R(e)) return e;
|
|
919
|
+
if (z(e)) {
|
|
920
|
+
let t = G({
|
|
632
921
|
...e,
|
|
633
922
|
children: []
|
|
634
923
|
});
|
|
635
|
-
return t.children = e.children.map(
|
|
924
|
+
return t.children = e.children.map(It), t;
|
|
636
925
|
}
|
|
637
|
-
return
|
|
926
|
+
return G(e);
|
|
638
927
|
}
|
|
639
|
-
function
|
|
928
|
+
function Lt(e) {
|
|
640
929
|
for (let t = 0; t < e.length; t++) {
|
|
641
930
|
let n = e[t];
|
|
642
|
-
if (
|
|
931
|
+
if (R(n)) return {
|
|
643
932
|
parent: e,
|
|
644
933
|
index: t
|
|
645
934
|
};
|
|
646
|
-
if (
|
|
647
|
-
let e =
|
|
935
|
+
if (z(n)) {
|
|
936
|
+
let e = Lt(n.children);
|
|
648
937
|
if (e) return e;
|
|
649
938
|
}
|
|
650
939
|
}
|
|
651
940
|
return null;
|
|
652
941
|
}
|
|
653
|
-
function
|
|
654
|
-
for (let t of e) if (
|
|
942
|
+
function Rt(e) {
|
|
943
|
+
for (let t of e) if (L(t)) {
|
|
655
944
|
if (t.wrapper) return !0;
|
|
656
|
-
for (let e of t.children) if (
|
|
945
|
+
for (let e of t.children) if (Rt(e)) return !0;
|
|
657
946
|
}
|
|
658
947
|
return !1;
|
|
659
948
|
}
|
|
660
|
-
function
|
|
661
|
-
if (
|
|
662
|
-
let n = e.blocks.map(
|
|
663
|
-
if (!r) throw Error(
|
|
664
|
-
return r.parent.splice(r.index, 1, ...
|
|
949
|
+
function zt(e, t) {
|
|
950
|
+
if (Mt(e), Nt(t), Pt(t), Ft(e) && Rt(t.blocks)) throw Error(kt);
|
|
951
|
+
let n = e.blocks.map(It), r = Lt(n);
|
|
952
|
+
if (!r) throw Error(Et);
|
|
953
|
+
return r.parent.splice(r.index, 1, ...g(t.blocks)), {
|
|
665
954
|
blocks: n,
|
|
666
955
|
settings: {
|
|
667
|
-
...
|
|
956
|
+
...g(t.settings),
|
|
668
957
|
backgroundColor: e.settings.backgroundColor
|
|
669
958
|
}
|
|
670
959
|
};
|
|
671
960
|
}
|
|
672
961
|
//#endregion
|
|
673
962
|
//#region ../types/src/html-scan.ts
|
|
674
|
-
var
|
|
675
|
-
function
|
|
963
|
+
var Bt = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
964
|
+
function Vt(e, t) {
|
|
676
965
|
let n = null;
|
|
677
966
|
for (let r = t; r < e.length; r++) {
|
|
678
967
|
let t = e[r];
|
|
679
968
|
if (n !== null) t === n && (n = null);
|
|
680
|
-
else if (
|
|
969
|
+
else if (Bt.has(t)) n = t;
|
|
681
970
|
else if (t === ">") return r;
|
|
682
971
|
}
|
|
683
972
|
return -1;
|
|
684
973
|
}
|
|
685
|
-
function
|
|
974
|
+
function Ht(e) {
|
|
686
975
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
687
976
|
}
|
|
688
977
|
function q(e) {
|
|
689
978
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
690
979
|
}
|
|
691
|
-
var
|
|
980
|
+
var Ut = {
|
|
692
981
|
amp: "&",
|
|
693
982
|
lt: "<",
|
|
694
983
|
gt: ">",
|
|
@@ -696,22 +985,22 @@ var nt = {
|
|
|
696
985
|
apos: "'",
|
|
697
986
|
nbsp: "\xA0"
|
|
698
987
|
};
|
|
699
|
-
function
|
|
988
|
+
function Wt(e) {
|
|
700
989
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
701
990
|
if (t[0] === "#") {
|
|
702
991
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
703
992
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
704
993
|
}
|
|
705
|
-
return
|
|
994
|
+
return Ut[t.toLowerCase()] ?? e;
|
|
706
995
|
}) : e;
|
|
707
996
|
}
|
|
708
|
-
function
|
|
997
|
+
function Gt(e, t) {
|
|
709
998
|
let n = t.toLowerCase(), r = 0;
|
|
710
999
|
for (; r < e.length;) {
|
|
711
1000
|
for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
|
|
712
1001
|
if (r >= e.length) break;
|
|
713
1002
|
let t = r;
|
|
714
|
-
for (; r < e.length &&
|
|
1003
|
+
for (; r < e.length && Ht(e[r]);) r++;
|
|
715
1004
|
let i = e.substring(t, r).toLowerCase();
|
|
716
1005
|
if (i === "") {
|
|
717
1006
|
r++;
|
|
@@ -721,31 +1010,31 @@ function it(e, t) {
|
|
|
721
1010
|
if (e[r] !== "=") continue;
|
|
722
1011
|
for (r++; r < e.length && q(e[r]);) r++;
|
|
723
1012
|
let a = e[r];
|
|
724
|
-
if (
|
|
1013
|
+
if (Bt.has(a)) {
|
|
725
1014
|
let t = r + 1, o = e.indexOf(a, t);
|
|
726
1015
|
if (o === -1) return null;
|
|
727
|
-
if (i === n) return
|
|
1016
|
+
if (i === n) return Wt(e.substring(t, o));
|
|
728
1017
|
r = o + 1;
|
|
729
1018
|
continue;
|
|
730
1019
|
}
|
|
731
1020
|
let o = r;
|
|
732
1021
|
for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
|
|
733
|
-
if (i === n) return
|
|
1022
|
+
if (i === n) return Wt(e.substring(o, r));
|
|
734
1023
|
}
|
|
735
1024
|
return null;
|
|
736
1025
|
}
|
|
737
1026
|
//#endregion
|
|
738
1027
|
//#region ../types/src/rich-text.ts
|
|
739
|
-
var
|
|
740
|
-
function
|
|
741
|
-
return e.replace(
|
|
1028
|
+
var Kt = /<\/?p\b[^<>]*>/gi, qt = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
1029
|
+
function Jt(e) {
|
|
1030
|
+
return e.replace(Kt, "").trim() === "";
|
|
742
1031
|
}
|
|
743
|
-
function
|
|
744
|
-
return
|
|
1032
|
+
function Yt(e) {
|
|
1033
|
+
return Jt(e) ? e : e.replace(qt, "<p$1> </p>");
|
|
745
1034
|
}
|
|
746
1035
|
//#endregion
|
|
747
1036
|
//#region ../types/src/fonts.ts
|
|
748
|
-
var
|
|
1037
|
+
var Xt = {
|
|
749
1038
|
arial: "Arial, sans-serif",
|
|
750
1039
|
helvetica: "Helvetica, sans-serif",
|
|
751
1040
|
georgia: "Georgia, serif",
|
|
@@ -754,13 +1043,13 @@ var lt = {
|
|
|
754
1043
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
755
1044
|
"courier new": "'Courier New', monospace",
|
|
756
1045
|
tahoma: "Tahoma, sans-serif"
|
|
757
|
-
},
|
|
1046
|
+
}, Zt = /* @__PURE__ */ new Set([
|
|
758
1047
|
"inherit",
|
|
759
1048
|
"initial",
|
|
760
1049
|
"unset",
|
|
761
1050
|
"revert",
|
|
762
1051
|
"revert-layer"
|
|
763
|
-
]),
|
|
1052
|
+
]), Qt = /* @__PURE__ */ new Set([
|
|
764
1053
|
"serif",
|
|
765
1054
|
"sans-serif",
|
|
766
1055
|
"monospace",
|
|
@@ -775,14 +1064,14 @@ var lt = {
|
|
|
775
1064
|
"math",
|
|
776
1065
|
"fangsong"
|
|
777
1066
|
]);
|
|
778
|
-
function
|
|
1067
|
+
function $t(e) {
|
|
779
1068
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
780
1069
|
}
|
|
781
1070
|
function J(e) {
|
|
782
1071
|
if (typeof e != "string") return [];
|
|
783
1072
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
784
1073
|
for (;;) {
|
|
785
|
-
for (; r < t.length &&
|
|
1074
|
+
for (; r < t.length && $t(t[r]);) r++;
|
|
786
1075
|
if (r >= t.length) return [];
|
|
787
1076
|
let e = t[r];
|
|
788
1077
|
if (e === "\"" || e === "'") {
|
|
@@ -799,7 +1088,7 @@ function J(e) {
|
|
|
799
1088
|
}
|
|
800
1089
|
}
|
|
801
1090
|
if (!o) return [];
|
|
802
|
-
for (; a < t.length &&
|
|
1091
|
+
for (; a < t.length && $t(t[a]);) a++;
|
|
803
1092
|
if (a < t.length && t[a] !== ",") return [];
|
|
804
1093
|
n.push({
|
|
805
1094
|
name: i,
|
|
@@ -807,7 +1096,7 @@ function J(e) {
|
|
|
807
1096
|
}), r = a;
|
|
808
1097
|
} else {
|
|
809
1098
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
810
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
1099
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Zt.has(a.toLowerCase())) return [];
|
|
811
1100
|
n.push({
|
|
812
1101
|
name: a,
|
|
813
1102
|
quoted: !1
|
|
@@ -817,22 +1106,22 @@ function J(e) {
|
|
|
817
1106
|
r++;
|
|
818
1107
|
}
|
|
819
1108
|
}
|
|
820
|
-
function
|
|
1109
|
+
function en(e) {
|
|
821
1110
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
822
1111
|
}
|
|
823
|
-
function
|
|
824
|
-
return !e.quoted &&
|
|
1112
|
+
function tn(e) {
|
|
1113
|
+
return !e.quoted && Qt.has(e.name.toLowerCase());
|
|
825
1114
|
}
|
|
826
|
-
function
|
|
1115
|
+
function nn(e) {
|
|
827
1116
|
return J(e)[0]?.name ?? "";
|
|
828
1117
|
}
|
|
829
|
-
function
|
|
830
|
-
let n = (e) => `${
|
|
1118
|
+
function rn(e, t) {
|
|
1119
|
+
let n = (e) => `${en(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
831
1120
|
if (i) return n(i);
|
|
832
1121
|
let a = J(e);
|
|
833
1122
|
if (a.length !== 1) return e;
|
|
834
1123
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
835
|
-
return c ? n(c) :
|
|
1124
|
+
return c ? n(c) : Xt[s] || (tn(o) ? e : `${en(o.name)}, ${t.defaultFallback}`);
|
|
836
1125
|
}
|
|
837
1126
|
//#endregion
|
|
838
1127
|
//#region ../types/src/merge-tags.ts
|
|
@@ -853,33 +1142,33 @@ var Y = {
|
|
|
853
1142
|
value: /%%=.+?=%%/g,
|
|
854
1143
|
logic: /%%\[\s*(\w+).*?\]%%/g
|
|
855
1144
|
}
|
|
856
|
-
},
|
|
1145
|
+
}, an = {
|
|
857
1146
|
liquid: "{{",
|
|
858
1147
|
handlebars: "{{",
|
|
859
1148
|
mailchimp: "*|",
|
|
860
1149
|
ampscript: "%%="
|
|
861
|
-
},
|
|
1150
|
+
}, on = {
|
|
862
1151
|
liquid: "}}",
|
|
863
1152
|
handlebars: "}}",
|
|
864
1153
|
mailchimp: "|*",
|
|
865
1154
|
ampscript: "=%%"
|
|
866
1155
|
};
|
|
867
|
-
function
|
|
868
|
-
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return
|
|
1156
|
+
function sn(e) {
|
|
1157
|
+
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return an[t];
|
|
869
1158
|
return null;
|
|
870
1159
|
}
|
|
871
|
-
function
|
|
872
|
-
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return
|
|
1160
|
+
function cn(e) {
|
|
1161
|
+
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return on[t];
|
|
873
1162
|
return null;
|
|
874
1163
|
}
|
|
875
|
-
function
|
|
1164
|
+
function ln(e) {
|
|
876
1165
|
return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
|
|
877
1166
|
}
|
|
878
1167
|
function X(e) {
|
|
879
1168
|
let t = e.source, n = e.flags.replace("g", "");
|
|
880
1169
|
return RegExp(`^${t}$`, n);
|
|
881
1170
|
}
|
|
882
|
-
function
|
|
1171
|
+
function un(e, t) {
|
|
883
1172
|
let n = e?.trim() || "";
|
|
884
1173
|
return !X(t.logic).test(n) && X(t.value).test(n);
|
|
885
1174
|
}
|
|
@@ -887,41 +1176,41 @@ function Z(e, t) {
|
|
|
887
1176
|
let n = t.find((t) => t.value === e);
|
|
888
1177
|
return n ? n.label : e;
|
|
889
1178
|
}
|
|
890
|
-
function
|
|
1179
|
+
function dn(e, t) {
|
|
891
1180
|
return $(e, "data-merge-tag", (e) => Z(e, t));
|
|
892
1181
|
}
|
|
893
1182
|
function Q(e, t) {
|
|
894
1183
|
return t.find((t) => t.value === e)?.sample;
|
|
895
1184
|
}
|
|
896
|
-
function
|
|
897
|
-
return $(e, "data-merge-tag", (e) =>
|
|
1185
|
+
function fn(e, t) {
|
|
1186
|
+
return $(e, "data-merge-tag", (e) => hn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
|
|
898
1187
|
}
|
|
899
|
-
function
|
|
1188
|
+
function pn(e) {
|
|
900
1189
|
return e.some((e) => e.sample !== void 0);
|
|
901
1190
|
}
|
|
902
|
-
function
|
|
1191
|
+
function mn(e, t) {
|
|
903
1192
|
if (!e) return e;
|
|
904
1193
|
let n = e;
|
|
905
1194
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
906
1195
|
return n;
|
|
907
1196
|
}
|
|
908
|
-
function
|
|
1197
|
+
function hn(e) {
|
|
909
1198
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
910
1199
|
}
|
|
911
|
-
function
|
|
1200
|
+
function gn(e, t) {
|
|
912
1201
|
if (!e) return !1;
|
|
913
1202
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
914
1203
|
return n.test(e) || r.test(e);
|
|
915
1204
|
}
|
|
916
|
-
function
|
|
1205
|
+
function _n(e, t) {
|
|
917
1206
|
return X(t.logic).test(e?.trim() || "");
|
|
918
1207
|
}
|
|
919
|
-
function
|
|
1208
|
+
function vn(e, t) {
|
|
920
1209
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
921
1210
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
922
1211
|
}
|
|
923
|
-
function
|
|
924
|
-
return $(e, "data-logic-merge-tag", (e) =>
|
|
1212
|
+
function yn(e, t) {
|
|
1213
|
+
return $(e, "data-logic-merge-tag", (e) => vn(e, t));
|
|
925
1214
|
}
|
|
926
1215
|
function $(e, t, n, r) {
|
|
927
1216
|
let i = "", a = 0;
|
|
@@ -936,7 +1225,7 @@ function $(e, t, n, r) {
|
|
|
936
1225
|
i += e.substring(a, o + 5), a = o + 5;
|
|
937
1226
|
continue;
|
|
938
1227
|
}
|
|
939
|
-
let c =
|
|
1228
|
+
let c = Vt(e, o + 5);
|
|
940
1229
|
if (c === -1) {
|
|
941
1230
|
i += e.substring(a);
|
|
942
1231
|
break;
|
|
@@ -946,7 +1235,7 @@ function $(e, t, n, r) {
|
|
|
946
1235
|
i += e.substring(a);
|
|
947
1236
|
break;
|
|
948
1237
|
}
|
|
949
|
-
let u =
|
|
1238
|
+
let u = Gt(e.substring(o + 5, c), t);
|
|
950
1239
|
if (u === null) {
|
|
951
1240
|
i += e.substring(a, o + 5), a = o + 5;
|
|
952
1241
|
continue;
|
|
@@ -958,27 +1247,10 @@ function $(e, t, n, r) {
|
|
|
958
1247
|
}
|
|
959
1248
|
//#endregion
|
|
960
1249
|
//#region ../types/src/preview-resolution.ts
|
|
961
|
-
function
|
|
1250
|
+
function bn(e) {
|
|
962
1251
|
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
963
1252
|
}
|
|
964
1253
|
//#endregion
|
|
965
|
-
|
|
966
|
-
var Nt = class extends Error {
|
|
967
|
-
statusCode;
|
|
968
|
-
constructor(e, t) {
|
|
969
|
-
super(e), this.statusCode = t, this.name = "SdkError";
|
|
970
|
-
}
|
|
971
|
-
get isNotFound() {
|
|
972
|
-
return this.statusCode === 404;
|
|
973
|
-
}
|
|
974
|
-
get isUnauthorized() {
|
|
975
|
-
return this.statusCode === 401;
|
|
976
|
-
}
|
|
977
|
-
get isServerError() {
|
|
978
|
-
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
//#endregion
|
|
982
|
-
export { De as $, W as A, c as At, I as B, et as C, te as Ct, qe as D, e as Dt, Ke as E, i as Et, F, j as G, R as H, B as I, k as J, L as K, N as L, P as M, r as Mt, U as N, o as Nt, Je as O, s as Ot, Ie as P, t as Pt, Ee as Q, V as R, st as S, ee as St, Qe as T, ne as Tt, z as U, Le as V, H as W, Me as X, E as Y, ke as Z, Et as _, ie as _t, At as a, le as at, gt as b, ae as bt, bt as c, g as ct, kt as d, me as dt, T as et, St as f, _e as ft, wt as g, p as gt, xt as h, v as ht, Ot as i, he as it, ze as j, n as jt, Ge as k, l as kt, yt as l, _ as lt, Ct as m, fe as mt, Mt as n, ve as nt, Z as o, ge as ot, jt as p, se as pt, Re as q, Y as r, de as rt, Q as s, ce as st, Nt as t, ue as tt, Tt as u, pe as ut, ht as v, re as vt, it as w, f as wt, ct as x, d as xt, J as y, oe as yt, M as z };
|
|
1254
|
+
export { je as $, Tt as A, te as At, Ct as B, o as Bt, Gt as C, se as Ct, Ft as D, ae as Dt, Pt as E, f as Et, gt as F, s as Ft, pt as G, ht as H, lt as I, l as It, at as J, wt as K, _t as L, c as Lt, bt as M, re as Mt, St as N, i as Nt, Mt as O, d as Ot, dt as P, e as Pt, B as Q, ct as R, n as Rt, Vt as S, ce as St, Nt as T, le as Tt, yt as U, mt as V, t as Vt, st as W, $e as X, nt as Y, et as Z, nn as _, v as _t, Z as a, ke as at, Yt as b, g as bt, sn as c, Pe as ct, un as d, Oe as dt, ze as et, yn as f, Ne as ft, mn as g, me as gt, fn as h, fe as ht, vn as i, Le as it, ut as j, ne as jt, G as k, ee as kt, pn as l, Fe as lt, ln as m, De as mt, Y as n, Ie as nt, Q as o, L as ot, dn as p, z as pt, U as q, gn as r, Ae as rt, cn as s, R as st, bn as t, Me as tt, _n as u, Re as ut, J as v, pe as vt, zt as w, ue as wt, Jt as x, p as xt, rn as y, _ as yt, ft as z, r as zt };
|
|
983
1255
|
|
|
984
|
-
//# sourceMappingURL=src-
|
|
1256
|
+
//# sourceMappingURL=src-CvLTYGdO.js.map
|