@templatical/editor 0.56.1 → 0.57.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/README.md +1 -1
- package/dist/{AiAltTextPopover-CpZ7UeAZ.js → AiAltTextPopover-BiZHthAB.js} +5 -5
- package/dist/{AiAltTextReview-LYxvn7Qe.js → AiAltTextReview-BwhROHiF.js} +6 -6
- package/dist/{AiChatPanel-Cy05P-iO.js → AiChatPanel-Cros4ZCM.js} +22 -25
- package/dist/AiPanels-D_CdHqFZ.js +26 -0
- package/dist/{AiRewriteMenu-DgqJHnza.js → AiRewriteMenu-6b8GNj64.js} +53 -53
- package/dist/{BlockIssueBadge-CxHJmuOh.js → BlockIssueBadge-i2cZy5PB.js} +5 -5
- package/dist/{BlockPreviewCanvas-DEmNZkEG.js → BlockPreviewCanvas-BAYIy-QJ.js} +27 -27
- package/dist/{CloudHeaderExtras-Cqhw-jMz.js → CloudHeaderExtras-CJsXi4Ku.js} +2 -2
- package/dist/{CloudPanels-Bmlf05Il.js → CloudPanels-Cb54vtYC.js} +6 -6
- package/dist/{CollaborationNotices-C27GCMvK.js → CollaborationNotices-DkYX-ose.js} +3 -3
- package/dist/{CollaboratorBar-CLQjksX-.js → CollaboratorBar-xDweDvB6.js} +3 -3
- package/dist/CommentsPanel-t3w16YUl.js +23 -0
- package/dist/CommentsSidebar-B3M90RY_.js +516 -0
- package/dist/{CountdownBlock-D8dqjm3F.js → CountdownBlock-BrR2uqM3.js} +4 -4
- package/dist/{CountdownToolbar-IjpCOjCd.js → CountdownToolbar-CTbJPh8B.js} +7 -7
- package/dist/{IssuesPanel-uwuzeMSW.js → IssuesPanel-BUKc8lld.js} +13 -13
- package/dist/{LanguageMenu-C-eQ0lFy.js → LanguageMenu-DruJAMET.js} +16 -16
- package/dist/{LoadingTrack-BG8cg9xi.js → LoadingTrack-c4SeD16s.js} +1 -1
- package/dist/{LocaleNotices-CDK_9D7P.js → LocaleNotices-D6zk-QCL.js} +5 -5
- package/dist/{LogicTagInsertButton-BSolF7Fd.js → LogicTagInsertButton-Ci7V0Exe.js} +65 -65
- package/dist/{MediaEditModal-C8yc9dxt.js → MediaEditModal-BxbwZxnf.js} +4 -4
- package/dist/{MediaPanels-FI4I8asn.js → MediaPanels-BiUxsTMM.js} +2 -2
- package/dist/{MergeTagInput-B1nl2ZMT.js → MergeTagInput-BA89v7KJ.js} +2 -2
- package/dist/{MergeTagModeToggle-DXvb80OE.js → MergeTagModeToggle-De_FNmcG.js} +7 -7
- package/dist/{MergeTagTextarea-DJlf3VbS.js → MergeTagTextarea-BRMB24Dg.js} +9 -9
- package/dist/{ParagraphEditor-Dqco128s.js → ParagraphEditor-DYqh0kEa.js} +51 -51
- package/dist/{RestoreVersionDialog-hqLCuGV5.js → RestoreVersionDialog-CRkyFafq.js} +5 -5
- package/dist/{RichTextEditorContent-xIEF0Y3Z.js → RichTextEditorContent-WeCqqCy3.js} +10 -10
- package/dist/{SaveBlockDialog-CQlCP_XC.js → SaveBlockDialog-D992yyO4.js} +15 -15
- package/dist/{SavedBlocksBrowserModal-BXA32Fx6.js → SavedBlocksBrowserModal-tH74h2Tz.js} +13 -13
- package/dist/{SavedBlocksPanels-BKUzbamj.js → SavedBlocksPanels-BuzEwYfp.js} +2 -2
- package/dist/{SavedBlocksPickBar-BlvF-4UF.js → SavedBlocksPickBar-DbULBPsI.js} +4 -4
- package/dist/{TemplateSettings-CYFtR8zv.js → TemplateSettings-eMBAy_wd.js} +14 -14
- package/dist/{TestEmailModal-BbaL17HO.js → TestEmailModal-hb9iopaZ.js} +13 -13
- package/dist/{TestEmailPanel-DhB1CSpg.js → TestEmailPanel-DbeZjj0u.js} +2 -2
- package/dist/{TitleEditor-3BRl8u5l.js → TitleEditor-CisDioGi.js} +14 -14
- package/dist/{ToggleSwitch-R3wCCYE6.js → ToggleSwitch-BIPdFWUr.js} +1 -1
- package/dist/{Toolbar-pzNIakGM.js → Toolbar-BUVRjylH.js} +218 -218
- package/dist/{TplModal-WNuWhHZm.js → TplModal-BPPP-uM6.js} +6 -6
- package/dist/{VersionHistoryMenu--T-Qp_mH.js → VersionHistoryMenu-Cd2IaHgT.js} +10 -10
- package/dist/{VersionHistoryPanels-BPubvYIE.js → VersionHistoryPanels-BNONrE-8.js} +2 -2
- package/dist/{VersionPreviewBanner-ClL3Wkln.js → VersionPreviewBanner-lkAf7tc8.js} +3 -3
- package/dist/{WrapperBlock-CjfCPceb.js → WrapperBlock-B3UAv5kv.js} +5 -5
- package/dist/{blockTypeIcons-12OMwVyN.js → blockTypeIcons-BPPpqFc2.js} +3 -3
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AiAltTextPopover-PFjTrl0y.js → AiAltTextPopover-CafZSF50.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-PFjTrl0y.js.map → AiAltTextPopover-CafZSF50.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-BMjzvApH.js → AiAltTextReview-BJcaqyp5.js} +6 -6
- package/dist/cdn/chunks/{AiAltTextReview-BMjzvApH.js.map → AiAltTextReview-BJcaqyp5.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-C2gpq4kP.js → AiChatPanel-DNCUpV8n.js} +15 -18
- package/dist/cdn/chunks/AiChatPanel-DNCUpV8n.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-IV0VEkBL.js +27 -0
- package/dist/cdn/chunks/AiPanels-IV0VEkBL.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-CnkyjPEu.js → AiRewriteMenu-DFUZWA7e.js} +58 -58
- package/dist/cdn/chunks/AiRewriteMenu-DFUZWA7e.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-DncZ-HDf.js → BlockIssueBadge-DIlFDDwh.js} +5 -5
- package/dist/cdn/chunks/BlockIssueBadge-DIlFDDwh.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-CCSEzL46.js → BlockPreviewCanvas-D0VhkzY8.js} +28 -28
- package/dist/cdn/chunks/BlockPreviewCanvas-D0VhkzY8.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js → CloudHeaderExtras-CazfMn6A.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js.map → CloudHeaderExtras-CazfMn6A.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CRztnw4M.js → CloudPanels-BiU1MD-4.js} +5 -5
- package/dist/cdn/chunks/CloudPanels-BiU1MD-4.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-IuLYT2x7.js → CollaborationNotices-DGA8XRZJ.js} +4 -4
- package/dist/cdn/chunks/{CollaborationNotices-IuLYT2x7.js.map → CollaborationNotices-DGA8XRZJ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js → CollaboratorBar-BWL1Shc1.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js.map → CollaboratorBar-BWL1Shc1.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js +24 -0
- package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js +486 -0
- package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-8aPSExrv.js → CountdownBlock-Do6oItNW.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-8aPSExrv.js.map → CountdownBlock-Do6oItNW.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CnWQEW5g.js → CountdownToolbar-CH8UK01N.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-CnWQEW5g.js.map → CountdownToolbar-CH8UK01N.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CrplCzo8.js → IssuesPanel-3NPqHXJx.js} +9 -9
- package/dist/cdn/chunks/IssuesPanel-3NPqHXJx.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-B6MNInCL.js → LanguageMenu-75uu4P2d.js} +105 -105
- package/dist/cdn/chunks/LanguageMenu-75uu4P2d.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js → LoadingTrack-o-89hApJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js.map → LoadingTrack-o-89hApJ.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-TxeAl8Iq.js → LocaleNotices-CUN5K5QJ.js} +5 -5
- package/dist/cdn/chunks/{LocaleNotices-TxeAl8Iq.js.map → LocaleNotices-CUN5K5QJ.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DvSVx2DB.js → LogicTagInsertButton-C5L73hYh.js} +12 -12
- package/dist/cdn/chunks/{LogicTagInsertButton-DvSVx2DB.js.map → LogicTagInsertButton-C5L73hYh.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-tGK6htBl.js → MediaEditModal-BHTMNHx0.js} +4 -4
- package/dist/cdn/chunks/{MediaEditModal-tGK6htBl.js.map → MediaEditModal-BHTMNHx0.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-BVrQYz2C.js → MediaPanels-BlianNRh.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-BVrQYz2C.js.map → MediaPanels-BlianNRh.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DeuNH3re.js → MergeTagInput-D8cbnnZu.js} +3 -3
- package/dist/cdn/chunks/{MergeTagInput-DeuNH3re.js.map → MergeTagInput-D8cbnnZu.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js → MergeTagModeToggle-D-RhwBsO.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js.map → MergeTagModeToggle-D-RhwBsO.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-B2xxIU3e.js → MergeTagTextarea-CAJIi2FE.js} +7 -7
- package/dist/cdn/chunks/{MergeTagTextarea-B2xxIU3e.js.map → MergeTagTextarea-CAJIi2FE.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Bx_Hlw8d.js → ParagraphEditor-sRPXZDzp.js} +30 -30
- package/dist/cdn/chunks/{ParagraphEditor-Bx_Hlw8d.js.map → ParagraphEditor-sRPXZDzp.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-CPrrWTsT.js → RestoreVersionDialog-CJK-14PX.js} +5 -5
- package/dist/cdn/chunks/RestoreVersionDialog-CJK-14PX.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Dze4C9VI.js → RichTextEditorContent-DU0wtA_j.js} +9 -9
- package/dist/cdn/chunks/{RichTextEditorContent-Dze4C9VI.js.map → RichTextEditorContent-DU0wtA_j.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CXVwnfsy.js → SaveBlockDialog-C8hY9xA-.js} +13 -13
- package/dist/cdn/chunks/{SaveBlockDialog-CXVwnfsy.js.map → SaveBlockDialog-C8hY9xA-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BDTmenOE.js → SavedBlocksBrowserModal-B3nFAgAa.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BDTmenOE.js.map → SavedBlocksBrowserModal-B3nFAgAa.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-B41Rk_v1.js → SavedBlocksPanels-CQenugHO.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-B41Rk_v1.js.map → SavedBlocksPanels-CQenugHO.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B97z_rFH.js → SavedBlocksPickBar-DzUP4IYv.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-B97z_rFH.js.map → SavedBlocksPickBar-DzUP4IYv.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-YwwRbxPc.js → TemplateSettings-DnOwyN_1.js} +12 -12
- package/dist/cdn/chunks/{TemplateSettings-YwwRbxPc.js.map → TemplateSettings-DnOwyN_1.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-BiFP2Cbx.js → TestEmailModal-BFqmfOZ1.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-BiFP2Cbx.js.map → TestEmailModal-BFqmfOZ1.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BrivPMk2.js → TestEmailPanel-DFOhhaa9.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-BrivPMk2.js.map → TestEmailPanel-DFOhhaa9.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CzPkkL2s.js → TitleEditor-ChPXTB9T.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-CzPkkL2s.js.map → TitleEditor-ChPXTB9T.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js → ToggleSwitch-C0w0srN_.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js.map → ToggleSwitch-C0w0srN_.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-VH07SzX7.js → Toolbar-bbO5WoKo.js} +302 -302
- package/dist/cdn/chunks/Toolbar-bbO5WoKo.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DMe6J811.js → TplModal-Bg97XHIJ.js} +6 -6
- package/dist/cdn/chunks/{TplModal-DMe6J811.js.map → TplModal-Bg97XHIJ.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DkwbKhBl.js → VersionHistoryMenu-BNPxnWiO.js} +9 -9
- package/dist/cdn/chunks/{VersionHistoryMenu-DkwbKhBl.js.map → VersionHistoryMenu-BNPxnWiO.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-CgxhMRAl.js → VersionHistoryPanels-CyyRXWPU.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CgxhMRAl.js.map → VersionHistoryPanels-CyyRXWPU.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-WVBDBrwQ.js → VersionPreviewBanner-BldFvgxJ.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-WVBDBrwQ.js.map → VersionPreviewBanner-BldFvgxJ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-CCCIcqe2.js → WrapperBlock-ZBCf7Y8u.js} +6 -6
- package/dist/cdn/chunks/{WrapperBlock-CCCIcqe2.js.map → WrapperBlock-ZBCf7Y8u.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js → blockTypeIcons-19xd5ZPi.js} +6 -6
- package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js.map → blockTypeIcons-19xd5ZPi.js.map} +1 -1
- package/dist/cdn/chunks/{composables-D3lsO7Io.js → composables-CMBZad02.js} +750 -730
- package/dist/cdn/chunks/composables-CMBZad02.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-CE79GB1H.js → createCloudRuntime-BHGFjpek.js} +157 -143
- package/dist/cdn/chunks/createCloudRuntime-BHGFjpek.js.map +1 -0
- package/dist/cdn/chunks/da-CYWJkrTg.js +97 -0
- package/dist/cdn/chunks/da-CYWJkrTg.js.map +1 -0
- package/dist/cdn/chunks/da-qQzj0QGy.js +950 -0
- package/dist/cdn/chunks/da-qQzj0QGy.js.map +1 -0
- package/dist/cdn/chunks/{dist-BzXULHvI.js → dist-BtWMy7UQ.js} +3 -3
- package/dist/cdn/chunks/{dist-BzXULHvI.js.map → dist-BtWMy7UQ.js.map} +1 -1
- package/dist/cdn/chunks/{dist-Cf1pSluo.js → dist-zu1jwYIS.js} +4 -4
- package/dist/cdn/chunks/{dist-Cf1pSluo.js.map → dist-zu1jwYIS.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DepKdldn.js → draggable-IRVFEZ-b.js} +1535 -1500
- package/dist/cdn/chunks/draggable-IRVFEZ-b.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CN69NlOK.js → editor-modal-CarOiAYJ.js} +77 -76
- package/dist/cdn/chunks/{editor-modal-CN69NlOK.js.map → editor-modal-CarOiAYJ.js.map} +1 -1
- package/dist/cdn/chunks/en-B4s_0ryk.js +1 -0
- package/dist/cdn/chunks/{extensions-8dlM-fU4.js → extensions-Beg0g2wm.js} +7 -7
- package/dist/cdn/chunks/{extensions-8dlM-fU4.js.map → extensions-Beg0g2wm.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DHExFLlT.js → icons-Cl4oR2mf.js} +73 -73
- package/dist/cdn/chunks/icons-Cl4oR2mf.js.map +1 -0
- package/dist/cdn/chunks/keys-BQqbBUag.js +11 -0
- package/dist/cdn/chunks/keys-BQqbBUag.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js → normalizeMergeTagMarkup-B8yU4usU.js} +55 -55
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js.map → normalizeMergeTagMarkup-B8yU4usU.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js → preRenderCustomBlocks-CPHm2GOQ.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js.map → preRenderCustomBlocks-CPHm2GOQ.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-B3njfkSy.js → sanitizeHtml-B7LC0gKK.js} +22 -11
- package/dist/cdn/chunks/sanitizeHtml-B7LC0gKK.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BFgc3qqJ.js → socialIcons-D9D02_y5.js} +575 -524
- package/dist/cdn/chunks/socialIcons-D9D02_y5.js.map +1 -0
- package/dist/cdn/chunks/{src-C9JWWxAk.js → src-BCrSqaj8.js} +108 -95
- package/dist/cdn/chunks/src-BCrSqaj8.js.map +1 -0
- package/dist/cdn/chunks/{src-GgKlXNxy.js → src-BO4aXl_Y.js} +232 -228
- package/dist/cdn/chunks/src-BO4aXl_Y.js.map +1 -0
- package/dist/cdn/chunks/{src-mXG-Of9A.js → src-DeywvttP.js} +812 -780
- package/dist/cdn/chunks/src-DeywvttP.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C940SvId.js → tiptap-BPiZqxCt.js} +40 -31
- package/dist/cdn/chunks/tiptap-BPiZqxCt.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js → useCloudI18n-Dr4S2TRW.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js.map → useCloudI18n-Dr4S2TRW.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-B_kf_k-g.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-Beau2Z_T.js.map → useEditorRoot-B_kf_k-g.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-D8s7HtTn.js → useI18n-CSf-ZpcM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-D8s7HtTn.js.map → useI18n-CSf-ZpcM.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-oykFcYrW.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-Bgg4qpev.js.map → useLocalizedDisplay-oykFcYrW.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-B0PDeDxl.js → useLogicTag-D_qg9qqO.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-B0PDeDxl.js.map → useLogicTag-D_qg9qqO.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BSU75bKk.js → useMergeTag-VLnVHtxV.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-BSU75bKk.js.map → useMergeTag-VLnVHtxV.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js → usePopoverPosition-BJFFi8x6.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js.map → usePopoverPosition-BJFFi8x6.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js → useScrollToBlock-MI4PP5lk.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js.map → useScrollToBlock-MI4PP5lk.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js → withCurrentFont-m6TtR0dC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js.map → withCurrentFont-m6TtR0dC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +685 -663
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CcuCoJDh.js → check-C7ua4TAK.js} +1 -1
- package/dist/{chevron-down-BfYIbFbC.js → chevron-down-DftQrAkI.js} +1 -1
- package/dist/{chevron-right-DyjFqY35.js → chevron-right-B-DULGbg.js} +1 -1
- package/dist/{chevron-up-BHEIxuS-.js → chevron-up-CeYsyD8c.js} +1 -1
- package/dist/{circle-alert-Tq7kAh9S.js → circle-exclamation-point-DHjORV_I.js} +3 -3
- package/dist/{clock-Df0ZiXwQ.js → clock-CajOtLEZ.js} +1 -1
- package/dist/{composables-DreAt_0A.js → composables-Cq7rsxRc.js} +1123 -1103
- package/dist/{createCloudRuntime-CL4tUlDC.js → createCloudRuntime-CHsFF8DI.js} +42 -28
- package/dist/{createLucideIcon-CfBdtoUw.js → createLucideIcon-D-mELTSY.js} +6 -6
- package/dist/da-CYWJkrTg.js +95 -0
- package/dist/da-qQzj0QGy.js +948 -0
- package/dist/{dist-CX7skkvG.js → dist-A328tG0Z.js} +2 -2
- package/dist/{dist-BjzK1g4Z.js → dist-B15BvV94.js} +2 -2
- package/dist/{dist-DDytHU_6.js → dist-B3G4Yvpd.js} +3 -3
- package/dist/{dist-CiYotUR8.js → dist-B6ptxfPo.js} +3 -3
- package/dist/{dist-0GWMyHtM.js → dist-BmV-2uBJ.js} +2 -2
- package/dist/{dist-CCLRTtJP.js → dist-BxKFi2h_.js} +5 -5
- package/dist/{dist-BMUUt3zJ.js → dist-C0hVefGI.js} +791 -759
- package/dist/{dist-CsknfjrZ.js → dist-CMBOqk9I.js} +7 -7
- package/dist/{dist-ZrT0vAB6.js → dist-CXTsTO5h.js} +2 -2
- package/dist/{dist-Dq9VnANT.js → dist-D5BUcCjv.js} +2 -2
- package/dist/dist-D9cbSSSx.js +4 -0
- package/dist/{dist-BsumKKh9.js → dist-DAdrn64r.js} +2 -2
- package/dist/{dist-C3avsUq9.js → dist-DENg3ORe.js} +31 -22
- package/dist/{dist-Cr1CLCmx.js → dist-DI_8rB1X.js} +2 -2
- package/dist/dist-ELLEk-lS.js +4 -0
- package/dist/{editor-modal-BD32TXws.js → editor-modal-CgsaLpwB.js} +20 -19
- package/dist/en-DBLcB-CW.js +1 -0
- package/dist/{extensions-DKxHlSd7.js → extensions-BSXjPQEc.js} +21 -21
- package/dist/{eye-B3psrAqd.js → eye-fe5sKF_K.js} +1 -1
- package/dist/{image-C3yuPDxx.js → image-CUC7SZiW.js} +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/{info-DKja7A68.js → info-DDbLU4pT.js} +1 -1
- package/dist/keys-D9oKZN1h.js +9 -0
- package/dist/{link-DhzPI4Hn.js → link-C2icj0iH.js} +1 -1
- package/dist/{list-DVGn7Ik2.js → list-KYC_Jb5A.js} +1 -1
- package/dist/{loader-circle-DqKWsMHO.js → loader-circle-DmyagWpc.js} +1 -1
- package/dist/{message-circle-C4TonoBs.js → message-circle-ijyWn6UJ.js} +1 -1
- package/dist/{normalizeMergeTagMarkup-Da9JAgx7.js → normalizeMergeTagMarkup-CBLCQe02.js} +82 -82
- package/dist/{package-9OkiEO4S.js → package-CKYm_jQY.js} +1 -1
- package/dist/{pencil-M9vkOB7C.js → pencil-C2TRSR-Y.js} +1 -1
- package/dist/{plus-DxZiv9YC.js → plus-CotJVDxb.js} +1 -1
- package/dist/{preRenderCustomBlocks-CdqSp2P7.js → preRenderCustomBlocks-e2OlY4aU.js} +3 -3
- package/dist/{refresh-cw-UY8_sdFG.js → refresh-cw-CuCRV6D5.js} +1 -1
- package/dist/{rotate-ccw-BFTGCpHn.js → rotate-ccw-BlnQ3y6R.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-DlHp8xgy.js → runtime-dom.esm-bundler-nN-jsqr1.js} +20 -20
- package/dist/{sanitizeHtml-wBibnBF4.js → sanitizeHtml-Dfn-fH17.js} +25 -14
- package/dist/{search-RuGJnMEn.js → search-Dxw6oFrZ.js} +1 -1
- package/dist/{send-DGB1ar02.js → send-C-blQBZ9.js} +1 -1
- package/dist/{smartphone-CVA29CU_.js → smartphone-rLz4X-Dd.js} +1 -1
- package/dist/{socialIcons-oo4uL16Y.js → socialIcons-BZRLo0eT.js} +600 -549
- package/dist/{sparkles-IHfEwEcd.js → sparkles-JWQlUiSn.js} +1 -1
- package/dist/{square-_Cl44UU6.js → square-DshDy1Il.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +748 -726
- package/dist/{text-align-start-Dqk2Xt_Q.js → text-align-start-CyasaQtr.js} +13 -13
- package/dist/{trash-Cr7rD5Hh.js → trash-B1lZp2Tv.js} +1 -1
- package/dist/{triangle-alert-CKcpwtUj.js → triangle-exclamation-point-BhJvBEoT.js} +3 -3
- package/dist/{upload-DR9pqVON.js → upload-CNK8JX38.js} +1 -1
- package/dist/{useCloudI18n-BczJoFf4.js → useCloudI18n-HhCZYRV6.js} +2 -2
- package/dist/useEditorRoot-B0Njczhx.js +7 -0
- package/dist/{useI18n-zeWYtWSv.js → useI18n-CM9vKbYc.js} +2 -2
- package/dist/{cdn/chunks/useLocalizedDisplay-Bgg4qpev.js → useLocalizedDisplay-B7tlQF4g.js} +2 -4
- package/dist/{useLogicTag-B4Zpk3eo.js → useLogicTag-k_y-4o4W.js} +3 -3
- package/dist/{useMergeTag-B5qlq8px.js → useMergeTag-BiZ6XOdL.js} +3 -3
- package/dist/{usePopoverPosition-Br3zt_MQ.js → usePopoverPosition-CVRzzLkC.js} +2 -2
- package/dist/{useScrollToBlock-BfOzc1Z6.js → useScrollToBlock-vf_KD0FM.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BJXc_Mri.js → vue.runtime.esm-bundler-BE5V8ADU.js} +414 -362
- package/dist/{withCurrentFont-m_PHcOD0.js → withCurrentFont-CPhRujet.js} +1 -1
- package/dist/{x-DZSFHafL.js → x-DbLX5Qdm.js} +1 -1
- package/package.json +23 -23
- package/dist/AiPanels-CwKmXzyr.js +0 -31
- package/dist/CommentsPanel-B5NqPMmY.js +0 -16
- package/dist/CommentsSidebar-BDrcrDxS.js +0 -526
- package/dist/cdn/chunks/AiChatPanel-C2gpq4kP.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-Cx3PE2mE.js +0 -32
- package/dist/cdn/chunks/AiPanels-Cx3PE2mE.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-CnkyjPEu.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DncZ-HDf.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-CRztnw4M.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-lgjJNrrY.js +0 -18
- package/dist/cdn/chunks/CommentsPanel-lgjJNrrY.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-DTold7iy.js +0 -496
- package/dist/cdn/chunks/CommentsSidebar-DTold7iy.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-CrplCzo8.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-B6MNInCL.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-CPrrWTsT.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-VH07SzX7.js.map +0 -1
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-CE79GB1H.js.map +0 -1
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +0 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +0 -1
- package/dist/cdn/chunks/icons-DHExFLlT.js.map +0 -1
- package/dist/cdn/chunks/keys-BUmIvYy3.js +0 -11
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-B3njfkSy.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-BFgc3qqJ.js.map +0 -1
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +0 -1
- package/dist/cdn/chunks/src-GgKlXNxy.js.map +0 -1
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C940SvId.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-Beau2Z_T.js +0 -9
- package/dist/dist-B_0FPmoy.js +0 -4
- package/dist/dist-DKV9m4Uu.js +0 -4
- package/dist/en-Dgs_-NBw.js +0 -1
- package/dist/keys-w_VRjoMu.js +0 -9
- package/dist/useEditorRoot-BcXKhM_8.js +0 -7
- package/dist/useLocalizedDisplay-Cbhx208c.js +0 -31
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r } from "./dist-
|
|
2
|
-
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as
|
|
4
|
-
import { t as ce } from "./useEditorRoot-
|
|
5
|
-
import { t as le } from "./useI18n-
|
|
6
|
-
import "./useCloudI18n-
|
|
7
|
-
import { t as B } from "./useMergeTag-
|
|
8
|
-
import { _ as ue, h as de, v as fe, y as pe } from "./dist-
|
|
9
|
-
import { $ as me,
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { B as
|
|
16
|
-
import { r as
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
26
|
-
import { m as
|
|
27
|
-
import { t as
|
|
28
|
-
import { n as
|
|
29
|
-
import { t as
|
|
30
|
-
import { t as
|
|
31
|
-
import { t as
|
|
32
|
-
var
|
|
1
|
+
import { a as e, c as t, i as n, l as r } from "./dist-B6ptxfPo.js";
|
|
2
|
+
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
3
|
+
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as ne, k as re, l as P, nt as ie, ot as F, q as I, r as L, st as ae, u as oe, v as se, w as R, y as z } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
4
|
+
import { t as ce } from "./useEditorRoot-B0Njczhx.js";
|
|
5
|
+
import { t as le } from "./useI18n-CM9vKbYc.js";
|
|
6
|
+
import "./useCloudI18n-HhCZYRV6.js";
|
|
7
|
+
import { t as B } from "./useMergeTag-BiZ6XOdL.js";
|
|
8
|
+
import { _ as ue, h as de, v as fe, y as pe } from "./dist-A328tG0Z.js";
|
|
9
|
+
import { $ as me, $t as he, At as ge, B as _e, Bt as ve, Ct as ye, F as be, Gt as xe, H as Se, Ht as Ce, I as we, J as Te, Jt as Ee, Kt as De, L as Oe, Mt as ke, N as Ae, P as je, Pt as Me, Qt as Ne, S as Pe, St as Fe, U as Ie, Ut as Le, V as Re, Vt as ze, W as Be, Wt as Ve, X as He, Xt as Ue, Y as We, Yt as Ge, Z as Ke, Zt as qe, _ as Je, a as Ye, an as Xe, at as Ze, b as Qe, c as $e, dt as et, en as tt, ft as nt, gt as rt, ht as it, in as at, it as ot, j as st, l as ct, lt, m as ut, nn as dt, on as ft, ot as pt, p as mt, pt as ht, q as gt, qt as _t, rn as vt, s as yt, st as bt, tt as xt, xt as St, y as Ct, yt as wt, z as Tt, zt as Et } from "./dist-C0hVefGI.js";
|
|
10
|
+
import { t as Dt } from "./logger-BOu7oEtk.js";
|
|
11
|
+
import { a as Ot, c as kt, i as At, n as jt, o as Mt, t as Nt } from "./usePopoverPosition-CVRzzLkC.js";
|
|
12
|
+
import { n as Pt } from "./useLocalizedDisplay-B7tlQF4g.js";
|
|
13
|
+
import { A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, Q as Xt, R as Zt, S as Qt, T as $t, U as en, V as tn, W as nn, X as rn, Y as an, _ as on, a as sn, at as cn, b as ln, c as un, ct as dn, d as fn, et as pn, g as mn, h as hn, i as gn, it as _n, j as vn, k as yn, l as bn, m as xn, nt as Sn, ot as Cn, p as wn, q as Tn, r as En, rt as Dn, s as On, st as kn, tt as An, u as jn, v as Mn, w as Nn, x as Pn, y as Fn, z as In } from "./keys-D9oKZN1h.js";
|
|
14
|
+
import { t as Ln } from "./useLogicTag-k_y-4o4W.js";
|
|
15
|
+
import { B as Rn, C as zn, D as Bn, E as Vn, F as Hn, H as Un, O as Wn, P as Gn, T as Kn, U as qn, _ as Jn, a as Yn, f as Xn, h as Zn, k as Qn, n as $n, o as er, t as tr, u as nr, v as rr, w as ir, x as ar, y as or, z as sr } from "./socialIcons-BZRLo0eT.js";
|
|
16
|
+
import { r as cr, t as lr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
|
+
import { i as ur, r as dr, t as fr } from "./sanitizeHtml-Dfn-fH17.js";
|
|
18
|
+
import { t as pr } from "./createLucideIcon-D-mELTSY.js";
|
|
19
|
+
import { t as mr } from "./LoadingTrack-c4SeD16s.js";
|
|
20
|
+
import { t as hr } from "./triangle-exclamation-point-BhJvBEoT.js";
|
|
21
|
+
import { t as gr } from "./image-CUC7SZiW.js";
|
|
22
|
+
import { t as _r } from "./clock-CajOtLEZ.js";
|
|
23
|
+
import { t as vr } from "./pencil-C2TRSR-Y.js";
|
|
24
|
+
import { t as yr } from "./languageName-DEEOhDWI.js";
|
|
25
|
+
import { t as br } from "./plural-CyxrJXL1.js";
|
|
26
|
+
import { m as xr, w as Sr, x as Cr } from "./styleConstants-CgiNKdnc.js";
|
|
27
|
+
import { t as wr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
28
|
+
import { n as Tr } from "./upload-CNK8JX38.js";
|
|
29
|
+
import { t as Er } from "./message-circle-ijyWn6UJ.js";
|
|
30
|
+
import { t as Dr } from "./trash-B1lZp2Tv.js";
|
|
31
|
+
import { t as Or } from "./readableTextColor-BfZUGnVj.js";
|
|
32
|
+
var kr = pr({
|
|
33
33
|
name: "bookmark",
|
|
34
34
|
size: 24,
|
|
35
35
|
node: [["path", {
|
|
36
36
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
37
37
|
key: "oz39mx"
|
|
38
38
|
}]]
|
|
39
|
-
}),
|
|
39
|
+
}), Ar = pr({
|
|
40
40
|
name: "box",
|
|
41
41
|
size: 24,
|
|
42
42
|
node: [
|
|
@@ -53,7 +53,7 @@ var Dr = dr({
|
|
|
53
53
|
key: "d0xqtd"
|
|
54
54
|
}]
|
|
55
55
|
]
|
|
56
|
-
}),
|
|
56
|
+
}), jr = pr({
|
|
57
57
|
name: "eye-off",
|
|
58
58
|
size: 24,
|
|
59
59
|
node: [
|
|
@@ -74,7 +74,7 @@ var Dr = dr({
|
|
|
74
74
|
key: "1ooewy"
|
|
75
75
|
}]
|
|
76
76
|
]
|
|
77
|
-
}),
|
|
77
|
+
}), Mr = pr({
|
|
78
78
|
name: "funnel",
|
|
79
79
|
size: 24,
|
|
80
80
|
node: [["path", {
|
|
@@ -82,7 +82,7 @@ var Dr = dr({
|
|
|
82
82
|
key: "sc7q7i"
|
|
83
83
|
}]],
|
|
84
84
|
aliases: ["filter"]
|
|
85
|
-
}),
|
|
85
|
+
}), Nr = pr({
|
|
86
86
|
name: "grip-vertical",
|
|
87
87
|
size: 24,
|
|
88
88
|
node: [
|
|
@@ -123,14 +123,14 @@ var Dr = dr({
|
|
|
123
123
|
key: "f4zoj3"
|
|
124
124
|
}]
|
|
125
125
|
]
|
|
126
|
-
}),
|
|
126
|
+
}), Pr = pr({
|
|
127
127
|
name: "puzzle",
|
|
128
128
|
size: 24,
|
|
129
129
|
node: [["path", {
|
|
130
130
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
131
131
|
key: "w46dr5"
|
|
132
132
|
}]]
|
|
133
|
-
}),
|
|
133
|
+
}), Fr = pr({
|
|
134
134
|
name: "video",
|
|
135
135
|
size: 24,
|
|
136
136
|
node: [["path", {
|
|
@@ -144,11 +144,11 @@ var Dr = dr({
|
|
|
144
144
|
rx: "2",
|
|
145
145
|
key: "158x01"
|
|
146
146
|
}]]
|
|
147
|
-
}),
|
|
148
|
-
function
|
|
147
|
+
}), Ir = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
|
+
function Lr(t, n) {
|
|
149
149
|
let r = ce(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
|
-
return t.value ? Array.from(t.value.querySelectorAll(
|
|
151
|
+
return t.value ? Array.from(t.value.querySelectorAll(Ir)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
153
153
|
function l(e) {
|
|
154
154
|
if (e.key !== "Tab") return;
|
|
@@ -177,8 +177,8 @@ function Fr(t, n) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
|
-
function
|
|
181
|
-
let [e, t] = fe(!1), n =
|
|
180
|
+
function Rr() {
|
|
181
|
+
let [e, t] = fe(!1), n = ie([]), r = !1;
|
|
182
182
|
T(() => {
|
|
183
183
|
r = !0;
|
|
184
184
|
}), c(e, async (e) => {
|
|
@@ -202,15 +202,15 @@ function Ir() {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
// src/composables/useBlockRegistry.ts
|
|
205
|
-
function
|
|
206
|
-
let e =
|
|
205
|
+
function zr() {
|
|
206
|
+
let e = ie(/* @__PURE__ */ new Map());
|
|
207
207
|
function t(t, n) {
|
|
208
208
|
e.value.set(t, n), ae(e);
|
|
209
209
|
}
|
|
210
210
|
function n(t, n) {
|
|
211
211
|
let r = `custom:${t.type}`, i = {
|
|
212
212
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
213
|
+
createBlock: () => we(t),
|
|
214
214
|
definition: t
|
|
215
215
|
};
|
|
216
216
|
e.value.set(r, i), ae(e);
|
|
@@ -236,9 +236,9 @@ function Lr() {
|
|
|
236
236
|
let t = a(e.customType);
|
|
237
237
|
if (!t) return o("Block definition not found");
|
|
238
238
|
try {
|
|
239
|
-
return await
|
|
239
|
+
return await Oe(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return Dt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -255,7 +255,7 @@ function Lr() {
|
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
// src/composables/useFonts.ts
|
|
258
|
-
var
|
|
258
|
+
var Br = [
|
|
259
259
|
{
|
|
260
260
|
value: "Arial",
|
|
261
261
|
label: "Arial"
|
|
@@ -284,19 +284,19 @@ var Rr = [
|
|
|
284
284
|
value: "Courier New",
|
|
285
285
|
label: "Courier New"
|
|
286
286
|
}
|
|
287
|
-
],
|
|
288
|
-
function
|
|
289
|
-
if (e === void 0 || e === !0) return [...
|
|
287
|
+
], Vr = "Arial, sans-serif";
|
|
288
|
+
function Hr(e) {
|
|
289
|
+
if (e === void 0 || e === !0) return [...Br];
|
|
290
290
|
if (e === !1) return [];
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
|
-
let e = i.toLowerCase(), a =
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
293
|
+
let e = i.toLowerCase(), a = Br.find((t) => t.value.toLowerCase() === e);
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Dt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Br.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let t = M(e?.customFonts ?? []), n = M(!1), r =
|
|
298
|
+
function Ur(e) {
|
|
299
|
+
let t = M(e?.customFonts ?? []), n = M(!1), r = Hr(e?.builtIns), i = k(() => e?.defaultFallback ?? Vr), a = k(() => {
|
|
300
300
|
let e = [...r], n = t.value.map((e) => ({
|
|
301
301
|
value: e.name,
|
|
302
302
|
label: e.name,
|
|
@@ -307,18 +307,18 @@ function Vr(e) {
|
|
|
307
307
|
function o(e) {
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
|
-
let s = e?.defaultFont ??
|
|
311
|
-
o(s) ||
|
|
310
|
+
let s = e?.defaultFont ?? Vr.split(",")[0].trim();
|
|
311
|
+
o(s) || Dt.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
315
315
|
if (t) return t.value;
|
|
316
316
|
}
|
|
317
|
-
return
|
|
317
|
+
return Vr;
|
|
318
318
|
}
|
|
319
319
|
let l = k(() => c());
|
|
320
320
|
function u(e) {
|
|
321
|
-
return
|
|
321
|
+
return Le(e, {
|
|
322
322
|
customFonts: t.value,
|
|
323
323
|
defaultFallback: i.value
|
|
324
324
|
});
|
|
@@ -337,7 +337,7 @@ function Vr(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
Dt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), f || (n.value = !0);
|
|
@@ -346,7 +346,7 @@ function Vr(e) {
|
|
|
346
346
|
for (let e of d) e.remove();
|
|
347
347
|
d.length = 0;
|
|
348
348
|
}
|
|
349
|
-
return
|
|
349
|
+
return I() && T(() => {
|
|
350
350
|
f = !0, m();
|
|
351
351
|
}), {
|
|
352
352
|
fonts: a,
|
|
@@ -361,7 +361,7 @@ function Vr(e) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
// src/composables/useThemeStyles.ts
|
|
364
|
-
var
|
|
364
|
+
var Wr = {
|
|
365
365
|
bg: "--tpl-bg",
|
|
366
366
|
bgElevated: "--tpl-bg-elevated",
|
|
367
367
|
bgHover: "--tpl-bg-hover",
|
|
@@ -385,10 +385,10 @@ var Hr = {
|
|
|
385
385
|
dangerLight: "--tpl-danger-light",
|
|
386
386
|
canvasBg: "--tpl-canvas-bg"
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Gr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
389
389
|
return { themeStyles: k(() => {
|
|
390
390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
391
|
-
if (a) for (let [e, t] of Object.entries(
|
|
391
|
+
if (a) for (let [e, t] of Object.entries(Wr)) {
|
|
392
392
|
let n = a[e];
|
|
393
393
|
n && (r[t] = n);
|
|
394
394
|
}
|
|
@@ -396,12 +396,12 @@ function Ur({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
396
396
|
}) };
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Kr(e, t, n) {
|
|
400
|
+
return St(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
404
|
-
keyword:
|
|
404
|
+
keyword: et(e, n)
|
|
405
405
|
}
|
|
406
406
|
} : {
|
|
407
407
|
type: "mergeTagNode",
|
|
@@ -412,32 +412,32 @@ function Wr(e, t, n) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
// src/utils/insertLogicTag.ts
|
|
415
|
-
function
|
|
415
|
+
function qr(e) {
|
|
416
416
|
return "before" in e && "after" in e;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
if (!
|
|
420
|
-
e.chain().focus().insertContent(
|
|
418
|
+
function Jr(e, t, n) {
|
|
419
|
+
if (!qr(t)) {
|
|
420
|
+
e.chain().focus().insertContent(Kr(t.value, t.label, n)).run();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
let r =
|
|
423
|
+
let r = Kr(t.before, t.label, n), i = Kr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
424
424
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
425
425
|
}
|
|
426
426
|
// src/utils/linkColorExtension.ts
|
|
427
|
-
function
|
|
427
|
+
function Yr(e) {
|
|
428
428
|
if (!e) return null;
|
|
429
429
|
let t = e.trim();
|
|
430
430
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Xr(e) {
|
|
433
433
|
return e.extend({ addAttributes() {
|
|
434
434
|
return {
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) =>
|
|
438
|
+
parseHTML: (e) => Yr(Mt(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
|
-
let t =
|
|
440
|
+
let t = Yr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -445,9 +445,9 @@ function Jr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function
|
|
448
|
+
function Zr(e, t = Je.liquid, n = () => !0) {
|
|
449
449
|
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
|
-
|
|
450
|
+
Lr(o, r);
|
|
451
451
|
function s() {
|
|
452
452
|
if (!n()) return;
|
|
453
453
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -458,7 +458,7 @@ function Yr(e, t = $e.liquid, n = () => !0) {
|
|
|
458
458
|
if (i.value) {
|
|
459
459
|
let t = d(i.value);
|
|
460
460
|
if (t !== null) {
|
|
461
|
-
let n =
|
|
461
|
+
let n = Yr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
462
462
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -475,8 +475,8 @@ function Yr(e, t = $e.liquid, n = () => !0) {
|
|
|
475
475
|
if (t.startsWith("#")) return t;
|
|
476
476
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
477
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
479
|
-
return n ?
|
|
478
|
+
let n = Ze(t);
|
|
479
|
+
return n ? ut.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
482
482
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -500,131 +500,131 @@ function Yr(e, t = $e.liquid, n = () => !0) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
|
-
function
|
|
504
|
-
let n = R(
|
|
505
|
-
c(
|
|
506
|
-
let t =
|
|
503
|
+
function Qr(t) {
|
|
504
|
+
let n = R(Mn, null), r = kt(), i = R(an, null), a = k(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: l, requestMergeTag: u, syntax: d, autocomplete: f } = B(), { canInsertLogicTag: p, isRequesting: m, requestLogicTag: h } = Ln(), g = R(Dn, null), _ = (w(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = it(d), y = ie(null), b = n?.content ? Pt(n) : null, x = () => Ce(b?.settings.value ?? { locale: "en" });
|
|
505
|
+
c(x, (e) => {
|
|
506
|
+
let t = y.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
508
508
|
});
|
|
509
|
-
let { showLinkDialog:
|
|
510
|
-
c(
|
|
511
|
-
if (
|
|
512
|
-
|
|
513
|
-
let e =
|
|
509
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: T, linkDialogRef: E, openLinkDialog: ee, insertLink: D, removeLink: O, closeLinkDialog: A, handleLinkKeydown: j } = Zr(y, d, () => a.value);
|
|
510
|
+
c(a, (e) => {
|
|
511
|
+
if (y.value?.setEditable(e, !1), !e) {
|
|
512
|
+
A();
|
|
513
|
+
let e = y.value;
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start:
|
|
518
|
-
async function
|
|
519
|
-
|
|
517
|
+
let { start: N, stop: te } = ue(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), ne = ie(null), P = M(!0), F = M(null), I = !1, L = null;
|
|
518
|
+
async function ae() {
|
|
519
|
+
F.value = null, P.value = !0;
|
|
520
520
|
try {
|
|
521
|
-
let { TiptapEditor: e, EC:
|
|
522
|
-
mergeTags:
|
|
523
|
-
syntax:
|
|
524
|
-
triggerChar:
|
|
525
|
-
autocompleteEnabled:
|
|
526
|
-
suggestionEmptyText:
|
|
521
|
+
let { TiptapEditor: e, EC: r, extensions: i } = await t.loadExtensions({
|
|
522
|
+
mergeTags: o,
|
|
523
|
+
syntax: d,
|
|
524
|
+
triggerChar: v,
|
|
525
|
+
autocompleteEnabled: f,
|
|
526
|
+
suggestionEmptyText: _
|
|
527
527
|
});
|
|
528
|
-
if (
|
|
529
|
-
|
|
528
|
+
if (I) return;
|
|
529
|
+
ne.value = r;
|
|
530
530
|
let s = /* @__PURE__ */ new Map();
|
|
531
|
-
|
|
531
|
+
i.forEach((e, t) => s.set(e.name, t));
|
|
532
532
|
let c = new e({
|
|
533
|
-
extensions:
|
|
533
|
+
extensions: i.filter((e, t) => s.get(e.name) === t),
|
|
534
534
|
content: t.blockContent(),
|
|
535
|
-
editable:
|
|
536
|
-
editorProps: { attributes: { dir:
|
|
535
|
+
editable: a.value,
|
|
536
|
+
editorProps: { attributes: { dir: x() } },
|
|
537
537
|
onUpdate: ({ editor: e }) => {
|
|
538
|
-
!
|
|
538
|
+
!I && a.value && n && (L = e.getHTML(), n.updateBlock(t.blockId(), { content: L }));
|
|
539
539
|
}
|
|
540
540
|
});
|
|
541
|
-
if (
|
|
541
|
+
if (I) {
|
|
542
542
|
c.destroy();
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
|
-
|
|
545
|
+
y.value = c, P.value = !1, N();
|
|
546
546
|
} catch (e) {
|
|
547
|
-
if (
|
|
548
|
-
|
|
547
|
+
if (I) return;
|
|
548
|
+
Dt.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
|
|
551
|
+
function oe() {
|
|
552
|
+
y.value?.destroy(), y.value = null, ae();
|
|
553
553
|
}
|
|
554
|
-
|
|
555
|
-
let
|
|
556
|
-
|
|
554
|
+
ae();
|
|
555
|
+
let se = c(() => t.blockContent(), (e) => {
|
|
556
|
+
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
557
557
|
});
|
|
558
|
-
function
|
|
559
|
-
if (
|
|
558
|
+
function z(e) {
|
|
559
|
+
if (l.value || m.value) return;
|
|
560
560
|
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
561
561
|
if (!r) return;
|
|
562
562
|
t.onClickOutsideSideEffect?.(r);
|
|
563
563
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
564
564
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
565
565
|
}
|
|
566
|
-
e(document, "mousedown",
|
|
567
|
-
|
|
566
|
+
e(document, "mousedown", z), re(() => {
|
|
567
|
+
I = !0, se(), te(), y.value?.destroy();
|
|
568
568
|
});
|
|
569
|
-
async function
|
|
570
|
-
if (!
|
|
571
|
-
let e = await
|
|
572
|
-
!
|
|
569
|
+
async function ce() {
|
|
570
|
+
if (!a.value) return;
|
|
571
|
+
let e = await u();
|
|
572
|
+
!I && a.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
573
573
|
label: e.label,
|
|
574
574
|
value: e.value
|
|
575
|
-
}).run() :
|
|
575
|
+
}).run() : y.value?.commands.focus());
|
|
576
576
|
}
|
|
577
|
-
async function
|
|
578
|
-
if (!
|
|
579
|
-
let e = await
|
|
580
|
-
!
|
|
577
|
+
async function le() {
|
|
578
|
+
if (!a.value) return;
|
|
579
|
+
let e = await h();
|
|
580
|
+
!I && a.value && (e && y.value ? Jr(y.value, e, d) : y.value?.commands.focus());
|
|
581
581
|
}
|
|
582
582
|
return {
|
|
583
|
-
editor:
|
|
584
|
-
EditorContent:
|
|
585
|
-
isLoading:
|
|
586
|
-
isEditable:
|
|
587
|
-
initError:
|
|
588
|
-
retry:
|
|
589
|
-
showLinkDialog:
|
|
590
|
-
linkUrl:
|
|
591
|
-
linkColor:
|
|
592
|
-
linkDialogRef:
|
|
593
|
-
mergeTags:
|
|
594
|
-
canRequestMergeTag:
|
|
595
|
-
isRequestingMergeTag:
|
|
596
|
-
syntax:
|
|
597
|
-
canInsertLogicTag:
|
|
598
|
-
isRequestingLogicTag:
|
|
599
|
-
openLinkDialog:
|
|
600
|
-
insertLink:
|
|
601
|
-
removeLink:
|
|
602
|
-
closeLinkDialog:
|
|
603
|
-
handleLinkKeydown:
|
|
604
|
-
handleAddMergeTag:
|
|
605
|
-
handleAddLogicTag:
|
|
583
|
+
editor: y,
|
|
584
|
+
EditorContent: ne,
|
|
585
|
+
isLoading: P,
|
|
586
|
+
isEditable: a,
|
|
587
|
+
initError: F,
|
|
588
|
+
retry: oe,
|
|
589
|
+
showLinkDialog: S,
|
|
590
|
+
linkUrl: C,
|
|
591
|
+
linkColor: T,
|
|
592
|
+
linkDialogRef: E,
|
|
593
|
+
mergeTags: o,
|
|
594
|
+
canRequestMergeTag: s,
|
|
595
|
+
isRequestingMergeTag: l,
|
|
596
|
+
syntax: d,
|
|
597
|
+
canInsertLogicTag: p,
|
|
598
|
+
isRequestingLogicTag: m,
|
|
599
|
+
openLinkDialog: ee,
|
|
600
|
+
insertLink: D,
|
|
601
|
+
removeLink: O,
|
|
602
|
+
closeLinkDialog: A,
|
|
603
|
+
handleLinkKeydown: j,
|
|
604
|
+
handleAddMergeTag: ce,
|
|
605
|
+
handleAddLogicTag: le
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
let e =
|
|
612
|
-
return
|
|
609
|
+
var $r = /* @__PURE__ */ new Set(), ei = 0, ti = 0;
|
|
610
|
+
function ni() {
|
|
611
|
+
let e = ++ti;
|
|
612
|
+
return $r.add(e), ei === 0 && (ei = e), {
|
|
613
613
|
id: e,
|
|
614
|
-
isActive: () =>
|
|
614
|
+
isActive: () => $r.size <= 1 || ei === e,
|
|
615
615
|
claim: () => {
|
|
616
|
-
|
|
616
|
+
ei = e;
|
|
617
617
|
},
|
|
618
618
|
dispose: () => {
|
|
619
|
-
if (
|
|
620
|
-
let e = Array.from(
|
|
621
|
-
|
|
619
|
+
if ($r.delete(e), ei === e) {
|
|
620
|
+
let e = Array.from($r);
|
|
621
|
+
ei = e[e.length - 1] ?? 0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
// src/utils/resolveLintOptions.ts
|
|
627
|
-
function
|
|
627
|
+
function ri(e) {
|
|
628
628
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
629
629
|
return {
|
|
630
630
|
...e.lint,
|
|
@@ -633,8 +633,8 @@ function ti(e) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
|
-
var
|
|
637
|
-
function
|
|
636
|
+
var ii = 500;
|
|
637
|
+
function ai(e) {
|
|
638
638
|
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a = 0, o = null;
|
|
639
639
|
function s() {
|
|
640
640
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -645,13 +645,13 @@ function ri(e) {
|
|
|
645
645
|
let o = ++a;
|
|
646
646
|
r.value = !0;
|
|
647
647
|
let s = {
|
|
648
|
-
content:
|
|
648
|
+
content: Ge(e.getContent()),
|
|
649
649
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
650
650
|
};
|
|
651
651
|
try {
|
|
652
652
|
let e = await t(s);
|
|
653
653
|
if (o !== a) return;
|
|
654
|
-
if (!
|
|
654
|
+
if (!ye(e)) {
|
|
655
655
|
i.value = !0;
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
@@ -666,7 +666,7 @@ function ri(e) {
|
|
|
666
666
|
function u() {
|
|
667
667
|
t && (s(), n.value === null ? l() : o = setTimeout(() => {
|
|
668
668
|
o = null, l();
|
|
669
|
-
},
|
|
669
|
+
}, ii));
|
|
670
670
|
}
|
|
671
671
|
return c(() => [
|
|
672
672
|
e.isActive(),
|
|
@@ -689,7 +689,7 @@ function ri(e) {
|
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
// src/composables/useMergeTagPicker.ts
|
|
692
|
-
function
|
|
692
|
+
function oi() {
|
|
693
693
|
let e = M(!1), t = M([]), n = M(null), r = null;
|
|
694
694
|
function i(i, a) {
|
|
695
695
|
if (r) {
|
|
@@ -704,7 +704,7 @@ function ii() {
|
|
|
704
704
|
let a = r;
|
|
705
705
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
706
706
|
}
|
|
707
|
-
return
|
|
707
|
+
return I() && T(() => {
|
|
708
708
|
if (r) {
|
|
709
709
|
let e = r;
|
|
710
710
|
r = null, e(null);
|
|
@@ -719,7 +719,7 @@ function ii() {
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
// src/composables/useLogicTagPicker.ts
|
|
722
|
-
function
|
|
722
|
+
function si() {
|
|
723
723
|
let e = M(!1), t = M([]), n = M([]), r = null;
|
|
724
724
|
function i(i, a) {
|
|
725
725
|
if (r) {
|
|
@@ -734,7 +734,7 @@ function ai() {
|
|
|
734
734
|
let a = r;
|
|
735
735
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
736
736
|
}
|
|
737
|
-
return
|
|
737
|
+
return I() && T(() => {
|
|
738
738
|
if (r) {
|
|
739
739
|
let e = r;
|
|
740
740
|
r = null, e(null);
|
|
@@ -749,14 +749,14 @@ function ai() {
|
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
// src/composables/useTemplateLint.ts
|
|
752
|
-
function
|
|
752
|
+
function ci(e) {
|
|
753
753
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
754
754
|
}
|
|
755
|
-
var
|
|
756
|
-
function
|
|
755
|
+
var li = !1;
|
|
756
|
+
function ui(e) {
|
|
757
757
|
let t = M([]), n = M(0), r = M(-1), i = c(e.content, () => {
|
|
758
758
|
n.value++;
|
|
759
|
-
}, { deep: !0 }), a = M(!1), o = M(!1), s =
|
|
759
|
+
}, { deep: !0 }), a = M(!1), o = M(!1), s = ie(null), l = ci(e.options), u = null, d = !1;
|
|
760
760
|
l || f();
|
|
761
761
|
async function f() {
|
|
762
762
|
try {
|
|
@@ -765,7 +765,7 @@ function ci(e) {
|
|
|
765
765
|
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = pe(n, p, { debounce: e.debounce ?? 500 });
|
|
766
766
|
} catch {
|
|
767
767
|
if (d) return;
|
|
768
|
-
o.value = !0,
|
|
768
|
+
o.value = !0, li || (li = !0, Dt.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
function p() {
|
|
@@ -804,7 +804,7 @@ function ci(e) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
// src/composables/useKeyboardReorder.ts
|
|
807
|
-
function
|
|
807
|
+
function di(e, t, n = []) {
|
|
808
808
|
let r = M(null), i = M(""), a = null;
|
|
809
809
|
function o(t) {
|
|
810
810
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -831,7 +831,7 @@ function li(e, t, n = []) {
|
|
|
831
831
|
let i = o(r);
|
|
832
832
|
if (!i) return "";
|
|
833
833
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
834
|
-
return a ?
|
|
834
|
+
return a ? or(a, t.t, n) : "";
|
|
835
835
|
}
|
|
836
836
|
function c(t, n) {
|
|
837
837
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -899,14 +899,14 @@ function li(e, t, n = []) {
|
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
// src/composables/useUiTheme.ts
|
|
902
|
-
function
|
|
902
|
+
function fi(e) {
|
|
903
903
|
let n = t("(prefers-color-scheme: dark)");
|
|
904
904
|
return { resolvedTheme: k(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
905
905
|
}
|
|
906
906
|
// src/composables/useCustomBlockStylesheets.ts
|
|
907
|
-
function
|
|
907
|
+
function pi(e, t) {
|
|
908
908
|
return k(() => {
|
|
909
|
-
let n =
|
|
909
|
+
let n = mi(e.value.blocks);
|
|
910
910
|
if (n.size === 0) return [];
|
|
911
911
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
912
912
|
for (let e of n) {
|
|
@@ -918,59 +918,59 @@ function di(e, t) {
|
|
|
918
918
|
return i;
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function mi(e) {
|
|
922
922
|
let t = /* @__PURE__ */ new Set();
|
|
923
|
-
return
|
|
923
|
+
return hi(e, t), t;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
for (let n of e) if (
|
|
925
|
+
function hi(e, t) {
|
|
926
|
+
for (let n of e) if (wt(n)) t.add(n.customType);
|
|
927
927
|
else if (n.type === "section") {
|
|
928
928
|
let e = n.children;
|
|
929
929
|
if (!e) continue;
|
|
930
|
-
for (let n of e)
|
|
931
|
-
} else
|
|
930
|
+
for (let n of e) hi(n, t);
|
|
931
|
+
} else ge(n) && hi(n.children, t);
|
|
932
932
|
}
|
|
933
933
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
|
-
var
|
|
934
|
+
var gi = [
|
|
935
935
|
{
|
|
936
936
|
type: "section",
|
|
937
|
-
createBlock:
|
|
937
|
+
createBlock: Be
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
type: "title",
|
|
941
|
-
createBlock:
|
|
941
|
+
createBlock: He
|
|
942
942
|
},
|
|
943
943
|
{
|
|
944
944
|
type: "paragraph",
|
|
945
|
-
createBlock:
|
|
945
|
+
createBlock: Ie
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
948
|
type: "image",
|
|
949
|
-
createBlock:
|
|
949
|
+
createBlock: Re
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
type: "button",
|
|
953
|
-
createBlock:
|
|
953
|
+
createBlock: je
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
956
|
type: "divider",
|
|
957
|
-
createBlock:
|
|
957
|
+
createBlock: Tt
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
type: "video",
|
|
961
|
-
createBlock:
|
|
961
|
+
createBlock: Ke
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
type: "social",
|
|
965
|
-
createBlock:
|
|
965
|
+
createBlock: gt
|
|
966
966
|
},
|
|
967
967
|
{
|
|
968
968
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
969
|
+
createBlock: Se
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
972
|
type: "table",
|
|
973
|
-
createBlock:
|
|
973
|
+
createBlock: We
|
|
974
974
|
},
|
|
975
975
|
{
|
|
976
976
|
type: "spacer",
|
|
@@ -978,15 +978,15 @@ var mi = [
|
|
|
978
978
|
},
|
|
979
979
|
{
|
|
980
980
|
type: "html",
|
|
981
|
-
createBlock:
|
|
981
|
+
createBlock: _e
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
type: "countdown",
|
|
985
|
-
createBlock:
|
|
985
|
+
createBlock: be
|
|
986
986
|
}
|
|
987
987
|
];
|
|
988
|
-
function
|
|
989
|
-
for (let n of
|
|
988
|
+
function _i(e, t) {
|
|
989
|
+
for (let n of gi) {
|
|
990
990
|
let r = t[n.type];
|
|
991
991
|
r && e.registerBuiltIn(n.type, {
|
|
992
992
|
component: r,
|
|
@@ -995,31 +995,31 @@ function hi(e, t) {
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
998
|
-
function
|
|
998
|
+
function vi(e) {
|
|
999
999
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1000
1000
|
}
|
|
1001
1001
|
// src/utils/collectOffPaletteDefaults.ts
|
|
1002
|
-
function
|
|
1002
|
+
function yi(e) {
|
|
1003
1003
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let r = new Set(e.map((e) =>
|
|
1007
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1005
|
+
function bi(e, t, n) {
|
|
1006
|
+
let r = new Set(e.map((e) => Ot(e))), i = [], a = (e, t) => {
|
|
1007
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ot(o)) && i.push(`${t}.${n}: ${o}`) : yi(o) && a(o, `${t}.${n}`);
|
|
1008
1008
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1009
|
+
for (let [e, t] of Object.entries(yt)) {
|
|
1010
1010
|
let n = o?.[e];
|
|
1011
1011
|
a({
|
|
1012
1012
|
...t,
|
|
1013
|
-
...
|
|
1013
|
+
...yi(n) ? n : {}
|
|
1014
1014
|
}, e);
|
|
1015
1015
|
}
|
|
1016
1016
|
return a({
|
|
1017
|
-
|
|
1017
|
+
...$e,
|
|
1018
1018
|
...n ?? {}
|
|
1019
1019
|
}, "template"), i;
|
|
1020
1020
|
}
|
|
1021
1021
|
// src/utils/localizedBlockDefaults.ts
|
|
1022
|
-
function
|
|
1022
|
+
function xi(e) {
|
|
1023
1023
|
return {
|
|
1024
1024
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1025
1025
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1027,8 +1027,9 @@ function yi(e) {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
1029
|
// src/i18n/index.ts
|
|
1030
|
-
var
|
|
1030
|
+
var Si = /* #__PURE__ */ Object.assign({
|
|
1031
1031
|
"./locales/ca.ts": () => import("./ca-BJn8lcJx.js"),
|
|
1032
|
+
"./locales/da.ts": () => import("./da-qQzj0QGy.js"),
|
|
1032
1033
|
"./locales/de.ts": () => import("./de-BLFp3nWx.js"),
|
|
1033
1034
|
"./locales/en.ts": () => import("./en-DGGQJGbm.js"),
|
|
1034
1035
|
"./locales/es.ts": () => import("./es-DTY9qgLv.js"),
|
|
@@ -1036,53 +1037,53 @@ var bi = /* #__PURE__ */ Object.assign({
|
|
|
1036
1037
|
"./locales/ja.ts": () => import("./ja-6uOXkh4v.js"),
|
|
1037
1038
|
"./locales/nl.ts": () => import("./nl-DCxuxwNq.js"),
|
|
1038
1039
|
"./locales/pt-BR.ts": () => import("./pt-BR-CBkcrebr.js")
|
|
1039
|
-
}),
|
|
1040
|
+
}), Ci = /* #__PURE__ */ Object.assign({
|
|
1040
1041
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1041
1042
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
1042
1043
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
1043
1044
|
});
|
|
1044
|
-
function
|
|
1045
|
+
function wi(e) {
|
|
1045
1046
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1046
1047
|
}
|
|
1047
|
-
var
|
|
1048
|
-
function
|
|
1048
|
+
var Ti = wi(Si), Ei = wi(Ci);
|
|
1049
|
+
function Di(e) {
|
|
1049
1050
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1050
1051
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let n =
|
|
1053
|
-
return t.find((e) =>
|
|
1052
|
+
function Oi(e, t) {
|
|
1053
|
+
let n = Di(e);
|
|
1054
|
+
return t.find((e) => Di(e) === n);
|
|
1054
1055
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1056
|
+
function ki(e) {
|
|
1057
|
+
return Di(e).split("-")[0];
|
|
1057
1058
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1059
|
+
function Ai(e, t) {
|
|
1060
|
+
return Oi(e, t) ?? Oi(ki(e), t);
|
|
1060
1061
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1062
|
+
function ji(e, t) {
|
|
1063
|
+
return Ai(e, t) ?? "en";
|
|
1063
1064
|
}
|
|
1064
|
-
async function
|
|
1065
|
-
let t =
|
|
1065
|
+
async function Mi(e) {
|
|
1066
|
+
let t = Si[`./locales/${ji(e, Ti)}.ts`];
|
|
1066
1067
|
return (await t()).default;
|
|
1067
1068
|
}
|
|
1068
|
-
async function
|
|
1069
|
-
let t =
|
|
1069
|
+
async function Ni(e) {
|
|
1070
|
+
let t = Ci[`./locales/cloud/${ji(e, Ei)}.ts`];
|
|
1070
1071
|
return (await t()).default;
|
|
1071
1072
|
}
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1073
|
+
function Pi(e) {
|
|
1074
|
+
return Ai(e, Ti) !== void 0;
|
|
1074
1075
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1076
|
+
function Fi(e) {
|
|
1077
|
+
return Ai(e, Ei) !== void 0;
|
|
1077
1078
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return [...
|
|
1079
|
+
function Ii() {
|
|
1080
|
+
return [...Ti];
|
|
1080
1081
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return [...
|
|
1082
|
+
function Li() {
|
|
1083
|
+
return [...Ei];
|
|
1083
1084
|
}
|
|
1084
1085
|
// src/i18n/contentDefaults.ts
|
|
1085
|
-
var
|
|
1086
|
+
var Ri = {
|
|
1086
1087
|
en: {
|
|
1087
1088
|
video: "Video",
|
|
1088
1089
|
days: "Days",
|
|
@@ -1146,19 +1147,27 @@ var Ii = {
|
|
|
1146
1147
|
minutes: "分",
|
|
1147
1148
|
seconds: "秒",
|
|
1148
1149
|
expired: "このオファーは終了しました"
|
|
1150
|
+
},
|
|
1151
|
+
da: {
|
|
1152
|
+
video: "Video",
|
|
1153
|
+
days: "Dage",
|
|
1154
|
+
hours: "Timer",
|
|
1155
|
+
minutes: "Minutter",
|
|
1156
|
+
seconds: "Sekunder",
|
|
1157
|
+
expired: "Dette tilbud er udløbet"
|
|
1149
1158
|
}
|
|
1150
1159
|
};
|
|
1151
|
-
Object.keys(
|
|
1152
|
-
var
|
|
1153
|
-
function
|
|
1154
|
-
if (!e) return
|
|
1155
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1156
|
-
if (n) return
|
|
1157
|
-
let r =
|
|
1158
|
-
return r ?
|
|
1159
|
-
}
|
|
1160
|
-
function
|
|
1161
|
-
let t =
|
|
1160
|
+
Object.keys(Ri);
|
|
1161
|
+
var zi = new Map(Object.keys(Ri).map((e) => [e.toLowerCase(), e]));
|
|
1162
|
+
function Bi(e) {
|
|
1163
|
+
if (!e) return Ri.en;
|
|
1164
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = zi.get(t);
|
|
1165
|
+
if (n) return Ri[n];
|
|
1166
|
+
let r = zi.get(ki(t));
|
|
1167
|
+
return r ? Ri[r] : Ri.en;
|
|
1168
|
+
}
|
|
1169
|
+
function Vi(e) {
|
|
1170
|
+
let t = Bi(e);
|
|
1162
1171
|
return {
|
|
1163
1172
|
video: { alt: t.video },
|
|
1164
1173
|
countdown: {
|
|
@@ -1171,9 +1180,9 @@ function zi(e) {
|
|
|
1171
1180
|
};
|
|
1172
1181
|
}
|
|
1173
1182
|
// src/utils/collectColorFieldIssues.ts
|
|
1174
|
-
function
|
|
1183
|
+
function Hi(e, t) {
|
|
1175
1184
|
let n = [], r = (r, i) => {
|
|
1176
|
-
let a =
|
|
1185
|
+
let a = rr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1177
1186
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1178
1187
|
id: s("invalid-presets"),
|
|
1179
1188
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1184,8 +1193,8 @@ function Bi(e, t) {
|
|
|
1184
1193
|
id: s("allow-custom-ignored"),
|
|
1185
1194
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1186
1195
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1187
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1188
|
-
e !== "" && !t.has(
|
|
1196
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Ot(e)));
|
|
1197
|
+
e !== "" && !t.has(Ot(e)) && n.push({
|
|
1189
1198
|
id: s("off-palette-default"),
|
|
1190
1199
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1191
1200
|
});
|
|
@@ -1196,7 +1205,7 @@ function Bi(e, t) {
|
|
|
1196
1205
|
return n;
|
|
1197
1206
|
}
|
|
1198
1207
|
// src/utils/keyboardShortcuts.ts
|
|
1199
|
-
function
|
|
1208
|
+
function Ui(e) {
|
|
1200
1209
|
for (let t of e.composedPath()) {
|
|
1201
1210
|
if (!(t instanceof HTMLElement)) continue;
|
|
1202
1211
|
if (t.isContentEditable) return !0;
|
|
@@ -1205,14 +1214,14 @@ function Vi(e) {
|
|
|
1205
1214
|
}
|
|
1206
1215
|
return !1;
|
|
1207
1216
|
}
|
|
1208
|
-
function
|
|
1217
|
+
function Wi(e, t) {
|
|
1209
1218
|
let n = e.metaKey || e.ctrlKey;
|
|
1210
1219
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1211
1220
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1212
|
-
if (
|
|
1221
|
+
if (Ui(e)) return;
|
|
1213
1222
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1214
1223
|
} else {
|
|
1215
|
-
if (t.isPicking?.() && !
|
|
1224
|
+
if (t.isPicking?.() && !Ui(e)) {
|
|
1216
1225
|
if (e.key === "Escape") {
|
|
1217
1226
|
e.preventDefault(), t.onCancelPick?.();
|
|
1218
1227
|
return;
|
|
@@ -1226,139 +1235,139 @@ function Hi(e, t) {
|
|
|
1226
1235
|
return;
|
|
1227
1236
|
}
|
|
1228
1237
|
}
|
|
1229
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1238
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ui(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1230
1239
|
}
|
|
1231
1240
|
}
|
|
1232
1241
|
// src/utils/blockComponentResolver.ts
|
|
1233
|
-
function
|
|
1242
|
+
function Gi(e, t) {
|
|
1234
1243
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1235
1244
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1236
1245
|
}
|
|
1237
|
-
function
|
|
1246
|
+
function Ki(e, t, n) {
|
|
1238
1247
|
if (t) {
|
|
1239
1248
|
let n = t.getComponent(e);
|
|
1240
1249
|
if (n) return n;
|
|
1241
1250
|
}
|
|
1242
1251
|
return n[e.type] ?? null;
|
|
1243
1252
|
}
|
|
1244
|
-
var
|
|
1245
|
-
function
|
|
1253
|
+
var qi = "--tpl-block-bg-layer", Ji = "--tpl-email-frame-width", Yi = "tpl-has-bg-image";
|
|
1254
|
+
function Xi(e, t) {
|
|
1246
1255
|
if (t === null) return {};
|
|
1247
|
-
let n =
|
|
1256
|
+
let n = ze(e);
|
|
1248
1257
|
if (n === null) return {};
|
|
1249
|
-
let r = t?.trim(), i = r ?
|
|
1258
|
+
let r = t?.trim(), i = r ? ot(r) : n.url;
|
|
1250
1259
|
return {
|
|
1251
1260
|
backgroundImage: `url("${i}")`,
|
|
1252
1261
|
backgroundSize: n.size,
|
|
1253
1262
|
backgroundPosition: n.position,
|
|
1254
1263
|
backgroundRepeat: n.repeat,
|
|
1255
|
-
[
|
|
1264
|
+
[qi]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1256
1265
|
};
|
|
1257
1266
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return e &&
|
|
1267
|
+
function Zi(e) {
|
|
1268
|
+
return e && qi in e ? Yi : void 0;
|
|
1260
1269
|
}
|
|
1261
|
-
var
|
|
1270
|
+
var Qi = {
|
|
1262
1271
|
top: "flex-start",
|
|
1263
1272
|
middle: "center",
|
|
1264
1273
|
bottom: "flex-end"
|
|
1265
1274
|
};
|
|
1266
|
-
function
|
|
1267
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1275
|
+
function $i(e, t) {
|
|
1276
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${ea(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1268
1277
|
return {
|
|
1269
1278
|
display: "flex",
|
|
1270
1279
|
flexDirection: "column",
|
|
1271
|
-
justifyContent:
|
|
1280
|
+
justifyContent: Qi[e.verticalAlign],
|
|
1272
1281
|
boxSizing: "border-box",
|
|
1273
1282
|
...n
|
|
1274
1283
|
};
|
|
1275
1284
|
}
|
|
1276
|
-
function
|
|
1285
|
+
function ea(e, t) {
|
|
1277
1286
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1278
1287
|
}
|
|
1279
|
-
function
|
|
1288
|
+
function ta(e, t = {}) {
|
|
1280
1289
|
if (e.type === "wrapper") return {};
|
|
1281
1290
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1282
1291
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1283
1292
|
backgroundColor: r || "transparent"
|
|
1284
1293
|
};
|
|
1285
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1286
|
-
let n =
|
|
1294
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? mt.paragraphGap : mt.paragraphGap}px`), e.type === "section") {
|
|
1295
|
+
let n = ft(e.borderRadius);
|
|
1287
1296
|
n !== null && (i.borderRadius = n);
|
|
1288
|
-
let r =
|
|
1289
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1297
|
+
let r = Ve(e);
|
|
1298
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, $i(r, t.heroBoxWidth)), Object.assign(i, Xi({
|
|
1290
1299
|
...e.backgroundImage,
|
|
1291
1300
|
size: "cover",
|
|
1292
1301
|
repeat: !1
|
|
1293
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1302
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, ra(e.border)), Object.assign(i, Xi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1294
1303
|
}
|
|
1295
1304
|
return i;
|
|
1296
1305
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return e.type === "section" ?
|
|
1299
|
-
backgroundImageUrl:
|
|
1306
|
+
function na(e, t, n, r) {
|
|
1307
|
+
return e.type === "section" ? ta(e, {
|
|
1308
|
+
backgroundImageUrl: zn(t, e.backgroundImage, n),
|
|
1300
1309
|
heroBoxWidth: r
|
|
1301
|
-
}) :
|
|
1310
|
+
}) : ta(e);
|
|
1302
1311
|
}
|
|
1303
|
-
function
|
|
1312
|
+
function ra(e) {
|
|
1304
1313
|
let t = {};
|
|
1305
|
-
for (let [n, r] of Object.entries(
|
|
1314
|
+
for (let [n, r] of Object.entries(Xe(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1306
1315
|
return t;
|
|
1307
1316
|
}
|
|
1308
|
-
var
|
|
1317
|
+
var ia = {
|
|
1309
1318
|
width: "100cqw",
|
|
1310
1319
|
maxWidth: "none",
|
|
1311
1320
|
marginInline: "calc(50% - 50cqw)",
|
|
1312
1321
|
boxSizing: "border-box"
|
|
1313
1322
|
};
|
|
1314
|
-
function
|
|
1323
|
+
function aa(e) {
|
|
1315
1324
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1316
1325
|
}
|
|
1317
|
-
function
|
|
1326
|
+
function oa(e) {
|
|
1318
1327
|
let t = {
|
|
1319
1328
|
width: "var(--tpl-email-frame-width)",
|
|
1320
1329
|
maxWidth: "100%",
|
|
1321
1330
|
marginInline: "auto",
|
|
1322
1331
|
boxSizing: "border-box"
|
|
1323
1332
|
};
|
|
1324
|
-
return e && (t.padding =
|
|
1333
|
+
return e && (t.padding = aa(e)), t;
|
|
1325
1334
|
}
|
|
1326
|
-
function
|
|
1335
|
+
function sa(e, t = {}) {
|
|
1327
1336
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1328
1337
|
let n = e.wrapper, r = {};
|
|
1329
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1330
|
-
let e =
|
|
1338
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = aa(n.padding)), !n.fullWidth) {
|
|
1339
|
+
let e = ft(n.borderRadius);
|
|
1331
1340
|
e !== null && (r.borderRadius = e);
|
|
1332
1341
|
}
|
|
1333
|
-
return Object.assign(r,
|
|
1342
|
+
return Object.assign(r, Xi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, ia), r;
|
|
1334
1343
|
}
|
|
1335
|
-
function
|
|
1344
|
+
function ca(e, t = {}) {
|
|
1336
1345
|
if (e.type !== "wrapper") return null;
|
|
1337
1346
|
let n = {};
|
|
1338
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1347
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = aa(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Xi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, ia), n;
|
|
1339
1348
|
}
|
|
1340
1349
|
// src/utils/mergeTagLabelSegments.ts
|
|
1341
|
-
function
|
|
1350
|
+
function la(e, t, n, r = !1) {
|
|
1342
1351
|
if (!e) return [];
|
|
1343
1352
|
let i = [], a = 0;
|
|
1344
|
-
for (let o of
|
|
1353
|
+
for (let o of Ue(e, n)) {
|
|
1345
1354
|
o.index > a && i.push({
|
|
1346
1355
|
type: "text",
|
|
1347
1356
|
value: e.slice(a, o.index)
|
|
1348
1357
|
});
|
|
1349
1358
|
let s = o.value;
|
|
1350
|
-
if (
|
|
1351
|
-
let e = r ?
|
|
1359
|
+
if (Fe(s, n)) {
|
|
1360
|
+
let e = r ? ht(s, t) : void 0;
|
|
1352
1361
|
i.push(e === void 0 ? {
|
|
1353
1362
|
type: "tag",
|
|
1354
|
-
value:
|
|
1363
|
+
value: nt(s, t)
|
|
1355
1364
|
} : {
|
|
1356
1365
|
type: "text",
|
|
1357
1366
|
value: e
|
|
1358
1367
|
});
|
|
1359
|
-
} else
|
|
1368
|
+
} else St(s, n) ? i.push({
|
|
1360
1369
|
type: "tag",
|
|
1361
|
-
value:
|
|
1370
|
+
value: et(s, n)
|
|
1362
1371
|
}) : i.push({
|
|
1363
1372
|
type: "text",
|
|
1364
1373
|
value: s
|
|
@@ -1371,27 +1380,27 @@ function sa(e, t, n, r = !1) {
|
|
|
1371
1380
|
}), i;
|
|
1372
1381
|
}
|
|
1373
1382
|
// src/components/MergeTagPreviewText.vue
|
|
1374
|
-
var
|
|
1383
|
+
var ua = z({
|
|
1375
1384
|
name: "MergeTagPreviewText",
|
|
1376
1385
|
props: { text: {
|
|
1377
1386
|
type: String,
|
|
1378
1387
|
required: !0
|
|
1379
1388
|
} },
|
|
1380
1389
|
setup(e) {
|
|
1381
|
-
let t = R(Yt,
|
|
1390
|
+
let t = R(Yt, tn), n = R(It, Je.liquid), r = R(kn, null), i = k(() => la(e.text, t.value, n, r?.value ?? !1));
|
|
1382
1391
|
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1383
1392
|
key: t,
|
|
1384
1393
|
class: "tpl-merge-tag-label"
|
|
1385
1394
|
}, e.value) : e.value);
|
|
1386
1395
|
}
|
|
1387
|
-
}),
|
|
1396
|
+
}), da = ["href"], fa = /* @__PURE__ */ z({
|
|
1388
1397
|
__name: "ButtonBlock",
|
|
1389
1398
|
props: {
|
|
1390
1399
|
block: {},
|
|
1391
1400
|
viewport: {}
|
|
1392
1401
|
},
|
|
1393
1402
|
setup(e) {
|
|
1394
|
-
let t = e, n =
|
|
1403
|
+
let t = e, n = dn(ln, "ButtonBlock");
|
|
1395
1404
|
function r(e) {
|
|
1396
1405
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1397
1406
|
}
|
|
@@ -1402,32 +1411,33 @@ var ca = z({
|
|
|
1402
1411
|
backgroundColor: t.block.backgroundColor,
|
|
1403
1412
|
color: t.block.textColor,
|
|
1404
1413
|
fontSize: `${t.block.fontSize}px`,
|
|
1414
|
+
lineHeight: String(Ye),
|
|
1405
1415
|
fontWeight: r(t.block.fontWeight),
|
|
1406
1416
|
textDecoration: "none",
|
|
1407
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1417
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : ft(t.block.borderRadius) ?? "0px",
|
|
1408
1418
|
textAlign: "center"
|
|
1409
1419
|
};
|
|
1410
|
-
return Object.assign(e,
|
|
1420
|
+
return Object.assign(e, ra(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1411
1421
|
}), o = k(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1412
|
-
return (t, n) => (m(), N("div", { style: y(o.value) }, [
|
|
1422
|
+
return (t, n) => (m(), N("div", { style: y(o.value) }, [P("a", {
|
|
1413
1423
|
href: e.block.url || "#",
|
|
1414
1424
|
style: y(a.value),
|
|
1415
1425
|
class: "tpl:cursor-default",
|
|
1416
1426
|
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1417
|
-
}, [E(
|
|
1427
|
+
}, [E(ua, { text: e.block.text }, null, 8, ["text"])], 12, da)], 4));
|
|
1418
1428
|
}
|
|
1419
|
-
}),
|
|
1429
|
+
}), pa = ["innerHTML"], ma = [
|
|
1420
1430
|
"src",
|
|
1421
1431
|
"width",
|
|
1422
1432
|
"height"
|
|
1423
|
-
],
|
|
1433
|
+
], ha = /* @__PURE__ */ z({
|
|
1424
1434
|
__name: "CustomBlockIcon",
|
|
1425
1435
|
props: {
|
|
1426
1436
|
icon: {},
|
|
1427
1437
|
size: {}
|
|
1428
1438
|
},
|
|
1429
1439
|
setup(e) {
|
|
1430
|
-
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = k(() => r.value ?
|
|
1440
|
+
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = k(() => r.value ? dr(t.icon ?? "") : "");
|
|
1431
1441
|
return (t, o) => r.value ? (m(), N("span", {
|
|
1432
1442
|
key: 0,
|
|
1433
1443
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1436,33 +1446,33 @@ var ca = z({
|
|
|
1436
1446
|
height: `${n.value}px`
|
|
1437
1447
|
}),
|
|
1438
1448
|
innerHTML: a.value
|
|
1439
|
-
}, null, 12,
|
|
1449
|
+
}, null, 12, pa)) : i.value ? (m(), N("img", {
|
|
1440
1450
|
key: 1,
|
|
1441
1451
|
src: e.icon,
|
|
1442
1452
|
width: n.value,
|
|
1443
1453
|
height: n.value,
|
|
1444
1454
|
class: "tpl:inline-block",
|
|
1445
1455
|
alt: ""
|
|
1446
|
-
}, null, 8,
|
|
1456
|
+
}, null, 8, ma)) : (m(), oe(A(Ar), {
|
|
1447
1457
|
key: 2,
|
|
1448
1458
|
size: n.value,
|
|
1449
1459
|
"stroke-width": 1.5
|
|
1450
1460
|
}, null, 8, ["size"]));
|
|
1451
1461
|
}
|
|
1452
|
-
}),
|
|
1462
|
+
}), ga = { class: "tpl:w-full" }, _a = {
|
|
1453
1463
|
key: 0,
|
|
1454
1464
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1455
|
-
},
|
|
1465
|
+
}, va = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ya = {
|
|
1456
1466
|
key: 1,
|
|
1457
1467
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1458
|
-
},
|
|
1468
|
+
}, ba = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xa = {
|
|
1459
1469
|
key: 2,
|
|
1460
1470
|
class: "tpl:relative"
|
|
1461
|
-
},
|
|
1471
|
+
}, Sa = ["innerHTML"], Ca = {
|
|
1462
1472
|
key: 0,
|
|
1463
1473
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1464
1474
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1465
|
-
},
|
|
1475
|
+
}, wa = /* @__PURE__ */ z({
|
|
1466
1476
|
__name: "CustomBlock",
|
|
1467
1477
|
props: {
|
|
1468
1478
|
block: {},
|
|
@@ -1470,7 +1480,7 @@ var ca = z({
|
|
|
1470
1480
|
},
|
|
1471
1481
|
emits: ["fetchData"],
|
|
1472
1482
|
setup(e, { emit: t }) {
|
|
1473
|
-
let n = e, r = t, { t: a } = le(), o = R(
|
|
1483
|
+
let n = e, r = t, { t: a } = le(), o = R(bn, null), l = M(""), u = k(() => fr(l.value)), f = M(!1), p = k(() => o?.getDefinition(n.block.customType)), h = k(() => !!p.value), g = k(() => n.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: b } = Rn({
|
|
1474
1484
|
definition: p,
|
|
1475
1485
|
block: g,
|
|
1476
1486
|
onUpdate: (e, t) => {
|
|
@@ -1479,10 +1489,10 @@ var ca = z({
|
|
|
1479
1489
|
dataSourceFetched: t
|
|
1480
1490
|
});
|
|
1481
1491
|
}
|
|
1482
|
-
}), x = R(Yt,
|
|
1492
|
+
}), x = R(Yt, tn), S = R(kn, null), C = k(() => {
|
|
1483
1493
|
if (!S?.value) return n.block;
|
|
1484
1494
|
let e = {};
|
|
1485
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1495
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? vt(r, x.value) : r;
|
|
1486
1496
|
return {
|
|
1487
1497
|
...n.block,
|
|
1488
1498
|
fieldValues: e
|
|
@@ -1506,10 +1516,10 @@ var ca = z({
|
|
|
1506
1516
|
T();
|
|
1507
1517
|
}, { deep: !0 }), c(() => S?.value, () => {
|
|
1508
1518
|
T();
|
|
1509
|
-
}), (e, t) => (m(), N("div",
|
|
1519
|
+
}), (e, t) => (m(), N("div", ga, [h.value ? f.value ? (m(), N("div", ya, [E(A(hr), {
|
|
1510
1520
|
size: 24,
|
|
1511
1521
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1512
|
-
}),
|
|
1522
|
+
}), P("span", ba, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", xa, [P("div", { innerHTML: u.value }, null, 8, Sa), A(b) && A(y) ? (m(), N("div", Ca, [A(_) ? (m(), oe(mr, {
|
|
1513
1523
|
key: 1,
|
|
1514
1524
|
class: "tpl:w-48"
|
|
1515
1525
|
})) : (m(), N("button", {
|
|
@@ -1517,16 +1527,16 @@ var ca = z({
|
|
|
1517
1527
|
type: "button",
|
|
1518
1528
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1519
1529
|
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1520
|
-
}, [p.value?.icon ? (m(), oe(
|
|
1530
|
+
}, [p.value?.icon ? (m(), oe(ha, {
|
|
1521
1531
|
key: 0,
|
|
1522
1532
|
icon: p.value.icon,
|
|
1523
1533
|
size: 16
|
|
1524
|
-
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div",
|
|
1534
|
+
}, null, 8, ["icon"])) : j("", !0), te(" " + d(p.value?.dataSource?.label || A(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (m(), N("div", _a, [E(A(Pr), {
|
|
1525
1535
|
size: 24,
|
|
1526
1536
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1527
|
-
}),
|
|
1537
|
+
}), P("span", va, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1528
1538
|
}
|
|
1529
|
-
}),
|
|
1539
|
+
}), Ta = { class: "tpl:w-full" }, Ea = /* @__PURE__ */ z({
|
|
1530
1540
|
__name: "DividerBlock",
|
|
1531
1541
|
props: {
|
|
1532
1542
|
block: {},
|
|
@@ -1538,28 +1548,28 @@ var ca = z({
|
|
|
1538
1548
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1539
1549
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1540
1550
|
}));
|
|
1541
|
-
return (e, t) => (m(), N("div",
|
|
1551
|
+
return (e, t) => (m(), N("div", Ta, [P("hr", {
|
|
1542
1552
|
class: "tpl:m-0 tpl:border-none",
|
|
1543
1553
|
style: y(n.value)
|
|
1544
1554
|
}, null, 4)]));
|
|
1545
1555
|
}
|
|
1546
|
-
}),
|
|
1556
|
+
}), Da = { class: "tpl:w-full" }, Oa = ["srcdoc", "title"], ka = {
|
|
1547
1557
|
key: 1,
|
|
1548
1558
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1549
|
-
},
|
|
1559
|
+
}, Aa = {
|
|
1550
1560
|
key: 0,
|
|
1551
1561
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1552
|
-
},
|
|
1562
|
+
}, ja = {
|
|
1553
1563
|
key: 1,
|
|
1554
1564
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1555
|
-
},
|
|
1565
|
+
}, Ma = /* @__PURE__ */ z({
|
|
1556
1566
|
__name: "HtmlBlock",
|
|
1557
1567
|
props: {
|
|
1558
1568
|
block: {},
|
|
1559
1569
|
viewport: {}
|
|
1560
1570
|
},
|
|
1561
1571
|
setup(e) {
|
|
1562
|
-
let t = e, { t: n } = le(), r = R(
|
|
1572
|
+
let t = e, { t: n } = le(), r = R(Qt, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = R(Yt, tn), s = R(kn, null), l = k(() => s?.value ? vt(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1563
1573
|
function h() {
|
|
1564
1574
|
let e = u.value?.contentDocument;
|
|
1565
1575
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1571,9 +1581,9 @@ var ca = z({
|
|
|
1571
1581
|
}
|
|
1572
1582
|
return c(a, (e) => {
|
|
1573
1583
|
e || (p?.disconnect(), p = null);
|
|
1574
|
-
}),
|
|
1584
|
+
}), re(() => {
|
|
1575
1585
|
p?.disconnect(), p = null;
|
|
1576
|
-
}), (e, t) => (m(), N("div",
|
|
1586
|
+
}), (e, t) => (m(), N("div", Da, [a.value ? (m(), N("iframe", {
|
|
1577
1587
|
key: 0,
|
|
1578
1588
|
ref_key: "iframeRef",
|
|
1579
1589
|
ref: u,
|
|
@@ -1583,18 +1593,18 @@ var ca = z({
|
|
|
1583
1593
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1584
1594
|
style: y({ height: `${f.value}px` }),
|
|
1585
1595
|
onLoad: g
|
|
1586
|
-
}, null, 44,
|
|
1596
|
+
}, null, 44, Oa)) : (m(), N("div", ka, [E(A(Qn), {
|
|
1587
1597
|
size: 24,
|
|
1588
1598
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1589
|
-
}), i.value ? (m(), N("span",
|
|
1599
|
+
}), i.value ? (m(), N("span", Aa, d(A(n).html.preview), 1)) : (m(), N("span", ja, d(A(n).html.empty), 1))]))]));
|
|
1590
1600
|
}
|
|
1591
|
-
}),
|
|
1601
|
+
}), Na = ["data-drop-enabled"], Pa = ["href"], Fa = ["src", "alt"], Ia = ["src", "alt"], La = {
|
|
1592
1602
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1593
1603
|
style: { opacity: "0.7" }
|
|
1594
|
-
},
|
|
1604
|
+
}, Ra = ["href"], za = ["src", "alt"], Ba = ["src", "alt"], Va = {
|
|
1595
1605
|
key: 4,
|
|
1596
1606
|
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1597
|
-
},
|
|
1607
|
+
}, Ha = ["aria-label"], Ua = { key: 1 }, Wa = /* @__PURE__ */ z({
|
|
1598
1608
|
__name: "ImageBlock",
|
|
1599
1609
|
props: {
|
|
1600
1610
|
block: {},
|
|
@@ -1602,20 +1612,20 @@ var ca = z({
|
|
|
1602
1612
|
},
|
|
1603
1613
|
emits: ["update"],
|
|
1604
1614
|
setup(e, { emit: t }) {
|
|
1605
|
-
let n = e, r = t, { t: a } = le(), { syntax: o } = B(), s = k(() =>
|
|
1615
|
+
let n = e, r = t, { t: a } = le(), { syntax: o } = B(), s = k(() => st(n.block.src, o));
|
|
1606
1616
|
function c(e) {
|
|
1607
1617
|
let t = {
|
|
1608
1618
|
src: e.url,
|
|
1609
|
-
...
|
|
1619
|
+
...Zn(Jn(e.width, e.height))
|
|
1610
1620
|
};
|
|
1611
1621
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1612
1622
|
}
|
|
1613
|
-
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } =
|
|
1623
|
+
let l = M(), { canBrowse: u, dropEnabled: f, isUploading: p, showOverlay: h, openMediaBrowser: g } = nr({
|
|
1614
1624
|
target: l,
|
|
1615
1625
|
blocked: s,
|
|
1616
1626
|
apply: c
|
|
1617
1627
|
}), _ = k(() => ({ textAlign: n.block.align })), v = k(() => {
|
|
1618
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1628
|
+
let e = n.block.border, t = ["left", "right"].map((t) => at(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1619
1629
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1620
1630
|
}), b = k(() => {
|
|
1621
1631
|
let e = n.block.align;
|
|
@@ -1623,13 +1633,13 @@ var ca = z({
|
|
|
1623
1633
|
maxWidth: "100%",
|
|
1624
1634
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1625
1635
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1626
|
-
borderRadius:
|
|
1627
|
-
...
|
|
1636
|
+
borderRadius: ft(n.block.borderRadius) ?? void 0,
|
|
1637
|
+
...ra(n.block.border),
|
|
1628
1638
|
display: "block",
|
|
1629
1639
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1630
1640
|
marginRight: e === "center" ? "auto" : void 0
|
|
1631
1641
|
};
|
|
1632
|
-
}), x =
|
|
1642
|
+
}), x = Kn(() => s.value ? void 0 : n.block.src), S = Kn(() => s.value ? n.block.placeholderUrl : void 0);
|
|
1633
1643
|
return (t, n) => (m(), N("div", {
|
|
1634
1644
|
ref_key: "dropZoneRef",
|
|
1635
1645
|
ref: l,
|
|
@@ -1637,7 +1647,7 @@ var ca = z({
|
|
|
1637
1647
|
"data-drop-enabled": A(f),
|
|
1638
1648
|
class: "tpl:relative tpl:w-full",
|
|
1639
1649
|
style: y(_.value)
|
|
1640
|
-
}, [A(h) ? (m(), oe(
|
|
1650
|
+
}, [A(h) ? (m(), oe(Xn, {
|
|
1641
1651
|
key: 0,
|
|
1642
1652
|
uploading: A(p),
|
|
1643
1653
|
size: "canvas"
|
|
@@ -1647,66 +1657,66 @@ var ca = z({
|
|
|
1647
1657
|
target: "_blank",
|
|
1648
1658
|
rel: "noopener noreferrer",
|
|
1649
1659
|
onClick: n[0] ||= i(() => {}, ["prevent"])
|
|
1650
|
-
}, [
|
|
1660
|
+
}, [P("img", {
|
|
1651
1661
|
class: "tpl:border-0",
|
|
1652
1662
|
loading: "lazy",
|
|
1653
1663
|
src: A(S),
|
|
1654
1664
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1655
1665
|
style: y(b.value)
|
|
1656
|
-
}, null, 12,
|
|
1666
|
+
}, null, 12, Fa)], 8, Pa)) : (m(), N("img", {
|
|
1657
1667
|
key: 1,
|
|
1658
1668
|
class: "tpl:border-0",
|
|
1659
1669
|
src: A(S),
|
|
1660
1670
|
alt: e.block.alt,
|
|
1661
1671
|
style: y(b.value)
|
|
1662
|
-
}, null, 12,
|
|
1672
|
+
}, null, 12, Ia))], 64)) : e.block.src && s.value ? (m(), N("div", {
|
|
1663
1673
|
key: 2,
|
|
1664
1674
|
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1665
1675
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
1666
|
-
}, [E(A(
|
|
1676
|
+
}, [E(A(gr), {
|
|
1667
1677
|
size: 32,
|
|
1668
1678
|
"stroke-width": 1.5,
|
|
1669
1679
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1670
1680
|
style: { opacity: "0.5" }
|
|
1671
|
-
}),
|
|
1681
|
+
}), P("span", La, [E(ua, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (m(), N(L, { key: 3 }, [e.block.linkUrl ? (m(), N("a", {
|
|
1672
1682
|
key: 0,
|
|
1673
1683
|
href: e.block.linkUrl,
|
|
1674
1684
|
target: "_blank",
|
|
1675
1685
|
rel: "noopener noreferrer",
|
|
1676
1686
|
onClick: n[1] ||= i(() => {}, ["prevent"])
|
|
1677
|
-
}, [
|
|
1687
|
+
}, [P("img", {
|
|
1678
1688
|
class: "tpl:border-0",
|
|
1679
1689
|
loading: "lazy",
|
|
1680
1690
|
src: A(x),
|
|
1681
1691
|
alt: e.block.alt || A(a).image.altTextPlaceholder,
|
|
1682
1692
|
style: y(b.value)
|
|
1683
|
-
}, null, 12,
|
|
1693
|
+
}, null, 12, za)], 8, Ra)) : (m(), N("img", {
|
|
1684
1694
|
key: 1,
|
|
1685
1695
|
class: "tpl:border-0",
|
|
1686
1696
|
src: A(x),
|
|
1687
1697
|
alt: e.block.alt,
|
|
1688
1698
|
style: y(b.value)
|
|
1689
|
-
}, null, 12,
|
|
1699
|
+
}, null, 12, Ba))], 64)) : (m(), N("div", Va, [A(u) ? (m(), N("button", {
|
|
1690
1700
|
key: 0,
|
|
1691
1701
|
"aria-label": A(a).image.browseMedia,
|
|
1692
1702
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1693
1703
|
onClick: n[2] ||= i((...e) => A(g) && A(g)(...e), ["stop"])
|
|
1694
|
-
}, [E(A(
|
|
1704
|
+
}, [E(A(gr), {
|
|
1695
1705
|
size: 14,
|
|
1696
1706
|
"stroke-width": 1.5
|
|
1697
|
-
}), te(" " + d(A(a).image.browseMedia), 1)], 8,
|
|
1707
|
+
}), te(" " + d(A(a).image.browseMedia), 1)], 8, Ha)) : (m(), N("span", Ua, d(A(a).image.clickToAdd), 1))]))], 12, Na));
|
|
1698
1708
|
}
|
|
1699
|
-
}),
|
|
1709
|
+
}), Ga = { class: "tpl:w-full" }, Ka = ["href"], qa = {
|
|
1700
1710
|
key: 1,
|
|
1701
1711
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1702
|
-
},
|
|
1712
|
+
}, Ja = /* @__PURE__ */ z({
|
|
1703
1713
|
__name: "MenuBlock",
|
|
1704
1714
|
props: {
|
|
1705
1715
|
block: {},
|
|
1706
1716
|
viewport: {}
|
|
1707
1717
|
},
|
|
1708
1718
|
setup(e) {
|
|
1709
|
-
let t = e, { t: n } = le(), r =
|
|
1719
|
+
let t = e, { t: n } = le(), r = dn(ln, "MenuBlock"), a = k(() => ({
|
|
1710
1720
|
display: "flex",
|
|
1711
1721
|
flexWrap: "wrap",
|
|
1712
1722
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1718,10 +1728,10 @@ var ca = z({
|
|
|
1718
1728
|
function s(e) {
|
|
1719
1729
|
return e || t.block.linkColor || t.block.color;
|
|
1720
1730
|
}
|
|
1721
|
-
return (t, r) => (m(), N("div",
|
|
1731
|
+
return (t, r) => (m(), N("div", Ga, [o.value ? (m(), N("div", {
|
|
1722
1732
|
key: 0,
|
|
1723
1733
|
style: y(a.value)
|
|
1724
|
-
}, [(m(!0), N(L, null, v(e.block.items, (t, n) => (m(), N(L, { key: t.id }, [
|
|
1734
|
+
}, [(m(!0), N(L, null, v(e.block.items, (t, n) => (m(), N(L, { key: t.id }, [P("a", {
|
|
1725
1735
|
href: t.url || "#",
|
|
1726
1736
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1727
1737
|
style: y({
|
|
@@ -1730,45 +1740,49 @@ var ca = z({
|
|
|
1730
1740
|
textDecoration: t.underline ? "underline" : "none"
|
|
1731
1741
|
}),
|
|
1732
1742
|
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
1733
|
-
}, [E(
|
|
1743
|
+
}, [E(ua, { text: t.text || "..." }, null, 8, ["text"])], 12, Ka), n < e.block.items.length - 1 ? (m(), N("span", {
|
|
1734
1744
|
key: 0,
|
|
1735
1745
|
style: y({
|
|
1736
1746
|
color: e.block.separatorColor,
|
|
1737
1747
|
padding: `0 ${e.block.spacing}px`
|
|
1738
1748
|
})
|
|
1739
|
-
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div",
|
|
1749
|
+
}, d(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (m(), N("div", qa, [E(A(Wn), { size: 16 }), P("span", null, d(A(n).menu.addLinks), 1)]))]));
|
|
1740
1750
|
}
|
|
1741
1751
|
});
|
|
1742
1752
|
// src/composables/useEditableTextBlock.ts
|
|
1743
|
-
function
|
|
1744
|
-
let t = R(Yt,
|
|
1745
|
-
|
|
1746
|
-
|
|
1753
|
+
function Ya(e) {
|
|
1754
|
+
let t = R(Yt, tn), r = R(kn, null), i = R(an, null), { syntax: a } = B(), o = k(() => r?.value ? dt(e(), t.value) : De(e(), t.value)), s = k(() => pt(fr(xe(o.value, a)))), l = M(!1);
|
|
1755
|
+
c(() => i?.value, (e) => {
|
|
1756
|
+
e && (l.value = !1);
|
|
1757
|
+
});
|
|
1758
|
+
let u = M(null), { top: d, left: f } = n(u), { toLocal: p } = Nt(), m = k(() => p({
|
|
1759
|
+
top: d.value - 8,
|
|
1760
|
+
left: f.value
|
|
1747
1761
|
}));
|
|
1748
|
-
function
|
|
1749
|
-
|
|
1762
|
+
function h() {
|
|
1763
|
+
i?.value || (l.value = !0);
|
|
1750
1764
|
}
|
|
1751
|
-
function
|
|
1752
|
-
|
|
1765
|
+
function g() {
|
|
1766
|
+
l.value = !1;
|
|
1753
1767
|
}
|
|
1754
1768
|
return {
|
|
1755
|
-
isEditing:
|
|
1756
|
-
blockRef:
|
|
1757
|
-
toolbarPosition:
|
|
1758
|
-
resolvedContent:
|
|
1759
|
-
handleDoubleClick:
|
|
1760
|
-
handleEditorDone:
|
|
1769
|
+
isEditing: l,
|
|
1770
|
+
blockRef: u,
|
|
1771
|
+
toolbarPosition: m,
|
|
1772
|
+
resolvedContent: s,
|
|
1773
|
+
handleDoubleClick: h,
|
|
1774
|
+
handleEditorDone: g
|
|
1761
1775
|
};
|
|
1762
1776
|
}
|
|
1763
1777
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1764
|
-
var
|
|
1778
|
+
var Xa = ["innerHTML"], Za = /* @__PURE__ */ z({
|
|
1765
1779
|
__name: "ParagraphBlock",
|
|
1766
1780
|
props: {
|
|
1767
1781
|
block: {},
|
|
1768
1782
|
viewport: {}
|
|
1769
1783
|
},
|
|
1770
1784
|
setup(e) {
|
|
1771
|
-
let t = e, n = se(() => import("./ParagraphEditor-
|
|
1785
|
+
let t = e, n = se(() => import("./ParagraphEditor-DYqh0kEa.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ya(() => t.block.content);
|
|
1772
1786
|
return (t, l) => (m(), N("div", {
|
|
1773
1787
|
ref_key: "blockRef",
|
|
1774
1788
|
ref: i,
|
|
@@ -1787,11 +1801,11 @@ var Ja = ["innerHTML"], Ya = /* @__PURE__ */ z({
|
|
|
1787
1801
|
key: 1,
|
|
1788
1802
|
class: "tpl-text-content tpl:outline-none",
|
|
1789
1803
|
innerHTML: A(o)
|
|
1790
|
-
}, null, 8,
|
|
1804
|
+
}, null, 8, Xa))], 544));
|
|
1791
1805
|
}
|
|
1792
1806
|
});
|
|
1793
1807
|
// src/utils/updateBlockList.ts
|
|
1794
|
-
function
|
|
1808
|
+
function Qa(e, t, n, r = 0, i) {
|
|
1795
1809
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1796
1810
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1797
1811
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1804,19 +1818,19 @@ function Xa(e, t, n, r = 0, i) {
|
|
|
1804
1818
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1805
1819
|
}
|
|
1806
1820
|
// src/utils/mergeTagTokens.ts
|
|
1807
|
-
function
|
|
1821
|
+
function $a(e, t, n) {
|
|
1808
1822
|
let r = [], i = "\0MT";
|
|
1809
1823
|
for (; e.includes(i);) i += "_";
|
|
1810
|
-
let a = n === "html" ?
|
|
1824
|
+
let a = n === "html" ? ve(e, (e) => {
|
|
1811
1825
|
let t = r.push(e) - 1;
|
|
1812
1826
|
return `${i}${t}\u0000`;
|
|
1813
1827
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1814
1828
|
start: e.index,
|
|
1815
1829
|
end: e.index + e[0].length
|
|
1816
|
-
})), s = [], c =
|
|
1830
|
+
})), s = [], c = qe(a, t, "logic"), l = [], u = 0;
|
|
1817
1831
|
for (let e of ["logic", "value"]) {
|
|
1818
1832
|
let r = 0;
|
|
1819
|
-
for (let i of e === "logic" ? c :
|
|
1833
|
+
for (let i of e === "logic" ? c : qe(a, t, "value")) {
|
|
1820
1834
|
let t = i.index, a = t + i.value.length;
|
|
1821
1835
|
for (; o[r]?.end <= t;) r++;
|
|
1822
1836
|
let c = o[r];
|
|
@@ -1832,51 +1846,51 @@ function Za(e, t, n) {
|
|
|
1832
1846
|
}), s.push({
|
|
1833
1847
|
start: t,
|
|
1834
1848
|
end: a,
|
|
1835
|
-
value: n === "html" ?
|
|
1849
|
+
value: n === "html" ? me(i.value) : i.value
|
|
1836
1850
|
});
|
|
1837
1851
|
}
|
|
1838
1852
|
}
|
|
1839
1853
|
}
|
|
1840
1854
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1841
1855
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return JSON.stringify(
|
|
1856
|
+
function eo(e, t, n, r) {
|
|
1857
|
+
return JSON.stringify($a(e, n, r)) !== JSON.stringify($a(t, n, r));
|
|
1844
1858
|
}
|
|
1845
1859
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1846
|
-
var
|
|
1860
|
+
var to = [
|
|
1847
1861
|
"data-state",
|
|
1848
1862
|
"aria-label",
|
|
1849
1863
|
"title",
|
|
1850
1864
|
"aria-expanded",
|
|
1851
1865
|
"aria-controls",
|
|
1852
1866
|
"onKeydown"
|
|
1853
|
-
],
|
|
1867
|
+
], no = [
|
|
1854
1868
|
"aria-label",
|
|
1855
1869
|
"aria-labelledby",
|
|
1856
1870
|
"aria-describedby",
|
|
1857
1871
|
"onKeydown"
|
|
1858
|
-
],
|
|
1872
|
+
], ro = ["id"], io = ["id"], ao = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, oo = ["disabled"], so = {
|
|
1859
1873
|
key: 0,
|
|
1860
1874
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1861
|
-
},
|
|
1875
|
+
}, co = {
|
|
1862
1876
|
key: 1,
|
|
1863
1877
|
class: "tpl:m-0"
|
|
1864
|
-
},
|
|
1878
|
+
}, lo = { class: "tpl:m-0" }, uo = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, fo = {
|
|
1865
1879
|
key: 3,
|
|
1866
1880
|
class: "tpl:m-0"
|
|
1867
|
-
},
|
|
1881
|
+
}, po = {
|
|
1868
1882
|
key: 4,
|
|
1869
1883
|
class: "tpl:m-0"
|
|
1870
|
-
},
|
|
1884
|
+
}, mo = {
|
|
1871
1885
|
key: 5,
|
|
1872
1886
|
class: "tpl:m-0"
|
|
1873
|
-
},
|
|
1887
|
+
}, ho = {
|
|
1874
1888
|
key: 6,
|
|
1875
1889
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1876
|
-
},
|
|
1890
|
+
}, go = ["onClick"], _o = {
|
|
1877
1891
|
key: 7,
|
|
1878
1892
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1879
|
-
},
|
|
1893
|
+
}, vo = ["data-testid", "disabled"], yo = /*#__PURE__*/ wr(/* @__PURE__ */ z({
|
|
1880
1894
|
__name: "LocaleStatusChip",
|
|
1881
1895
|
props: {
|
|
1882
1896
|
blockId: {},
|
|
@@ -1896,24 +1910,24 @@ var $a = [
|
|
|
1896
1910
|
},
|
|
1897
1911
|
emits: ["target"],
|
|
1898
1912
|
setup(e, { emit: t }) {
|
|
1899
|
-
let n = e, r = t, a = R(
|
|
1913
|
+
let n = e, r = t, a = R(Mn, null), s = R(_n, null), l = R(Rt, null), u = R(cn, "en") ?? "en", { t: f, format: g } = le(), b = ce(), x = jt(), { toLocal: S } = Nt(), C = M(null), w = M(null), T = M(!1), E = M(!1), D = M(null), O = M(null), te = null, re = M({
|
|
1900
1914
|
top: 0,
|
|
1901
1915
|
left: 0
|
|
1902
|
-
}),
|
|
1916
|
+
}), ie = M({
|
|
1903
1917
|
maxHeight: 0,
|
|
1904
1918
|
maxWidth: 0
|
|
1905
|
-
}),
|
|
1919
|
+
}), F = `tpl-locale-popover-${lt()}`, I = k(() => yr(a?.activeLocale?.value ?? "")), ae = k(() => yr(a?.content.value.settings.locale ?? "en"));
|
|
1906
1920
|
function se(e, t) {
|
|
1907
1921
|
switch (e) {
|
|
1908
1922
|
case "tags-differ": return f.localization.tagsDiffer;
|
|
1909
|
-
case "hidden": return g(f.localization.hidden, { language:
|
|
1910
|
-
case "changed": return g(f.localization.changed, { language:
|
|
1911
|
-
case "default-stale": return
|
|
1912
|
-
case "missing": return t === 1 ? f.localization.notTranslated :
|
|
1913
|
-
default: return t === 1 ? f.localization.outOfDate :
|
|
1923
|
+
case "hidden": return g(f.localization.hidden, { language: I.value });
|
|
1924
|
+
case "changed": return g(f.localization.changed, { language: I.value });
|
|
1925
|
+
case "default-stale": return br(f.localization.staleLanguages, t, u);
|
|
1926
|
+
case "missing": return t === 1 ? f.localization.notTranslated : br(f.localization.notTranslatedCount, t, u);
|
|
1927
|
+
default: return t === 1 ? f.localization.outOfDate : br(f.localization.staleCount, t, u);
|
|
1914
1928
|
}
|
|
1915
1929
|
}
|
|
1916
|
-
let z = k(() => se(n.state, n.count)), B = k(() => n.popoverState ?? n.state), ue = k(() => n.popoverCount ?? n.count), de = k(() => se(B.value, ue.value)), fe = k(() => n.state === "hidden" ?
|
|
1930
|
+
let z = k(() => se(n.state, n.count)), B = k(() => n.popoverState ?? n.state), ue = k(() => n.popoverCount ?? n.count), de = k(() => se(B.value, ue.value)), fe = k(() => n.state === "hidden" ? jr : n.state === "changed" ? vr : n.state === "default-stale" ? ur : n.state === "stale" ? _r : hr), pe = k(() => B.value === "default-stale" || (B.value === "missing" || B.value === "stale") && ue.value > 1), me = k(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
|
|
1917
1931
|
function he(e = !1) {
|
|
1918
1932
|
T.value = !1, E.value = !1, te = null, e && C.value?.focus({ preventScroll: !0 });
|
|
1919
1933
|
}
|
|
@@ -1925,17 +1939,17 @@ var $a = [
|
|
|
1925
1939
|
let e = x.value;
|
|
1926
1940
|
if (!e || !T.value) return;
|
|
1927
1941
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
1928
|
-
|
|
1942
|
+
ie.value = {
|
|
1929
1943
|
maxHeight: u - c,
|
|
1930
1944
|
maxWidth: d - l
|
|
1931
1945
|
};
|
|
1932
1946
|
let f = C.value.getBoundingClientRect();
|
|
1933
|
-
if (te = f,
|
|
1947
|
+
if (te = f, re.value = S({
|
|
1934
1948
|
top: c,
|
|
1935
1949
|
left: l
|
|
1936
1950
|
}), await _(), !T.value || !w.value) return;
|
|
1937
|
-
let p = w.value.getBoundingClientRect(), m = Math.min(p.height,
|
|
1938
|
-
|
|
1951
|
+
let p = w.value.getBoundingClientRect(), m = Math.min(p.height, ie.value.maxHeight), h = Math.min(p.width, ie.value.maxWidth), g = f.bottom + 4, v = g + m <= u ? g : f.top - m - 4;
|
|
1952
|
+
re.value = S({
|
|
1939
1953
|
top: Math.max(c, Math.min(v, u - m)),
|
|
1940
1954
|
left: Math.max(l, Math.min(f.left, d - h))
|
|
1941
1955
|
}), await _(), T.value && (E.value ? O.value : w.value)?.focus({ preventScroll: !0 });
|
|
@@ -1965,13 +1979,13 @@ var $a = [
|
|
|
1965
1979
|
() => a?.activeLocale?.value,
|
|
1966
1980
|
() => a?.state.template?.id,
|
|
1967
1981
|
() => a?.loadVersion?.value
|
|
1968
|
-
], () => he()),
|
|
1982
|
+
], () => he()), ne(be);
|
|
1969
1983
|
let xe = (e) => {
|
|
1970
1984
|
(T.value || x.value) && (r("target", e ?? null), T.value || ge());
|
|
1971
1985
|
};
|
|
1972
1986
|
c(() => n.blockId, (e, t) => {
|
|
1973
1987
|
t && l?.get(t) === xe && l.delete(t), l?.set(e, xe);
|
|
1974
|
-
}, { immediate: !0 }),
|
|
1988
|
+
}, { immediate: !0 }), ne(() => {
|
|
1975
1989
|
l?.get(n.blockId) === xe && l.delete(n.blockId);
|
|
1976
1990
|
});
|
|
1977
1991
|
function Se() {
|
|
@@ -2004,7 +2018,7 @@ var $a = [
|
|
|
2004
2018
|
blockId: n.blockId
|
|
2005
2019
|
}));
|
|
2006
2020
|
}
|
|
2007
|
-
return (t, n) => (m(), N(L, null, [
|
|
2021
|
+
return (t, n) => (m(), N(L, null, [P("button", {
|
|
2008
2022
|
ref_key: "trigger",
|
|
2009
2023
|
ref: C,
|
|
2010
2024
|
type: "button",
|
|
@@ -2013,7 +2027,7 @@ var $a = [
|
|
|
2013
2027
|
"aria-label": z.value,
|
|
2014
2028
|
title: z.value,
|
|
2015
2029
|
"aria-expanded": T.value,
|
|
2016
|
-
"aria-controls": T.value ?
|
|
2030
|
+
"aria-controls": T.value ? F : void 0,
|
|
2017
2031
|
"aria-haspopup": "dialog",
|
|
2018
2032
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
2019
2033
|
onClick: i(ge, ["stop"]),
|
|
@@ -2022,106 +2036,106 @@ var $a = [
|
|
|
2022
2036
|
size: 12,
|
|
2023
2037
|
"stroke-width": 2,
|
|
2024
2038
|
"aria-hidden": "true"
|
|
2025
|
-
}))], 40,
|
|
2039
|
+
}))], 40, to), A(x) && T.value ? (m(), oe(ee, {
|
|
2026
2040
|
key: 0,
|
|
2027
2041
|
to: A(x)
|
|
2028
|
-
}, [
|
|
2029
|
-
id:
|
|
2042
|
+
}, [P("div", {
|
|
2043
|
+
id: F,
|
|
2030
2044
|
ref_key: "popover",
|
|
2031
2045
|
ref: w,
|
|
2032
2046
|
role: "dialog",
|
|
2033
2047
|
"aria-label": E.value ? void 0 : de.value,
|
|
2034
|
-
"aria-labelledby": E.value ? `${
|
|
2035
|
-
"aria-describedby": E.value ? `${
|
|
2048
|
+
"aria-labelledby": E.value ? `${F}-question` : void 0,
|
|
2049
|
+
"aria-describedby": E.value ? `${F}-warning` : void 0,
|
|
2036
2050
|
tabindex: "-1",
|
|
2037
2051
|
"data-testid": "locale-popover",
|
|
2038
2052
|
class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
|
|
2039
2053
|
style: y({
|
|
2040
|
-
top: `${
|
|
2041
|
-
left: `${
|
|
2042
|
-
maxHeight: `${
|
|
2043
|
-
maxWidth: `${
|
|
2054
|
+
top: `${re.value.top}px`,
|
|
2055
|
+
left: `${re.value.left}px`,
|
|
2056
|
+
maxHeight: `${ie.value.maxHeight}px`,
|
|
2057
|
+
maxWidth: `${ie.value.maxWidth}px`
|
|
2044
2058
|
}),
|
|
2045
2059
|
onClick: n[2] ||= i(() => {}, ["stop"]),
|
|
2046
2060
|
onKeydown: o(i(Oe, ["stop", "prevent"]), ["esc"])
|
|
2047
2061
|
}, [E.value ? (m(), N(L, { key: 0 }, [
|
|
2048
|
-
|
|
2049
|
-
id: `${
|
|
2062
|
+
P("h3", {
|
|
2063
|
+
id: `${F}-question`,
|
|
2050
2064
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2051
|
-
}, d(A(
|
|
2052
|
-
|
|
2053
|
-
id: `${
|
|
2065
|
+
}, d(A(br)(A(f).localization.translationConfirmation, e.translationCount ?? 0, A(u))), 9, ro),
|
|
2066
|
+
P("p", {
|
|
2067
|
+
id: `${F}-warning`,
|
|
2054
2068
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2055
|
-
}, d(A(g)(A(f).localization.translationDescription, { language:
|
|
2056
|
-
|
|
2069
|
+
}, d(A(g)(A(f).localization.translationDescription, { language: I.value })), 9, io),
|
|
2070
|
+
P("div", ao, [P("button", {
|
|
2057
2071
|
ref_key: "confirmationCancel",
|
|
2058
2072
|
ref: O,
|
|
2059
2073
|
type: "button",
|
|
2060
2074
|
"data-testid": "translation-confirm-cancel",
|
|
2061
|
-
class: h(A(
|
|
2075
|
+
class: h(A(Sr)),
|
|
2062
2076
|
onClick: De
|
|
2063
|
-
}, d(A(f).localization.cancel), 3),
|
|
2077
|
+
}, d(A(f).localization.cancel), 3), P("button", {
|
|
2064
2078
|
type: "button",
|
|
2065
2079
|
"data-testid": "translation-confirm",
|
|
2066
|
-
class: h(A(
|
|
2080
|
+
class: h(A(Cr)),
|
|
2067
2081
|
disabled: !me.value || !!A(s)?.running.value || !e.translationCount,
|
|
2068
2082
|
onClick: ke
|
|
2069
|
-
}, d(A(
|
|
2083
|
+
}, d(A(br)(A(f).localization.translateAllFields, e.translationCount ?? 0, A(u))), 11, oo)])
|
|
2070
2084
|
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2071
|
-
pe.value ? (m(), N("p",
|
|
2072
|
-
B.value === "missing" ? (m(), N("p",
|
|
2085
|
+
pe.value ? (m(), N("p", so, d(de.value), 1)) : j("", !0),
|
|
2086
|
+
B.value === "missing" ? (m(), N("p", co, d(A(g)(A(f).localization.missingExplanation, { default: ae.value })), 1)) : B.value === "stale" ? (m(), N(L, { key: 2 }, [P("p", lo, d(A(g)(A(f).localization.staleExplanation, { default: ae.value })), 1), P("p", uo, d(A(g)(A(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : B.value === "tags-differ" ? (m(), N("p", fo, d(A(g)(A(f).localization.tagsDifferExplanation, { default: ae.value })), 1)) : B.value === "changed" ? (m(), N("p", po, d(A(br)(A(f).localization.changedProperties, ue.value, A(u), { default: ae.value })), 1)) : B.value === "hidden" ? (m(), N("p", mo, d(A(g)(A(f).localization.hiddenExplanation, { language: I.value })), 1)) : (m(), N("ul", ho, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2073
2087
|
key: e,
|
|
2074
2088
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2075
|
-
}, [
|
|
2089
|
+
}, [P("span", null, d(A(yr)(e)), 1), P("button", {
|
|
2076
2090
|
type: "button",
|
|
2077
|
-
class: h(A(
|
|
2091
|
+
class: h(A(xr)),
|
|
2078
2092
|
onClick: (t) => Te(e)
|
|
2079
|
-
}, d(A(f).localization.open), 11,
|
|
2080
|
-
e.editable && B.value !== "default-stale" ? (m(), N("div",
|
|
2093
|
+
}, d(A(f).localization.open), 11, go)]))), 128))])),
|
|
2094
|
+
e.editable && B.value !== "default-stale" ? (m(), N("div", _o, [
|
|
2081
2095
|
me.value && (B.value === "missing" || B.value === "stale" || B.value === "tags-differ") ? (m(), N("button", {
|
|
2082
2096
|
key: 0,
|
|
2083
2097
|
type: "button",
|
|
2084
2098
|
ref_key: "retranslate",
|
|
2085
2099
|
ref: D,
|
|
2086
2100
|
"data-testid": B.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2087
|
-
class: h(A(
|
|
2101
|
+
class: h(A(Sr)),
|
|
2088
2102
|
disabled: !!A(s)?.running.value,
|
|
2089
2103
|
onClick: Ee
|
|
2090
|
-
}, d(B.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11,
|
|
2104
|
+
}, d(B.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11, vo)) : j("", !0),
|
|
2091
2105
|
B.value === "stale" || B.value === "tags-differ" ? (m(), N(L, { key: 1 }, [B.value === "stale" ? (m(), N("button", {
|
|
2092
2106
|
key: 0,
|
|
2093
2107
|
type: "button",
|
|
2094
2108
|
"data-testid": "locale-keep",
|
|
2095
|
-
class: h(me.value ? A(
|
|
2109
|
+
class: h(me.value ? A(xr) : A(Sr)),
|
|
2096
2110
|
onClick: Se
|
|
2097
|
-
}, d(A(f).localization.keep), 3)) : j("", !0),
|
|
2111
|
+
}, d(A(f).localization.keep), 3)) : j("", !0), P("button", {
|
|
2098
2112
|
type: "button",
|
|
2099
2113
|
"data-testid": "locale-use-default",
|
|
2100
|
-
class: h(B.value === "tags-differ" && !me.value ? A(
|
|
2114
|
+
class: h(B.value === "tags-differ" && !me.value ? A(Sr) : A(xr)),
|
|
2101
2115
|
onClick: n[0] ||= (t) => Ce(B.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2102
2116
|
}, d(A(g)(A(f).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : j("", !0),
|
|
2103
2117
|
B.value === "changed" ? (m(), N("button", {
|
|
2104
2118
|
key: 2,
|
|
2105
2119
|
type: "button",
|
|
2106
2120
|
"data-testid": "locale-reset",
|
|
2107
|
-
class: h(A(
|
|
2121
|
+
class: h(A(Sr)),
|
|
2108
2122
|
onClick: n[1] ||= (t) => Ce(e.setPaths)
|
|
2109
2123
|
}, d(A(f).localization.resetChanges), 3)) : j("", !0),
|
|
2110
2124
|
B.value === "hidden" ? (m(), N("button", {
|
|
2111
2125
|
key: 3,
|
|
2112
2126
|
type: "button",
|
|
2113
2127
|
"data-testid": "locale-show",
|
|
2114
|
-
class: h(A(
|
|
2128
|
+
class: h(A(Sr)),
|
|
2115
2129
|
onClick: we
|
|
2116
2130
|
}, d(A(f).localization.show), 3)) : j("", !0)
|
|
2117
2131
|
])) : j("", !0)
|
|
2118
|
-
], 64))], 44,
|
|
2132
|
+
], 64))], 44, no)], 8, ["to"])) : j("", !0)], 64));
|
|
2119
2133
|
}
|
|
2120
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2134
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), bo = /* @__PURE__ */ z({
|
|
2121
2135
|
__name: "LocaleMarkers",
|
|
2122
2136
|
props: { block: {} },
|
|
2123
2137
|
setup(e) {
|
|
2124
|
-
let t = e, n = R(
|
|
2138
|
+
let t = e, n = R(Mn, null), r = R(Jt, void 0), i = R(hn, []), a = R(It, Je.liquid), o = R(gn, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2125
2139
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2126
2140
|
...t.block,
|
|
2127
2141
|
children: []
|
|
@@ -2130,14 +2144,14 @@ var $a = [
|
|
|
2130
2144
|
locale: n.content.value.settings.locale,
|
|
2131
2145
|
locales: n.content.value.settings.locales
|
|
2132
2146
|
}
|
|
2133
|
-
})), d = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2147
|
+
})), d = k(() => n && s.value && !o.value.has(s.value) ? ke(u.value, s.value, i) : {
|
|
2134
2148
|
missing: [],
|
|
2135
2149
|
stale: [],
|
|
2136
2150
|
translated: []
|
|
2137
2151
|
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2138
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2139
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2140
|
-
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2152
|
+
let n = e.slice(t.block.id.length + 1), r = Et(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Qe[t.block.type]?.includes(n) ? "html" : "text";
|
|
2153
|
+
return typeof r == "string" && i !== void 0 && eo(r, i, a, o) ? [n] : [];
|
|
2154
|
+
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? Me(u.value, s.value, {
|
|
2141
2155
|
syntax: a,
|
|
2142
2156
|
definitions: i,
|
|
2143
2157
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2147,9 +2161,9 @@ var $a = [
|
|
|
2147
2161
|
let n = e.slice(t.block.id.length + 1);
|
|
2148
2162
|
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2149
2163
|
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2150
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2151
|
-
return Array.isArray(i) ?
|
|
2152
|
-
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2164
|
+
let n = e.split("."), r = n.pop(), i = n.length ? Et(t.block, n.join(".")) : t.block;
|
|
2165
|
+
return Array.isArray(i) ? Et(i, r) !== void 0 : i !== void 0;
|
|
2166
|
+
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && ke(u.value, e, i).stale.length > 0) : []), b = k(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : d.value.missing.length ? "missing" : f.value.length ? "stale" : p.value.length ? "tags-differ" : v.value.length ? "changed" : null : y.value.length ? "default-stale" : null);
|
|
2153
2167
|
function x(e) {
|
|
2154
2168
|
return e === "missing" ? d.value.missing.length : e === "stale" ? f.value.length : e === "tags-differ" ? p.value.length : e === "default-stale" ? y.value.length : v.value.length;
|
|
2155
2169
|
}
|
|
@@ -2158,12 +2172,12 @@ var $a = [
|
|
|
2158
2172
|
h.value = null;
|
|
2159
2173
|
});
|
|
2160
2174
|
let T = k(() => {
|
|
2161
|
-
let e =
|
|
2175
|
+
let e = Et(t.block, f.value[0] ?? "");
|
|
2162
2176
|
if (typeof e != "string") return "";
|
|
2163
2177
|
let n = e.split(/<[^>]*>/).join("");
|
|
2164
2178
|
return Array.from(n).slice(0, 60).join("");
|
|
2165
2179
|
});
|
|
2166
|
-
return (t, n) => A(r) && b.value ? (m(), oe(
|
|
2180
|
+
return (t, n) => A(r) && b.value ? (m(), oe(yo, {
|
|
2167
2181
|
key: 0,
|
|
2168
2182
|
"block-id": e.block.id,
|
|
2169
2183
|
state: b.value,
|
|
@@ -2197,21 +2211,21 @@ var $a = [
|
|
|
2197
2211
|
"editable"
|
|
2198
2212
|
])) : j("", !0);
|
|
2199
2213
|
}
|
|
2200
|
-
}),
|
|
2214
|
+
}), xo = [
|
|
2201
2215
|
"data-block-id",
|
|
2202
2216
|
"data-block-type",
|
|
2203
2217
|
"data-tpl-picked"
|
|
2204
|
-
],
|
|
2218
|
+
], So = ["aria-label"], Co = ["data-lock-holder"], wo = ["aria-label"], To = [
|
|
2205
2219
|
"aria-label",
|
|
2206
2220
|
"aria-pressed",
|
|
2207
2221
|
"title"
|
|
2208
|
-
],
|
|
2222
|
+
], Eo = ["aria-label", "title"], Do = ["aria-label", "title"], Oo = ["aria-label", "title"], ko = {
|
|
2209
2223
|
key: 3,
|
|
2210
2224
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2211
|
-
},
|
|
2225
|
+
}, Ao = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, jo = {
|
|
2212
2226
|
key: 4,
|
|
2213
2227
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2214
|
-
},
|
|
2228
|
+
}, Mo = ["aria-label", "title"], No = /*#__PURE__*/ wr(/* @__PURE__ */ z({
|
|
2215
2229
|
__name: "BlockWrapper",
|
|
2216
2230
|
props: {
|
|
2217
2231
|
block: {},
|
|
@@ -2224,17 +2238,17 @@ var $a = [
|
|
|
2224
2238
|
},
|
|
2225
2239
|
emits: ["select"],
|
|
2226
2240
|
setup(t, { emit: n }) {
|
|
2227
|
-
let a = se(() => import("./BlockIssueBadge-
|
|
2241
|
+
let a = se(() => import("./BlockIssueBadge-i2cZy5PB.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = le(), v = R(Nn, null), b = M(null), x = k(() => v?.liftedBlockId.value === o.block.id), S = k(() => x.value ? g(p.blockActions.dragLifted, { block: o.block.type }) : p.blockActions.drag);
|
|
2228
2242
|
async function C() {
|
|
2229
2243
|
await _(), b.value?.focus();
|
|
2230
2244
|
}
|
|
2231
2245
|
function w(e) {
|
|
2232
2246
|
v && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), x.value ? v.drop(o.block.id) : v.lift(o.block.id)) : x.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), v.cancel(), C()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), v.moveUp(o.block.id), C()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), v.moveDown(o.block.id), C())));
|
|
2233
2247
|
}
|
|
2234
|
-
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(
|
|
2248
|
+
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(Se?.activeLocale?.value && o.block.l10n?.[Se.activeLocale.value]?.hidden)), D = k(() => o.previewMode === !0 && (T.value || ee.value)), O = k(() => o.viewport ? {
|
|
2235
2249
|
desktop: p.viewport.desktop,
|
|
2236
2250
|
mobile: p.viewport.mobile
|
|
2237
|
-
}[o.viewport] ?? o.viewport : ""),
|
|
2251
|
+
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = R(On, null), ie = R(xn, null), F = R(fn, {}), I = k(() => F.savedBlocks?.isPicking.value === !0), L = k(() => !o.nested && F.savedBlocks?.isAvailable.value === !0 && F.savedBlocks?.canCreate.value === !0), ae = k(() => o.isSelected && !I.value), z = k(() => F.comments?.getBlockCount(o.block.id) ?? 0), ce = M(null), B = M(null), ue = M(null), de = M(null), fe = M({
|
|
2238
2252
|
left: "calc(100% + 8px)",
|
|
2239
2253
|
top: "50%"
|
|
2240
2254
|
}), pe = M(!1), me = k(() => B.value ?? de.value), he = k(() => me.value?.closest(".tpl-body"));
|
|
@@ -2274,29 +2288,29 @@ var $a = [
|
|
|
2274
2288
|
de.value,
|
|
2275
2289
|
he.value
|
|
2276
2290
|
].filter((e) => !!e) : []), ge), e(he, "scroll", ge, { passive: !0 });
|
|
2277
|
-
let
|
|
2278
|
-
c([() =>
|
|
2279
|
-
let Ee = R(
|
|
2280
|
-
backgroundImageUrl:
|
|
2281
|
-
heroBoxWidth:
|
|
2282
|
-
})), Oe = k(() =>
|
|
2291
|
+
let _e = k(() => F.collaboration?.lockOf(o.block.id) ?? null), ve = k(() => _e.value?.holder.type === "guest" ? p.collaboration.guest : _e.value?.holder.name ?? ""), ye = k(() => F.collaboration?.agentHighlightOf(o.block.id) ?? F.ai?.highlightOf(o.block.id) ?? null), be = ir(() => s.value.type === "section" ? s.value.backgroundImage : void 0), xe = ir(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), Se = R(Mn, null), we = Se ? Pt(Se) : null, Te = R(yn, null) ?? we?.content ?? null;
|
|
2292
|
+
c([() => Se?.activeLocale?.value, () => we && Ce(we.settings.value)], ge, { flush: "post" });
|
|
2293
|
+
let Ee = R($t, void 0), De = k(() => ta(s.value, {
|
|
2294
|
+
backgroundImageUrl: be.value,
|
|
2295
|
+
heroBoxWidth: Yn(s.value) ? er(s.value, Te?.value, Ee) : void 0
|
|
2296
|
+
})), Oe = k(() => sa(s.value, { backgroundImageUrl: xe.value })), ke = k(() => {
|
|
2283
2297
|
let e = s.value;
|
|
2284
2298
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2285
|
-
}), Ae = k(() =>
|
|
2299
|
+
}), Ae = k(() => oa(ke.value?.wrapper?.padding));
|
|
2286
2300
|
function je(e) {
|
|
2287
2301
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2288
2302
|
}
|
|
2289
2303
|
function Me() {
|
|
2290
|
-
|
|
2304
|
+
re?.deleteBlock(o.block.id);
|
|
2291
2305
|
}
|
|
2292
2306
|
function Ne() {
|
|
2293
|
-
|
|
2307
|
+
re?.duplicateBlock(o.block);
|
|
2294
2308
|
}
|
|
2295
2309
|
function Pe() {
|
|
2296
|
-
|
|
2310
|
+
F.savedBlocks?.startPicking(o.block.id);
|
|
2297
2311
|
}
|
|
2298
2312
|
function Fe() {
|
|
2299
|
-
|
|
2313
|
+
ie?.toggleBlock(o.block.id);
|
|
2300
2314
|
}
|
|
2301
2315
|
return (e, n) => D.value ? j("", !0) : (m(), N("div", {
|
|
2302
2316
|
key: 0,
|
|
@@ -2314,7 +2328,7 @@ var $a = [
|
|
|
2314
2328
|
"data-tpl-picked": t.picked || void 0,
|
|
2315
2329
|
onClick: je
|
|
2316
2330
|
}, [
|
|
2317
|
-
|
|
2331
|
+
P("div", {
|
|
2318
2332
|
ref_key: "badgesElement",
|
|
2319
2333
|
ref: ue,
|
|
2320
2334
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
@@ -2325,35 +2339,35 @@ var $a = [
|
|
|
2325
2339
|
ref: de,
|
|
2326
2340
|
class: h(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", pe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2327
2341
|
"aria-label": A(g)(A(p).blockActions.comments, { count: String(z.value) }),
|
|
2328
|
-
onClick: n[0] ||= i((e) => A(
|
|
2329
|
-
}, [E(A(
|
|
2342
|
+
onClick: n[0] ||= i((e) => A(F).comments?.openForBlock(t.block.id), ["stop"])
|
|
2343
|
+
}, [E(A(Er), {
|
|
2330
2344
|
size: 12,
|
|
2331
2345
|
"stroke-width": 2.5
|
|
2332
|
-
}), te(" " + d(z.value), 1)], 10,
|
|
2346
|
+
}), te(" " + d(z.value), 1)], 10, So)) : j("", !0),
|
|
2333
2347
|
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2334
|
-
t.previewMode ? j("", !0) : (m(), oe(
|
|
2348
|
+
t.previewMode ? j("", !0) : (m(), oe(bo, {
|
|
2335
2349
|
key: 1,
|
|
2336
2350
|
block: t.block
|
|
2337
2351
|
}, null, 8, ["block"]))
|
|
2338
2352
|
], 512),
|
|
2339
|
-
|
|
2353
|
+
_e.value ? (m(), N("div", {
|
|
2340
2354
|
key: 0,
|
|
2341
2355
|
"data-testid": "block-lock",
|
|
2342
|
-
"data-lock-holder":
|
|
2356
|
+
"data-lock-holder": _e.value.holder.sessionId,
|
|
2343
2357
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2344
2358
|
style: y({
|
|
2345
|
-
outline: `2px solid ${
|
|
2359
|
+
outline: `2px solid ${_e.value.holder.color}`,
|
|
2346
2360
|
outlineOffset: "-1px"
|
|
2347
2361
|
})
|
|
2348
|
-
}, [
|
|
2362
|
+
}, [P("span", {
|
|
2349
2363
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2350
2364
|
style: y({
|
|
2351
|
-
backgroundColor:
|
|
2352
|
-
color: A(
|
|
2365
|
+
backgroundColor: _e.value.holder.color,
|
|
2366
|
+
color: A(Or)(_e.value.holder.color)
|
|
2353
2367
|
})
|
|
2354
|
-
}, d(A(g)(A(p).collaboration.editing, { name:
|
|
2355
|
-
|
|
2356
|
-
key:
|
|
2368
|
+
}, d(A(g)(A(p).collaboration.editing, { name: ve.value })), 5)], 12, Co)) : j("", !0),
|
|
2369
|
+
ye.value === null ? j("", !0) : (m(), N("div", {
|
|
2370
|
+
key: ye.value,
|
|
2357
2371
|
"data-testid": "block-agent-highlight",
|
|
2358
2372
|
"aria-hidden": "true",
|
|
2359
2373
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2367,7 +2381,7 @@ var $a = [
|
|
|
2367
2381
|
"aria-label": A(p).blockActions.drag,
|
|
2368
2382
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2369
2383
|
}, [
|
|
2370
|
-
|
|
2384
|
+
P("button", {
|
|
2371
2385
|
ref_key: "dragButtonRef",
|
|
2372
2386
|
ref: b,
|
|
2373
2387
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
@@ -2376,81 +2390,81 @@ var $a = [
|
|
|
2376
2390
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2377
2391
|
title: A(p).blockActions.drag,
|
|
2378
2392
|
onKeydown: w
|
|
2379
|
-
}, [E(A(
|
|
2393
|
+
}, [E(A(Nr), {
|
|
2380
2394
|
size: 14,
|
|
2381
2395
|
"stroke-width": 1.5
|
|
2382
|
-
})], 40,
|
|
2383
|
-
|
|
2396
|
+
})], 40, To),
|
|
2397
|
+
P("button", {
|
|
2384
2398
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2385
2399
|
"aria-label": A(p).blockActions.duplicate,
|
|
2386
2400
|
title: A(p).blockActions.duplicate,
|
|
2387
2401
|
onClick: i(Ne, ["stop"])
|
|
2388
|
-
}, [E(A(
|
|
2402
|
+
}, [E(A(Tr), {
|
|
2389
2403
|
size: 14,
|
|
2390
2404
|
"stroke-width": 1.5
|
|
2391
|
-
})], 8,
|
|
2405
|
+
})], 8, Eo),
|
|
2392
2406
|
L.value ? (m(), N("button", {
|
|
2393
2407
|
key: 0,
|
|
2394
2408
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2395
2409
|
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2396
2410
|
title: A(p).blockActions.saveAsBlock,
|
|
2397
2411
|
onClick: i(Pe, ["stop"])
|
|
2398
|
-
}, [E(A(
|
|
2412
|
+
}, [E(A(kr), {
|
|
2399
2413
|
size: 14,
|
|
2400
2414
|
"stroke-width": 1.5
|
|
2401
|
-
})], 8,
|
|
2402
|
-
|
|
2415
|
+
})], 8, Do)) : j("", !0),
|
|
2416
|
+
P("button", {
|
|
2403
2417
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2404
2418
|
"aria-label": A(p).blockActions.delete,
|
|
2405
2419
|
title: A(p).blockActions.delete,
|
|
2406
2420
|
onClick: i(Me, ["stop"])
|
|
2407
|
-
}, [E(A(
|
|
2421
|
+
}, [E(A(Dr), {
|
|
2408
2422
|
size: 14,
|
|
2409
2423
|
"stroke-width": 1.5
|
|
2410
|
-
})], 8,
|
|
2411
|
-
], 12,
|
|
2412
|
-
T.value ? (m(), N("div",
|
|
2424
|
+
})], 8, Oo)
|
|
2425
|
+
], 12, wo)) : j("", !0),
|
|
2426
|
+
T.value ? (m(), N("div", ko, [P("span", Ao, [E(A(jr), {
|
|
2413
2427
|
size: 12,
|
|
2414
2428
|
"stroke-width": 1.5
|
|
2415
2429
|
}), te(" " + d(A(g)(A(p).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : j("", !0),
|
|
2416
|
-
|
|
2430
|
+
ne.value && !T.value ? (m(), N("div", jo, [P("button", {
|
|
2417
2431
|
"data-testid": "condition-toggle",
|
|
2418
2432
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2419
2433
|
"aria-label": A(p).blockActions.conditionToggle,
|
|
2420
2434
|
title: t.block.displayCondition?.label,
|
|
2421
2435
|
onClick: i(Fe, ["stop"])
|
|
2422
|
-
}, [E(A(
|
|
2436
|
+
}, [E(A(Mr), {
|
|
2423
2437
|
size: 12,
|
|
2424
2438
|
"stroke-width": 2
|
|
2425
|
-
})], 8,
|
|
2439
|
+
})], 8, Mo)])) : j("", !0),
|
|
2426
2440
|
Oe.value ? (m(), N("div", {
|
|
2427
2441
|
key: 5,
|
|
2428
|
-
class: h(["tpl-section-wrapper tpl-email-surface", A(
|
|
2442
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A(Zi)(Oe.value)]),
|
|
2429
2443
|
style: y(Oe.value)
|
|
2430
2444
|
}, [ke.value ? (m(), N("div", {
|
|
2431
2445
|
key: 0,
|
|
2432
2446
|
class: "tpl-band-frame",
|
|
2433
2447
|
style: y(Ae.value)
|
|
2434
|
-
}, [
|
|
2435
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2448
|
+
}, [P("div", {
|
|
2449
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(De.value)]),
|
|
2436
2450
|
style: y(De.value)
|
|
2437
2451
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2438
2452
|
key: 1,
|
|
2439
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2453
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(De.value)]),
|
|
2440
2454
|
style: y(De.value)
|
|
2441
2455
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2442
2456
|
key: 6,
|
|
2443
|
-
class: h(["tpl-block-content tpl-email-surface", A(
|
|
2457
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(De.value)]),
|
|
2444
2458
|
style: y(De.value)
|
|
2445
2459
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2446
|
-
], 10,
|
|
2460
|
+
], 10, xo));
|
|
2447
2461
|
}
|
|
2448
2462
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2449
2463
|
// src/utils/unwrapParagraph.ts
|
|
2450
|
-
function
|
|
2464
|
+
function Po(e) {
|
|
2451
2465
|
let t = /^\s*<p\b/.exec(e);
|
|
2452
2466
|
if (!t) return e;
|
|
2453
|
-
let n =
|
|
2467
|
+
let n = bt(e, t[0].length);
|
|
2454
2468
|
if (n === -1) return e;
|
|
2455
2469
|
let r = /<\/p>\s*$/.exec(e);
|
|
2456
2470
|
if (!r || r.index <= n) return e;
|
|
@@ -2458,22 +2472,22 @@ function Mo(e) {
|
|
|
2458
2472
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2459
2473
|
}
|
|
2460
2474
|
// src/components/blocks/TitleBlock.vue
|
|
2461
|
-
var
|
|
2475
|
+
var Fo = /* @__PURE__ */ z({
|
|
2462
2476
|
__name: "TitleBlock",
|
|
2463
2477
|
props: {
|
|
2464
2478
|
block: {},
|
|
2465
2479
|
viewport: {}
|
|
2466
2480
|
},
|
|
2467
2481
|
setup(e) {
|
|
2468
|
-
let t = e, n = se(() => import("./TitleEditor-
|
|
2482
|
+
let t = e, n = se(() => import("./TitleEditor-CisDioGi.js")), r = dn(ln, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Ya(() => t.block.content), u = k(() => {
|
|
2469
2483
|
let e = {
|
|
2470
|
-
fontSize: `${
|
|
2471
|
-
lineHeight: String(
|
|
2484
|
+
fontSize: `${ct[t.block.level]}px`,
|
|
2485
|
+
lineHeight: String(Ct),
|
|
2472
2486
|
fontWeight: "700",
|
|
2473
2487
|
textAlign: t.block.textAlign
|
|
2474
2488
|
};
|
|
2475
2489
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2476
|
-
}), d = k(() => `h${t.block.level}`), f = k(() =>
|
|
2490
|
+
}), d = k(() => `h${t.block.level}`), f = k(() => fr(Po(s.value)));
|
|
2477
2491
|
return (t, r) => (m(), N("div", {
|
|
2478
2492
|
ref_key: "blockRef",
|
|
2479
2493
|
ref: a,
|
|
@@ -2499,14 +2513,14 @@ var No = /* @__PURE__ */ z({
|
|
|
2499
2513
|
innerHTML: f.value
|
|
2500
2514
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2501
2515
|
}
|
|
2502
|
-
}),
|
|
2503
|
-
function
|
|
2504
|
-
let n =
|
|
2505
|
-
n.color =
|
|
2506
|
-
let r =
|
|
2507
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2508
|
-
let i =
|
|
2509
|
-
return i.align = "center",
|
|
2516
|
+
}), Io = "hero", Lo = "#1f2937", Ro = "#ffffff";
|
|
2517
|
+
function zo(e, t) {
|
|
2518
|
+
let n = Ae("title", e);
|
|
2519
|
+
n.color = Ro, n.textAlign = "center";
|
|
2520
|
+
let r = Ae("paragraph", e);
|
|
2521
|
+
r.content = `<p style="text-align: center"><span style="color: ${Ro}">${Bo(t)}</span></p>`;
|
|
2522
|
+
let i = Ae("button", e);
|
|
2523
|
+
return i.align = "center", Be({
|
|
2510
2524
|
columns: "1",
|
|
2511
2525
|
children: [[
|
|
2512
2526
|
n,
|
|
@@ -2524,96 +2538,96 @@ function Lo(e, t) {
|
|
|
2524
2538
|
bottom: 48,
|
|
2525
2539
|
left: 24
|
|
2526
2540
|
},
|
|
2527
|
-
backgroundColor:
|
|
2541
|
+
backgroundColor: Lo
|
|
2528
2542
|
}
|
|
2529
2543
|
});
|
|
2530
2544
|
}
|
|
2531
|
-
function
|
|
2545
|
+
function Bo(e) {
|
|
2532
2546
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2533
2547
|
}
|
|
2534
2548
|
// src/utils/sectionColumnDrop.ts
|
|
2535
|
-
var
|
|
2536
|
-
function
|
|
2537
|
-
return e.dataset.blockType !== "section" && !
|
|
2549
|
+
var Vo = /* @__PURE__ */ new Set(["section", Io]);
|
|
2550
|
+
function Ho(e) {
|
|
2551
|
+
return e.dataset.blockType !== "section" && !Vo.has(e.dataset.paletteType ?? "");
|
|
2538
2552
|
}
|
|
2539
2553
|
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2540
|
-
var
|
|
2554
|
+
var Uo = Object.defineProperty, Wo = Object.getOwnPropertySymbols, Go = Object.prototype.hasOwnProperty, Ko = Object.prototype.propertyIsEnumerable, qo = (e, t, n) => t in e ? Uo(e, t, {
|
|
2541
2555
|
enumerable: !0,
|
|
2542
2556
|
configurable: !0,
|
|
2543
2557
|
writable: !0,
|
|
2544
2558
|
value: n
|
|
2545
|
-
}) : e[t] = n,
|
|
2546
|
-
for (var n in t ||= {})
|
|
2547
|
-
if (
|
|
2559
|
+
}) : e[t] = n, Jo = (e, t) => {
|
|
2560
|
+
for (var n in t ||= {}) Go.call(t, n) && qo(e, n, t[n]);
|
|
2561
|
+
if (Wo) for (var n of Wo(t)) Ko.call(t, n) && qo(e, n, t[n]);
|
|
2548
2562
|
return e;
|
|
2549
|
-
},
|
|
2563
|
+
}, Yo = (e, t) => {
|
|
2550
2564
|
var n = {};
|
|
2551
|
-
for (var r in e)
|
|
2552
|
-
if (e != null &&
|
|
2565
|
+
for (var r in e) Go.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2566
|
+
if (e != null && Wo) for (var r of Wo(e)) t.indexOf(r) < 0 && Ko.call(e, r) && (n[r] = e[r]);
|
|
2553
2567
|
return n;
|
|
2554
|
-
},
|
|
2555
|
-
function
|
|
2556
|
-
console.warn(
|
|
2568
|
+
}, Xo = "[vue-draggable-plus]: ";
|
|
2569
|
+
function Zo(e) {
|
|
2570
|
+
console.warn(Xo + e);
|
|
2557
2571
|
}
|
|
2558
|
-
function
|
|
2559
|
-
console.error(
|
|
2572
|
+
function Qo(e) {
|
|
2573
|
+
console.error(Xo + e);
|
|
2560
2574
|
}
|
|
2561
|
-
function
|
|
2575
|
+
function $o(e, t, n) {
|
|
2562
2576
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2563
2577
|
}
|
|
2564
|
-
function
|
|
2578
|
+
function es(e) {
|
|
2565
2579
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2566
2580
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2581
|
+
function ts(e) {
|
|
2582
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[es(n)] = e[n]), t), {});
|
|
2569
2583
|
}
|
|
2570
|
-
function
|
|
2584
|
+
function ns(e, t) {
|
|
2571
2585
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2572
2586
|
}
|
|
2573
|
-
function
|
|
2587
|
+
function rs(e, t, n) {
|
|
2574
2588
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2575
2589
|
}
|
|
2576
|
-
function
|
|
2590
|
+
function is(e) {
|
|
2577
2591
|
return e === void 0;
|
|
2578
2592
|
}
|
|
2579
|
-
function
|
|
2593
|
+
function as(e) {
|
|
2580
2594
|
return typeof e == "string";
|
|
2581
2595
|
}
|
|
2582
|
-
function
|
|
2596
|
+
function os(e, t, n) {
|
|
2583
2597
|
let r = e.children[n];
|
|
2584
2598
|
e.insertBefore(t, r);
|
|
2585
2599
|
}
|
|
2586
|
-
function
|
|
2600
|
+
function ss(e) {
|
|
2587
2601
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2588
2602
|
}
|
|
2589
|
-
function
|
|
2603
|
+
function cs(e, t = document) {
|
|
2590
2604
|
let n = null;
|
|
2591
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2605
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Zo(`Element not found: ${e}`), n;
|
|
2592
2606
|
}
|
|
2593
|
-
function
|
|
2607
|
+
function ls(e, t, n = null) {
|
|
2594
2608
|
return function(...r) {
|
|
2595
2609
|
return e.apply(n, r), t.apply(n, r);
|
|
2596
2610
|
};
|
|
2597
2611
|
}
|
|
2598
|
-
function
|
|
2599
|
-
let n =
|
|
2612
|
+
function us(e, t) {
|
|
2613
|
+
let n = Jo({}, e);
|
|
2600
2614
|
return Object.keys(t).forEach((r) => {
|
|
2601
|
-
n[r] ? n[r] =
|
|
2615
|
+
n[r] ? n[r] = ls(e[r], t[r]) : n[r] = t[r];
|
|
2602
2616
|
}), n;
|
|
2603
2617
|
}
|
|
2604
|
-
function
|
|
2618
|
+
function ds(e) {
|
|
2605
2619
|
return e instanceof HTMLElement;
|
|
2606
2620
|
}
|
|
2607
|
-
function
|
|
2621
|
+
function fs(e, t) {
|
|
2608
2622
|
Object.keys(e).forEach((n) => {
|
|
2609
2623
|
t(n, e[n]);
|
|
2610
2624
|
});
|
|
2611
2625
|
}
|
|
2612
|
-
function
|
|
2626
|
+
function ps(e) {
|
|
2613
2627
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2614
2628
|
}
|
|
2615
|
-
var
|
|
2616
|
-
function
|
|
2629
|
+
var ms = Object.assign;
|
|
2630
|
+
function hs(e, t) {
|
|
2617
2631
|
var n = Object.keys(e);
|
|
2618
2632
|
if (Object.getOwnPropertySymbols) {
|
|
2619
2633
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2623,26 +2637,26 @@ function ps(e, t) {
|
|
|
2623
2637
|
}
|
|
2624
2638
|
return n;
|
|
2625
2639
|
}
|
|
2626
|
-
function
|
|
2640
|
+
function gs(e) {
|
|
2627
2641
|
for (var t = 1; t < arguments.length; t++) {
|
|
2628
2642
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2629
|
-
t % 2 ?
|
|
2630
|
-
|
|
2631
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2643
|
+
t % 2 ? hs(Object(n), !0).forEach(function(t) {
|
|
2644
|
+
vs(e, t, n[t]);
|
|
2645
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : hs(Object(n)).forEach(function(t) {
|
|
2632
2646
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2633
2647
|
});
|
|
2634
2648
|
}
|
|
2635
2649
|
return e;
|
|
2636
2650
|
}
|
|
2637
|
-
function
|
|
2651
|
+
function _s(e) {
|
|
2638
2652
|
"@babel/helpers - typeof";
|
|
2639
|
-
return
|
|
2653
|
+
return _s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2640
2654
|
return typeof e;
|
|
2641
2655
|
} : function(e) {
|
|
2642
2656
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2643
|
-
},
|
|
2657
|
+
}, _s(e);
|
|
2644
2658
|
}
|
|
2645
|
-
function
|
|
2659
|
+
function vs(e, t, n) {
|
|
2646
2660
|
return t in e ? Object.defineProperty(e, t, {
|
|
2647
2661
|
value: n,
|
|
2648
2662
|
enumerable: !0,
|
|
@@ -2650,44 +2664,44 @@ function gs(e, t, n) {
|
|
|
2650
2664
|
writable: !0
|
|
2651
2665
|
}) : e[t] = n, e;
|
|
2652
2666
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2667
|
+
function ys() {
|
|
2668
|
+
return ys = Object.assign || function(e) {
|
|
2655
2669
|
for (var t = 1; t < arguments.length; t++) {
|
|
2656
2670
|
var n = arguments[t];
|
|
2657
2671
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2658
2672
|
}
|
|
2659
2673
|
return e;
|
|
2660
|
-
},
|
|
2674
|
+
}, ys.apply(this, arguments);
|
|
2661
2675
|
}
|
|
2662
|
-
function
|
|
2676
|
+
function bs(e, t) {
|
|
2663
2677
|
if (e == null) return {};
|
|
2664
2678
|
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2665
2679
|
return n;
|
|
2666
2680
|
}
|
|
2667
|
-
function
|
|
2681
|
+
function xs(e, t) {
|
|
2668
2682
|
if (e == null) return {};
|
|
2669
|
-
var n =
|
|
2683
|
+
var n = bs(e, t), r, i;
|
|
2670
2684
|
if (Object.getOwnPropertySymbols) {
|
|
2671
2685
|
var a = Object.getOwnPropertySymbols(e);
|
|
2672
2686
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2673
2687
|
}
|
|
2674
2688
|
return n;
|
|
2675
2689
|
}
|
|
2676
|
-
var
|
|
2677
|
-
function
|
|
2690
|
+
var Ss = "1.15.2";
|
|
2691
|
+
function Cs(e) {
|
|
2678
2692
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2679
2693
|
}
|
|
2680
|
-
var
|
|
2694
|
+
var ws = Cs(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ts = Cs(/Edge/i), Es = Cs(/firefox/i), Ds = Cs(/safari/i) && !Cs(/chrome/i) && !Cs(/android/i), Os = Cs(/iP(ad|od|hone)/i), ks = Cs(/chrome/i) && Cs(/android/i), As = {
|
|
2681
2695
|
capture: !1,
|
|
2682
2696
|
passive: !1
|
|
2683
2697
|
};
|
|
2684
2698
|
function V(e, t, n) {
|
|
2685
|
-
e.addEventListener(t, n, !
|
|
2699
|
+
e.addEventListener(t, n, !ws && As);
|
|
2686
2700
|
}
|
|
2687
2701
|
function H(e, t, n) {
|
|
2688
|
-
e.removeEventListener(t, n, !
|
|
2702
|
+
e.removeEventListener(t, n, !ws && As);
|
|
2689
2703
|
}
|
|
2690
|
-
function
|
|
2704
|
+
function js(e, t) {
|
|
2691
2705
|
if (t) {
|
|
2692
2706
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2693
2707
|
if (e.matches) return e.matches(t);
|
|
@@ -2699,22 +2713,22 @@ function ks(e, t) {
|
|
|
2699
2713
|
return !1;
|
|
2700
2714
|
}
|
|
2701
2715
|
}
|
|
2702
|
-
function
|
|
2716
|
+
function Ms(e) {
|
|
2703
2717
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2704
2718
|
}
|
|
2705
|
-
function
|
|
2719
|
+
function Ns(e, t, n, r) {
|
|
2706
2720
|
if (e) {
|
|
2707
2721
|
n ||= document;
|
|
2708
2722
|
do {
|
|
2709
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2723
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && js(e, t) : js(e, t)) || r && e === n) return e;
|
|
2710
2724
|
if (e === n) break;
|
|
2711
|
-
} while (e =
|
|
2725
|
+
} while (e = Ms(e));
|
|
2712
2726
|
}
|
|
2713
2727
|
return null;
|
|
2714
2728
|
}
|
|
2715
|
-
var
|
|
2716
|
-
function
|
|
2717
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2729
|
+
var Ps = /\s+/g;
|
|
2730
|
+
function Fs(e, t, n) {
|
|
2731
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ps, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ps, " "));
|
|
2718
2732
|
}
|
|
2719
2733
|
function U(e, t, n) {
|
|
2720
2734
|
var r = e && e.style;
|
|
@@ -2723,7 +2737,7 @@ function U(e, t, n) {
|
|
|
2723
2737
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2724
2738
|
}
|
|
2725
2739
|
}
|
|
2726
|
-
function
|
|
2740
|
+
function Is(e, t) {
|
|
2727
2741
|
var n = "";
|
|
2728
2742
|
if (typeof e == "string") n = e;
|
|
2729
2743
|
else do {
|
|
@@ -2733,7 +2747,7 @@ function Ps(e, t) {
|
|
|
2733
2747
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2734
2748
|
return i && new i(n);
|
|
2735
2749
|
}
|
|
2736
|
-
function
|
|
2750
|
+
function Ls(e, t, n) {
|
|
2737
2751
|
if (e) {
|
|
2738
2752
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2739
2753
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2741,13 +2755,13 @@ function Fs(e, t, n) {
|
|
|
2741
2755
|
}
|
|
2742
2756
|
return [];
|
|
2743
2757
|
}
|
|
2744
|
-
function
|
|
2758
|
+
function Rs() {
|
|
2745
2759
|
return document.scrollingElement || document.documentElement;
|
|
2746
2760
|
}
|
|
2747
2761
|
function W(e, t, n, r, i) {
|
|
2748
2762
|
if (e.getBoundingClientRect || e === window) {
|
|
2749
2763
|
var a, o, s, c, l, u, d;
|
|
2750
|
-
if (e !== window && e.parentNode && e !==
|
|
2764
|
+
if (e !== window && e.parentNode && e !== Rs() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !ws)) do
|
|
2751
2765
|
if (i && i.getBoundingClientRect && (U(i, "transform") !== "none" || n && U(i, "position") !== "static")) {
|
|
2752
2766
|
var f = i.getBoundingClientRect();
|
|
2753
2767
|
o -= f.top + parseInt(U(i, "border-top-width")), s -= f.left + parseInt(U(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2755,7 +2769,7 @@ function W(e, t, n, r, i) {
|
|
|
2755
2769
|
}
|
|
2756
2770
|
while (i = i.parentNode);
|
|
2757
2771
|
if (r && e !== window) {
|
|
2758
|
-
var p =
|
|
2772
|
+
var p = Is(i || e), m = p && p.a, h = p && p.d;
|
|
2759
2773
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2760
2774
|
}
|
|
2761
2775
|
return {
|
|
@@ -2768,18 +2782,18 @@ function W(e, t, n, r, i) {
|
|
|
2768
2782
|
};
|
|
2769
2783
|
}
|
|
2770
2784
|
}
|
|
2771
|
-
function
|
|
2772
|
-
for (var r =
|
|
2785
|
+
function zs(e, t, n) {
|
|
2786
|
+
for (var r = Gs(e, !0), i = W(e)[t]; r;) {
|
|
2773
2787
|
var a = W(r)[n], o = void 0;
|
|
2774
2788
|
if (o = i >= a, !o) return r;
|
|
2775
|
-
if (r ===
|
|
2776
|
-
r =
|
|
2789
|
+
if (r === Rs()) break;
|
|
2790
|
+
r = Gs(r, !1);
|
|
2777
2791
|
}
|
|
2778
2792
|
return !1;
|
|
2779
2793
|
}
|
|
2780
|
-
function
|
|
2794
|
+
function Bs(e, t, n, r) {
|
|
2781
2795
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2782
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2796
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ns(o[a], n.draggable, e, !1)) {
|
|
2783
2797
|
if (i === t) return o[a];
|
|
2784
2798
|
i++;
|
|
2785
2799
|
}
|
|
@@ -2787,84 +2801,84 @@ function Rs(e, t, n, r) {
|
|
|
2787
2801
|
}
|
|
2788
2802
|
return null;
|
|
2789
2803
|
}
|
|
2790
|
-
function
|
|
2791
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !
|
|
2804
|
+
function Vs(e, t) {
|
|
2805
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !js(n, t));) n = n.previousElementSibling;
|
|
2792
2806
|
return n || null;
|
|
2793
2807
|
}
|
|
2794
|
-
function
|
|
2808
|
+
function Hs(e, t) {
|
|
2795
2809
|
var n = 0;
|
|
2796
2810
|
if (!e || !e.parentNode) return -1;
|
|
2797
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2811
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || js(e, t)) && n++;
|
|
2798
2812
|
return n;
|
|
2799
2813
|
}
|
|
2800
|
-
function
|
|
2801
|
-
var t = 0, n = 0, r =
|
|
2814
|
+
function Us(e) {
|
|
2815
|
+
var t = 0, n = 0, r = Rs();
|
|
2802
2816
|
if (e) do {
|
|
2803
|
-
var i =
|
|
2817
|
+
var i = Is(e), a = i.a, o = i.d;
|
|
2804
2818
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2805
2819
|
} while (e !== r && (e = e.parentNode));
|
|
2806
2820
|
return [t, n];
|
|
2807
2821
|
}
|
|
2808
|
-
function
|
|
2822
|
+
function Ws(e, t) {
|
|
2809
2823
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2810
2824
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2811
2825
|
}
|
|
2812
2826
|
return -1;
|
|
2813
2827
|
}
|
|
2814
|
-
function
|
|
2815
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2828
|
+
function Gs(e, t) {
|
|
2829
|
+
if (!e || !e.getBoundingClientRect) return Rs();
|
|
2816
2830
|
var n = e, r = !1;
|
|
2817
2831
|
do
|
|
2818
2832
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2819
2833
|
var i = U(n);
|
|
2820
2834
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2821
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2835
|
+
if (!n.getBoundingClientRect || n === document.body) return Rs();
|
|
2822
2836
|
if (r || t) return n;
|
|
2823
2837
|
r = !0;
|
|
2824
2838
|
}
|
|
2825
2839
|
}
|
|
2826
2840
|
while (n = n.parentNode);
|
|
2827
|
-
return
|
|
2841
|
+
return Rs();
|
|
2828
2842
|
}
|
|
2829
|
-
function
|
|
2843
|
+
function Ks(e, t) {
|
|
2830
2844
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2831
2845
|
return e;
|
|
2832
2846
|
}
|
|
2833
|
-
function
|
|
2847
|
+
function qs(e, t) {
|
|
2834
2848
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2835
2849
|
}
|
|
2836
|
-
var
|
|
2837
|
-
function
|
|
2850
|
+
var Js;
|
|
2851
|
+
function Ys(e, t) {
|
|
2838
2852
|
return function() {
|
|
2839
|
-
if (!
|
|
2853
|
+
if (!Js) {
|
|
2840
2854
|
var n = arguments, r = this;
|
|
2841
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2842
|
-
|
|
2855
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Js = setTimeout(function() {
|
|
2856
|
+
Js = void 0;
|
|
2843
2857
|
}, t);
|
|
2844
2858
|
}
|
|
2845
2859
|
};
|
|
2846
2860
|
}
|
|
2847
|
-
function
|
|
2848
|
-
clearTimeout(
|
|
2861
|
+
function Xs() {
|
|
2862
|
+
clearTimeout(Js), Js = void 0;
|
|
2849
2863
|
}
|
|
2850
|
-
function
|
|
2864
|
+
function Zs(e, t, n) {
|
|
2851
2865
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2852
2866
|
}
|
|
2853
|
-
function
|
|
2867
|
+
function Qs(e) {
|
|
2854
2868
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2855
2869
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2856
2870
|
}
|
|
2857
|
-
function
|
|
2871
|
+
function $s(e, t, n) {
|
|
2858
2872
|
var r = {};
|
|
2859
2873
|
return Array.from(e.children).forEach(function(i) {
|
|
2860
|
-
if (
|
|
2874
|
+
if (Ns(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2861
2875
|
var a = W(i);
|
|
2862
2876
|
r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
|
|
2863
2877
|
}
|
|
2864
2878
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2865
2879
|
}
|
|
2866
|
-
var
|
|
2867
|
-
function
|
|
2880
|
+
var ec = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2881
|
+
function tc() {
|
|
2868
2882
|
var e = [], t;
|
|
2869
2883
|
return {
|
|
2870
2884
|
captureAnimationState: function() {
|
|
@@ -2874,9 +2888,9 @@ function $s() {
|
|
|
2874
2888
|
target: t,
|
|
2875
2889
|
rect: W(t)
|
|
2876
2890
|
});
|
|
2877
|
-
var n =
|
|
2891
|
+
var n = gs({}, e[e.length - 1].rect);
|
|
2878
2892
|
if (t.thisAnimationDuration) {
|
|
2879
|
-
var r =
|
|
2893
|
+
var r = Is(t, !0);
|
|
2880
2894
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2881
2895
|
}
|
|
2882
2896
|
t.fromRect = n;
|
|
@@ -2887,7 +2901,7 @@ function $s() {
|
|
|
2887
2901
|
e.push(t);
|
|
2888
2902
|
},
|
|
2889
2903
|
removeAnimationState: function(t) {
|
|
2890
|
-
e.splice(
|
|
2904
|
+
e.splice(Ws(e, { target: t }), 1);
|
|
2891
2905
|
},
|
|
2892
2906
|
animateAll: function(n) {
|
|
2893
2907
|
var r = this;
|
|
@@ -2895,8 +2909,8 @@ function $s() {
|
|
|
2895
2909
|
else {
|
|
2896
2910
|
var i = !1, a = 0;
|
|
2897
2911
|
e.forEach(function(e) {
|
|
2898
|
-
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2899
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2912
|
+
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Is(n, !0);
|
|
2913
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && qs(c, s) && !qs(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = rc(u, c, l, r.options)), qs(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
2900
2914
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2901
2915
|
}, t), n.thisAnimationDuration = t);
|
|
2902
2916
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2907,26 +2921,26 @@ function $s() {
|
|
|
2907
2921
|
animate: function(e, t, n, r) {
|
|
2908
2922
|
if (r) {
|
|
2909
2923
|
U(e, "transition", ""), U(e, "transform", "");
|
|
2910
|
-
var i =
|
|
2911
|
-
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2924
|
+
var i = Is(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2925
|
+
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = nc(e), U(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), U(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2912
2926
|
U(e, "transition", ""), U(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2913
2927
|
}, r);
|
|
2914
2928
|
}
|
|
2915
2929
|
}
|
|
2916
2930
|
};
|
|
2917
2931
|
}
|
|
2918
|
-
function
|
|
2932
|
+
function nc(e) {
|
|
2919
2933
|
return e.offsetWidth;
|
|
2920
2934
|
}
|
|
2921
|
-
function
|
|
2935
|
+
function rc(e, t, n, r) {
|
|
2922
2936
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
2923
2937
|
}
|
|
2924
|
-
var
|
|
2938
|
+
var ic = [], ac = { initializeByDefault: !0 }, oc = {
|
|
2925
2939
|
mount: function(e) {
|
|
2926
|
-
for (var t in
|
|
2927
|
-
|
|
2940
|
+
for (var t in ac) ac.hasOwnProperty(t) && !(t in e) && (e[t] = ac[t]);
|
|
2941
|
+
ic.forEach(function(t) {
|
|
2928
2942
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2929
|
-
}),
|
|
2943
|
+
}), ic.push(e);
|
|
2930
2944
|
},
|
|
2931
2945
|
pluginEvent: function(e, t, n) {
|
|
2932
2946
|
var r = this;
|
|
@@ -2934,16 +2948,16 @@ var nc = [], rc = { initializeByDefault: !0 }, ic = {
|
|
|
2934
2948
|
r.eventCanceled = !0;
|
|
2935
2949
|
};
|
|
2936
2950
|
var i = e + "Global";
|
|
2937
|
-
|
|
2938
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2951
|
+
ic.forEach(function(r) {
|
|
2952
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](gs({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](gs({ sortable: t }, n)));
|
|
2939
2953
|
});
|
|
2940
2954
|
},
|
|
2941
2955
|
initializePlugins: function(e, t, n, r) {
|
|
2942
|
-
for (var i in
|
|
2956
|
+
for (var i in ic.forEach(function(r) {
|
|
2943
2957
|
var i = r.pluginName;
|
|
2944
2958
|
if (e.options[i] || r.initializeByDefault) {
|
|
2945
2959
|
var a = new r(e, t, e.options);
|
|
2946
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2960
|
+
a.sortable = e, a.options = e.options, e[i] = a, ys(n, a.defaults);
|
|
2947
2961
|
}
|
|
2948
2962
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2949
2963
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2952,59 +2966,59 @@ var nc = [], rc = { initializeByDefault: !0 }, ic = {
|
|
|
2952
2966
|
},
|
|
2953
2967
|
getEventProperties: function(e, t) {
|
|
2954
2968
|
var n = {};
|
|
2955
|
-
return
|
|
2956
|
-
typeof r.eventProperties == "function" &&
|
|
2969
|
+
return ic.forEach(function(r) {
|
|
2970
|
+
typeof r.eventProperties == "function" && ys(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2957
2971
|
}), n;
|
|
2958
2972
|
},
|
|
2959
2973
|
modifyOption: function(e, t, n) {
|
|
2960
2974
|
var r;
|
|
2961
|
-
return
|
|
2975
|
+
return ic.forEach(function(i) {
|
|
2962
2976
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2963
2977
|
}), r;
|
|
2964
2978
|
}
|
|
2965
2979
|
};
|
|
2966
|
-
function
|
|
2980
|
+
function sc(e) {
|
|
2967
2981
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
2968
|
-
if (t ||= n && n[
|
|
2982
|
+
if (t ||= n && n[ec], t) {
|
|
2969
2983
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2970
|
-
window.CustomEvent && !
|
|
2984
|
+
window.CustomEvent && !ws && !Ts ? h = new CustomEvent(r, {
|
|
2971
2985
|
bubbles: !0,
|
|
2972
2986
|
cancelable: !0
|
|
2973
2987
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
2974
|
-
var v =
|
|
2988
|
+
var v = gs(gs({}, m), oc.getEventProperties(r, t));
|
|
2975
2989
|
for (var y in v) h[y] = v[y];
|
|
2976
2990
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2977
2991
|
}
|
|
2978
2992
|
}
|
|
2979
|
-
var
|
|
2980
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2981
|
-
|
|
2993
|
+
var cc = ["evt"], lc = function(e, t) {
|
|
2994
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = xs(n, cc);
|
|
2995
|
+
oc.pluginEvent.bind(Q)(e, t, gs({
|
|
2982
2996
|
dragEl: G,
|
|
2983
2997
|
parentEl: K,
|
|
2984
2998
|
ghostEl: q,
|
|
2985
2999
|
rootEl: J,
|
|
2986
|
-
nextEl:
|
|
2987
|
-
lastDownEl:
|
|
3000
|
+
nextEl: dc,
|
|
3001
|
+
lastDownEl: fc,
|
|
2988
3002
|
cloneEl: Y,
|
|
2989
|
-
cloneHidden:
|
|
2990
|
-
dragStarted:
|
|
3003
|
+
cloneHidden: pc,
|
|
3004
|
+
dragStarted: Oc,
|
|
2991
3005
|
putSortable: X,
|
|
2992
3006
|
activeSortable: Q.active,
|
|
2993
3007
|
originalEvent: r,
|
|
2994
|
-
oldIndex:
|
|
2995
|
-
oldDraggableIndex:
|
|
2996
|
-
newIndex:
|
|
2997
|
-
newDraggableIndex:
|
|
2998
|
-
hideGhostForTarget:
|
|
2999
|
-
unhideGhostForTarget:
|
|
3008
|
+
oldIndex: mc,
|
|
3009
|
+
oldDraggableIndex: gc,
|
|
3010
|
+
newIndex: hc,
|
|
3011
|
+
newDraggableIndex: _c,
|
|
3012
|
+
hideGhostForTarget: Kc,
|
|
3013
|
+
unhideGhostForTarget: qc,
|
|
3000
3014
|
cloneNowHidden: function() {
|
|
3001
|
-
|
|
3015
|
+
pc = !0;
|
|
3002
3016
|
},
|
|
3003
3017
|
cloneNowShown: function() {
|
|
3004
|
-
|
|
3018
|
+
pc = !1;
|
|
3005
3019
|
},
|
|
3006
3020
|
dispatchSortableEvent: function(e) {
|
|
3007
|
-
|
|
3021
|
+
uc({
|
|
3008
3022
|
sortable: t,
|
|
3009
3023
|
name: e,
|
|
3010
3024
|
originalEvent: r
|
|
@@ -3012,46 +3026,46 @@ var oc = ["evt"], sc = function(e, t) {
|
|
|
3012
3026
|
}
|
|
3013
3027
|
}, i));
|
|
3014
3028
|
};
|
|
3015
|
-
function
|
|
3016
|
-
|
|
3029
|
+
function uc(e) {
|
|
3030
|
+
sc(gs({
|
|
3017
3031
|
putSortable: X,
|
|
3018
3032
|
cloneEl: Y,
|
|
3019
3033
|
targetEl: G,
|
|
3020
3034
|
rootEl: J,
|
|
3021
|
-
oldIndex:
|
|
3022
|
-
oldDraggableIndex:
|
|
3023
|
-
newIndex:
|
|
3024
|
-
newDraggableIndex:
|
|
3035
|
+
oldIndex: mc,
|
|
3036
|
+
oldDraggableIndex: gc,
|
|
3037
|
+
newIndex: hc,
|
|
3038
|
+
newDraggableIndex: _c
|
|
3025
3039
|
}, e));
|
|
3026
3040
|
}
|
|
3027
|
-
var G, K, q, J,
|
|
3028
|
-
if (
|
|
3029
|
-
if (
|
|
3041
|
+
var G, K, q, J, dc, fc, Y, pc, mc, hc, gc, _c, vc, X, yc = !1, bc = !1, xc = [], Sc, Cc, wc, Tc, Ec, Dc, Oc, kc, Ac, jc = !1, Mc = !1, Nc, Z, Pc = [], Fc = !1, Ic = [], Lc = typeof document < "u", Rc = Os, zc = Ts || ws ? "cssFloat" : "float", Bc = Lc && !ks && !Os && "draggable" in document.createElement("div"), Vc = function() {
|
|
3042
|
+
if (Lc) {
|
|
3043
|
+
if (ws) return !1;
|
|
3030
3044
|
var e = document.createElement("x");
|
|
3031
3045
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3032
3046
|
}
|
|
3033
|
-
}(),
|
|
3034
|
-
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3047
|
+
}(), Hc = function(e, t) {
|
|
3048
|
+
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Bs(e, 0, t), a = Bs(e, 1, t), o = i && U(i), s = a && U(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + W(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + W(a).width;
|
|
3035
3049
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3036
3050
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3037
3051
|
if (i && o.float && o.float !== "none") {
|
|
3038
3052
|
var u = o.float === "left" ? "left" : "right";
|
|
3039
3053
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3040
3054
|
}
|
|
3041
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3042
|
-
},
|
|
3055
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[zc] === "none" || a && n[zc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3056
|
+
}, Uc = function(e, t, n) {
|
|
3043
3057
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
3044
3058
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3045
|
-
},
|
|
3059
|
+
}, Wc = function(e, t) {
|
|
3046
3060
|
var n;
|
|
3047
|
-
return
|
|
3048
|
-
var i = r[
|
|
3049
|
-
if (i && !
|
|
3061
|
+
return xc.some(function(r) {
|
|
3062
|
+
var i = r[ec].options.emptyInsertThreshold;
|
|
3063
|
+
if (i && !Vs(r)) {
|
|
3050
3064
|
var a = W(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3051
3065
|
if (o && s) return n = r;
|
|
3052
3066
|
}
|
|
3053
3067
|
}), n;
|
|
3054
|
-
},
|
|
3068
|
+
}, Gc = function(e) {
|
|
3055
3069
|
function t(e, n) {
|
|
3056
3070
|
return function(r, i, a, o) {
|
|
3057
3071
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3064,31 +3078,31 @@ var G, K, q, J, lc, uc, Y, dc, fc, pc, mc, hc, gc, X, _c = !1, vc = !1, yc = [],
|
|
|
3064
3078
|
};
|
|
3065
3079
|
}
|
|
3066
3080
|
var n = {}, r = e.group;
|
|
3067
|
-
r &&
|
|
3068
|
-
},
|
|
3069
|
-
!
|
|
3070
|
-
},
|
|
3071
|
-
!
|
|
3081
|
+
r && _s(r) == "object" || (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
3082
|
+
}, Kc = function() {
|
|
3083
|
+
!Vc && q && U(q, "display", "none");
|
|
3084
|
+
}, qc = function() {
|
|
3085
|
+
!Vc && q && U(q, "display", "");
|
|
3072
3086
|
};
|
|
3073
|
-
|
|
3074
|
-
if (
|
|
3087
|
+
Lc && !ks && document.addEventListener("click", function(e) {
|
|
3088
|
+
if (bc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), bc = !1, !1;
|
|
3075
3089
|
}, !0);
|
|
3076
|
-
var
|
|
3090
|
+
var Jc = function(e) {
|
|
3077
3091
|
if (G) {
|
|
3078
3092
|
e = e.touches ? e.touches[0] : e;
|
|
3079
|
-
var t =
|
|
3093
|
+
var t = Wc(e.clientX, e.clientY);
|
|
3080
3094
|
if (t) {
|
|
3081
3095
|
var n = {};
|
|
3082
3096
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3083
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3097
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ec]._onDragOver(n);
|
|
3084
3098
|
}
|
|
3085
3099
|
}
|
|
3086
|
-
},
|
|
3087
|
-
G && G.parentNode[
|
|
3100
|
+
}, Yc = function(e) {
|
|
3101
|
+
G && G.parentNode[ec]._isOutsideThisEl(e.target);
|
|
3088
3102
|
};
|
|
3089
3103
|
function Q(e, t) {
|
|
3090
3104
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3091
|
-
this.el = e, this.options = t =
|
|
3105
|
+
this.el = e, this.options = t = ys({}, t), e[ec] = this;
|
|
3092
3106
|
var n = {
|
|
3093
3107
|
group: null,
|
|
3094
3108
|
sort: !0,
|
|
@@ -3101,7 +3115,7 @@ function Q(e, t) {
|
|
|
3101
3115
|
invertedSwapThreshold: null,
|
|
3102
3116
|
removeCloneOnHide: !0,
|
|
3103
3117
|
direction: function() {
|
|
3104
|
-
return
|
|
3118
|
+
return Hc(e, this.options);
|
|
3105
3119
|
},
|
|
3106
3120
|
ghostClass: "sortable-ghost",
|
|
3107
3121
|
chosenClass: "sortable-chosen",
|
|
@@ -3128,17 +3142,17 @@ function Q(e, t) {
|
|
|
3128
3142
|
x: 0,
|
|
3129
3143
|
y: 0
|
|
3130
3144
|
},
|
|
3131
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3145
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ds,
|
|
3132
3146
|
emptyInsertThreshold: 5
|
|
3133
3147
|
};
|
|
3134
|
-
for (var r in
|
|
3135
|
-
for (var i in
|
|
3136
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3148
|
+
for (var r in oc.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3149
|
+
for (var i in Gc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3150
|
+
this.nativeDraggable = !t.forceFallback && Bc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? V(e, "pointerdown", this._onTapStart) : (V(e, "mousedown", this._onTapStart), V(e, "touchstart", this._onTapStart)), this.nativeDraggable && (V(e, "dragover", this), V(e, "dragenter", this)), xc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ys(this, tc());
|
|
3137
3151
|
}
|
|
3138
3152
|
Q.prototype = {
|
|
3139
3153
|
constructor: Q,
|
|
3140
3154
|
_isOutsideThisEl: function(e) {
|
|
3141
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3155
|
+
!this.el.contains(e) && e !== this.el && (kc = null);
|
|
3142
3156
|
},
|
|
3143
3157
|
_getDirection: function(e, t) {
|
|
3144
3158
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -3146,33 +3160,33 @@ Q.prototype = {
|
|
|
3146
3160
|
_onTapStart: function(e) {
|
|
3147
3161
|
if (e.cancelable) {
|
|
3148
3162
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
3149
|
-
if (
|
|
3150
|
-
if (
|
|
3163
|
+
if (al(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ds && s && s.tagName.toUpperCase() === "SELECT") && (s = Ns(s, r.draggable, n, !1), !(s && s.animated) && fc !== s)) {
|
|
3164
|
+
if (mc = Hs(s), gc = Hs(s, r.draggable), typeof l == "function") {
|
|
3151
3165
|
if (l.call(this, e, s, this)) {
|
|
3152
|
-
|
|
3166
|
+
uc({
|
|
3153
3167
|
sortable: t,
|
|
3154
3168
|
rootEl: c,
|
|
3155
3169
|
name: "filter",
|
|
3156
3170
|
targetEl: s,
|
|
3157
3171
|
toEl: n,
|
|
3158
3172
|
fromEl: n
|
|
3159
|
-
}),
|
|
3173
|
+
}), lc("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3160
3174
|
return;
|
|
3161
3175
|
}
|
|
3162
3176
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3163
|
-
if (r =
|
|
3177
|
+
if (r = Ns(c, r.trim(), n, !1), r) return uc({
|
|
3164
3178
|
sortable: t,
|
|
3165
3179
|
rootEl: r,
|
|
3166
3180
|
name: "filter",
|
|
3167
3181
|
targetEl: s,
|
|
3168
3182
|
fromEl: n,
|
|
3169
3183
|
toEl: n
|
|
3170
|
-
}),
|
|
3184
|
+
}), lc("filter", t, { evt: e }), !0;
|
|
3171
3185
|
}), l)) {
|
|
3172
3186
|
i && e.cancelable && e.preventDefault();
|
|
3173
3187
|
return;
|
|
3174
3188
|
}
|
|
3175
|
-
r.handle && !
|
|
3189
|
+
r.handle && !Ns(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3176
3190
|
}
|
|
3177
3191
|
}
|
|
3178
3192
|
},
|
|
@@ -3180,19 +3194,19 @@ Q.prototype = {
|
|
|
3180
3194
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3181
3195
|
if (n && !G && n.parentNode === i) {
|
|
3182
3196
|
var c = W(n);
|
|
3183
|
-
if (J = i, G = n, K = G.parentNode,
|
|
3197
|
+
if (J = i, G = n, K = G.parentNode, dc = G.nextSibling, fc = n, vc = a.group, Q.dragged = G, Sc = {
|
|
3184
3198
|
target: G,
|
|
3185
3199
|
clientX: (t || e).clientX,
|
|
3186
3200
|
clientY: (t || e).clientY
|
|
3187
|
-
},
|
|
3188
|
-
|
|
3201
|
+
}, Ec = Sc.clientX - c.left, Dc = Sc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3202
|
+
lc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Es && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), uc({
|
|
3189
3203
|
sortable: r,
|
|
3190
3204
|
name: "choose",
|
|
3191
3205
|
originalEvent: e
|
|
3192
|
-
}),
|
|
3206
|
+
}), Fs(G, a.chosenClass, !0));
|
|
3193
3207
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3194
|
-
|
|
3195
|
-
}), V(o, "dragover",
|
|
3208
|
+
Ls(G, e.trim(), Qc);
|
|
3209
|
+
}), V(o, "dragover", Jc), V(o, "mousemove", Jc), V(o, "touchmove", Jc), V(o, "mouseup", r._onDrop), V(o, "touchend", r._onDrop), V(o, "touchcancel", r._onDrop), Es && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), lc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ts || ws))) {
|
|
3196
3210
|
if (Q.eventCanceled) {
|
|
3197
3211
|
this._onDrop();
|
|
3198
3212
|
return;
|
|
@@ -3206,7 +3220,7 @@ Q.prototype = {
|
|
|
3206
3220
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3207
3221
|
},
|
|
3208
3222
|
_disableDelayedDrag: function() {
|
|
3209
|
-
G &&
|
|
3223
|
+
G && Qc(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3210
3224
|
},
|
|
3211
3225
|
_disableDelayedDragEvents: function() {
|
|
3212
3226
|
var e = this.el.ownerDocument;
|
|
@@ -3215,16 +3229,16 @@ Q.prototype = {
|
|
|
3215
3229
|
_triggerDragStart: function(e, t) {
|
|
3216
3230
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? V(document, "pointermove", this._onTouchMove) : t ? V(document, "touchmove", this._onTouchMove) : V(document, "mousemove", this._onTouchMove) : (V(G, "dragend", this), V(J, "dragstart", this._onDragStart));
|
|
3217
3231
|
try {
|
|
3218
|
-
document.selection ?
|
|
3232
|
+
document.selection ? ol(function() {
|
|
3219
3233
|
document.selection.empty();
|
|
3220
3234
|
}) : window.getSelection().removeAllRanges();
|
|
3221
3235
|
} catch {}
|
|
3222
3236
|
},
|
|
3223
3237
|
_dragStarted: function(e, t) {
|
|
3224
|
-
if (
|
|
3225
|
-
|
|
3238
|
+
if (yc = !1, J && G) {
|
|
3239
|
+
lc("dragStarted", this, { evt: t }), this.nativeDraggable && V(document, "dragover", Yc);
|
|
3226
3240
|
var n = this.options;
|
|
3227
|
-
!e &&
|
|
3241
|
+
!e && Fs(G, n.dragClass, !1), Fs(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), uc({
|
|
3228
3242
|
sortable: this,
|
|
3229
3243
|
name: "start",
|
|
3230
3244
|
originalEvent: t
|
|
@@ -3232,33 +3246,33 @@ Q.prototype = {
|
|
|
3232
3246
|
} else this._nulling();
|
|
3233
3247
|
},
|
|
3234
3248
|
_emulateDragOver: function() {
|
|
3235
|
-
if (
|
|
3236
|
-
this._lastX =
|
|
3237
|
-
for (var e = document.elementFromPoint(
|
|
3238
|
-
if (G.parentNode[
|
|
3239
|
-
if (t[
|
|
3249
|
+
if (Cc) {
|
|
3250
|
+
this._lastX = Cc.clientX, this._lastY = Cc.clientY, Kc();
|
|
3251
|
+
for (var e = document.elementFromPoint(Cc.clientX, Cc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Cc.clientX, Cc.clientY), e !== t);) t = e;
|
|
3252
|
+
if (G.parentNode[ec]._isOutsideThisEl(e), t) do {
|
|
3253
|
+
if (t[ec]) {
|
|
3240
3254
|
var n = void 0;
|
|
3241
|
-
if (n = t[
|
|
3242
|
-
clientX:
|
|
3243
|
-
clientY:
|
|
3255
|
+
if (n = t[ec]._onDragOver({
|
|
3256
|
+
clientX: Cc.clientX,
|
|
3257
|
+
clientY: Cc.clientY,
|
|
3244
3258
|
target: e,
|
|
3245
3259
|
rootEl: t
|
|
3246
3260
|
}), n && !this.options.dragoverBubble) break;
|
|
3247
3261
|
}
|
|
3248
3262
|
e = t;
|
|
3249
3263
|
} while (t = t.parentNode);
|
|
3250
|
-
|
|
3264
|
+
qc();
|
|
3251
3265
|
}
|
|
3252
3266
|
},
|
|
3253
3267
|
_onTouchMove: function(e) {
|
|
3254
|
-
if (
|
|
3255
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
3256
|
-
if (!Q.active && !
|
|
3268
|
+
if (Sc) {
|
|
3269
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Is(q, !0), o = q && a && a.a, s = q && a && a.d, c = Rc && Z && Us(Z), l = (i.clientX - Sc.clientX + r.x) / (o || 1) + (c ? c[0] - Pc[0] : 0) / (o || 1), u = (i.clientY - Sc.clientY + r.y) / (s || 1) + (c ? c[1] - Pc[1] : 0) / (s || 1);
|
|
3270
|
+
if (!Q.active && !yc) {
|
|
3257
3271
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3258
3272
|
this._onDragStart(e, !0);
|
|
3259
3273
|
}
|
|
3260
3274
|
if (q) {
|
|
3261
|
-
a ? (a.e += l - (
|
|
3275
|
+
a ? (a.e += l - (wc || 0), a.f += u - (Tc || 0)) : a = {
|
|
3262
3276
|
a: 1,
|
|
3263
3277
|
b: 0,
|
|
3264
3278
|
c: 0,
|
|
@@ -3267,35 +3281,35 @@ Q.prototype = {
|
|
|
3267
3281
|
f: u
|
|
3268
3282
|
};
|
|
3269
3283
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3270
|
-
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d),
|
|
3284
|
+
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d), wc = l, Tc = u, Cc = i;
|
|
3271
3285
|
}
|
|
3272
3286
|
e.cancelable && e.preventDefault();
|
|
3273
3287
|
}
|
|
3274
3288
|
},
|
|
3275
3289
|
_appendGhost: function() {
|
|
3276
3290
|
if (!q) {
|
|
3277
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0,
|
|
3278
|
-
if (
|
|
3291
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0, Rc, !0, e), n = this.options;
|
|
3292
|
+
if (Rc) {
|
|
3279
3293
|
for (Z = e; U(Z, "position") === "static" && U(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3280
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3294
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Rs()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Rs(), Pc = Us(Z);
|
|
3281
3295
|
}
|
|
3282
|
-
q = G.cloneNode(!0),
|
|
3296
|
+
q = G.cloneNode(!0), Fs(q, n.ghostClass, !1), Fs(q, n.fallbackClass, !0), Fs(q, n.dragClass, !0), U(q, "transition", ""), U(q, "transform", ""), U(q, "box-sizing", "border-box"), U(q, "margin", 0), U(q, "top", t.top), U(q, "left", t.left), U(q, "width", t.width), U(q, "height", t.height), U(q, "opacity", "0.8"), U(q, "position", Rc ? "absolute" : "fixed"), U(q, "zIndex", "100000"), U(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), U(q, "transform-origin", Ec / parseInt(q.style.width) * 100 + "% " + Dc / parseInt(q.style.height) * 100 + "%");
|
|
3283
3297
|
}
|
|
3284
3298
|
},
|
|
3285
3299
|
_onDragStart: function(e, t) {
|
|
3286
3300
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3287
|
-
|
|
3288
|
-
|
|
3301
|
+
lc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (lc("setupClone", this), Q.eventCanceled || (Y = Qs(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), Fs(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = ol(function() {
|
|
3302
|
+
lc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), uc({
|
|
3289
3303
|
sortable: n,
|
|
3290
3304
|
name: "clone"
|
|
3291
3305
|
}));
|
|
3292
|
-
}), !t &&
|
|
3306
|
+
}), !t && Fs(G, i.dragClass, !0), t ? (bc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (H(document, "mouseup", n._onDrop), H(document, "touchend", n._onDrop), H(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), V(document, "drop", n), U(G, "transform", "translateZ(0)")), yc = !0, n._dragStartId = ol(n._dragStarted.bind(n, t, e)), V(document, "selectstart", n), Oc = !0, Ds && U(document.body, "user-select", "none"));
|
|
3293
3307
|
},
|
|
3294
3308
|
_onDragOver: function(e) {
|
|
3295
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3296
|
-
if (
|
|
3309
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = vc === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3310
|
+
if (Fc) return;
|
|
3297
3311
|
function h(o, s) {
|
|
3298
|
-
|
|
3312
|
+
lc(o, p, gs({
|
|
3299
3313
|
evt: e,
|
|
3300
3314
|
isOwner: l,
|
|
3301
3315
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3307,7 +3321,7 @@ Q.prototype = {
|
|
|
3307
3321
|
target: n,
|
|
3308
3322
|
completed: _,
|
|
3309
3323
|
onMove: function(n, i) {
|
|
3310
|
-
return
|
|
3324
|
+
return Zc(J, t, G, r, n, W(n), e, i);
|
|
3311
3325
|
},
|
|
3312
3326
|
changed: v
|
|
3313
3327
|
}, s));
|
|
@@ -3316,50 +3330,50 @@ Q.prototype = {
|
|
|
3316
3330
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3317
3331
|
}
|
|
3318
3332
|
function _(r) {
|
|
3319
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3333
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Fs(G, X ? X.options.ghostClass : c.options.ghostClass, !1), Fs(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3320
3334
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3321
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
3335
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (kc = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[ec]._isOutsideThisEl(e.target), !r && Jc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3322
3336
|
}
|
|
3323
3337
|
function v() {
|
|
3324
|
-
|
|
3338
|
+
hc = Hs(G), _c = Hs(G, o.draggable), uc({
|
|
3325
3339
|
sortable: p,
|
|
3326
3340
|
name: "change",
|
|
3327
3341
|
toEl: t,
|
|
3328
|
-
newIndex:
|
|
3329
|
-
newDraggableIndex:
|
|
3342
|
+
newIndex: hc,
|
|
3343
|
+
newDraggableIndex: _c,
|
|
3330
3344
|
originalEvent: e
|
|
3331
3345
|
});
|
|
3332
3346
|
}
|
|
3333
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3347
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ns(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3334
3348
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3335
|
-
if (
|
|
3349
|
+
if (bc = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = vc.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3336
3350
|
if (f = this._getDirection(e, n) === "vertical", r = W(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3337
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3338
|
-
var y =
|
|
3339
|
-
if (!y ||
|
|
3351
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (dc ? J.insertBefore(G, dc) : J.appendChild(G)), _(!0);
|
|
3352
|
+
var y = Vs(t, o.draggable);
|
|
3353
|
+
if (!y || tl(e, f, this) && !y.animated) {
|
|
3340
3354
|
if (y === G) return _(!1);
|
|
3341
|
-
if (y && t === e.target && (n = y), n && (i = W(n)),
|
|
3342
|
-
} else if (y &&
|
|
3343
|
-
var b =
|
|
3355
|
+
if (y && t === e.target && (n = y), n && (i = W(n)), Zc(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3356
|
+
} else if (y && el(e, f, this)) {
|
|
3357
|
+
var b = Bs(t, 0, o, !0);
|
|
3344
3358
|
if (b === G) return _(!1);
|
|
3345
|
-
if (n = b, i = W(n),
|
|
3359
|
+
if (n = b, i = W(n), Zc(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3346
3360
|
} else if (n.parentNode === t) {
|
|
3347
3361
|
i = W(n);
|
|
3348
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
3349
|
-
|
|
3362
|
+
var x = 0, S, C = G.parentNode !== t, w = !Uc(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = zs(n, "top", "top") || zs(G, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3363
|
+
kc !== n && (S = i[T], jc = !1, Mc = !w && o.invertSwap || C), x = nl(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Mc, kc === n);
|
|
3350
3364
|
var D;
|
|
3351
3365
|
if (x !== 0) {
|
|
3352
|
-
var O =
|
|
3366
|
+
var O = Hs(G);
|
|
3353
3367
|
do
|
|
3354
3368
|
O -= x, D = K.children[O];
|
|
3355
3369
|
while (D && (U(D, "display") === "none" || D === q));
|
|
3356
3370
|
}
|
|
3357
3371
|
if (x === 0 || D === n) return _(!1);
|
|
3358
|
-
|
|
3372
|
+
kc = n, Ac = x;
|
|
3359
3373
|
var k = n.nextElementSibling, A = !1;
|
|
3360
3374
|
A = x === 1;
|
|
3361
|
-
var j =
|
|
3362
|
-
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1),
|
|
3375
|
+
var j = Zc(J, t, G, r, n, i, e, A);
|
|
3376
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Fc = !0, setTimeout($c, 30), g(), A && !k ? t.appendChild(G) : n.parentNode.insertBefore(G, A ? k : n), E && Zs(E, 0, ee - E.scrollTop), K = G.parentNode, S !== void 0 && !Mc && (Nc = Math.abs(S - W(n)[T])), v(), _(!0);
|
|
3363
3377
|
}
|
|
3364
3378
|
if (t.contains(G)) return _(!1);
|
|
3365
3379
|
}
|
|
@@ -3367,7 +3381,7 @@ Q.prototype = {
|
|
|
3367
3381
|
},
|
|
3368
3382
|
_ignoreWhileAnimating: null,
|
|
3369
3383
|
_offMoveEvents: function() {
|
|
3370
|
-
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover",
|
|
3384
|
+
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover", Jc), H(document, "mousemove", Jc), H(document, "touchmove", Jc);
|
|
3371
3385
|
},
|
|
3372
3386
|
_offUpEvents: function() {
|
|
3373
3387
|
var e = this.el.ownerDocument;
|
|
@@ -3375,46 +3389,46 @@ Q.prototype = {
|
|
|
3375
3389
|
},
|
|
3376
3390
|
_onDrop: function(e) {
|
|
3377
3391
|
var t = this.el, n = this.options;
|
|
3378
|
-
|
|
3392
|
+
hc = Hs(G), _c = Hs(G, n.draggable), lc("drop", this, { evt: e }), K = G && G.parentNode, hc = Hs(G), _c = Hs(G, n.draggable), Q.eventCanceled || (yc = !1, Mc = !1, jc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), sl(this.cloneId), sl(this._dragStartId), this.nativeDraggable && (H(document, "drop", this), H(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ds && U(document.body, "user-select", ""), U(G, "transform", ""), e && (Oc && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && H(G, "dragend", this), Qc(G), G.style["will-change"] = "", Oc && !yc && Fs(G, X ? X.options.ghostClass : this.options.ghostClass, !1), Fs(G, this.options.chosenClass, !1), uc({
|
|
3379
3393
|
sortable: this,
|
|
3380
3394
|
name: "unchoose",
|
|
3381
3395
|
toEl: K,
|
|
3382
3396
|
newIndex: null,
|
|
3383
3397
|
newDraggableIndex: null,
|
|
3384
3398
|
originalEvent: e
|
|
3385
|
-
}), J === K ?
|
|
3399
|
+
}), J === K ? hc !== mc && hc >= 0 && (uc({
|
|
3386
3400
|
sortable: this,
|
|
3387
3401
|
name: "update",
|
|
3388
3402
|
toEl: K,
|
|
3389
3403
|
originalEvent: e
|
|
3390
|
-
}),
|
|
3404
|
+
}), uc({
|
|
3391
3405
|
sortable: this,
|
|
3392
3406
|
name: "sort",
|
|
3393
3407
|
toEl: K,
|
|
3394
3408
|
originalEvent: e
|
|
3395
|
-
})) : (
|
|
3409
|
+
})) : (hc >= 0 && (uc({
|
|
3396
3410
|
rootEl: K,
|
|
3397
3411
|
name: "add",
|
|
3398
3412
|
toEl: K,
|
|
3399
3413
|
fromEl: J,
|
|
3400
3414
|
originalEvent: e
|
|
3401
|
-
}),
|
|
3415
|
+
}), uc({
|
|
3402
3416
|
sortable: this,
|
|
3403
3417
|
name: "remove",
|
|
3404
3418
|
toEl: K,
|
|
3405
3419
|
originalEvent: e
|
|
3406
|
-
}),
|
|
3420
|
+
}), uc({
|
|
3407
3421
|
rootEl: K,
|
|
3408
3422
|
name: "sort",
|
|
3409
3423
|
toEl: K,
|
|
3410
3424
|
fromEl: J,
|
|
3411
3425
|
originalEvent: e
|
|
3412
|
-
}),
|
|
3426
|
+
}), uc({
|
|
3413
3427
|
sortable: this,
|
|
3414
3428
|
name: "sort",
|
|
3415
3429
|
toEl: K,
|
|
3416
3430
|
originalEvent: e
|
|
3417
|
-
})), X && X.save()), Q.active && ((
|
|
3431
|
+
})), X && X.save()), Q.active && ((hc == null || hc === -1) && (hc = mc, _c = gc), uc({
|
|
3418
3432
|
sortable: this,
|
|
3419
3433
|
name: "end",
|
|
3420
3434
|
toEl: K,
|
|
@@ -3422,9 +3436,9 @@ Q.prototype = {
|
|
|
3422
3436
|
}), this.save())))), this._nulling();
|
|
3423
3437
|
},
|
|
3424
3438
|
_nulling: function() {
|
|
3425
|
-
|
|
3439
|
+
lc("nulling", this), J = G = K = q = dc = Y = fc = pc = Sc = Cc = Oc = hc = _c = mc = gc = kc = Ac = X = vc = Q.dragged = Q.ghost = Q.clone = Q.active = null, Ic.forEach(function(e) {
|
|
3426
3440
|
e.checked = !0;
|
|
3427
|
-
}),
|
|
3441
|
+
}), Ic.length = wc = Tc = 0;
|
|
3428
3442
|
},
|
|
3429
3443
|
handleEvent: function(e) {
|
|
3430
3444
|
switch (e.type) {
|
|
@@ -3434,20 +3448,20 @@ Q.prototype = {
|
|
|
3434
3448
|
break;
|
|
3435
3449
|
case "dragenter":
|
|
3436
3450
|
case "dragover":
|
|
3437
|
-
G && (this._onDragOver(e),
|
|
3451
|
+
G && (this._onDragOver(e), Xc(e));
|
|
3438
3452
|
break;
|
|
3439
3453
|
case "selectstart": e.preventDefault();
|
|
3440
3454
|
}
|
|
3441
3455
|
},
|
|
3442
3456
|
toArray: function() {
|
|
3443
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3457
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ns(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || il(t));
|
|
3444
3458
|
return e;
|
|
3445
3459
|
},
|
|
3446
3460
|
sort: function(e, t) {
|
|
3447
3461
|
var n = {}, r = this.el;
|
|
3448
3462
|
this.toArray().forEach(function(e, t) {
|
|
3449
3463
|
var i = r.children[t];
|
|
3450
|
-
|
|
3464
|
+
Ns(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3451
3465
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3452
3466
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3453
3467
|
}), t && this.animateAll();
|
|
@@ -3457,122 +3471,122 @@ Q.prototype = {
|
|
|
3457
3471
|
e && e.set && e.set(this);
|
|
3458
3472
|
},
|
|
3459
3473
|
closest: function(e, t) {
|
|
3460
|
-
return
|
|
3474
|
+
return Ns(e, t || this.options.draggable, this.el, !1);
|
|
3461
3475
|
},
|
|
3462
3476
|
option: function(e, t) {
|
|
3463
3477
|
var n = this.options;
|
|
3464
3478
|
if (t === void 0) return n[e];
|
|
3465
|
-
var r =
|
|
3466
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3479
|
+
var r = oc.modifyOption(this, e, t);
|
|
3480
|
+
n[e] = r === void 0 ? t : r, e === "group" && Gc(n);
|
|
3467
3481
|
},
|
|
3468
3482
|
destroy: function() {
|
|
3469
|
-
|
|
3483
|
+
lc("destroy", this);
|
|
3470
3484
|
var e = this.el;
|
|
3471
|
-
e[
|
|
3485
|
+
e[ec] = null, H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart), H(e, "pointerdown", this._onTapStart), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3472
3486
|
e.removeAttribute("draggable");
|
|
3473
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3487
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), xc.splice(xc.indexOf(this.el), 1), this.el = e = null;
|
|
3474
3488
|
},
|
|
3475
3489
|
_hideClone: function() {
|
|
3476
|
-
if (!
|
|
3477
|
-
if (
|
|
3478
|
-
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
3490
|
+
if (!pc) {
|
|
3491
|
+
if (lc("hideClone", this), Q.eventCanceled) return;
|
|
3492
|
+
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), pc = !0;
|
|
3479
3493
|
}
|
|
3480
3494
|
},
|
|
3481
3495
|
_showClone: function(e) {
|
|
3482
3496
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3483
|
-
else if (
|
|
3484
|
-
if (
|
|
3485
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3497
|
+
else if (pc) {
|
|
3498
|
+
if (lc("showClone", this), Q.eventCanceled) return;
|
|
3499
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : dc ? J.insertBefore(Y, dc) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), U(Y, "display", ""), pc = !1;
|
|
3486
3500
|
}
|
|
3487
3501
|
}
|
|
3488
3502
|
};
|
|
3489
|
-
function
|
|
3503
|
+
function Xc(e) {
|
|
3490
3504
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3491
3505
|
}
|
|
3492
|
-
function
|
|
3493
|
-
var c, l = e[
|
|
3494
|
-
return window.CustomEvent && !
|
|
3506
|
+
function Zc(e, t, n, r, i, a, o, s) {
|
|
3507
|
+
var c, l = e[ec], u = l.options.onMove, d;
|
|
3508
|
+
return window.CustomEvent && !ws && !Ts ? c = new CustomEvent("move", {
|
|
3495
3509
|
bubbles: !0,
|
|
3496
3510
|
cancelable: !0
|
|
3497
3511
|
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || W(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3498
3512
|
}
|
|
3499
|
-
function
|
|
3513
|
+
function Qc(e) {
|
|
3500
3514
|
e.draggable = !1;
|
|
3501
3515
|
}
|
|
3502
|
-
function
|
|
3503
|
-
|
|
3516
|
+
function $c() {
|
|
3517
|
+
Fc = !1;
|
|
3504
3518
|
}
|
|
3505
|
-
function
|
|
3506
|
-
var r = W(
|
|
3519
|
+
function el(e, t, n) {
|
|
3520
|
+
var r = W(Bs(n.el, 0, n.options, !0)), i = $s(n.el, n.options, q), a = 10;
|
|
3507
3521
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3508
3522
|
}
|
|
3509
|
-
function
|
|
3510
|
-
var r = W(
|
|
3523
|
+
function tl(e, t, n) {
|
|
3524
|
+
var r = W(Vs(n.el, n.options.draggable)), i = $s(n.el, n.options, q), a = 10;
|
|
3511
3525
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3512
3526
|
}
|
|
3513
|
-
function
|
|
3527
|
+
function nl(e, t, n, r, i, a, o, s) {
|
|
3514
3528
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3515
3529
|
if (!o) {
|
|
3516
|
-
if (s &&
|
|
3517
|
-
if (!
|
|
3518
|
-
else if (
|
|
3519
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3530
|
+
if (s && Nc < l * i) {
|
|
3531
|
+
if (!jc && (Ac === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (jc = !0), jc) f = !0;
|
|
3532
|
+
else if (Ac === 1 ? c < u + Nc : c > d - Nc) return -Ac;
|
|
3533
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return rl(t);
|
|
3520
3534
|
}
|
|
3521
3535
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3522
3536
|
}
|
|
3523
|
-
function
|
|
3524
|
-
return
|
|
3537
|
+
function rl(e) {
|
|
3538
|
+
return Hs(G) < Hs(e) ? 1 : -1;
|
|
3525
3539
|
}
|
|
3526
|
-
function
|
|
3540
|
+
function il(e) {
|
|
3527
3541
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3528
3542
|
return r.toString(36);
|
|
3529
3543
|
}
|
|
3530
|
-
function
|
|
3531
|
-
|
|
3544
|
+
function al(e) {
|
|
3545
|
+
Ic.length = 0;
|
|
3532
3546
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3533
3547
|
var r = t[n];
|
|
3534
|
-
r.checked &&
|
|
3548
|
+
r.checked && Ic.push(r);
|
|
3535
3549
|
}
|
|
3536
3550
|
}
|
|
3537
|
-
function
|
|
3551
|
+
function ol(e) {
|
|
3538
3552
|
return setTimeout(e, 0);
|
|
3539
3553
|
}
|
|
3540
|
-
function
|
|
3554
|
+
function sl(e) {
|
|
3541
3555
|
return clearTimeout(e);
|
|
3542
3556
|
}
|
|
3543
|
-
|
|
3544
|
-
(Q.active ||
|
|
3557
|
+
Lc && V(document, "touchmove", function(e) {
|
|
3558
|
+
(Q.active || yc) && e.cancelable && e.preventDefault();
|
|
3545
3559
|
}), Q.utils = {
|
|
3546
3560
|
on: V,
|
|
3547
3561
|
off: H,
|
|
3548
3562
|
css: U,
|
|
3549
|
-
find:
|
|
3563
|
+
find: Ls,
|
|
3550
3564
|
is: function(e, t) {
|
|
3551
|
-
return !!
|
|
3565
|
+
return !!Ns(e, t, e, !1);
|
|
3552
3566
|
},
|
|
3553
|
-
extend:
|
|
3554
|
-
throttle:
|
|
3555
|
-
closest:
|
|
3556
|
-
toggleClass:
|
|
3557
|
-
clone:
|
|
3558
|
-
index:
|
|
3559
|
-
nextTick:
|
|
3560
|
-
cancelNextTick:
|
|
3561
|
-
detectDirection:
|
|
3562
|
-
getChild:
|
|
3567
|
+
extend: Ks,
|
|
3568
|
+
throttle: Ys,
|
|
3569
|
+
closest: Ns,
|
|
3570
|
+
toggleClass: Fs,
|
|
3571
|
+
clone: Qs,
|
|
3572
|
+
index: Hs,
|
|
3573
|
+
nextTick: ol,
|
|
3574
|
+
cancelNextTick: sl,
|
|
3575
|
+
detectDirection: Hc,
|
|
3576
|
+
getChild: Bs
|
|
3563
3577
|
}, Q.get = function(e) {
|
|
3564
|
-
return e[
|
|
3578
|
+
return e[ec];
|
|
3565
3579
|
}, Q.mount = function() {
|
|
3566
3580
|
var e = [...arguments];
|
|
3567
3581
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3568
3582
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3569
|
-
e.utils && (Q.utils =
|
|
3583
|
+
e.utils && (Q.utils = gs(gs({}, Q.utils), e.utils)), oc.mount(e);
|
|
3570
3584
|
});
|
|
3571
3585
|
}, Q.create = function(e, t) {
|
|
3572
3586
|
return new Q(e, t);
|
|
3573
|
-
}, Q.version =
|
|
3574
|
-
var $ = [],
|
|
3575
|
-
function
|
|
3587
|
+
}, Q.version = Ss;
|
|
3588
|
+
var $ = [], cl, ll, ul = !1, dl, fl, pl, ml;
|
|
3589
|
+
function hl() {
|
|
3576
3590
|
function e() {
|
|
3577
3591
|
for (var e in this.defaults = {
|
|
3578
3592
|
scroll: !0,
|
|
@@ -3592,63 +3606,63 @@ function pl() {
|
|
|
3592
3606
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3593
3607
|
},
|
|
3594
3608
|
drop: function() {
|
|
3595
|
-
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3609
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)), _l(), gl(), Xs();
|
|
3596
3610
|
},
|
|
3597
3611
|
nulling: function() {
|
|
3598
|
-
|
|
3612
|
+
pl = ll = cl = ul = ml = dl = fl = null, $.length = 0;
|
|
3599
3613
|
},
|
|
3600
3614
|
_handleFallbackAutoScroll: function(e) {
|
|
3601
3615
|
this._handleAutoScroll(e, !0);
|
|
3602
3616
|
},
|
|
3603
3617
|
_handleAutoScroll: function(e, t) {
|
|
3604
3618
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3605
|
-
if (
|
|
3606
|
-
|
|
3607
|
-
var o =
|
|
3608
|
-
|
|
3609
|
-
var a =
|
|
3610
|
-
a !== o && (o = a,
|
|
3611
|
-
}, 10),
|
|
3619
|
+
if (pl = e, t || this.options.forceAutoScrollFallback || Ts || ws || Ds) {
|
|
3620
|
+
vl(e, this.options, a, t);
|
|
3621
|
+
var o = Gs(a, !0);
|
|
3622
|
+
ul && (!ml || r !== dl || i !== fl) && (ml && _l(), ml = setInterval(function() {
|
|
3623
|
+
var a = Gs(document.elementFromPoint(r, i), !0);
|
|
3624
|
+
a !== o && (o = a, gl()), vl(e, n.options, a, t);
|
|
3625
|
+
}, 10), dl = r, fl = i);
|
|
3612
3626
|
} else {
|
|
3613
|
-
if (!this.options.bubbleScroll ||
|
|
3614
|
-
|
|
3627
|
+
if (!this.options.bubbleScroll || Gs(a, !0) === Rs()) {
|
|
3628
|
+
gl();
|
|
3615
3629
|
return;
|
|
3616
3630
|
}
|
|
3617
|
-
|
|
3631
|
+
vl(e, this.options, Gs(a, !1), !1);
|
|
3618
3632
|
}
|
|
3619
3633
|
}
|
|
3620
|
-
},
|
|
3634
|
+
}, ys(e, {
|
|
3621
3635
|
pluginName: "scroll",
|
|
3622
3636
|
initializeByDefault: !0
|
|
3623
3637
|
});
|
|
3624
3638
|
}
|
|
3625
|
-
function
|
|
3639
|
+
function gl() {
|
|
3626
3640
|
$.forEach(function(e) {
|
|
3627
3641
|
clearInterval(e.pid);
|
|
3628
3642
|
}), $ = [];
|
|
3629
3643
|
}
|
|
3630
|
-
function
|
|
3631
|
-
clearInterval(
|
|
3644
|
+
function _l() {
|
|
3645
|
+
clearInterval(ml);
|
|
3632
3646
|
}
|
|
3633
|
-
var
|
|
3647
|
+
var vl = Ys(function(e, t, n, r) {
|
|
3634
3648
|
if (t.scroll) {
|
|
3635
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3636
|
-
|
|
3637
|
-
var d = 0, f =
|
|
3649
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Rs(), l = !1, u;
|
|
3650
|
+
ll !== n && (ll = n, gl(), cl = t.scroll, u = t.scrollFn, cl === !0 && (cl = Gs(n, !0)));
|
|
3651
|
+
var d = 0, f = cl;
|
|
3638
3652
|
do {
|
|
3639
3653
|
var p = f, m = W(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = U(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3640
3654
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
3641
3655
|
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
3642
3656
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3643
3657
|
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3644
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3658
|
+
r && this.layer === 0 && Q.active._onTouchMove(pl);
|
|
3645
3659
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3646
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3660
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[ec], n, t, e, pl, $[this.layer].el) !== "continue" || Zs($[this.layer].el, n, t);
|
|
3647
3661
|
}.bind({ layer: d }), 24))), d++;
|
|
3648
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3649
|
-
|
|
3662
|
+
} while (t.bubbleScroll && f !== c && (f = Gs(f, !1)));
|
|
3663
|
+
ul = l;
|
|
3650
3664
|
}
|
|
3651
|
-
}, 30),
|
|
3665
|
+
}, 30), yl = function(e) {
|
|
3652
3666
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3653
3667
|
if (t) {
|
|
3654
3668
|
var c = n || i;
|
|
@@ -3660,8 +3674,8 @@ var gl = qs(function(e, t, n, r) {
|
|
|
3660
3674
|
}));
|
|
3661
3675
|
}
|
|
3662
3676
|
};
|
|
3663
|
-
function
|
|
3664
|
-
|
|
3677
|
+
function bl() {}
|
|
3678
|
+
bl.prototype = {
|
|
3665
3679
|
startIndex: null,
|
|
3666
3680
|
dragStart: function(e) {
|
|
3667
3681
|
var t = e.oldDraggableIndex;
|
|
@@ -3670,67 +3684,67 @@ vl.prototype = {
|
|
|
3670
3684
|
onSpill: function(e) {
|
|
3671
3685
|
var t = e.dragEl, n = e.putSortable;
|
|
3672
3686
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3673
|
-
var r =
|
|
3687
|
+
var r = Bs(this.sortable.el, this.startIndex, this.options);
|
|
3674
3688
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3675
3689
|
},
|
|
3676
|
-
drop:
|
|
3677
|
-
},
|
|
3678
|
-
function
|
|
3679
|
-
|
|
3690
|
+
drop: yl
|
|
3691
|
+
}, ys(bl, { pluginName: "revertOnSpill" });
|
|
3692
|
+
function xl() {}
|
|
3693
|
+
xl.prototype = {
|
|
3680
3694
|
onSpill: function(e) {
|
|
3681
3695
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3682
3696
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3683
3697
|
},
|
|
3684
|
-
drop:
|
|
3685
|
-
},
|
|
3686
|
-
function
|
|
3698
|
+
drop: yl
|
|
3699
|
+
}, ys(xl, { pluginName: "removeOnSpill" }), Q.mount(new hl()), Q.mount(xl, bl);
|
|
3700
|
+
function Sl(e) {
|
|
3687
3701
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3688
3702
|
}
|
|
3689
|
-
function
|
|
3690
|
-
O() &&
|
|
3703
|
+
function Cl(e) {
|
|
3704
|
+
O() && ne(e);
|
|
3691
3705
|
}
|
|
3692
|
-
function
|
|
3706
|
+
function wl(e) {
|
|
3693
3707
|
O() ? s(e) : _(e);
|
|
3694
3708
|
}
|
|
3695
|
-
var
|
|
3696
|
-
function
|
|
3697
|
-
|
|
3709
|
+
var Tl = null, El = null;
|
|
3710
|
+
function Dl(e = null, t = null) {
|
|
3711
|
+
Tl = e, El = t;
|
|
3698
3712
|
}
|
|
3699
|
-
function
|
|
3713
|
+
function Ol() {
|
|
3700
3714
|
return {
|
|
3701
|
-
data:
|
|
3702
|
-
clonedData:
|
|
3715
|
+
data: Tl,
|
|
3716
|
+
clonedData: El
|
|
3703
3717
|
};
|
|
3704
3718
|
}
|
|
3705
|
-
var
|
|
3706
|
-
function
|
|
3719
|
+
var kl = Symbol("cloneElement");
|
|
3720
|
+
function Al(...e) {
|
|
3707
3721
|
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3708
3722
|
Array.isArray(A(i)) || (a = i, i = null);
|
|
3709
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3723
|
+
let o = null, { immediate: s = !0, clone: l = Sl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3710
3724
|
function p(e) {
|
|
3711
3725
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3712
3726
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3713
3727
|
let s = A(A(i)?.[r]), c = l(s);
|
|
3714
|
-
|
|
3728
|
+
Dl(s, c), a[kl] = c;
|
|
3715
3729
|
}
|
|
3716
3730
|
function m(e) {
|
|
3717
|
-
let t = e.item[
|
|
3718
|
-
if (!
|
|
3719
|
-
if (
|
|
3731
|
+
let t = e.item[kl];
|
|
3732
|
+
if (!is(t)) {
|
|
3733
|
+
if (ss(e.item), w(i)) {
|
|
3720
3734
|
let n = [...A(i)];
|
|
3721
|
-
i.value =
|
|
3735
|
+
i.value = rs(n, e.newDraggableIndex, t);
|
|
3722
3736
|
return;
|
|
3723
3737
|
}
|
|
3724
|
-
|
|
3738
|
+
rs(A(i), e.newDraggableIndex, t);
|
|
3725
3739
|
}
|
|
3726
3740
|
}
|
|
3727
3741
|
function h(e) {
|
|
3728
3742
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3729
|
-
if (
|
|
3743
|
+
if (os(t, n, r), o === "clone") ss(s);
|
|
3730
3744
|
else if (w(i)) {
|
|
3731
3745
|
let e = [...A(i)];
|
|
3732
|
-
i.value =
|
|
3733
|
-
} else
|
|
3746
|
+
i.value = ns(e, a);
|
|
3747
|
+
} else ns(A(i), a);
|
|
3734
3748
|
}
|
|
3735
3749
|
function g(e) {
|
|
3736
3750
|
if (f) {
|
|
@@ -3738,10 +3752,10 @@ function Ol(...e) {
|
|
|
3738
3752
|
return;
|
|
3739
3753
|
}
|
|
3740
3754
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3741
|
-
if (
|
|
3755
|
+
if (ss(n), os(t, n, r), w(i)) {
|
|
3742
3756
|
let e = [...A(i)];
|
|
3743
|
-
i.value =
|
|
3744
|
-
} else
|
|
3757
|
+
i.value = $o(e, a, o);
|
|
3758
|
+
} else $o(A(i), a, o);
|
|
3745
3759
|
}
|
|
3746
3760
|
function v(e) {
|
|
3747
3761
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3760,7 +3774,7 @@ function Ol(...e) {
|
|
|
3760
3774
|
n = null;
|
|
3761
3775
|
}
|
|
3762
3776
|
_(() => {
|
|
3763
|
-
if (
|
|
3777
|
+
if (Dl(), o) throw o;
|
|
3764
3778
|
});
|
|
3765
3779
|
}
|
|
3766
3780
|
let y = {
|
|
@@ -3772,19 +3786,19 @@ function Ol(...e) {
|
|
|
3772
3786
|
};
|
|
3773
3787
|
function b(e) {
|
|
3774
3788
|
let n = A(r);
|
|
3775
|
-
return e ||=
|
|
3789
|
+
return e ||= as(n) ? cs(n, t?.$el) : n, e && !ds(e) && (e = e.$el), e || Qo("Root element not found"), e;
|
|
3776
3790
|
}
|
|
3777
3791
|
function x() {
|
|
3778
|
-
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3779
|
-
return
|
|
3780
|
-
|
|
3781
|
-
}),
|
|
3792
|
+
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = Yo(e, ["immediate", "clone"]);
|
|
3793
|
+
return fs(r, (e, t) => {
|
|
3794
|
+
ps(e) && (r[e] = (e, ...n) => (ms(e, Ol()), t(e, ...n)));
|
|
3795
|
+
}), us(i === null ? {} : y, r);
|
|
3782
3796
|
}
|
|
3783
3797
|
let S = (e) => {
|
|
3784
3798
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3785
3799
|
};
|
|
3786
3800
|
c(() => a, () => {
|
|
3787
|
-
o &&
|
|
3801
|
+
o && fs(x(), (e, t) => {
|
|
3788
3802
|
o?.option(e, t);
|
|
3789
3803
|
});
|
|
3790
3804
|
}, { deep: !0 });
|
|
@@ -3797,15 +3811,15 @@ function Ol(...e) {
|
|
|
3797
3811
|
toArray: () => o?.toArray(),
|
|
3798
3812
|
closest: (...e) => o?.closest(...e)
|
|
3799
3813
|
};
|
|
3800
|
-
return
|
|
3814
|
+
return wl(() => {
|
|
3801
3815
|
s && S();
|
|
3802
|
-
}),
|
|
3816
|
+
}), Cl(C.destroy), Jo({
|
|
3803
3817
|
start: S,
|
|
3804
3818
|
pause: () => C?.option("disabled", !0),
|
|
3805
3819
|
resume: () => C?.option("disabled", !1)
|
|
3806
3820
|
}, C);
|
|
3807
3821
|
}
|
|
3808
|
-
var
|
|
3822
|
+
var jl = [
|
|
3809
3823
|
"update",
|
|
3810
3824
|
"start",
|
|
3811
3825
|
"add",
|
|
@@ -3818,7 +3832,7 @@ var kl = [
|
|
|
3818
3832
|
"clone",
|
|
3819
3833
|
"move",
|
|
3820
3834
|
"change"
|
|
3821
|
-
],
|
|
3835
|
+
], Ml = [
|
|
3822
3836
|
"clone",
|
|
3823
3837
|
"animation",
|
|
3824
3838
|
"ghostClass",
|
|
@@ -3862,46 +3876,46 @@ var kl = [
|
|
|
3862
3876
|
"tag",
|
|
3863
3877
|
"target",
|
|
3864
3878
|
"customUpdate",
|
|
3865
|
-
...
|
|
3866
|
-
],
|
|
3879
|
+
...jl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3880
|
+
], Nl = z({
|
|
3867
3881
|
name: "VueDraggable",
|
|
3868
3882
|
model: {
|
|
3869
3883
|
prop: "modelValue",
|
|
3870
3884
|
event: "update:modelValue"
|
|
3871
3885
|
},
|
|
3872
|
-
props:
|
|
3873
|
-
emits: ["update:modelValue", ...
|
|
3886
|
+
props: Ml,
|
|
3887
|
+
emits: ["update:modelValue", ...jl],
|
|
3874
3888
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3875
|
-
let a =
|
|
3889
|
+
let a = jl.reduce((e, t) => {
|
|
3876
3890
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3877
3891
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3878
3892
|
}, {}), o = k(() => {
|
|
3879
|
-
let t = D(e), { modelValue: n } = t, r =
|
|
3893
|
+
let t = D(e), { modelValue: n } = t, r = Yo(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3880
3894
|
let r = A(n);
|
|
3881
3895
|
return r !== void 0 && (e[t] = r), e;
|
|
3882
3896
|
}, {});
|
|
3883
|
-
return
|
|
3897
|
+
return Jo(Jo({}, a), ts(Jo(Jo({}, i), o)));
|
|
3884
3898
|
}), s = k({
|
|
3885
3899
|
get: () => e.modelValue,
|
|
3886
3900
|
set: (e) => n("update:modelValue", e)
|
|
3887
|
-
}), c = M(), l = b(
|
|
3901
|
+
}), c = M(), l = b(Al(e.target || c, s, o));
|
|
3888
3902
|
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3889
3903
|
}
|
|
3890
|
-
}),
|
|
3904
|
+
}), Pl = {
|
|
3891
3905
|
mounted: "mounted",
|
|
3892
3906
|
unmounted: "unmounted"
|
|
3893
3907
|
};
|
|
3894
|
-
|
|
3908
|
+
Pl.mounted, Pl.unmounted;
|
|
3895
3909
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3896
|
-
var
|
|
3910
|
+
var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
3897
3911
|
key: 0,
|
|
3898
3912
|
"data-testid": "hero-image-hint",
|
|
3899
3913
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3900
|
-
},
|
|
3914
|
+
}, Ll = {
|
|
3901
3915
|
key: 0,
|
|
3902
3916
|
"data-testid": "section-drop-hint",
|
|
3903
3917
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3904
|
-
},
|
|
3918
|
+
}, Rl = /* @__PURE__ */ z({
|
|
3905
3919
|
__name: "SectionBlock",
|
|
3906
3920
|
props: {
|
|
3907
3921
|
block: {},
|
|
@@ -3910,20 +3924,21 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
3910
3924
|
},
|
|
3911
3925
|
setup(e) {
|
|
3912
3926
|
let t = {
|
|
3913
|
-
title:
|
|
3914
|
-
paragraph:
|
|
3915
|
-
image:
|
|
3916
|
-
button:
|
|
3917
|
-
divider:
|
|
3918
|
-
custom:
|
|
3919
|
-
}, n = e, { t: r } = le(), i =
|
|
3920
|
-
g(
|
|
3921
|
-
let u = R(
|
|
3922
|
-
function
|
|
3927
|
+
title: Fo,
|
|
3928
|
+
paragraph: Za,
|
|
3929
|
+
image: Wa,
|
|
3930
|
+
button: fa,
|
|
3931
|
+
divider: Ea,
|
|
3932
|
+
custom: wa
|
|
3933
|
+
}, n = e, { t: r } = le(), i = dn(Mn, "SectionBlock"), { displayBlock: o } = Pt(i), s = k(() => n.sourceBlock ?? n.block), c = R(gn, k(() => /* @__PURE__ */ new Set()));
|
|
3934
|
+
g(gn, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3935
|
+
let u = R(xn, null), f = R(bn, null), _ = R(fn, {}), b = R(an, null), x = R(sn, null);
|
|
3936
|
+
function w(e) {
|
|
3937
|
+
if (b?.value) return;
|
|
3923
3938
|
let t = _.savedBlocks;
|
|
3924
3939
|
t?.isPicking.value ? t.togglePick(n.block.id) : i.selectBlock(e);
|
|
3925
3940
|
}
|
|
3926
|
-
let
|
|
3941
|
+
let T = k(() => {
|
|
3927
3942
|
switch (n.block.columns) {
|
|
3928
3943
|
case "2": return ["50%", "50%"];
|
|
3929
3944
|
case "3": return [
|
|
@@ -3948,57 +3963,58 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
3948
3963
|
];
|
|
3949
3964
|
default: return ["100%"];
|
|
3950
3965
|
}
|
|
3951
|
-
}),
|
|
3952
|
-
let e =
|
|
3966
|
+
}), ee = k(() => {
|
|
3967
|
+
let e = T.value.length, t = [...(i.state.previewMode ? n.block : s.value).children];
|
|
3953
3968
|
for (; t.length < e;) t.push([]);
|
|
3954
3969
|
return t.slice(0, e);
|
|
3955
|
-
}),
|
|
3956
|
-
function D(e) {
|
|
3957
|
-
return T.value[e] || [];
|
|
3958
|
-
}
|
|
3970
|
+
}), D = k(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
3959
3971
|
function O(e) {
|
|
3960
|
-
return
|
|
3972
|
+
return ee.value[e] || [];
|
|
3961
3973
|
}
|
|
3962
3974
|
function te(e) {
|
|
3963
|
-
return !
|
|
3975
|
+
return x?.value === !1 || !u?.isHidden(e);
|
|
3964
3976
|
}
|
|
3965
|
-
let P = M(null);
|
|
3966
3977
|
function ne(e) {
|
|
3967
|
-
return
|
|
3978
|
+
return !O(e).some((e) => te(e.id));
|
|
3968
3979
|
}
|
|
3969
|
-
let re =
|
|
3980
|
+
let re = M(null);
|
|
3981
|
+
function ie(e) {
|
|
3982
|
+
return i.state.previewMode ? !1 : ne(e) ? !0 : re.value === e && O(e).filter((e) => te(e.id)).length <= 1;
|
|
3983
|
+
}
|
|
3984
|
+
let F = k(() => {
|
|
3970
3985
|
if (i.state.previewMode) return !1;
|
|
3971
|
-
let e =
|
|
3986
|
+
let e = Ve(n.block);
|
|
3972
3987
|
return e !== null && !e.applied && e.reason === "image";
|
|
3973
3988
|
});
|
|
3974
3989
|
function I(e) {
|
|
3975
|
-
return
|
|
3990
|
+
return O(e).length === 0 && !i.state.previewMode;
|
|
3976
3991
|
}
|
|
3977
|
-
function
|
|
3978
|
-
return
|
|
3992
|
+
function ae(e) {
|
|
3993
|
+
return O(e).length === 0 && i.state.previewMode;
|
|
3979
3994
|
}
|
|
3980
|
-
function
|
|
3981
|
-
|
|
3995
|
+
function se(e, t) {
|
|
3996
|
+
b?.value || Qa(i, t, n.block.id, e);
|
|
3982
3997
|
}
|
|
3983
|
-
function
|
|
3984
|
-
return
|
|
3998
|
+
function z(e) {
|
|
3999
|
+
return Ki(e, f, t);
|
|
3985
4000
|
}
|
|
3986
|
-
function
|
|
3987
|
-
e.type
|
|
4001
|
+
function ce(e, t) {
|
|
4002
|
+
b?.value || e.type !== "custom" || i.updateBlock(e.id, {
|
|
3988
4003
|
fieldValues: t.fieldValues,
|
|
3989
4004
|
dataSourceFetched: t.dataSourceFetched
|
|
3990
4005
|
});
|
|
3991
4006
|
}
|
|
3992
|
-
return (t, s) => (m(), N("div",
|
|
4007
|
+
return (t, s) => (m(), N("div", Fl, [F.value ? (m(), N("div", Il, [P("span", null, d(A(r).section.heroAddImage), 1)])) : j("", !0), P("div", { class: h(["tpl:flex tpl:gap-0", { "tpl:flex-col": D.value }]) }, [(m(!0), N(L, null, v(ee.value, (t, c) => (m(), N("div", {
|
|
3993
4008
|
key: c,
|
|
3994
4009
|
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3995
|
-
style: y({ width:
|
|
3996
|
-
}, [E(A(
|
|
3997
|
-
|
|
4010
|
+
style: y({ width: D.value ? "100%" : T.value[c] })
|
|
4011
|
+
}, [E(A(Nl), {
|
|
4012
|
+
disabled: A(b) ?? !1,
|
|
4013
|
+
"model-value": O(c),
|
|
3998
4014
|
group: {
|
|
3999
4015
|
name: "blocks",
|
|
4000
4016
|
pull: !0,
|
|
4001
|
-
put: (e, t, n) => A(
|
|
4017
|
+
put: (e, t, n) => A(Ho)(n)
|
|
4002
4018
|
},
|
|
4003
4019
|
animation: 150,
|
|
4004
4020
|
"ghost-class": "tpl-ghost",
|
|
@@ -4009,27 +4025,27 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4009
4025
|
"empty-insert-threshold": 20,
|
|
4010
4026
|
"force-fallback": !0,
|
|
4011
4027
|
class: h(["tpl:grow", {
|
|
4012
|
-
"tpl:min-h-[60px]":
|
|
4013
|
-
"tpl:min-h-[34px]":
|
|
4028
|
+
"tpl:min-h-[60px]": ie(c),
|
|
4029
|
+
"tpl:min-h-[34px]": ae(c)
|
|
4014
4030
|
}]),
|
|
4015
|
-
onUpdate: (e) => A(
|
|
4016
|
-
onStart: (e) =>
|
|
4017
|
-
onEnd: s[0] ||= (e) =>
|
|
4018
|
-
"onUpdate:modelValue": (e) =>
|
|
4031
|
+
onUpdate: (e) => !A(b) && A(Qa)(A(i), O(c), n.block.id, c, e),
|
|
4032
|
+
onStart: (e) => re.value = c,
|
|
4033
|
+
onEnd: s[0] ||= (e) => re.value = null,
|
|
4034
|
+
"onUpdate:modelValue": (e) => se(c, e)
|
|
4019
4035
|
}, {
|
|
4020
|
-
default: S(() => [(m(!0), N(L, null, v(
|
|
4036
|
+
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(No, {
|
|
4021
4037
|
block: t,
|
|
4022
4038
|
"display-block": A(o)(t),
|
|
4023
4039
|
"is-selected": A(i).state.selectedBlockId === t.id,
|
|
4024
4040
|
viewport: e.viewport,
|
|
4025
4041
|
"preview-mode": A(i).state.previewMode,
|
|
4026
4042
|
nested: "",
|
|
4027
|
-
onSelect: (e) =>
|
|
4043
|
+
onSelect: (e) => w(t.id)
|
|
4028
4044
|
}, {
|
|
4029
|
-
default: S(() => [(m(), oe(p(
|
|
4045
|
+
default: S(() => [(m(), oe(p(z(t)), l({ block: A(o)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
4030
4046
|
viewport: e.viewport,
|
|
4031
|
-
onFetchData: (e) =>
|
|
4032
|
-
onUpdate: (e) => A(i).updateBlock(t.id, e)
|
|
4047
|
+
onFetchData: (e) => ce(t, e),
|
|
4048
|
+
onUpdate: (e) => !A(b) && A(i).updateBlock(t.id, e)
|
|
4033
4049
|
}), null, 16, [
|
|
4034
4050
|
"block",
|
|
4035
4051
|
"viewport",
|
|
@@ -4044,23 +4060,24 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4044
4060
|
"viewport",
|
|
4045
4061
|
"preview-mode",
|
|
4046
4062
|
"onSelect"
|
|
4047
|
-
])])), [[a,
|
|
4063
|
+
])])), [[a, te(t.id)]])), 128))]),
|
|
4048
4064
|
_: 2
|
|
4049
4065
|
}, 1032, [
|
|
4066
|
+
"disabled",
|
|
4050
4067
|
"model-value",
|
|
4051
4068
|
"group",
|
|
4052
4069
|
"class",
|
|
4053
4070
|
"onUpdate",
|
|
4054
4071
|
"onStart",
|
|
4055
4072
|
"onUpdate:modelValue"
|
|
4056
|
-
]), I(c) ? (m(), N("div",
|
|
4073
|
+
]), I(c) ? (m(), N("div", Ll, [P("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4057
4074
|
}
|
|
4058
|
-
}),
|
|
4075
|
+
}), zl = ["width", "height"], Bl = [
|
|
4059
4076
|
"d",
|
|
4060
4077
|
"stroke",
|
|
4061
4078
|
"stroke-opacity",
|
|
4062
4079
|
"stroke-width"
|
|
4063
|
-
],
|
|
4080
|
+
], Vl = ["d", "fill"], Hl = /* @__PURE__ */ z({
|
|
4064
4081
|
__name: "SocialIconSvg",
|
|
4065
4082
|
props: {
|
|
4066
4083
|
platform: {},
|
|
@@ -4069,7 +4086,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4069
4086
|
iconSize: {}
|
|
4070
4087
|
},
|
|
4071
4088
|
setup(e) {
|
|
4072
|
-
let t = e, n = k(() =>
|
|
4089
|
+
let t = e, n = k(() => $n[t.platform]), r = k(() => tr[t.iconSize]), i = k(() => Ne(t.platform, t.iconTone)), a = k(() => tt(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4073
4090
|
let e = {
|
|
4074
4091
|
display: "inline-flex",
|
|
4075
4092
|
alignItems: "center",
|
|
@@ -4107,7 +4124,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4107
4124
|
};
|
|
4108
4125
|
default: return e;
|
|
4109
4126
|
}
|
|
4110
|
-
}), s = k(() =>
|
|
4127
|
+
}), s = k(() => he(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
|
|
4111
4128
|
function l(e) {
|
|
4112
4129
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4113
4130
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4128,15 +4145,15 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4128
4145
|
"stroke-opacity": a.value.opacity,
|
|
4129
4146
|
"stroke-width": a.value.width / s.value,
|
|
4130
4147
|
"stroke-linejoin": "round"
|
|
4131
|
-
}, null, 8,
|
|
4148
|
+
}, null, 8, Bl)) : j("", !0), P("path", {
|
|
4132
4149
|
d: n.value.path,
|
|
4133
4150
|
fill: u.value
|
|
4134
|
-
}, null, 8,
|
|
4151
|
+
}, null, 8, Vl)], 8, zl))], 4));
|
|
4135
4152
|
}
|
|
4136
|
-
}),
|
|
4153
|
+
}), Ul = { class: "tpl:w-full" }, Wl = ["href"], Gl = {
|
|
4137
4154
|
key: 1,
|
|
4138
4155
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4139
|
-
},
|
|
4156
|
+
}, Kl = /* @__PURE__ */ z({
|
|
4140
4157
|
__name: "SocialIconsBlock",
|
|
4141
4158
|
props: {
|
|
4142
4159
|
block: {},
|
|
@@ -4149,7 +4166,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4149
4166
|
gap: `${t.block.spacing}px`,
|
|
4150
4167
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4151
4168
|
})), a = k(() => t.block.icons.length > 0);
|
|
4152
|
-
return (t, o) => (m(), N("div",
|
|
4169
|
+
return (t, o) => (m(), N("div", Ul, [a.value ? (m(), N("div", {
|
|
4153
4170
|
key: 0,
|
|
4154
4171
|
style: y(r.value)
|
|
4155
4172
|
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
@@ -4157,7 +4174,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4157
4174
|
href: t.url || "#",
|
|
4158
4175
|
class: "tpl:cursor-default",
|
|
4159
4176
|
onClick: o[0] ||= i(() => {}, ["prevent"])
|
|
4160
|
-
}, [E(
|
|
4177
|
+
}, [E(Hl, {
|
|
4161
4178
|
platform: t.platform,
|
|
4162
4179
|
"icon-style": e.block.iconStyle,
|
|
4163
4180
|
"icon-tone": e.block.iconTone,
|
|
@@ -4167,44 +4184,46 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4167
4184
|
"icon-style",
|
|
4168
4185
|
"icon-tone",
|
|
4169
4186
|
"icon-size"
|
|
4170
|
-
])], 8,
|
|
4187
|
+
])], 8, Wl))), 128))], 4)) : (m(), N("div", Gl, [E(A(Bn), { size: 16 }), P("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4171
4188
|
}
|
|
4172
|
-
}),
|
|
4189
|
+
}), ql = { class: "tpl:w-full" }, Jl = {
|
|
4173
4190
|
key: 0,
|
|
4174
4191
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4175
4192
|
style: {
|
|
4176
4193
|
"background-color": "var(--tpl-bg-hover)",
|
|
4177
4194
|
color: "var(--tpl-text-dim)"
|
|
4178
4195
|
}
|
|
4179
|
-
},
|
|
4196
|
+
}, Yl = /* @__PURE__ */ z({
|
|
4180
4197
|
__name: "SpacerBlock",
|
|
4181
4198
|
props: {
|
|
4182
4199
|
block: {},
|
|
4183
4200
|
viewport: {}
|
|
4184
4201
|
},
|
|
4185
4202
|
setup(e) {
|
|
4186
|
-
let t = e, n =
|
|
4203
|
+
let t = e, n = dn(Mn, "SpacerBlock"), r = k(() => ({
|
|
4187
4204
|
height: `${t.block.height}px`,
|
|
4188
4205
|
minHeight: `${t.block.height}px`,
|
|
4189
4206
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4190
4207
|
}));
|
|
4191
|
-
return (t, i) => (m(), N("div",
|
|
4208
|
+
return (t, i) => (m(), N("div", ql, [P("div", {
|
|
4192
4209
|
style: y(r.value),
|
|
4193
4210
|
class: h(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !A(n).state.previewMode }])
|
|
4194
|
-
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span",
|
|
4211
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Jl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4195
4212
|
}
|
|
4196
|
-
}),
|
|
4213
|
+
}), Xl = { class: "tpl:w-full" }, Zl = { key: 0 }, Ql = [
|
|
4197
4214
|
"aria-label",
|
|
4215
|
+
"contenteditable",
|
|
4198
4216
|
"data-placeholder",
|
|
4199
4217
|
"onBlur"
|
|
4200
|
-
],
|
|
4218
|
+
], $l = [
|
|
4201
4219
|
"aria-label",
|
|
4220
|
+
"contenteditable",
|
|
4202
4221
|
"data-placeholder",
|
|
4203
4222
|
"onBlur"
|
|
4204
|
-
],
|
|
4223
|
+
], eu = {
|
|
4205
4224
|
key: 1,
|
|
4206
4225
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4207
|
-
},
|
|
4226
|
+
}, tu = /*#__PURE__*/ wr(/* @__PURE__ */ z({
|
|
4208
4227
|
__name: "TableBlock",
|
|
4209
4228
|
props: {
|
|
4210
4229
|
block: {},
|
|
@@ -4218,7 +4237,7 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4218
4237
|
updated(e, t) {
|
|
4219
4238
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4220
4239
|
}
|
|
4221
|
-
}, n = e, { t: r } = le(), a =
|
|
4240
|
+
}, n = e, { t: r } = le(), a = dn(Mn, "TableBlock"), s = dn(ln, "TableBlock"), c = R(an, null), l = k(() => n.block.rows.length > 0), u = k(() => {
|
|
4222
4241
|
let e = {
|
|
4223
4242
|
width: "100%",
|
|
4224
4243
|
borderCollapse: "collapse",
|
|
@@ -4227,19 +4246,20 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4227
4246
|
fontFamily: n.block.fontFamily ? s.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
4228
4247
|
};
|
|
4229
4248
|
return n.block.color && (e.color = n.block.color), e;
|
|
4230
|
-
}),
|
|
4249
|
+
}), f = k(() => ({
|
|
4231
4250
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
4232
4251
|
padding: `${n.block.cellPadding}px`,
|
|
4233
4252
|
textAlign: n.block.textAlign
|
|
4234
|
-
})),
|
|
4235
|
-
...
|
|
4253
|
+
})), p = k(() => ({
|
|
4254
|
+
...f.value,
|
|
4236
4255
|
fontWeight: "bold",
|
|
4237
4256
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
4238
|
-
})),
|
|
4239
|
-
function
|
|
4240
|
-
a.selectBlock(n.block.id);
|
|
4257
|
+
})), h = k(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), g = k(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
4258
|
+
function _() {
|
|
4259
|
+
c?.value || a.selectBlock(n.block.id);
|
|
4241
4260
|
}
|
|
4242
|
-
function
|
|
4261
|
+
function b(e, t, r) {
|
|
4262
|
+
if (c?.value) return;
|
|
4243
4263
|
let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
4244
4264
|
...n,
|
|
4245
4265
|
cells: n.cells.map((e) => e.id === t ? {
|
|
@@ -4249,48 +4269,48 @@ var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
|
4249
4269
|
} : n);
|
|
4250
4270
|
a.updateBlock(n.block.id, { rows: o });
|
|
4251
4271
|
}
|
|
4252
|
-
return (e, n) => (m(), N("div",
|
|
4272
|
+
return (e, n) => (m(), N("div", Xl, [l.value ? (m(), N("table", {
|
|
4253
4273
|
key: 0,
|
|
4254
|
-
style: y(
|
|
4274
|
+
style: y(u.value),
|
|
4255
4275
|
class: "tpl-table-editable"
|
|
4256
|
-
}, [
|
|
4276
|
+
}, [h.value ? (m(), N("thead", Zl, [P("tr", null, [(m(!0), N(L, null, v(h.value.cells, (e) => C((m(), N("th", {
|
|
4257
4277
|
key: e.id,
|
|
4258
|
-
style: y(
|
|
4278
|
+
style: y(p.value),
|
|
4259
4279
|
"aria-label": A(r).table.cellPlaceholder,
|
|
4260
|
-
contenteditable: "true",
|
|
4280
|
+
contenteditable: A(c) ? "false" : "true",
|
|
4261
4281
|
"data-placeholder": A(r).table.cellPlaceholder,
|
|
4262
|
-
onBlur: (t) =>
|
|
4282
|
+
onBlur: (t) => b(h.value.id, e.id, t),
|
|
4263
4283
|
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4264
|
-
onClick: i(
|
|
4265
|
-
}, null, 44,
|
|
4284
|
+
onClick: i(_, ["stop"])
|
|
4285
|
+
}, null, 44, Ql)), [[t, e.content]])), 128))])])) : j("", !0), P("tbody", null, [(m(!0), N(L, null, v(g.value, (e) => (m(), N("tr", { key: e.id }, [(m(!0), N(L, null, v(e.cells, (a) => C((m(), N("td", {
|
|
4266
4286
|
key: a.id,
|
|
4267
|
-
style: y(
|
|
4287
|
+
style: y(f.value),
|
|
4268
4288
|
"aria-label": A(r).table.cellPlaceholder,
|
|
4269
|
-
contenteditable: "true",
|
|
4289
|
+
contenteditable: A(c) ? "false" : "true",
|
|
4270
4290
|
"data-placeholder": A(r).table.cellPlaceholder,
|
|
4271
|
-
onBlur: (t) =>
|
|
4291
|
+
onBlur: (t) => b(e.id, a.id, t),
|
|
4272
4292
|
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4273
|
-
onClick: i(
|
|
4274
|
-
}, null, 44,
|
|
4293
|
+
onClick: i(_, ["stop"])
|
|
4294
|
+
}, null, 44, $l)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", eu, [E(A(Vn), { size: 16 }), P("span", null, d(A(r).table.empty), 1)]))]));
|
|
4275
4295
|
}
|
|
4276
|
-
}), [["__scopeId", "data-v-
|
|
4296
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), nu = /* @__PURE__ */ z({
|
|
4277
4297
|
__name: "VideoPlayButton",
|
|
4278
4298
|
props: { hoverEffect: {
|
|
4279
4299
|
type: Boolean,
|
|
4280
4300
|
default: !1
|
|
4281
4301
|
} },
|
|
4282
4302
|
setup(e) {
|
|
4283
|
-
return (t, n) => (m(), N("div", { class: h(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [
|
|
4303
|
+
return (t, n) => (m(), N("div", { class: h(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [P("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [P("svg", {
|
|
4284
4304
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
4285
4305
|
width: "28",
|
|
4286
4306
|
height: "28",
|
|
4287
4307
|
viewBox: "0 0 24 24",
|
|
4288
4308
|
fill: "currentColor"
|
|
4289
|
-
}, [
|
|
4309
|
+
}, [P("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
4290
4310
|
}
|
|
4291
4311
|
});
|
|
4292
4312
|
// src/utils/videoThumbnail.ts
|
|
4293
|
-
function
|
|
4313
|
+
function ru(e) {
|
|
4294
4314
|
if (!e) return {
|
|
4295
4315
|
platform: "unknown",
|
|
4296
4316
|
videoId: null,
|
|
@@ -4322,24 +4342,24 @@ function tu(e) {
|
|
|
4322
4342
|
thumbnailUrl: null
|
|
4323
4343
|
};
|
|
4324
4344
|
}
|
|
4325
|
-
function
|
|
4326
|
-
return t ||
|
|
4345
|
+
function iu(e, t) {
|
|
4346
|
+
return t || ru(e).thumbnailUrl;
|
|
4327
4347
|
}
|
|
4328
4348
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4329
|
-
var
|
|
4349
|
+
var au = ["src", "alt"], ou = {
|
|
4330
4350
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4331
4351
|
style: { opacity: "0.7" }
|
|
4332
|
-
},
|
|
4352
|
+
}, su = ["href"], cu = ["src", "alt"], lu = ["src", "alt"], uu = {
|
|
4333
4353
|
key: 3,
|
|
4334
4354
|
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
4335
|
-
},
|
|
4355
|
+
}, du = /* @__PURE__ */ z({
|
|
4336
4356
|
__name: "VideoBlock",
|
|
4337
4357
|
props: {
|
|
4338
4358
|
block: {},
|
|
4339
4359
|
viewport: {}
|
|
4340
4360
|
},
|
|
4341
4361
|
setup(e) {
|
|
4342
|
-
let t = e, { t: n } = le(), { syntax: r } = B(), a = k(() =>
|
|
4362
|
+
let t = e, { t: n } = le(), { syntax: r } = B(), a = k(() => st(t.block.url, r) || st(t.block.thumbnailUrl, r)), o = Kn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Kn(() => a.value ? t.block.placeholderUrl : void 0), c = k(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : iu(t.block.url)), l = k(() => ({ textAlign: t.block.align })), u = k(() => {
|
|
4343
4363
|
let e = t.block.align;
|
|
4344
4364
|
return {
|
|
4345
4365
|
maxWidth: "100%",
|
|
@@ -4349,7 +4369,7 @@ var ru = ["src", "alt"], iu = {
|
|
|
4349
4369
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4350
4370
|
marginRight: e === "center" ? "auto" : void 0
|
|
4351
4371
|
};
|
|
4352
|
-
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() =>
|
|
4372
|
+
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() => st(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4353
4373
|
return (t, r) => (m(), N("div", {
|
|
4354
4374
|
class: "tpl:w-full",
|
|
4355
4375
|
style: y(l.value)
|
|
@@ -4357,21 +4377,21 @@ var ru = ["src", "alt"], iu = {
|
|
|
4357
4377
|
key: 0,
|
|
4358
4378
|
class: "tpl:relative tpl:inline-block",
|
|
4359
4379
|
style: y(u.value)
|
|
4360
|
-
}, [
|
|
4380
|
+
}, [P("img", {
|
|
4361
4381
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4362
4382
|
src: A(s),
|
|
4363
4383
|
alt: e.block.alt,
|
|
4364
4384
|
style: y(f.value)
|
|
4365
|
-
}, null, 12,
|
|
4385
|
+
}, null, 12, au), E(nu)], 4)) : a.value ? (m(), N("div", {
|
|
4366
4386
|
key: 1,
|
|
4367
4387
|
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4368
4388
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4369
|
-
}, [E(A(
|
|
4389
|
+
}, [E(A(Fr), {
|
|
4370
4390
|
size: 36,
|
|
4371
4391
|
"stroke-width": 1.5,
|
|
4372
4392
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4373
4393
|
style: { opacity: "0.5" }
|
|
4374
|
-
}),
|
|
4394
|
+
}), P("span", ou, [E(ua, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4375
4395
|
key: 0,
|
|
4376
4396
|
href: e.block.url,
|
|
4377
4397
|
target: "_blank",
|
|
@@ -4379,67 +4399,67 @@ var ru = ["src", "alt"], iu = {
|
|
|
4379
4399
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4380
4400
|
style: y(u.value),
|
|
4381
4401
|
onClick: r[0] ||= i(() => {}, ["prevent"])
|
|
4382
|
-
}, [
|
|
4402
|
+
}, [P("img", {
|
|
4383
4403
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4384
4404
|
src: c.value,
|
|
4385
4405
|
alt: e.block.alt,
|
|
4386
4406
|
style: y(f.value)
|
|
4387
|
-
}, null, 12,
|
|
4407
|
+
}, null, 12, cu), E(nu, { "hover-effect": "" })], 12, su)) : (m(), N("div", {
|
|
4388
4408
|
key: 1,
|
|
4389
4409
|
class: "tpl:relative tpl:inline-block",
|
|
4390
4410
|
style: y(u.value)
|
|
4391
|
-
}, [
|
|
4411
|
+
}, [P("img", {
|
|
4392
4412
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
4393
4413
|
src: c.value,
|
|
4394
4414
|
alt: e.block.alt,
|
|
4395
4415
|
style: y(f.value)
|
|
4396
|
-
}, null, 12,
|
|
4416
|
+
}, null, 12, lu), E(nu)], 4))], 64)) : (m(), N("div", uu, [E(A(Fr), {
|
|
4397
4417
|
size: 40,
|
|
4398
4418
|
"stroke-width": 1.5,
|
|
4399
4419
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4400
|
-
}),
|
|
4401
|
-
}
|
|
4402
|
-
}),
|
|
4403
|
-
section:
|
|
4404
|
-
title:
|
|
4405
|
-
paragraph:
|
|
4406
|
-
image:
|
|
4407
|
-
button:
|
|
4408
|
-
divider:
|
|
4409
|
-
video:
|
|
4410
|
-
social:
|
|
4411
|
-
menu:
|
|
4412
|
-
table:
|
|
4413
|
-
spacer:
|
|
4414
|
-
html:
|
|
4415
|
-
countdown: se(() => import("./CountdownBlock-
|
|
4420
|
+
}), P("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4421
|
+
}
|
|
4422
|
+
}), fu = {
|
|
4423
|
+
section: Rl,
|
|
4424
|
+
title: Fo,
|
|
4425
|
+
paragraph: Za,
|
|
4426
|
+
image: Wa,
|
|
4427
|
+
button: fa,
|
|
4428
|
+
divider: Ea,
|
|
4429
|
+
video: du,
|
|
4430
|
+
social: Kl,
|
|
4431
|
+
menu: Ja,
|
|
4432
|
+
table: tu,
|
|
4433
|
+
spacer: Yl,
|
|
4434
|
+
html: Ma,
|
|
4435
|
+
countdown: se(() => import("./CountdownBlock-BrR2uqM3.js"))
|
|
4416
4436
|
};
|
|
4417
|
-
function
|
|
4418
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = le(i), l = k(() =>
|
|
4437
|
+
function pu(t) {
|
|
4438
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = le(i), l = k(() => xt(xt(xt(xi(i), Vi(n.content.value.settings?.locale)), Ce(n.content.value.settings) === "rtl" ? {
|
|
4419
4439
|
title: { textAlign: "right" },
|
|
4420
4440
|
table: { textAlign: "right" }
|
|
4421
4441
|
} : {}), r.blockDefaults ?? {}));
|
|
4422
4442
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4423
|
-
let { resolvedTheme: u } =
|
|
4443
|
+
let { resolvedTheme: u } = fi(k(() => n.state.uiTheme)), d = M(r.theme ?? {}), { themeStyles: f } = Gr({
|
|
4424
4444
|
themeOverrides: d,
|
|
4425
4445
|
resolvedTheme: u,
|
|
4426
4446
|
extraStyles: () => ({
|
|
4427
4447
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4428
4448
|
...t.themeExtraStyles?.()
|
|
4429
4449
|
})
|
|
4430
|
-
}), p = t.history ??
|
|
4450
|
+
}), p = t.history ?? Un({
|
|
4431
4451
|
content: n.content,
|
|
4432
4452
|
setContent: (e, t) => n.setContent(e, t)
|
|
4433
4453
|
});
|
|
4434
|
-
t.history ||
|
|
4435
|
-
let m =
|
|
4454
|
+
t.history || qn(n, p);
|
|
4455
|
+
let m = Hn({
|
|
4436
4456
|
addBlock: n.addBlock,
|
|
4437
4457
|
removeBlock: n.removeBlock,
|
|
4438
4458
|
updateBlock: n.updateBlock,
|
|
4439
4459
|
selectBlock: n.selectBlock,
|
|
4440
4460
|
findBlockLocation: n.findBlockLocation,
|
|
4441
4461
|
blockDefaults: () => l.value
|
|
4442
|
-
}), h =
|
|
4462
|
+
}), h = sr(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Gn({
|
|
4443
4463
|
content: n.content,
|
|
4444
4464
|
isDirty: () => n.state.isDirty,
|
|
4445
4465
|
...t.autoSaveOptions
|
|
@@ -4447,28 +4467,28 @@ function du(t) {
|
|
|
4447
4467
|
_ && (v = c(p.isNavigating, (e) => {
|
|
4448
4468
|
e ? _.pause() : _.resume();
|
|
4449
4469
|
}));
|
|
4450
|
-
let y =
|
|
4470
|
+
let y = di(n, {
|
|
4451
4471
|
t: o,
|
|
4452
4472
|
format: s
|
|
4453
|
-
}, r.customBlocks ?? []), b =
|
|
4454
|
-
if (b.allowCustomIgnored &&
|
|
4455
|
-
let e =
|
|
4456
|
-
e.length > 0 &&
|
|
4457
|
-
}
|
|
4458
|
-
let x =
|
|
4459
|
-
for (let e of x.unknown)
|
|
4460
|
-
let S =
|
|
4461
|
-
|
|
4473
|
+
}, r.customBlocks ?? []), b = At(r.colors);
|
|
4474
|
+
if (b.allowCustomIgnored && Dt.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Dt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4475
|
+
let e = bi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4476
|
+
e.length > 0 && Dt.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4477
|
+
}
|
|
4478
|
+
let x = cr(r.templateSettings);
|
|
4479
|
+
for (let e of x.unknown) Dt.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${lr.join(", ")}) — skipping it.`);
|
|
4480
|
+
let S = zr();
|
|
4481
|
+
_i(S, fu);
|
|
4462
4482
|
let C = /* @__PURE__ */ new Set();
|
|
4463
4483
|
function w(e) {
|
|
4464
4484
|
for (let t of e) {
|
|
4465
|
-
S.registerCustom(t,
|
|
4466
|
-
for (let e of
|
|
4485
|
+
S.registerCustom(t, wa);
|
|
4486
|
+
for (let e of Hi(t, b)) C.has(e.id) || (C.add(e.id), Dt.warn(e.message));
|
|
4467
4487
|
}
|
|
4468
4488
|
}
|
|
4469
4489
|
r.customBlocks?.length && w(r.customBlocks);
|
|
4470
|
-
let E =
|
|
4471
|
-
if (
|
|
4490
|
+
let E = ni();
|
|
4491
|
+
if (I() && T(E.dispose), t.containerEl) {
|
|
4472
4492
|
let n = t.containerEl;
|
|
4473
4493
|
e(document, "pointerdown", (e) => {
|
|
4474
4494
|
let t = n.value;
|
|
@@ -4480,7 +4500,7 @@ function du(t) {
|
|
|
4480
4500
|
e ? e.save() : _?.flush();
|
|
4481
4501
|
}
|
|
4482
4502
|
function D(e) {
|
|
4483
|
-
E.isActive() &&
|
|
4503
|
+
E.isActive() && Wi(e, {
|
|
4484
4504
|
history: p,
|
|
4485
4505
|
selectBlock: (e) => n.selectBlock(e),
|
|
4486
4506
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4493,40 +4513,40 @@ function du(t) {
|
|
|
4493
4513
|
}
|
|
4494
4514
|
e(document, "keydown", D);
|
|
4495
4515
|
let O = M(null), A = t.editorRoot ?? document;
|
|
4496
|
-
g(
|
|
4516
|
+
g(Fn, A), g(Tn, O), g(Rt, /* @__PURE__ */ new Map()), g(Dn, i), g(Mn, n), g(Pn, p), g(On, m), g(xn, h), g(ln, a), g(Sn, f), g(Cn, u), g(un, l), g(cn, r.locale), g(bn, S), g(hn, r.customBlocks ?? []), g(Wt, r.paletteBlocks), g(Qt, vi(r.htmlBlockPreview)), g($t, r.layout), g(Xt, r.sectionWrapper), g(wn, b), g(An, x.fields), g(mn, pi(n.content, S));
|
|
4497
4517
|
let j = Ee(r.mergeTags?.syntax);
|
|
4498
4518
|
for (let e of ["opener", "closer"]) {
|
|
4499
4519
|
let t = j[e];
|
|
4500
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4520
|
+
typeof t == "string" && t.trim() === "" && Dt.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4501
4521
|
}
|
|
4502
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
4503
|
-
let N =
|
|
4522
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && it(j) === null && Dt.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4523
|
+
let N = ie(r.mergeTags?.tags ?? []);
|
|
4504
4524
|
function te(e) {
|
|
4505
|
-
Array.isArray(e) ? N.value = e :
|
|
4525
|
+
Array.isArray(e) ? N.value = e : Dt.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4506
4526
|
}
|
|
4507
|
-
g(Yt, N), g(It, j), g(Bt, r.mergeTags?.onRequest ?? null), g(zt, r.mergeTags?.autocomplete !== !1), g(
|
|
4508
|
-
let
|
|
4509
|
-
g(
|
|
4510
|
-
let
|
|
4527
|
+
g(Yt, N), g(It, j), g(Bt, r.mergeTags?.onRequest ?? null), g(zt, r.mergeTags?.autocomplete !== !1), g(In, r.mergeTags?.showRawValue !== !1);
|
|
4528
|
+
let ne = M(rt(r.mergeTags?.tags ?? []));
|
|
4529
|
+
g(Zt, ne);
|
|
4530
|
+
let re = ai({
|
|
4511
4531
|
resolvePreview: r.resolvePreview,
|
|
4512
4532
|
getContent: () => {
|
|
4513
4533
|
let e = n.content.value;
|
|
4514
4534
|
if (!n.state.previewMode) return e;
|
|
4515
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4516
|
-
return r.layout ?
|
|
4535
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = _t(e, t);
|
|
4536
|
+
return r.layout ? Pe(_t(r.layout, t, { missing: "default" }), i) : i;
|
|
4517
4537
|
},
|
|
4518
4538
|
isActive: () => n.state.previewMode,
|
|
4519
4539
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4520
4540
|
});
|
|
4521
|
-
g(Ut,
|
|
4522
|
-
let
|
|
4523
|
-
g(
|
|
4524
|
-
let
|
|
4525
|
-
g(Ht,
|
|
4526
|
-
let L =
|
|
4541
|
+
g(Ut, re), g(rn, r.resolvePreview);
|
|
4542
|
+
let P = k(() => !(n.state.previewMode && re.isConfigured));
|
|
4543
|
+
g(sn, P);
|
|
4544
|
+
let F = oi();
|
|
4545
|
+
g(Ht, F), g(Gt, M(!1)), g(qt, M(!1)), g(vn, r.logicTags?.tags ?? []), g(Ft, r.logicTags?.pairs ?? []), g(en, r.logicTags?.onRequest ?? null), g(Kt, si()), g(nn, r.onRequestMedia ?? null), g(jn, r.canDropMedia ?? null), g(Lt, r.resolveImageUrl ? ar(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Dt.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(on, r.displayConditions?.conditions ?? []), g(En, r.displayConditions?.allowCustom ?? !1), g(Vt, r.displayConditions?.onRequest ?? null), g(fn, t.capabilities ?? {}), g(Nn, y);
|
|
4546
|
+
let L = ci(r.lint) ? null : ui({
|
|
4527
4547
|
content: n.content,
|
|
4528
4548
|
get options() {
|
|
4529
|
-
return
|
|
4549
|
+
return ri({
|
|
4530
4550
|
...r,
|
|
4531
4551
|
content: n.content.value,
|
|
4532
4552
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -4538,7 +4558,7 @@ function du(t) {
|
|
|
4538
4558
|
updateSettings: n.updateSettings,
|
|
4539
4559
|
removeBlock: n.removeBlock
|
|
4540
4560
|
});
|
|
4541
|
-
g(
|
|
4561
|
+
g(pn, L);
|
|
4542
4562
|
function ae() {
|
|
4543
4563
|
v?.(), L?.destroy(), _?.destroy(), p.destroy();
|
|
4544
4564
|
}
|
|
@@ -4557,9 +4577,9 @@ function du(t) {
|
|
|
4557
4577
|
keyboardReorder: y,
|
|
4558
4578
|
templateLint: L,
|
|
4559
4579
|
popoverRoot: O,
|
|
4560
|
-
mergeTagSampleMode:
|
|
4561
|
-
previewResolution:
|
|
4562
|
-
appliesConditionFilter:
|
|
4580
|
+
mergeTagSampleMode: ne,
|
|
4581
|
+
previewResolution: re,
|
|
4582
|
+
appliesConditionFilter: P,
|
|
4563
4583
|
registerCustomBlocks: w,
|
|
4564
4584
|
setMergeTags: te,
|
|
4565
4585
|
mergeTags: N,
|
|
@@ -4568,12 +4588,12 @@ function du(t) {
|
|
|
4568
4588
|
};
|
|
4569
4589
|
}
|
|
4570
4590
|
// src/composables/useSmallScreenNotice.ts
|
|
4571
|
-
var
|
|
4572
|
-
function
|
|
4573
|
-
let n = t(
|
|
4591
|
+
var mu = "(max-width: 767px)";
|
|
4592
|
+
function hu(e) {
|
|
4593
|
+
let n = t(mu);
|
|
4574
4594
|
return {
|
|
4575
4595
|
isSmallScreen: n,
|
|
4576
|
-
showNotice: k(() => (
|
|
4596
|
+
showNotice: k(() => (F(e) ?? !0) && n.value)
|
|
4577
4597
|
};
|
|
4578
4598
|
}
|
|
4579
|
-
export {
|
|
4599
|
+
export { ki as A, Xr as B, Zi as C, Gi as D, na as E, Ni as F, jr as G, Rr as H, Mi as I, kr as K, ai as L, Ii as M, Fi as N, ca as O, Pi as P, ri as R, Ji as S, ta as T, Lr as U, Ur as V, Nr as W, Ma as _, Yl as a, ha as b, Nl as c, Fo as d, No as f, Wa as g, Ja as h, tu as i, Li as j, Ki as k, Io as l, Za as m, pu as n, Kl as o, Qa as p, du as r, Rl as s, hu as t, zo as u, Ea as v, oa as w, fa as x, wa as y, Qr as z };
|